List of functions

Arrays

AppendBoolean(a, value)

Append the boolean to the end of the array if there is room otherwise fail silently

Parameters
AppendDouble(a, value)    autotype

Append the double to the end of the array if there is room otherwise fail silently

Parameters
AppendInteger(a, value)    autotype

Append the integer to the end of the array if there is room otherwise fail silently

Parameters
AppendString(a, value)

Append the string to the end of the array if there is room otherwise fail silently

Parameters
ClearArray(a)    autotype

Resets the array size to 0

Parameters

a (array) –

IndexOf(a, value)

Returns the index containing the value otherwise returns -1

Parameters
Return type

Integer

LargestDouble(a)

Returns the maximum value of a double array

Parameters

a (Double array) –

Return type

Double

LargestInt(a)

Returns the maximum value in an integer array

Parameters

a (Integer array) –

Return type

Integer

RemoveLast(a)    autotype

Remove the last item in the array and so reducing the array size by 1

Parameters

a (array) –

Reverse(a)    autotype

Reverse the list of items in the array

Parameters

a (array) –

Size(a)    autotype

Returns the size of an array

Parameters

a (array) –

Return type

Integer

SmallestDouble(a)

Returns the minimum value in a double array

Parameters

a (Double array) –

Return type

Double

SmallestInt(a)

Returns the minimum value in an integer array

Parameters

a (Integer array) –

Return type

Integer

Sort(a, ascending)    autotype

Sorts an array in ascending order

Parameters
  • a (array) –

  • ascending (Boolean) –

iMax(a)    autotype

Returns the index of the largest value of an array

Parameters

a (array) –

Return type

Integer

iMin(a)    autotype

Returns the index of the smallest value of an array

Parameters

a (array) –

Return type

Integer

ExternalApplication

EA_AddArgument(ea, arg)

Add an argument to an external application manager

Parameters
EA_ClearAllArgs(ea)

Clear the list of arguments so you can start again

Parameters

ea (ExternalApplication) –

EA_SetProgramName(ea, name)

Set the name of the program to be run

Parameters
EA_Start(ea)

Open or run the external application

Parameters

ea (ExternalApplication) –

EA_Stop(ea)

Close or terminate the external application - not guaranteed to work

Parameters

ea (ExternalApplication) –

Generators

EnableGenerator(f, enable)

Enables or disables any generator (LFO, ramp, square wave, ADSR, etc.)

Parameters
GetADSRAttackLevel(f)

Get the maximum volume level of the attack phase of an ADSR

Parameters

f (ADSR) –

Return type

Double

GetADSRAttackTime(f)

Get the time in milliseconds of the attack phase of an ADSR

Parameters

f (ADSR) –

Return type

Integer

GetADSRDecayTime(f)

Get the time in milliseconds of the decay phase of an ADSR

Parameters

f (ADSR) –

Return type

Integer

GetADSRReleaseTime(f)

Get the time in milliseconds of the total release time of an ADSR

Parameters

f (ADSR) –

Return type

Integer

GetADSRSustainLevel(f)

Get the level of the sustain phase of an ADSR

Parameters

f (ADSR) –

Return type

Double

GetGeneraterAmplitude(f)

Get the current value of a generator

Parameters

f (Generator) –

Return type

Double

GetTimersRunning()

Indicates whether global timers are running or stopped

Return type

Boolean

InitADSR(f, attackTime, attackLevel, decayTime, sustainLevel, releaseTime)

Set all parameters of an ADSR in one function call

Parameters
IsGeneratorEnabled(f)

Queries the state (start or stopped) of any generator

Parameters

f (Generator) –

Return type

Boolean

SetADSRAttackLevel(f, level)

Set the maximum volume level of the attack phase of an ADSR

Parameters
SetADSRAttackTime(f, milliseconds)

Set the time in milliseconds of the attack phase of an ADSR

Parameters
SetADSRDecayTime(f, milliseconds)

Set the time in milliseconds of the decay phase of an ADSR

Parameters
SetADSRReleaseTime(f, milliseconds)

Set the time in milliseconds of the total release time of an ADSR

