Audio compressor

Mike5000

Well-known member
Is there some working audio compressor code with basic adjustments available for the Teensy 4.x? (I noticed there seemed to be something in the floating point library? Has anyone tested that?)
 
I believe its on Paul's list of things to do when there aren't pandemics or chip shortages or 1000 other important things to do! It shouldn't be too hard to knock something together using the existing building blocks, but I suspect it would be crude at best.
 
Hi All - In the speech compression, the original F32 classes came from the hearing aid designers via the classes written by Chip. To me, these were fine, but used a lot of lingo that was specific to the original applications. Rather than adapt, I wrote AudioEffectCompressor2_F32 that retains the flexibility of the original. It uses multiple segments of gain change and can run any where from "squelch" to "total compression."

Note that this is gain change only. It includes no clipping under any circumstance (because of floating point!).

For radio and other speech applications, it may be desirable to follow the compressor with a clipper. For ordinary audio as well as AM and FM, the real variable clipper works and for SSB there are specialized ones along with the _Z_ version. The clipping and compression can work well together.

For compression, I suggests looking at the Compressor2, above.
 
Back
Top