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

xnotein

Interpret MIDI note messages with release velocity

Description

xnotein can filter and process notes from a MIDI object such as midiin with a release velocity.

Arguments

Name Type Opt Description
MIDI-channel int opt Specifies a channel number on which to look for incoming MIDI note-on and note-off messages. Channel numbers greater than 16 will be wrapped around to stay within the 1-16 range. If there is no argument, xnotein recognizes note-on and note-off messages on all MIDI channels, and the channel number of the message is sent out the rightmost outlet.

Messages

int MIDI-input [int]
The numbers are individual bytes of a MIDI stream from midiin. Whereas a note-on with a velocity of 0 is most commonly used to indicate a note-off, xnotein also recognizes the MIDI note-off command, and outputs its release velocity.

Information for box attributes common to all objects

Output

int: Out left outlet: The pitch value of the incoming note-on or note-off message.

Out 2nd outlet: The key-down or key-up velocity of a note-on or a note-off message.

Out 3rd outlet: The number is the indicator of whether the incoming MIDI message is a note-on or a note-off. If the incoming message is a note-on, the output is 1. If the incoming message is a note-off--or a note-on with a velocity of 0--the output is 0.

If no channel number is specified as an argument, xnotein has a 4th outlet on the right. The channel number of incoming messages is sent out the rightmost outlet.

Examples

Both note-on and note-off messages are interpreted with a key-down or key-up velocity

See Also

Name Description
notein Output received MIDI note messages
midiin Output received raw MIDI data
xnoteout Format MIDI note messages with release velocity