noteoff — Send a noteoff message to the MIDI OUT port.


Send a noteoff message to the MIDI OUT port.


noteoff ichn, inum, ivel


ichn -- MIDI channel number (1-16)

inum -- note number (0-127)

ivel -- velocity (0-127)


noteon (i-rate note on) and noteoff (i-rate note off) are the simplest MIDI OUT opcodes. noteon sends a MIDI noteon message to MIDI OUT port, and noteoff sends a noteoff message. A noteon opcode must always be followed by an noteoff with the same channel and number inside the same instrument, otherwise the note will play endlessly.

These noteon and noteoff opcodes are useful only when introducing a timout statement to play a non-zero duration MIDI note. For most purposes, it is better to use noteondur and noteondur2.

See also

Note-on/Note-off Output


Author: Gabriel Maldonado

New in Csound version 3.47

Thanks goes to Rasmus Ekman for pointing out the correct MIDI channel and controller number ranges.