Midi Quest Pro only
Macro Commands
This section will describe each of the available commands for using macros along with an example and explanation of where the command is likely to be used. (note: any command displayed in black is currently not documented. Should you believe that you will need to use this command for development purposes, please contact Sound Quest for more information) History SQML (the Sound Quest Macro Language) was originally developed in 1989 for the first version of Midi Quest. Since then, it has continued to grow and has received many enhancements as Midi Quest has been developed. In its early days, there were only a few commands with simple intentions, to send, receive and create MIDI messages. The commands were short. T for transmit. R for receive. Basic math was added along with the ability to read from and write to memory containing SysEx. In most cases, if you see a short, single or two letter command, its been around for a long time. As we've added commands to the macro language, we tended to use more language style commands that are more easily readable. Many of these new commands allow the macro language to find out about the environment it is running in both at a full program level and more specifically the editor. These commands are generally only run in a Midi Quest editor and permit much more readable code. Details The Midi Quest program is designed so that there are no temporary buffers used to consume memory. Any SysEx received via MIDI is loaded DIRECTLY into the computer memory that will be used for editing. There is no intermediate memory used. Because of this design, you should be aware of getting from a command that requests SysEx from an instrument (T n or TR n) to the command which actually receives the SysEx (R n) quickly. Normally, your receive macros should look something like this: S n { F0 ................. F7 } - create the dump request message of n bytes TR n - set up the dump request message to be sent but don't actually send it R bytes - transmits the dump request message and immediately waits to receive the SysEx dump For both transmission and reception of MIDI events, you must work in terms of COMPLETE, properly formatted MIDI messages. You can not send a byte at a time. The Midi Quest macro language has 4 temporary variables: W, X, Y, and Z. These can be assigned values or used as variables in place of any parameter which would take a numeric value. The scope of these variables is the macro in which they are running. When any macro ends its execution, the values are lost. The macro language also has 2048 'V' variables (referenced as V0, V1, V2, ... V2047). Within a driver, these variables have the same scope as W, X, Y, and Z but within a Midi Quest editor, their scope is the editor itself. This means that these variables are created when the editor is created and destroyed when the editor is destroyed. They maintain their value in any macro executed within the editor until a macro changes the value in a variable. This allows you to use these variables to pass values between the various macros if you wish. When a macro is called, it is automatically given the memory required for storing SysEx (as defined by FileSize in the Driver). In the case of the Receive Macro: 1. A buffer containing 'FileSize' bytes is pre-allocated. 2. R n (receive n bytes) commands automatically load SysEx into this buffer 3. After reception the internal pointer is advanced so that additional SysEx can be loaded In the case of the Transmit Macro: 1. A pointer to the SysEx is provided 2. T n (transmit n bytes) sends the desired SysEx 3. commands automatically advance the pointer after n bytes have been transmitted Notes All character entries can be made in either upper or lower case. When a driver is loaded from disk, any macros are automatically uncompiled using upper case letters. (eg. TR 15 R 62). Many new function take "ID" as a parameter. In these cases, the command is to be executed or affects the editor specified by that ID. For this functions to execute correctly, the editors must be in the same Set or the editor referenced by "ID" will not be found.
Defaults These are the values of various parameters upon macro entry Data Pointer - points to the buffer used to load or send MIDI events Data Size - the number of bytes in the buffer Wait Mode - Wait for F0H to start receiving SysEx information Variable W = 0 Variable X = New value of an edited parameter (Templates only) Variable Y = SysEx Channel Variable Z = selected Patch (Pch #)
Macro Command Explanations Takes the absolute value of the supplied value Abs n where n = the number to take the absolute value of (W, X, Y, Z, V0 -> V49) result is stored in X notes: function works on both int and float values A Force the Data Pointer to point back to the Buffer SysEx instead of MIDI data built into the macro. This is useful in a situation where the (S)et command has been used but all of the data has not been sent and it is necessary to access the Data Buffer again for either reception or transmission of SysEx. B n where n = number of bytes to send n = 0 will send all bytes in the current buffer (for files of unknown length) eg. B 5 B is used to send SysEx from the SysEx buffer regardless of what the Data Pointer is set to. WARNINGS: Should only be used in the Transmit macro. Inverts the state of each bit in the variable Breaks out of the current loop and continues execution as if not in a loop This function must be used with great care as execution proceeds it is very easy to simply return out of the macro completely C allows the macro to control the current offset of the SysEx channel. The default, on entry to the macro, is to use the value of the "MIDI Channel Ofs" as set in the Instrument Creator Window. C n where n = the byte offset in which to place the SysEx channel n = 0 do not use the SysEx channel Enable response to CC messages using a macro command. If a control is currently not responding to CC messages, this will start the response. The control most already be configured to respond to a particular CC value CCY n n = the ID number of the control which is to start responding to CC commands note: only useful in a macro for a patch editor Disable response to CC messages using a macro command. If a control is currently responding to CC messages, this will stop the response. The control most already be configured to respond to a particular CC value CCN n n = the ID number of the control which is to stop responding to CC commands note: only useful in a macro for a patch editor D n where n = number of microseconds The Delay command stops the execution of MIDI events for n microseconds. It can be used in any situation where the execution needs to be slowed. Remember that this command only affects execution of the MIDI thread and is used to ensure that there is at least a specified separation between two MIDI messages. To insert a delay into the execution of a macro, see the SLEEP command. eg. An instrument can not handle the transmission of two large SysEx messages one immediately after the other. Try transmitting one message, delay 5,000 microseconds (D 10000) and transmit the second message. The instrument is much more likely to receive the second transmission more accurately. Sleep n where n = number of milliseconds This command delays the execution of the macro. It should be used when you wish to wait between the execution of two commands. This command should not be used to delay MIDI events, use Delay instead When this command is used, values in a subsequent "S" macro are in decimal rather than hexadecimal format. DEC In any subsequent SysEx MIDI transmissions, there is a 1 ms break after every n bytes DM n where n = every nth byte to delay on n = 0 - cancel the DM command (no delays between bytes of a SysEx transmission) This command slows the MIDI transmission rate to accommodate synthesizers which can not receive transmissions at full MIDI rate. This command will slow SysEx transmission so that for every nth byte there is a 10 millisecond delay before transmission recommences. eg DM 20 Delay 10 milliseconds every 20th byte transmitted. WARNING: If this type of transmission is required for a particular instrument to function properly, the sequencer should NOT be run while communication of this type is taking place! DR n ofs where n = the number of bytes to read from the current disk file ofs = where to load the SysEx relative to the Data Pointer This command reads a block of n bytes from an open disk file and stores it in memory with a Data Pointer offset of 'ofs'. This command is necessary for converting files from other manufacturers. eg. DR 155 6 Read 155 bytes and store it starting 6 bytes from the Data Pointer. WARNING: 1) This command should ONLY be used in a File Conversion macro created in the File Conversion Window! 2) DANGER! Ensure the read length is not larger than the available buffer size! DS n where n = the number of bytes to advance This command moves the position of the disk file pointer forward n bytes so that information can be read from the middle or end of a file. Not all companies use the same file format so it is necessary to be able to move anywhere in the file to collect the information necessary to create a Sound Quest file of the same type. eg. DS 166 Advance the disk file pointer 166 bytes. WARNING: 1) This command should ONLY be used in a File Conversion macro created in the File Conversion Window! E or ] There are situations where it may be necessary to exit out of the macro before the end of the macro. This can be accomplished by entering an E or ]. (This option is more commonly used in Template macros.) Writes data from one of the four temporary variables into a location in the current SysEx buffer FW n - writes data in W into the current data buffer FX n - writes data in X into the current data buffer FY n - writes data in Y into the current data buffer FZ n - writes data in Z into the current data buffer where n = the offset into the current buffer to write the data into, the first byte of the data is referenced as "0" eg MW = 10 FW 6 writes 10 into the 6th byte of the current SysEx buffer FA m n {m MIDI bytes to copy} where m = number of bytes to format into current MIDI string n = offset from current Data Pointer position to place the bytes { m bytes } = the bytes which are to be copied into the string This command will format a string of bytes into the current MIDI String. This option is particularly useful for the Audition macro where a completely new message is being created. eg. FA 8 0 {F0 41 0 16 12 4 0 0} This example would format the correct header code necessary to transmit a new tone to a Roland D-10. Calculate the factorial for a given integer n FACT n where n = the value to calculate the factorial of result is stored in the X variable eg FACT 5 result = 120 in the X variable forces conversion of an "int" to a "float" float n where n is a variable location (W, X, Y, Z, V0->V40) eg. MV2 = 45 float V2 result V2 equals 45.0 instead of 45 notes: this function is only useful in Infinity which can supply floats to and retrieve floats from a macro This is almost identical to the "Write Data in a Variable" option above except that it also allows data from V variables (V0 -> V49) to be written into the current data buffer as well. FG (W..Z,V) n where (W..Z,V) = any 1 of the four variables: W, X, Y, Z, or a V variable n = offset from the current Data Pointer to store the data This command takes the contents of the variable (W..Z) and stores the nth byte from the current Data Pointer in it eg. FG W 4 This takes the contents of the fourth byte from the Data Pointer and stores it in the variable W. NOTE: This command does NOT use the Storage Format (See FS). Read Byte from Data (Formatted) FR (W..Z) ofs where (W..Z) = one of four variables: W, X, Y, Z ofs = offset from the data pointer to get the data This command reads a byte of data out of the buffer currently pointed to by the Data Pointer. The command uses the Storage Format parameter when reading the data so that if the data is in a non-standard format such as nibblized or in M1 format, this is accounted for and the complete byte is read and provided. This command is more commonly used in Template macros but could be used for other purposes. eg. FR W 4 This reads the fourth byte offset from the Data Pointer into the variable W. The complement of this command is FS W 4. WARNING: Ensure that the byte read is within the current buffer. Read Byte from Data (Formatted and from another data block) FRX ofs id bank where ofs = offset from the data pointer to get the data id = driver id of the data to get the value from bank = the patch number in the bank to get the data from - ignored if data is not a bank return stored in X, Y = 1 for success, Y = 0 for failure This command reads a byte of data out of the buffer currently pointed to by the Data Pointer. The command uses the Storage Format parameter when reading the data so that if the data is in a non-standard format such as nibblized or in M1 format, this is accounted for and the complete byte is read and provided. This command is more commonly used in Template macros but could be used for other purposes. eg. FRX 4 3122 0 This reads the fourth byte offset from the Data Pointer from data with ID 3122, result stored in X. The complement of this command is FSX 4 3122 0, ensure data to save is in X Store Byte in Data (Formatted) FS (W..Z) ofs where (W..Z) = one of four variables: W, X, Y, Z ofs = offset from the data pointer to store the data This command stores data in a variable into a location offset from the buffer currently pointed to by the Data Pointer. The command uses the Storage Format parameter when storing the data so that if the data is in a non-standard format such as nibblized or in M1 format, this is accounted for and the complete byte is stored appropriately. This command is more commonly used in Template macros but could be used for other purposes. eg. FS W 10 This command stores the value in W in the tenth byte offset from the Data Pointer. The complement of this command is FR W 10. WARNING: DANGER! Ensure the offset does not exceed the size of the data
The "S" command is typically used to create a buffer of MIDI bytes to send an update message to an instrument. However, this buffer can also be used as a storage mechanism to create an array of values that can be read from typically as the result of the state of another variable. FT (W..Z,V) n where (W..Z,V) = any 1 of the four variables: W, X, Y, Z n = offset from the current Data Pointer to store the data This command takes the contents of the variable (W..Z) and stores it in the nth byte from the current Data Pointer eg. S 10 { 0 9 8 7 6 5 4 3 2 1 } FT W 4 result : W = 6 This takes the contents of the fourth byte from the Data Pointer set by the S command and stores it in the variable W. note 1: This command does NOT use the Storage Format (See FS). note 2: You must have used the "S" command prior to calling this function note 3: The first byte of the "S" buffer should be 0 and shouldn't be referenced. Don't rely on it being correct GA n - allocate n bytes of memory GC m p q - copy block of bytes within a memory block or from old memory to new GD - send the MIDI data at the current Data Pointer without opening a MIDI I/O Window GF n - free the allocated memory GJ x y - moves the command to the given x, y location. Not implemented in v9 or higher GN - set Data Pointer to the new memory GM n - calculate the length of the SysEx message currently pointed to by the data pointer and return it in the X variable (n = maximum length to search in the data) GO - set Data Pointer to the old memory GP - set the Data Pointer to a specific location in the current buffer GPINC - increment the current Data Pointer position by one GPDEC - decrement the current Data Pointer position by one GR - reset Data Pointer to start of new memory GT id - push a control to the top - this function should not be used GU id - force the control "id" to redraw itself (deprecated) where n = number of bytes m = number of bytes offset from the start of the old memory p = number of bytes offset from the Data Pointer q = number of bytes to copy from the old memory into the new memory id = the id number of the control All of the operations in this section are usually used in the Audition macro and in the File Conversion macros which can be used to convert other manufacturers files to Sound Quest format files. GA is used to allocate the memory necessary to create a complete Patch from a Bank, usually n will equal the complete byte size of the Patch. GC is usually used to copy the sound data from the Bank into the newly allocated data which will be used for the audition GC can also be used to copy data within a memory block (for instance moving data from upper memory to lower in a driver) GD causes the contents of the current Data Pointer to be sent without opening a MIDI I/O Window GF is used to free the memory - this should be called before exiting the macro. GM is used to determine the length of a message pointed to by the Data Pointer if the length of that message can vary GN is used after the memory has been allocated and sets this memory for use by the other Data Pointer related operations. GO is used to set the Data Pointer back to the original data so that it can be operated on if necessary. GP sets the Data Pointer to a specific byte location in the data to access data from that point GPINC increments the current Data Pointer position by one GPDEC decrement the current Data Pointer position by one GR is used to reset the Data Pointer to the beginning of the allocated memory so that it can be reused if desired. This function will probably be used if there is a loop in the Audition macro. GT is an old style function to push a control to the top. Use show and hide controls or layers instead GU is used to force a control to redraw itself (deprecated) - no longer operational in plug-ins as of Midi Quest 12.0.0 Here is an example which incorporates most of the functions in this section and is drawn directly from the D-10 Tone Audition macro. It is the complete code to prepare and transmit the data. GA 256 - allocate memory GN - make memory active FA 8 0 {F0 41 0 16 12 3 0 0 } - format in header GC 0 8 246 - copy in body K 0 0 5 249 254 - generate checksum MX = 247 - set F7H end FX 255 - copy F7H into end T 256 - transmit complete tone GF 256 - free the data WARNING: DANGER! When using GC ensure that the copy does not exceed the available buffer space.
Copies memory from a source location to a destination location in a Set. The source and destination patches can be the same or different elements in the Set, however, neither should be a bank. memcpy srcID, srcOfs dstID dstOfs bytes where srcID = the ID of the element in the Set to copy from srcOfs = the offset into the source data dstID - the ID of the element in the Set to copy to dstOfs = the offset into the destination data bytes = the number of formatted bytes to copy (note: FORMATTED bytes so in a nibblized format setting bytes to "3" would actually copy 6 bytes)
Copies memory from a source location in a bank to a destination location in a bank in a Set. The source and destination locations can be the same or different elements in the Set, however, both should be a bank and of the same type of data. memcpybnk srcID, srcOfs srcPch dstID dstOfs dstPch bytes where srcID = the ID of the Bank element in the Set to copy from srcOfs = the offset into the source Patch's data srcPch = the patch in the source Bank to copy from dstID - the ID of the Bank element in the Set to copy to dstOfs = the offset into the destination Patch's data dstPch = the patch in the destination Bank to copy to bytes = the number of formatted bytes to copy (note: FORMATTED bytes so in a nibblized format setting bytes to "3" would actually copy 6 bytes)
Control Show and Hide functions These functions are used to show and hide controls. These functions are independent of the layer functions so a control that is hidden because it is part of a specific layer can still be specifically shown using these functions. GH n - hide the control with ID n GS n - show the control with ID n GHB n m - hide any control with an ID in the range n through n+m-1 inclusive GSB n m - show any control with an ID in the range n through n+m-1 inclusive where n = the ID number of the control m = the number of IDs starting with n to be shown/hidden These commands cause a Patch's Retrieve macro to be executed to reload the data from the instrument GL - reload data from the instrument into the editor using the driver's retrieve macro with the MIDI I/O window GL2 - reload data from the instrument into the editor using the driver's retrieve macro - no MIDI I/O window is displayed This command is used by the Korg Wavestation to write a value into into the SysEx message and terminate it with an F7H GW (W..Z,V) n where W..Z,V = the contents of any variable n = the offset into the current data pointer to write the current value in ASCII with an F7 terminator IF (W..Z,V) - execute code if variable is NOT equal 0 IFN (W..Z,V) - execute code if variable is equal 0 IFL (W..Z,V) - execute code if variable is less than 0 IFLQ (w..Z,V) - execute code if variable is less than or equal to 0 IFG (W..Z,V) - execute code if variable is greater than 0 IFGQ (W..Z,V) - execute code if variable is greater than or equal to 0 IFNQ (X..Z, V) n - execute code if the variable is not equal the value n (n = X..Z, V, value) IFQ (X..Z,V) n - execute code if the variable equals the value n (n = X..Z,V,value) IFE - end any conditional execution (to all levels even if there are multiple if conditionals - the next command will always execute) IFX - end one level if conditional execution is terminated (next command may not execute based on previous conditionals) where (W..Z,V) is one of four variables: W, X, Y, Z, or a V variable (V0 -> V49) These commands allow execution of macro code only if certain requirements are met. This commands are far more commonly used when writing Template macros. They allow the limitation of certain actions based on the state of variables. If a test fails, all macro code is ignored until the first IFE command is executed and operation returns to normal. NOTE: If IFE is used at the very end of a macro, an error is generated. Enter E or ] to end the macro correctly. forces conversion of a "float" to an "int" int n where n is a variable location (W, X, Y, Z, V0->V40) eg. MV2 = 45.5 int V2 result V2 equals 45 instead of 45.5 notes: this function is only useful in Infinity which can supply floats to and retrieve floats from a macro K m n start len ofs where m = Data Format (should be the same as Storage Format) n = Check Sum type (should be the same as in Check Sum) start = offset from current Data Pointer position to start CSum len = the number of bytes in the checksum calculation ofs = offset from current Data Pointer position to store CSum This is the macro equivalent of the 'Check Sum' portion of the Instrument Creator window. Any data which contain a check sum should have this calculation run before transmission. eg. K 0 0 6 155 161 (format command for DX7 voice) This function is called by a driver loading Kurzweil K2000 or K2500 data. It adjusts the data in a number of different ways to match Midi Quest requirements. This includes adjusting the name so that it is always 16 characters long. KURZ For this function to work correctly, the following variables must be set appropriately: W = number of patches in the bank X = bank Number (0 - 9) Y = maximum size of each patch Z = number of patches to process V16 or V17 = 0 - 16 character names V16 or V17 = 1 - 32 character names L n [ (macro statements) ] where n = the number of times to loop the macro [ ] = macro statements to be looped L allows a portion of the macros to be looped any number of times. This is useful for repetitively receiving or transmitting SysEx information or to set multiple checksum values. WARNINGS: There can only be one loop at a time These functions are similar to the CCY and CCN commands except that they are use to activate or inactivate CC response for all of the controls on a specific layer. LCCY n - all controls on layer n that have associated CC control numbers will respond to incoming CC values LCCN n - all controls n that have associated CC control numbers will not respond to incoming CC values where n is the selected layer number Layer Commands (Show, Hide, Transparency) These commands are use to show, hide, and control the transparency of all controls assigned to a particular layer. LH n - hide all controls assigned to layer n LS n - show all controls assigned to layer n LT n t - set the transparency level of all controls in layer n LayerDisable n - disable all controls assigned to layer n LayerEnable n - enable all controls assigned to layer n where n = the control layer t = the level of transparency (0 = no transparency, 255 = fully transparent, not visible) This command ensures that the current value of a control is within its current minimum and maximum values. If now, the control is set to its default value and the system is updated. Limit n where n is the ID number of the control note: only useful when executed in an editor macro This function allows one macro to call another. Within a patch editor any Store, Retrieve, or Transmit macro can call any of the 100 global macros. On entry to a global macro, the global macro begins with the W, X, Y, and Z variables set to the same values as the calling macro. On exit from the called macro any changes to the W, Y, and Z variables are lost. X contains the value set by the RET command in the called macro. If RET was not called, X is undefined. Global variables (V0 - V49) are global to the editor so any changes made to these in any macros are reflected in any macro call. macro n - calls the macro n where n can be any value between 0 and 99 note 1: Midi Quest can't handle recursive macro calls without a proper break function. For example if macro 1 calls macro 2 and macro 2 calls macro 1 without some conditional to stop the loop, Midi Quest will continue until the stack is consumed and it crashes. The first 1024 layers are divided into 32 different master layers with each master layer containing 32 layers. MLS n - show any layers in the master layer that are are currently set as visible MLH n - hide any layers in the master layer that are currently set as visible eg LH 89 - hides layer 89 MLH 2 - hides any layer in the range of 64 - 95 that is currently visible LS 89 - layer is marked as visible but because its master layer is hidden, no controls are displayed MLS 2 - layer 89 is shown along with any other layer in the range 64 - 89 that is marked as visible note: GS and GH commands will over-ride any layer or master layer show or hide commands. These math commands obtain the standard results min m n - sets X to the smaller of the two values, m or n max m n - sets X to the larger of the two values, m or n eg min 10 7 - the variable X is set to 7 M(W..Z,V) op (W..Z,n,V) where (W..Z) = any 1 of the four variables: W, X, Y, Z -> destination (V) = any 1 of the 50 "V" variables: V0 -> V49 -> destination op is one of the following math operations: + (add) - (subtract) * (multiply) / (divide) | (bitwise OR) & (bitwise AND) > (shift right) < (shift left) = (equal) % (mod) (W..Z) = any 1 of the four variables: W, X, Y, Z -> source (V) = any 1 of the 50 "V" variables: V0 -> V49 -> source n = any numeric constant The macro language has an extensive selection of macro operations which can be performed on variables. For those of you familiar with the 'C' language, the operations are identical. We will use a number of examples to illustrate how the math operations work. A table will be kept showing the contents of each variable after the completion of each operation. Operation Explanation Var W X Y Z ------------------------------------------------------------- START 1 6 3 0 MW = 3 : W takes on the value 3 MX = Z : X takes on the value of Z MX + 1 : add 1 to X MW + Y : add contents of Y to W MW / Y : divide W by Y MY < 4 : bit shift Y left 4 MY | 21 : 00010101 | 00110000 -> 00110101 MX < 7 : bit shift X left 7 MX > 2 : bit shift X right 2 MY & 21 : 00110101 & 00010101 -> 00010001 MX % Y : X mod by contents of Y WARNING: You must NOT attempt to divide a variable by 0. These operations are usually used to process float values and the results are floats. As a result, it is only practical to use these functions within Infinity's "Macro" objects which is capable of supplying float values to and retrieving floats values from a macro. The result of each of the following functions is stored in the X variable destroying its previous contents asin x acos xS atan2 x y atan x y cos x cosh x exp x ln x log10 x where x = a variable: W, X, Y, Z, or V0 -> V49 y = a variable: W, X, Y, Z, or V0 - V49 result in X N The N option toggles whether the software's MIDI SysEx receive section is supposed to wait for a SysEx Start Command (F0H) or not. By default it does, and the situations would be very rare when this command will be used. (An exception is the reception of Casio dumps where data must be received starting with a byte that is NOT F0H). This function call is made from an editor to obtain information about the settings of another driver/component in a set. The result is stored in the X variable. parm n m where n = the ID number of the driver that we want to obtain the parameter value from m = the identifier of parameter to object. The following parameters can currently be obtained: = 0 - PCH # setting Generate a random number between 0 and n. random n where n = the maximum random number to generate R n RA x n where n = number of bytes to receive n = 0 will load up to the number of bytes left in the Receive Buffer x = number of bytes to skip before receiving These commands are used to receive data bytes from MIDI. Both functions receive up to n bytes. The RA function will ignore x bytes before it starts receiving data. This allows some instrument responses to be ignored before the actual data is received (necessary for KORG AI instruments). Each receive bytes command expects only one string of SysEx bytes to be received (ending in F7H). The receiving process is ALWAYS stopped on the receipt of an EOX end of transmission. To load two or more blocks of SysEx data it will always be necessary to make that number of receive requests. eg. R 200 receive and store up to 200 bytes eg. RA 6 174 receive and ignore 6 bytes then receive and store 174 bytes WARNINGS: This command should ONLY be used when writing a Receive macro. NOTES 1) When "Timeout" is set in the driver, the Y variable is set to "1" if a timeout actually occurs
RB n where n = the number of bytes to receive (between 1 and 100) This command is used when data must be received from an instrument and it is not to be kept. The data is read and stored in a temporary buffer and immediately dumped. eg. RB 52 Read 52 bytes into the temporary buffer and dump. This command allows you to use the specialized Roland communication routines to transfer SysEx data to or from a Roland device under macro control RCOMM where V0 = the number of bytes to send/receive V1 = communication type, 0=regular, 1=handshake V2 = Send/Recevie 0 = Send; 1 = Receive V3 = starting address Info->DumpBytes[5] must have size!! 3 or 4 if using regular Roland, Info->Dumpbytes[6] have block size To return a value to a calling macro or for a macro to return a value to Midi Quest, use the RET macro. When returning the value to a calling macro, the returned value is stored in the "X" variable of the calling macro. RET n where n = the value to return Set Data Pointer to MIDI String S n {an n byte complete MIDI message} where n = number of bytes in the MIDI message This command sets the Data Pointer to the MIDI message, and all subsequent operations which write into the data will write into this string until it has been transmitted using the T or TR commands. This command can be used to create any MIDI message you want in order to accomplish whatever your purpose is. eg. S 5 {F0 43 20 0 F7} - Yamaha DX7 Voice Dump Request eg. S 3 {90 60 40} - turn on note 96D with velocity of 64D eg. S 2 {C0 02} - set up Patch change message for Patch2 WARNINGS: 1. The MIDI string MUST be entered in HEXADECIMAL format. 2. You must ensure that a complete MIDI msg is being provided! In other words, a SysEx message must start with F0H and end with F7H and a regular MIDI Message (eg. Note ON) must start with a status byte. 3. Running Status is NOT supported. 4. The Data Pointer is literally set to a position in the compiled macro. You must ensure that any subsequent operations, which write into the MIDI string, stay within the confines of the message. VERY NASTY PROBLEMS CAN RESULT OTHERWISE! These functions are used to permanently changes parameter values of a control. If a patch editor is saved after executing these commands, the modifications will be stored on disk. As a result, ensure that an editor using these commands is properly configured on initialization. setmin m n - sets the minimum parameter value of a control setmax m o - sets the maximum parameter value of a control setminmax m n o - sets the minimum and maximum parameter value of a control setnumstrings m p - sets the number of strings assigned to a string list control to link the control to a different string list of names to display setval m r - sets the control's current value to r where m = the ID number of the control n = the new minimum value for the control o = the new maximum value for the control p = the ID number of the control the the current control is to reference to display the string list r = the control's new value Transmits the MIDI data in the currently selected buffer out the MIDI port T n where n = number of bytes to send n = 0 will send all bytes Pointed at by the Data Pointer (for files of unknown length) eg. T 163 (to send a Yamaha DX Voice) T is used to immediately transmit n bytes via MIDI OUT starting at the Data Pointer. WARNINGS: Should only be used in the Receive macro after the (S)et command has been used to set up data to send. NOTES: 1) All 3 MIDI transmit functions will automatically format in the data's selected MIDI channel if it is a standard MIDI message or will format in the SysEx channel if the data is a SysEx message and the SysEx channel offset is > 0. - macros = when T n command is executed, V10 is set to number of bytes received Transmit Bytes on next Receive TR n where n = number of bytes to send n = 0 will send all bytes in the current buffer (for files of unknown length) eg. TR 5 TR is used to setup n bytes, starting at the Data Pointer, so that they are transmitted immediately before the macro waits to receive SysEx bytes. WARNINGS: Should only be used in the Receive macro after the (S)et command has been used to set up data to send. Sets the amount of time in milliseconds before a timeout occurs. This allows the driver to override the automatic calculation the program makes based on factors that included the size of the expected dump. For this function to have an effect, the driver must be set to use timeouts. Timeout n where n = the number of milliseconds before timeout Occasionally, you might want the value of a variable to persist from session to session such as a variable which defined the type of edit display they preferred. This is accomplished through these two functions which store the state of the selected V variables in an ini file for later retrieval.1 VS n - store the current value of the V variable n VL n - retrieve the stored value of the V variable n where n = the specified v variable (from 0 to 255) Variable Read and Write (Algorithmic) These functions allow data to be transferred between a V variable and a temporary variable (W .. Z) VR (W..Z) n - transfer the contents of variable Vn to the specified temporary variable (W, X, Y, or Z) VW n (W..Z) - transfer the contents of the specified temporary variable to the variable Vn where n = the specified V variable (from 0 to 255) F(W..Z) n where (W..Z) = any 1 of the four variables: W, X, Y, Z n = offset from the current Data Pointer to store the data This command takes the contents of the variable (W..Z) and stores it in the nth byte from the current Data Pointer eg. FW 4 This takes the contents of W and stores it in the fourth byte from the Data Pointer. NOTE: This command does NOT use the Storage Format (See FR). These commands are used to access data from other SysEx in a Set. If the driver referenced by the the driver ID parameter can't be found, the operation is not performed.
FRE ID Ctl# - read data from another SysEx using the editor's controls Gets the current value of a control from the editor for data with given ID. The value is returned in the X variable. ID - the editor holding the data with the given ID Ctrl# - the ID number of the control eg "FRE 249 672" finds the window containing data with a driver ID of 249, finds control 672 and returns its current value note 1: this macro only works when the ID refers to a patch with an editor that is currently open. If ID references a bank or a patch where the editor isn't open, the operation will fail
FWE ID Ctrl# Writes the contents of the variable X into the data with the given driver ID and control ID - the editor holding the data with the given ID Ctrl# - the ID number of the control eg "FWE 249 672" finds the window containing data with a driver ID of 249 then finds the control with ID note 1: this macro only works when the ID refers to a patch with an editor that is currently open. If ID references a bank or a patch where the editor isn't open, the operation will fail
FRX ofs id bank# Gets data from another SysEx component in a Set using a data offset. The value is returned in the X variable ofs - the offset into the data to read from (in formatted bytes) ID - the SysEx with the given driver ID bank# - if the ID is a reference to a bank driver, the bank number should be the patch in the bank to reference eg 1. "FRX 57 225 0" returns the value stored at formatted data byte 57 from the data with driver ID 225 and stores it in the X variable eg 2. "FRX 98 280 10" is a reference to a bank driver. The contents of data byte 98 is returned from patch 10 in the bank with driver ID 280 and stores it in the X variable note 1: the bank# parameter should be set to 0 when not referencing bank data. note 2: because the data is being accessed directly, this operation is successful as long as there is data in the Set with a matching driver ID. It doesn't matter whether the data has an editor or whether that editor is open.
FSX ofs ID bank# Writes a data value to another SysEx component in a Set using the driver ID to reference the data and the number of the patch in the bank. ofs - the offset into the data to write the value to (in formatted bytes) ID - the SysEx with the given driver ID bank# - if the ID is a reference to a bank driver, the bank number should be the patch in the bank to reference eg 1." FSX 57 225 0" take the value currently stored in the X variable and writes it to formatted byte 57 of the SysEx with driver ID 225. eg 2. "FSX 98 280 10" is a reference to a bank driver. The contents of data byte 98 in patch 10 of the bank with Driver ID 280 is set to the current value of the X variable. note 1: the bank# parameter should be set to 0 when not referencing bank data. note 2: because the data is being accessed directly, this operation is successful as long as there is data in the Set with a matching driver ID. It doesn't matter whether the data has an editor or whether that editor is open. Get Commands are used to query Midi Quest about various information states within the software or controls in the editor about their current settings. Unless otherwise noted, the returned value is stored in the X variable. getdirty returns 1 if the patch has been edited or 0 if it is unedted getenvironment returns a number representing the environment that the patch editor is operating in 0 = stand alone application (Midi Quest, Midi Quest Pro, Midi Quest Essentials, Midi Quest one) 1 = MFX 2 = VST2 4 = AU 5 = VST3 6 = AU 7 = AAX
gethost returns the same values as getenvironment getid Instead of using v40, this is the new, best way to determine what driver has opened the editor. The command returns the ID of driver. getmax ctl# returns the maximum value assigned to a given control ctl# - the ID number assigned to the control getmin ctl# returns the minimum value assigned to a given control ctl# - the ID number assigned to the control getpopstyle ctl# returns the popup style currently assigned to the control ctl# - the Id number assigned to the control getval ctl# returns the current value displayed by the control getversion returns the current panel version (as assigned in Midi Quest) Set Commands are generally used to change values within an editor or control in real time (not to be confused with Set Window commands - below - which control the operation of the Set window).
setcommch n sets the SysEx channel for the editor n - the SysEx channel for the MIDI device
setmin ctl# sets the minimum value of the control ctl# - the ID number assigned to the control
setmax ctl# sets the maximum value of the control ctl# - the ID number assigned to the control
setminmax ctl# sets both the minimum and maximum values for a control at the same time ctl# - the ID number assigned to the control
setname srcctl# dstctl# copies the name and help parameters from one control to another. This command is useful if you have a control that is used to edit various parameters. The settings of hidden controls can be copied on to the visible control.
setval ctl# val sets a control to a particular value] ctl# - the ID of the control to modify val - sets the control to the specified value In order to allow a control to be reprogrammed to edit various parameters, it is necessary to be able to reprogram the optional map stored in each control. The following parameters supply this feature. copymap srcctl# dstctl# The copymap command is identical to the setmap command.
delmapval ctl# val This command is used to remove a value from a control with a map. The command finds the specified control and then searches for the specified value. If the value is found, it is removed from the map. This shrinks the map by one element.
getmapsize ctl# returns the number of entries in the map for the given control is indicated by the ID number. ctl# - the ID number assigned to the control
getmapval ctl# index For the given control (using its ID number) that has a map, the selected map entry is returned ctl# - the ID number assigned to the control index - a zero based reference to an entry in the controls number map
mapfromtable ctl# table# tablepos entries Create a map for a control using data stored in a table. Tables are stored in the instrument's .ini file. In the Patch.ini file for the Patch.sqt editor, add the following to the ini file: [Table 5] 0=10 1=15 2=32 3=7
would be accessed using the following command: mapfromtable 264 5 0 4 This command finds control 264 and creates a 4 element table for it. To fill the table, the ini file is accessed and Table 6 is retrieved. Starting at entry 0 in the table, 4 entries are read and copied into the map.
Create copy the list of files currently listed in the file pane of UniQuest and place that list in the specified control. The specified control must be a StringList control. The control must have sufficient space allocated to store the strings. Strings will only be copied until the control's string space is full. Any additional file names will not be listed.
setmap srcctl# dstctl# copies all map parameters from the source control to the destination control srcctl# - the ID number of the source control dstctl# - the ID number of the destination control
setmapsize ctl# size create a map for a control of the specified size ctl# - the ID number of the control size - the size of the map to create
setmapval ctl# entry val for the chosen control, the entry in the map is assigned to the value ctl# - the ID number of the control entry - the entry in the map to assign a value to (range: 0 to size - 1) val - the value to assign to that map entry
The following commands can be applied to any String List control to allow manipulation of the strings of the control. clrstringlist ctl# clears all entries in a string list control note 1) this command permanently changes the string content in the destination control so it should be correctly initialized on template load ctl# - the ID number of the control
copystringlist srcCtl# dstCtl# Copies the strings in one String List control to another String List control note 1) both controls must be string list controls note 2) this command permanently changes the string content in the destination control so it should be correctly initialized on template load srcCtl# - the ID number of the source String List control dstCtl# - the ID number of the destination String List control
setnumofstr srcCtl# dstCtl# Copies the "number of strings" parameter from one String List control to another. This is useful if the destination control is going to reference the source control's strings in its display. The number of available strings can be copied to the control so that the references are correct. note 1) both controls must be string list controls note 2) this command permanently changes the "number of Strings" parameter in the destination control so it should be correctly initialized on template load srcCtl# - the ID number of the source String List control dstCtl# - the ID number of the destination String List control
setnumstrings ctl# n Sets the "number of strings" parameter to the value "n". This is useful when changing the number of strings assigned to a control. note 1) the selected control must be a String List note 2) this command permanently changes the "number of Strings" parameter in the destination control so it should be correctly initialized on template load ctl# - the ID number of the String List control n - sets the "number of strings" parameter to this value
setstringlistentry ctl# a b c this macro command allows String List text to be stored on disk in .ini files. Midi Quest can then read the entries from the .ini file and copy them into the String List control. this allows you to change the text used by the String List control. The data in the .ini file must be in a specific format. If your editor file is called "Patch.sqt" then the .ini file must be called "Patch.ini" and located in the same folder. Within the .ini file, you can have as many string lists as you wish. The format is as follows: Patch.ini file: [StringList 2] 0=string1 1=string2 2=string3 3=string4
[StringList 11] 0=another string 0 1=another string 1 2=another string 2 3=another string n In the above example there are two string lists that can be read from. ctl# - the ID number of the String List control a - the entry in the String List control to copy the text to b - the StringList number to read from in the ini file eg [StringList a] in the editor's .ini file (eg for Patch.sqt read from the file Patch.ini) c - the entry in the ini file's StringList entry to read from For example, the command "setstringlistentry 25 2 0 3" finds control 26, it finds "StringList 2" in the Patch.ini file. Entry 0 from String List 2 is read which is "string1" and it is written to entry 3 in the String List control.
Set Window Commands (Commands that are sent to the Parent Set Window) These commands allow a patch editor to control the Set in which the patch editor is found. If the editor window is contained within a Bank Window, a DBase Window, a Library window, or stand alone, these commands have no effect. Most of these commands apply to a window in the set. If the command contains an ID parameter. The ID is the ID assigned to the driver for the data in the window grpcmp - executes commands in the Set grpcmd ID cmd where ID = ID number of the element in the Set to apply the command to cmd = the number of the command to apply The following commands are available: 0 = File Save - save the Set (ID ignored) 1 = File Save As - save the Set with a new name (ID ignored) 2 = File Print - print the list of elements in the Set (ID ignored) 3 = File Open - presents a dialog to select a new Set to open (ID ignored) 4 = File New - creates a new Set (ID ignored, UniQuest only) 5 = Transmit the entire Set (ID ignored) 6 = Transmit the Set element specified by the ID 7 = Get the specified element from the MIDI device as specified by the ID 8 = Toggles the display state of the Collection pane in UniQuest 9 = Toggles the display state of the Monitor pane in UniQuest 10 = Toggles the display state of the File List pane in UniQuest
grphide ID - hides the window in the set whose data has the given ID. ID=0 hides the group display. grpicon ID - select the SysEx with the given ID without displaying the editor
grpidlist n m This command allows the editor to query the Set to find out the IDs of all of the components currently loaded in the Set. This is accomplished by writing the ID numbers into the editor's V variables. The "n" parameter holds the number of the first V variable in the sequence of V variables in which to store the data. "m" is the maximum number of IDs that can be written into the V variables. The first V variable stores the number of IDs returned in the V variables. The subsequent entries are the ID numbers. For example a set containing SysEx with IDs 300, 301, 302, and 303 receives the command "grpidlist 200 10". The result would be: V200 = 4 V201 = 300 V202 = 301 V203 = 302 V204 = 303 grpmove ID x y - moves the window with the given ID to position x, y in the Set window grpopen ID - ensures that the window containing the data with the given ID is open grplayout n - places the group window in layout mode (n=1) or manual mode (n=0) In layout mode, Midi Quest maintains the window positions and layout. In manual mode, The patch editor has control over window positions, sizes, and visibility grpselect ID - the equivalent of selecting an item from the Set window list (eg Patch, Patch Bank, or Multi) grpshow ID - shows the window in the set whose data has the given ID. ID=0 shows the group display. grpsize ID w h - sizes the window with the given ID to width w and height h grptoback ID - moves the window containing data with ID to the back of the list of ordered windows grptofront ID - moves the window containing data with ID to the front of the list of ordered windows Bank Window Commands These are commands that can be sent to a Bank Window in a group from an editor. They can only be used in Midi Quest
Queries whether the editor is opened from within a bank where result is stored in the X variable notes: only useful in a Midi Quest series editor
This function returns the ID of the bank host. When the editor is being run in a bank window where the window is split to show the editor on the right hand side, this call returns the ID of the bank that owns the editor
This function sets the state of the Midi Quest Bank Preferences option "Respond to Patch Changes" BankRespondToPatchChanges n where n = 0, 1 (off, on)
This function selects a patch in the parent bank. This function should no longer be used and should be replaced by BankSelId banksel n where n is the patch in the bank to edit
This function selects a patch in a bank specified by its ID number. The patch editor and bank must be located in the same Set. bankselid id n where id = id of the bank to select a patch in n = the patch to select in the bank
Stores the patch into the selected bank at the selected location bankstore id n where id = id of the bank to store the current patch in n = the patch location to store the patch in
If executed from a macro in a Midi Quest series editor where the patch is being edited from within a bank, it returns the V40 variable value assigned to the bank driver. result is stored in the X variable notes: this function is only valid in Midi Quest when the patch is being edited from within a bank, otherwise the result is 0
Sets or clears auto double click mode for a specific bank. When set, a single click behaves as a double click. p1 - ID of the bank in the Set to set Auto Double Click mode p2 - mode for auto double click (0=off, 1=on)
mqbankaudition ID n Auditions patch n in bank in the Set with given driver ID ID - ID# of bank driver n - patch number in bank (0 -> n-1)
mqbankcmd ID cmd Sends a command to a bank in the Set with given driver ID. This command is used to execute Bank menu functions for the bank with the given ID number. The following commands can be executed: 0 = File/Save 1 = File/Save As 2 = File/Print 3 = Bank/Undo 4 = Bank/Copy 5 = Bank/Paste 6 = Bank/Swap 7 = Bank/Select All 8 = Bank/Name Patch 9 = Bank/Settings 10 = Help 11 = Bank/Transmit/Transmit All 12 = Bank/Transmit/Transmit Selected 13 = Bank/Transmit/Transmit Unselected 14 = Bank/Transmit/Select Transmit Patches 15 = Bank/Randomize/Mix 16 = Bank/Randomize/Mix All 17 = Bank/Randomize/Blend 18 = Bank/Randomize/Gen4 19 = Bank/Randomize/Slide
mqbankgetsel ID pch# Returns the select state of the patch n in the bank specified by ID. The Bank must be found in the Set. ID - ID# of the Bank in the Set pch# - the patch in the bank (first patch is designated by 0)
mqbanksetsel ID pch# Selects Patch pch# in the bank specified by ID. The Bank must be found in the Set. ID = ID# of the Bank in the Set pch# - the number of the patch to select in the bank (first patch designated by 0)
mqbanktab ID tabpos Sets the tab position on the tab in the bank with the given driver ID. ID = ID# of the Bank in the set tabpos = the position to select for the bank editor's tab control
mqbankunsel ID pch# Unselects Patch pch# in the bank specified by ID. The bank must be found in the Set. ID = ID# of the Bank in the Set pch# - the number of the patch to select in the bank (first patch designated by 0)
mqeditcmd ID cmd
mqreceivedf ID Receives the datafile specified by the ID
mqsave Saves the current
mqgetcommch Returns the SysEx channel of the MIDI device in X
mqgetmidich Returns the MIDI channel of the MIDI device in X
mqgetpatch Returns the selected patch number in X
mqgetportin Returns the number of the selected MIDI IN port in X
mqgetportout Returns the number of the selected MIDI OUT port in X
mqsetmidich n Sets the MIDI channel of the SysEx editor n = MIDI channel (0 - 15) mqsetpatch n Sets the patch number for the SysEx editor n = patch number
mqsetportin n Sets the MIDI IN port for the editor n = MIDI IN port
mqsetportout n Sets the MIDI OUT port for the editor
mqtransmitdf ID Sends the selected SysEx specified by ID DBaseSort col# UniQuest only This command only execute in UniQuest and sorts the dbase based on the specified column number. The first column is designated column 0.
UniQuest only Id must refer to a String List control which has been filled with an available list of entries from the Collection window using the mapfromdbase command. The selected entry is opened into the editor.
keyassign StringList# StringListElement Key# UniQuest only This command allows assignments to be made to a SysEx file's eight tags using strings stored in a string list. This allows an editor to assign style commands at its discretion. For example, you could make a patches sample a sortable tag by getting the value of the patches sample, reading the equivalent name from an ini file and copying that name into a patch's tag entry. The command "keyassign 25 10 7" would find "StringList 25" in the Patch editor's .ini file, Entry "10" would be read and copied into tag 7 of the patch (each patch has 8 tags (0 -> 7).
mapfromdbase ctl# stringlist# stringlistentry col# UniQuest only Searches the collection for matching entries and writes them into a String List control allowing for selection from within an editor. This allows an editor to list and select patches from the collection. The macro accomplishes this by doing the following. Midi Quest gets the tag to search for in the collection by taking the specified stringlist number and string list entry to read a string from the patch editor's .ini file. This entry is passed to the collection along with a column number (0 - 7). Any entry in that column in the collection that matches the entry in the collection results in that patch name being listed in specified control. ctl# - the control that will receive the list of patch names from the collection stringlist# - the StringList entry in the editor's .ini file stringlistentry - the entry number in the StringList entry of the editor's .ini file col# - the column number in the collection to test for (0 - 7 specifies the column to test, 8 = always (to get full list), any other value tests all columns) For example, "mapfromdbase 163 2 5 3" will go to the editor's .ini file (eg patch.sqt reads from patch.ini) and looks for the block [StringList 2] in the ini file. [StringList 2] 0=text 1 1=text 2 2=text 3 3=text 4 4=text 5 5=piano The result in this example would be "piano". Any patch in the collection where the entry in 3 is "Piano" will be added to the list of entries in the String List control 163. Bundle Macros Change the ID number of SysEx in a bundle from n to m. The two types of data represented by the IDs must be compatible or the result will be crashes and general disaster. n - ID of the datafile in the the bundle m - new ID for that datafile
Add the datafile specified by ID n to the current bundle n - ID of the datafile to add
Initializes the current bundle
Display a file open dialog to select a bundle to load from disk p1 - ID of the String List to use to obtain the default sub folder and sub extension names p2 - entry in the String List (specified by p1), to set the default extension for the bundle p3 - entry in the String List (specified by p2), to set the default subfolder to store the bundle
Display a file save dialog to specify the name to save the current bundle to disk p1 - ID of the String List to use to obtain the default sub folder and sub extension names p2 - entry in the String List (specified by p1), to set the default extension for the bundle p3 - entry in the String List (specified by p2), to set the default subfolder to store the bundle
can only be used by Sound Quest running Midi Quest in debug mode. Allows Midi Quest to break for debug purposes.
adds and additional SysEx buffer receive size which will be accepted instead of triggering a buffer receive size error n - any value between 3 and the buffer size specified by the R command See Korg Kronos Program driver as an example
Buffer Commands Loads the data stored in one of the editors four edit buffers back into the editor overwriting the current data. The editor then executes its initialization process and displays the updated editor. p1 - the number of the buffer to load into the editor (0 - 3)
Loads the data stored in one of the editors four edit buffers back into the editor overwriting the current data. Unlike the BufferLoad command, this command does not initialize the editor. p1 - the number of the buffer to load into the editor (0 - 3)
Saves the SysEx data in the editor to the specified buffer
p1 - the buffer to store the data to (0 - 3)
Swaps the data stored in two buffers specified by p1 and p2
p1 - buffer 1 of the two buffers to swap p2 - buffer 2 of the two buffers to swap
Returns whether data is stored in a specified buffer in the X variable p1 - the buffer to test X - holds the return state of the test (0=unused, 1=used)
setdirty n sets or clears the edited flag for the editor n - 0=clear the edit flag, 1=set the edit flag
Removes any MIDI data queued to be transmitted on the MIDI port used by the editor
Determine whether the instrument module is capable of entering sync mode. This macro will only execute when the editor is running in a Set X - stores the result of the canSync test. (0=can not enter sync mode; 1=can enter sync mod)
Clear the assigned WaitForACK SysEx message. (see SetWaitForACK) Any assigned WaitForACK SysEx message must be cleared before the macro finishes
Clear the currently assigned SysX Filter message (see SetSysXFilter) Any assigned SysX filter message must be cleared before the macro finishes
Create a local file view using specified unit type and extension parameters p1 - unknown
Create a remote file view using specified unit type and extension parameters p1 - unknown
Trigger output from a given control p1 - ID of the control to trigger output for
Is the command to clear the message that represents a "cancel" during data reception from and instrument. See seterrormsg for information on configuring Midi Quest to use an error message.
places the editor in compare mode so you can hear the original patch This is a non-dialog mode and the original data is copied into the patch editor memory.
Ends the compare mode started by the command cmpstart. This is a non-dialog mode and the data stored curing the cmpstart command is copied back into the editor
This command triggers Midi Quest's standard menu compare command. A dialog is displayed in the editor and the original patch is sent to the instrument. Pressing the OK button in the popup dialog message restores the edited patch to the instrument.
Some instruments return an error message to indicate that there is a problem. Using this command, it is possible break out of a loop sequence as the result of a problem in the instrument. To do this, setup the error message using the S command and then assign it as the error message. On each receive command, if the return value is set to -19 then an error message was returned. When setting the error message command, you should always use the clrerrormsg command to clear the message before ending the macro.
Forces the redraw of all currently visible controls
Returns the visibility state of a control in the X variable 1 = control is visible 0 = control not visible
Returns whether the editor is designated as a temporary editor used by the Set to speed up determination of parent/child relationships
Moves the control (ctl#) to the given x and y co-ordinates This command can only be used safely in a macro which is executed by the PostMacro Command
Resizes the control (ctl#) to a given width (w) and height (h) This command can only be used safely in a macro which is executed by the PostMacro Command
This command sets MIDI focus. That is, incoming MIDI controller messages are routed to the specified control.
In a Set Window, opens the editor for the data that has the given driver ID
Opens a URL using the computer's default browser. The URL is stored in the editor's .ini file in a list entry where ListID = the number of the StringList to find the URL in the editor's .ini file entry = the entry in the StringList to read from For example, in the following entry found in the editor's .ini file, the command "OpenURL 5 2" would open a browser and go to Microsoft's main web site. [StringList 5] 2=http://www.microsoft.com
Opens a set in UniQuest replacing the current set in the editor. "n" is the nth entry in the file list pane and specifies the Set file to load. where n = the entry number in UniQuest's file list
n = table number v = the value to read from the table default = a default value if the table or the entry in the table is not found The Table command reads an entry from a table of numbers. Tables are stored in the instrument's .ini file. The .ini file has the same file name as the editor panel except that the file has a .ini extension instead of .sqt and can store as many tables and other forms of data as you wish. The .ini file is a text file and can be created by any text editor program. A Table takes the form: [TABLE n] Size=size of the table - one larger than the maximum value in the left column ( v1=x1 v2=x2 v3=x3 . . To read from a table you specify the table number, the entry in the table to read and specify a default. The result of the table read is stored in the X variable. For example Table 5 3 16 would return 10 in X given the following table. [TABLE 5] Size=6 0=61 2=25 3=10 5=12
note: for Macintosh development, Midi Quest buffers .ini files. To use a newly edited .ini file, it is necessary to quit and restart Midi Quest.
Append a value to a table.
where
n = the identifier of the table to add the value to x = the value to add to the table
Clear the contents of the specified table where n = the identifier of the table to be cleared. The contents of the table is emptied.
Restore the contents of the specified table to its initial state where n = the identifier of the table to be intialized
x, y are currently unused Displays a Windows style popup MessageBox that requests the user to manually dump data from the given instrument. In the future, there are plans to allow developer defined display messages.
ctl# - control id number val - transparency level (0 = none, 255 = maximum transparency) Controls the alpha transparency of a control in a Midi Quest editor. This allows controls to be faded in and out of view Special Trinity Effect processing
The following Macro commands were added in Midi Quest 11 or later ID - ID of the editor to modify mode - adjusts the state of BlockMIDIFlow This command determines whether an editor receives MIDI messages or not as controlled by the mode parameter. By default, MIDI message data is received by the editor. Incrementing BlockMIDIFlow blocks incoming MIDI data. The BlockMIDIFlow command must be called with an equal number of decrements or a reset to restore the flow of MIDI data mode > 0 - increments the state of BlockMIDIFlow mode = 0 - decrements the state of BlockMIDIFlow mode < 0 - resets the state of BlockMIDIFlow to receive MIDI data
Closes all open MIDI IN ports.
Closes all open MIDI OUT ports.
Causes a single click on an entry in a Collection to behave as if it were double clicked. Typically used in UniQuest
n = 0 - overwrite the collection entry of the same name n = 1 - create a new entry Used in UniQuest. Stores the contents of the editor in the Collection
CtlID - ID of the control to delete Deletes a control from the editor
layer - the number of the layer to delete All controls assigned to the specified layer are deleted
stringlist - the number of the stringlist to read the filename from entry - the entry of the stringlist to read [X] - result of the test is stored in the X variable (1 = exists, 0 = doesn't exist) reads the specified entry from the stringlist and uses it as a filename. MQ tests to see if the file exists in the instrument's data folder and stores the result in X
[X] - result is stored in the X variable The ID number of the application that the editor is running in is return in X 1 = Midi Quest 4 = Midi Quest Pro 5 = UniQuest 6 = Midi Quest Essentials
n - the application level variable to return [X] - result is stored in the X variable returns the application level variable specified by n in the X variable contact Sound Quest to ensure you are using a uniquely assigned variable
[X] - result is stored in the X variable returns a unique application variable assignment - safer to contact Sound Quest for an assignement
[X[ - result is stored in the X variable returns whether AutoSense is enabled or not
ID - the ID of the bank as specified in the Instrument Creator [X] - result is stored in the X variable note: only returns a valid value in a Set returns the number of Voices stored in the bank specified by the driver ID. To return a valid value, the function must be called from within a set containing a bank with the designated ID number
n - range: 0 - 255 [X] - the variable contents is stored in the X variable returns the contents of the specified variable stored in the MQBasics class. MQBasics includes 256 SLONG variables which can be accessed by the editor
CtlID - the ID number of the control to query [X] - the result is stored in the X variable the specified control's type number is stored in the variable X. Each control type has an identifying value. This value is stored in X for the control specified by CtlID
CtlID - the ID number of the control to query [X] - the result is stored in the X variable a number of controls have a display offset value including the Numeric control. When requested, this value is returned in X.
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID number of the control to query [X] - the result is stored in the X variable note: only returns a valid value in a Set It functions identically to GetCustomOffset except it is able to query controls in other editors
[X] - result is stored in the X variable returns whether the application is running in demo mode.
[X] - result is stored in the X variable returns the ID of the control currently with focus or 0 if no control has focus.
[X] = result is stored in the X variable returns whether the left mouse button is currently down (X = 0 - false, X = 1 - true)
ID - the ID of the component driver for the editor as specified in the Instrument Creator [X] - result is stored in the X variable note: only returns a valid value in a Set returns the number of bytes allocated for the specified component driver
ID - the ID of the component driver for the editor as specified in the Instrument Creator, must specify a bank [X] - result is stored in the X variable note: only returns a valid value in a Set returns whether the specified bank is currently in local sync mode
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID of the control to query [X] - result is stored in the X variable note: only returns a valid value in a Set returns the maximum value assigned to the specified control
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID of the control to query [X] - result is stored in the X variable note: only returns a valid value in a Set returns the maximum value of the base class of the specified control
ID - the ID of the component driver for the editor as specified in the Instrument Creator, must specify a bank [X] - result is stored in the X variable note: only returns a valid value in a Set returns the current MIDI IN state of the specified editor, for receiving data
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID of the control to query [X] - result is stored in the X variable note: only returns a valid value in a Set returns the minimum value assigned to the specified control
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID of the control to query [X] - result is stored in the X variable note: only returns a valid value in a Set returns the minimum value assigned to the base class of the specified control
[X[ - result is stored in the X variable returns the event type that triggered the editor initialization. Only returns a useful value while editor initialization is taking place
[X[ - result is stored in the X variable returns the number of open MIDI IN ports
[X] - result is stored in the X variable returns the number of open MIDI OUT ports
[X] - result is stored in the X variable returns the OS number of the OS that the editor is being run in packed in a 32-bit value. To extract the values do the following: major OS = (X >> 16) & 255 minor OS = (X >> 8) & 255 bug fix = X & 255
ID - the ID of the component driver for the editor as specified in the Instrument Creator p1 - the parameter to query for [X] - result is stored in the X variable p1 = 0 - PCH# get the value of a parameter from another editor
[X] - result is stored in the X variable get the platform the editor is being run in 0 = Windows 1 = Macintosh
[X] - result is stored in the X variable returns the bank loop step when in receive mode and receiving a bank
[X] - result is stored in the X variable returns the number of bytes received for the data type currently being loaded
[X] - result is stored in the X variable set to 1 when in the first loop of a bank receive cycle otherwise set to 0
[X] - result is stored in the X variable set to 1 when in the last loop of a bank receive cycle otherwise set to 0
[X] - result is stored in the X variable set to 1 when the Set is in receive mode otherwise set to 0
[X] - result is stored in the X variable returns the number of the patch being received
[X] - result is stored in the X variable returns the total number of bytes received in the current receive session
[X] - result is stored in the X variable returns the index of the currently selected editor in the Set
n - the index of the Set variable to return [X] - result is stored in the X variable returns the contents of a Set level variable. There are 256 Set variables which can be accessed by an editor when open in a Set
stringlist - the number of the stringlist to reference in the editor's associated .ini file [X] - result is stored in the X variable returns the size of the specified stringlist as specified by the Size parameter
[X] - result is stored in the X variable returns whether the Set is currently in sync mode
table - the number of the table to reference in the editor's associated .ini file val - the value fine [X] - result is stored in the X variable returns the index of the specified value in the specified table. In other words, specifies where in the table the specified value is found.
table - the number of the table to reference in the editor's associated .ini file [X] - result is stored in the X variable returns the size of the specified table
[X] - result is stored in the X variable returns the current setting of the Preferences "Update Patch On Activate" parameter
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the ID of the control to query [X[ - result is stored in the X variable returns the current value stored in the specified control in the specified editor
n - specifies the view to query (0 = collection, 1 = Monitor, 2 = Set List) [X] - result is stored in the X variable returns whether an editor sidecar view is being displayed or not note: this is a UniQuest only function
ID - the ID of the component driver for the editor as specified in the Instrument Creator [X] - result is stored in the X variable returns the value of the "Voice Size" parameter for a specified driver
ID - the ID of the component driver for the editor as specified in the Instrument Creator force the activation of the specified editor component in a Set
ID - the ID of the component driver for the editor as specified in the Instrument Creator disable the specified editor component in a Set
ID - the ID of the component driver for the editor as specified in the Instrument Creator enable the specified editor component in a Set
ID - the ID of the component driver for the editor as specified in the Instrument Creator [X] - result is stored in the X variable returns whether a component with the specified ID exists in the Set
trigger the Get function for the Set
ImportTemplate stringlist entry xOffset yOffset stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read xOffset - the x pixel location to place the sub-editor yOffset - the y pixel location to place the sub-editor loads a sub-editor into the current editor. The name of the .sqt file to load is specified by the stringlist/entry combination. The sub editor is placed in the current editor at (xOffset, yOffset).
CtlID - ID of the control forces a redraw of the control specified by CtlID
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - ID of the control function is identical to InvalidateCtl except a control in another editor can is specified
x1 y1 x2 y2 - specifies a rectangular area within the editor forces a redraw of all controls within the specified rectangular area
triggers the editor's initialization routine
[X] - result is stored in the X variable returns whether the alt key is depressed
[X] - result is stored in the X variable returns whether the ctl key is depressed
ID - the ID of the component driver for the editor as specified in the Instrument Creator n - entry in a bank editor [X] - result is stored in the X variable returns whether the specified entry in a bank is defined or not
[X] - result is stored in the X variable returns whether the current Set was loaded from a disk file. The return is only valid when executed within a Set window
[X] - result is stored in the X variable returns whether the mouse is positioned over a control
table - the number of the table to reference in the editor's associated .ini file [X] - result is stored in the X variable returns whether the specified value is found withing the specified table
[X] - result is stored in the X variable returns whether a shift key is depressed
[X] - result is stored in the X variable returns whether the Set can enter synchronized mode or not
[X] - result is stored in the X variable returns whether the editor was created in a Set solely for managing parent/child relationships and is never visible
for importing L6T format files
for exporting L6T format files
controls MIDI input into an editor window. If n=0, MIDI is received from all ports. If n=1 MIDI, data is received only from the editor's specified input port.
n (=0 automated tracking of parent/child links; =1 manual tracking of parent/child links) enable/disable manual tracking of parent/child links
layer - number of the layer x - amount to move the layer in the x direction y - amount to move the layer in the y direction moves the controls on a specified layer by a delta x, delta y amount
layer - number of the layer x - x position to move the layer to y - y position to move the layer to moves the controls on a specified layer to the specific location (x, y)
ID - the ID of the component driver for the editor as specified in the Instrument Creator Ensure that the editor template for the data specified by ID is open in the Set. Editors are not normally loaded until the first time a view of the data is selected
MacroEx ID n var1 val1 var2 val2 retvar ID - the ID of the component driver for the editor as specified in the Instrument Creator n - the global macro of the specified editor to execute var1 - specify a VVar in the external editor to set to a specific value val1 - the value to assign to var1 var2 - specify a VVar in the external editor to set to a specific value val2 - the value to assign to var2 retvar - the VVar to receive the return value after executing the remote macro This function is used to execute a global macro in another editor and pass up to two parameter values to the other editor to be used while the macro is being executed.
MacroOnCommand ID cmd dstID macro prepost ID - the ID of the component driver for the editor as specified in the Instrument Creator cmd - the command value assigned to the specific menu item (obtain from Sound Quest) dstID - the ID of the component editor where the global macro to execute is found macro - the global macro to execute prepost - = 0 to execute the macro before MQ executes the code for the selected menu item = 1 to execute the macro after MQ executes the code for the selected menu item This function allows a macro to be executed when the user selects a menu command in MQ. The macro can be executed either before or after the code associated with the menu item is executed.
n = 0: Midi Quest manages MIDI errors and displays messages (default) n = 1: the editor manages MIDI errors. errors are stored in V10 This function allows an editor to handle MIDI errors rather than allowing the main application to do so. When the option is enabled, standard error messages are not displayed. Instead the error is stored in V10 after execution and the editor proceeds normally.
p1 - the value to apply the mask and shift to p2 - the mask and shift to apply [X] - result is stored in the X variable This function allows data that is bit packed to be extracted and bit shifted for editing. p2 represents the mask for the data (in decimal). The data will be shifted based on the first bit that is switched on
p1 - the new value to be inserted into p3 p2 - the mask and shift to apply (to p1) p3 - the value to perform the operation on (contains the current value bytes in memory) [X] - result is stored in the X variable This function begins by clearing the area specified by the mask from p3, then shifts p1 by the amount specified by the mask then finally ORs the contents of p1 and p3 together. The result is stored in X. WARNING! Occasionally developers get the intent of p1 and p3 reversed. Remember, the operation is being performed on the p3 value!
ID - the ID of the component driver for the editor as specified in the Instrument Creator p1 - 0 = PCH# [X] - result is stored in the X variable returns the maximum value of the specified parameter for the specified editor
MessageBoxExt stringlist entry stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read Displays a MessageBox using entries from the editor's ini file. In total, the editor uses 8 sequential entries from the string list starting with the one specified in "entry". entry 1 = Window title entry 2 = message string 1 entry 3 = message string 2 entry 4 = message string 3 entry 5 = text for button 1 entry 6 = text for button 2 entry 7 = text for button 3 entry 8 = text for button 4
[X] - result is stored in the X variable returns whether data is currently being sent on the MIDI OUT port assigned to the editor
n - get the state of the specified one shot switch There are 1024 one shot switches numbered 0 - 1023. Each of these switches can only be triggered once.
Open the MIDI IN Port select dialog
Open the MIDI OUT Port select dialog
Opens MIDI IN ports
Opens MIDI OUT ports
Opens the Serial number entry dialog in UniQuest only
ParentChildStringAssign BankID EditorID CtlID BankID - ID of the bank whose parent child information is to be rerouted EditorID - the ID of the editor to receive the bank's parent/child information CtlID - the control in the editor designated to display the bank's parent child information Typically, the parent/child information for a bank is displayed on the lower status bar. This option allows the information to be routed for display in an editor instead. As an example, this feature is used in the Kronos editor.
ID - the ID of the component driver for the editor as specified in the Instrument Creator Forces the data in the specified editor to be initialized
ID - the ID of the component driver for the editor as specified in the Instrument Creator Forces the data in the specified editor to be initialized. If the ID references a bank, then n is used to specify the entry in the bank to initialize.
n - the RGB color (in decimal) to use when drawing text in a pop-up status window
n - the RGB color (in decimal) to use when filling the background of a text pop-us status window
ID - the ID of the component driver for the editor as specified in the Instrument Creator n - the global macro to execute The functions Macro and MacroEx execute a macro immeditately. the PostMacro function delays execution of the macro until all other program related message in the editor's message queue have been processed.
n - the specified local variable (n can accept the range 0 - 255) There are 256 local variables whose scope is that of the current macro. This function puts the contents of one of these variables into the variable W.
n - the specified local variable (n can accept the range 0 - 255) There are 256 local variables whose scope is that of the current macro. This function puts the contents of one of these variables into the variable X.
n - the specified local variable (n can accept the range 0 - 255) There are 256 local variables whose scope is that of the current macro. This function puts the contents of one of these variables into the variable Y.
n - the specified local variable (n can accept the range 0 - 255) There are 256 local variables whose scope is that of the current macro. This function puts the contents of one of these variables into the variable Z.
Query the user whether to synchronize data between the editor and instrument
Force the application to quit
n - the app level variable to store val in val - the value to store in the specified app level variable Use this function with extreme caution as all editors have access to this are and need to ensure that they are each using unique variables
CtlID - ID of the control to change the number of steps - must be an Array control n - the new number of steps to display
n - state of the Preferences AutoSense parameter Allows the editor to set the state of the AutoSense setting in Preferences.
ID - the ID of the component driver for the editor as specified in the Instrument Creator n - the number of voices to display in the bank editor Allows the number of voices displayed in a bank editor to be altered
n - specify a Basics level variable (range: 0 - 256) val - set the value of that variable assigned the Basics variable n It is probably better to use the Set level variables
CtlID - the Id of the control to modify n - the font the control is to use to display with Sets the bitmap font used by the specified control
SetCtlColors CtlID p1 p2 p3 p4 CtlID - the Id of the control to modify p1 - text color unedited ( 0 -15 ) p2 - back color unedited ( 0 -15 ) p3 - text color edited ( 0 -15 ) p4 - back color edited ( 0 -15 ) Sets the basic colors (by index) used by an edit control displaying text
CtlID - the Id of the control to modify state - 0 = disabled, 1 = enabled Sets the enable or disable state of a control
CtlID - the Id of the control to modify state - 0 = disabled, 1 = enabled Set the state of the step click parameter for the specified control (those controls which support it)
CtlID - the Id of the control to modify val - the display offset Set the display offset parameter for the specified control (for those controls which supsport it)
ID - the ID of the component driver for the editor as specified in the Instrument Creator Sets the default Bank to store to when "Store To" command is executed
n - the patch number to store to by default Sets the default patch number to store to when "Store To" command is executed
SetDefaultFolderPath stringlist entry stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read Sets a folder to append to the existing default folder path for the instrument. The folder name is stored as an entry in a stringlist.
n - index of the default MIDI OUT port Sets the default MIDI OUT port for Preferences
n - index of the default MIDI IN port Sets the default MIDI IN port for Preferences
n - the default MIDI channel (range: 0 - 15) Sets the default MIDI channel in Preferences
mode - 0=auto, 1=manual Sets whether the dirty state is handled manually or automatically for the editor
ID - the ID of the component driver for the editor as specified in the Instrument Creator n - the filesize for the specified data Sets the filesize for the specified data
layer - the layer to assign the control to use when new controls are created through copy/paste or duplicate, if this parameter is set then the new controls use the specified layer. Otherwise they retain the layer number of the source control
ID - the ID of the component driver for the editor as specified in the Instrument Creator newLinkID - the new LinkID for the specified component allows the LinkID of a particular data type to be changed.
n - the local variable number (0 - 255) val - the new value for the variable Sets the local variable n to the value "val"
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the Id of the control to specify For Sets which are displayed in manual mode and do not have a select list on the left has side, this command Informs the Set which control is being used to manage the display of the various editor elements.
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the Id of the control to modify val - the new maximum value for the control Sets a new maximum value for the specified control. This function is identical to the SetMax command but allows controls in other editors to be modified.
CtlID - the Id of the control to modify val - the new maximum value for the control Sets a new maximum value for the specified control. This function is almost identical to the SetMax command but sets the raw value in the base class instead of being potentially modified.
state - 0=off, 1=on Sets the state of the "MIDI OUT Open All" option found in the MIDI OUT Ports dialog
CtlID - the Id of the control to modify n - the new value for the MIDI Note Offset parameter Sets the value of the MIDI Note Offset parameter found in the Numeric and StringList controls. The macro has no effect on other controls.
state - 0=off, 1=on Sets the state of the Force Exit parameter for MIDI OUT ports. When set, MIDI OUT threads can be forced to shut down even when attempting to transmit SysEx data.
state - 0=off, 1=on Sets the state of the "MIDI IN Open All" option found in the MIDI IN Ports dialog
n - the MIDI Thru mode Sets the state of the Preferences MIDI Thru functionality
state - 0=off, 1=on Sets the state of the Preferences MIDI Thru Real Time parameter
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the Id of the control to modify val - the new minimum value for the control Sets a new minimum value for the specified control. This function is identical to the SetMin command but allows controls in other editors to be modified.
CtlID - the Id of the control to modify val - the new minimum value for the control Sets a new minimum value for the specified control. This function is almost identical to the SetMin command but sets the raw value in the base class instead of being potentially modified.
layer - the layer to make modal (layer=0 turns modal layer mode off, any other value enables modal layer mode) This function enables or clears modal operation for the editor. For a non-zero value, only controls on the specified layer are capable of accepting and responding to input. This function can be called multiple times to make a number of layers modal at the same time. Calling this macro with a layer of 0 restores the editor to normal operation
ID - the ID of the component driver for the editor as specified in the Instrument Creator entry - the voice in a bank to be set "not defined" (range: 0 -> number of voices - 1) Set a voice in a bank as "undefined" which means it must be defined by loading data into it before it can be transmitted or edited. note: To execute, ID must specify a bank
SetParentChildString srcID entry CtlID srcID - the ID of the bank providing the parent/child information entry - the entry in the bank to get the parent/child information for CtlID - the Id of the control to store the parent/child information in This command requests a parent/child string from a bank and displays the information in a control in the editors
state - 0=off, 1=on Enable or disable the generation of real time MIDI messages for the plug-in using state information provided by the host
n - number of times Sets the number of times Midi Quest attempts to request SysEx data when it times out due to failed response
UniQuest only function
var - the Set variable to assign val to (range: 0 - 255) val - the value to assign Assigns a value to a set level variable
SetStringListDisableTable CtlID table CtlID - the ID of the control to be modified table - the table to be used to disable items in the string list This command modifies the Disable Table parameter of String List controls
ID - the ID of the component driver for the editor as specified in the Instrument Creator Sets the sync mode for the specified data
mode - 0=disable synchronization in the software,1=enable synchronization in the software Sets the Synchronization option in Preferences in UniQuest. The synchronization feature is not available to all instrument modules. However, for those that support it, this option must be enabled for it to be active. This command is only active in UniQuest
ID - the ID of the component driver for the editor as specified in the Instrument Creator state - 0=not synchronized, 1=synchronized The specified data in the Set is marked as being synchronized or not synchronized based one the assigned state
Store the MIDI string currently assigned by the S command as a SysEx filter. When a filter is active, only SysEx messages matching the specified filter will be allowed through. A value of FF in the string will match any value and should be used in bytes which hold a channel. For example: S 4 { F0 41 FF 10 } SetSysXFilter in the Receive macro of a driver will pass any SysEx message with 0x41 as the 2nd byte (Roland), any value for the 3rd byte, and 10 for the 4th byte. note 1: The macro ClrSysXFilter must be executed before the end of the macro or Midi Quest will be prone to crash note 2: This macro is only functionally useful in the Receive macro of a driver
SetText CtlID stringlist entry CtlID - the control whose text is to be changed stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read Text is read from the specified string list entry and written into the control specified by CtlID. This function can be applied to a display control such as a label or to an edit control in which case the text will be interpreted and stored as data.
SetUpdatePatchOnActivate state state - the new mode of the Update Patch On Activate parameter Sets the mode of the Update Patch on Activate parameter in Preferences.
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the control whose value is to be changed val - the new value for the control
CtlID - the control whose value is to be changed val - new value for the control Sets the specified control to the new value and a parameter update message is sent even if the value has not changed
ID - the ID of the component driver for the editor as specified in the Instrument Creator CtlID - the control whose value is to be changed val - new value for the control Sets the specified control to the new value and a parameter update message is sent even if the value has not changed. The control can be in any editor in the Set.
CtlID - the control whose value is to be changed val - new value for the control Sets the specified control to the new value using the base class. If the value of the control changes, a parameter update message is transmitted.
ID - the ID of the component driver for the editor as specified in the Instrument Creator n - the new VoiceSize parameter Sets the new VoiceSize parameter for the specified data
Assigns the data in the current buffer as assigned by the S command as the ACK message. In this case, when transmitting SysEx data to an instrument, the editor will wait until it receives the specified ACK message before proceeding with the next macro command. This macro must only be called from the Transmit or Audition macros. It will not behave as expected in a Receive macro. ClrWaitForAck must be called before the end of the macro
n - the category index to display CtlID - the control to store the selected key into This command shows a single menu of popup keys from the keys.ini file. Instead of a multi-level menu, only a single level is displayed based on the specified index n. The result of the selection is stored in the control specified by CtlID.
state - 0=not visible, 1=visible Set the Preferences parameter to show or hide the transmit window while transferring SysX bulk dumps to an instrument
Stops the transmission of SysEx data from a bank that uses the Bank Loop transfer
CtlID - the control whose pop-up is to be displayed. This command immediately displayed the pop-up for a specified control. The CtlID must specify a String List control.
Outputs the synchronization state of a Set to the Monitor window
[X] - result is stored in the X variable returns the number of bytes in the currently loaded SYX file
element - a syx file can contain a series of SysEx messages. The element allows a specific message to be referenced [X[ - result is stored in the X variable returns the length of the specified SysEx message
element - the element of a ofs - offset into the [X] - result is stored in X returns the value stored at offset ofs of the specified element of the SyX file
Deletes the currently loaded SYX file.
stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read This command uses a stringlist reference in the editor's ini file to obtain the name of a SYX file and load it.
returns the size of the SYX file
transmits the specified SysEx element on the MIDI port used by the editor
view - 0=monitor, 1=collection, 2=Set list UniQuest only. Toggles the view state of sidecar windows
stringlist - the number of the stringlist to reference in the editor's associated .ini file entry - the entry in the stringlist to read Load and transmits a .SYX file using the MIDI OUT port assigned to the editor. The file to load is specified using a stringlist entry int he editor's associated .ini file.
UniQuest specific function to trigger AutoSense
UniQuest specific question function to reference the ID map
UniQuest specific function to request version information
UniQuest specific function to open the update dialog
UniQuest specific function to open the update url
When called from an editor currently displayed in a Set, all bank parent/child display associations are calculated.
The following Macro commands were added in Midi Quest 13 or later CtlToTag copies the current text of the control specified by "CtlID" into one of the editor's eight tags (referenced as 0 - 7). The tag length is limited to 15 characters so if referenced text is longer, it will be truncated.
GetIDForNRPN takes an NRPN as input and returns the ID of the control that responds to the value. If no match is found, the return value is 0. The supplied NRPN value contains both the MSB and LSB values packed together with the MSB shifted up 7 bits. (In other words, Midi Quest uses the following algorithm to unpack the values: NRPN_LSB = NRPN & 0x7F, NRPN_MSB = (NRPN >> 7) & 0x7f
GetIDForType takes a type of data as input and returns the driver ID for that type of data as stored within the Set. The type of data is specified as the "Icon" parameter within the driver definition and is found in the lower right corner of "Options, IDs, and Paths" section of the driver and also serves as a SysEx type descriptor.
The following chart lists the available SysEx descriptors:
0 = not assigned 1 = patch 2 = patch bank 3 = multi 4 = multi bank 5 = global 6 = global bank 7 = midi 8 = midi bank 9 = pct (patch change table) 10 = pct bank 11 = effect 12 = effect bank 13 = sequence 14 = sequence bank 15 = drums 16 = drum bank 17 = chord 18 = chord bank 19 = sample 20 = sample bank 21 = eq 22 = eq bank 23 = micro tune 24 = micro tune bank 25 = fractional scaling 26 = fractional scaling bank 27 = patch bay patch 28 = patch bay bank 29 = all 30 = misc
This function is extremely useful for editors which are included in more than one instrument. It is used to find associated editors so they can be referenced. For example, if an editor needs to get a value from the global editor but the global editor may actually change depending on the instrument module that the editor is found in, this command can be used to find the ID of the editor so it can be accessed. To obtain the Driver ID of the global data of a Set us the command GetIDForType 5. (note that "5" is the Global data type). The command will return the ID
If the ID is requested for a type of data that is not found in the Set, the return is 0.
If the ID is requested for a type of data that has multiple entries in the set (for example, there might be multiple patch banks), the ID of the first entry in the Set that matches the requested type is returned.
note: GetIDForType of a Set level function and only works when executed in an editor open within a Set. If the function is called outside a set, it will always return the value 0.
PatchEditorBankID returns the ID number of the bank that the current patch is being edited from.
When a patch is edited from a bank, Midi Quest tracks the source bank. This function will return the driver ID of that bank.
This is a Set only function. Calling this function from an editor not contained within a Set will always return 0.
This is a UniQuest only function and has no effect on Midi Quest.
copies the popup parameters from the source control to the destination control srcctl# - the ID of the source control dstctl# - the ID of the destination control
sets the popup style of a given control. ctl# - the ID of the control to modify val - sets the popup style
SetPopOffset sets the Popup Offset value for any control which supports Popup Parameters.
To set the Popup offset parameter of a control from a macro, set "CtlID" to the ID of the control to change and "n" to value to use as a display offset.
The display offset is more frequently required by controls which have an internal range of "0" to some other value (eg 127). However, the user display range is different (eg -64 to 63). A Popup Offset of -64 will ensure that the value displayed is what the user is expecting to see.
Popup parameters are supported in a range of controls including: Knob, Numeric, Level, and Graphic Slider
note 1: if CtlID specifies a control which doesn't support Popup parameters, the command is ignored. note 2: remember that is not possible to set a negative default value in SQML. To assign a negative value, set a variable to 0, subtract the value from the variable then submit that variable as "n" in the command
SetPopID allows a control's PopupID parameter to be changed under macro control
CtlID is the ID of the control to modify n is the new value for the control's PopupID parameter.
Popup parameters are supported in a range of controls including: Knob, Numeric, Level, and Graphic Slider
note: if CtlID specifies a control which doesn't support Popup parameters, the command is ignored.
Sets the Offset parameter of a String List control to the value n
where
CtlID is the ID of the control to modify n is the new value to assign to the String List control's Offset parameter
note: if CtlID does not specify a String List control, the command is ignored
Here are a number of macro examples drawn directly from existing Sound Quest Drivers, with explanations: M1 Combination Bank Receive Macro
M1 Combination Bank Audition Macro
FB01 Patch Bank Transmit Macro NOTE: Each Patch has its own Check sum which must be recalculated.
Available in:
|