Tomass Limter V1.0


WHAT IT DOES:
It started as a stand alone application running on a DSP board
that i used to mantain my home theater volume at a fixed level,
then it was readapted to process and to enhance music,
since my sound sources are almost infinite (CD, satellite, tapes,
internet...more).
As you can hear, it does not change substantially the sound 
spectral balancing (except for a bass frequency equalization
i added to satisfy my "bass addiction") and with some 
practice it can be adjusted to process various kinds of music,
bearing in mind some key points:

1) an audio compressor is a nonlinear process, so it adds
   distortion to your material. The real skill of the various
   professional equipment producers (and the time i spent in
   optimizing it) is in minimizing all side effects coming out
   from this.
   So, since the input/output equation is "trash in, more trash out",
   always use good quality input material, or,in other words,
   don't expect so much in processing a 64Kbps song.

2) Material coming from radio or satellite broadcasting is still
   processed with multiband processors which cost many $$$$$ and
   its loudness, in most cases, is the maximum possible.
   In these cases, comparing the sound with or without the
   limiter, you should hear no difference.

3) Since different kinds of music need different processing parameters,
   the span of the controls was studied to cover almost all contemporary
   music. Some genres (drama or classical music) needs to be processed
   the MINIMUM POSSIBLE, since a "dynamically flattened" opera looses
   almost totally its expression.
   For this kind of music i could suggest no processing: a "NORMALIZE"
   pass with the most common audio editing soft prior to record is enough.
   


upgrades from v0.2:

- "NORMALIZE" function removed since it is always on.

- Corrected HF limiter to make it less reactive to
  sibiliants.

- Now the window is "discrete" and correctly closes.
  You can get it back on the screen using "configure" button.

-Added "TEST TONE" function: pressing it while playing a song
 makes the limiter to generate a 1KHz tone.
 The level of this tone will never be exceeded and you can align
 your recording equipment to this level.

In progress (it could take some time):

-Five bands compressor / downward expander + dual band limiter (90% done)
-Reverberation and ambience effect for stereo expander (80% done)
-Low frequency harmonic generator (100% done and working)
-Distortion compensated clippers (some tests done)
-YOUR IDEAS :)  

Known bugs:

-Since i don't know how to catch the "song change" event
 in Winamp except using a ugly and buggy continous polling,
 i cannot clean the stereo expander arrays, so, using long
 times ("depth" control) and high "level" settings, you 'll
 experience clicks and pops at the beginning of a new song
 jumping from another.
 This is not noticeable if songs fade out smootly, but, if
 a song ends abruptly, after a few millisecs silence  introduced
 by winamp in passing from one song to another, at the
 beginning of the next song you 'll hear the content of the
 buffer that was filled with the previous song.
 I know very well how this bug is originated, but until i'll not
 know how to safely catch events from winamp window, there is
 "no solution"...sorry


CONTROLS:

AGC (indication): this is a slowly acting gain control that brings
the audio input level to the optimum for the HF and LF limiters.
LIMITERS OVERDRIVE: this control boosts the input level to the limiters.
Increase it to get more sound pumping.
LIMITERS HF-LF (indication): these bars show the amount of limiting
for the high frequency and low frequency band;
the higher the limiting, the lower the bar position.
PROCESS: this slider controls the tradeoff between clipping and limiting. 
Towards "HARD" the sound is controlled primarily by clipping
but you get the maximum sound consistence, towards "SOFT" the
sound is controlled by limiters. The "SOFT" processing is suited for
melodies, jazz, classical...you'll have lower sound pressure, but this
is the cleanest process you can get.
The "HARD" process is good for disco and pop music, more clipping,
more distortion but a massive loud sound.
It's up to you and your own taste.
ATTACK/RELEASE: these controls act on the times in which the limiter
will respond to sound level change.
A little attack time will make the limiter to quickly adapt to an
increase in the sound level thus preventing clipping, but in many
cases you 'll notice an unnatural sounding of many songs
(expecially on sibilants you 'll hear a large reduction
of the gain).
The release time is the time that the limiter takes to adapt to
a new level when the music pass from high to low.
Reducing this time you 'll notice an increase of the loudness.
Even in this case you may adjust these controls upon your taste,
remembering that small release times increase the loudness, but
tend to create a "fatiguing" sound that, within 5 minutes, will become
unpleasant.
A good general setting is: HF-LF attack=20mS, HF-LF RELEASE =1000mS.
If you need some bass pumping try LF RELEASE =700mS.
HF and LF attack should be optimized for most natural sounding and
minimum clipping.
BASS DEPTH: This control modifies in realtime the LF filter curve
in order to boost the band around 60Hz. This is the band of
"subwoofer" frequencies. Personally i like "warm and smooth" bass
and i think that this control lets you choose the amount of
"warmness" and "softness" of the bassline.
Another "own taste" control.
Note that, because of their poor low frequency response, the
effect of this control will be not very noticeable on most
PC low cost speakers.
STEREO EXPANDER: It controls the amount of stereo image expansion.
Don't exceed with it because it may make some songs to sound innatural.
A setting between 30 and 60 is enough for most cases.
STEREO EXPANDER DEPTH: It controls the amount of "enlargement"
of the enhanced stereo image.
Try it with a known song, set the STEREO EXPANDER at its maximum
and then experiment with some settings of depth.
You 'll notice a real "enlargement" of the image.
Good settings are around 100-200.
WARNING: use the stereo expander with great care with mp3s.
The Mpeg algorithm puts a large quantity of error in coding
the high frequency bands, the same bands where the
stereo spatial image is contained.
With poorly coded songs you might get an enhancement 
just of coding errors!!

SWITCHES:
BYPASS ALL: It really switches off the "Tomass Limiter" and
make the sound to pass through it unprocessed.
BYPASS DYN: Bypass dynamic limiters and clippers.
You can use the "Tomass limiter" just as a Stereo Expander, if you like.
NO CLIPPER: Turns off the clipper. If you don't need a "brickwall"
limiter, you may switch off the clipper, further increasing the
quality of the sound. A little note: the clipper accurately simulates
a "tube clipper", so its response is a smooth curve that will not
introduce as much distortion as "hard" clippers.
NO EXPANDER: Turns off the stereo expander. Useful for comparison.



Thanks:
first of all, Silvia for her patience and for my feeding,
then all the people who contributed more or
less actively to this project:

Math co-processors (387):
Antonello, Galliano, Betta, Alessandro, Gian Maria 

C compilers:
Stefano D. , Beppe V.

Audio analyzers:
Andrea DA, Francesco, Roberto, Luca 30, Paul Gallo, Jean Marc Meis, Antonio Sanchez

Friends of a life:
Paolo, Paganotti, Stefano M. , Andrea A. ,Federico (dB), Il Boccia, Il Farfa,
Il Tosti,Massimo M. , Luz.

