0
votes

I want to combine multiple signals for playback without having to write to wav files first. In other words, a basic additive synthesizer.

I noticed in the "Play Sine Wave" demo (https://github.com/naudio/NAudio/blob/master/Docs/PlaySineWave.md) I could probably call the Play method on multiple signal generators in a nested using statement. However, I am not sure how many of these I can call without introducing latency between signals. This looks like a sketchy approach even with just two signals.

So do I have any other options, and how would I implement them?

1

1 Answers

1
votes

You should use the MixingSampleProvider and add as many signal generators as you like as input (best to reduce their output volumes so you don't end up with clipping).

Then just play from the MixingSampleProvider directly.