How much time should I take to generate 44100 samples?


I know there’s no clear-cut answer to this, and the answer is probably “less than a second minus a lot overhead for other stuff on the same thread”.

However, I’d like a bit of guidance on what is deemed acceptable. For context, let’s assume a 12 voice synth with 7 part unison on 4 oscillators (just sines for now), 3 lfos and 3 envelopes, no fx or filters yet. All modulators run on each voice, plus I have a “fake” mono track that runs the modulators as well, just so I’ll be able to use the modulators globally. Not sure if that’s a common approach, kinda figuring things out as I go.

I’m currently taking around 10ms to generate a second of audio, which is probably well within acceptable limits, but I’m on a decently fast computer (m2 max), and I still have some stuff to add. I can probably speed things up a bit with some simd but that would require a bit of a rewrite (again), and I’m not sure if I should.


I hope you’re making good progress on development :slight_smile:

I’m using bitwig, so when I click the icon next to the CPU load indicator, it shows some useful performance stats. Whatever host you’re using, I recommend looking for such a feature and comparing your synth to others you have available.

The results can be a starting point, but keep in mind synths may aim for very different tradeoffs between quality, performance, freedom of routing or parameter ranges, authenticity in case of emulations, and so on.

In other words, the answer to your question is a huge “it depends!”.

Here’s a setup I just ran on my synth:
12x7 voices (unison is voice-based in my synth) using a 4-operator fm-like oscillator section.
Modulators also run per voice: 2 envelopes, 2 lfos, and 4 auxiliary modulators of similar computational complexity.
Filters were disabled.
Running on a Ryzen 9 3900X

Bitwig says deadline per block was 10ms (480 block size / 48000hz sample rate), and my synth is eating up 2.77ms, so that’s 27.7%.
Much slower compared to your example, but I know I pay a high price for these:

  • oscillator section running at fixed ~160khz
  • amplifier and other parts running at fixed ~80khz, output is resampled to host sample rate
  • modulators running at ~20khz, freely routable so they need to be processed sample-by-sample instead of block-wise

Other comparisons I’ve done (mostly with a “classic analog” oscillator section and characterful filters) tell me my synth is performing similarly to some well-known higher quality paid products, depending on situation. But then there are plenty of synths doing similar stuff for much less cpu usage :person_shrugging:
In the end this is simply the quality/performance tradeoff that I chose for myself, so I deemed it acceptable.

One thing I noticed is that only few synths I’ve tried seem to employ simd the way I do: my entire sound engine processes voices in packs of 4 using SSE. I deemed it indispensable for my synth because I wanted the high quality and still be able to use polyphonic patches with voice stacking.