Digital compressor circuit

Started by niftyprose, July 06, 2018, 12:14:29 PM

Previous topic - Next topic

niftyprose

Hi guys,

Anyone aware of a digital compressor circuit capable of variable bitrates? I'm guessing that some kind of DSP operation would be needed, but I haven't been able to find much about digital compression and would be grateful for any input.

Best, NP.

ElectricDruid

Providing a variable bitrate is a different effect from basic compression, so I don't see particularly why anyone would have combined them, though someone may have tried it.

What exactly are you after? Do you want a digital compressor? Why digital? Or are you more interested in a variable bitrate/sample rate reduction effect? I'm not quite clear.

niftyprose

Hi ED, I was reading your site last night, and I'm delighted that you replied.

My own reading indicates that my terminology was off. I was conflating sample rate reduction with bit crushing. Let me start over.

I want to build a lo-fi compressor sounding perhaps like the Fostex MN15 or MN50 micromixer rather than a guitar pedal. (I'm hoping this would bring me into the same territory as the Zvex 'Instant', albeit by a different route.) There's a few possible schematics for analog compressors online.

However, it struck me that messing with the sample rate would move this into interesting early-sound-card territory. I could fake it up by combining an analog compressor with a bugcrusher or similar but I imagine that digital compression would be the way to go to do it properly.

There are very few hobbyist digicomps, AFAICT...

Best, NP

Transmogrifox

There is a lot of open source code out there for DSP compressors.  The question for you is whether you are familiar with hardware and the process of porting code to a specific DSP platform.

For example:  https://github.com/transmogrifox/transmogriFX_bela/blob/master/src/fb_compressor.cpp

Was written generally enough to run on anything with a floating point unit, but specifically was implemented on bela.

Another good (and much less expensive) platform for this kind of stuff is the Teensy

Simple compressor algorithm is not hard if you aren't picky about getting precise relationships between control knob positions to compression ratio and attack/release times.

Either way, a bitcrushed variable sample rate compressor will sound like sh**, but this flavor of sh** seems to be considered a good thing in certain kinds of music.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

niftyprose

Heh heh heh... Thanks, TF. Those are very helpful steers, although I'd rather a discrete circuit than DSP if anyone is aware of one. And I apologize wholeheartedly for my shitty taste.... Best, NP.

ElectricDruid

You won't find a digital compressor design that doesn't use a DSP of some sort, or at least a processor. At least, I'd be very surprised if you did, and I'd send you out looking for a mare's egg and the last unicorn next, because you'd clearly have a talent for that sort of thing.

If you're looking for a similar sound, I think something like you suggested with a cunning combination of analog compressor and S&H "bitrate reduction" like the bug crusher would probably get you pretty close.

Otherwise you're looking at the usual suspects for DIY DSP - Teensy, Spin FV-1, dsPIC, maybe STM F4. Each has advantages and disadvantages.