fbpx
Skip to main content

MIDI Forum

Writing MIDI softwa...
 
Notifications
Clear all

Writing MIDI software: send Note Off, or zero-velocity Note On?

9 Posts
8 Users
0 Reactions
29 K Views
Igor Clark
Posts: 2
New Member
Topic starter
 

Hi there,

From what I can find out online, most modern MIDI equipment (keyboards, controllers) sends Note On messages with a velocity of 0 to end a note, rather than Note Off messages as per the spec. IIUC this is to make it easier to send a complete sequence of notes using running status. Makes sense.

It'd be good to be able to use zero-velocity note-ons exclusively when writing MIDI code, as it means a bunch of cases don't come up, and there's less code to write. But are there disadvantages to doing that? Is there hardware or software that doesn't accept a zero-velocity Note On as an end-note message, and only sends/responds to Note Off messages? How common is it, if so?

For people writing software sending MIDI messages today, what's the recommended approach?

Thanks for any info,
Igor

 
Posted : 25/04/2016 1:57 pm
MMA
 MMA
Posts: 25
Admin Registered
 

Igor,

The MIDI Specification says:

"A receiver must be capable of recognizing either method of turning off a note, and should treat them identically."

Does that help you?

Regards,

Forum Admin (MMA)

 
Posted : 25/04/2016 7:21 pm
Bob Lee
Posts: 12
Active Member
 

Has that always been true? I'm writing for some late-80s synths (Roland U-110 and D-110).

 
Posted : 25/04/2016 8:01 pm
Clemens Ladisch
Posts: 321
Reputable Member
 

Running status has always been a required feature of MIDI, and many keyboards have been using it since the beginning.

In practice, almost everybody gets this right. The only two known exceptions are the first class-compliant version of the M-Audio MidiSport Uno (they quickly fixed it; you should not see one in the wild nowadays), and the the QinHeng/WinChipHead CH345 USB/MIDI chip, which is still being sold with this error (and other errors, like corrupted SysEx messages).

 
Posted : 26/04/2016 3:29 am
Igor Clark
Posts: 2
New Member
Topic starter
 

Thanks all, helpful. The software I'm working on receives and sends MIDI messages. So to make sure I have it 100% clear, if I listen out for note-offs, convert them internally to zero-velocity note-ons, and only ever send zero-velocity note-ons outwards, I should be OK, because there's basically no software or hardware in the wild that expects note-offs and will be left hanging. Do I have that right?

Thanks again!

 
Posted : 27/04/2016 11:58 am
Jim Young
Posts: 1
New Member
 

My software is used as a controller and I've always sent note off messages. It's worked so far with all the DAW software and devices I've test with.

 
Posted : 29/05/2016 9:08 am
David Warman
Posts: 1
New Member
 

IIRC, the velocity byte in a Note Off message was intended to be available for use in adding expression to the ending of a note, .e.g. perhaps modulating the release time, or filter release curve. Synths not implementing this ignore the velocity byte and just terminate the note the same way as a Note On with zero velocity. However I never came across anything that actually implemented Note Off Velocity (not that my experience is particularly encyplopedic).

 
Posted : 03/07/2016 3:40 pm
Steve
Posts: 1
New Member
 

NoteOff - vel = 0 or vel = 64?

What about the case where the synth responds to the velocity in the NoteOff message? I have been requested to "fix" the velocity sent in a NoteOff message, that our sequencer sends, from vel=0 to vel=64. It turns out that this is the way the "spec" suggests sending a NoteOff.

Anyone have any thoughts on this topic? I guess the NoteOff vel enables more expressive playing.

Thanks,
Steve

 
Posted : 15/07/2020 1:06 pm
JohnG
Posts: 225
Estimable Member
 

Steve,

It seems to be dependant upon whether a keyboard is capable of generating and transmitting note velocity.

The detailed MIDI 1.0 specification says the following (I hope it's okay to quote the spec?):

MIDI 1.0 Detailed Specification 4.2 11, spanning pages 10 and 11.

"The three methods of using Note-On (9nH) or Note-Off (8nH) are as follows:

1. For a keyboard which does not implement Velocity, the note will be turned on using 9n,
kkkkkkk, 64 (40H) and may be turned off using 9n, 0kkkkkkk, 00000000 or 8n, 0kkkkkkk,
0xxxxxxx (a value of 64 [40H] is used for x).

2. For a keyboard which incorporates Key On Velocity, but not Release Velocity the note is
turned on using 9n 0kkkkkkk, 0vvvvvvv and may be turned off using 9n, 0kkkkkkk, 00000000 or
8n, 0kkkkkkk, 0xxxxxxx (a value of 64 (40H) is recommended for x).

3. Where the keyboard implements both Key On Velocity and Release Velocity, a note is turned
on using 9n 0kkkkkkk, 0vvvvvvv, and turned off using 8n, 0kkkkkkk, 0vvvvvvv.
"

Any help?
JohnG.

 
Posted : 17/07/2020 4:25 am
Share: