.. _list-of-functions: List of functions ----------------- Arrays ^^^^^^ .. function:: AppendBoolean(a, value) Append the boolean to the end of the array if there is room otherwise fail silently :param a: :type a: Boolean array :param Boolean value: .. function:: AppendDouble(a, value) :autotype: Append the double to the end of the array if there is room otherwise fail silently :param a: :type a: Double array :param Double value: .. function:: AppendInteger(a, value) :autotype: Append the integer to the end of the array if there is room otherwise fail silently :param a: :type a: Integer array :param Integer value: .. function:: AppendString(a, value) Append the string to the end of the array if there is room otherwise fail silently :param a: :type a: String array :param String value: .. function:: ClearArray(a) :autotype: Resets the array size to 0 :param array a: .. function:: IndexOf(a, value) Returns the index containing the value otherwise returns -1 :param a: :type a: Integer array :param Integer value: :rtype: Integer .. function:: LargestDouble(a) Returns the maximum value of a double array :param a: :type a: Double array :rtype: Double .. function:: LargestInt(a) Returns the maximum value in an integer array :param a: :type a: Integer array :rtype: Integer .. function:: RemoveLast(a) :autotype: Remove the last item in the array and so reducing the array size by 1 :param array a: .. function:: Reverse(a) :autotype: Reverse the list of items in the array :param array a: .. function:: Size(a) :autotype: Returns the size of an array :param array a: :rtype: Integer .. function:: SmallestDouble(a) Returns the minimum value in a double array :param a: :type a: Double array :rtype: Double .. function:: SmallestInt(a) Returns the minimum value in an integer array :param a: :type a: Integer array :rtype: Integer .. function:: Sort(a, ascending) :autotype: Sorts an array in ascending order :param array a: :param Boolean ascending: .. function:: iMax(a) :autotype: Returns the index of the largest value of an array :param array a: :rtype: Integer .. function:: iMin(a) :autotype: Returns the index of the smallest value of an array :param array a: :rtype: Integer ExternalApplication ^^^^^^^^^^^^^^^^^^^ .. function:: EA_AddArgument(ea, arg) Add an argument to an external application manager :param ExternalApplication ea: :param string arg: .. function:: EA_ClearAllArgs(ea) Clear the list of arguments so you can start again :param ExternalApplication ea: .. function:: EA_SetProgramName(ea, name) Set the name of the program to be run :param ExternalApplication ea: :param string name: .. function:: EA_Start(ea) Open or run the external application :param ExternalApplication ea: .. function:: EA_Stop(ea) Close or terminate the external application - not guaranteed to work :param ExternalApplication ea: Generators ^^^^^^^^^^ .. function:: EnableGenerator(f, enable) Enables or disables any generator (LFO, ramp, square wave, ADSR, etc.) :param Generator f: :param Boolean enable: .. function:: GetADSRAttackLevel(f) Get the maximum volume level of the attack phase of an ADSR :param ADSR f: :rtype: Double .. function:: GetADSRAttackTime(f) Get the time in milliseconds of the attack phase of an ADSR :param ADSR f: :rtype: Integer .. function:: GetADSRDecayTime(f) Get the time in milliseconds of the decay phase of an ADSR :param ADSR f: :rtype: Integer .. function:: GetADSRReleaseTime(f) Get the time in milliseconds of the total release time of an ADSR :param ADSR f: :rtype: Integer .. function:: GetADSRSustainLevel(f) Get the level of the sustain phase of an ADSR :param ADSR f: :rtype: Double .. function:: GetGeneraterAmplitude(f) Get the current value of a generator :param Generator f: :rtype: Double .. function:: GetTimersRunning() Indicates whether global timers are running or stopped :rtype: Boolean .. function:: InitADSR(f, attackTime, attackLevel, decayTime, sustainLevel, releaseTime) Set all parameters of an ADSR in one function call :param ADSR f: :param Integer attackTime: :param Double attackLevel: :param Integer decayTime: :param Double sustainLevel: :param Integer releaseTime: .. function:: IsGeneratorEnabled(f) Queries the state (start or stopped) of any generator :param Generator f: :rtype: Boolean .. function:: SetADSRAttackLevel(f, level) Set the maximum volume level of the attack phase of an ADSR :param ADSR f: :param Double level: .. function:: SetADSRAttackTime(f, milliseconds) Set the time in milliseconds of the attack phase of an ADSR :param ADSR f: :param Integer milliseconds: .. function:: SetADSRDecayTime(f, milliseconds) Set the time in milliseconds of the decay phase of an ADSR :param ADSR f: :param Integer milliseconds: .. function:: SetADSRReleaseTime(f, milliseconds) Set the time in milliseconds of the total release time of an ADSR :param ADSR f: :param Integer milliseconds: .. function:: SetADSRSustainLevel(f, level) Set the level of the sustain phase of an ADSR :param ADSR f: :param Double level: .. function:: SetGeneratorCoarseness(f, milliseconds) Controls the jitter time of a callback (trading off accuracy against CPU cycles) :param Generator f: :param Integer milliseconds: .. function:: SetGeneratorFrequency(f, hertz) Set the frequency in cycles/second of any Generator :param Generator f: :param Double hertz: .. function:: SetGeneratorLength(f, milliseconds) Set the length of a generator cycle :param Generator f: :param Integer milliseconds: .. function:: SetGeneratorOneShot(f, oneshot) Controls whether an Generator repeats indefinitely or only runs once when triggered :param Generator f: :param Boolean oneshot: .. function:: SetTimersRunning(run) Start or stop the global timers :param Boolean run: .. function:: StartAttackPhase(f) Trigger the ADS phase of an ADSR :param ADSR f: .. function:: StartReleasePhase(f) Trigger the release phase of the ADSR :param ADSR f: MIDI ^^^^ .. function:: BetweenNotes(lowerNote, note, upperNote) Returns true if the MIDI Note message is between the lower and higher values exclusive :param Integer lowerNote: :param NoteMessage note: :param Integer upperNote: :rtype: Boolean .. function:: GetAfterTouchValue(m) Returns the current aftertouch value of an Aftertouch MIDI message :param AfterTouchMessage m: :rtype: Integer .. function:: GetByte(m, byteNumber) Returns one of the byte values of a MIDI message. The byteNumber must be within the range 0..2 :param MidiMessage m: :param Integer byteNumber: :rtype: Integer .. function:: GetCCNumber(m) Returns the Controller Number of a ControlChange MIDI message :param ControlChangeMessage m: :rtype: Integer .. function:: GetCCValue(m) Returns the Controller value of a ControlChange MIDI message :param ControlChangeMessage m: :rtype: Integer .. function:: GetChannel(m) Returns the MIDI channel number (between 1 and 16) of any MIDI message :param MidiMessage m: :rtype: Integer .. function:: GetMidiMessageSize(m) Returns the number of bytes in any MIDI Message :param MidiMessage m: :rtype: Integer .. function:: GetNoteNumber(m) Returns the note number of a NoteMessage MIDI event :param NoteMessage m: :rtype: Integer .. function:: GetPitchBendValue(m) Returns the pitch bend value from a PitchBend MIDI message :param PitchBendMessage m: :rtype: Integer .. function:: GetPolyTouchNoteNumber(m) Returns the note number of a PolyTouch MIDI event :param PolyTouchMessage m: :rtype: Integer .. function:: GetProgramChangeNumber(m) Returns the program change number of a ProgramChangeMessage MIDI event :param ProgramChangeMessage m: :rtype: Integer .. function:: 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 :param NoteMessage m: :rtype: Integer .. function:: GetVelocity(m) Returns the velocity of a NoteEvent MIDI message. The value will be between 0 and 127 :param NoteMessage m: :rtype: Integer .. function:: IsAfterTouch(m) :autotype: See if the current message is actually an Aftertouch MIDI message :param MidiMessage m: :rtype: Boolean .. function:: IsController(m) :autotype: See if the current message is actually a CC MIDI message :param MidiMessage m: :rtype: Boolean .. function:: IsNote(m) :autotype: See if the current message is a NoteOn or a NoteOff message :param MidiMessage m: :rtype: Boolean .. function:: IsNoteOff(m) :autotype: See if the current message is actually a noteOff message - this is not the same as a NoteOn with 0 velocity :param MidiMessage m: :rtype: Boolean .. function:: IsNoteOn(m) :autotype: See if the current message is actually a noteOn message :param MidiMessage m: :rtype: Boolean .. function:: IsPitchBend(m) :autotype: See if the current message is actually a pitch bend message :param MidiMessage m: :rtype: Boolean .. function:: IsPolyTouch(m) :autotype: See if the current message is actually a Polytouch MIDI message :param MidiMessage m: :rtype: Boolean .. function:: IsProgramChange(m) :autotype: See if the current message is actually a program change message :param MidiMessage m: :rtype: Boolean .. function:: MakeAfterTouchMessage(value) Returns an Aftertouch MIDI message with the specified value. The MIDI channel is 1 :param Integer value: :rtype: AfterTouchMessage .. function:: MakeAfterTouchMessageEx(value, channel) Returns an Aftertouch MIDI message with the specified value and MIDI channel :param Integer value: :param Integer channel: :rtype: AfterTouchMessage .. function:: MakeControlChangeMessage(number, value) Returns a CC MIDI message with the specified CC number and value. The MIDI channel is 1 :param Integer number: :param Integer value: :rtype: ControlChangeMessage .. function:: MakeControlChangeMessageEx(number, value, channel) Returns a CC MIDI message with the specified CC number and value and MIDI channel :param Integer number: :param Integer value: :param Integer channel: :rtype: ControlChangeMessage .. function:: 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 :param Integer byte0: :param Integer byte1: :param Integer byte2: :rtype: MidiMessage .. function:: MakeMidiMessage1(byte0) Create one byte MIDI message - you are on your own so make sure you get the value correct :param Integer byte0: :rtype: MidiMessage .. function:: MakeMidiMessage2(byte0, byte1) Create a 2 byte MIDI message - you are on your own so make sure you get the values correct :param Integer byte0: :param Integer byte1: :rtype: MidiMessage .. function:: MakeMidiMessage3(byte0, byte1, byte2) Create an three byte MIDI message - you are on your own so make sure you get the values correct :param Integer byte0: :param Integer byte1: :param Integer byte2: :rtype: MidiMessage .. function:: MakeNoteMessage(number, velocity) Returns a Note MIDI message with the specified note number and velocity. The MIDI channel is 1 :param Integer number: :param Integer velocity: :rtype: NoteMessage .. function:: MakeNoteMessageEx(number, velocity, channel) Returns a Note MIDI message with the specified note number and velocity and MIDI channel :param Integer number: :param Integer velocity: :param Integer channel: :rtype: NoteMessage .. function:: MakePitchBendMessage(value) Returns a new Pitch bend MIDI message with the specified value. The MIDI channel is 1 :param Integer value: :rtype: PitchBendMessage .. function:: MakePitchBendMessageEx(value, channel) Returns a new Pitch bend MIDI message with the specified value and MIDI channel :param Integer value: :param Integer channel: :rtype: PitchBendMessage .. function:: MakePolyTouchMessage(number, pressure) Returns a Polytouch MIDI message with the specified note number and pressure amount. The MIDI channel is 1 :param Integer number: :param Integer pressure: :rtype: PolyTouchMessage .. function:: MakePolyTouchMessageEx(number, pressure, channel) Returns a Polytouch MIDI message with the specified note number and pressure amount and MIDI channel :param Integer number: :param Integer pressure: :param Integer channel: :rtype: PolyTouchMessage .. function:: MakeProgramChangeMessage(value) Returns a new ProgramChange MIDI message with the specified value ranging from 0 to 127. The MIDI channel is 1 :param Integer value: :rtype: ProgramChangeMessage .. function:: MakeProgramChangeMessageEx(value, channel) Returns a new ProgramChange MIDI message with the specified value ranging from 0 to 127 and with the specified MIDI channel :param Integer value: :param Integer channel: :rtype: ProgramChangeMessage .. function:: ReinterpretAsAfterTouch(m, UseThirdByte) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :param Boolean UseThirdByte: :rtype: NoteMessage .. function:: ReinterpretAsControllerMessage(m) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :rtype: NoteMessage .. function:: ReinterpretAsNoteOffMessage(m) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :rtype: NoteMessage .. function:: ReinterpretAsNoteOnMessage(m) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :rtype: NoteMessage .. function:: ReinterpretAsPitchBend(m) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :rtype: NoteMessage .. function:: ReinterpretAsPolyTouchMessage(m) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :rtype: NoteMessage .. function:: ReinterpretAsProgramChange(m, UseThirdByte) :autotype: Reinterpret an arbitrary MIDI message - you need to know what you are doing :param MidiMessage m: :param Boolean UseThirdByte: :rtype: NoteMessage .. function:: Transpose(m, steps) Returns a note that has been transposed chromatically by the number of steps :param NoteMessage m: :param Integer steps: :rtype: NoteMessage .. function:: WithChannel(m, channel) :autotype: Changes the channel number of any MIDI event. :param MidiMessage m: :param Integer channel: :rtype: MidiMessage .. function:: WithNoteNumber(m, number) Changes the note number of a NoteMessage MIDI event :param NoteMessage m: :param Integer number: :rtype: NoteMessage .. function:: 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 :param NoteMessage m: :param Integer n: :param Integer v: :rtype: NoteMessage .. function:: WithVelocity(m, v) Changes the velocity value of a NoteMessage MIDI event. Setting to 0 will make the message be a NoteOff :param NoteMessage m: :param Integer v: :rtype: NoteMessage Math ^^^^ .. function:: ACos(x) :autotype: Returns the inverse cos of x :param Double x: :rtype: Double .. function:: ASin(x) :autotype: Returns the inverse sin of x :param Double x: :rtype: Double .. function:: ATan(x) :autotype: Returns the inverse tan of x :param Double x: :rtype: Double .. function:: Abs(x) :autotype: Returns the absolute value of x :param Double x: :rtype: Double .. function:: Ceiling(x) :autotype: Rounds x upward returning the smallest integral value that is not less than x :param Double x: :rtype: Integer .. function:: Cos(x) :autotype: Returns the cos of x :param Double x: :rtype: Double .. function:: Exp(x) :autotype: Returns e to the power of x :param Double x: :rtype: Double .. function:: Floor(x) :autotype: Rounds x downward returning the largest integral value that is not greater than x :param Double x: :rtype: Integer .. function:: IntToFloat(x) Converts an integer to its floating point equivalent :param Integer x: .. function:: Ln(x) :autotype: Returns the log (base e) of x :param Double x: :rtype: Double .. function:: Log(x) :autotype: Returns the log (base 10) of x :param Double x: :rtype: Double .. function:: 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 :param Integer m: .. function:: 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 :param Integer x: :param Integer xMin: :param Integer xMax: :param Double yMin: :param Double yMax: .. function:: 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 :param Double m: .. function:: 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 :param Double x: :param Double xMin: :param Double xMax: :param Integer yMin: :param Integer yMax: .. function:: Power(base, exponent) :autotype: Returns base raised to the power of exponent :param Double base: :param Double exponent: :rtype: Double .. function:: Random() Returns a random value between 0.0 and 1.0 :rtype: Double .. function:: RandomRange(min, max) Returns a random integer value between min and max :param Integer min: :param Integer max: :rtype: Integer .. function:: Round(x) Rounds a floating point number to the nearest integer :param Double x: .. function:: 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 :param Double x: :param Double xMin: :param Double xMax: :param Double yMin: :param Double yMax: .. function:: 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 :param Integer x: :param Integer xMin: :param Integer xMax: :param Integer yMin: :param Integer yMax: .. function:: ScaleRange(x, yMin, yMax) Maps a double value between 0.0 and 1.0 into a rounded integer value between yMin and yMax :param Double x: :param Integer yMin: :param Integer yMax: .. function:: ScaleRangeEx(x, xMin, xMax, yMin, yMax) Maps a double value between xMin and xMax into a rounded integer value between yMin and yMax :param Double x: :param Double xMin: :param Double xMax: :param Integer yMin: :param Integer yMax: .. function:: Sign(x) :autotype: Returns 1 if x > 0 -1 if x < 0 0 if x = 0 :param Double x: :rtype: Integer .. function:: Sin(x) :autotype: Returns the sin of x :param Double x: :rtype: Double .. function:: Sqrt(x) :autotype: Returns the square root of x :param Double x: :rtype: Double .. function:: Tan(x) :autotype: Returns the tan of x :param Double x: :rtype: Double NoteManagement ^^^^^^^^^^^^^^ .. function:: AddChordInterval(cr, interval, chordName) Add a user defined chord interval to the chord dictionary :param ChordRecognizer cr: :param interval: :type interval: Integer array :param string chordName: .. function:: AutoSustainer_Play(sustainer, m) Play and possibly sustain an incoming note message through the AutoSustainer :param AutoSustainer sustainer: :param NoteMessage m: .. function:: AutoSustainer_RespectParameters(sustainer, respect) Indicate whether notes should respect MidiInBlock parameters :param AutoSustainer sustainer: :param Boolean respect: .. function:: AutoSustainer_SetTarget(sustainer, m) Specify the MidiInBlock to use for sending out notes using this AutoSustainer object :param AutoSustainer sustainer: :param MidiInBlock m: .. function:: AutoSustainer_Stop(sustainer) Stop all pending notes :param AutoSustainer sustainer: .. function:: ClearNoteTracker(nt) Reinitializes the note tracker although it is generally not necessary :param NoteTracker nt: .. function:: FindChordName(cr, nt) Given a note tracker with pending notes - get the string name of the chord :param ChordRecognizer cr: :param NoteTracker nt: :rtype: String .. function:: GotNote(nt, note) Track status of an incoming note :param NoteTracker nt: :param NoteMessage note: .. function:: GotNoteOff(nt, note) Remember that a note was released :param NoteTracker nt: :param Integer note: .. function:: GotNoteOn(nt, note) Remember that a note was played :param NoteTracker nt: :param Integer note: .. function:: NoteOnCount(nt) Count number of notes still being played :param NoteTracker nt: :rtype: Integer .. function:: RemoveChordInterval(cr, interval) Remove a chord interval from the chord dictionary :param ChordRecognizer cr: :param interval: :type interval: Integer array .. function:: StopAllPendingNotes(m, nt) Send note offs for all pending notes in the tracker :param MidiInBlock m: :param NoteTracker nt: OSC ^^^ .. function:: OSC_AppendDoubleArg(m, value) Append a double argument to the OSC message :param OSCMessage m: :param Double value: .. function:: OSC_AppendIntArg(m, value) Append an integer argument to the OSC message :param OSCMessage m: :param Integer value: .. function:: OSC_AppendStringArg(m, value) Append a string argument to the OSC message :param OSCMessage m: :param String value: .. function:: OSC_ArgCount(m) Returns the number of arguments in an OSC message :param OSCMessage m: :rtype: Integer .. function:: OSC_ClearArgs(m) Clear all arguments but leave the address pattern :param OSCMessage m: .. function:: OSC_GetArgAsDouble(m, index) Returns the argument at the index - 0 based - as a double :param OSCMessage m: :param Integer index: :rtype: Double .. function:: OSC_GetArgAsInteger(m, index) Returns the argument at the index - 0 based - as an integer :param OSCMessage m: :param Integer index: :rtype: Integer .. function:: OSC_GetArgAsString(m, index) Returns the argument at the index - 0 based - as a String :param OSCMessage m: :param Integer index: :rtype: String .. function:: OSC_Send(m) Send out the message to the default IP address and port :param OSCMessage m: .. function:: OSC_SendSpecific(m, ipAddress, port) Send out the message to the specified IP address and port :param OSCMessage m: :param String ipAddress: :param Integer port: .. function:: OSC_SetAddress(m, address) Set the address of an OSC message :param OSCMessage m: :param String address: Plugins ^^^^^^^ .. function:: ClosePlugin(p) :autotype: Close the plugin editor :param Block p: .. function:: GetActivePreset(p) :autotype: Get the index of the current preset :param Block p: :rtype: Integer .. function:: GetMaxNoteFromMidiInBlock(aBlock) Gets the max note number defined for the keyboard split :param MidiInBlock aBlock: :rtype: Integer .. function:: GetMinNoteFromMidiInBlock(aBlock) Gets the min note number defined for the keyboard split :param MidiInBlock aBlock: :rtype: Integer .. function:: 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 :param Block p: :param Integer index: :rtype: Double .. function:: GetParameterCount(p) Gets the number of parameters in this plugin :param Block p: :rtype: Integer .. function:: GetParameterName(p, index) Gets the name for the parameter index of any plugin if available. :param Block p: :param Integer index: :rtype: String .. function:: GetParameterText(p, index) Gets the value as text of the given parameter index of any plugin if available. :param Block p: :param Integer index: :rtype: String .. function:: GetPresetCount(p) :autotype: Get the number of available presets in this plugin :param Block p: :rtype: Integer .. function:: GetPresetName(p, index) :autotype: Get the name of the preset at the given index :param Block p: :param Integer index: :rtype: String .. function:: GetTransposeFromMidiInBlock(aBlock) Gets the max note number defined for the keyboard split :param MidiInBlock aBlock: :rtype: Integer .. function:: IsPluginBypassed(p) :autotype: Returns whether a plugin is bypassed :param Block p: :rtype: Boolean .. function:: OpenPlugin(p) :autotype: Open the plugin editor :param Block p: .. function:: ReplacePlugin(p, name) :autotype: Replace the plugin in the specified block - internal use only :param Block p: :param String name: .. function:: SelectPreset(p, index) :autotype: Change the preset of any block :param Block p: :param Integer index: .. function:: SetParameter(p, index, value) Send a parameter value to any plugin block :param Block p: :param Integer index: :param Double value: .. function:: SetPluginBypassed(p, bypass) :autotype: Bypass or un-bypass a plugin :param Block p: :param Boolean bypass: Sequencing ^^^^^^^^^^ .. function:: MidiSequence_CollectEventsNow(sequence) Collect events at the current position - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: .. function:: MidiSequence_EndOfSong(sequence) True if there are no more events in track - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :rtype: Boolean .. function:: MidiSequence_FollowGlobalTranspose(sequence, trackNumber, follow) When true MIDI note events will be transposed by the global transpose amount :param MidiSequence sequence: :param Integer trackNumber: :param Boolean follow: .. function:: MidiSequence_GetCurrentBar(sequence) Returns the current bar - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :rtype: Integer .. function:: MidiSequence_GetCurrentBeat(sequence) Returns the current beat of the current bar - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :rtype: Integer .. function:: 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! :param MidiSequence sequence: :param Integer trackNumber: :rtype: array .. function:: MidiSequence_GetCurrentTick(sequence) Returns the current tick offset - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :rtype: Integer .. function:: MidiSequence_GetResolution(sequence) Get the base resolution of the sequence - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: .. function:: MidiSequence_GetTrackCount(sequence) Returns the number of tracks in a loaded MIDI file - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :rtype: Integer .. function:: MidiSequence_LoadMidiFile(sequence, fromFile) Loads a midi file and returns the number of tracks - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :param String fromFile: :rtype: Integer .. function:: 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! :param MidiSequence sequence: :param Integer trackNumber: :param Integer channel: .. function:: MidiSequence_Quantize(sequence, q) Grid quantize - 1 2 4 8 16 - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: :param Integer q: .. function:: MidiSequence_ResetToStart(sequence) Reset to the beginning of the track - Experimental - not yet supported - do not even ask! :param MidiSequence sequence: Songs ^^^^^ .. function:: GetCurrentSongName() Get the name of the current song :rtype: String .. function:: GetCurrentSongPart() Get the index of the current song part :rtype: Integer .. function:: GetCurrentSongPartName() Get the name of the current song part :rtype: String .. function:: GetSongPartCount() Returns the number of parts in the current song :rtype: Integer .. function:: InSetlistMode() Returns whether we are currently in setlist mode :rtype: Boolean .. function:: NextSong() Move to the next song .. function:: PrevSong() Move to the previous song .. function:: SetSongPart(index) Switch to another part in the current song :param Integer index: .. function:: SongMoveDown() Move to the next part or next song if allowed .. function:: SongMoveUp() Move to the previous part or previous song if allowed .. function:: SongNextPart() Move to the next song part of the current song .. function:: SongPrevPart() Move to the previous song part of the current song Strings ^^^^^^^ .. function:: BoolToString(i) Returns a string representation of a boolean value :param Integer i: .. function:: CopySubstring(source, startIndex, length) Return the section of the source string based on the start index and desired length :param String source: :param Integer startIndex: :param Integer length: .. function:: DoubleToString(d, places) Converts a double to a string with the specified number of places :param Double d: :param Integer places: .. function:: IndexOfSubstring(source, substring, caseSensitive) Return the zero-based index of the substring or -1 if substring not found :param String source: :param String substring: :param Boolean caseSensitive: .. function:: IntToString(i) Returns a string representation of an integer value :param Integer i: .. function:: Length(s) Returns the length of a string :param String s: .. function:: MapValueToDiscreteString(x, values) Select a string based on the proportional fractional value between 0.0 and 1.0 :param Double x: :param values: :type values: string array :rtype: String .. function:: ReplaceString(source, replaceThis, withThat, caseSensitive) Replace a substring with another string :param String source: :param String replaceThis: :param String withThat: :param Boolean caseSensitive: .. function:: ReplaceStringSection(source, startIndex, length, newSubstring) Extract a substring defined by startIndex and length and insert a new substring into that position :param String source: :param Integer startIndex: :param Integer length: :param string newSubstring: .. function:: StringAfterFirstOccurence(source, substringToStartFrom, includeSubstring, ignoreCase) Return the section of the source string after the first occurrence of substringToStartFrom - optionally including the substring :param String source: :param String substringToStartFrom: :param Boolean includeSubstring: :param Boolean ignoreCase: .. function:: StringAfterLastOccurence(source, substringToFind, includeSubstring, ignoreCase) Return the section of the source string after the last occurrence of substringToFind - optionally including the substring :param String source: :param String substringToFind: :param Boolean includeSubstring: :param Boolean ignoreCase: .. function:: StringUpToFirstOccurence(source, substringToEndWith, includeSubstring, ignoreCase) Return the section of the source string up to the first occurrence of substringToEndWith - optionally including the substring :param String source: :param String substringToEndWith: :param Boolean includeSubstring: :param Boolean ignoreCase: .. function:: StringUpToLastOccurence(source, substringToFind, includeSubstring, ignoreCase) Return the section of the source string up to the last occurrence of substringToFind - optionally including the substring :param String source: :param String substringToFind: :param Boolean includeSubstring: :param Boolean ignoreCase: .. function:: TrimString(source) Remove leading and trailing spaces from a string :param String source: Sysex ^^^^^ .. function:: 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 :param SysexManager sm: :param Integer index: :param Integer newValue: .. function:: SM_CreateSysex(sm, m) Store a sysex message efficiently for manipulation and sending :param SysexManager sm: :param SysexMessage m: .. function:: SM_SendMidiIn(sm, midiIn) Send a stored sysex message from a MidiIn block :param SysexManager sm: :param MidiInBlock midiIn: .. function:: SM_SendMidiOut(sm, midiOut) Send a stored sysex message from a MidiOut block to an external MIDI device :param SysexManager sm: :param MidiOutBlock midiOut: System ^^^^^^ .. function:: AllNotesOff(p) Send All Notes Off and reset controllers :param MidiInBlock p: .. function:: ClearLogWindow() Clear the script log window - duh! .. function:: ClockTime() Gets the current time in milliseconds :rtype: Double .. function:: CloseLogWindow() Close the script log window - duh! .. function:: CloseScriptWindow() Close the script editor window - if open - for the current rackspace .. function:: EnableMetronome(enable) Turn the metronome on or off :param Boolean enable: .. function:: EnablePlayhead(enable) Start or stop the global playhead :param Boolean enable: .. function:: FormatTime(timeInMS, format) Returns a formatted timestamp from a given time in milliseconds :param Double timeInMS: :param String format: :rtype: String .. function:: GetBPM() Returns the current global BPM value :rtype: Double .. function:: GetCurrentVariation() Returns the index of the current variation :rtype: Integer .. function:: GetGlobalTranspose() Get the current transpose value :rtype: Integer .. function:: GetRackspaceName() Returns the name of the active rackspace :rtype: String .. function:: GetVariationCount() Returns the number of variations in the current rackspace :rtype: Integer .. function:: GetVariationName(index) Returns the name of a variation :param Integer index: :rtype: String .. function:: IsPlayheadEnabled() Indicates whether the playhead is running :rtype: Boolean .. function:: ModifierKeys() Returns the state of the various modifier keys - up or down :rtype: Integer .. function:: Notify(s) Displays a message on main window that will fade out :param string s: .. function:: OpenLogWindow() Open the script log window - duh! .. function:: OpenScriptWindow() Open the script editor window for the current rackspace .. function:: Panic() Stop all notes in the current rackspace .. function:: 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 :param MidiInBlock p: :param Integer noteNumber: :param Integer velocity: :param Integer channel: :param Integer startTimeMS: :param Integer duration: .. function:: Print(s) Displays the string in the GPScript Logger window :param String s: .. function:: RecordInputs(enable) Start or stop recording audio input to file :param Boolean enable: .. function:: ScheduleMidiEvent(p, m, delayInMS) Schedule a MIDI event to be reprocessed at some specified time in the future :param MidiInBlock p: :param midiMessage m: :param Double delayInMS: .. function:: SendLater(p, m, delayInMS) Schedule a MIDI event to be sent out at some specified time in the future :param MidiInBlock p: :param midiMessage m: :param Double delayInMS: .. function:: 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 :param MidiInBlock p: :param NoteMessage m: :param transpositions: :type transpositions: Integer array :param Double delayInMS: .. function:: SendNoteMessageWithTranspositionsNow(p, m, transpositions) Send multiple note on or note off events out immediately using note number added to each offset in the array :param MidiInBlock p: :param NoteMessage m: :param transpositions: :type transpositions: Integer array .. function:: 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 :param MidiInBlock p: :param noteNumbers: :type noteNumbers: Integer array :param Integer velocity: :param Integer channel: :param Double delayInMS: .. function:: 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 :param MidiInBlock p: :param noteNumbers: :type noteNumbers: Integer array :param Integer velocity: :param Integer channel: .. function:: SendNow(p, m) Send a MIDI event out immediately :param MidiInBlock p: :param midiMessage m: .. function:: SendNowExternal(p, m) Send a MIDI event out immediately through a MIDI Out block :param MidiOutBlock p: :param midiMessage m: .. function:: SendNowRespectingParameters(p, m) Send a MIDI event out after applying MidiInBlock parameters :param MidiInBlock p: :param midiMessage m: .. function:: SendSysexExternal(p, m) Send a MIDI sysex message out immediately through a MIDI Out block :param MidiOutBlock p: :param SysexMessage m: .. function:: SendSysexInternal(p, m) Send a MIDI sysex message out immediately from a MIDI In block :param MidiInBlock p: :param SysexMessage m: .. function:: SetBPM(bpm) Set the global BPM value :param Double bpm: .. function:: SetGlobalTranspose(semitones) Transpose all incoming MIDI messages by semitones amount :param Integer semitones: .. function:: SetMetronomeVolume(volume) Set the metronome volume :param Double volume: .. function:: SetVariation(index) Switch to another variation in the active rackspace :param Integer index: .. function:: SetWindowTitle(title) Changes the default rackspace title to the title :param string title: .. function:: Shell(command) Run an OS Shell command (Mac only) returning an integer indicating success or failure :param String command: :rtype: Integer .. function:: ShellEx(command) Run an OS Shell command (Mac only) that returns the output of the command :param String command: :rtype: String .. function:: SwitchToNextRack() Switch to the next rackspace .. function:: SwitchToNextVariation() Switch to the next variation .. function:: SwitchToPreset(newPreset) Switch to another preset in the rackspace :param Integer newPreset: .. function:: SwitchToPrevRack() Switch to the previous rackspace .. function:: SwitchToPrevVariation() Switch to the previous variation .. function:: SwitchToProgramNumber(programNumber, bankNumber) Switch to zero-based program number and bank Number if latter is greater than -1 :param Integer programNumber: :param Integer bankNumber: .. function:: SwitchToRack(newRackspaceNumber, newPreset) Switch to another rackspace by number and potentially to a specific newPreset in that rackspace :param Integer newRackspaceNumber: :param Integer newPreset: .. function:: Tap() Simulates tap tempo command .. function:: TimeNow() Gets the current time in milliseconds - deprecated :rtype: Integer .. function:: TimeSinceStartup() Gets the time since computer was started in milliseconds :rtype: Double Widgets ^^^^^^^ .. function:: BindExternalWidget(ew, widgetName, rackspaceName) Access a widget in another rackspace - boolean return value indicates whether widget was found - experimental :param ExternalWidget ew: :param String widgetName: :param String rackspaceName: :rtype: Boolean .. function:: GetExternalWidgetValue(ew) Get the current value of an external widget - experimental :param ExternalWidget ew: :rtype: Double .. function:: GetWidgetScriptName(p) Gets the scripting name of this widget. Useful when widget is passed as a parameter somewhere :param Widget p: :rtype: String .. function:: GetWidgetValue(p) Gets the current value (position) of the widget. The value will be between 0.0 and 1.0 :param Widget p: :rtype: Double .. function:: SetExternalWidgetValue(ew, newValue) Set the current value of an external widget - experimental :param ExternalWidget ew: :param Double newValue: .. function:: SetWidgetLabel(w, text) :autotype: Set the label of a widget :param Widget w: :param String text: .. function:: SetWidgetValue(p, value) Set the current value of any widget :param Widget p: :param Double value: