Play quad channel wav file from SD

CocoLeBolideur

New member
Hello evryone,

I'm working on a project in wich I need to difuse quadriphonic sounds in a small room. I use a teensy 3.2 combinated with two audio shields. Everything works great, I use two stereo .wav files that are played simultaneously from the SD to the four outputs (pretty basic with built in examples). But I will soon need much more sounds and it would be better if I could use quad .wav files instead of stereo files. Is there any posibility to do this because playSdwav function seems only be able to play stereo files.

Thanks in advance.
 
After looking at the source code of the play_sd_wav.h and play_sd_wav.cpp files of the audio library, I can tell you that it's hard coded in 2ch mode (allocating 2 channel buffers and so on). To work in 4ch mode, a new similar object, based on the 2ch variant would still have to be written.
 
Hi!

I'm reviving this subject. I have a project in need of playing multichannel audio files from SD cards/USB drives. To start off with 4 channel audio files, and maybe more channels later on.
I've looked at the source of playSdWav, and I don't know if I have the skills to write a multichannel version of playSdWav.
If I try to use two instances of playSdWav playing one stereofile each I imagine they will go out of sync, or at least not start in sync?

I'm trying two audio shields as a start, later on I will try to use TDM with a DAC-chip, similar to what's described in threads about multichannel outputs.

Is there a plan to develop a playSdWav with support for audio files with 4-16 channels?

Thanks in advance!
 
Are 4+ channel WAV files really a thing? Is there any clear documentation on the format used? Which programs output WAV files in that format?

I hope you can understand how a clear spec on the format and a way to create the files for testing are an essential prerequisite for anyone to even begin an attempt to add this type of WAV file playing to the software.
 
Yes, for me its a big thing. :)

I use multichannel wav/aiff-files on a daily basis working with sound installations and immersive audio based music concerts (mostly ambisonic, 4.0 and 8.0 formats). I imagine the use of these types of files will get more and more popular as all immersive audio systems/formats as Ambisonics and Dolby Atmos and others grow. The largest amount of channels in the same file I've used is 64 channels, for working with higher order ambisonics.

All mayor DAWs nowadays outputs interleaved multichannel audio files. I often use the small utility sox to convert from a package of mono files to a multichannel one and of course in the other direction too.

I totally understand how those things are needed, no worries, I can of course upload multichannel audio files if needed, and I will try to find a good explanation of the format.
I also understand the problems with reading large amounts of data from SD cards and such, and I imagine one could get into limits there quite fast when going upp in channel numbers. :)
 
The raw WAV file channel count is a 16 bit integer, so you can loads of channels if you want.
You are also limited by the 32 bit byterate value to 4GiB/second.

You could use a WAV file as a 24-track recording if you wanted, though I doubt anyone does.
 
The raw WAV file channel count is a 16 bit integer, so you can loads of channels if you want.
You are also limited by the 32 bit byterate value to 4GiB/second.

I imagined such, but then (if using Raw) I need to to write a parser for the header of the file, or always use one type of file and channel number, that's hard coded in the software. I think an update of play_sd_wav would be the best, as then you could load different channeled audio files more easily, from mono and up. Maybe I'll try to make an updated version myself.

Yesterday I got a Teensy 4.0 and two audio boards in the mail, for trying out quad stuff. Hopefully there is a solution to this in a near future. I have an opportunity to present a multichannel sound installation in a local gallery, in march, where I like to make something small with a number of small loudspeakers. :)
 
I think an update of play_sd_wav would be the best, as then you could load different channeled audio files more easily, from mono and up. Maybe I'll try to make an updated version myself.
Hi Folks
I've just completed the PCB of my T4 Laser Synth, which simultaneously uses the Audio Library's synth waveforms *28 , mixed/multiplied down to 5 (XYRGB) channels, playable via MIDI surface & Reaper's DAW, which is working great, btw.
But, now I need to progress beyond the Audio library's individual 256 step audio waveforms, in order to create wireframe animated image sequences.
The developer of ILD Render, an app that is used to convert 3D Blender imagery into laser scanned 2D animated wireframes, informed me that it can produce 5 channel aiff files.
So, I only need to R/W aiff format via the T 4.1's uSD or uUSB to be in business, thanks to the CS42448 CODEC.
This thread looks to be the right place, but Frank's pdf link only returns a 404 error and mxw's post looks promising, but that was 3 years ago.
Has there been any progress on this subject or will I need to learn how to code my own library?
Thanks and Happy New Year to whomever replies.
😎
 
Not AIFF, but if you’re OK to convert to WAV you could try this. Not sure 5-channel is a thing, but 6-channel (aka 5.1) definitely works.
 
Not AIFF, but if you’re OK to convert to WAV you could try this. Not sure 5-channel is a thing, but 6-channel (aka 5.1) definitely works.
Thanks for the quick reply & link. Unfortunately, aiff is the format that ILD Render outputs, other than ILD (International Laser Display) format. 5 channel is a laser industry kinda thing, but my T4 Laser Synth can use all 6 ADC/DAC channels.
As it happens, there's another (unpopular) laser app that converts wav into .ILD, so there's a ray of hope.
Yeah, the CS42448 goes obsolete, just as I'm completing my project to be shared on github. It's only taken me 2 years to progress from the quad SGL5000 +PT8211, learn/develop/comment my code, learn/design op amp circuits, learn MIDI, learn Reaper, learn/design PCB in Kicad,, document the How-To, and debug everything. C'est la vie...:(

What is its recommended replacement (asks the forever hopeful Hermit)?

Furthermore, my MIDI surface that I have mapped to the T4 Laser Synth is an Akai APC40 mkii that has also recently become obsolete. Arrgh! 😈

Oh well, "Back to the drawing board".😢

Thanks! I really appreciate the info.
😎
 
Last edited:
Back
Top