Liking cljdoc? Tell your friends :D

javax.sound.midi.ShortMessage

A ShortMessage contains a MIDI message that has at most two data bytes following its status byte. The types of MIDI message that satisfy this criterion are channel voice, channel mode, system common, and system real-time--in other words, everything except system exclusive and meta-events. The ShortMessage class provides methods for getting and setting the contents of the MIDI message.

A number of ShortMessage methods have integer parameters by which you specify a MIDI status or data byte. If you know the numeric value, you can express it directly. For system common and system real-time messages, you can often use the corresponding fields of ShortMessage, such as SYSTEM_RESET. For channel messages, the upper four bits of the status byte are specified by a command value and the lower four bits are specified by a MIDI channel number. To convert incoming MIDI data bytes that are in the form of Java's signed bytes, you can use the conversion code given in the MidiMessage class description.

A ShortMessage contains a MIDI message that has at most
two data bytes following its status byte.  The types of MIDI message
that satisfy this criterion are channel voice, channel mode, system common,
and system real-time--in other words, everything except system exclusive
and meta-events.  The ShortMessage class provides methods
for getting and setting the contents of the MIDI message.

A number of ShortMessage methods have integer parameters by which
you specify a MIDI status or data byte.  If you know the numeric value, you
can express it directly.  For system common and system real-time messages,
you can often use the corresponding fields of ShortMessage, such as
SYSTEM_RESET.  For channel messages,
the upper four bits of the status byte are specified by a command value and
the lower four bits are specified by a MIDI channel number. To
convert incoming MIDI data bytes that are in the form of Java's signed bytes,
you can use the conversion code
given in the MidiMessage class description.
raw docstring

*-active-sensingclj

Static Constant.

Status byte for Active Sensing message (0xFE, or 254).

type: int

Static Constant.

Status byte for Active Sensing message (0xFE, or 254).

type: int
raw docstring

*-channel-pressureclj

Static Constant.

Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)

type: int

Static Constant.

Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)

type: int
raw docstring

*-continueclj

Static Constant.

Status byte for Continue message (0xFB, or 251).

type: int

Static Constant.

Status byte for Continue message (0xFB, or 251).

type: int
raw docstring

*-control-changeclj

Static Constant.

Command value for Control Change message (0xB0, or 176)

type: int

Static Constant.

Command value for Control Change message (0xB0, or 176)

type: int
raw docstring

*-end-of-exclusiveclj

Static Constant.

Status byte for End of System Exclusive message (0xF7, or 247).

type: int

Static Constant.

Status byte for End of System Exclusive message (0xF7, or 247).

type: int
raw docstring

*-midi-time-codeclj

Static Constant.

Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).

type: int

Static Constant.

Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).

type: int
raw docstring

*-note-offclj

Static Constant.

Command value for Note Off message (0x80, or 128)

type: int

Static Constant.

Command value for Note Off message (0x80, or 128)

type: int
raw docstring

*-note-onclj

Static Constant.

Command value for Note On message (0x90, or 144)

type: int

Static Constant.

Command value for Note On message (0x90, or 144)

type: int
raw docstring

*-pitch-bendclj

Static Constant.

Command value for Pitch Bend message (0xE0, or 224)

type: int

Static Constant.

Command value for Pitch Bend message (0xE0, or 224)

type: int
raw docstring

*-poly-pressureclj

Static Constant.

Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 160)

type: int

Static Constant.

Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 160)

type: int
raw docstring

*-program-changeclj

Static Constant.

Command value for Program Change message (0xC0, or 192)

type: int

Static Constant.

Command value for Program Change message (0xC0, or 192)

type: int
raw docstring

*-song-position-pointerclj

Static Constant.

Status byte for Song Position Pointer message (0xF2, or 242).

type: int

Static Constant.

Status byte for Song Position Pointer message (0xF2, or 242).

type: int
raw docstring

*-song-selectclj

Static Constant.

Status byte for MIDI Song Select message (0xF3, or 243).

type: int

Static Constant.

Status byte for MIDI Song Select message (0xF3, or 243).

type: int
raw docstring

*-startclj

Static Constant.

Status byte for Start message (0xFA, or 250).

type: int

Static Constant.

Status byte for Start message (0xFA, or 250).

type: int
raw docstring

*-stopclj

Static Constant.

Status byte for Stop message (0xFC, or 252).

type: int

Static Constant.

Status byte for Stop message (0xFC, or 252).

type: int
raw docstring

