High-Pass Filter Chain Operators in Ecasound
This article explains how to implement high-pass filtering on audio
signals using the Ecasound command-line audio processor. While Ecasound
provides built-in internal operators for low-pass and band-pass
filtering, it does not feature a dedicated native internal filter
operator for high-pass processing. Instead, high-pass filtering in
Ecasound is implemented using the LADSPA plugin chain operator
(-el or -eli) or preset operators
(-pn). The sections below cover the specific operators,
their syntax, and practical examples for applying high-pass filters to
your audio chains.
The LADSPA Chain
Operator (-el and -eli)
Ecasound offloads high-pass filtering to the LADSPA (Linux Audio Developer's Simple Plugin API) ecosystem. To apply a high-pass filter, you use the standard LADSPA effect chain operator:
-el:plugin_label,param1,param2,...: Loads a LADSPA plugin by its unique textual label and passes configuration parameters.-eli:plugin_unique_id,param1,param2,...: Loads a LADSPA plugin by its unique numerical identifier.
The most widely used LADSPA high-pass filter plugins integrated with Ecasound come from the SWH (Steve Harris) plugin suite:
highpass_iir(Single or multi-pole IIR high-pass filter):- Syntax:
-el:highpass_iir,cutoff_frequency,stages - Parameters:
cutoff_frequency: The cutoff frequency in Hertz (Hz).stages: The filter roll-off steepness (each stage adds 6 dB/octave; for example, 2 stages produce a 12 dB/octave slope).
- Syntax:
highpass_1804(Alternative IIR high-pass implementation):- Syntax:
-el:highpass_1804,cutoff_frequency
- Syntax:
Practical Command Examples
To filter out low frequencies below 150 Hz with a 2-stage (12 dB/octave) cutoff from an input file and output to a new file, execute:
ecasound -i:input.wav -el:highpass_iir,150,2 -o:output.wavTo apply a 300 Hz high-pass filter in real-time between your ALSA sound card input and output:
ecasound -i:alsa -el:highpass_iir,300,2 -o:alsaUsing Preset Chain Operators
(-pn)
Ecasound supports custom presets defined in ecasoundrc
or global preset files via the -pn:preset_name operator. If
you frequently use high-pass filtering, you can define an alias in your
.ecasound/ecasoundrc configuration:
preset highpass {
-el:highpass_iir,%1,%2
}
Once defined, you can invoke the high-pass filter directly with the preset chain operator:
ecasound -i:input.wav -pn:highpass,200,2 -o:output.wav