Windows VST setRange


#1

Hi,

Total noob here so be kind :smiley:

I am trying to change the range of a parameter in a plugin based on the juce VST demo plugin. In DemoEditorComponent.cpp:

gainSlider->setRange (0.0, 1.0, 0.01);
delaySlider->setRange (0.0, 20, 1);

The gainSlider->setRange works as expected, but the delaySlider seems to “top out” at 1. The slider will not travel past the 1 mark in the VST GUI. I had a look at the definition of the setRange function, but found no clue. Any help is greatly appreciated.


#2

VST parameters only have a range of 0 to 1 - if you want to display a different range on your slider, you’ll need to scale the numbers on the way in and out of the plugin.


#3

Thanks, Jules.

Giving it a shot…


#4

OK I guess I’m having a bit of trouble understanding what the “in” and “out” of the plugin means for the parameters.

I would guess that the getParameter function is the “input” of the parameter to my plugin, and the setParameter is where I send it back to the host?

If that’s the case, then do I scale the parameter to my liking at the getParameter and reverse scale it at setParameter? Or do I have this all wrong?

Again, forgive my inexperience. I’m trying to get this working, but haven’t gotten it quite right yet.


#5

Er… no, you implement those methods in your class, so getParameter is called by the host when it wants to get one of your parameters, and vice-versa.


#6