Preset Template Symbols

TabSel

2011-12-23 13:58:31

Imagine you create a preset for a dedicated Button on a Midi Device. You want this button to output many different midi CC messages like a Gate CC1 (down=127, up=0), a Button Up Trigger CC2 (up=127), a down/hold Trigger (button down, then held for 1000ms->CC3 (timer down=127), a click, a clickn'hold, a double click, a double clickn'hold etc...........

This preset contains of many many translators, timers etc...

you start creating the translators for one dedicated button you test with while coding. After this one button works like it should, you want to do this for all other 15 buttons of this Midi Device...

Currently, there's no other way than duplicating the preset and go through all new translators, changing variables, timers, midi message bytes etc...

15 times in a row... only to notice, that you had not thought about a special case, and you have to alter the translator table for the button... now, again, 15 times in a row... etc... oh. my. god....

Now, what about Preset Template Symbols:

In the preset property page, you specify wether a Preset is a Translator Table like now, or a Reference Preset with a reference to another Preset and Symbol Values, with Symbols like:

<!ButtonNr!>="1"
<!CCNumber!>="00"
<!Channel!>="f"

etc...

and whenever there is a reference to a Template Symbol in the referenced Preset, a runtime relevant string (like midi message, timer name, variable name, you name it...), a Template Symbol occurence "...<!Button1!>..." in this string is replaced with the corresponding Symbol Value string specified in the Preset Property, at runtime...

Thus a Midi message "B0 <!CCNumber!> 7F" is replaced to "B0 00 7F" in this example, a Timer Name String "Button<!ButtonNr!> down hold" is replaced with "Button1 down hold", a rule "g<!Channel!>=1" is replaced with "gf=1"...

Thus, developing the preset ONCE for a button, creating one Reference Preset and Symbols, and when ready, simply duplicate the Reference Preset and only set necessary Template Symbols for every other Button...

or something similar...

florian

2012-01-24 20:27:02

Hi TabSel,

yes, this or a similar way to create Templates would be great. And I fully understand the pain of trying to maintain 16 almost equal presets!

Thanks for the suggestions. We'll work something out...

Best,
Florian