Teensy Audio 24bit 48kHz qustions and more..

Van

Well-known member
Hi,

before I start , I would like to thank the developers for the incredible platform you're making possible for musicians (and not only programmers), like me!

But I really would like to use the teensy and the amazing audio lib in a more professional environment.

so my 1st question:
are there any plans to implement 24bit and 48kHz(at least)?

why is this important:
because 24bit is a standard in the professional audio production.
nobody (at least in my circles) produces or record in 16 bit! really guys.. nobody! so when your recordings and projects are at 24bits, but your effects are 16bits there is a huge quality bottleneck in your rendering pipeline. And this is what you try to avoid at all cost! And yes - the most of us producers are sensitive to this quality difference. And another yes, I hear the difference between 24 and 16bit. clearly. just like 16 and 12bit and like 12 and 8bit..

so next is the sample rate..
44.100 kHz is CD quality. We all know that. But CD's are dying, so the restricted format with it.
Nobody produces CD's anymore (besides some small dying out labels..). There is absolutely no reason to stick around with this rate anymore.

The most of the professional audio projects I'm dealing with are in 24bit @48kHz(or 96kHz)

And I hear right now some people talking:
"Well, CD is ok. Look at some Pink Floyd productions. It sounds amazing!!"

Yes, it does. But after the hard computational work (besides, that the most of it is in the analog domain..) and is done in (at least) 24bit @ 96kHz and compressed at the very end to 16bit @44.1kHz (with btw., really expensive gear!!!). And these guys are THE Audio Engineering Dumbledores.
So you want in your production line the most, best quality you can get or handle and your mixers and reverbs and compressors and so on, simply to have more information/ data to work with.
You can then always go back and compress it, lets say, for a birthday card..

So, I would like to see the teensy audio in a little bit more professional domain, rather than the experimental, electronic nerd, hobbyist world.

What would you guys say about it?

SFAIK Paul is an audio driven guy and the intention was or is to make audio stuff. or isn't it?
And of course I would pay more for a professional audio shield with good AD/DA converters!!!

so happy new year, again and cheers ;) !
 
Nobody hinders you from forking the audio library on GitHub and to create a 24/32bit and 48/96kHz variant. If you are there, you might add a breakout board for the PCM3060. It's no witchcraft.
 
Yes, Van, pls leave a message here when you're done with porting - i'd really like to help to test it!

(I do not miss 24 Bit, and I fear I'm not able to hear any difference with my ears, but it sounds fun :)
 
Not sure you've seen the Audio Library Development Roadmap. In it, Paul gives more information about his goals for the Audio Library and why, including 24 Bit Data & Faster Sample Rates.

In the end,
[the] primary focus of the Teensy Audio Library is 16 bit, 44.1 kHz data.
 
Didn't the guy doing the hearing aid project make a fork with 32 bit floats on Teensy 3.6?

As far as what I'm going to do with the audio library, for Teensy 3.x where we're running at less than 200 MHz, and under 100 MHz without FPU on Teensy 3.2, we're staying with 16 bits. Well, except for very experimental stuff like the hires sine wave using a pair of 16 bit channels for 32 bit res.

After we have Teensy 4.0 with much higher performance and more flexible clocking (dedicated audio PLL), the technical trade-offs will be different. But just to be realistic on time frame, plenty of other stuff is going to be much higher priority, so a major redesign of the audio library is very unlikely to happen in 2019. I probably won't even be ready to seriously talk about such a thing until next Fall-Winter.
 
thank you guys for the response!

perhaps some of you didn't catch the fact that I'm talking from a musician standpoint and not from a developer point of view.
And I see an incredible potential in the technology you make! And that also, we rely heavily on that technology in the future!

At the moment teensy audio isn't usable in a professional environment. I've tried to explain.
And I've already build instruments that use the teensy as a controller, but I had to find another solution for the sound engine. And you do know why.. it's not just the 16bit thing..

And I really don't want to start a discussion on things that are obvious in terms of simple mathematics.
Btw. in the video VFX domain they're dealing with quite the same problematic - you're watching all your Netflix favorite movies in 8bit! But every composed frame is at least 16bit, or even 32bit of color information in the production pipeline. why? because of the dynamic range! it gives you much more control in the post production workflow.
as the same in the audio domain. it's exactly the same reason.

We're aware of that, that most of you guys don't hear the difference. And that, at the end of the day, everything is hanging around, heavily compressed in YouTube or Spotify, where the high end sound like an alien talkshow... This is why we make different mastering versions for Radio, Tv, Club, YouTube etc...

so Paul said 2019 has nothing to offer in terms of audio development. But this is good news . Because it shows that it is an issue he is thinking about.
And I can wait!

cheers!
 
Let's imagine for a moment it's mid-2020 and we have much more powerful hardware, and the software ecosystem is developed and stable enough to really embark on a major new software project. Let's also imagine this hypothetical future has Teensy still in the same form factors, everything pretty much the same as you see today, but enough processing speed and memory to make higher res and faster sample rates a good technical direction for the general purpose audio library.

Can you explain how you're imagining using Teensy in a professional production pipeline? Remember, I'm an engineer & not a musician, so I'm not even 100% sure what "production pipeline" really means.

As a tech matter, how you do envision getting these 24 bit signals into and out of Teensy? How do you manage the digital clock domains? Or are you thinking analog signals? If analog, how about grounds, clean power, thermal issues and a million other minor things that happen at analog scale -100 dB & lower?


so Paul said 2019 has nothing to offer in terms of audio development.

Oh, plenty is planned for 2019 (and had been planned for 2018, but got put on hold for new hardware dev), just not a major structural change away from the current software architecture that's built around ARM's DSP extension instructions.

But when/if things move in this direction, the very first step (well, beyond the high res sine wave we already have) is I/O. And frankly, I really have no idea what we would do for I/O that would make Teensy fit into a professional production pipeline. I hope you can give me some insight there?

Or for a higher level question, where does a ~$20 microcontroller board and some sort of DIY electronic project you make with Teensy fit into a professional production pipeline? Aren't these sorts of audio production tasks done on very high end PCs and Macs? What part will Teensy play, and how will it connect to the rest of this system?
 
Last edited:
Hi Van,

I have the same questions here as Paul raised.

Why use a cheap Teensy if you have all your thousands of dollars 24bit equipment at hand?

And you have to distinguish between sampling and processing:

Processing of the audio data can already be done in 32bit floating point, the Teensy 3.6 has that nice floating point FPU. The audio data can be processed in the same way and with the same accuracy as with your "professional" equipment. The problem is to get high resolution data into the Teensy :).

