Plugin question


If I have a parameter that should not be automatable, is it better to deal with directly than to treat it as a proper vst parameter?

I dabbled with toby’s dephi framework a bit, and there I think the parameters were tied to the state saving bit, but since I get to manage the state saving/loading my self with jap, parameters are only required for automation. Right?

Otherwise, I have to set up 160+ parameters for what is essentially bools which seems like a terrible waste. I suppose I could encode them into 8 floats or so, but just passing JUCE bit arrays seems sexier.


The automation and state-saving stuff can be completely separate. you can save what you like (even if it’s not a parameter, you could for example save a random quote from starwars in presets if you felt like it), because you define what is written.

You specify which params you want automatable/accessed-by-the-host yourself, so it’s up to you how you arrange it. Remember that you’ve got (1) the function that returns how many parameters the host sees, (2) the function that returns the parameter names and (3) the functions that get/set the parameters. If you have any other parameters that you want to save but not have visible to the host, simply don’t put them into any of those functions (but of course make use of them where they’re needed, e.g. in process), and remember that you can still write them to the patch data


Ok, good to know.

Follow up: Are the get/setParameter methods safe to call all willy nilly from the GUI thread or should I do that lock thing that jules does in the demo?


Ok, answering my own question… setParameterNotifyingHost… is safe, and is what I should use from the GUI thread.
getParameter is not safe and locking is required.

Do I get a biscuit?


Well getParameter might be safe to use, depending on what your plugin does in there. If it just returns a variable it’s pretty safe.


Well, its not that simple, but its still a read only operation. It probably wont happen to often though.
I guess I’ll just put on my protective goggles, and try both.