I was awake last night, thinking about algorithms. One difference between my music and a lot of the music I listen to is volume, the loudness of these tracks. I don't at all like the idea of these squashed tracks, a solid block of wave, because it is the variations in dynamic power that IS emotion. The difference between art music and advertising is 'in your face' volume - but perhaps this shows that pop music is as much advertising as art, perhaps more advertising than art. For listening I like the sound of 1980s and 1990s CDs that had a 'dry' dynamic range; my Kate Bush albums, the classic Queen albums, ranging from a whisper to a hurricane. This aside, one can't have too many tools, and Listening to the loudness of Bowie's Heathen made me think about creating something of a heavy duty limiter.
The key is to make everything louder and avoid any distortion from clipping. I have a limiter in Prometheus which simply scales and clips the tops of waves, and for small infringements over the maximum it can stop distortion and limit the wave perfectly. I wondered if I could make something on another level by looking ahead to find the peak of a signal and scaling everything in that range.
I spent hours on this today, and in the end my efforts were futile and frustrating! In the end I did something else, and adapted my limiter to float between clipped/limited and unclipped, like a volume trace, and the result is scaled by this floating amount. The results are very good, I can double the volume of wave into super-distortion territory, with barely any distortion, and I have a few parameters to play with.
Here's the raw output of my current limiter with some extreme parameters set. The wave is limited over 50%, clamped to 75%. You can see the top of the wave has been flattened:
Compare with this new one:
The peak goes higher, over 75% but still under 100%, but it's a lot smoother. The input wave is a 100% sine wave.
Well, the results sound better, but are not perfect. They are a little unpredictable because they can still go over the limit... this is merely a start for a day's work. I'm not sure if this will be useful at all - I've hardly ever used my old limiter, but perhaps anything new is worth pursuing. The compressors in my other software like Sound Forge are not nearly as good though, and I'd much prefer to develop my own algorithm, as I have with everything else.