Hello everybody,
i think i found a bug in the ctrlpreset, ctrlselect and ctrlsave opcodes.
i created a .csd for controlling presets for a midi controller (encoder).
i can save presets like i want, to a .txt file. in the .txt file everything looks fine. so i guess ctrlsave and ctrlpreset are fine.
but the problem starts when i recall presets.
to describe the problem, let’s assume i have cc 1 - 4.
i save a preset-1 with
cc1: 127
cc2: 0
cc3: 0
cc4: 0
i save preset-2 with
cc1: 0
cc2: 127
cc3: 0
cc4: 0
now i recall preset-1 and everything is like expected.
now i change e.g. cc4 manually to 127.
so the setting is
cc1: 127
cc2: 0
cc3: 0
cc4: 127
now i want to recall preset-2
and i get
cc1: 0
cc2: 127
cc3: 0
cc4: stays 127!!! but should be 0, like i the preset i saved.
here is my .csd. maybe i also did a mistake, but i think i didn’t.
/* opcodes fore midi presets:
ctrlselect: loads a preset of values via a tag
ctrlpreset: defines a preset with a tag
ctrlprintpresets: Prints the current collection of presets for MIDI
controllers of a txt file
*/
// macro for updating a midi controller
;; gets the current cc of a MIDI controller
;; and sends it to itself
;; can be used to init a controller with values or update a controller
;; after a preset call
#define UPDATE_CC(Chn'CC)