A newer version of Max is available. Click here to access the latest version of the documentation

midiin Reference

Output raw MIDI data

midiin

Description

Listens to a specified MIDI port and output the raw MIDI data received.

Examples

MIDI messages received in a port are output by a midiin object

Arguments

port [symbol]

Optional

Specifies the port (a-z) from which to receive incoming MIDI messages. If there is no argument, midiin receives from port a (or the first input port listed in the MIDI Setup dialog.)

device [symbol]

Optional

The name of a MIDI input device may be used as the first argument to specify the port. The name 'none' can be used to prevent the object from receiving MIDI messages from any port.

Attributes

matchport [int] (default: 0)

If the port argument doesn't match an existing port or device name, set the object's MIDI port to 'none'.

name [symbol]

Set the object's MIDI port based on a device name. The attribute will attempt to do a case-sensitive partial string match based on the attribute's value.

Common Box Attributes

Messages

anything

Arguments

port [list]
Performs the same functions as port.

(mouse)

Double-clicking on a midiin object shows a pop-up menu for choosing a MIDI port or device.

(MIDI)

The midiin object receives all MIDI messages from a MIDI input device.

port

Arguments

port [symbol]
The word port, followed by a letter a- z or the name of a MIDI input port or device, sets the port from which the object receives incoming MIDI messages. The word port is optional and may be omitted. The name 'none' can be used to prevent the object from receiving MIDI messages from any port.

Output

int

All MIDI messages received from the specified port are sent out the outlet, byte-by-byte. Note that midiin does not "clean up" any use of running status in the incoming MIDI stream.

See Also

Name Description
MIDI MIDI
midiformat
midiinfo
midiformat
midiparse
mpeconfig
mpeformat
mpeparse
noteout
polymidiin
sxformat
xbendout
xnoteout
rtin
sysexin
xnotein
xbendin
Max MIDI Tutorial 1: Basic MIDI Max MIDI Tutorial 1: Basic MIDI