Cardinal icon indicating copy to clipboard operation
Cardinal copied to clipboard

Size is not saved with patch for some resizable modules, Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11

Open GBaige opened this issue 3 years ago • 5 comments

Some modules such as JW Modules Full Scope and Tree can be resized. However, they will reset when saving and loading the same preset/patch. The issue may be related to #415 where the text editor will shift other modules to its left or right if it was resized before saving and loading the same preset/patch, looking as though the module's size had reset.

Steps to reproduce:

  1. Load either JW Modules Full Scope or Tree, and resize to make longer
  2. Save as / Export the preset
  3. Open / Import the same preset

Expected behavior: the module's size remains the same as it was when the preset/patch was saved.

GBaige avatar Nov 09 '22 01:11 GBaige

scopesize Reproduced in Cardinal VST3 (main) 23.02, REAPER v6.78, Windows 11.

GBaige avatar Apr 07 '23 02:04 GBaige

Somehow I missed this one, just confirmed that with latest Cardinal this still happens. In VCV Rack this size is correctly restored, so definitely something in Cardinal that is going wrong.

The width is stored inside the data object in the patch:

"data": {
    "lissajous": 1,
    "external": 0,
    "width": 780.0
},

dromer avatar May 01 '24 12:05 dromer

So from what I can tell a module should load its data when it implements the dataFromJson() method, which the JW-Modules FullScope certainly does: https://github.com/jeremywen/JW-Modules/blob/master/src/FullScope.cpp#L78-L80

I believe that gets called here: https://github.com/VCVRack/Rack/blob/8c6f41b778b4bf8860b89b36d5503fd37924077f/src/engine/Module.cpp#L156-L206

Still not sure why this doesn't work correctly in Cardinal though, just some breadcrumbs ..

dromer avatar May 05 '24 18:05 dromer

It might be an interesting experiment to see if lissajous and external also are no longer restored correctly after being changed/saved/loaded.

cosinekitty avatar May 05 '24 20:05 cosinekitty

@cosinekitty it seems that Lissajous Mode (which I assume what lissajous setting in the data is) does get restored!

dromer avatar May 05 '24 20:05 dromer