Inherits ScriptingObject, and ApiClass.
Public Member Functions | |
void | addController (int channel, int number, int value, int timeStampSamples) |
ScriptEffect * | addEffect (const String &type, const String &id, int index) |
int | addMessageFromHolder (var messageHolder) |
ScriptModulator * | addModulator (int chainId, const String &type, const String &id) |
void | addNoteOff (int channel, int noteNumber, int timeStampSamples) |
int | addNoteOn (int channel, int noteNumber, int velocity, int timeStampSamples) |
void | addPitchFade (int eventId, int fadeTimeMilliseconds, int targetCoarsePitch, int targetFinePitch) |
void | addToFront (bool addToFront) |
void | addVolumeFade (int eventId, int fadeTimeMilliseconds, int targetVolume) |
void | deferCallbacks (bool makeAsynchronous) |
float | getAttribute (int attributeIndex) const |
ScriptAudioSampleProcessor * | getAudioSampleProcessor (const String &name) |
ScriptSynth * | getChildSynth (const String &name) |
ScriptSynth * | getChildSynthByIndex (int index) |
ScriptEffect * | getEffect (const String &name) |
var | getIdList (const String &type) |
ScriptMidiProcessor * | getMidiProcessor (const String &name) |
ScriptModulator * | getModulator (const String &name) |
int | getModulatorIndex (int chainId, const String &id) const |
int | getNumChildSynths () const |
int | getNumPressedKeys () const |
Sampler * | getSampler (const String &name) |
ScriptSlotFX * | getSlotFX (const String &name) |
ScriptTableProcessor * | getTableProcessor (const String &name) |
double | getTimerInterval () const |
bool | isKeyDown (int noteNumber) |
bool | isLegatoInterval () const |
bool | isSustainPedalDown () const |
bool | isTimerRunning () const |
void | noteOff (int noteNumber) |
void | noteOffByEventId (int eventId) |
int | playNote (int noteNumber, int velocity) |
bool | removeEffect (var effect) |
bool | removeModulator (var mod) |
void | sendController (int controllerNumber, int controllerValue) |
void | sendControllerToChildSynths (int controllerNumber, int controllerValue) |
void | setAttribute (int attributeIndex, float newAttribute) |
void | setClockSpeed (int clockSpeed) |
void | setMacroControl (int macroIndex, float newValue) |
void | setModulatorAttribute (int chainId, int modulatorIndex, int attributeIndex, float newValue) |
void | setShouldKillRetriggeredNote (bool killNote) |
void | setVoiceGainValue (int voiceIndex, float gainValue) |
void | setVoicePitchValue (int voiceIndex, double pitchValue) |
void | startTimer (double seconds) |
void | stopTimer () |
Provides access to the synth where the script processor resides.
There are special methods for SynthGroups which only work with SynthGroups
void addController | ( | int | channel, |
int | number, | ||
int | value, | ||
int | timeStampSamples | ||
) |
Adds a controller to the buffer.
ScriptEffect* addEffect | ( | const String & | type, |
const String & | id, | ||
int | index | ||
) |
Adds a effect (index = -1 to append it at the end).
int addMessageFromHolder | ( | var | messageHolder | ) |
Adds the event from the given holder and returns a event id for note ons.
ScriptModulator* addModulator | ( | int | chainId, |
const String & | type, | ||
const String & | id | ||
) |
Adds a Modulator to the synth's chain. If it already exists, it returns the index.
void addNoteOff | ( | int | channel, |
int | noteNumber, | ||
int | timeStampSamples | ||
) |
Adds a note off to the buffer.
int addNoteOn | ( | int | channel, |
int | noteNumber, | ||
int | velocity, | ||
int | timeStampSamples | ||
) |
Adds a note on to the buffer.
void addPitchFade | ( | int | eventId, |
int | fadeTimeMilliseconds, | ||
int | targetCoarsePitch, | ||
int | targetFinePitch | ||
) |
Adds a pitch fade to the given event ID.
void addToFront | ( | bool | addToFront | ) |
Adds the interface to the Container's body (or the frontend interface if compiled)
void addVolumeFade | ( | int | eventId, |
int | fadeTimeMilliseconds, | ||
int | targetVolume | ||
) |
Fades all voices with the given event id to the target volume (in decibels).
void deferCallbacks | ( | bool | makeAsynchronous | ) |
Defers all callbacks to the message thread (midi callbacks become read-only).
float getAttribute | ( | int | attributeIndex | ) | const |
Returns the attribute of the parent synth.
ScriptAudioSampleProcessor* getAudioSampleProcessor | ( | const String & | name | ) |
Returns the child synth with the supplied name.
ScriptSynth* getChildSynth | ( | const String & | name | ) |
Returns the child synth with the supplied name.
ScriptSynth* getChildSynthByIndex | ( | int | index | ) |
Returns the child synth with the given index.
ScriptEffect* getEffect | ( | const String & | name | ) |
Returns the Effect with the supplied name. Can only be called in onInit(). It looks also in all child processors.
var getIdList | ( | const String & | type | ) |
Searches the child processors and returns a list with every ID of the given type.
ScriptMidiProcessor* getMidiProcessor | ( | const String & | name | ) |
Returns the MidiProcessor with the supplied name. Can not be the own name!
ScriptModulator* getModulator | ( | const String & | name | ) |
Returns the Modulator with the supplied name. Can be only called in onInit. It looks also in all child processors.
int getModulatorIndex | ( | int | chainId, |
const String & | id | ||
) | const |
Returns the index of the Modulator in the chain with the supplied chainId
int getNumChildSynths | ( | ) | const |
Returns the number of child synths. Works with SynthGroups and SynthChains.
int getNumPressedKeys | ( | ) | const |
Returns the number of pressed keys (!= the number of playing voices!).
Sampler* getSampler | ( | const String & | name | ) |
Returns the first sampler with the name name.
ScriptSlotFX* getSlotFX | ( | const String & | name | ) |
Returns the first slot with the given name.
ScriptTableProcessor* getTableProcessor | ( | const String & | name | ) |
Returns the table processor with the given name.
double getTimerInterval | ( | ) | const |
Returns the current timer interval in seconds.
bool isKeyDown | ( | int | noteNumber | ) |
Checks if the given key is pressed.
bool isLegatoInterval | ( | ) | const |
Checks if any key is pressed.
bool isSustainPedalDown | ( | ) | const |
Returns true if the sustain pedal is pressed.
bool isTimerRunning | ( | ) | const |
Checks if the timer for this script is running.
void noteOff | ( | int | noteNumber | ) |
Sends a note off message. The envelopes will tail off.
void noteOffByEventId | ( | int | eventId | ) |
Sends a note off message for the supplied event ID. This is more stable than the deprecated noteOff() method.
int playNote | ( | int | noteNumber, |
int | velocity | ||
) |
Plays a note and returns the event id. Be careful or you get stuck notes!
bool removeEffect | ( | var | effect | ) |
Removes the given effect.
bool removeModulator | ( | var | mod | ) |
Removes the modulator.
void sendController | ( | int | controllerNumber, |
int | controllerValue | ||
) |
Sends a controller event to the synth.
void sendControllerToChildSynths | ( | int | controllerNumber, |
int | controllerValue | ||
) |
The same as sendController (for backwards compatibility)
void setAttribute | ( | int | attributeIndex, |
float | newAttribute | ||
) |
Sets an attribute of the parent synth.
void setClockSpeed | ( | int | clockSpeed | ) |
Sets the internal clock speed.
void setMacroControl | ( | int | macroIndex, |
float | newValue | ||
) |
Sets one of the eight macro controllers to the newValue.
macroIndex | the index of the macro from 1 - 8 |
newValue | The range for the newValue is 0.0 - 127.0. |
void setModulatorAttribute | ( | int | chainId, |
int | modulatorIndex, | ||
int | attributeIndex, | ||
float | newValue | ||
) |
Sets a ModulatorAttribute.
chainId | the chain where the Modulator is. GainModulation = 1, PitchModulation = 0 |
modulatorIndex | the index of the Modulator starting with 0. |
attributeIndex | the index of the Modulator starting with 0. Intensity is '-12', Bypassed is '-13' |
newValue | the value. The range for Gain is 0.0 - 1.0, the Range for Pitch is -12.0 ... 12.0 |
void setShouldKillRetriggeredNote | ( | bool | killNote | ) |
If set to true, this will kill retriggered notes (default).
void setVoiceGainValue | ( | int | voiceIndex, |
float | gainValue | ||
) |
Applies a gain factor to a specified voice.
void setVoicePitchValue | ( | int | voiceIndex, |
double | pitchValue | ||
) |
Applies a pitch factor (0.5 ... 2.0) to a specified voice.
void startTimer | ( | double | seconds | ) |
Starts the timer of the synth.
void stopTimer | ( | ) |
Stops the timer of the synth. You can call this also in the timer callback.