Hi all!
I'm coding a synth with 5 types of waveforms, and I'm kinda confused on how to tell the synth which waveform is selected by the user.
My synth has 5 sounds ( one for each waveforms ) and 25 voices ( 5 per sounds ).
Maybe my approach isn't right?
Any help would be appreciated!
Thanks,
JP
Example:
nbVoices = 5;
for (int i = 0; i<nbVoices; i++)
{
synth.addVoice (new SineWaveVoice());
synth.addVoice (new SquareWaveVoice());
synth.addVoice (new TriangleWaveVoice());
synth.addVoice (new UpSawWaveVoice());
synth.addVoice (new DownSawWaveVoice());
}
synth.addSound (new SineWaveSound());
synth.addSound (new SquareWaveSound());
synth.addSound (new TriangleWaveSound());
synth.addSound (new UpSawWaveSound());
synth.addSound (new DownSawWaveSound());