HISE 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)


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.

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()



getMonophonicAftertouchPressure

Returns the aftertouch value of the monophonic aftertouch message.

Message.getMonophonicAftertouchPressure()



getNoteNumber

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

Message.getNoteNumber()



getPolyAfterTouchNoteNumber

Returns the polyphonic aftertouch note number.

Message.getPolyAfterTouchNoteNumber()



getPolyAfterTouchPressureValue

Checks if the message is a POLYPHONIC aftertouch message (Use isChannelPressure() for monophonic aftertouch).

Message.getPolyAfterTouchPressureValue()



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()



isMonophonicAfterTouch

Checks if the message is a MONOPHONIC aftertouch message.

Message.isMonophonicAfterTouch()



isPolyAftertouch

Checks if the message is a POLYPHONIC aftertouch message (Use isChannelPressure() for monophonic aftertouch).

Message.isPolyAftertouch()



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. If the event is already artificial it will return the event ID.

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.

Message.makeArtificialOrLocal()



sendToMidiOut

This will forward the message to the MIDI out of the plugin.

Message.sendToMidiOut()



setAllNotesOffCallback

Sets a callback that will be performed when an all notes off message is received.

Message.setAllNotesOffCallback(var onAllNotesOffCallback)



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)



setMonophonicAfterTouchPressure

Sets the pressure value of the monophonic aftertouch message

Message.setMonophonicAfterTouchPressure(int pressure)



setNoteNumber

Changes the note number.

Message.setNoteNumber(int newNoteNumber)



setPolyAfterTouchNoteNumberAndPressureValue

Copied from MidiMessage.

Message.setPolyAfterTouchNoteNumberAndPressureValue(int noteNumber, int aftertouchAmount)



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)