multichannel audio output

Hello,

I am working on a presentation that should involve 7-8 output channels driven by Arduino (8-ohm mini speakers). I am very much a novice to physical computing. I know I will be relying on Max to control the outputs and feed them sounds. I would like to be able to have the system choose random samples for random speakers. Eventually, I would like to bring the project up to 20 speakers. My main questions so far are:

  1. what Arduino type should I choose?

  2. how do I power up these mini speakers?

  3. is there a way build an external amp that supports all of them or do I need an individual amp per each?

Any/all suggestions are highly appreciated. I apologize for my very rudimentary knowledge base.

Thank you

Wow, I'm not aware of any Arduino board that can do 8 simultaneous channels, not to mention 20.

My audio lib for Teensy can be 4 channels to audio shields and 2 more to built-in DACs, but that's only 6. As far as I know, that's the most any Arduino compatible board offers today. To get more, you'd have to use multiple boards.

If your needs can be met by sound modules, maybe you could use 4 modules controlled from one Arduino?

You'll almost certainly have to use 1 amp per channel. There are lots of stereo amp chips, so 4 stereo chips could drive 8 speakers.

Gotcha, Paul. Thank you for getting back to me. Since my budget is pretty much non-existent, I will reduce the project to 6 outputs.

Forgive me for being unbearably scrupulous (perhaps others out there will benefit from this topic as well), but if you ever have time, could you elaborate a bit more on your advice above? So far, even with all the research I've made, it all sounds like Klignon to me.

Would you mind giving me a rundown/scheme on how to attach all your suggested products together?
is this the teensy player I should get?https://www.sparkfun.com/news/2055
do I power it, with a USB or an AC adaptor?
what are the 2 built-in DACs and how could I utilize them into an output? what stereo amp chips do you recommend and how do I attach them to a teensy?

Again, thank you so much for getting back to me. I really appreciate any/all feedback. apologies for being a pain

If you're going to use the Teensy Audio Library, for the hardware you'd need 2 audio shields and either Teensy 3.5 or 3.6. Each shield gives you a 16 bit stereo output, and then you'd use the two 12 bit DAC pins on the Teensy for the 5th and 6th channels.

You'd use the first audio shield (for channels 1 & 2) as-is. It just connects to the 28 pins. The 2nd audio shield (for channels 3 & 4) needs a few modifications. The best info is at this Sparkfun page:

The 2 shields share signals (MCLK, BCLK, LRCLK, SDA, SCL), except the TX & RX. You cut those little pads apart, because you don't want the 2nd shield connecting its TX & RX signals to the same pins on Teensy. The 2nd shield's TX input, which normally connects to pin 22 instead needs to connect to pin 15 on Teensy.

When you use the audio library's quad channel output object, it will send 2 stereo streams, to pins 22 and 15.

There's no need to connect the 2nd shield's RX signal if you're only going to be creating or playing sounds. But if you want to get that shield's input signals into Teensy, it connects to pin 38 on Teensy 3.5/3.6 (on Teensy 3.2 it would connect to pin 30, but on Teensy 3.5/3.6 this is pin 38).

The last 2 channels are on the 2 DAC pins directly on Teensy.

You'd use the design tool to actually create your audio design. If you haven't read the tutorial PDF or watched the video walkthrough, definitely check those out to get an idea of how the design tool works.

https://www.pjrc.com/store/audio_tutorial_kit.html

For a quick hypothetical example (because you haven't said what you're really wanting to actually do with so many channels), here's how you might create a sound effect player which creates the illusion of the sounds originating from different locations.

The 2 objects on the left are simple sample players. You can trigger them to play a sound. See File > Examples > Audio > SamplePlayer for an example. Or check out part 2-3 in the tutorial.

The 2 delay objects create delayed copies of the sounds. Slightly different delays are the primary way humans perceive the location where a sound originates. So you'd configure each delay tap's delay right before starting the sound playing.

Those 6 mixers combine the sounds together, so if you play both at the same time, both will be heard. You can also reconfigure the gain of each mixer channel, so the "far away" sounds are slightly less.

Then on the far right are the 2 output objects. The i2s_quad1 sends 4 channels to pins 22 and 15, which the two audio shields will turn into stereo outputs. The dacs1 object sends sound to the 2 DAC pins on a Teensy 3.5 or 3.6.

Thank you so very much! this is absolutely grand. I'll get to it stat