Adding parameters, AudioPluginDemo



I am currently building upon the JuceDemoPlugin file. So far I have removed the delay element ( as I don’t need it for now) and I have also put the SineWaveVoice and Sound into another cpp and h file to tidy it up.

What I am now trying to is to make a slider which controls a new parameter in the SineWaveVoice ( oscFreq ) which acts as a frequency offset ( tuning ) parameter.

I am really struggling to work out how to now change this value with a slider. I have added a new parameter and case in the setParameter method
to point to, and change this value. I think the problem is that this change is not pointing to the currently playing voice in the synth. How do I get about this? I have tried variations of the following:
case freqParam: synth.getVoice(0)->setParameter(freqParam,newValue); break;
but no luck.