Multiple simulatenous audio files from single board

Status
Not open for further replies.

KTCastil

New member
I'm pretty new to Teensy and especially the audio board and library. I have recording on a single mic up and running but for my project i need to record multiple microphones and record a single file per microphone. The only way I see to do this at the moment is a board per microphone. Is there any way I can record multiple files on multiple mic per board? By per board I mean a single Teensy and the possibility of multiple audio boards. If I get pointed toward a potential solution I can likely figure out the particulars. Thank you for any help that can be provided.
 
Today the Arduino SD library just isn't up to the task. Early this year I began a complete redesign, but so far it's still read-only. When it gains write support, and with the larger memory on Teensy 3.6, my hope is to enable this and many other applications which write a lot of data to SD cards. But for now, the simple single sector buffer, single sector write approach of the existing SD library just isn't good enough to sustain writing 4 separate files at sustained audio bandwidth.
 
The Audio CODEC on the PJRC Audio Adapter is a NXP SGTL5000 device. It supports only one microphone input per Audio Adapter but does support two line inputs per Audio Adapter.

If you used external microphone preamplifiers to provide the necessary line input levels to the Audio Adapter then you would have hardware support for two audio inputs per Audio Adapter.

The digital output of the Audio Adapter is an I2S data stream to the Teensy cpu board. The most common and easiest configuration allows for two Audio Adapters to feed a single Teensy cpu board.

Therefore a hardware configuration of four external microphone preamplifiers, two Audio Adapters, and a Teensy would give you hardware support for four microphones. Software on the Teensy to stream those four microphone channels to four separate files would then be needed.

You did not specify the type of memory you were expecting to use but I'd investigate recording your existing single microphone input to four separate files (Each file would contain the same sound but would exercise the recording process). This test would show you NOW if there were any performance limitations recording four data streams to your memory device. See Pauls previous comments on the limitations of using an SD card for your memory device. (we were both replying to your query at the same time ...)

See the NXP SGTL5000 DataSheet at:
http://www.nxp.com/products/media-a...io-codec/ultra-low-power-audio-codec:SGTL5000

See the bottom portion of this forum thread for suggestions on using two Audio Adapters:
https://forum.pjrc.com/threads/29373-Bit-bang-multiple-I2S-inputs-simultaneously?p=79606#post79606

A picture at the end of this page shows the two Audio Adapters stacked on a single Teensy
https://www.pjrc.com/store/teensy3_audio.html

One example of a microphone preamp can be seen at:
https://www.adafruit.com/products/1713
 
Last edited:
I'm running Teensy 3.2 with the Teensy Audio Board and have had good luck with playing two sounds at once as described in the workshop. Now I want to run three sounds at once, and it sort of works but glitches out (as if playback sample rate is being decreased). I've tried reducing my mixer values to stay way below 1.0, but it doesn't seem to be a volume issue.

Are there any other parameters I am missing? Anyone else had luck with playback of over 2 stereo audio files?

PS: Of course just after posting this I switched SD cards. I have 3 files playing at same time with an SanDisk 8GB Ultra card quite well. Also adjusted my memory settings, though I can't tell if that did anything. The card did the trick.
 
Last edited:
Status
Not open for further replies.
Back
Top