DISTRHO / Cardinal

Virtual modular synthesizer plugin
https://cardinal.kx.studio/
GNU General Public License v3.0
2.22k stars 153 forks source link

Values are not properly saved in patch/preset for certain PatchMaster controllers, Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11 #519

Open GBaige opened 1 year ago

GBaige commented 1 year ago

This will occur if Controller 2 (which by default is a button) is changed to any other unipolar or bipolar controller. Values saved greater than 0.5 will load as 1, and values saved lower than 0.5 will load as 0.

If more controllers are added, none will present these issues. If the controller that presents these issues is deleted, and a new controller is added, then this new controller (which will be named Controller 2) will present these issues.

The only known solution is to simply hide and ignore Controller 2 in the context menu, since newly added controllers (and Controller 1) will work properly.

When a PatchMaster controller, e.g. a unipolar medium knob, is mapped to a parameter that is normally hidden, e.g. Macro Oscillator 2's LPG decay knob which can be accessed through the context menu, values set by the user for the mapped control are not properly saved to the patch. Values under 0.5 will load as 0, and values over 0.5 will load as 1.

Steps to reproduce:

~~1. Load Macro Oscillator 2 and PatchMaster

  1. Right-click on Macro Oscillator 2 and click "Edit LPG response/decay"
  2. Map a PatchMaster knob to the LPG decay knob, then set its value to any value.
  3. Save the patch, then load it again.~~

As stated before, if you set the knob's value under 0.5, the patch will load with the knob at a value of 0. If over 0.5, the knob will be at 1.

falkTX commented 1 year ago

What OS? what host? what plugin format? This doesnt happen everywhere, there must be something specific about the configuration where it does

GBaige commented 1 year ago

What OS? what host? what plugin format?

Not to be rude, but this information is right there in the issue title...

Once again Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11

falkTX commented 1 year ago

I got notification via email, which truncated the title. it is quite the long ticket name... my apologies

GBaige commented 1 year ago

Oh. I wasn't aware, my bad...

Upon further testing, something interesting occurs.

image If I close REAPER entirely and re-open it with a new project, open either Cardinal (main) or Cardinal (synth) and then load the patch, the knob in PatchMaster will seem to be turned all the way to the right, but the saved value will be loaded.

image However, if I load the same patch again in the same instance, the value will load as 1 (100%).

I was able to reproduce this with both the main variant and the synth variant.

GBaige commented 1 year ago

UPDATE: The issue occurs even with non-hidden parameters in other modules. I'm still testing on REAPER v6.78, Cardinal VST3 (main) 23.02, Windows 11.

image In this occasion, I mapped a PatchMaster medium bipolar knob to PSI OP's end frequency knob, and saved the patch with the knob's value set to 0.2.

image When I loaded the same patch again, the knob at PatchMaster read 0, but the corresponding value from PSI OP's end frequency knob is the same as when the patch was saved. Reloading the same patch multiple times gives the same result (therefore the patch sounds the same, unlike with Macro Oscillator 2's LPG decay knob changing in value, therefore the patch wouldn't sound the same).

So far, this issue only seems to happen when PatchMaster controllers are mapped to very specific parameters from certain modules (so far anything related to pitch is affected).

GBaige commented 1 year ago

Upon even further messing around, I've discovered the following:

On a fresh patch, the PatchMaster controller that will present these issues after saving and reloading a patch will always be the second controller from top to bottom (named "Controller 2" by default).

However, if I add a third controller. map it to the same parameter as the second controller, then delete the second controller such that the third controller is the new second controller, the issue will not occur anymore. It will only begin to occur with the next added controller (which will be named "Controller 2"), but it will not occur with controllers added after the controller that presents these issues.

This means that if I add any number of controllers, then delete the controller that is presenting issues, none of the remaining controllers will present issues when saving and reloading the patch, and will retain appropriate values. However, the next added controller (which, again, will be named "Controller 2", regardless of the number of controllers present that are higher than 2) will present issues, Renaming the controller will not solve the issue.

This seems to be regardless of the type of controller (so far I've only tested on knobs, will edit if it;'s present on faders as well).

Could this have something to do with the fact that the default preset for PatchMaster includes "Controller 2" which is a button rather than a knob?

GBaige commented 1 year ago

Here is a demonstration of what I meant, starting with the default PatchMaster preset and Bogaudio's VCO. Value for controller 1 (which by default is a knob) is saved and loads successfully, whereas the value for controller 2 (which by default is a button) fails to load properly. If I had x controllers after controller 2, their values will also save and load properly (although this is not demonstrated in the gif). demo

falkTX commented 1 year ago

Can you check if this still happens for you on 23.07? We updated mindmeld modules there, also LTO is no longer enabled by default which caused some weird issues.