Tutorial: Introduction to DSP - How to reinitialize oscillator?

There is of course a totally different way to achieve exactly what I am trying to do, without re-initializing the wavetable, and dealing with having to wait for sound to stop, or stop it myself.

As it is an array, I could just always upon app startup set it to the highest size, and then use an adjustable (via slider) step variable to change the oscillator resolution. That way I should even be able to adjust it while the sound is playing!

Problem is that I do not understand the tutorial code enough, as to figure out where to insert such a step variable.

Hi ! Did you find a solution ? Because I have the same problem. I would like to add a slider to change the gain in the customoscillator but I don’t know how to !

No I did not find a solution as I had to admit at the time my combined experience of JUCE and C++ was pretty bad, so I put off my audio programming a bit, and instead started to make a game which is now about 90% finished.