Parameters
SetADSRSustainLevel(f, level)

Set the level of the sustain phase of an ADSR

Parameters
SetGeneratorCoarseness(f, milliseconds)

Controls the jitter time of a callback (trading off accuracy against CPU cycles)

Parameters
SetGeneratorFrequency(f, hertz)

Set the frequency in cycles/second of any Generator

Parameters
SetGeneratorLength(f, milliseconds)

Set the length of a generator cycle

Parameters
SetGeneratorOneShot(f, oneshot)

Controls whether an Generator repeats indefinitely or only runs once when triggered

Parameters
SetTimersRunning(run)

Start or stop the global timers

Parameters

run (Boolean) –

StartAttackPhase(f)

Trigger the ADS phase of an ADSR

Parameters

f (ADSR) –

StartReleasePhase(f)

Trigger the release phase of the ADSR

Parameters

f (ADSR) –

MIDI

BetweenNotes(lowerNote, note, upperNote)

Returns true if the MIDI Note message is between the lower and higher values exclusive

Parameters
Return type

Boolean

GetAfterTouchValue(m)

Returns the current aftertouch value of an Aftertouch MIDI message

Parameters

m (AfterTouchMessage) –

Return type

Integer

GetByte(m, byteNumber)

Returns one of the byte values of a MIDI message. The byteNumber must be within the range 0..2

Parameters
Return type

Integer

GetCCNumber(m)

Returns the Controller Number of a ControlChange MIDI message

Parameters

m (ControlChangeMessage) –

Return type

Integer

GetCCValue(m)

Returns the Controller value of a ControlChange MIDI message

Parameters

m (ControlChangeMessage) –

Return type

Integer

GetChannel(m)

Returns the MIDI channel number (between 1 and 16) of any MIDI message

Parameters

m (MidiMessage) –

Return type

Integer

GetMidiMessageSize(m)

Returns the number of bytes in any MIDI Message

Parameters

m (MidiMessage) –

Return type

Integer

GetNoteNumber(m)

Returns the note number of a NoteMessage MIDI event

Parameters

m (NoteMessage) –

Return type

Integer

GetPitchBendValue(m)

Returns the pitch bend value from a PitchBend MIDI message

Parameters

m (PitchBendMessage) –

Return type

Integer

GetPolyTouchNoteNumber(m)

Returns the note number of a PolyTouch MIDI event

Parameters

m (PolyTouchMessage) –

Return type

Integer

GetProgramChangeNumber(m)

Returns the program change number of a ProgramChangeMessage MIDI event

Parameters

m (ProgramChangeMessage) –

Return type

Integer

GetReleaseVelocity(m)

Returns the release velocity of a NoteOffEvent MIDI message. You need to make sure that the message is in fact a NoteOff or the result will always be 0

Parameters

m (NoteMessage) –

Return type

Integer

GetVelocity(m)

Returns the velocity of a NoteEvent MIDI message. The value will be between 0 and 127

Parameters

m (NoteMessage) –

Return type

Integer

IsAfterTouch(m)    autotype

See if the current message is actually an Aftertouch MIDI message

Parameters

m (MidiMessage) –

Return type

Boolean

IsController(m)    autotype

See if the current message is actually a CC MIDI message

Parameters

m (MidiMessage) –

Return type

Boolean

IsNote(m)    autotype

See if the current message is a NoteOn or a NoteOff message

Parameters

m (MidiMessage) –

Return type

Boolean

IsNoteOff(m)    autotype

See if the current message is actually a noteOff message - this is not the same as a NoteOn with 0 velocity

Parameters

m (MidiMessage) –

Return type

Boolean

IsNoteOn(m)    autotype

See if the current message is actually a noteOn message

Parameters

m (MidiMessage) –

Return type

Boolean

IsPitchBend(m)    autotype

See if the current message is actually a pitch bend message

Parameters

m (MidiMessage) –

Return type

Boolean

IsPolyTouch(m)    autotype

See if the current message is actually a Polytouch MIDI message

Parameters

m (MidiMessage) –

Return type

