-
Notifications
You must be signed in to change notification settings - Fork 7
User Variables
It is also possible to create your own user variables. These can then be referenced in your bindings, or changed during runtime, for a much more dynamic user interface. Using a combination of user variables and careful configuration of bindings, a highly tailored user interface can be created.
- NOTE: as of version 0.5pre3, FreeWheeling automatically indexes your bindings based on a hash key, so there is no need to specify wildcard cases (previously done with midikey="*").
- NOTE: user variables must be declared and initialized before they are used.
<declare var="VAR_NAME" type="text" init="initial value">
For example, the binding below will set trigger volume for loops across a range of notes. The binding checks to see that the MIDI note number matches the user variable "VAR_noterange". Since "VAR_noterange" is a range variable, this means that the binding will only trigger event "set-trigger-volume" if the note number is within the range specified by "VAR_noterange".
binding input="midikey" conditions="VAR_cutmode=1 and notenum=VAR_noterange and keydown=1" output="set-trigger-volume" parameters="loopid=notenum and vol=velocity/127"
This binding is used to move a loop onto a piano key. Presumably, this is a special case where we have a loop in a holding place (such as a loop grabbed by a footswitch), and we want to move from that holding place onto the MIDI keyboard.
binding input="midikey" conditions="VAR_xferloop=1 and notenum=VAR_noterange and keydown=1" output="move-loop" parameters="oldloopid=VAR_xferidx and newloopid=notenum+VAR_loopid_pianostart"
Checks these conditions:
- Input event is a MIDI Key
- Variable 'VAR_xferloop' equals 1?
- Input parameter notenum is within range of variable 'VAR_noterange' (When comparing against a range, a condition is true when the value is within the bounds of the range)
- Input parameter keydown equals 1
This wiki is available, modifiable, and shareable under the GNU Free Documentation License.