sean-e / mTroll

mTroll is the software MIDI control engine part of a hybrid hardware/software MIDI foot controller, but can be used standalone on Windows.
http://www.creepingfog.com/mTroll/
GNU General Public License v3.0
4 stars 0 forks source link

add support for referencing commands from another patch in a patch definition #26

Open sean-e opened 1 year ago

sean-e commented 1 year ago

In the following patch definitions, the hex string used in the momentary patch command duplicates the same strings already defined, since there is no way to refer to the commands of another patch:

<patch name="Delay 1 Hold" device="Axe-Fx" type="toggle" >
    <midiByteString name="A">F0 00 01 74 10 01 09 00 46 00 1B 00 00 00 00 00 04 00 00 44 F7</midiByteString>
</patch>
<patch name="Delay 1 no repeat" device="Axe-Fx" type="toggle" >
    <midiByteString name="A">F0 00 01 74 10 01 09 00 46 00 1B 00 00 00 00 00 00 00 00 40 F7</midiByteString>
</patch>
<patch name="Delay 1 Hold (mom)" device="Axe-Fx" type="momentary" >
    <midiByteString name="A">F0 00 01 74 10 01 09 00 46 00 1B 00 00 00 00 00 04 00 00 44 F7</midiByteString>
    <midiByteString name="B">F0 00 01 74 10 01 09 00 46 00 1B 00 00 00 00 00 00 00 00 40 F7</midiByteString>
</patch>

A workaround for a composite toggle uses the PatchListSequence patch type:

<patch name="Delay 1 Hold (tgl)" device="Axe-Fx" type="patchListSequence" gaplessRestart="1" initialStep="1" >
    <patchListItemName>Delay 1 no repeat</patchListItemName>
    <patchListItemName>Delay 1 Hold</patchListItemName>
</patch>

but it's really just a hack for the same issue. The same hack doesn't make sense for a momentary use.