Surge: VST3 Presets Streaming: Make the fix less wierd

Created on 12 Jun 2020  Â·  11Comments  Â·  Source: surge-synthesizer/surge

With Bitwig for Presets to show in Bitwig's built-in Preset browser, Surge's presets would need to be converted to the .vstpreset format

bitwig-presets-vst3-surge

I tried to create a few via Reaper and Bitwig and the resultant presets did not match the original FXP

Here are a a few examples

Surge-vst3.tar.gz

Bass 1 and 2 are OK but Bass 3 and 4 are not saved as they should be

It also appears that the VSTPRESET is saving the Zoom level which in my opinion should not be included in a preset

Bug Report VST3

All 11 comments

So if you create a preset by saving a DAW track rather than saving a preset it will contain the ‘dawExtraState’ and ‘dawEditorState’ which include zoom, tuning, mpe state, midi controllers, and a few other things. This exists in the daw state so you can save and restore sessions in reaper, logic etc... reliably and is not in the patches for exactly the reason you say.

If you want to convert all the fxp to a different format, I think we would need to know what that format is, figure out how to advertise it, and write code. I knocked the ‘vst3 exposes preset’ issue out of the 1.7 milestone because it was just too annoyingly hard (see #1256) and I presume the exact same thing would be part of this solution.

image

Exporting to vstpreset then later reimporting it doesn't work - what you get is the init patch instead of what you were trying to export. I opened the saved .vstpreset file and it seems all the XML is there, so saving works fine - there's something happening when loading it.

so when i just now did this on my mac with the vst3 at head and reaper, it all loaded fine.
Can you give me a step by step of exactly what breaks for you?
I don't see anything in the code that is windows only but I wonder if there's a byte order thing perhaps?

similar no problem loading and storing vstpreset reaper linux

so what's exactly the problem? Right now I can 't find something to fix! :)

  1. load whatever patch in Surge
  2. export .vstpreset from Reaper
  3. load a different patch in Surge
  4. import that exported .vstpreset -> sound goes to init sawtooth instead of whatever the preset was

Alternatively if after step 2 you remove Surge instance and reload it, the imported preset will show in Reaper's preset list - this won't work either.

image

Yup so seems this only happens on win10 - for me with reaper on mac and linux it doesn't. will look when I next have windows open.

I find that some save properly and others don't. Haven't determined what the nuance(s) is(are) that differs between those that stream properly and those that don't.

So

I haven't been able to make this break in mac reaper, mac bitwig, win reaper.

I even opened your .vstpresets on my mac, @tank-trax and they were fine.

What's exactly the bug please?

OK the above PR makes it so the corrupted load problem is solved (at least for @mkruselj - @tank-trax if you can confirm on your end that woudl be good)

Along the way i discovered that the stream object is supposed to have attributes that let us detect project vs preset, which could also solve the zoom in preset problem (and the scale and mpe state in present problem) making the .vstpreset the same as the .fxp store.

but reaper doesn't seem to implement the IStreamAttributes interface on the stream it hands us. So I'm going to leave this issue open for further exploration in 1.7.n; keep my debugging code #ifdef 0 in SurgeVst3Processor::setStream, and return to this after we ship 1.7.0

Since the recent changes, I've been able to create vst3 presets in Bitwig and Reaper from the Factory Patches and they load well whether creating from Bitwig opening in Reaper or vice versa.

Yeah what we have works; but there's more we could do in future versions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itsmedavep picture itsmedavep  Â·  9Comments

sense-amr picture sense-amr  Â·  4Comments

baconpaul picture baconpaul  Â·  6Comments

mkruselj picture mkruselj  Â·  6Comments

baconpaul picture baconpaul  Â·  9Comments