-
Notifications
You must be signed in to change notification settings - Fork 7
Input Events
Here is a table of recognized input events, their functions, and parameters for which you can create bindings that handle the event. Bindings should specify the Output Events that should be performed in response to their respective input event and optionally, conditions which must be satisfied in order that output event be performed.
Although this is a declarative XML document, the freewheeling configuration system behaves more like a DSL programmining language. The 'go-sub' input/ouput pair is where the freewheeling configuration system shines with full brilliance. Some very clever things can be done with the judicious combinations of the 'go-sub' input event and the 'go-sub' output event. The input matrix is flexible in that different types of input events can be routed to different output events. There is also a parameter routing that connects input parameters like MIDI note velocity to control parameters within FreeWheeling. For example, you can specify that the number of the note pressed controls which loop is triggered. These input events can also be used as output events. For example, we can trigger a series of MIDI controller changes when a QWERTY key is pressed. An optional 'conditions' attribute may be declared to constrain the event such that multiple event handlers may exist for the same event with the first declared matching event shadowing those it precedes.
<binding input="key" conditions="keydown=1 and key=space" output="exit-freewheeling" />
A keyboard key is pressed or released.
- "keydown": 1 if key was pressed, otherwise 0
- "key": Name or number of the key (see above table)
<binding input="midicontroller" conditions="controlnum=64 and midichannel=0 and controlval=64>127" output="exit-freewheeling" />
A MIDI controller is changed.
- "outport": # of MIDI output to echo event to (1 is the first port)
- "midichannel": Channel of event (0 is the first channel)
- "controlnum": Number of control change
- "controlval": Value of control change
- "routethroughpatch": 1 sends this MIDI message through the port/channel(s) given by the current patch, 0 sends this message as described by outport/midichannel.
<binding input="midikey" conditions="keydown=1 and midichannel=0 and notenum=VAR_noterange and velocity=1>127" output="exit-freewheeling" />
A MIDI note is pressed or released.
- "outport": # of MIDI output to echo event to (1 is the first port)
- "keydown": 1 if note is pressed, 0 if note is released
- "midichannel": Channel of event (0 is the first channel)
- "notenum": Number of note
- "velocity": Velocity of noteon/noteoff
- "routethroughpatch": 1 sends this MIDI message through the port/channel(s) given by the current patch, 0 sends this message as described by outport/midichannel.
<binding input="midichannelpressure" conditions="midichannel=0 and pressureval=64" output="exit-freewheeling" />
A MIDI channel pressure (channel aftertouch) message.
- "outport": # of MIDI output to echo event to (1 is the first port)
- "midichannel": Channel of event (0 is the first channel)
- "pressureval": Pressure of keys
- "routethroughpatch": 1 sends this MIDI message through the port/channel(s) given by the current patch, 0 sends this message as described by outport/midichannel.
<binding input="midiprogramchange" conditions="midichannel=0 and programval=64" output="exit-freewheeling" />
A MIDI program change message.
- "outport": # of MIDI output to echo event to (1 is the first port)
- "midichannel": Channel of event (0 is the first channel)
- "programval": Program change #
- "routethroughpatch": 1 sends this MIDI message through the port/channel(s) given by the current patch, 0 sends this message as described by outport/midichannel.
<binding input="midipitchbend" conditions="midichannel=0 and pitchval=6000" output="exit-freewheeling" />
A MIDI pitch bend message.
- "outport": # of MIDI output to echo event to (1 is the first port)
- "midichannel": Channel of event (0 is the first channel)
- "pitchval": Pitch bender value
- "routethroughpatch": 1 sends this MIDI message through the port/channel(s) given by the current patch, 0 sends this message as described by outport/midichannel.
<binding input="joybutton" conditions="joystick=1 and button=3 and down=1" output="exit-freewheeling" />
A joystick button has been moved.
- "joystick": # of the joystick
- "button": # of the button
- "down": 1 if button is down, 0 if button is up
<binding input="joybutton" conditions="loopid=42 and button=3 and down=1 and in=1" output="exit-freewheeling" />
This event is generated whenever the user clicks a mouse button on a loop slot on-screen. It allows you to respond to clicks on loops.
- "loopid": Number of the corresponding loopid clicked on
- "button": Number of mouse button pressed/released
- "down": Mouse button down or up? (1 or 0)
- "in": Zero if the loop was clicked in the loop tray, One if the loop was clicked in a layout
<binding input="start-freewheeling" output="exit-freewheeling" />
FreeWheeling has just been started.
<binding input="go-sub" conditions="sub=2 and param1=VAR_inputs and param2=0.5" output="exit-freewheeling" />
Subroutine is being invoked - counterpart of the "go-sub" output event. Usage example:
<!-- This 'midicontroller' input event fires when a MIDI pedal is pressed.
As its output, it explicitly triggers a "go-sub" input event,
passing it an event ID of 2 along with some arbitrary bits of data. -->
<binding input="midicontroller" conditions="controlnum=VAR_footpedal_ctrl_num and
VAR_footpedal_ignore=0"
output="go-sub" parameters="sub=2 and
param1=VAR_footpedal_mode and
param2=controlval/127*VAR_footpedal_vol_max" />
<!-- This binding declares a "go-sub" input that accepts a sub parameter equal to 2.
Note that this event will produce no output unless all of the declared conditions are met.
As its output, it changes the volume using the parameters passed into it. -->
<binding input="go-sub" conditions="sub=2 and param1=VAR_inputs"
output1="set-in-volume" parameters1="input=param1 and vol=param2" />
This wiki is available, modifiable, and shareable under the GNU Free Documentation License.