Docs

Message


If you use one of the MIDI callbacks (onNoteOn , onNoteOff or onController ), this object contains methods to get / change the message that triggered the callback.

Message.getNoteNumber() // returns the note number in note callbacks
Message.setChannel(newChannel) // changes the channel of the midi message


Class methods

delayEvent

Delays the event by the sampleAmount.

Message.delayEvent(int samplesToDelay)



getChannel

Returns the MIDI Channel from 1 to 16.

Message.getChannel()



getCoarseDetune

Returns the coarse detune amount in semitones.

Message.getCoarseDetune()



getControllerNumber

returns the controller number or 'undefined', if the message is neither controller nor pitch wheel nor aftertouch.

Message.getControllerNumber()



getControllerValue

Returns the value of the controller.

Message.getControllerValue()



getEventId

Returns the event id of the current message.

Message.getEventId()



getFineDetune

Returns the fine detune amount int cents.

Message.getFineDetune()



getGain

Returns the volume of the note.

Message.getGain()



getNoteNumber

Return the note number. This can be called only on midi event callbacks.

Message.getNoteNumber()



getProgramChangeNumber

Returns the program change number or -1 if it isn't a program change message.

Message.getProgramChangeNumber()



getTimestamp

Returns the timestamp of the message.

Message.getTimestamp()



getTransposeAmount

Gets the tranpose value.

Message.getTransposeAmount()



getVelocity

Returns the Velocity.

Message.getVelocity()



ignoreEvent

Ignores the event.

Message.ignoreEvent(bool shouldBeIgnored=true)



isArtificial

Checks if the event was created by a script earlier.

Message.isArtificial()



isProgramChange

Checks if the message is a program change message.

Message.isProgramChange()



makeArtificial

Creates a artificial copy of this event and returns the new event ID.

Message.makeArtificial()



setChannel

Changes the MIDI channel from 1 to 16.

Message.setChannel(int newChannel)



setCoarseDetune

Sets the coarse detune amount in semitones.

Message.setCoarseDetune(int semiToneDetune)



setControllerNumber

Changes the ControllerNumber.

Message.setControllerNumber(int newControllerNumber)



setControllerValue

Changes the controller value (range 0 - 127).

Message.setControllerValue(int newControllerValue)



setFineDetune

Sets the fine detune amount in cents.

Message.setFineDetune(int cents)



setGain

Sets the volume of the note (-100 = silence).

Message.setGain(int gainInDecibels)



setNoteNumber

Changes the note number.

Message.setNoteNumber(int newNoteNumber)



setStartOffset

Sets the start offset for the given message.

Message.setStartOffset(int newStartOffset)



setTransposeAmount

Transposes the note on.

Message.setTransposeAmount(int tranposeValue)



setVelocity

Changes the velocity (range 1 - 127).

Message.setVelocity(int newVelocity)



store

Stores a copy of the current event into the given holder object.

Message.store(var messageEventHolder)