This environment is virtually identical to the batonImprov environment, but adds extra MIDI input/output intended for connecting to another computer via MIDI for performance with another batonImprov or synthImprov program. Also may be used to have both radio baton-computer interaction as well as synthesizer keyboard-computer interaction.
There are four primary global variables in the batonSynthImprov environment:
Shown below is a schematic of the device connections inteneded for the batonCompImprov environment. Note that the global objects synth, baton and computer descibed below represents a MIDI synthesizer/keyboard and radio drum as shown in the figure below.
The batonCompImprov environment can also be used with the computer object connected to the MIDI input/output of a synthesizer keyboard as shown in the figure below:
In addition to the three primary global variables, there are some other global variables which are identical to variables inside of the baton object: Baton state variables: The values below are integers in the range from 0 to 127 (7-bit MIDI data). The x-axis goes from left (0) to right (127). The y-axis goes from near (0) to far (127). The z-axis goes from low (127) to high (~0). Positions of the sticks are updated about 50 times per second. Triggers are updated when the sticks pass through the horizontal trigger plane.
The basic structure of a batonImprov program is shown below. You must: (1) include a particular interface (in this case the default console interface defined in the file "batonImprov.h", and (2) define the thirteen user functions (which can be defined as empty as shown below). See the batonSynthImprov examples directory for examples of what to put into the function definitions below.
#include "batonSynthImprov.h" void description(void) { } void initialization(void) { } void finishup(void) { } void mainloopalgorithms(void) { } void stick1trig(void) { } void stick2trig(void) { } void b14plustrig(void) { } void b15plustrig(void) { } void b14minusuptrig(void) { } void b14minusdowntrig(void) { } void b15minusuptrig(void) { } void b15minusdowntrig(void) { } void keyboardchar(int key) { }
Here is a template file which you can use to create a synthImprov program: batonSynthTemplate.cpp.
The default console interface for the batonImprov environment can be loaded into the batonImprov program by adding the preprocessor line:
#include "batonSynthImprov.h"somewhere near the top of your batonImprov program. Described below are the basic commands defined in the console interface. Note that all commands are defines with characters which use the shift key. ch3> batonImprov console interface commands