*-system-resetclj

Static Constant.

Status byte for System Reset message (0xFF, or 255).

type: int

Static Constant.

Status byte for System Reset message (0xFF, or 255).

type: int
raw docstring

*-timing-clockclj

Static Constant.

Status byte for Timing Clock message (0xF8, or 248).

type: int

Static Constant.

Status byte for Timing Clock message (0xF8, or 248).

type: int
raw docstring

*-tune-requestclj

Static Constant.

Status byte for Tune Request message (0xF6, or 246).

type: int

Static Constant.

Status byte for Tune Request message (0xF6, or 246).

type: int
raw docstring

->short-messageclj

(->short-message)
(->short-message status)
(->short-message status data-1 data-2)
(->short-message command channel data-1 data-2)

Constructor.

Constructs a new ShortMessage which represents a channel MIDI message that takes up to two data bytes. If the message only takes one data byte, the second data byte is ignored. If the message does not take any data bytes, both data bytes are ignored. The contents of the message can be changed by using one of the setMessage methods.

command - the MIDI command represented by this message - int channel - the channel associated with the message - int data-1 - the first data byte - int data-2 - the second data byte - int

throws: javax.sound.midi.InvalidMidiDataException - if the command value, channel value or all data bytes belonging to the message do not specify a valid MIDI message

Constructor.

Constructs a new ShortMessage which represents a channel
 MIDI message that takes up to two data bytes. If the message only takes
 one data byte, the second data byte is ignored. If the message does not
 take any data bytes, both data bytes are ignored.
 The contents of the message can be changed by using one of
 the setMessage methods.

command - the MIDI command represented by this message - `int`
channel - the channel associated with the message - `int`
data-1 - the first data byte - `int`
data-2 - the second data byte - `int`

throws: javax.sound.midi.InvalidMidiDataException - if the command value, channel value or all data bytes belonging to the message do not specify a valid MIDI message
raw docstring

cloneclj

(clone this)

Creates a new object of the same class and with the same contents as this object.

returns: a clone of this instance. - java.lang.Object

Creates a new object of the same class and with the same contents
 as this object.

returns: a clone of this instance. - `java.lang.Object`
raw docstring

get-channelclj

(get-channel this)

Obtains the MIDI channel associated with this event. This method assumes that the event is a MIDI channel message; if not, the return value will not be meaningful.

returns: MIDI channel associated with the message. - int

Obtains the MIDI channel associated with this event.  This method
 assumes that the event is a MIDI channel message; if not, the return
 value will not be meaningful.

returns: MIDI channel associated with the message. - `int`
raw docstring

get-commandclj

(get-command this)

Obtains the MIDI command associated with this event. This method assumes that the event is a MIDI channel message; if not, the return value will not be meaningful.

returns: the MIDI command associated with this event - int

Obtains the MIDI command associated with this event.  This method
 assumes that the event is a MIDI channel message; if not, the return
 value will not be meaningful.

returns: the MIDI command associated with this event - `int`
raw docstring

get-data-1clj

(get-data-1 this)

Obtains the first data byte in the message.

returns: the value of the data1 field - int

Obtains the first data byte in the message.

returns: the value of the data1 field - `int`
raw docstring

get-data-2clj

(get-data-2 this)

Obtains the second data byte in the message.

returns: the value of the data2 field - int

Obtains the second data byte in the message.

returns: the value of the data2 field - `int`
raw docstring

set-messageclj

(set-message this status)
(set-message this status data-1 data-2)
(set-message this command channel data-1 data-2)

Sets the short message parameters for a channel message which takes up to two data bytes. If the message only takes one data byte, the second data byte is ignored; if the message does not take any data bytes, both data bytes are ignored.

command - the MIDI command represented by this message - int channel - the channel associated with the message - int data-1 - the first data byte - int data-2 - the second data byte - int

throws: javax.sound.midi.InvalidMidiDataException - if the status byte or all data bytes belonging to the message, do not specify a valid MIDI message

Sets the short message parameters for a  channel message
 which takes up to two data bytes.  If the message only
 takes one data byte, the second data byte is ignored; if
 the message does not take any data bytes, both data bytes
 are ignored.

command - the MIDI command represented by this message - `int`
channel - the channel associated with the message - `int`
data-1 - the first data byte - `int`
data-2 - the second data byte - `int`

throws: javax.sound.midi.InvalidMidiDataException - if the status byte or all data bytes belonging to the message, do not specify a valid MIDI message
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close