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


Send a noteon message to the MIDI OUT port.


noteon 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

noteoff, noteondur, noteondur2


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.