Interface Manual: Appendix D - Polaris Objects and Streams
The Polaris supports a set of Chroma Interface commands that allows objects inside the Polaris to be created, deleted, opened, read, written, and added to the system as software extensions. It also allows messages in the Polaris' internal message format (which bears no resemblance to the Chroma Interface language) to be inserted into the various internal data streams. Certain of these functions requires knowledge of proprietary details of the inner workings of the Polaris; if misused, the Polaris' computer will almost definitely crash, and in doing so will probably clobber a few bytes in the middle or your favorite program or sequence. In other words, experiment at your own risk. Other functions, though, are documented here, as they are fairly simple and presumed to be generally useful.
The Chroma Interface allows an external computer to gain access to one internal data object at a time. At any given time, one object (possibly non-existent) is "open" to the interface, and this object (if it exists) is either write-enabled or write-protected. Objects that are write-protected can be read with Peek and Peek Two Bytes. Objects that are write-enabled can also be written with Poke and Poke Two Bytes. Each object, then, is like a separate address space of a particular size, and accesses beyond the end of an object are prevented.
All objects are numbered using a 16-bit number, and the particular association between object numbers and particular physical objects is instrument- dependent. That is, future instruments that use this interface will probably have different object numbers. It is, however, possible to find out if an object exists and how big it is through the interface.
The following objects can be safely created, deleted: open, read and written:
- 0001..0084 — Programs A1, A2, A3, ..., K11, K12. Each of these must be 44 bytes long if it exists.
- 0094..009F — Sequences 1 through 12.
The following objects can be safely open and read.
- 0000 — The entire RAM space. When the instrument is turned on, this is open and write-protected.
- 0085 — The Main Instrument (Instrument 0). The first 44 bytes of an instrument contain the program that controls its sound.
- 0086 — The Link Instrument (Instrument 1). This normally only exists if a link is set up.
- 0087 — The Sequencer Instrument (Instrument 2). This normally only exists while a sequence is being played.
- 0088..008C — Instruments 3 through 7. These normally only exist if they have been created through the Chroma or MIDI interface.
Internally, the Polaris encodes events as messages, and these messages flow in streams between the different parts of the internal software. These messages look completely different from the commands in the Chroma Interface language; most notably, they are all two bytes long (not including an instrument number, if any). Some messages allow things to be done that could not otherwise be done through the Chroma Interface language. The Chroma Interface language therefore provides a mechanism for inserting messages into the internal streams.
In general, if you send a message to a stream that goes someplace, and the message is not understood, the message vill be ignored. If, however, you send a message to a stream that doesn't go someplace, the computer will crash. The following stream numbers (in hex) can be safely used:
- 16: Panel — This is where the panel sends switch press and slider messages. It understands the following messages and operands:
- OC ss — Switch Press
- Switch ss is pressed: where ss is in the range 01..3B. The switches are numbered basically from left to right.
- ss pp — Slider Move
- Slider ss - 80, where ss is in the range 81..93 (the slider number is in the range 01..13) is moved to position pp (00 is bottom, FF is top). The sliders are numbered from left to right, not including the Master slider.
17: Master — This is where the panel sends Master slider messages. It only understands:
- 30 pp — Master Slider Move
- The master slider is moved to position pp (00 is bottom, FF is top). The effect of this depends upon the current function of the master slider.
1E: Instrument — 1 message sent here will be played by the logical instrument, if it exists. An instrument number (00..07) must be specified. Some of the messages understood by instruments are:
- 7D pp — Swap Program
- The program contained in the instrument is swapped with program pp (where pp is in the range 01..84).
- TD FF — Release Instrument
- All notes are released.
- 7E pp — Store Program
- The program contained in the instrument is stored over program pp (where pp is in the range 01..84).
- 7E FF — Squelch Instrument
- All notes are released and their envelopes are chopped off. This behaves like the Squelch command in the Chroma Interface language.
- 7F 00 — Recreate Instrument
- The instrument (which is expected to already exist) is recreated using the sound it contains. This is useful after using Open and Poke to write a 44 byte program into the instrument.
- 7F pp — Create Instrument
- The instrument is created if it does not already exist, and given program number pp (where pp is in the range 01..84). An instrument object number (85..8C) can also be used in place of pp, in which case the contents of that instrument's workspace will be used as the source or the program data. This behaves like the Define command in the Chroma Interface language.
- 7F FF — Delete Instrument
- The instrument is deleted. This behaves like the Undefine command in the Chroma Interface language.