Boolean

IsProgramChange(m)    autotype

See if the current message is actually a program change message

Parameters

m (MidiMessage) –

Return type

Boolean

MakeAfterTouchMessage(value)

Returns an Aftertouch MIDI message with the specified value. The MIDI channel is 1

Parameters

value (Integer) –

Return type

AfterTouchMessage

MakeAfterTouchMessageEx(value, channel)

Returns an Aftertouch MIDI message with the specified value and MIDI channel

Parameters
Return type

AfterTouchMessage

MakeControlChangeMessage(number, value)

Returns a CC MIDI message with the specified CC number and value. The MIDI channel is 1

Parameters
Return type

ControlChangeMessage

MakeControlChangeMessageEx(number, value, channel)

Returns a CC MIDI message with the specified CC number and value and MIDI channel

Parameters
Return type

ControlChangeMessage

MakeMidiMessage(byte0, byte1, byte2)

Create an three byte MIDI message - you are on your own so make sure you get the values correct - deprecated - use MakeMidiMessage3

Parameters
Return type

MidiMessage

MakeMidiMessage1(byte0)

Create one byte MIDI message - you are on your own so make sure you get the value correct

Parameters

byte0 (Integer) –

Return type

MidiMessage

MakeMidiMessage2(byte0, byte1)

Create a 2 byte MIDI message - you are on your own so make sure you get the values correct

Parameters
Return type

MidiMessage

MakeMidiMessage3(byte0, byte1, byte2)

Create an three byte MIDI message - you are on your own so make sure you get the values correct

Parameters
Return type

MidiMessage

MakeNoteMessage(number, velocity)

Returns a Note MIDI message with the specified note number and velocity. The MIDI channel is 1

Parameters
Return type

NoteMessage

MakeNoteMessageEx(number, velocity, channel)

Returns a Note MIDI message with the specified note number and velocity and MIDI channel

Parameters
Return type

NoteMessage

MakePitchBendMessage(value)

Returns a new Pitch bend MIDI message with the specified value. The MIDI channel is 1

Parameters

value (Integer) –

Return type

PitchBendMessage

MakePitchBendMessageEx(value, channel)

Returns a new Pitch bend MIDI message with the specified value and MIDI channel

Parameters
Return type

PitchBendMessage

MakePolyTouchMessage(number, pressure)

Returns a Polytouch MIDI message with the specified note number and pressure amount. The MIDI channel is 1

Parameters
Return type

PolyTouchMessage

MakePolyTouchMessageEx(number, pressure, channel)

Returns a Polytouch MIDI message with the specified note number and pressure amount and MIDI channel

Parameters
Return type

PolyTouchMessage

MakeProgramChangeMessage(value)

Returns a new ProgramChange MIDI message with the specified value ranging from 0 to 127. The MIDI channel is 1

Parameters

value (Integer) –

Return type

ProgramChangeMessage

MakeProgramChangeMessageEx(value, channel)

Returns a new ProgramChange MIDI message with the specified value ranging from 0 to 127 and with the specified MIDI channel

Parameters
Return type

ProgramChangeMessage

ReinterpretAsAfterTouch(m, UseThirdByte)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters
Return type

NoteMessage

ReinterpretAsControllerMessage(m)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters

m (MidiMessage) –

Return type

NoteMessage

ReinterpretAsNoteOffMessage(m)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters

m (MidiMessage) –

Return type

NoteMessage

ReinterpretAsNoteOnMessage(m)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters

m (MidiMessage) –

Return type

NoteMessage

ReinterpretAsPitchBend(m)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters

m (MidiMessage) –

Return type

NoteMessage

ReinterpretAsPolyTouchMessage(m)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters

m (MidiMessage) –

Return type

NoteMessage

ReinterpretAsProgramChange(m, UseThirdByte)    autotype

Reinterpret an arbitrary MIDI message - you need to know what you are doing

Parameters
Return type

NoteMessage

Transpose(m, steps)

Returns a note that has been transposed chromatically by the number of steps

Parameters
Return type

NoteMessage

