Audio Adapter -- 4/6/8 Channel Possible?

Status
Not open for further replies.

SaturnV

Member
Paul et al,

An audio question. My children like to go on Nerf gun missions in the basement. I got the idea last Friday for adding some sensors, LED lighting effects and audio effects to enhance play.. It's an unfinished space about 33ftx28ft. My son would love a helicopter sound flying overhead, explosions, walkie talkie chatter and I was thinking of mounting speakers in the ceiling -- I could go with 4, 6 or 8 channels- arranged in twos and spaced by equal intervals down the length. I'd like a sub on the floor for real bottom end for sounds like bangs, explosions, footsteps. Any ideas on how I can map an audio file across the channels and have it triggered by an Arduino or RPi? That way I can simulate a power flicker/failure on an explosion sound. I was looking at the (Teensy) audio adapter -- and running it in quad channel output. Would that work? If I needed more channels, could I not run an additional audio adaptor+teensy in a daisy chain to effect 6 channels? Would there be a delay?
 
4 channels is the simplest, since you can do everything from a single Teensy. For 6 or 8, you'd need two of them working together. You could use Serial1 to communicate between them, so if you start with 4 channels leave those pins available if you decide to later add another board.

For positional audio effects, you probably want to use the delay object. You'd feed the sound effect into this object in the design tool. Then take 4 of the outputs into mixers so you can control the amplitude of each. If you're going to have multiple sound effects play at the same time, with each appear to come from different locations, you'd use a separate delay object for each one. Then take the 4 outputs in the mixers, and those mixers go to the I2S quad output. This way, for each sound you're playing, you can set 4 different delay numbers and 4 different amplitude changes.

The human brain subconsciously uses audio delay to perceive location information. If your right ear hears the sound slightly before the left ear, you perceive the sound as originating to your right. Amplitude can also have an effect, where you expect the sound to be louder on the side it's closer, but delay is the main factor. Our brains also have excellent spacial awareness as we move, and people instinctively turn their heads to gain more information. If you calculate the delay numbers well, you should be able to make different sounds appear to be heard from different areas, perhaps even make the room seem much larger than it really is. Of course, the illusion won't ever be absolutely perfect, and especially indoors the hard surfaces of walls cause reverberant echo, so you can probably only take this so far. Sound dampening might be more effective than adding more speakers. Maybe?

There are also "vertical" effects I've heard about using varying lowpass filters (but I've not yet tried such things...) Apparently our ears have great spectral response to sounds originating on roughly our horizontal plane, but not as well for sounds reaching our ears from above. For certain types of sounds, vertical motion can supposedly be simulated by varying the amount of bandwidth by adjusting a lowpass filter frequency. Likewise, loud distant sounds that have traveled through a field of obstacles can arrive with the highest and lowest frequencies attenuated, and as they get closer they not only get louder, but become more distinct as we hear more of their high and low frequency components.

But delay is the most important effect for making sounds appear to originate from a specific direction. I'd recommend using Teensy 3.6, since it has the most RAM. You'll probably be looking at creating delays between 0 to 50 ms, so perhaps the larger memory is overkill. But maybe you'll also want to create a distant echo or other effect, or just play a larger number of simultaneous sounds, with different apparent positions.
 
Status
Not open for further replies.
Back
Top