However, I doubt you will get real 24bit audio sampling resolution from one of your professional gears: 24bits would mean 144dB of dynamic range, more than you will ever need (BTW, if you were a kid, your ears would have about only 120dB of dynamic range - thats equivalent to 20bits, as an adult: probably even less). [off-topic: I recently played some high frequency notes to a highend audio freak who claimed to be able to hear the difference between loudspeakers high frequency response above 15kHz: he was shocked that his ability to hear sound above 8kHz was apparently completely gone because of his age]

We're aware of that, that most of you guys don't hear the difference.

Good point, with my software defined radio experiments, I failed to even hear a difference between 10, 12 and 14bits.

So I really doubt that you (or anybody else) will be able to hear the difference between a 16bit ADC (96dB dynamic range) and a 24bit ADC (144dB dynamic range) ;-).

What you will hear is NOT the difference in terms of number of bits, but the quality of all the things Paul mentioned: grounding, power supply decoupling etc. of your specific type of equipment.

The ultimate test for a "bit-hearing" competition would be to take a professional 24bit ADC and a separate DAC, connect them to the Teensy and process the data with 32bit floating point with a digitally adjustable bit resolution and then make a comparison with nice headphones :). I did that with my software defined radio (16 bit ADC/DAC) and failed to hear a difference between 10bit and 16 bit resolution . . .

. . . but thats just my personal experience with audio quality and number of bits, maybe I simply did not yet have the opportunity to use really capable 24bit audio equipment . . . I may be convinced some time in the future (if my ears remain capable of hearing in the dynamic range of 120dB).

As Thierry says, the best way for you to convince someone is to go ahead and implement 24bit sampling and 32bit processing in the Teensy audio lib. Then everyone will be able to hear the difference.

Have fun with the Teensy!

Frank DD4WH
 
As the tympan project (24-bit hearing aid) has shown, it is 'easy' to take Teensy HW, add a 24-bit capable codec and do better quality audio than 16-bit.

concerning audio HW, a 24-bit ADC has the advantage for reduced requirements concerning gain and Anti-aliasing filtering.
 
But when/if things move in this direction, the very first step (well, beyond the high res sine wave we already have) is I/O. And frankly, I really have no idea what we would do for I/O that would make Teensy fit into a professional production pipeline. I hope you can give me some insight there?

yes, please. good AD/DA converter at first. this is where many, even commercial, products fail very often.
and why not a dedicated and well dimensioned power supply?