WithChannel(m, channel)    autotype

Changes the channel number of any MIDI event.

Parameters
Return type

MidiMessage

WithNoteNumber(m, number)

Changes the note number of a NoteMessage MIDI event

Parameters
Return type

NoteMessage

WithNoteNumberAndVelocity(m, n, v)

Changes the note number and the velocity value of a NoteMessage MIDI event. Setting to 0 will make the message be a NoteOff

Parameters
Return type

NoteMessage

WithVelocity(m, v)

Changes the velocity value of a NoteMessage MIDI event. Setting to 0 will make the message be a NoteOff

Parameters
Return type

NoteMessage

Math

ACos(x)    autotype

Returns the inverse cos of x

Parameters

x (Double) –

Return type

Double

ASin(x)    autotype

Returns the inverse sin of x

Parameters

x (Double) –

Return type

Double

ATan(x)    autotype

Returns the inverse tan of x

Parameters

x (Double) –

Return type

Double

Abs(x)    autotype

Returns the absolute value of x

Parameters

x (Double) –

Return type

Double

Ceiling(x)    autotype

Rounds x upward returning the smallest integral value that is not less than x

Parameters

x (Double) –

Return type

Integer

Cos(x)    autotype

Returns the cos of x

Parameters

x (Double) –

Return type

Double

Exp(x)    autotype

Returns e to the power of x

Parameters

x (Double) –

Return type

Double

Floor(x)    autotype

Rounds x downward returning the largest integral value that is not greater than x

Parameters

x (Double) –

Return type

Integer

IntToFloat(x)

Converts an integer to its floating point equivalent

Parameters

x (Integer) –

Ln(x)    autotype

Returns the log (base e) of x

Parameters

x (Double) –

Return type

Double

Log(x)    autotype

Returns the log (base 10) of x

Parameters

x (Double) –

Return type

Double

MidiToParam(m)

Maps an integer value between 0 and 127 into a floating point value between 0.0 and 1.0 and is a specialized (slightly) faster version of the generic Scale function

Parameters

m (Integer) –

MidiToParamEx(x, xMin, xMax, yMin, yMax)

Maps a value between xMin and xMax both with type integer into a value between yMin and yMax both with type double. Slightly faster than Scale if you can use the expected types so that no conversion is required

Parameters
ParamToMidi(m)

Maps an double value between 0.0 and 1.0 into an integer value between 0 and 127 and is a specialized (slightly) faster version of the generic Scale function

Parameters

m (Double) –

ParamToMidiEx(x, xMin, xMax, yMin, yMax)

Maps a double value between xMin and xMax - both between 0.0 and 1.0 - into a value between yMin and yMax both with type integer. Slightly faster than Scale if you can use the expected types so that no conversion is required

Parameters
Power(base, exponent)    autotype

Returns base raised to the power of exponent

Parameters
Return type

Double

Random()

Returns a random value between 0.0 and 1.0

Return type

Double

RandomRange(min, max)

Returns a random integer value between min and max

Parameters
Return type

Integer

Round(x)

Rounds a floating point number to the nearest integer

Parameters

x (Double) –

Scale(x, xMin, xMax, yMin, yMax)

Maps a value between xMin and xMax into a value between yMin and yMax. Integers will be converted to doubles. See MidiToParam and ParamToMidi for slightly faster implementations

Parameters
ScaleInt(x, xMin, xMax, yMin, yMax)

Maps a value between xMin and xMax into a value between yMin and yMax. Doubles will be truncated to integers. See MidiToParam and ParamToMidi for slightly faster implementations

Parameters
ScaleRange(x, yMin, yMax)

Maps a double value between 0.0 and 1.0 into a rounded integer value between yMin and yMax

Parameters
ScaleRangeEx(x, xMin, xMax, yMin, yMax)

Maps a double value between xMin and xMax into a rounded integer value between yMin and yMax

Parameters
Sign(x)    autotype

Returns 1 if x > 0 -1 if x < 0 0 if x = 0

Parameters

x (Double) –

Return type

Integer

Sin(x)    autotype

Returns the sin of x

Parameters

