Windows Interface: Chroma Server – Windows Component for Chroma/Computer Communication
By Mark David [21030170+]v0.03, January 14, 2001
Overview
ChromaServer is a component for facilitating communication between a Microsoft Windows client program and the Rhodes Chroma synthesizer. Its implementation is dependant upon and specific to an interface circuit designed to connect via the computer serial port. For more on this circuit and the entire project, see A Windows Interface for the Rhodes Chroma.
ChromaServer's interface logically resembles the programming interface of the Chroma (see the Chroma Computer Interface manual for more detail; this document presumes some familiarity with this interface). For the programmer using this component, it removes the need to pay attention to lower level functions including:
- Handling of the serial communications between the computer and the Chroma(s)
- Construction of command byte sequences to the Chroma(s), and parsing of command byte sequences from the Chroma(s)
- Creation and maintenance, insofar as is possible, of an object structure with properties which represent the current state of the Chroma(s)
- Recording and playback of Chroma performances
The third objective is somewhat problematic due to a number of limitations of both the Chroma programming interface and the circuit interface as currently designed. The circuit is designed to allow multiple Chromas to be transmitted to, but only one (at address 0) to be received from. Thus, only this, the first Chroma (ChromaController.Chromas(1)) can tell the computer anything about its state. Any other Chromas become essentially write-only devices. ChromaServer maintains nearly complete information about the programs, panel settings and instruments for the readable Chroma, but the other Chroma machines' states will only match their corresponding objects' states if these are explicitly set by an application and written to the Chroma machines. Additionally, and somewhat surprisingly, the Panel/Performance On/Off commands are not transmitted by the Chroma when the corresponding Set Split 16-19 functions are executed. Thus, the Chroma object properties will be out of synch with the actual Chroma machine settings for these switches if they are set manually on the machine.
The fourth objective, recording and playback, is only minimally supported at present. As higher levels of the application are implemented which make use of these capabilities, it is likely that the ChromaServer interface supporting these functions will improve. I anticipate creating very robust facilities for creating, editing, and merging ("overdubbing") performances.
The cassette storage interface commands and the Peek/Poke commands are not supported by ChromaServer.
ChromaServer is delivered in three files:
- ChromaServer.zip – this is the install for the component itself, which can be used like any other component in the Microsoft Visual Studio environment. To install it, unzip the files and run setup.exe
- ChromaServer.doc – this document, containing the component interface documentation
- ChromaServerSource.zip – a zip file containing all the source code for the ChromaServer project
Revision History
Version 0.04
- Exposed the PackedStringToProgram and ProgramToPackedString methods of the ChromaController class.
- Corrected the documentation for Programs() property. This property is read/write (not read only). Setting this property writes a copy of the supplied Program to the Chroma, but does not update the supplied Program itself, which will continue to have an Index of –1.
Version 0.03
- Added ChromasCount() property to ChromaController object
- Fixed bug in Disconnect method of ChromaController object that caused an error when called prior to calling Connect method.
- Added LinkTypes and TransposeTypes enumerations.
- Fixed bug in the WriteParameter method of Parameter that prevented parameters higher than 50 from being written, and tried to write parameters 1-50 even if the Program was a copy.
- Fixed bug in the Class_Initialize routine of the Program object. Newly created Programs should have an Index property of –1, and now do.
- Fixed bug in Parameter 13 (Envelope 1A Amplitude Touch) - was writing to the wrong byte in the 60-byte Program format.
- Fixed bugs in Parameters 47, 49, 97 and 99 (Volume A&B, Mod 1&2 Depth) – max value now correctly set to 15.
- Finished the documentation for the Undefine method
- Added a TearDown method for the ChromaController object, to remove unwanted object references when a ChromaController is no longer needed by the client.
- Changed the initialized Value to valid, non-zero values for several PanelSetting instances as follows: Edit Mode (2 – Edit A), Edit Parameter (1), Link Program(1) and Sequence Program(1).
- Modified the Address Chromas processing to use the serial port RTS line to load in the address map for the chromas, correcting a design error in the initial circuit design.
Object Model
The object model begins at the top with the ChromaController class. This object logically represents the interface circuit itself, more or less, and manages the connection of the Chroma(s) to the computer and the communication back and forth. Under this class is the Chromas collection, containing objects of the Chroma class, each of which represents an individual synthesizer and its state. Chroma class objects are not publicly creatable – the Connect method of the ChromaController object detects how many Chromas are attached and creates the Chromas collection accordingly.
The Chroma class has a "collection" (actually an array) called Programs, which contains objects of the Program class and represents the programs 0-50 on the Chroma. The Program class is creatable, but the Index property (which represents the program number) is always –1 unless it is part of the Chromas().Programs() collection (i.e., it is physically stored on the Chroma). Using the Set property as in the following example:
Set myProgram = New Program ‘ Set some program parameters Set myChromaController.Chromas(1).Programs(23) = myProgram
produces results which may not be what you would expect. The Set Method actually first copies myProgram, and then writes the copy to the Chroma. Thus, after executing the above code myChromaController.Chromas(1).Programs(23).Index will be 23, while myProgram.Index will remain –1. To get myProgram to refer to the same Program instance that's in the Chroma (and thus have subsequent Parameter changes made to the Chroma), you must also execute the following:
Set myProgram = myChromaController.Chromas(1).Programs(23)
The Program Class also contains a useful method, CopyMe, which returns a new instance of the Program class, identical to the called Program except with an Index of –1.
The Program class has 2 "collections" (actually arrays) called Parameters and PanelSettings, which contain objects of the classes Parameter and PanelSetting respectively. Parameters(0) through Parameters(5) contain the state of the Chroma-wide parameters, Parameters(6)-Parameters(50) the A parameter values, and Parameters(56-100) the B parameter values. Whereas Parameters are writeable from the computer, PanelSettings are not, as the Chroma interface provides no command for doing so. There are nine of these, and they are detailed in the following sections.
The Chroma class also contains another "collection" (actually an array) called Instruments. Instruments(0-7) contain objects of the Instrument class which represent the 8 controllable instruments of the Chroma. Each instrument has a property, Program, which returns a Program class object that is a copy of the Program assigned to this instrument by the Define method. Calls to the SetParameter method of the Instrument will change the parameters of the copy of the Program, but not the original program parameters, just as documented in the Chroma command interface.
Finally, there is a new, top-level class called Performance. This class is designed to facilitate the manipulation of recorded streams of events generated by the Chroma. The Performance class contains a collection of PerformanceEvents, each of which represents a single, time-stamped command from the Chroma.
Classes
This section documents each class exposed by the component, in alphabetical order.
Note that not all of the classes are creatable; in particular, Chroma, Instrument, Parameter and PanelSetting. This is highlighted below. All creatable classes are, however, multi-use; i.e., as many instances of the class can be created as needed.
Chroma
Overview:
This class represents a single Chroma machine. Each of the members of the Chromas collection of the ChromaController class is an object of the Chroma class. Commands may be transmitted by the computer to every Chroma, although not all Chromas will be able to transmit commands back. Note: in fact, in the circuit design, only one Chroma at address 0 is able to transmit commands. This server is currently hardwired to assume that only the Chroma with the lowest address is able to transmit to the computer.
Creatable:
No
Properties:
- Address
- ChromaController
- Index
- Instruments
- PanelSwitch
- PerformanceSwitch
- Programs
- SendTo
- SendsToComputer
- SoftwareRevisionLevel
Methods:
Events:
None
ChromaController
Overview:
This is the primary object class for the component, and in most applications will be the first one created. Immediately after creation, the Connect method will usually be used to establish the communications channel between the computer and the connected Chroma(s). This is the only class in the component which raises events.
Creatable:
Yes
Properties:
Methods:
- Attack
- Connect
- ErrMessage
- PackedStringToProgram
- ParseRecording
- Playback
- ProgramToPackedString
- Release
- SendToChroma
- TapPanel
- TearDown
- UnsendToChroma
Events:
- Attack
- Define
- Footswitch1
- Footswitch2
- Identification
- Information
- Lever1
- Lever2
- NoOperation
- Pedal1
- Pedal2
- ReadProgram
- ReadParameter
- RecordedBlock
- Release
- SetParameter
- Status
- Undefine
- Volume
Instrument
Overview:
This class represents the 8 independently available instruments which may be played simultaneously on the Chroma by an interfaced computer. Of particular note in the Instrument class is the Program property, which (while the instrument is defined) contains a copy of the Program object which determines the sound of the instrument. Calls to the SetParameter method modify the values of this copy of the Program, not the values in the original Program.
Creatable:
No
Properties:
Methods:
Events:
None
PanelSetting
Overview:
Objects of this class represent one of the 9 Panel Settings which can be read from/written to a Chroma Program. These are as follows, where the number is the Index property of PanelSetting:
- Edit Mode
- Edit Parameter
- Link Balance
- Link Type
- Link Program
- Keyboard Split
- Main Transpose Type
- Link Transpose Type
- Sequence Program Number
Creatable:
No
Properties:
Methods:
None
Events:
None
Parameter
Overview:
Objects of this class represent one of the parameters in a Chroma Program. The Index Property contains the number of the Paramater, where 0-5 represent the Program-wide parameters, 6-50 the A parameters and 56-100 the B parameters.
Creatable:
No
Properties:
Methods:
Events:
None
Performance
Overview:
This class represents a real-time performance, which may be transmitted back to the Chroma(s) with the Playback command. Primarily, it is a collection of PerformanceEvents.
Creatable:
Yes
Properties:
Methods:
Events:
None
PerformanceEvent
Overview:
Each instance of this class represents a single event in a Performance. A PerformanceEvent consists primarily of a string which contains the byte command to be transmitted to the Chroma, and a timestamp which represents the number of seconds from the beginning of the performance at which the event occurs.
Creatable:
Yes
Properties:
Methods:
None
Events:
None
Program
Overview:
Each instance of this class represents a complete Chroma program. The PanelSettings and Parameters collections contain the settings for the Program.
The Program class is publicly creatable, to facilitate the creation and editing of Programs without storing them directly in the Chroma machine. Programs which are stored in the Chroma will have an Index property of 0-50, representing its Program number there; otherwise Index will be –1. A non-stored program can become a stored Program by using the Programs Set property as follows:
Set myChromaController.Chromas(1).Programs(23) = newProgram
After which, the Program referred to by newProgram will have an Index of 23, and will also be referred to by myChromaController.Chromas(1).Programs(23). The Program Class also contains a useful method, CopyMe, which returns a new instance of the Program class, identical to the called Program except with an Index of –1.
Creatable:
Yes
Properties:
Methods:
Events:
None
Properties
Address
- Property of: Chroma
- Access: Read only
- Type: Long
This property returns the circuit address (0-3) of the Chroma. It is primarily of interest internally to the ChromaServer component.
ByteNum
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: Long
This property returns the byte number (0 based) that contains the value for this Parameter or Panel Setting in the 59-byte format used by the Chroma in the ReadProgram and WriteProgram commands. It is primarily of interest internally to the ChromaServer component.
ByteMSBit
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: Long
This property returns the number of the most significant bit (7-0) that contains the value for this Parameter or Panel Setting in the byte specified by ByteNum for the 59-byte format used by the Chroma in the ReadProgram and WriteProgram commands. It is primarily of interest internally to the ChromaServer component.
ByteNumBits
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: Long
This property returns the number of bits used by Parameter or Panel Setting in the 59-byte format used by the Chroma in the ReadProgram and WriteProgram commands. It is primarily of interest internally to the ChromaServer component.
Channels
- Property of: Instrument
- Access: Read only
- Type: Long
This property returns the number of (up to 16) Chroma channels currently being used by the Instrument.
ChromaController
- Property of: Chroma
- Access: Read only
- Type: ChromaController
This property returns a reference to the ChromaController object whose Chromas collection contains this Chroma.
Chroma
- Property of: Program, Instrument
- Access: Read only
- Type: Chroma
This property returns a reference to the Chroma object whose Instruments or Programs collection contains this Instrument or Program
Chromas()
- Property of: ChromaController
- Access: Read only
- Type: Chroma
This property returns one of the ChromaController's Chroma objects. The Connect The index order of the Chromas is the same as their addresses on the interface circuit (see A Windows Interface for the Rhodes Chroma), but is 1-based instead of 0-based; i.e.; the first Chroma has a circuit address of 0 but is accessed in code as:
MyChromaController.Chromas(1)
ChromasCount()
- Property of: ChromaController
- Access: Read only
- Type: Long
This property returns the number of Chroma objects in the Chromas() property of the ChromaController, and hence the highest valid index for that property.
CommPort
- Property of: ChromaController
- Access: Read only
- Type: Long
This property returns the number of the serial port on the computer (Comm1, Comm2, etc.) that the interface circuit is connected to. The port number is an argument to the Connect method, which sets this read-only property. CommPort is 0 if the ChromaController has not been connected.
Defined
- Property of: Instrument
- Access: Read only
- Type: Boolean
This property is True if the instrument has been defined, False otherwise. See the Define and Undefine methods to control the state of this property.
DisplayNumber
- Property of: Program
- Access: Read only
- Type: Long
This property returns the number that is displayed on the Chroma LED display when the program is the selected program there. For the most part, this is the same as the Index property, except for these important cases:
- If this is Program 0, then the program is actually a (possibly modified) copy of some other program in the Chroma. The DisplayNumber is the original program number.
- If this Program is a created or copied instance of a Program, and is not actually stored in the Chroma memory, it will have an index of –1 and a DisplayNumber the same as the Program it was copied from (if any).
DisplayNumber may not be written to directly. The CopyMe method returns a Program with the same DisplayNumber as the copied-from Program. Assigning an instance of a Program to a member of the Programs collection as in this example:
Set myChromaController.Chromas(1).Programs(23) = newProgram
Will set the DisplayNumber property to the assigned-to Program Index (in this case, 23).
EventString
- Property of: PerformanceEvent
- Access: Read/Write
- Type: String
This property sets and returns the string of bytes to be sent to the Chroma upon Playback of the Performance to which this PerformanceEvent belongs. It may be set to any string - it is not validated to be a valid Chroma command.
EventTimestamp
- Property of: PerformanceEvent
- Access: Read/Write
- Type: Single
This property sets and returns the timing of this PerformanceEvent, in terms of number of seconds after the start of the Performance to which it belongs. It may be set to any Single value – it is not validated in any way. The handling of out-of-sequence EventTimestamp values is detailed in the Playback method.
Footswitch1
- Property of: Instrument
- Access: Read/Write
- Type: Boolean
This property sets and returns the state of Footswitch 1 (physically, the right Footswitch) for the Instrument. True is down, False up.
Footswitch2
- Property of: Instrument
- Access: Read/Write
- Type: Boolean
This property sets and returns the state of Footswitch 2 (physically, the left Footswitch) for the Instrument. True is down, False up.
ID
- Property of: PerformanceEvent
- Access: Read only
- Type: String
This property returns a unique string index to the PerformanceEvent in the PerformanceEvents collection of the Performance. As Performances are edited, the sequential member index of a particular PerformanceEvent may change. The ID property, however, will remain constant and unique. Thus, after the following sequence:
MyPerformance.AddPerformanceEvent("abc",0.1) MyPerformance.AddPerformanceEvent("def",0.5) MyPerformance.AddPerformanceEvent("xyz",0.6)
MyPerformance.PerformanceEvents(2).EventString will yield "def", as will MyPerformance.PerformanceEvents("2").EventString. However, after
MyPerformance.RemovePerformanceEvent("1")
MyPerformance.PerformanceEvents(2).EventString will return "xyz", but MyPerformance.PerformanceEvents("2").EventString will still return "def".
Index
- Property of: Chroma, Program, Parameter, PanelSetting, Instrument
- Access: Read only
- Type: Long
This property returns the member index in the collection to which the object belongs, as follows:
- ChromaController.Chromas(x).Index = x
- Chroma.Programs(x).Index = x (see Note)
- Program.Parameters(x).Index = x
- Program.PanelSettings(x).Index = x
- Chroma.Instruments(x).Index = x
Note: for Program objects, the Index property is only set when the object is in fact a member of a Chroma.Programs collection. Programs may be created and exist separately from this collection, however, in which case their Index value is –1.
Instruments()
- Property of: Chroma
- Access: Read only
- Type: Instrument
This property returns one of the Chroma's Instrument objects. An index of 0-7 must be supplied.
Lever1
- Property of: Instrument
- Access: Read/Write
- Type: Long
Lever2
- Property of: Instrument
- Access: Read/Write
- Type: Long
This property sets or returns the Lever2 value for the Instrument. When used to set the Lever2 value, the Lever2 command for the Instrument is transmitted immediately to the Chroma.
MaxChromas
- Property of: ChromaController
- Access: Read/Write
- Type: Long
This property contains the maximum number of Chromas which can be attached to the interface circuit. It defaults to 4.
MaxValue
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: Long
This property returns the maximum allowable Value for the Parameter or PanelSetting.
MinValue
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: Long
This property returns the minimum allowable Value for the Parameter or PanelSetting
Name
- Property of: Parameter, PanelSetting
- Access: Read only
- Type: String
This property returns the textual name of the Parameter or PanelSetting.
PanelSettings()
- Property of: Program
- Access: Read only
- Type: PanelSetting
This property returns one of the Chroma's PanelSetting objects. An index of 1-9 must be supplied.
PanelSwitch
- Property of: Chroma
- Access: Read/Write
- Type: Boolean
This property sets or returns the state of the Panel switch on the Chroma. If True, panel settings changes are transmitted from the Chroma to the computer. If False, they are not.
Parameters()
This property returns one of the Chroma's Parameter objects. An index of 1-50 or 56-100 must be supplied.
Pedal1
- Property of: Instrument
- Access: Read/Write
- Type: Long
This property sets or returns the Pedal1 value for the Instrument. When used to set the Pedal1 value, the Pedal1 command for the Instrument is transmitted immediately to the Chroma.
Pedal2
- Property of: Instrument
- Access: Read/Write
- Type: Long
This property sets or returns the Pedal2 value for the Instrument. When used to set the Pedal2 value, the Pedal2 command for the Instrument is transmitted immediately to the Chroma.
PerformanceEvents()
- Property of: Performance
- Access: Read only
- Type: PerformanceEvent
This property returns one PerformanceEvent object of the Performance. The supplied index may either be a numeric index, in which case the PerformanceEvent is selected by its order in the performance, or a String in which case the PerformanceEvent with the corresponding ID (if any) is returned.
PerformanceEvents may be added to or removed from the performance using the AddPerformanceEvent and RemovePerformanceEvent methods
PerformanceEventsCount
- Property of: Performance
- Access: Read only
- Type: Long
This property returns the number of PerformanceEvent objects in the PerformanceEvents() property.
PerformanceSwitch
- Property of: Chroma
- Access: Read/Write
- Type: Boolean
This property sets or returns the state of the Performance switch on the Chroma. If True, performance commands are transmitted from the Chroma to the computer. If False, they are not.
Program
- Property of: Parameter, PanelSetting, Instrument
- Access: Read only
- Type: Program
This property returns an instance of the Program class. For Parameter and PanelSetting, the returned Program is the one to which the calling Parameter or PanelSetting belongs.
For Instrument, the returned Program is a copy of the Program which was used to Define the Instrument. As a copy of a program, it has an Index of –1. Subsequent calls to the SetParameter method will change values of this copy; neither the stored Program on the Chroma nor the Programs in the Chroma property Programs() will be affected.
Programs()
This property returns/sets Program objects of the Chroma. The supplied index must be 0-50.
Setting the Programs() property as in the following example:
Set myProgram = New Program ‘ Set some program parameters Set myChromaController.Chromas(1).Programs(23) = myProgram
produces results which may not be what you would expect. The Set Method actually first copies myProgram, and then writes the copy to the Chroma. Thus, after executing the above code myChromaController.Chromas(1).Programs(23).Index will be 23, while myProgram.Index will remain –1. To get myProgram to refer to the same Program instance that's in the Chroma (and thus have subsequent Parameter changes made to the Chroma), you must also execute the following:
Set myProgram = myChromaController.Chromas(1).Programs(23)
ReceiveMode
- Property of: ChromaController
- Access: Read/Write
- Type: ChromaReceiveModes
This property can be set to either of the valid values for the ChromaReceiveModes enumeration. These are:
- ChrRmdProcess – (default). In this mode, commands received from a Chroma are parsed and processed, updating ChromaServer object properties whenever called for. Corresponding ChromaController events are triggered for each command received.
- ChrRmdRecord – commands received from a Chroma are merely timestamped and saved for later processing. The only event triggered by the ChromaController in this mode is the RecordedBlock event, when the number of bytes received from the Chroma meets or exceeds the RecordBlockSize.
RecordBlockSize
- Property of: ChromaController
- Access: Read/Write
- Type: Long
This property contains the number of bytes to buffer while the ChromaController is in record mode. While the ReceiveMode property is set to ChrRmdRecord, the ChromaController timestamps and saves all bytes received from the Chroma. When the aggregate number of bytes received meets or exceeds the number specified by RecordBlockSize, the RecordedBlock event is triggered and the receive buffer cleared.
SendsToComputer
- Property of: Chroma
- Access: Read only
- Type: Boolean
This property returns whether the Chroma is able to send commands to the computer. It is determined and set automatically by the Restore method.
SendTo
- Property of: Chroma
- Access: Read only
- Type: Boolean
This property returns True if the Chroma is currently addressed by the ChromaController, False otherwise. The value of this property is set by the SendToChroma and UnsendToChroma methods.
SoftwareRevisionLevel
- Property of: Chroma
- Access: Read only
- Type: Long
This property returns the Software Revision Level for the Chroma, as returned by the Identification command. It is set by the Restore method.
TimeoutMilliseconds
- Property of: ChromaController
- Access: Read/Write
- Type: Long
This property controls how many milliseconds the ChromaController waits for a response from a Chroma to a query command (Identification, Information, ReadParameter, ReadProgram, or Status) before giving up. The default 1s 1000 (1 second).
Value
- Property of: Parameter, PanelSetting
- Access: Read/Write (Parameter), Read only (PanelSetting)
- Type: Long
This property returns (or, for Parameters, sets) the value of the Parameter or PanelSetting. PanelSettings may not be set by the computer, as the Chroma provides no command in its computer interface for doing so. When this property is used to set a Parameter, a WriteParameter is immediately transmitted to the Chroma.
Volume
- Property of: Instrument
- Access: Read/Write
- Type: Long
This property sets or returns the Volume value for the Instrument. When used to set the Volume value, the Volume command for the Instrument is transmitted immediately to the Chroma.
Methods
AddPerformanceEvent
- Method of: Performance
- Syntax: AddPerformanceEvent(inString As String, inTimestamp As Single)
- Return Values: PerformanceEvent
This method adds a new PerformanceEvent to the Performance, at the end of the current collection of PerformanceEvents. The EventString property of the new PerformanceEvent is set to inString and the EventTimestamp property to inTimestamp, both without further validation. A reference to the new PerformanceEvent is returned.
Attack
- Method of: ChromaController, Instrument
- Syntax: Attack(instrumentIndex As Long, note As Long, velocity As Long)
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrInvalidInstrumentIndex, chrErrInvalidNoteValue, chrErrInvalidVelocityValue
This method transmits an Attack command (strike a note). The specified note on the specified instrument is attacked with the specified velocity. If called from ChromaController, the command is sent to all Chromas currently being addressed (see SendToChroma). If called from Instrument, only the Chroma of the calling Instrument is sent the command.
Connect
- Method of: ChromaController
- Syntax: Connect(CommPort As Long)
- Return Values: chrErrOK, chrErrInvalidPortNumber, chrErrNoInterfaceDetected, chrErrNoChromasDetected
This method is usually called immediately after creation of the ChromaController object to initialize communications. CommPort is the number of the serial port on the computer that the interface circuit is connected to. If CommPort does not represent a valid serial port on the machine, chrErrInvalidPortNumber is returned. Otherwise, the method opens the serial port and determines whether a powered-up interface circuit is present (both CD and DSR pins should be high); if not a chrErrNoInterfaceDetected error is returned. The circuit is reset, and the method begins trying to detect Chromas. An AddressChromas command (See Overall Design for details) is sent to each Chroma address individually from address 0 to MaxChromas – 1. If present, the addressed Chroma will ignore the command, but will acknowledge its receipt. If no acknowledgement is received from the addressed Chroma within TimeoutMilliseconds, the method decides there is no Chroma at that address; otherwise a new Chroma object is initialized and added to the Chromas collection. If no Chromas are detected, the chrErrNoChromasDetected error is returned.
For each detected Chroma, the Restore method is then executed to initialize the objects' values.
Upon completion, Chromas(1) is addressed (see SendToChroma), and no others.
CopyMe
The method returns a Program object that is an exact duplicate of the calling Program, with the following exceptions:
Subsequent modifications to this Program will not affect any of the Program objects in the Programs() of the Chroma object, unless and until the program is assigned to one of these programs using Set, e.g.,
Dim newProgram as Program Set newProgram = MyChromaController.Chromas(1).Programs(2).CopyMe MyChromaController.Chromas(1).Programs(23) = newProgram
Will effectively copy program 2 in the Chroma to program 23.
Define
- Method of: Instrument
- Syntax: Define(inProgramIndex As Long, inLever1 As Long, inLever2 As Long, inPedal1 As Long, inPedal2 As Long, inVolume As Long, inFootswitch1 As Boolean, inFootswitch2 As Boolean)
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrInvalidProgramIndex, chrErrInvalidLeverValue, chrErrInvalidPedalValue, chrErrInvalidVolumeValue
This method validates the inputs and Defines an Instrument, associating it with a Program and allowing it to be played (Attack, Release). The Program property is set to a copy of the Program with the number specified by inProgramIndex, the initial settings of the instruement for the performance parameters (Volume, Lever1, etc.) are set, the Defined property is set to True, and a Define command is sent immediately to the Chroma.
Disconnect
- Method of: ChromaController
- Syntax: Disconnect
- Return Values: chrErrOK
This method closes the serial port to which the interface circuit is connected.
ErrMessage
- Method of: ChromaController
- Syntax: ErrMessage(errNum As ChromaErrs, Optional specificText As String)
- Return Values: String
Returns a descriptive error message for the error identified by errNum, a member of the ChromaErrs enumeration. Some of these messages allow situation-specific information to be supplied in the specificText parameter; if specificText is supplied for such a message, it will be inserted appropriately in the string. See the ChromaErrs enumeration for the returned error message strings and their specificText provisions.
PackedStringToProgram
- Method of: ChromaController
- Syntax: PackedStringToProgram(inProgram As Program)
- Return Values: String
This utility Function is useful for converting a Program object to its 59-byte packed string representation, as stored in Galaxy format files, and returned by the Read Program command of the Chroma.
PanelSwitchOff
- Method of: Chroma
- Syntax: PanelSwitchOff
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method turns off the panel switch of the controlling Chroma, preventing panel setting changes from being transmitted to the computer. It is identical to setting the PanelSwitch property of the Chroma to False.
PanelSwitchOn
- Method of: Chroma
- Syntax: PanelSwitchOn
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method turns on the panel switch of the controlling Chroma, enabling panel setting changes to be transmitted to the computer. It is identical to setting the PanelSwitch property of the Chroma to True.
ParseRecording
- Method of: ChromaController
- Syntax: ParseRecording(inBytes() As Byte, inTimestamps() As Single)
- Return Values: Performance object
This method converts raw recorded bytes and timestamps from the Chroma into a more manageable Performance object. InBytes is an array of bytes which has usually (though not necessarily) been put together from recorded byte arrays supplied by the RecordedBlock event. InTimestamps is an array of values representing seconds since the beginning of the recording. If either of the arrays is larger than the other, the extra values in the larger one are ignored.
The method checks each byte of inBytes sequentially. When a complete valid Chroma command is detected, a PerformanceEvent is added to the PerformanceEvents collection of the Performance object, with a timestamp corresponding to the inTimestamp of the first byte of the command. No checking is performed for sequential order of inTimestamps, nor is any sorting of the resultant PerformanceEvents performed.
This method is supplied for use after a "recording session" on the Chroma. The RecordedBlock event which returns the raw bytes received from the Chroma and timestamps for them is designed to minimize processing at recording time, so that the computer is as responsive as possible to the Chroma performance. That data format is unwieldy, however, for later processing; hence the function of this method is to convert it to a more useful Performance object.
PerformanceSwitchOff
- Method of: Chroma
- Syntax: PerformanceSwitchOff
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method turns off the performance switch of the controlling Chroma, preventing performance commands from being transmitted to the computer. It is identical to setting the PerformanceSwitch property of the Chroma to False.
PerformanceSwitchOn
- Method of: Chroma
- Syntax: PerformanceSwitchOn
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method turns on the performance switch of the controlling Chroma, enabling performance commands to be transmitted to the computer. It is identical to setting the PerformanceSwitch property of the Chroma to False.
Playback
- Method of: ChromaController
- Syntax: Playback(inPerformance As Performance)
- Return Values: chrErrOK
This method begins transmission of a Performance to the Chroma(s). It works by enabling a timer, which wakes up every millisecond. If the EventTimestamp of the next PerformanceEvent is less than the elapsed time since the timer was enabled, it is transmitted, as are any subsequent PerformanceEvents which meet this condition. PerfromanceEvents are assumed to be in the correct order in their collection; if an earlier-timestamped PerformanceEvent follows a later-timestamped one, the later one will be sent when its time comes, followed immediately by the earlier one.
This method returns immediately upon initiating the playback – it does not wait until the playback is over.
If multiple Chromas are being addressed, they will all be sent the commands in the Performance. The Performance itself can, of course, contain AddressChroma commands.
ProgramToPackedString
- Method of: ChromaController
- Syntax: ProgramToPackedStringi(packedString As String)
- Return Values: Program
This utility Function is useful for converting a 59-byte packed string representation, as stored in Galaxy format files, and returned by the Read Program command of the Chroma, to a Program object
ReadParamater
- Method of: Parameter
- Syntax: ReadParameter
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrTimeout
The value of the ReadParameter command is transmitted to the Chroma (for the calling Parameter and its Program), and the response is used to update the Value property of the calling Parameter. This method is synchronous – it does not return until the response from the Chroma has been received and processed, or the Chroma has timed out.
Release
- Method of: ChromaController, Instrument
- Syntax: Release(instrument As Long, note As Long, velocity As Long)
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrInvalidInstrumentIndex, chrErrInvalidNoteValue, chrErrInvalidVelocityValue
This method transmits a Release command (release a note). The specified note on the specified instrument is released with the specified velocity. If called from ChromaController, the command is sent to all Chromas currently being addressed (see SendToChroma). If called from Instrument, only the Chroma of the calling Instrument is sent the command.
RemovePerformanceEvent
- Method of: Performance
- Syntax: RemovePerformanceEvent(inId As String)
- Return Values: None
The PerformanceEvent with the ID corresponding to inId is removed from the sequence of PerformanceEvents of the Performance.
Restore
- Method of: Chroma
- Syntax: Restore
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method initializes the Chroma and the ChromaServer objects which represent its state.
First, the Restore command is sent to the Chroma which puts it back in the state reflected by its panel settings, and undefines all instruments except 0 and (possibly, if the current program has a Link, 1). The panel switch and performance switch are turned off by this command, and the corresponding Chroma properties are set to False. An Identification command is sent to the Chroma: if it responds, then the following occurs:
- SendsToComputer property is set to True
- SoftwareRevisionLevel is set from the response
- A ReadProgram command is transmitted for all 51 programs, and the Parameter and PanelSetting values are updated for the Chroma object from the response.
- A Status command is transmitted for all 8 instruments and the various properties are updated for the Instrument object from the response
If the Chroma doesn't respond, then SendsToComputer is set to False and SoftwareRevisionLevel to –1.
SendToChroma
- Method of: ChromaController
- Syntax: SendToChroma(Index As Long)
- Return Values: chrErrOK, chrErrInvalidChromaIndex
This method "addresses" one of the Chromas in the Chromas collection; that is, all subsequent calls to the Attack, Release and TapPanel methods of the ChromaController object will be sent to this Chroma until the UnsendToChroma method is called with the same Index. The supplied Index is the member index of the Chromas collection; chrErrInvalidChromaIndex is returned if it is greater than the number of Chroma objects in this collection.
Multiple Chromas may be simultaneously addressed by sequential calls to this method with different supplied Index values.
All commands originating from the Playback method will also be sent to the indicated Chroma, but the command stream being played back may itself contain AddressChroma commands which alter the current set of addressed Chromas.
SetParameter
- Method of: Instrument
- Syntax: SetParameter(parameterIndex As Long, Value As Long)
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrInvalidParameterIndex, chrErrInvalidParameterValue
This method sets the value of a parameter for the Program that the Instrument is "playing". The change, however, is made only to the copy of the program which the Instrument is using – the program stored in the Chroma and the Program object of the Programs() property of the Chroma object remain unaffected. This is useful for modifying a parameter within a Performance without permanently changing the underlying Program.
ParameterIndex is the number (1-50 or 56-100) of the Parameter to be set. Value is checked against the MinValue and MaxValue properties for that Parameter to determine validity.
Squelch
- Method of: Instrument
- Syntax: Squelch(note As Long)
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method immediately transmits the Squelch command to the Chroma, which silences the channel that is playing the supplied note on the Instrument.
TapPanel
- Method of: ChromaController, Chroma
- Syntax: TapPanel
- Return Values: chrErrOK, chrErrChromaControllerNotConnected
This method taps the Chroma panel tapper. When called from ChromaController, all currently addressed Chromas are sent the command. When called from a Chroma object, only the corresponding Chroma machine is sent the command.
TearDown
- Method of: ChromaController
- Syntax: TearDown
- Return Values: None
This method eliminates all internal references to ChromaController object references. It should be used when instances of the ChromaController object are no longer needed by the client program.
Undefine
- Method of: Instrument
- Syntax: Undefine
- Return Values: : chrErrOK, chrErrChromaControllerNotConnected
This method un-defines the instrument, immediately sending an Undefine command to the Chroma.
UnsendToChroma
- Method of: ChromaController
- Syntax: UnSendToChroma(Index As Long)
- Return Values: chrErrOK, chrErrInvalidChromaIndex, chrErrCannotSendToZeroChromas
This method turns off the addressing of a Chroma for subsequent commands (see SendToChroma). Index is the member index of the Chromas collection for the Chroma to un-address.
Note that you may not un-address all the Chromas – if you try to, the last Chroma will remain addressed, and the method will return chrErrCannotSendToZeroChromas. This is due to the interface circuit design; transmitted commands would never get acknowledged, and the circuit would wait forever for its transmit buffer to be read and cleared.
WriteParameter
- Method of: Parameter
- Syntax: WriteParameter
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrProgramIsCopy
This method writes the current Value property to the Chroma, for the calling Parameter for its Program. The Program must represent one of the stored programs on the Chroma; i.e., its Index property must be 0-50. If this is not the case (as will occur when the Program has been created or copied independently by the application , or if it is the Program property of an Instrument), the chrErrProgramIsCopy error will be returned. To change the parameters of an Instrument's Program, use the SetParameter method instead.
WriteProgram
- Method of: Program
- Syntax: WriteProgram
- Return Values: chrErrOK, chrErrChromaControllerNotConnected, chrErrProgramIsCopy
This method writes an entire Program to the Chroma, its Parameters() and PanelSettings(). The program of the same number as the Program Index is the one written to. The Program must represent one of the stored programs on the Chroma; i.e., its Index property must be 0-50. If this is not the case (as will occur when the Program has been created or copied independently by the application , or if it is the Program property of an Instrument), the chrErrProgramIsCopy error will be returned.
Events
Attack
- Event of: ChromaController
- Syntax: Attack(ChromaIndex As Long, InstrumentIndex As Long, note As Long, velocity As Long)
Raised whenever an Attack command is received from the Chroma (a note is struck while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. note is the number of the note struck and velocity the velocity with which it was struck.
Define
- Event of: ChromaController
- Syntax: Define(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Define command is received from the Chroma (generally, when a new program is selected or a new link is established/erased while the Panel Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which was defined. The processing of this command prior to raising the event updates the relevant Instrument properties (Program, Volume, Pedal1, etc.)
Footswitch1
- Event of: ChromaController
- Syntax: Footswitch1(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Footswitch1Down or Footswitch1Up command is received from the Chroma (the right footswitch is depressed or released while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Footswitch1.
Footswitch2
- Event of: ChromaController
- Syntax: Footswitch2(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Footswitch2Down or Footswitch2Up command is received from the Chroma (the left footswitch is depressed or released while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Footswitch2.
Identification
- Event of: ChromaController
- Syntax: Identification(ChromaIndex As Long)
Raised whenever an Information command is received from the Chroma (generally, only when one is requested by sending an Identification command) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. The processing of this command prior to raising the event updates the Chroma property SoftwareRevisionLevel.
Information
- Event of: ChromaController
- Syntax: Information(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever an Information command is received from the Chroma (generally, only when one is requested by sending an Information command) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Channels.
Lever1
- Event of: ChromaController
- Syntax: Lever1(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Lever1 command is received from the Chroma (the left performance lever is moved while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Lever1.
Lever2
- Event of: ChromaController
- Syntax: Lever2(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Lever2 command is received from the Chroma (the right performance lever is moved while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Lever2.
NoOperation
- Event of: ChromaController
- Syntax: NoOperation(ChromaIndex As Long)
Raised whenever a NoOperation command is received from the Chroma (it is turned on or (I think) Restore-ed) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command.
Pedal1
- Event of: ChromaController
- Syntax: Pedal1(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Pedal1 command is received from the Chroma (the Volume pedal is moved while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Pedal1.
Pedal2
- Event of: ChromaController
- Syntax: Pedal2(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Pedal2 command is received from the Chroma (the Effects pedal is moved while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Pedal2.
ReadProgram
- Event of: ChromaController
- Syntax: ReadProgram(ChromaIndex As Long, ProgramIndex As Long)
Raised whenever a ReadProgram command is received from the Chroma (generally, only when one is requested by transmitting a ReadProgram command) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. ProgramIndex is the number (0-50) of the program to which the command pertains. The processing of this command prior to raising the event updates all the Parameters and PanelSettings of the specified program.
ReadParameter
- Event of: ChromaController
- Syntax: ReadParameter(ChromaIndex As Long, ProgramIndex As Long, ParameterIndex As Long)
Raised whenever a ReadParameter command is received from the Chroma (generally, only when one is requested by transmitting a ReadParameter command) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. ProgramIndex is the number (0-50) of the program to which the command pertains. ParameterIndex is the number (1-50 or 56-100) to which the command pertains. The processing of this command prior to raising the event updates the specified Parameter value of the specified Program.
RecordedBlock
- Event of: ChromaController
- Syntax: RecordedBlock(ChromaIndex As Long, recordedBytes() As Byte, recordedTimestamps() As Single)
Raised whenever the ReceiveMode of the ChromaController is chrRmdRecord, and the total number of bytes received from the Chroma equals or exceeds RecordBlockSize. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. RecordedBytes is an array of bytes, in the order received from the Chroma. RecordedTimestamps is an array with the same number of elements as recordedBytes, each element of which represents the number of elapsed seconds between the setting of the ReceiveMode property of the ChromaController to chrRmdRecord and the receipt at the computer's serial port of the corresponding byte.
The number of bytes in each array can be deteremined by the Ubound function. It will always be equal for the two arrays, and will be equal to or slightly greater than the value of the RecordBlockSize property.
Release
- Event of: ChromaController
- Syntax: Release(ChromaIndex As Long, InstrumentIndex As Long, note As Long, velocity As Long)
Raised whenever a Release command is received from the Chroma (a note is released while the Performance Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. note is the number of the note released and velocity the velocity with which it was released.
SetParameter
- Event of: ChromaController
- Syntax: SetParameter(ChromaIndex As Long, InstrumentIndex As Long, ParameterIndex As Long)
Raised whenever a SetParameter command is received from the Chroma (a parameter is changed while the Panel Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. ProgramIndex is the number (0-50) of the program for which the parameter was changed. ParameterIndex is the number (1-50 or 56-100) of the changed parameter. The processing of this command prior to raising the event updates the specified Parameter value of the specified Program.
Status
- Event of: ChromaController
- Syntax: Status(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Status command is received from the Chroma (generally, only when one is requested by transmitting a Status command) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number of the instrument (0-7) which generated the command. The processing of this command prior to raising the event updates the relevant properties of the Instrument (Program, Volume, Lever1, etc.).
Undefine
- Event of: ChromaController
- Syntax: Undefine(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever an Undefine command is received from the Chroma (generally, when a new program is selected or a link is established/erased while the Panel Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which was undefined. The processing of this command prior to raising the event updates the relevant Instrument properties (Program, Volume, Pedal1, etc.)
Volume
- Event of: ChromaController
- Syntax: Volume(ChromaIndex As Long, InstrumentIndex As Long)
Raised whenever a Volume command is received from the Chroma (the Link Volume Panel Setting is changed while the Panel Switch is on) and the ReceiveMode of the ChromaController is chrRmdProcess. ChromaIndex is the member index of the Chroma in the Chromas collection which generated the command. InstrumentIndex is the number (0-7) of the instrument which generated the command. The processing of this command prior to raising the event updates the Instrument property Volume. Note: at least on my Chroma, this command doesn't appear to be sent propelry. I get commands for Instrments 0 and 1 when I change the Link Volume parameter, but the values sent to the computer don't change.
Enumerations
The ChromaServer component exposes a number of enumerated constants which will be useful to the application programmer. These are detailed here.
ChromaReceiveModes
These are valid arguments to the ReceiveMode property of the ChromaController object.
- chrRmdProcess – process all commands immediately upon receipt from the Chroma, and modify the object values accordingly.
- ChrRmdRecord – upon receipt of a Chroma command, merely record and timestamp the command. No updating of the ChromaServer objects is performed.
ChromaErrs
These are all the error codes returned by ChromaServer methods. These are followed by the text returned from the ErrMessage method with this error code supplied as an argument. In the text strings, "###" is replaced with any text supplied in the specificText argument to the method.
- ChrErrOK – "OK, Success"
- ChrErrInvalidPortNumber – "The supplied serial port number, ###, is not valid on this machine."
- ChrErrNoInterfaceDetected – "No interface circuit with power detected on Comm Port ###"
- ChrErrTimeout –" The Chroma interface is not ready to accept transmissions from the computer. ###"
- ChrErrNoChromasDetected – "No Chromas were detected. ###"
- ChrErrInvalidChromaIndex – "There are not as many as ### Chromas online."
- ChrErrCannotSendToZeroChromas – "Not Sending to Chroma ### would leave no Chromas sent to."
- ChrErrChromaCannotSendToComputer –" Chroma ### cannot send commands to the computer."
- ChrErrInvalidProgramIndex – "Program number ### is not valid; must be in the range 0-50."
- ChrErrInvalidParameterIndex –" Parameter number ### is not valid; must be in the range 1-50 or 56-100."
- ChrErrInvalidPanelSettingIndex –" Panel Setting number ### is not valid; must be in the range 0-9."
- ChrErrInvalidParameterValue –" Invalid value supplied for Parameter ###."
- ChrErrInvalidPanelSettingValue – "Invalid value supplied for Panel Setting ###."
- ChrErrInvalidInstrumentIndex – "Instrument number ### is not valid; must be in the range 0-7."
- ChrErrInvalidLeverValue – "Invalid value supplied for Lever; must be in range -128 to 127. ###"
- ChrErrInvalidPedalValue – "Invalid value supplied for Pedal; must be in range 0 to 255. ###"
- ChrErrInvalidVolumeValue - "Invalid value supplied for Volume; must be in range 0 to 255. ###"
- ChrErrInvalidVelocityValue - "Invalid value supplied for Velocity; must be in range 0 to 255. ###"
- ChrErrInvalidNoteValue - "Invalid value supplied for Note; must be in range -64 to 63. ###"
- ChrErrProgramIsCopy - "This program object is a copy, not one of the 51 Chroma programs. Only those program objects may write to the Chroma. ###"
- ChrErrChromaControllerNotConnected - "The ChromaController is not connected to a serial port. ###"
ChromaCommands
These are mnemonics for the supported Chroma command codes.
- chrComNoOperation = &H0
- chrComIdentification = &H1
- chrComReadProgram = &H2
- chrComWriteProgram = &H3
- chrComReadParameter = &H6
- chrComWriteParameter = &H7
- chrComPanelSwitchOff = &H8
- chrComPanelSwitchOn = &H9
- chrComPerformanceSwitchOff = &HA
- chrComPerformanceSwitchOn = &HB
- chrComTapPanel = &H10
- chrComRestore = &H13
- chrComAddressChromas = &H60
- chrComInformation = &H70
- chrComVolume = &H78
- chrComLever1 = &H80
- chrComLever2 = &H88
- chrComPedal1 = &H90
- chrComPedal2 = &H98
- chrComFootswitch1Down = &HA0
- chrComFootswitch1Up = &HA8
- chrComFootswitch2Down = &HB0
- chrComFootswitch2Up = &HB8
- chrComDefine = &HC0
- chrComUndefine = &HC8
- chrComAttack = &HD0
- chrComRelease = &HD8
- chrComSetParameter = &HE0
- chrComStatus = &HE8
- chrComSquelch = &HF0
Patches
These are the mnemonics for the values of Parameter 1 of a Program
- chrPatchSixteenChannels
- chrPatchIndependentChannelNoCrossMod
- chrPatchIndependentChannelSync
- chrPatchIndependentChannelRingMod
- chrPatchIndependentChannelFilterFM
- chrPatchParallelFilterModeNoCrossMod
- chrPatchParallelFilterModeSync
- chrPatchParallelFilterModeRingMod
- chrPatchParallelFilterModeFilterFM
- chrPatchSeriesFilterModeNoCrossMod
- chrPatchSeriesFilterModeSync
- chrPatchSeriesFilterModeRingMod
- chrPatchSeriesFilterModeFilterFM
- chrPatchVariableMixFilterModeNoCrossMod
- chrPatchVariableMixFilterModeSync
- chrPatchVariableMixFilterModeRingMod
FootswitchModes
These are the mnemonics for the valuesof Parameter 2 of a Program
- chrFSwchLeftEnabledRightEnabled
- chrFSwchLeftEnabledRightDisabled
- chrFSwchLeftDisabledRightEnabled
- chrFSwchLeftDisabledRightDisabled
- chrFSwchLeftNoteGateRightEnabled
- chrFSwchLeftNoteGateRightDisabled
- chrFSwchLeftInvertedNotedGateRightEnabled
- chrFSwchLeftInvertedNotedGateRightDisabled
KeyboardAlgorithms
These are the mnemonics for the values of Parameter 3 of a Program
- chrKbAlgPolyphonic
- chrKbAlgPitchOrdered
- chrKbAlgChordBuffered
- chrKbAlgAllChannelsPolyphonic
- chrKbAlgAllChannelsMonophonic
- chrKbAlgLastNoteSingleTrigger
- chrKbAlgLastNoteMultipleTrigger
- chrKbAlgFirstNote
- chrKbAlgBottomNote
- chrKbAlgTopNote
- chrKbAlgArpeggioUp
- chrKbAlgArpeggioDown
- chrKbAlgArpeggioUpAndDown
- chrKbAlgArpeggioDownAndUp
GlideShapes
These are the mnemonics for the values of Parameters 7 and 57 of a Program
- chrGlShpPortamento
- chrGlShpGlissando
SweepModes
These are the mnemonics for the values of Parameters 8 and 58 of a Program
- chrSweepAsynchronousFreeRunning
- chrSweepIndependentKeyTriggered
- chrSweepSingleFreeRunning
- chrSweepSingleKeyTriggered
SweepRateMods
These are the mnemonics for the values of Parameters 10 and 60 of a Program
- chrSRModNone
- chrSRModPressure
- chrSRModKeyboard
- chrSRModInvertedKeyboard
- chrSRModvelocity
- chrSRModInvertedVelocity
- chrSRModEnvelope2
- chrSRModInvertedEnvelope2
- chrSRModPedal1
- chrSRModInvertedPedal1
- chrSRModPedal2
- chrSRModInvertedPedal2
- chrSRModLever1
- chrSRModInvertedLevel1
- chrSRModLever2
- chrSRModInvertedLevel2
SweepWaveShapes
These are the mnemonics for the values of Parameters 11 and 61 of a Program
- chrSwShpSine
- chrSwShpCosine
- chrSwShpOffsetSine
- chrSwShpHalfSine
- chrSwShpTriangleB
- chrSwShpTriangleA
- chrSwShpSawtooth
- chrSwShpLagSquare
- chrSwShpSquare
- chrSwShpPatternF
- chrSwShpPatternE
- chrSwShpPatternD
- chrSwShpPatternC
- chrSwShpPatternB
- chrSwShpPatternA
- chrSwShpRandom
SweepAmplitudeMods
These are the mnemonics for the values of Parameters 12 and 62 of a Program
- chrSAModNone
- chrSAModPressure
- chrSAModKeyboard
- chrSAModInvertedKeyboard
- chrSAModVelocity
- chrSAModInvertedVelocity
- chrSAModEnvelope2
- chrSAModEnvelope1
- chrSAModPedal1
- chrSAModPedal2
- chrSAModLever1
- chrSAModLever2
- chrSAModDelay0Point85Seconds
- chrSAModDelay1Point3Seconds
- chrSAModDelay2Point6Seconds
- chrSAModDelay5Point1Seconds
EnvelopeAmplitudeTouches
These are the mnemonics for the values of Parameters 13, 20, 63 and 70 of a Program
- chrEnvATNone
- chrEnvATLow
- chrEnvATMediumLow
- chrEnvATMedium
- chrEnvATMediumHigh
- chrEnvATHigh
- chrEnvATThreshold
- chrEnvATInvertedThreshold
AttackDecayMods
These are the mnemonics for the values of Parameters 15, 17, 22, 24, 65, 67, 72, and 74 of a Program
- chrADModNone
- chrADModPressure
- chrADModKeyboard
- chrADModInvertedKeyboard
- chrADModvelocity
- chrADModInvertedVelocity
- chrADModPedal1
- chrADModPedal2
PitchWaveShapeCutoffMods
These are the mnemonics for the values of Parameters 27, 29, 31, 35, 40, 42, 44, 77, 79, 81, 85, 90, 92, and 94 of a Program
- chrPWModKeyboardGlideA
- chrPWModSweepA
- chrPWModEnvelope1A
- chrPWModEnvelope2A
- chrPWModKeyboardGlideB
- chrPWModSweepB
- chrPWModEnvelope1B
- chrPWModEnvelope2B
- chrPWModLever1
- chrPWModLever2
- chrPWModPedal1
- chrPWModPedal2
- chrPWModVelocity
- chrPWModThresholdVelocity
- chrPWModPressure
- chrPWModThresholdPressure
WaveShapeWaveShapes
These are the mnemonics for the values of Parameters 33 and 83 of a Program
- chrWvShpSaws
- chrWvShpPulse
- chrWvShpPinkNoise
- chrWvShpWhiteNoise
CutoffLPHPs
These are the mnemonics for the values of Parameters 37 and 87 of a Program
- chrCLPHPLowPass
- chrCLPHPHighPass
VolumeMod1Mod2s
These are the mnemonics for the values of Parameters 46, 48, 96 and 98 of a Program
- chrV12ModEnvelope1A
- chrV12ModEnvelope2A
- chrV12ModEnvelope1B
- chrV12ModEnvelope2B
VolumeMod3s
These are the mnemonics for the values of Parameters 50 and 100 of a Program
- chrV3ModNone
- chrV3ModPressure
- chrV3ModKeyboard
- chrV3ModSweep
- chrV3ModPedal1
- chrV3ModInvertedPedal1
- chrV3ModPedal2
- chrV3ModInvertedPedal2
LinkTypes
These are the mnemonics for Link Type
- chrLinkNone
- chrLinkSplitUpper
- chrLinkSplitLower
- chrLinkUnison
TransposeTypes
These are the mnemonics for both Main and Link Transpose Types
- chrTrnspNone
- chrTrnspUp1Octave
- chrTrnspDown1Octave