Cabbage Logo
Back to Cabbage Site

Bug when exporting from a DAW: parameters reset

Hello,

When I export audio from my DAW, the parameters of the plugins reset.

Also, in the resulting export, the VST is bypassed.

I tried saving a preset with parameters set to non-default values, but the values after exporting keep being reset to default ones, even though the preset name is the right one and not the default one.

Other issue, there is no sound after the export. I found the issue: it’s because of this code block:

if kSustainOutput==1 then
    if ksustaincolor!=0 then
        a1diffsustain applyColor a1diffsustain, kcolor, ksustaincolor, ksustaingain
        a2diffsustain applyColor a2diffsustain, kcolor, ksustaincolor, ksustaingain
    endif
    a1out = a1diffsustain
    a2out = a2diffsustain
elseif kFullOutput==1 then
    a1out = a1w
    a2out = a2w
elseif kTransientsOutput==1 then 
    if kattackcolor!=0 then
        a1difftransients applyColor a1difftransients, kattackcolorprocessed, kattackcolor, kattackgain
        a2difftransients applyColor a2difftransients, kattackcolorprocessed, kattackcolor, kattackgain
    endif

    a1out = a1difftransients
    a2out = a2difftransients
endif

These three k rate variables are controlled by the buttons in the middle, and control which signal should be assigned to a1out and a2out. After exporting, I think the issue is related to the previous one and none of these conditions are met so the signal is not defined. I have the intuition fixing the first issue would fix this one.

Thanks for your help!

Cabbage version: 2.9.230
System: MacOS / M3 / Sonoma

New insight:

When I save my project before exporting, it works. Both the resulting audio is the dry signal, and the parameters are not reset, and I don’t have to click on one of the buttons in the middle to have song going through the plugin.

Now when I change the parameters again, and don’t save, the parameters reset to the latest values before saving. And I don’t have any issues with the three buttons in the middle.

I think it’s interesting and it might help you.

Julien

Wow, this bug popped up years ago and @chronopolis and I spent quite some time fixing it. I’ll take a look and see if I can sort it. I think it has to do with the fact that when we export audio from Live, it calls the prepareToPlay function (setupProcessing() is VST parlance). This recompiles Csound which in turn return parameters to their default values. At least I’m not starting from scratch on this one. I’ll let you know when I have a fix.

1 Like

Thanks Rory!

I also had a few crashes yesterday. Mostly when Ableton Live and my plugin was loaded, then I was doing something else on my computer for a few minutes when I tried to use ableton again the program stopped responding. The logs aren’t that useful and I had a lot of troubles reproducing these bugs…. Until I unplugged my monitor, it crashed again and in the logs something like « Core Audio changing to…. » appeared. It looks like it was always the last output before every crash. I don’t know if it’s a consequence or a cause of the crash but I’ll investigate, and I’ll open a new topic!

I’m going to add one more bug here, but feel free to let me know if you want me to create additional topics.

When I close and re-open the plugin in Live, the gentable resets (see video below)

Here is how it is defined:

gentable bounds(266, 160, 300, 71), tableNumber(1), fill(0), channel("table1"), tableGridColour(152, 0, 0, 0) tableBackgroundColour(15, 15, 15, 0) tableColour:0(255, 255, 255, 255)

You’re on a roll :rofl: I’m more than happy for you to report bugs here or in a new thread. Rest assured I’ll give them my full attention when I can :+1:

1 Like

Thank you very much Rory! Yes I am definitely dedicating a lot of time on my plugins at the moment, and I try to make songs with it so it’s a good way to find bugs.

Most of the time it works well though, thanks again for all your hard work on Cabbage!

Do you have a minimal example you can post that I can test with? Or can you PM me the larger project?

I’m working on it. The larger project is messy and it’s hard to spot the issue in this context.

The first bug (parameters reset when you export) can be reproduced with the basic Cabbage gain example. I’m trying to reproduce the gentable bug now, i’ll keep you updated!

Btw, have you tried this in any other DAW? Debugging with Live is a bit of a pain but I’ve a feeling that it might only be an issue there too…

I can try with Audacity and FL Studio as well. I’ll let you know!

Do you have Reaper installed? That’s the simplest one to debug with. But don’t worry, I have Live 11 her to test with too.

No I’m sorry, only FL Studio and Live 10. I can maybe try the demo though.

No don’t worry. I should really sort out this Live issue. I’ll search through the forums and see how people are doing it these days.

p.s. I just tested with Reaper and it works fine.

I still can’t get the debugger working in Live, but I tested with an export of one of the examples that ship with Cabbage, and it worked fine.

Also, the exported audio is how I hear it when I play it in the daw. Oh wait, I did save the project first. let me try with an unsaved project…

[edit] also works with unsaved project… :thinking:

[edit] I found a hack to allow me to debug Live on my M1 machine. I just need to recreate the problem you’re seeing…

It’s weird… Using the version of Cabbage mentioned in the post above on my M3 machine and Live 10 here is how I reproduce the issue:

I think that’s the key. If you export at the same SR it works fine, which is why I wasn’t seeing the problem. Ok, I’m good to go now. I’ll let you know when I have something for you to test :+1:

[edit] I deleted my previous post by accident… but you get the gist from this one. I wasn’t exporting at a different SR…

Good catch! Yes I also confirm the parameters don’t reset when I export at 44.1kHz

It seems that unlike almost every other DAW I know, Live doesn’t update the internal state of the plugin when users change parameters. I’ll have to do this differently when the plugin is loaded in Live. Should be simple enough…

[edit] Looks like I as going about this the wrong way entirely. After further reading it seems that Live is actually behaving according to the VST guidelines :man_facepalming:

FYI I was able to fix this issue by tweaking the minimal example I was creating for you. So the issue was on my end. Sorry for the false alert!