x (Double) –

Return type

Double

Sqrt(x)    autotype

Returns the square root of x

Parameters

x (Double) –

Return type

Double

Tan(x)    autotype

Returns the tan of x

Parameters

x (Double) –

Return type

Double

NoteManagement

AddChordInterval(cr, interval, chordName)

Add a user defined chord interval to the chord dictionary

Parameters
AutoSustainer_Play(sustainer, m)

Play and possibly sustain an incoming note message through the AutoSustainer

Parameters
AutoSustainer_RespectParameters(sustainer, respect)

Indicate whether notes should respect MidiInBlock parameters

Parameters
AutoSustainer_SetTarget(sustainer, m)

Specify the MidiInBlock to use for sending out notes using this AutoSustainer object

Parameters
AutoSustainer_Stop(sustainer)

Stop all pending notes

Parameters

sustainer (AutoSustainer) –

ClearNoteTracker(nt)

Reinitializes the note tracker although it is generally not necessary

Parameters

nt (NoteTracker) –

FindChordName(cr, nt)

Given a note tracker with pending notes - get the string name of the chord

Parameters
Return type

String

GotNote(nt, note)

Track status of an incoming note

Parameters
GotNoteOff(nt, note)

Remember that a note was released

Parameters
GotNoteOn(nt, note)

Remember that a note was played

Parameters
NoteOnCount(nt)

Count number of notes still being played

Parameters

nt (NoteTracker) –

Return type

Integer

RemoveChordInterval(cr, interval)

Remove a chord interval from the chord dictionary

Parameters
StopAllPendingNotes(m, nt)

Send note offs for all pending notes in the tracker

Parameters

OSC

OSC_AppendDoubleArg(m, value)

Append a double argument to the OSC message

Parameters
OSC_AppendIntArg(m, value)

Append an integer argument to the OSC message

Parameters
OSC_AppendStringArg(m, value)

Append a string argument to the OSC message

Parameters
OSC_ArgCount(m)

Returns the number of arguments in an OSC message

Parameters

m (OSCMessage) –

Return type

Integer

OSC_ClearArgs(m)

Clear all arguments but leave the address pattern

Parameters

m (OSCMessage) –

OSC_GetArgAsDouble(m, index)

Returns the argument at the index - 0 based - as a double

Parameters
Return type

Double

OSC_GetArgAsInteger(m, index)

Returns the argument at the index - 0 based - as an integer

Parameters
Return type

Integer

OSC_GetArgAsString(m, index)

Returns the argument at the index - 0 based - as a String

Parameters
Return type

String

OSC_Send(m)

Send out the message to the default IP address and port

Parameters

m (OSCMessage) –

OSC_SendSpecific(m, ipAddress, port)

Send out the message to the specified IP address and port

Parameters
OSC_SetAddress(m, address)

Set the address of an OSC message

Parameters

Plugins

ClosePlugin(p)    autotype

Close the plugin editor

Parameters

p (Block) –

GetActivePreset(p)    autotype

Get the index of the current preset

Parameters

p (Block) –

Return type

Integer

GetMaxNoteFromMidiInBlock(aBlock)

Gets the max note number defined for the keyboard split

Parameters

aBlock (MidiInBlock) –

Return type

Integer

GetMinNoteFromMidiInBlock(aBlock)

Gets the min note number defined for the keyboard split

Parameters

aBlock (MidiInBlock) –

Return type

Integer

GetParameter(p, index)

Gets the current parameter value associated with a parameter index of any plugin. The value will be between 0.0 and 1.0

Parameters
Return type

Double

GetParameterCount(p)

Gets the number of parameters in this plugin

Parameters

p (Block) –

Return type

Integer

GetParameterName(p, index)

Gets the name for the parameter index of any plugin if available.

Parameters
Return type

String

GetParameterText(p, index)

Gets the value as text of the given parameter index of any plugin if available.

Parameters
Return type

String

GetPresetCount(p)    autotype

Get the number of available presets in this plugin

Parameters

p (Block) –

Return type

Integer

GetPresetName(p, index)    autotype

