Rockbox Development > Feature Ideas

FS#10199 - Dynamic Range Compression

<< < (5/10) > >>

ykevinw:
Don't worry ZincAlloy, it wont go into the wroing hands. 
If this compressor gets implemented I promise to use it for good and not evil  :)

CatBus:
FWIW, I use a specially compressed (using the compand utility in sox) copy of my library for the car, and have discovered that per-track dynamic range compression can break gapless playback, because the sound levels at the juncture of two tracks will not necessarily match after each track has been separately processed.

So, in the event this gets implemented, it will need to be unaware of track boundaries and simply apply to the audio output stream, like the equalizer.  If it is aware of track boundaries, it will need to gently fade in and out the effect at the ends of tracks.

Blue Dude:
This feature is one I have been hoping for.  I play a lot of music with a large dynamic range (symphonic, instrumental, etc.) in the car and I find myself working the volume control a lot.  Since this feature doesn't seem to be immediately forthcoming, I think I'll just write it myself.  :)

The problem is that it's been a long time since I've done any programming, and I never learned C anyway.  I'm going to get myself up to speed on C just for the sake of doing it, but I'll likely need some assistance in getting around the Rockbox code.

Anyway, my plan is to implement a simple hard limiter with selectable pre-amplification.  It would be user selectable with a simple menu item: OFF, Min, Med, Max.  OFF will pass through audio with no changes.  Min, Med, and Max simply set the amount of pre-amplification of the audio, perhaps +3, +6 and +12 dB.  If DRC is active, the output buffer will be checked to make sure the audio will not be clipped.  If not, then no further changes are made.  If there will be clipping, then we can ramp down the volume output over a short period of time (a few milliseconds) leading up to the clipped sample(s) to keep it under the max signal limit (minus a bit of headroom).  The volume will then return to normal at a slower rate (call it 100ms) to prevent pumping.

Result: louder audio without digital clipping.  This does raise the noise floor, and it won't do very much for you if the audio is already reasonably loud to begin with.  It also robs the music of punch.  In fact, it'll sound much like commercial FM radio or TV ads.  This is really only intended for dynamic material in noisy environments, not critical listening.

Feedback, from users and developers, would be appreciated!

Chronon:
Hi.  I merged your topic with the existing one.

Blue Dude:
A test patch is now available, as FS#10199.  This is an interface test only.  I'm just trying to hook into the system without compromising anything else.

I decided to go with a user selectable preamp setting vs. and OFF,MIN,MED,MAX scheme.  Amplification is selectable from 0 to +20dB, with 0 disabling the feature.  Comments are welcome, especially if you spot potential problems or bugs.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version