midiflush Reference

Send MIDI note-offs for hanging note-ons

midiflush

Description

Analyzes a raw 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 have not been turned off.

Examples

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

Discussion

This object 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.

Attributes

Common Box Attributes

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

Arguments

input [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.

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.

See Also

Name Description
MIDI MIDI
flush
midiin
midiinfo
midiout
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