sustain

Hold note-off messages, output them on command

Description

sustain will hold any notes with velocities of 0 until instructed to release them.

Arguments

None.

Messages

int MIDI-pitch-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 0, the note-off is either sent out or held, depending on whether sustain is turned on.
  (inlet1) MIDI-velocity [int] In middle inlet: The number is stored as a velocity to be paired with pitch numbers received in the left inlet.
  (inlet2) sustain-flag (0 or non-zero) [int] In right inlet: If the number is not 0, sustain is turned on, and all note-offs are held. If the number is 0, sustain is turned off, and all note-offs are sent out immediately.
float MIDI-pitch-value [float] Converted to int.
clear Clears the object's memory of any held note-offs.

Information for box attributes common to all objects

Output

int: Out left outlet: The pitch value of a pitch-velocity pair.

Out right outlet: The velocity value of a pitch-velocity pair.

Note-on pairs are always sent out immediately. If sustain is turned on, note-offs are held until it is turned off. Otherwise, note-offs are sent out immediately.

Examples

Like the sustain pedal of a piano sustain releases all held notes at one time

See Also

Name Description
flush Provide note-offs for held notes
makenote Generate a note-off message, following each note-on
stripnote Filter out note-off messages, pass only note-on messages