If you go for teensy as a usb audio device, please do not use USB2.x.
This protocol ruined a whole generation of audio devices.
 
Hi Van,
The problem is to get high resolution data into the Teensy :).

Have fun with the Teensy!

Frank DD4WH

yes exactly! but also out of the teensy.

..

thank you. I have fun with the teensy! I'm just struggling a little bit with the audio quality ;)
 
As the tympan project (24-bit hearing aid) has shown, it is 'easy' to take Teensy HW, add a 24-bit capable codec and do better quality audio than 16-bit.

concerning audio HW, a 24-bit ADC has the advantage for reduced requirements concerning gain and Anti-aliasing filtering.

the 'easy' part is what's concerning me. perhaps for the most of you. for me it's a at least a 2 weeks project.. ;)
 
Here's one of the very best articles I've found on this subject.

https://people.xiph.org/~xiphmont/demo/neil-young.html

Regarding need for 24 bits in recording, it says:

Professionals use 24 bit samples in recording and production for headroom, noise floor, and convenience reasons.
.....
The primary reason to use 24 bits when recording is to prevent mistakes; rather than being careful to center 16 bit recording-- risking clipping if you guess too high and adding noise if you guess too low-- 24 bits allows an operator to set an approximate level and not worry too much about it.

So I'm imaging a recording studio, you know, with the special sound-proof walls, double-pane windows with glass at a slight angle and all the other stuff needed to get that < -100 dB noise floor. The room is filled with expensive gear, at the very least a few high quality microphones that probably cost more than most people pay in a month's rent.

Where & how does a $20 Teensy & a DIY electronic project fit into that professional recording room?


The article also confirms much of what's been said about processing:

An engineer also requires more than 16 bits during mixing and mastering. Modern work flows may involve literally thousands of effects and operations. The quantization noise and noise floor of a 16 bit sample may be undetectable during playback, but multiplying that noise by a few thousand times eventually becomes noticeable. 24 bits keeps the accumulated noise at a very low level. Once the music is ready to distribute, there's no reason to keep more than 16 bits.

Likewise, this makes a lot of sense. But what hardware does those thousands of effects and operations? Do you really use a $20 Teensy for that work? Somehow I've always imagined people doing this are the ones who actually buy Apple's "trashcan" Mac Pro and software like Logic Pro X, or high end workstation-class PCs with, well, I know no idea what software does this sort of thing on the PC side - whatever runs all those VST plugins maybe?

I guess my biggest question would be how professional master work handles transferring digital sampled data between different clock domains? If you do all the processing in just 1 software environment, then you can get everything in sync to one master 48, 96, 192 kHz clock on input, and then do everything full synchronous (as we also do in the audio library on Teensy) while in the digital environment, and suffer non-ideal timing effects jitter & phase noise only once when you output the signal. But if you're passing digital samples between different devices, how do you handle their clock domains?
 
As the tympan project (24-bit hearing aid) has shown, it is 'easy' to take Teensy HW, add a 24-bit capable codec and do better quality audio than 16-bit.

Has it really shown that? Or has it done what nearly all 24 bit implementation do, achieve THD+N worse than -96 dB, and a dynamic range barely better than 100 dB, when used in any practical system?

I mean, we've been down this path before, seeing what sort of hardware is really necessary.

https://hackaday.io/project/5912-teensy-super-audio-board

If you're Cirrus Logic or Wolfson and you build this sort of hardware and all you ever do is connect it to the most expensive gear from Audio Precision, then you're going to be able to claim artifacts all in the -110 to -120 dB range. Maybe, though how honest all those specs really are may be debatable.

But as soon as you use common grounds, now you've got ground loops - so even with balanced audio, the CMRR of your differential receivers (which is of course always optimistically specified at only 1 frequency, or even at DC so the semiconductor manufacturer can claim a big number) enters into the equation. So do all sorts of analog factors.

Which again is why I question if you're really going to use Teensy, or almost any product, in a professional mastering setup where you make a trip from digital to analog and back to digital? If you're concerned about numerical round off issues down near the LSB of a 24 bit number, you'd think going through A/D & D/A that fills most (or all) of those low 8 bits with noise+distortion would be unthinkable?
 
Last edited:
I guess my biggest question would be how professional master work handles transferring digital sampled data between different clock domains? If you do all the processing in just 1 software environment, then you can get everything in sync to one master 48, 96, 192 kHz clock on input, and then do everything full synchronous (as we also do in the audio library on Teensy) while in the digital environment, and suffer non-ideal timing effects jitter & phase noise only once when you output the signal. But if you're passing digital samples between different devices, how do you handle their clock domains?

