TDM Audio Generator, 48kHz, 2 and 8 frame, 32 bit

First off, kudos to Paul and everyone involved in the Teensy and Audio library. I came to the Teensy (4.0) looking for a way to generate 8-frame TDM audio at 48 kHz, 32-bit...and in less than a day, I managed to hack something together that would is useful. That's really cool.

I'm contemplating trying to take it to the next step(s) and I'm looking for 1) guidance on how best to go about it ("best" meaning all of: easy for me, useful to others, and not conflicting with the Audio library) and 2) feedback on whether there's a larger audience beyond just me.

Limits: I understand the Audio library is 16 bit for multiple reasons. In my instance, I'm primarily interested in simple test patterns and signal generators, so I'm assuming it's not worth the effort (if even possible) to do a large-scale conversion project. I would classify myself as an Arduino/Teensy 'newbie', but pretty good with NXP SAI ports, C, C++.

Improvement #1, real 32-bit data. I'm just putting out test patterns (constants in each frame) and so the hack to get 16 16-bit frames to be treated as 8 32-bit frames was ugly but simple. Still, it would be easier to manipulate the generators in the future if I didn't have to treat the data as most and least significant 16-bit sets, and for all I know, there are alignment issues with my hack. So 32-bit versions of the AudioSynthWaveform, AudioOutputTDM, and AudioConnection would be good. Do I just hack the existing classes, create 32 bit variants and leave the existing alone, or something else? My minimal hacks to the library source "just worked", but as an Arduino/Teensy newbie, I have no idea what will happen if I just add a couple of files to the library folders. I've not seen a 'make' file yet. And yes, I'm guessing that everything I do gets overwritten if there's an update to the Audio library.

Improvement #2, adding simple audio wave form generation (sine and square wave at various frequencies) would be next on my wish list.

Improvement #3, some form of data input, logging.

Improvement #4, getting the input/output to/from a Linux PC. I've read several threads about USB and multiple channels and assume that's a step too far. I'm talking about a few seconds of audio, not play forever.

Any feedback is welcome.
 
Back
Top