Hold note-off messages, output them on command
int | value [int] |
In left inlet: The number is the pitch value of a pitch-velocity pair. If the velocity value currently held by sustain is not 0, then the pair is sent out immediately. If the velocity is , the note-off is either sent out or held, depending on whether sustain is turned on. In middle inlet: The number is stored as a velocity to be paired with pitch numbers received in the left inlet. In right inlet: If the number is not 0, sustain is turned on, and all note-offs are held. If the number is , sustain is turned off, and all note-offs are sent out immediately. |
float | value [float] |
Converted to | .
list | note/velocity pair [list] |
In left inlet: A two-item list consisting of a note-velocity pair can be input. |
clear | Clears the | object's internal memory. No note-off messages are output.|
flush | Outputs the | object's currently held note-offs.
Name | Type | g/s | Description |
---|---|---|---|
repeatmode | int | Sets the behavior mode for handling repeated note-on messages. There are three modes of behavior: repeatmode 0: (Historical way) Playing the same note multiple times will not retrigger the played note when the sustain pedal is pressed or after a message is received. This is the default state of the object. repeatmode 1: (Re-trigger) Playing the same note multiple times will send a note off message and retrigger the played note no matter what its sustain state is. The sustain object will also keep track of the notes to stop when the sustain pedal is released or a message is received. repeatmode 2: (Stop last) Playing the same note multiple times will cause the sustain object to keep a count of the number of times the note has been played, holding and sending the accumulated note off messages when the sustain pedal is released or a message is received. |
|
sustain | int | Enables (1) or disables (0) sustain mode. Setting this attribute or sending the message | or is equivalent to pressing or releasing the sustain pedal.