I had success with the example shown in this answer.
Install Steve Harris's LADSPA plugins and then run the following in
load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
The parameters (the
control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
- RMS/peak: The blanace between the RMS and peak envelope followers.RMS is
generally better for subtle, musical
compression and peak is better for
heavier, fast compression and
- Attack time (ms): The attack time in milliseconds.
- Release time (ms): The release time in milliseconds.
- Threshold level (dB): The point at which the compressor will start to
- Ratio (1:n): The gain reduction ratio used when the signal level
exceeds the threshold.
- Knee radius (dB): The distance from the threshold where the knee
- Makeup gain (dB): Controls the gain of the makeup input signal in
- Amplitude (dB): The level of the input signal, in decibels.
- Gain reduction (dB): The degree of gain reduction applied to the input
signal, in decibels.
Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal by creating the following
A sample MP3 file can be played through the compressor using mpg321 ,
mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"
alsamixer -D compressor can be used to adjust parameters in real-time.
This answer explains how to load the plugin permanently.