RNBO Objects & Operators makenote
Open Help

makenote

Generate a note-on/note-off pair

Description

Outputs a MIDI note-on message paired with a velocity value, followed by a note-off message after a specified amount of time. This allows for generative MIDI output without having to manage note-off generation.

Arguments

velocity [number]

Optional

A number received in the second inlet is stored as a velocity to be paired with pitch numbers received in the left inlet. A default velocity can be typed-in as the first argument to makenote.

duration [number]

Optional

A number received in the third inlet is stored as the duration that makenote waits before a note-off message is sent out. A default duration can be typed-in as the second argument to makenote.

Inlets

notenumber [number]

A number received in the first inlet is treated as a pitch value for a MIDI note-on message. It is paired with a velocity value and the numbers are sent out the outlets. After a certain time, a note-off message (a note-on with a velocity of 0) is sent out for that pitch.

velocity [number]

A number received in the second inlet is stored as a velocity to be paired with pitch numbers received in the left inlet. A default velocity can be typed-in as the first argument to makenote.

duration [number]

A number received in the third inlet is stored as the duration that makenote waits before a note-off message is sent out. A default duration can be typed-in as the second argument to makenote.

Outlets

notenumber_out [number]

Out left outlet: The number received in the left inlet is sent out immediately, paired with a velocity value out the other outlet. After a certain duration, the same number is sent out paired with a velocity of 0.

velocity_out [number]

Out right outlet: The number in the middle inlet is sent out as a velocity value in conjunction with a pitch value out the left outlet. After a certain duration, 0 is sent out paired with the same pitch.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

repeatmode [enum] (default: none)

The repeatmode attribute sets behavior when a note is retriggered. The modes are:

none: There is no pre-specified behavior when when you repeat a pitch before the note-off for that pitch has been sent.

sendnoteoff: If a note is still playing when you retrigger it, the makenote object will send a note-off (velocity 0) message to stop the first note and then send a new note-on message.

cancelnoteoff: If a note is still playing when you retrigger it, the makenote object will cancel the scheduled output of the first note - only the last played note will send note-off (velocity 0) message.

Possible values:

0 = 'none'
1 = 'sendnoteoff'
2 = 'cancelnoteoff'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

duration [number]

A number received in the third inlet is stored as the duration that makenote waits before a note-off message is sent out. A default duration can be typed-in as the second argument to makenote.

notenumber [number]

A number received in the first inlet is treated as a pitch value for a MIDI note-on message. It is paired with a velocity value and the numbers are sent out the outlets. After a certain time, a note-off message (a note-on with a velocity of 0) is sent out for that pitch.

velocity [number]

A number received in the second inlet is stored as a velocity to be paired with pitch numbers received in the left inlet. A default velocity can be typed-in as the first argument to makenote.

See Also

Name Description
makenote
noteout transmit MIDI note messages
midiparse Interpret raw MIDI data
midiin MIDI input stream