there are specialized ultra low jitter master clocks for that.

Where & how does a $20 Teensy & a DIY electronic project fit into that professional recording room?

in many ways.

until now I've build multiple instruments out of the teensy. a friend of mine added midi support in some old analog gear. etc..
or, f.e., for one of my projects I needed a ondes martenot. these things are really hard to find and expensive to rent. there is a guy in canada who is making them in a small, strange form factor. I didn't like the form factor so I build it by myself. I did an extensive research on how the sound generation is done. looked in some patents and decided to go with the teensy. But at the end I used it only as sensor and controller.
I really tried to make use of the audio lib/ shield but the there where issues, so I had to find another solution regarding the sound generation (i took an old moog).

so, there is a lot of use for the small teensy in a pro rec. room. perhaps not exactly in the way you imagine, but it is here. and everyone who's coming by, admires it. :)
 
Now retired. Like many people with curiosity and motivation, I've acquired semi-pro h/w + s/w engineering and audio knowledge and skills over the last 25 years.

Both of Paul's referenced quotes are right on. The main two reason to use 24-bit is 1) to make it easier to set the recording input level, and 2) to have plenty of headroom when mixing (summing) channels. In both cases, those extra 8-bits of resolution are used at the top end of the dynamic range. Then when doing a final mix (mastering), dynamic range is compressed to fit into 16-bits and the lower 8-bits are thrown away.

So, as a general rule, I always record at 24-bits and master to 16-bits.

However, consider...

For every Pro user, there are probably 1000 semi-pro's user, and far greater number of hobbyists (I made up these numbers, but you get the point). Who in their right mind would DIY a Digital Audio Workstation based upon Teensy 3.x for anything other than a hobby project build when there is so much great Commercial Off-the-shelf equipment is available these days. How could one compete with using your existing computer + DAW software + audio interface (USB, Firewire, Thunderbolt, etc).

Finally, I might be wrong. Let me know.
 
This is a very interesting conversation.

@Van, I'm greatly impressed that you've built your own instruments. But what is the need for 24-bit, different sample rates, etc. for such projects. Would you not use a DAW and/or outboard equipment for that?
 
This is a very interesting conversation.

@Van, I'm greatly impressed that you've built your own instruments. But what is the need for 24-bit, different sample rates, etc. for such projects. Would you not use a DAW and/or outboard equipment for that?

I actually didn't intend to start a general conversation about audio engineering. This is always pita...

about your question:
yes this is exactly where I ended up. using another synth.. and this is actually pity, because I was able to reproduce (well in theory) quite the same behavior of the ondes. but like I mention before - there where many issues regarding the sound quality (and not so much the performance), so I had to abandon the teensy as sound source.
besides, if you build something out of wood and metal with electronics in it, there is always an intention (at least for me) to be able to encapsulate the whole thing and make it so independent from other gear/software/etc.. as possible. then it becomes, what I consider as a instrument!
 
but like I mention before - there where many issues regarding the sound quality (and not so much the performance), so I had to abandon the teensy as sound source.

If the software had 24 bit support, what hardware would you have used for the analog output?
 
Just for fun I googled for samples, and all I found was 16Bits/44Khz. Ok, with more than 5 minutes googling I'll find >16Bits perhaps..
I found "professional" samples with 16Bit.

I understand the need of 24Bit in some cases, but.. for an instrument?
If you just want to output 24 Bit..or even32 bit (with the 16 bit shifted, and lower bits zero) to I2S that woul be pretty easy. 48Khz (or 96 if you want), too. Without needing to rewrite the whole library - just by editing the I2S output.

Soundquality: Maybe you had some bugs in your program? Or there exist bugs in the library-code for the effects? Can you please post a code-example with bad quality? I want to look at it, when I have some time.
 
Are analog instruments sampled with 24Bit?

Not sure there's a standard.

FWIW, my view on this is that I have applications for higher (and lower) sampling rates, so would be interested in seeing that in the timeframe of the Teensy 4. Nothing to do with quality, just functionality.
The data sheet for the SGTL5000 doesn't discuss anti-alias filters, (at least a quick glance didn't reveal anything) but being able to sample with "decent" clock accuracy at 8, 16, 48 and 96 kHz would be useful to support applications that certainly would fall into the market bracket for a 600-mHz ARM. I couldn't quite get there with Teensy 3.6, but if 4.0 will tolerate living in a heat-sinked shield can then I can see using it.

My .02,
--jim
 
Back
Top