The Alternative Csound Reference Manual
Previous |  | Next

# noteon

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

## Description

Send a noteon message to the MIDI OUT port.

## Syntax

noteon ichn, inum, ivel

## Initialization

ichn -- MIDI channel number (1-16)

inum -- note number (0-127)

ivel -- velocity (0-127)

## Performance

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

## Credits

Author: Gabriel Maldonado
Italy

New in Csound version 3.47

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

Previous | Home | Next
noteoff | Up | noteondur