midiformat Reference

Prepare data in the form of a MIDI message

midiformat

Description

Numbers received in the inlets are used as data for MIDI messages. The data is formatted into a complete MIDI message (with the status byte determined by the inlet) and sent out the outlet as individual bytes.

Examples

Numbers are formatted into MIDI messages and sent out as individual bytes

Arguments

initial-MIDI-channel-number [int]

Optional

Sets an initial value for the channel number of the MIDI messages. Numbers greater than 16 are wrapped around to stay between 1 and 16. If there is no argument, the channel number is initially set to 1.

initial-MIDI-channel-number [float]

Optional

Converted to int.

Attributes

hires [int] (default: 0)7.2.0

An integer in the range 0 - 2 sets the range used for pitch bend messages by the midiformat object.

Possible values:

0 = 'Off (0-127)' ( Standard 8-bit MIDI pitch bend range (default) )
1 = 'Float (-1 to 1)' ( Uses pitch bend messages in the audio signal range )
2 = '14-bit Fixed (-8192 to 8191)' ( Standard 14-bit MIDI high resolution pitch bend range )

Common Box Attributes

Messages

int

Arguments

value [int]
Function depends on inlet. See inlet entries, in1 in2 in3 in4 in5 in6 in7, for descriptions.

  (inlet1)

Arguments

pitch-value and velocity [list]
In leftmost inlet: The first number is a pitch value and the second number is a velocity value, to be formatted into a note-on message.

  (inlet2)

Arguments

aftertouch and pitch-value [list]
In 2nd inlet: The first number is an aftertouch (pressure) value and the second number is a pitch value (key number), to be formatted into a polyphonic key pressure message.

  (inlet3)

Arguments

control-value and controller-number [list]
In 3rd inlet: The first number is a control value and the second number is a controller number, to be formatted into a control message.

  (inlet4)

Arguments

program-change-value [int]
In 4th inlet: The value is formatted into a program change message.

  (inlet5)

Arguments

aftertouch [int]
In 5th inlet: The value is formatted into an aftertouch (channel pressure) message.

  (inlet7)

Arguments

MIDI-channel-number [int]
In rightmost inlet: The number is stored as the channel number of the MIDI messages. The actual value of the status byte is dependent on the channel. Numbers greater than 16 are wrapped around to stay between 1 and 16.

float

Arguments

value [float]
Function depends on inlet. See inlet entries, in1 in2 in3 in4 in5 in6 in7, for descriptions.

Output

int

Out left outlet: MIDI messages are sent out as individual bytes, for recording by the seq object or for transmission by the midiout object.

list

Out right outlet: A formatted midievent message for use with the vst~ object.

See Also

Name Description
MIDI MIDI
borax
midiin
midiinfo
midiparse
midiselect
mpeconfig
mpeformat
mpeparse
noteout
polymidiin
sxformat
xbendout
xnoteout
Max MIDI Tutorial 3: MIDI Parsing Max MIDI Tutorial 3: MIDI Parsing