-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surge Streaming with non-. locales (was Linux: VST and LV2 Step sequence bars are not restored properly) #1900
Comments
This happens with the VST2 and the LV2? |
As an FYI I do not see this problem in a quick test on any of the following
My guess is this is LV2 streaming problems again. The steps in the step sequencer are not part of the parameter set but are part of the streamed state of the session, so I think this is related to #1768 and #1619 and #1773. Let me tag it LV2 and also bring this to @jpcima and @falkTX attention. |
OK thank you! I’m unable to support the VST2 so I can’t help you there; and my tests show that it is clearly not in every combo of host and OS (that is: if it were linux specific linux reaper VST3 and Carla LV2 wouldn’t work). Do any of your hosts support VST3? |
Currently my go to options don't but I can see what I can do about carla / reaper or any other vst3 capable host. |
Can you zip up and attach that Carla session? |
I'm not familiar with Carla, but I hope this covers all the needed files: And what I did was exactly as I wrote in the repeated steps with this time adding only the LV2 version of surge. |
thanks It also occurs to me I didn’t do exactly what you said. I started a fresh session and set the values. I wonder if loading a preset on linux goes down a path which results in incorrect persistence. Lemme look some this afternoon Thanks for the great report |
No problem; I'd gladly go deeper on the state restoring if there are any ways to debug the state data. Printing out all state variables after selecting preset and after reloading host would be a tremendous help. Thank you for the fast replies! |
Yeah so when I do a carla open / load lv2 / load acid seq 3 / save / quit / open / load i get the right values but when I load your .carxp file I get the wrong values. That file has the internal state as a base64 encoded blob but let me stare at the code also some. |
I'd suspect that something goes wrong with the serialization of the base64 data or just before writing it. |
yeah but it's the same code on all the flavors which is why I'm confused. The code in question to deserialize is SurgePatch.cpp line 1500 or so and to serialize around line 1793 and hasn't changed in forever. Clearly that is loading back incorrect values. I wonder if it is also writing them. I also wonder if this is somehow related to your mouse issue.. We recently changed the code to have the LFOUI update the values. Look around line 1207 of CLFOGui.cpp. I wonder if we are just setting values to -1,0,1 somehow when we draw in your environment and the problem isn't streaming at all? I would start there - if you can run a daw with out attached put print statements those three spots and see? I'm headed back to my Sunday afternoon but maybe those hints help? |
Okay, I'll try printing what happens around here:
I haven't setup my compilation environment fully yet to 20.04 so this might some time while I gather surge dependencies to get the compilation process rolling, but I'll report back when I'll get results. |
Yeah that should only happy if you press ctrl while dragging (it is how the ss quaantizes and has been there forever; our Recent change is to add an alternate based on tuning). If you are hitting that in other circumstances that would indeed be the bug! All the prerequisites can be easily found by installing GCc and cmake then just doing |
Okay, after having some issues with missing packages, missing submodules and all kinds of funny business I managed to get the LV2 version built and installed on local LV2 user path. It's very nice that you can have the system LV2 installed and build local testing versions and hosts will override the system one for the local. Okay; Results.
prints... absolutely nothing. Nothing at all. The else statement of 1207 line isn't ever reached. But as far as i know repeating the steps with the debug prints above results no output. |
That should print if you ctrl-drag. But the steps[i] = f below is the place where you want to print, as well as the two streaming spots. Basically: 1: Is CLFOGUI changing steps at all (that’s the steps[i] = f there and) If the XML has the right thing and CLFOGUI isn’t handling it and you still get blown up then it is a serialization thing in your host. If the XML has the wrong thing and CLFOGuil hasn’t touched it then it is a (scary bug I can’t figure out yet). If the CLFOGUI touches it incorrectly then it is related to the mouse. That’s my theory at least. Like I said I don’t get the same error as you at stream time yet (and am not really coding this afternoon either which is why I’m just tossing hints in here) |
It's okay, I'm really like fish out of water when it comes to c++ so bear with me here. Printing f values above steps[i] results while drawing not-so-linear line from -1 to 1 preserving the final values for each step:
and loading that translates to only -1 and 1 values being preserved as expected. |
where is that print statement? That's from the GUI? So then something (something) must quantize them before they stream. if you put a print at 1793 of SurgePatch.cpp before the XML is written do you get those values going out? You see this in QTractor and ardour5 right? but not Carla? |
That was from above the step[i] set.
All my hosts behave the same with surge: Ardour 6 pre, Qtractor and carla. |
Also confirming that value stored in ss->steps[i] is valid. I'm not sure if this was needed to be checked or not, but printed the contents anyway. |
wow i really wonder what it is i just opened the acid seq in a fresh ardour5 session, saved the session, restarted ardour, reloaded, and it was all fine. what on earth could be blowing up your streaming I wonder! |
output during save:
Now this is getting weird... |
Do you have your system in a language other than english? |
Yeah I was thinking the exact same |
Replace your comment with Printf (“value is %f”, step[i] ) And do you get a comma rather than a .? |
Of course I have:
as you can see above; here comma is official decimal separator. |
FYI I use this code in carla when dealing with float save and restore:
might be useful. |
Yeah right |
I guess that means mystery solved! |
Thanks! Mind if I just borrow that guard class? |
Sure, do as you wish with it. there are other alternatives too. |
I actually feel bit stupid not think of this any sooner as I've been encountering so many bash scripting bugs related to fact that developers forget to force locale and then parse command output. |
yeah this is ancient ancient code which has been there forever in the depth of surge which isn't used much but is used in this spot. OK will figure out the right fix this week. Thanks! |
This might by the way solve some other more subtle restore related problems as well. |
Ha yeah! And if I do a LANG=fr_FR && Carla then I can reproduce it no problem. |
Like: I bet you can't save mod routing either. Sigh. Like I said this is ancient code - from before the synth was open sourced. This bug has been there all along. Amazed you are the first person to find it. Appreciate the clear report. |
And vice versa launching qtractor with: |
OK great Appreciate the clarity and patience. |
No problem; This was actually kind of fun excerise 😃 |
Forever, it seems, we've had a bug in our XML streaming if you have a . , internationalization swap. Fix that here by forcing "C" locale when we stream the XML (even though this doesn't touch the streaming; it touches float_to-str). Thanks to @falkTX for help Closes surge-synthesizer#1900
OK just pushed 4f954d4 which contains a fix. In that branch I can save a sequence in a french Carla (une Carla francaise?) and it persists properly. |
Describe the bug
Step sequence bars don't get restored properly when loading DAW session: Tested on Ardour pre6 and Qtractor. Also tested on both LV2 and VST versions of the plugin.
Please let us know your surge version
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Step sequence is kept as it was originally set in the preset.
Screenshots
Any bars not being either 100%, 0% or -100% are missing. Screenshot of the issue:
Desktop (please complete the following information):
Additional context
This might or might not be Linux specific bug; testing needed on other platforms.
The text was updated successfully, but these errors were encountered: