SpotlightKid / dfzitarev1

A feedback-delay-network reverb plugin built with DPF and based on FAUST library demo code
Other
10 stars 1 forks source link

Hide certain sliders? #4

Closed chmaha closed 1 year ago

chmaha commented 1 year ago

Would you be able to help me figure out how to hide certain sliders in the generic UI? Specifically I wanted to create a very simple version of the plugin without the two EQs and without a level control. I figured out how to set default values but I don't want the user to be able to change them.

SpotlightKid commented 1 year ago

Unfortunately that's not straightforward, because the FAUST code for the plugin uses the FAUST library dm.zita_rev1 demo function, which pre-defines all parameters and sliders.

You would have to copy that function (from /usr/share/faust/demos.lib, if you have FAUST installed) into faust/dfzitarev1.dsp and adapt it to replace the parameters, which you don't want, with constants. You will need at least basic knowledge of the FAUST DSP language for that.

chmaha commented 1 year ago

Thanks, I will experiment with that!

SpotlightKid commented 1 year ago

Maybe it would be easier to just provide built-in presets with the settings you like?

See here for the preset definitions.

chmaha commented 1 year ago

Thanks, I like the challenge of modifying the Faust and even with presets, users could change EQ etc. For example, the original ladspa (and JACK) versions of zita-rev1 didn't have a level control.

SpotlightKid commented 1 year ago

EQ param definitions start here:

https://github.com/grame-cncm/faustlibraries/blob/4031a3c8406fc6df45d72163464fecaa59ac99e9/demos.lib#L851

sletz commented 1 year ago

Note that if you fix some of the parameters, an interesting property of the Faust compiler is to compute all what depends of those parameters at compile time, thus producing more efficient code.

chmaha commented 1 year ago

I suppose the only sticking point is pasting in that code into faust/dfzitarev1.dsp and knowing what to do with the process = _,_ : dm.zita_rev1 : _,_; part etc. I think the modifying of zita-rev1 part should be fine.

SpotlightKid commented 1 year ago

Correct. Of course, if you change the faust/dfzitarev1.dsp file, you need faustpp and FAUST to re-generate the plugin DSP code.

chmaha commented 1 year ago

Completed the task (I think). The compiled plugin works as expected: image

Thanks for your help!

SpotlightKid commented 1 year ago

Cool. If you distribute this, I would like to ask you to change the plugin name, ID and URI, though.

chmaha commented 1 year ago

Yes, of course...I was in the midst of doing that and now I seem to have broken the make ;)

chmaha commented 1 year ago

OK, fixed again...Is this what you meant: image Is there a special thing I need to do with regard name, ID and URI beyond change them to taste?

SpotlightKid commented 1 year ago

No, you can use what you see fit.

chmaha commented 1 year ago

Thanks for all your help again. On topic, I managed to hide the VST3 "Current Program" slider (a distrho default?) by commenting out various sections. The slider didn't seem to work for me even with your presets available so it was good to remove it for the things I'm doing that don't require presets.

SpotlightKid commented 1 year ago

I don't think VST3 format has support for builtin presets in DPF (yet?). VST2 format supports them and for LV2 they are just converted into a presets.ttl file included in the plugin bundle dir.

chmaha commented 1 year ago

Thanks for the info!