Hey everyone,
I’m trying to build an audio synthesis project where I need to generate thousands (4096, to be exact) of sinewaves – each with independently controlled, constantly changing frequency and amplitude. My goal is to have these oscillators run at a 48kHz sample rate, but when I use a single Audio Oscillator CHOP with 4096 frequency channels (for frequency data, channels named “f#”) and 4096 amplitude channels (for amplitude data, channels named “a#”), my computer just can’t handle it.
I’ve looked into a couple of alternative approaches:
Phasor/Lookup Method:
The idea is to use a dynamic phase generator (like a Phasor or even the Phaser CHOP) to integrate the frequency data into a phase value per channel. This phase is then fed into a Lookup CHOP that references a precomputed sine table, and finally multiplied by the amplitude channels. This should be more efficient since it replaces heavy sin() calculations with fast table lookups.
Pattern CHOP Method:
Alternatively, you can use the Pattern CHOP to generate multi‑channel waveforms directly using pattern expansion for phase offsets, and then combine that with amplitude control. This is another route aimed at optimizing performance.
However, after setting things up – I connected all of my frequency channels to the Phaser CHOP’s Phase input, then to a Lookup CHOP that’s hooked up to a Pattern CHOP (which should supply the sine table data). What I see is that the waveforms in the Lookup CHOP are visibly changing, but they just seem to reflect the current (unchanging) values of the frequency channels rather than exhibiting the expected continuous audio-rate motion.
So here’s where I’m stuck:
multi oscillator.2.toe (4.0 KB)
Am I missing a step in converting these frequency channel values into proper audio-rate phase increments?
Has anyone scaled this kind of setup to 4096 oscillators at 48kHz? If so, what tweaks did you need to get the phase progression (and thus actual audio-rate waveform movement) working?
Are there any known limitations or alternative approaches that might be more feasible, especially since I hope to eventually increase the number of oscillators far beyond 4096?
Any insights, suggestions, or links to prebuilt components/examples that have successfully scaled in this way would be hugely appreciated.
Thanks in advance!