THE PEAVEY STUDIOMIX AS STANDARD MIDI CONTROLLER FOR CSOUND Art Hunkins - November 2005 abhunkin AT uncg DOT edu http://www31.brinkster.com/abhunkins The Peavey StudioMix control surface was designed as a hardware control interface solely for Cakewalk software. As such, its MIDI output consists of proprietary NRPN data specific to Cakewalk - not standard MIDI messages. With the assistance of MIDIOx and MIDIYoke (free downloads from http://www.midiox.com), however, much of the StudioMix output can be readily converted to standard MIDI controller and note on/off data for Windows systems. Specifically, the accompanying StudioMixSliderFix.oxm MIDIOx file allows all nine sliders to output continuous controller data. Also, the lowest two of the five vertical ("assignable") buttons toggle note zero on and off; similarly, the eight horizontal ("channel") buttons momentarily trigger specific MIDI note numbers - all as required by a number of my live- performance CsoundAV compositions. (These compositions can be found at the URL above.) While the StudioMixSliderFix.oxm file enables CCs (continuous controllers) 20-28 over the entire 0-127 range, any of these values may be easily changed - either within MIDIOx itself, or within a text editor such as Notepad. (For the latter purpose, the .txm format of the StudioMixSliderFix file should be used. Either .txm or .oxm forms may be loaded into MIDIOx.) Note that the eight main sliders are treated as a single bank, being assigned successive controller numbers, and identified by the first number of the bank in my CsoundAV compositions. (Of course it is not necessary to use all eight controllers.) The two (vertical) toggle buttons - the lowest of the set of five - also may be edited, to turn on/off any particular note number with any desired velocity (here it is note zero with a velocity of one, as implemented in my CsoundAV compositions). When following the procedure below, it should not be necessary to make any change to Csound compositions at all; the StudioMix acts as any other MIDI controller with up to nine sliders (eight in a bank) and two programmable buttons. The only constraint is the single bank numbering scheme for the CCs. Note that the same capability is available to other software that responds to standard MIDI messages. StudioMixSliderFix.oxm (.txm) can readily serve as a template for similar conversion implementations. In addition to the two toggle buttons, programming is included for the entire row of channel (plus Master) buttons - as momentary-contact note on/ note off. The eight channel buttons trigger notes 60, 62, 64, 65, 67, 69, 71 and 72, otherwise known as the white notes from middle C(4) up through C5. The Master button is a momentary contact for note zero with a velocity of one (other velocities are 127). Note that, unlike the Peavey 1600[x] controller, the StudioMix buttons are not capable of alternate toggle on/ toggle off with a single button. For those interested in modifying the .oxm/.txm file, here are some particulars (further info relevent to modifying a .txm file can be had by opening the Example.txm file included with the MIDIOx distribution, in Notepad; StudioMixSliderFix.txm also contains the more important of these observations as comments): 1) StudioMix sliders 1-8 correspond to NRPNs 3500-3507; master (M) slider 9 corresponds to NRPN 4503. 2) Do *not* change the slider input values, 0-16000. 3) To modify output controller numbers, you must correspondingly change *both* numbers following "Ctrl" - specifying either an 8-controller range, or the same number twice for the master (M) slider. Be sure not to duplicate controller numbers (including any rotary encoders used as controllers - see possible concurrent use of StudioMixEncoderFix VBscript below). 4) It is also possible to change the output *value* range that follows the two Ctrl numbers (defaults are the usual 0-127). 4) The five vertical ("assignable") buttons correspond to NRPNs 5000-5004 *from top down*. The lowest button is thus 5004 (note on); 5003 is here set to note off for the same note (zero). (It will seem odd that the release functions for both buttons are set to note off for note *1*. A peculiarity of MIDIOx is that an NRPN (multi-)message cannot "Discard" normally, which would otherwise be the objective here.) 5) The MIDI note number immediately follows (in duplicate) NoteOn/NoteOff. Note On Velocity is the last two values following NoteOn (again in duplicate) - here note 0 with a velocity of 1. 6) Do not change or delete the last line of controller data. It should be at the end of the [Map] list. Any additions to the list should be made prior to this line. 7) If necessary, the channel number (default = 1) can be changed for any or all controls by replacing the number immediately before "Ctrl" or "NoteOn/ NoteOff." ("NoteOn/NoteOff" represent the buttons.) 8) The eight horizontal "channel" buttons are associated with NRPNs 2500- 2507 (ascending left to right). The "Master" button is NRPN 4502. To change MIDI note number, alter the two numbers following "NoteOn" and "NoteOff" (a corresponding pair) to the same new number. Here is the setup procedure: 1) Before MIDIOx can be run, the MIDIYoke "virtual patch cord" driver must be installed. The fairly elaborate instructions for doing so are well detailed in the Midiyoke.rtf file included in the self-extracting download. Follow them carefully. For our purposes, only a single MIDI Yoke Junction Port need be created. Fortunately, once this setup is complete, you can forget about it. 1) Run MIDIOx, setting the MIDI Output device to MIDI Yoke Junction: 1. (Click Options, then MIDI Devices.) In the same window, select the MIDI Input device (usually your sound card) that connects StudioMix to your computer. (Note that once you make these selections, they remain the same until you change them.) 2) Under Options, Data Mapping, load the StudioMixSliderFix.oxm (or .txm) file. Click OK, then click/enable the MAP icon if it's not already enabled on the taskbar. 3) During your Csound (.csd) or other software setup, select MIDI Yoke Junction: 1 as MIDI Input Device. One final note: The StudioMix features 18 additional rotary pots which may be used as continuous controllers. However, they are of the endless rotary encoder variety, working by unit increment/decrement (relative) values rather than within an absolute range. It is possible to convert these NRPN values to continuous controller data, but not without adding a MIDIOx VBscript (StudioMixEncoderFix.vbs) to the above procedure. This issue is dealt with in a companion article of mine, "Converting StudioMix Endless Rotary Encoder Data for Use in Csound." (The combination of 9 sliders, 14+ buttons and 18 rotary encoders can be a powerful one.) The many *buttons* of StudioMix, however, are all capable of being programmed fairly simply as illustrated here. Their complete NPRNs are listed in the following source, to which I am principally indebted for the current implementation: http://www.vjcentral.com/comments/view/id/1540 Several corrections/clarifications to this information: Master fader is NRPN 4503, and the NPRNs of the two Master encoders are reversed. As mentioned above, the NPRNs for the five "assignable buttons" are numbered from top to bottom.