midiflush

Send note-offs for hanging note-ons in raw MIDI data

Description

midiflush analyzes a MIDI stream (from midiin or seq), counting the number of note-ons received for each note and MIDI channel. When it is sent a bang, MIDI note-off messages are sent for any notes which haven't been turned off. This is useful in conjunction with seq, which doesn't turn its notes off when it receives the stop message. At all times, midiflush echoes its input to output.

Arguments

None.

Messages

bang When midiflush receives a bang, it outputs MIDI note-off messages for all note-ons which have not been matched by note-offs since the object was created (or the last bang message was sent).
int raw-MIDI-data [int]
Raw MIDI data from a source such as seq or midiin will be passed through unchanged, while the object observes which note-on messages on each channel have not received matching note-off messages.
clear Erases any note-ons held by midiflush, without sending any note-offs.

Information for box attributes common to all objects

Output

int: midiflush passes all its input through to its output, and sends MIDI note-off messages (as a series of numbers) for all note-ons which have not been matched by note-offs at its input.

Examples

When midiflush receives a bang it supplies note-offs for any held note-ons

See Also

Name Description
flush Provide note-offs for held notes
midiin Output received raw MIDI data
midiinfo Set a pop-up menu with names of MIDI devices
midiout Transmit raw MIDI data
Max MIDI Tutorial 2: MIDI Note Management Max MIDI Tutorial 2: MIDI Note Management
Max MIDI Tutorial 4: MIDI Basic Sequencing Max MIDI Tutorial 4: MIDI Basic Sequencing