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)
Be aware that if you call this method with a note on message, it will not delay the note-off message automatically too. You either have to ensure that your script performs this task in the respective note-off too or use the new API call Synth.setFixNoteOnAfterNoteOff()
which performs a few safe checks to prevent stuck notes in this scenario.
getChannel
Returns the MIDI Channel from 1 to 16. Edit on GitHub
Message.getChannel()
getCoarseDetune
Returns the coarse detune amount in semitones. Edit on GitHub
Message.getCoarseDetune()
getControllerNumber
returns the controller number or 'undefined', if the message is neither controller nor pitch wheel nor aftertouch. Edit on GitHub
Message.getControllerNumber()
getControllerValue
Returns the value of the controller. Edit on GitHub
Message.getControllerValue()
getEventId
Returns the event id of the current message. Edit on GitHub
Message.getEventId()
getFineDetune
Returns the fine detune amount int cents. Edit on GitHub
Message.getFineDetune()
getGain
Returns the volume of the note. Edit on GitHub
Message.getGain()
getMonophonicAftertouchPressure
Returns the aftertouch value of the monophonic aftertouch message. Edit on GitHub
Message.getMonophonicAftertouchPressure()
getNoteNumber
Return the note number. This can be called only on midi event callbacks. Edit on GitHub
Message.getNoteNumber()
getPolyAfterTouchNoteNumber
Returns the polyphonic aftertouch note number. Edit on GitHub
Message.getPolyAfterTouchNoteNumber()
getPolyAfterTouchPressureValue
Checks if the message is a POLYPHONIC aftertouch message (Use isChannelPressure() for monophonic aftertouch). Edit on GitHub
Message.getPolyAfterTouchPressureValue()
getProgramChangeNumber
Returns the program change number or -1 if it isn't a program change message. Edit on GitHub
Message.getProgramChangeNumber()
getTimestamp
Returns the timestamp of the message. Edit on GitHub
Message.getTimestamp()
getTransposeAmount
Gets the tranpose value. Edit on GitHub
Message.getTransposeAmount()
getVelocity
Returns the Velocity. Edit on GitHub
Message.getVelocity()
ignoreEvent
Ignores the event. Edit on GitHub
Message.ignoreEvent(bool shouldBeIgnored=true)
isArtificial
Checks if the event was created by a script earlier. Edit on GitHub
Message.isArtificial()
isMonophonicAfterTouch
Checks if the message is a MONOPHONIC aftertouch message. Edit on GitHub
Message.isMonophonicAfterTouch()
isPolyAftertouch
Checks if the message is a POLYPHONIC aftertouch message (Use isChannelPressure() for monophonic aftertouch). Edit on GitHub
Message.isPolyAftertouch()
isProgramChange
Checks if the message is a program change message. Edit on GitHub
Message.isProgramChange()
makeArtificial
Creates a artificial copy of this event and returns the new event ID. If the event is already artificial it will return the event ID. Edit on GitHub
Message.makeArtificial()
makeArtificialOrLocal
Creates a artificial copy of this event and returns the new event ID. If the event is artificial it will make a new one with a new ID. Edit on GitHub
Message.makeArtificialOrLocal()
sendToMidiOut
This will forward the message to the MIDI out of the plugin. Edit on GitHub
Message.sendToMidiOut()
setAllNotesOffCallback
Sets a callback that will be performed when an all notes off message is received. Edit on GitHub
Message.setAllNotesOffCallback(var onAllNotesOffCallback)
setChannel
Changes the MIDI channel from 1 to 16. Edit on GitHub
Message.setChannel(int newChannel)
setCoarseDetune
Sets the coarse detune amount in semitones. Edit on GitHub
Message.setCoarseDetune(int semiToneDetune)
setControllerNumber
Changes the ControllerNumber. Edit on GitHub
Message.setControllerNumber(int newControllerNumber)
setControllerValue
Changes the controller value (range 0 - 127). Edit on GitHub
Message.setControllerValue(int newControllerValue)
setFineDetune
Sets the fine detune amount in cents. Edit on GitHub
Message.setFineDetune(int cents)
setGain
Sets the volume of the note (-100 = silence). Edit on GitHub
Message.setGain(int gainInDecibels)
setMonophonicAfterTouchPressure
Sets the pressure value of the monophonic aftertouch message Edit on GitHub
Message.setMonophonicAfterTouchPressure(int pressure)
setNoteNumber
Changes the note number. Edit on GitHub
Message.setNoteNumber(int newNoteNumber)
setPolyAfterTouchNoteNumberAndPressureValue
Copied from MidiMessage. Edit on GitHub
Message.setPolyAfterTouchNoteNumberAndPressureValue(int noteNumber, int aftertouchAmount)
setStartOffset
Sets the start offset for the given message. Edit on GitHub
Message.setStartOffset(int newStartOffset)
setTransposeAmount
Transposes the note on. Edit on GitHub
Message.setTransposeAmount(int tranposeValue)
setVelocity
Changes the velocity (range 1 - 127). Edit on GitHub
Message.setVelocity(int newVelocity)
store
Stores a copy of the current event into the given holder object. Edit on GitHub
Message.store(var messageEventHolder)