Hello:
I have been working on making a subtractive synthesizer, and everything is working fine; however, I would like to add a unison effect to my oscillators.
My question is this:
Is there a way to do this using only the juce::dsp::Oscillator class without any extra 3rd party modules?
If you want to use JUCE oscillator then you could just use a bunch of them at different frequencies and stereo panning. Or derive from oscillator and track a number of internal phasors.
If you haven’t already you may want to sort out aliasing first.
I’ll add that you’ll probably want to modify the oscillator class to be able to set the phase manually. And then randomize the phase on creation. Otherwise you can get a nasty lasery sound on the first note that gets played - caused by all oscillators starting on the same phase.
idk how juce’ oscillator works exactly, but typically you just need a bunch of unique phasors that all pull from the same waveform and you just add them all up on each other. i agree with evan, looking into concepts of random/continuous/fixed phase is crucial for unison oscillators as well. also look into the difference of freq- and pitch-based unison. that matters for what you feed the phasors with.