These utilities allow one to utilize a MIDI controller to change parameter settings on the XAir series of mixers.
All software in this repository is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This Repository contains BASH shell scripts which utilize the command line programs XAir_Interface, sendmidi and receivemidi available at:
https://github.com/Rippert/XAir-Behringer.git
https://github.com/gbevin/SendMIDI.git and https://github.com/gbevin/ReceiveMIDI.git
XAir_Interface, sendmidi and receivemidi executables should be placed in the users PATH.
The multiple scripts of version 0.1 have been replaced by two scipts (NetOSC.sh and MidiOSC.sh). Version 0.1 scripts are still availble in the branch archive.
Examples of prgm
(see below) files are provided in OSClist1,2,3 for NetOSC.sh, and MOSClist1,2 for MidiOSC.sh.
NetOSC.sh OSC-server-IPv4-address OSC-server-Port MIDI-device-name [command]
Reads MIDI command input on MIDI-device-name and send OSC commands to OSC server (such as a XAir mixe)r at IP address OSC-server-IPv4-address on port OSC-server-Port. An optional command input can be appended to the command line. Other commands are added interactively.
Once NetOSC.sh
is invoked, commands are entered via the terminal. All commands remain active until deleted with a prune
command or until another prgm
command is entered in the case of prgm
(see below).
Currently accepted commands are:
cc2param MIDI-channel# CC# CC-lower# CC-upper# param-lower# param-upper# OSC-address OSC-format
setup a linear link between the MIDI continuous-controller CC# on MIDI channel MIDI-channel# and the OSC continuous parameter at OSC-address, with format OSC-format.
Example: cc2param 1 10 0 127 0.0 1.0 /ch/01/mix/fader ,f
- sets up a link between MIDI ontinuous-controller 10 on MIDI channel 1, and the main fader on channel 1 of the XAir mixer. A ontinuous-controller value of 0 will yield a fader value of -oo dB, and a ontinuous-controller value of 127 will yield a fader value of +10 dB. Intermediate ontinuous-controller values will yield intermediate fader settings.
Generally used to tie a MIDI continuous-controller actuator (a foot pedal, knob, slider, etc) to a mixer parameter for realtime control with smooth, continous changes in values.
All continuous parameters on an XAir mixer take a float ,f
format and have a range of 0.0 to 1.0. String, ,s
and integer, ,i
formats are also possible but beyond the scope of this document.
cc2toggle MIDI-channel# CC# CC-ON# CC-OFF# OSC-address OSC-format
setup a one-to-one link between the MIDI continuous-controller CC# on MIDI channel MIDI-channel# and the OSC discrete (ON - OFF) parameter at OSC-address, with format OSC-format.
Example: cc2toggle 2 18 0 127 /ch/11/insert/on ,i
- sets up a link between MIDI continuous-controller 18 on MIDI channel 2, and the FX insert switch on channel 11 of the XAir mixer. A continuous-controller value of 0 will turn ON the FX insert, and a continuous-controller value of 127 will turn OFF the FX insert.
note2toggle MIDI-channel# Note# Reverse OSC-address OSC-format
setup a one-to-one link between the MIDI note Note# on MIDI channel MIDI-channel# and the OSC discrete (ON - OFF) parameter at OSC-address, with format OSC-format. Reverse controls the mapping, a Reverse value of 0 means note-on is ON and Reverse value of 1 means note-on is OFF.
Example: note2toggle 2 15 /ch/11/insert/on ,i
- sets up a link between MIDI Note 15 on MIDI channel 2, and the FX insert switch on channel 11 of the XAir mixer. A note-on (velocity greater than 0) at note 15 will turn ON the FX insert, and a note-off (velocity equal to 0) at note 15 will turn OFF the FX insert.
cctapspeed MIDI-channel# CC# MaxTime OSC-address OSC-format [multiplier]
noteontapspeed MIDI-channel# Note# MaxTime OSC-address OSC-format [multiplier]
pchtapspeed MIDI-channel# PCH# MaxTime OSC-address OSC-format [multiplier]
Send the reciprocal of the time between succesive taps (speed in Hz) on the given midi control to the speed parameter of a FX module. The MaxTime paramter sets the maximum tap interval (in milliseconds) that will be evaluated. The optional multiplier input allows the time interval to be multiplied by an integer to yield a slower speed for use when multi-measure cycle times of the effect are desired.
Tap controls can be a MIDI conintuous controller message, a NoteON message, or a program change message.
Notes: the MIDI CC version interprets any value of the given CC# as a tap. The NoteOn version only reads notes with a velocity value greater than 0 as a tap. Note values must be provided as a decimal integer between 1 and 127. The OSC-format parameter whould be ",s" in order to input the value in Hz. All single (stereo) FX modules have the speed parameter as the first parameter. Multi-module FX such as Delay-Chorus may have the speed parameter on a hogher number parameter (Delay-chorus has SPEED on parameter 7). The Rotary Speaker FX module has a low speed (parameter 1) and a high speed (parameter 2). This control can also be used with any other parameter that has units of Hz.
Example: noteontapspeed 1 75 20000 /fx/2/par/07 ,s 2
- send the reciprocal of the interval (multiplied by 2) between succesive NoteOn messages for Note 75 to the FX module in FX slot 2. Where paramter 7 of that module is the speed control (Delay-Chourus FX module).
cctaptime MIDI-channel# CC# MaxTime OSC-address OSC-format [divisor]
noteontaptime MIDI-channel# Note# MaxTime OSC-address OSC-format [divisor]
pchtaptime MIDI-channel# PCH# MaxTime OSC-address OSC-format [divisor]
Send the time between succesive taps (time in ms) on the given midi control to the speed parameter of a FX module. The MaxTime paramter sets the maximum tap interval (in milliseconds) that will be evaluated. The optional divisor input allows the time interval to be divided by an integer to yield a smaller time interval for use when sub-measure repeat times of the effect are desired.
Tap controls can be a MIDI conintuous controller message, a NoteON message, or a program change message.
Notes: the MIDI CC version interprets any value of the given CC# as a tap. The NoteOn version only reads notes with a velocity value greater than 0 as a tap. Note values must be provided as a decimal integer between 1 and 127. The OSC-format parameter whould be ",s" in order to input the value in ms. All FX modules have the time parameter as the first parameter except the Stereo Delay which has time as parameter 2. The time parameter in the Fair compressor FX modules will not work with these controls. This control can also be used with any other parameter that has units of ms.
Example: noteontaptime 1 75 3000 /fx/2/par/01 ,s 2
- send the time interval (divided by 2) between succesive NoteOn messages for Note 75 to the FX module in FX slot 2.
global file
Load a list of commands from a file on disk named file (use a full path if not in working directory). commands can be any valid command accepted by the script except global or prgm.
Multiple global
commands can be loaded simultaneously. Global commands occupy a single line in the "list"
Example: global OSClist1
Loads all commands from the file OSClist1. The file is a plain text file with a list of commands (one command per line).
prgm file
Load a list of commands from a file on disk named file (use a full path if not in working directory). Commands can be any valid command accepted by the script except prgm or global.
When multiple prgm
commands are loaded, only the most recent one remains active. Thus loading prgm OSClist1
will load all the commands from the file named OSClist1 in the current directory. Loading prgm OSClist2
will remove all OSClist1 commands and load all OSClist2 commands. Prgm commands occupy a single line in the "list"
Example: prgm OSClist1
Loads all commands from the file OSClist1. Unloads any other prgm
files previously loaded. the file is a plain text file with a list of commands (one command per line).
load file
Load a list of commands from a file on disk named file (use a full path if not in working directory). Commands can be any valid command accepted by the script.
Unlike the global
or prgm
commands, the load
command loads each command from file individually, as if they had been typed into the command line seperately. Each line from the file loaded occpies a sepereate line in the "list" The load
command does not unload any other commands.
Example: load OSClist1
Loads all commands from the file OSClist1. All commands from OSClist1 are loaded seperately, and must be unloaded (via a prune
command) individually.
list
List all running commands. Commands are preceeded by a number to be used for the prune
command
snapload snapshot#
load snapshot number snapshot# on the XAir mixer.
sendMIDI any-valid-sendmidi-command
send an arbitrary MIDI command.
Example: sendMIDI dev Port-0 ch 1 cc 2 3
- Send a Continous controller message of "3" on CC 2 over MIDI channel 1 on MIDI interface Port-0.
sendOSC any-valid-OSC-command
send an arbitrary OSC command to the server at OSC-server-IPv4-address. Multiple commands can be sent by seperating them with "\n" (the double quotes must be included).
Example: sendOSC /ch/01/mix/fader ,f 0.5
- Set the Main fader of channel 1 on an XAIR mixer to it's midpoint.
syscmd any-valid-shell-command
run an arbitrary sytem shell command in a subshell.
Example: syscmd ls -l
- lists the contents of the present working directory.
pch2 midichannel# pch# any-valid-command
When a program change message,pch#, is recieved on MIDI channel midichannel#, execute the NetOSC.sh command any-valid-command as if it had been typed into the terminal.
Example: pch2 1 22 snapload 12
- When a program change #22 is recieved on MIDI channel 1, load snapshot 12 on the XAir mixer.
cc2 midichannel# cc# cc-value any-valid-command
When a control change message,cc# cc-value, is recieved on MIDI channel midichannel#, execute the NetOSC.sh command any-valid-command as if it had been typed into the terminal.
Example: cc2 1 10 127 snapload 12
- When a control change #10 of value 127 is recieved on MIDI channel 1, load snapshot 12 on the XAir mixer.
setlist file1 file2 file3 ...
Create a set list from a space sepearated list of filenames. Only one setlist can be used at a time. Whenever the setlist command is invoked any previous setlist is deleted and replaced with the new list.
Example: setlist OSClist1 OSClist2 OSClist3
- load OSClist1, OSClist2,and OSClist3 as a setlist.
next
Load the next setlist program file. Starts at the first entry in the list after each setlist command.
previous
Load the previous setlist program file. Loads the first entry in the setlist if invoked after a setlist command with no next command invoked in between.
prune command# [addition-space-seperated-command#s ...]
Removes one or more commands from operation. Commands are specified by their listing number from a list
command. If command# is "all", all commands are removed.
save filename command# [addition-space-seperated-command#s ...]
Saves a list of cammands to a file called filename. commands are taken from the current "list" and are designated by their "list" command numbers. If command# is "all", all commands are saved to filename. filename is overwritten with each invokation.
append filename command# [addition-space-seperated-command#s ...]
Saves a list of cammands to a file called filename. commands are taken from the current "list" and are designated by their "list" command numbers. If command# is "all", all commands are saved to filename. filename is created if it does not exist and is appended to if it does exist.
MidiOSC.sh MIDI-input-device-name MIDI-output-device-name [command]
Reads MIDI command input on MIDI-input-device-name and send sysex-OSC commands to XAir mixer on MIDI device MIDI-output-device-name. An optional command input can be appended to the command line. Other commands are added interactively.
Once MidiOSC.sh
is invoked, commands are entered via the terminal. All commands remain active until deleted with a prune
command or until another prgm
command is entered in the case of prgm
(see below).
Commands are the same as NetOSC.sh, except that there is no OSC-format in the sysex-OSC protocol. All continuous values are the same as what is seen on the XAir Edit app. So a fader goes from -90 dB to +10 dB, not form 0.0 to 1.0.