Electronic – Latency concerns for a wireless audio mixer

audiomixerzigbee

I want to design an audio mixer that works wirelessly and has a web interface. Here's what I'm generally thinking:

One component is a 1/4 inch plug with an amplifying circuit and a WiFi module which communicates via UDP over the local network to a Raspberry Pi.

Several of these units are connected to guitars, keyboard, microphones, etc.

On the Pi, I have a simple interface running locally in the browser for mixing signals from different instruments and outputting to a single set of speakers from the Pi.

I'm really just looking for some general thoughts from someone who has experience with audio electronics (I have none).

Would Bluetooth be a better choice than UDP? Or maybe even Zigbee?

Best Answer

Music is a special case for audio latency. For speaking, or voice conversations you can have up to 100mS latency before it impedes the conversation - though it can be noticeable at that latency. Music, however, has a beat and 100mS is unacceptable.

When musicians play together acoustically sound travels about 3mS/meter. On a typical stage setup band performers would deal with maximum 25mS of acoustic delay. Larger stages require monitor speakers with maximum 10mS latency so the acoustic delay is always under 25mS.

As long as your system is expected to provide feedback (monitor) to the musicians, and they are close together, or they have low latency monitors apart from your system, and the band is fully amplified - ie, the audience won't hear both the acoustic sound from the band and the amplified sound from the speakers - then you might get away with a larger than 25mS latency for your entire system - from music pickup to speaker output.

However, it's likely that the band can hear the amplifiers, and again any delay greater than 25mS is going to cause them some aggravation.

With small, frequent UDP packets you can meet this over wifi, but it's going to be tricky accounting for all the sources of latency inside such a setup.

Go ahead and do some testing - use one Pi with a microphone, one with a speaker, and both with wifi. Have them simply relay sound from one to the other along the full path, from the mic to the speaker with all the bits and pieces in the middle. Capture very small packets - 1-5mS each at the most - and send them across. Use an oscilloscope to measure the latency. I'm guessing with USB sound devices and USB wifi devices and the stock non-realtime Pi you're going to see very large latencies. You'll likely have to do quite a bit of investigation and work to bring them under 25mS.

Related Topic