grame-cncm/faustservice

Faust code exported to Windows32 VST always loads defaults when applied

DazDSP opened this issue · 15 comments

Faust code exported to Windows32 VSTs (used in Audacity) ignore the settings and always reload the defaults before they are applied. VST settings work OK in Preview mode only. (Win7 64bit, Audacity 2.3.1) Other (non Faust) VSTs work correctly.

sletz commented

Which "settings" are you speaking about ?

The VST adjustments (gain sliders etc).
In an alternative editor (Wavosaur) the VSTs behave correctly, but this doesn't explain why the Faust VSTs act differently to other VSTs in Audacity.

sletz commented

How do you compile the Faust Windows32 VSTs ?

I have compiled them using Faust Editor, FaustLive, and Faust Playground on different occasions.
There are other random problems with the VSTs not compiling correctly, but that will be reported separately.

sletz commented

@agraef may have an idea.

Maybe I should have said "Exported" instead of compiled...

What makes this harder to test, is that the export compiler caches the files, and if the source doesn't change it sends you the previously exported file in the old name even if you have renamed the source!
Also, the dlls have their VST name inside them, so renaming the dll just makes for more confusion.
And as if that wasn't difficult enough, it seems that Audacity is caching the dll names or paths.. causing additional confusion when trying to swap to different versions of the same file that was exported different ways for comparison.

sletz commented
  • all FaustLive, FaustEditor, FaustPlaygroud use the same remote compilation server
  • this caching issue is part of the faustservice and has to be corrected at this level. I hope @orlarey can have a look
  • and the settings use is part of the Faust => VST compilation architecture + script an hopefully will be looked at by @agraef

Thanks Stéphane.

I have to say that Faust is a great way to test out DSP ideas and make functional code blocks that are also useful for things other than music: such as Amateur radio/CB, broadcasting and SDR applications.

Being able to export code to other platforms makes it even more useful. Having VST export makes it very easy to use the processing routines in other sound applications, even by those not familiar with Faust.

I'm very grateful for all the hard work by the Faust programmers.

sletz commented
  • do you have any URL of your projet ?
  • we try to maintain everything as best as we can, but they are always some holes remaining... Hopefully @orlarey and/or @agraef answer at some point

It is more than one project, but basically:

  • An AM Sync ISB Demodulator for SDR use
  • Various audio compressor processors

The best way to see the results is on my YouTube channel:
https://www.youtube.com/channel/UCAiah9thJtu9OQNDQeo_GRQ/videos

Sorry folks, I'm still at LAC @ CCRMA and can't really take a look right now (flying back tomorrow).

@DazDSP, I'd really need to know the architecture you're using (there are two for VST, Yan Michalevsky's vst and my own faustvst). I suspect that the one used in FL is Yan's, but I might be wrong about that. If you can send me the C++ source generated for the plugin then I should be able to figure out which one it is.

Also, it would help to post the original Faust source (if available, otherwise please provide a minimal test example which exhibits the problem) so that I can try to reproduce the problem when I'm home.

Here's a very simple test that displays the problem in Audacity:

//VST export compilation test by DazDSP
import ("basics.lib");
l = hslider("Level dB", -30, -90, 0, 1):ba.db2linear;
process = _,_:scale,scale:_,_; //in stereo
scale(x) = x*l; //Scale the input by the level setting

The code performs level adjustment, and is preset to -30dB.
If the exported VST is loaded in Audacity, the slider is adjusted to 0dB and the effect applied, the result is applied at the default level of -30dB, instead of the adjusted level of 0dB.
In the editing application "Wavosaur", the VST functions correctly.
I don't know why Audacity handles the Faust VSTs differently, but other VSTs don't seem to have this problem of always loading their defaults. I also tried a much older version of Audacity (1.3.12-beta Unicode) and found it behaves the same way.

avdrd commented

It's clear from Steve's answer there that the problem mostly lies on Audacity's end: "VST Presets are often not supported". One suggestion: Cabbage VST2 plugins seem to work fine with Audacity presets-wise. (For some reason VST3 Cabbage output doesn't work at all in neither Audacity nor in Adobe Audition, so Cabbage VST3s output seems pretty broken right now). So if you're willing to add a shim of Cabbage for the sliders and can live with the routing though the Csound Faust opcodes that will solve you presets problem for now.

Mkay, Audacity doesn't yet support VST3 audacity/audacity#2277 However Audition certainly does, so there's some extra issue with Cabbage VST3s not working in that one. From the Cabbage forum, their VST3s seem to work in Reaper though.