switchesblock of the config.xml file allows you to define what modes are assigned to each switch. The only required assignments are for
decrement. See the Axe-Fx data file for example menu/switch assignments.
switchesblock). Some defaults are described here.
LoadBankmetapatch; see example)
Send bank select)
Send program change)
device, then the name of the Axe-Fx program will appear in the display if sync is enabled)
Send control change)
patchis simply a collection of commands that is identified by a name and number. It has a type that defines when the commands are executed.
Sequence. Except for
Sequence-mode patches, patches can have commands that are assigned to one of two groups:
Togglepatches operate by sending the group
Acommands on one press of a switch, and sending the group
Bcommands on a second press of the switch.
Momentarypatches operate by sending the group
Acommands on the press of the switch, and sending the group
Bcommands on the release of the switch.
Normalpatches operate by sending the group
Acommands on the press of the switch and sending the group
Bcommands when another
Normalpatch is activated. Pressing the switch for a
Normalpatch two times in a row results in the group
Acommands being exectuted, followed by the group
Bcommands and then the group
AxeMomentarypatches work the same as
Momentaryexcept that they do an Axe-Fx sync after the command has been invoked. See the Axe-Fx page for more info.
AxeFxTapTempois the same as
Momentaryexcept 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).
Sequencepatches execute a command for each press of a switch.
patchListSequenceis similar to the
sequencepatch type but references other patches instead of patch commands. It makes it possible to step through a list of patches by pressing the same switch repeatedly. At the end of the list, the sequence repeats.
patchListSequencesample definition (patches 401-403 are not shown):
<patch type="patchListSequence" name="Pedal List" number="400">
Patches support an optional
device) attribute that is used as the default
patchCommands in the
patch. Even if a
patchCommands can specify their own.
A" or "
B", with "
A" being the default if
midiByteStringcommand is used to specify, in hex, a single, or multiple, MIDI commands to send.
NoteOffcommands are simpler to use than
midiByteStrings for those MIDI messages. These commands support a
device) attribute. If no
deviceattribute is specified, then mTroll looks for a
deviceattribute on the
Patchthat contains the command.
RefirePedalcommand 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.
Sleepcommand 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:
AxeProgramChangecommand is an Axe-Fx specific version of the generic
ProgramChangecommand. 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
AxeMomentarypatches. It will also display the name of the preset in the main window. Example code to load Axe-Fx preset 361:
patcheslist using the
ResetBankPatchesmeta-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.
<engineMetaPatch name="Reset bank (meta)" number="50" action="ResetBankPatches" />
LoadBankmeta-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.
<engineMetaPatch name="Load bank 1 (meta)" number="51" action="LoadBank" bankNumber="1" />
Forwardmeta-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
Forwardmeta-patches operate instantly (no confirmation switch press is required).
<engineMetaPatch name="Last Bank Visited" number="52" action="BankHistoryBackward" />
<engineMetaPatch name="Forward" number="53" action="BankHistoryForward" />
Recallmeta-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
<engineMetaPatch name="Bank Recall" number="54" action="BankHistoryRecall" />
LoadPreviousBankmeta-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.
<engineMetaPatch name="Prev Bank" number="910" action="LoadPreviousBank" />
<engineMetaPatch name="Next Bank" number="911" action="LoadNextBank" />
ResetExclusiveGroupmeta-patch resets all of the patches in an exclusive group that are currently considered active (without sending any MIDI data out the MIDI port) and clears the switch LEDs (turns off any lit LEDs). The
activeSwitchattribute is a switch number from the group that should be set active.
<engineMetaPatch name="Reset group (meta)" number="55" action="ResetExclusiveGroup" activeSwitch="10" />
SyncAxeFxmeta-patch is used in conjunction with an Axe-Fx processor. See the Axe-Fx page for more info.
<engineMetaPatch name="Sync Up AxeFx Bypass States" number="912" action="SyncAxeFx" />
Patchesto 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" />
patchwith a switch while the
bankis 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 switch="8" patch="20" />
<PatchMap switch="9" patch="25" />
<PatchMap switch="9" patch="32" />
<PatchMap switch="9" patch="45" label="Different Text"/>
PatchMapwith an empty patch number attribute (eg
<PatchMap switch="10" patch="" />). See also Instant Access.
PatchMaps support a number of optional attributes:
labelis used to set text on the switch display, overriding the name of the first patch that would otherwise display.
unloadStateare used to fire
patchgroup commands when the
PatchMapis 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
patch20 every time the
Togglepatches 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" />.
syncattribute is only applicable when multiple
patches are mapped to a single switch (via multiple
PatchMaps). Like the
syncis only applicable to
syncallows you to control how the
patches toggle relative to the primary
patch(the first one mapped to the switch). The first
patchbehaves 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" />
syncoptions work relative to the first
PatchMapper switch in a
syncoptions are not applicable to the first
PatchMapper switch. If the
syncattribute 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.
PatchMapattribute. When the attribute is not present, the switch works normally regardless of the length of the press on the switch. When the attribute is present, the switch behaves differently depending on the length of time the switch is held down. Momentary patches will not work when a secondary function has been defined for a switch. Secondary function works best with toggle patches.
manual: simply changes switch display; this is the default if no value is specified for the attribute; transitions between modes without changing state of patches in either mode
autoOn: transitions between modes; changes switch display and 'presses switch' of 2nd patch
autoOff: transitions between modes; changes switch display; in secondary mode, user must press again to enable; in secondary mode, normal press to disable also does 'long-press' to transition back to primary mode
auto: transitions between modes; changes switch display and 'presses switch' of 2nd patch to enable; in secondary mode, normal press to disable also does 'long-press' to transition back to primary mode
immediateToggle: does not transition between modes; activates second (presses switch of 2nd patch), but switch stays in primary mode (use extended press to force a transition when this value is used)
<PatchMap switch="10" patch="20" />
<PatchMap switch="10" patch="25" secondFunction="immediateToggle" />
<PatchMap switch="11" patch="32" />
<PatchMap switch="11" patch="45" secondFunction="auto" />
<bank name="Defaults" number="0">) including next/previous bank functionality.
ExclusiveSwitchGroupis 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.
ExclusiveSwitchGroupexample (defined in a
bankalong with its
<ExclusiveSwitchGroup>2 7 12</ExclusiveSwitchGroup>
sweepCurveattribute 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" />
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
globalExprblocks are defined outside of any patch). Also, the patch referenced in a
localExprblock should not itself have any
localExprblocks (has not been tested - what would happen to the pedal settings that caused activation of the patch in the first place?).
[bottom|top]ToggleZoneSizeis 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]ToggleDeadzoneSizeallows 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.
If only the bottom switch is enabled in a patch, the pedal is divided into 3 zones:
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 top switch is enabled in a patch, the pedal still has 3 zones, but arranged as:
ADC Values: 0 ........................................................... 1023 CC Values: ------------- no ccs sent --------------------- | 0 ........ 127 | Zones: bottomToggleZoneSize | bottomToggleDeadzoneSize | active CC zone |
When both switches are enabled in a patch, the pedal has a total of 5 zones:
ADC Values: 0 ..................................................... 1023 CC Values: | 0 ........ 127 | ----------------- no ccs sent ----------- Zones: | active CC zone | topToggleDeadzoneSize | topToggleZoneSize
All of the zone sizes except for "active CC zone" are explicitly defined via calibration of the
ADC Values: 0 ..................................................................................................... 1023 CC Values: ------------- no ccs sent --------------------- | 0 ........ 127 | ----------------- no ccs sent ----------- Zones: bottomToggleZoneSize | bottomToggleDeadzoneSize | active CC zone | topToggleDeadzoneSize | topToggleZoneSize
adcport (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
adchas 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
adcport does not mean that every assigned use of the pedal gets a virtual toggle. As with the initial calibration, use the
Raw ADC Valueengine mode to determine an appropriate size for each of the zones.
Once calibrated, the next step is to edit the expression pedal definition that you want to have a virtual switch in. In the
<adc inputNumber="2" enable="1" minimumAdcVal="1" maximumAdcVal="1020" bottomToggleZoneSize="1" bottomToggleDeadzoneSize="150" topToggleZoneSize="1" topToggleDeadzoneSize="100" />
localExpr) node, assign a patch number to either (or both)
topTogglePatchNumberto enable the virtual switch in the expression pedal definition. If an expression pedal definition does not have either
topTogglePatchNumber, then the pedal behaves as a normal expression pedal even though the
adcport has the virtual zone attributes defined (the zone attributes are only used when a
localExprhas one of the togglePatchNumber attributes defined).
It takes both the
<globalExpr inputNumber="2" assignmentNumber="1" channel="12" controller="31" min="0" max="16383" invert="0" enable="1" doubleByte="1" bottomTogglePatchNumber="1" topTogglePatchNumber="2" />
adcport virtual zone calibration/definition and the
topTogglePatchNumber) for the virtual switch to be functional.
maximumAdcValattributes of the
adcrecord for the port (specified by the
inputNumberattribute) 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.
enableattribute to "0".
portrefers to the MIDI out port that the expression pedals will transmit to.
Next are the
adcnodes 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).
Next are the global MIDI assignments for each pedal (
<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" />
inputNumber1 - 4). Each pedal can have up to two global assignments (
assignmentNumber1 - 2). Use two volume assignments where one is inverted to do a cross-fade. The maximum value for the
maxattribute 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
minattribute is 0.
And finally, the section closing tag.
<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" />