Get the name of the preset at the given index

Parameters
Return type

String

GetTransposeFromMidiInBlock(aBlock)

Gets the max note number defined for the keyboard split

Parameters

aBlock (MidiInBlock) –

Return type

Integer

IsPluginBypassed(p)    autotype

Returns whether a plugin is bypassed

Parameters

p (Block) –

Return type

Boolean

OpenPlugin(p)    autotype

Open the plugin editor

Parameters

p (Block) –

ReplacePlugin(p, name)    autotype

Replace the plugin in the specified block - internal use only

Parameters
SelectPreset(p, index)    autotype

Change the preset of any block

Parameters
SetParameter(p, index, value)

Send a parameter value to any plugin block

Parameters
SetPluginBypassed(p, bypass)    autotype

Bypass or un-bypass a plugin

Parameters

Sequencing

MidiSequence_CollectEventsNow(sequence)

Collect events at the current position - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

MidiSequence_EndOfSong(sequence)

True if there are no more events in track - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Return type

Boolean

MidiSequence_FollowGlobalTranspose(sequence, trackNumber, follow)

When true MIDI note events will be transposed by the global transpose amount

Parameters
MidiSequence_GetCurrentBar(sequence)

Returns the current bar - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Return type

Integer

MidiSequence_GetCurrentBeat(sequence)

Returns the current beat of the current bar - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Return type

Integer

MidiSequence_GetCurrentEvents(sequence, trackNumber)

Access the current events at the current grid position for the specified track - Experimental - not yet supported - do not even ask!

Parameters
Return type

array

MidiSequence_GetCurrentTick(sequence)

Returns the current tick offset - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Return type

Integer

MidiSequence_GetResolution(sequence)

Get the base resolution of the sequence - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

MidiSequence_GetTrackCount(sequence)

Returns the number of tracks in a loaded MIDI file - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Return type

Integer

MidiSequence_LoadMidiFile(sequence, fromFile)

Loads a midi file and returns the number of tracks - Experimental - not yet supported - do not even ask!

Parameters
Return type

Integer

MidiSequence_MapOutputChannel(sequence, trackNumber, channel)

Map the output channel for a track to the specified number between 1-16. Set to 0 to use individual event channel - Experimental - not yet supported - do not even ask!

Parameters
MidiSequence_Quantize(sequence, q)

Grid quantize - 1 2 4 8 16 - Experimental - not yet supported - do not even ask!

Parameters
MidiSequence_ResetToStart(sequence)

Reset to the beginning of the track - Experimental - not yet supported - do not even ask!

Parameters

sequence (MidiSequence) –

Songs

GetCurrentSetlistName()

Get the name of the current setlist

Return type

String

GetCurrentSongName()

Get the name of the current song

Return type

String

GetCurrentSongPart()

Get the index of the current song part

Return type

Integer

GetCurrentSongPartName()

Get the name of the current song part

Return type

String

GetSongCount()

Returns the number of songs in the current setlist

Return type

Integer

GetSongName(index)

Get the name of the song at the given index

Parameters

index (Integer) –

Return type

String

GetSongPartCount()

Returns the number of parts in the current song

Return type

Integer

GetSongPartName(index)

Get the name of the song part at the given index

Parameters

index (Integer) –

Return type

String

InSetlistMode()

Returns whether we are currently in setlist mode

Return type

Boolean

NextSong()

Move to the next song

PrevSong()

Move to the previous song

SetSongPart(index)

Switch to another part in the current song

Parameters

index (Integer) –

SongMoveDown()

Move to the next part or next song if allowed

SongMoveUp()

Move to the previous part or previous song if allowed

SongNextPart()

Move to the next song part of the current song

SongPrevPart()

Move to the previous song part of the current song

Strings

BoolToString(i)

Returns a string representation of a boolean value

Parameters

i (Integer) –

CopySubstring(source, startIndex, length)

Return the section of the source string based on the start index and desired length

Parameters
DoubleToString(d, places)

Converts a double to a string with the specified number of places

Parameters
IndexOfSubstring(source, substring, caseSensitive)

