41
4.2.
Defining data variables
The use of data variables in your setup is definitely an optional advanced feature. As long as you don’t
intend to use this you can safely skip this part of the documentation.
Right after specifying the used MIDI channels as described in the previous topic, you now (optionally)
specify each of the data variables you intend to use. A variable name always starts with ‘$’. Give the
variable an initial value, this way the TinyBox setup compiler can detect which data format the variable
will contain: a numeric value (between 0 and 127), a boolean value (true or false), or a string value
(any text between double quotes) :
VAR $currentPreset = 56
VAR $delay = false
VAR $currentSong = “Go with the flow”
A numeric variable can be widely used in the setup: as it can contain any value between 0 and 127, it
can directly replace a “hardcoded” value as part of any MIDI message. Whenever you would normally
type a value between 0 and 127, you can type ‘$’ and the editor will propose a dropdown list with all
available numeric data variables :
We will go into more detail about the possibilities when covering the “variable commands” and
“conditional commands” later on in this manual.