All scripting methods related to the midi message that triggered the callback. More...
Public Member Functions | |
void | delayEvent (int samplesToDelay) |
Delays the event by the sampleAmount. More... | |
int | getChannel () const |
Returns the MIDI Channel from 1 to 16. More... | |
int | getCoarseDetune () const |
Returns the coarse detune amount in semitones. More... | |
var | getControllerNumber () const |
returns the controller number or 'undefined', if the message is neither controller nor pitch wheel nor aftertouch. More... | |
var | getControllerValue () const |
Returns the value of the controller. More... | |
int | getEventId () const |
Returns the event id of the current message. More... | |
int | getFineDetune () const |
Returns the fine detune amount int cents. More... | |
int | getGain () const |
Returns the volume of the note. More... | |
int | getNoteNumber () const |
Return the note number. More... | |
int | getProgramChangeNumber () |
Returns the program change number or -1 if it isn't a program change message. More... | |
int | getTimestamp () const |
Returns the timestamp of the message. More... | |
int | getTransposeAmount () const |
Gets the tranpose value. More... | |
int | getVelocity () const |
Returns the Velocity. More... | |
void | ignoreEvent (bool shouldBeIgnored=true) |
Ignores the event. More... | |
bool | isArtificial () const |
Checks if the event was created by a script earlier. More... | |
bool | isProgramChange () |
Checks if the message is a program change message. More... | |
int | makeArtificial () |
Creates a artificial copy of this event and returns the new event ID. More... | |
void | setChannel (int newChannel) |
Changes the MIDI channel from 1 to 16. More... | |
void | setCoarseDetune (int semiToneDetune) |
Sets the coarse detune amount in semitones. More... | |
void | setControllerNumber (int newControllerNumber) |
Changes the ControllerNumber. More... | |
void | setControllerValue (int newControllerValue) |
Changes the controller value (range 0 - 127). More... | |
void | setFineDetune (int cents) |
Sets the fine detune amount in cents. More... | |
void | setGain (int gainInDecibels) |
Sets the volume of the note (-100 = silence). More... | |
void | setNoteNumber (int newNoteNumber) |
Changes the note number. More... | |
void | setStartOffset (int newStartOffset) |
Sets the start offset for the given message. More... | |
void | setTransposeAmount (int tranposeValue) |
Transposes the note on. More... | |
void | setVelocity (int newVelocity) |
Changes the velocity (range 1 - 127). More... | |
void | store (var messageEventHolder) const |
Stores a copy of the current event into the given holder object. More... | |
Public Member Functions inherited from ApiClass | |
void | addConstant (String constantName, var value) |
Adds a constant. More... | |
void | addFunction (const Identifier &id, call0 newFunction) |
Adds a function with no parameters. More... | |
void | addFunction1 (const Identifier &id, call1 newFunction) |
Adds a function with one parameter. More... | |
void | addFunction2 (const Identifier &id, call2 newFunction) |
Adds a function with two parameters. More... | |
void | addFunction3 (const Identifier &id, call3 newFunction) |
Adds a function with three parameters. More... | |
void | addFunction4 (const Identifier &id, call4 newFunction) |
Adds a function with four parameters. More... | |
void | addFunction5 (const Identifier &id, call5 newFunction) |
Adds a function with five parameters. More... | |
virtual bool | allowIllegalCallsOnAudioThread (int) const |
You can overwrite this method and return true if you want to allow illegal calls that would otherwise fire a warning. More... | |
ApiClass (int numConstants_) | |
Creates a Api class with the given amount of constants. More... | |
var | callFunction (int index, var *args, int numArgs) |
Calls the function with the index and the argument data. More... | |
void | getAllConstants (Array< Identifier > &ids) const |
Returns all constant names as alphabetically sorted array. More... | |
void | getAllFunctionNames (Array< Identifier > &ids) const |
This returns all function names alphabetically sorted. More... | |
int | getConstantIndex (const Identifier &id) const |
Return the index for the given name. More... | |
Identifier | getConstantName (int index) const |
Returns the name for the constant as it is used in the scripting context. More... | |
const var | getConstantValue (int index) const |
Returns the constant at the given index. More... | |
void | getIndexAndNumArgsForFunction (const Identifier &id, int &index, int &numArgs) const |
This will fill in the information for the given function. More... | |
All scripting methods related to the midi message that triggered the callback.
Every method must be called on the message like this:
message.delayEvent(200);
void delayEvent | ( | int | samplesToDelay | ) |
Delays the event by the sampleAmount.
int getChannel | ( | ) | const |
Returns the MIDI Channel from 1 to 16.
int getCoarseDetune | ( | ) | const |
Returns the coarse detune amount in semitones.
var getControllerNumber | ( | ) | const |
returns the controller number or 'undefined', if the message is neither controller nor pitch wheel nor aftertouch.
You can also check for pitch wheel values and aftertouch messages. Pitchwheel has number 128, Aftertouch has number 129.
var getControllerValue | ( | ) | const |
Returns the value of the controller.
int getEventId | ( | ) | const |
Returns the event id of the current message.
int getFineDetune | ( | ) | const |
Returns the fine detune amount int cents.
int getGain | ( | ) | const |
Returns the volume of the note.
int getNoteNumber | ( | ) | const |
Return the note number.
This can be called only on midi event callbacks.
int getProgramChangeNumber | ( | ) |
Returns the program change number or -1 if it isn't a program change message.
int getTimestamp | ( | ) | const |
Returns the timestamp of the message.
int getTransposeAmount | ( | ) | const |
Gets the tranpose value.
int getVelocity | ( | ) | const |
Returns the Velocity.
void ignoreEvent | ( | bool | shouldBeIgnored = true | ) |
Ignores the event.
bool isArtificial | ( | ) | const |
Checks if the event was created by a script earlier.
bool isProgramChange | ( | ) |
Checks if the message is a program change message.
int makeArtificial | ( | ) |
Creates a artificial copy of this event and returns the new event ID.
void setChannel | ( | int | newChannel | ) |
Changes the MIDI channel from 1 to 16.
void setCoarseDetune | ( | int | semiToneDetune | ) |
Sets the coarse detune amount in semitones.
void setControllerNumber | ( | int | newControllerNumber | ) |
Changes the ControllerNumber.
void setControllerValue | ( | int | newControllerValue | ) |
Changes the controller value (range 0 - 127).
void setFineDetune | ( | int | cents | ) |
Sets the fine detune amount in cents.
void setGain | ( | int | gainInDecibels | ) |
Sets the volume of the note (-100 = silence).
void setNoteNumber | ( | int | newNoteNumber | ) |
Changes the note number.
void setStartOffset | ( | int | newStartOffset | ) |
Sets the start offset for the given message.
void setTransposeAmount | ( | int | tranposeValue | ) |
Transposes the note on.
void setVelocity | ( | int | newVelocity | ) |
Changes the velocity (range 1 - 127).
void store | ( | var | messageEventHolder | ) | const |
Stores a copy of the current event into the given holder object.