Return the zero-based index of the substring or -1 if substring not found

Parameters
IntToString(i)

Returns a string representation of an integer value

Parameters

i (Integer) –

Length(s)

Returns the length of a string

Parameters

s (String) –

MapValueToDiscreteString(x, values)

Select a string based on the proportional fractional value between 0.0 and 1.0

Parameters
  • x (Double) –

  • values (string array) –

Return type

String

ReplaceString(source, replaceThis, withThat, caseSensitive)

Replace a substring with another string

Parameters
ReplaceStringSection(source, startIndex, length, newSubstring)

Extract a substring defined by startIndex and length and insert a new substring into that position

Parameters
StringAfterFirstOccurence(source, substringToStartFrom, includeSubstring, ignoreCase)

Return the section of the source string after the first occurrence of substringToStartFrom - optionally including the substring

Parameters
StringAfterLastOccurence(source, substringToFind, includeSubstring, ignoreCase)

Return the section of the source string after the last occurrence of substringToFind - optionally including the substring

Parameters
StringUpToFirstOccurence(source, substringToEndWith, includeSubstring, ignoreCase)

Return the section of the source string up to the first occurrence of substringToEndWith - optionally including the substring

Parameters
StringUpToLastOccurence(source, substringToFind, includeSubstring, ignoreCase)

Return the section of the source string up to the last occurrence of substringToFind - optionally including the substring

Parameters
TrimString(source)

Remove leading and trailing spaces from a string

Parameters

source (String) –

Sysex

SM_ChangeValue(sm, index, newValue)

Change a byte of a sysex message at some index starting at 0. Note that the F0 and F7 bytes cannot themselves be changed

Parameters
SM_CreateSysex(sm, m)

Store a sysex message efficiently for manipulation and sending

Parameters
SM_CreateSysexFromString(sm, s)

Interpret a string as a sysex and store it for manipulation and sending

Parameters
SM_SendMidiIn(sm, midiIn)

Send a stored sysex message from a MidiIn block

Parameters
SM_SendMidiOut(sm, midiOut)

Send a stored sysex message from a MidiOut block to an external MIDI device

Parameters

System

AllNotesOff(p)

Send All Notes Off and reset controllers

Parameters

p (MidiInBlock) –

ClearLogWindow()

Clear the script log window - duh!

ClockTime()

Gets the current time in milliseconds

Return type

Double

CloseLogWindow()

Close the script log window - duh!

CloseScriptWindow()

Close the script editor window - if open - for the current rackspace

EnableMetronome(enable)

Turn the metronome on or off

Parameters

enable (Boolean) –

EnablePlayhead(enable)

Start or stop the global playhead

Parameters

enable (Boolean) –

FormatTime(timeInMS, format)

Returns a formatted timestamp from a given time in milliseconds

Parameters
Return type

String

GetBPM()

Returns the current global BPM value

Return type

Double

GetCurrentVariation()

Returns the index of the current variation

Return type

Integer

GetGlobalTranspose()

Get the current transpose value

Return type

Integer

GetRackspaceName()

Returns the name of the active rackspace

Return type

String

GetVariationCount()

Returns the number of variations in the current rackspace

Return type

Integer

GetVariationName(index)

Returns the name of a variation

Parameters

index (Integer) –

Return type

String

IsPlayheadEnabled()

Indicates whether the playhead is running

Return type

Boolean

ModifierKeys()

Returns the state of the various modifier keys - up or down

Return type

Integer

Notify(s)

Displays a message on main window that will fade out

Parameters

s (string) –

OpenLogWindow()

Open the script log window - duh!

OpenScriptWindow()

Open the script editor window for the current rackspace

Panic()

Stop all notes in the current rackspace

PlayNote(p, noteNumber, velocity, channel, startTimeMS, duration)

Send a noteOn event at startTimeMS and a noteOff event at durationMS later. If duration is less than 1 then we make it 1

Parameters
Print(s)

Displays the string in the GPScript Logger window

Parameters

s (String) –

RecordInputs(enable)

Start or stop recording audio input to file

Parameters

