switches block of the config.xml file
allows you to define what modes are assigned to each switch. The only
required assignments are for mode, increment
and decrement. See the Axe-Fx
data file for example mode/switch assignments.switches block).
Some defaults are described here.LoadBank metapatch; see example)Set channel)Send bank select)Send program change)device, then the name of the Axe-Fx program will appear in the display
if sync is enabled)Set channel)Set controller)Send control change)patch is simply a collection of commands that is identified by
a name and number. It has a type that defines when the commands are executed.Toggle, Momentary, Normal,
AxeToggle, AxeMomentary, AxeFxTapTempo
or Sequence. Except for Sequence-mode patches,
patches can have commands that are assigned to one of two
groups: "A" and "B". Toggle patches
operate by sending the group A commands on one
press of a switch, and sending the group B commands on a second press of the
switch. Momentary patches operate by sending the group A
commands on the press of the switch, and sending the group B commands on the
release of the switch. Normal patches operate by sending the group
A commands on the press of the switch and sending the group B
commands when another Normal patch is activated. Pressing the switch for
a Normal patch two times in a row results in the group A
commands being exectuted, followed by the group B commands and then
the group A commands again.AxeToggle and AxeMomentary patches work the same as
Toggle and Momentary except that they do an Axe-Fx sync
after the command has been invoked. See the Axe-Fx page for
more info.AxeFxTapTempo is the same as Momentary except that the switch
LED blinks in response to the real-time tempo sysex message sent by an Axe-Fx (if a) the
MIDI Out is connected to the MIDI In of mTroll and b) the Axe-Fx is configured to send
real-time tempo sysex messages).Sequence patches execute a command for each press of a switch.Patches support an optional channel (or device)
attribute that is used as the default channel/device
for patchCommands in the patch. Even if a
channel/device is specified, patchCommands
can specify their own.A"
or "B", with "A" being the default if group
is unspecified).midiByteString command is used to specify, in hex, a single, or
multiple, MIDI commands to send.ProgramChange, ControlChange, NoteOn and
NoteOff commands are simpler to use than midiByteStrings for
those MIDI messages. These commands support a channel (or
device) attribute. If no channel or device
attribute is specified, then mTroll looks for a channel or
device attribute on the Patch that contains the
command.RefirePedal command can be used to resend the current value of an
expression pedal. This is useful if you have left an expression pedal at some random
value and want to use a patch to toggle between a pre-determined value and that
random value.Sleep command can be used to pause a command sequence for an amount
of time specified in milliseconds. Note that the actual amount of time paused will
not exactly match the time specified since the OS is not a real-time system, but it
will be close enough that variances shouldn't matter. The Sleep command pauses everything
in mTroll: MIDI output, MIDI input and the UI. Example of a 5 second sleep:
<Sleep group="A">5000</Sleep>AxeProgramChange command is an Axe-Fx specific version of the generic
ProgramChange command. When you use this command, you do not have to
use bank select messages. You can use the actual Axe-Fx preset number. mTroll will
translate the preset into the correct bank select and program change. Afterwards,
mTroll will sync up all AxeToggle and AxeMomentary patches. It
will also display the name of the preset in the main window. Example code to load Axe-Fx
preset 361: <AxeProgramChange program="361"/>patches list using the engineMetaPatch tag.ResetBankPatches meta-patch resets all of the patches in a bank that are
currently considered active (without sending any MIDI data out the MIDI port) and clears
the switch LEDs (turns off any lit LEDs). This is useful for clearing patches like toggle
or sequence mode patches, but would not have any effect on momentary mode patches.ResetBankPatches example:<engineMetaPatch name="Reset bank (meta)" number="50" action="ResetBankPatches" />LoadBank meta-patch is a patch that can be assigned to any switch in a bank
that causes the controller to load another bank. This could be used to create a sequence
of banks and provides for immediate one switch access to any bank from any bank.LoadBank example:<engineMetaPatch name="Load bank 1 (meta)" number="51" action="LoadBank" bankNumber="1" />Backward and Forward meta-patches are patches that can be assigned
to any switch in a bank that operate like the history function of a web browser. They
are unlike Next and Previous in that they remember the order of banks that you have
actually loaded. The Backward and Forward meta-patches operate
instantly (no confirmation switch press is required).Backward and Forward examples:<engineMetaPatch name="Last Bank Visited" number="52" action="BankHistoryBackward" /><engineMetaPatch name="Forward" number="53" action="BankHistoryForward" />Recall meta-patch is a patch that can be assigned to any switch in a bank
that causes the controller to switch back and forth between the currently loaded bank and the
previously loaded one; it is similar to 'channel recall' on TV remote controls. It can be
invoked repeatedly to switch back and forth between two banks (map it to the same switch
in multiple banks). (This is basically an automatic application of Backward and
Forward.)Recall example:<engineMetaPatch name="Bank Recall" number="54" action="BankHistoryRecall" />LoadNextBank and LoadPreviousBank meta-patches are patches
that can be assigned to any switch in a bank that operate like conventional MIDI foot controller
bank navigation switches. They are unlike Next and Previous in Bank Navigation mode in that
operate instantly; no confirmation switch press is required as is during Bank Navigation mode.LoadNextBank and LoadPreviousBank examples:<engineMetaPatch name="Prev Bank" number="910" action="LoadPreviousBank" /><engineMetaPatch name="Next Bank" number="911" action="LoadNextBank" />SyncAxeFx meta-patch is used in conjunction with an Axe-Fx processor. See the
Axe-Fx page for more info.SyncAxeFx example:<engineMetaPatch name="Sync Up AxeFx Bypass States" number="912" action="SyncAxeFx" />Patches to switch numbers. The
mappings are made via PatchMap. Banks have a name and a
number. They are also where ExclusiveSwitchGroups are defined.
Think of the mappings as temporary; they are only in effect when the bank
is actually loaded. Only one bank at a time is ever loaded/active.<bank name="Some Bank" number="2">
<PatchMap switch="9" patch="25" />
<PatchMap switch="10" patch="26" />
<ExclusiveSwitchGroup>9 10</ExclusiveSwitchGroup>
</bank>
PatchMap associates a patch with a switch while
the bank is loaded. Think of the mappings as temporary; they
are only in effect when the bank in which they are defined is active.
Multiple patches can be associated with a single switch via multiple
PatchMap statements.
<PatchMap switch="8" patch="20" />
<PatchMap switch="9" patch="25" />
<PatchMap switch="9" patch="32" />
<PatchMap switch="9" patch="45" />
PatchMap with an empty patch number
attribute (eg <PatchMap switch="10" patch="" /> ).
See also Instant Access.PatchMaps support a number of optional attributes.
loadState and unloadState are used to fire
patch group commands when the bank that
the PatchMap is defined in, is either loaded or unloaded.
For example, use
<PatchMap switch="8" patch="20" loadState="A" /> to
automatically execute the "A" group of commands in
patch 20 every time the bank is loaded.override attribute prevents Toggle patches
from changing state when the switch they are mapped to is pressed. You
override the state transition and specify whether the "A"
group or "B" group should remain engaged:
<PatchMap switch="8" patch="20" override="B" />.sync attribute is only applicable when multiple
patches are mapped to a single switch (via multiple
PatchMaps). Like the override attribute,
sync is only applicable to Toggle patches.
sync allows you to control how the patches
toggle relative to the primary patch (the first one mapped
to the switch). The first patch behaves as usual. The
others can be configured to toggle in phase or out of phase with the
first. <PatchMap switch="8" patch="20" sync="outOfPhase" />sync options work relative to the first PatchMap
per switch in a bank. sync options are not
applicable to the first PatchMap per switch. If the
sync attribute is not present, sync among patches assigned
to the same switch is ignored (sibling patches are toggled as is; they might
all be in the same state, they might not - they are not explicitly sync'd up).
sync="inPhase" will cause the sibling patch to sync
identically to the master/primary patch. sync="outOfPhase"
will cause the sibling patch to sync to the opposite state of the
master/primary patch.
<bank name="Defaults" number="0">) including
next/previous bank functionality.
ExclusiveSwitchGroup is a list of switches (defined in a bank) in which only one
switch is allowed to be active (analogous to radio buttons since only one radio station
can be selected at a time). When you press a new switch in an exclusive group, the
previously selected patch in the group is released. The group does not need to be contiguous;
a group could be composed of a column, a row, a block, every other switch, etc. It makes
most sense with groups of toggle patches.ExclusiveSwitchGroup example (defined in a bank along with its
PatchMaps):<ExclusiveSwitchGroup>2 7 12</ExclusiveSwitchGroup>
Linear)AudioLog)ReverseAudioLog)ShallowLog)ReverseShallowLog)PseudoLog)ReversePseudoLog)
sweepCurve attribute is used to specify the curve:
<globalExpr inputNumber="2" assignmentNumber="1" channel="12" controller="31"
min="0" max="127" invert="0" enable="1" sweepCurve="AudioLog" />
globalExpr (or localExpr) blocks map a patch number
to the virtual bottom and/or top switches. For the bottom switch, when the pedal
is heel-down, the patch will be deactivated/off. When the pedal moves, before it
starts sending ccs, if the patch has not been activated, it will be activated. For
the top switch, when the pedal is toe-down, the patch will be deactivated/off. When
the pedal moves, before it starts sending ccs, the patch will be activated if it
is not already active. The patch numbers that are assigned here will typically be
toggle type patches. The patches do not need to be assigned to any bank, but if they
are, then it will be easy to see the state (activated/deactivated) via the LED that
the patch is assigned to (it will be updated when the pedal hits the virtual switch
or moves away from it).localExpr (makes sense since
the globalExpr blocks are defined outside of any patch). Also, the
patch referenced in a globalExpr or localExpr block
should not itself have any globalExpr or localExpr blocks
(has not been tested - what would happen to the pedal settings that caused
activation of the patch in the first place?).[bottom|top]ToggleZoneSize and
[bottom|top]ToggleDeadzoneSize.
The [bottom|top]ToggleZoneSize
is the size of the patch deactivation/off zone (in adc units) at the bottom/top of
the pedal where a switch would physically be. A size of 1 will be the most common
value for a properly calibrated pedal but you might want a larger zone depending on
the situation.
[bottom|top]ToggleDeadzoneSize allows you to specify a gap between
the toggle zone and the zone of travel that actually sends ccs. You will want a
large enough gap that you don't accidentally deactivate your patch while swinging
back and forth on the pedal modifying a controller.
ADC Values: 0 ........... 1023 (assuming minimumAdcVal="0" maximumAdcVal="1023")
CC Values: | 0 ........ 127 | (assuming min="0" max="127" invert="0")
Zones: | active CC zone |
If only the bottom switch is enabled in a patch, the pedal is divided into 3 zones:
ADC Values: 0 ........................................................... 1023
CC Values: ------------- no ccs sent --------------------- | 0 ........ 127 |
Zones: bottomToggleZoneSize | bottomToggleDeadzoneSize | active CC zone |
If only the top switch is enabled in a patch, the pedal still has 3 zones, but arranged as:
ADC Values: 0 ..................................................... 1023
CC Values: | 0 ........ 127 | ----------------- no ccs sent -----------
Zones: | active CC zone | topToggleDeadzoneSize | topToggleZoneSize
When both switches are enabled in a patch, the pedal has a total of 5 zones:
ADC Values: 0 ..................................................................................................... 1023
CC Values: ------------- no ccs sent --------------------- | 0 ........ 127 | ----------------- no ccs sent -----------
Zones: bottomToggleZoneSize | bottomToggleDeadzoneSize | active CC zone | topToggleDeadzoneSize | topToggleZoneSize
All of the zone sizes except for "active CC zone" are explicitly defined via
calibration of the adc port (see previous section).
The "active CC zone" is
computed differently for each expression definition taking into consideration
how many zones are required and the defined values for the other zones.
Virtual toggles defined in a patch will not work unless the adc has been set to operate
with virtual toggles (by assigning values to two zone attributes for each virtual switch).
Calibrating (or defining) virtual toggles at the adc port does not mean
that every assigned use of the pedal gets a virtual toggle. As with the initial
calibration, use the Raw ADC Value engine mode to determine an
appropriate size for each of the zones.
<adc inputNumber="2" enable="1" minimumAdcVal="1" maximumAdcVal="1020"
bottomToggleZoneSize="1" bottomToggleDeadzoneSize="150"
topToggleZoneSize="1" topToggleDeadzoneSize="100" />
Once calibrated, the next step is to edit the expression pedal definition that
you want to have a virtual switch in. In the globalExpr
(or localExpr) node, assign a patch number to either (or both)
bottomTogglePatchNumber or
topTogglePatchNumber to enable the virtual switch in the expression
pedal definition. If an expression pedal definition does not have either
bottomTogglePatchNumber or topTogglePatchNumber, then
the pedal behaves as a normal expression pedal even though the adc
port has the virtual zone attributes defined (the zone attributes are only used
when a globalExpr or localExpr has one of the
togglePatchNumber attributes defined).
<globalExpr inputNumber="2" assignmentNumber="1" channel="12" controller="31"
min="0" max="16383" invert="0" enable="1" doubleByte="1"
bottomTogglePatchNumber="1" topTogglePatchNumber="2" />
It takes both the adc port virtual zone
calibration/definition and the globalExpr
(or localExpr) bottomTogglePatchNumber (and/or
topTogglePatchNumber) for the virtual switch to be functional.
minimumAdcVal and
maximumAdcVal attributes of the adc record for the port (specified by the inputNumber attribute)
on which you did the full sweeps. You may want to give youself a cushion and record a slightly
higher number than the minimum for the minimum; and a slightly lower number than the maximum
for the maximum.enable attribute to "0".expression block.port refers to the MIDI out port that the expression pedals
will transmit to.
<expression port="1">
Next are the adc nodes where the four monome adcs are enabled and where the
pedals attached to each adc port are calibrated (each port is calibrated independently since
different physical pedals are attached to each port).
<adc inputNumber="1" enable="1" minimumAdcVal="10" maximumAdcVal="1015" />
<adc inputNumber="2" enable="1" minimumAdcVal="10" maximumAdcVal="1015" />
<adc inputNumber="3" enable="1" minimumAdcVal="10" maximumAdcVal="1015" />
<adc inputNumber="4" enable="1" minimumAdcVal="10" maximumAdcVal="1015" />
Next are the global MIDI assignments for each pedal (inputNumber 1 - 4).
Each pedal can have up to two global assignments (assignmentNumber 1 - 2).
Use two volume assignments where one is inverted to do a cross-fade.
The maximum value for the max attribute is 127 for standard single byte
controllers and 16383 for double byte controllers (only available for controller
numbers 0 - 31 when the doubleByte="1" attribute is specified). When
doubleByte="1", the MSB controller value is sent on the controller specifed
and the LSB value is sent on controller + 32. The minimum value for the min
attribute is 0.
<globalExpr inputNumber="1" assignmentNumber="1" channel="7" controller="2"
min="0" max="127" invert="0" enable="1" />
<globalExpr inputNumber="1" assignmentNumber="2" channel="8" controller="2"
min="0" max="127" invert="1" enable="1" />
<globalExpr inputNumber="2" assignmentNumber="1" channel="4" controller="2"
min="0" max="127" invert="0" enable="1" />
<globalExpr inputNumber="2" assignmentNumber="2" channel="5" controller="2"
min="0" max="127" invert="1" enable="1" />
<globalExpr inputNumber="3" assignmentNumber="1" channel="11" controller="110"
min="0" max="127" invert="0" enable="1" />
<globalExpr inputNumber="3" assignmentNumber="2" channel="12" controller="110"
min="0" max="127" invert="1" enable="1" />
<globalExpr inputNumber="4" assignmentNumber="1" channel="12" controller="31"
min="0" max="16383" invert="0" enable="1" doubleByte="1" />
And finally, the section closing tag.
</expression>