Hadron
Hadron

Reputation: 1

How to direct realtime-synthesized sound to individual channels in multichannel audio output in Python

I need to

  1. read in variable data from sensors
  2. use those data to generate audio
  3. spit out the generated audio to individual audio output channels in real time

My trouble is with item 3.

Parts 1&2 have a lot in common with a guitar effects pedal, I should think: take in some variable and then adjust the audio output in real time as the input variable changes but don't ever stop sending a signal while doing it.

I have had no trouble using pyaudio to drive wav files to specific channels using the mapping[] parameter of pyaudio.play nor have I had trouble generating sine waves dynamically and sending them out using pyaudio.stream.play.

I'm working with 8 audio output channels. My problem is that stream.play only lets you specify a count of channels and as far as I can tell I can't say, for example, "stream generated_audio to channel 5".

Upvotes: 0

Views: 90

Answers (0)

Related Questions