enable (Boolean) –

ScheduleMidiEvent(p, m, delayInMS)

Schedule a MIDI event to be reprocessed at some specified time in the future

Parameters
SendLater(p, m, delayInMS)

Schedule a MIDI event to be sent out at some specified time in the future

Parameters
SendNoteMessageWithTranspositionsLater(p, m, transpositions, delayInMS)

Send multiple MIDI NoteOn or NoteOff events out some milliseconds later using note number added to each offset in the array

Parameters
SendNoteMessageWithTranspositionsNow(p, m, transpositions)

Send multiple note on or note off events out immediately using note number added to each offset in the array

Parameters
SendNoteMessagesLater(p, noteNumbers, velocity, channel, delayInMS)

Create a chord of note on or off events using the array of note numbers and send it out some milliseconds later

Parameters
SendNoteMessagesNow(p, noteNumbers, velocity, channel)

Create a chord of note on or off events using the array of note numbers and send it out immediately

Parameters
SendNow(p, m)

Send a MIDI event out immediately

Parameters
SendNowExternal(p, m)

Send a MIDI event out immediately through a MIDI Out block

Parameters
SendNowRespectingParameters(p, m)

Send a MIDI event out after applying MidiInBlock parameters

Parameters
SendSysexExternal(p, m)

Send a MIDI sysex message out immediately through a MIDI Out block

Parameters
SendSysexInternal(p, m)

Send a MIDI sysex message out immediately from a MIDI In block

Parameters
SetBPM(bpm)

Set the global BPM value

Parameters

bpm (Double) –

SetGlobalTranspose(semitones)

Transpose all incoming MIDI messages by semitones amount

Parameters

semitones (Integer) –

SetMetronomeVolume(volume)

Set the metronome volume

Parameters

volume (Double) –

SetVariation(index)

Switch to another variation in the active rackspace

Parameters

index (Integer) –

SetWindowTitle(title)

Changes the default rackspace title to the title

Parameters

title (string) –

Shell(command)

Run an OS Shell command (Mac only) returning an integer indicating success or failure

Parameters

command (String) –

Return type

Integer

ShellEx(command)

Run an OS Shell command (Mac only) that returns the output of the command

Parameters

command (String) –

Return type

String

SwitchToNextRack()

Switch to the next rackspace

SwitchToNextVariation()

Switch to the next variation

SwitchToPreset(newPreset)

Switch to another preset in the rackspace

Parameters

newPreset (Integer) –

SwitchToPrevRack()

Switch to the previous rackspace

SwitchToPrevVariation()

Switch to the previous variation

SwitchToProgramNumber(programNumber, bankNumber)

Switch to zero-based program number and bank Number if latter is greater than -1

Parameters
SwitchToRack(newRackspaceNumber, newPreset)

Switch to another rackspace by number and potentially to a specific newPreset in that rackspace

Parameters
Tap()

Simulates tap tempo command

TimeNow()

Gets the current time in milliseconds - deprecated

Return type

Integer

TimeSinceStartup()

Gets the time since computer was started in milliseconds

Return type

Double

Widgets

BindExternalWidget(ew, widgetName, rackspaceName)

Access a widget in another rackspace - boolean return value indicates whether widget was found - experimental

Parameters
Return type

Boolean

GetExternalWidgetValue(ew)

Get the current value of an external widget - experimental

Parameters

ew (ExternalWidget) –

Return type

Double

GetWidgetScriptName(p)

Gets the scripting name of this widget. Useful when widget is passed as a parameter somewhere

Parameters

p (Widget) –

Return type

String

GetWidgetLabel(w)

Get the label of a widget

Parameters

w (Widget) –

Return type

String

GetWidgetValue(p)

Gets the current value (position) of the widget. The value will be between 0.0 and 1.0

Parameters

p (Widget) –

Return type

Double

SetExternalWidgetValue(ew, newValue)

Set the current value of an external widget - experimental

Parameters
SetWidgetLabel(w, text)    autotype

Set the label of a widget

Parameters
SetWidgetValue(p, value)

Set the current value of any widget

Parameters