Originally Posted by
Wipster
Hi,
First let me say great work with the equalisation script, its helped me almost get the sound response I wanted from my computer.
How tricky would it be to write a script like this (or adapt this) to work with another LADSPA plugin (fil-plugin's filters) which provides a 4 band parametric equaliser which I think would be highly desired for sound engineers/enthusiasts. I think this one seems to be pretty good, if 4 bands where not enough would it be possible to 'chain' single-band parametric?
The interface already has the capability of using other LADSPA plugins if you feed it a customized preset file, but there are some limitations due to the way that I designed the GUI, and also due to PulseAudio's LADSPA support.
Take a look at one of the preset files, perhaps you might understand better.
Here's the "Laptop" preset (/usr/share/pulseaudio-equalizer/presets/Laptop.preset) with explanations of each line added:
Code:
mbeq_1197 -> this is the plugin label + _ + plugin unique ID (which is the format that PulseAudio needs when specifying the LADSPA plugin)
mbeq -> this is the plugin label (also needed by PulseAudio)
Multiband EQ -> this is the "friendly" plugin name to be used by the interface.
2 -> this is the preamp level (which is currently ignored)
Laptop -> the name of the preset
15 -> the number of bands used by the plugin, which will follow below
-1 -> band 1's value
-1 -> band 2's value
-1 ..
-1 ..
-5 ..
-10 ..
-18 ..
-15 ..
-10 ..
-5 ..
-5 ..
-5 ..
-5 ..
0 -> band 14's value
0 -> band 15's value
50 -> band 1's frequency (only used to display on the interface)
100 -> band 2's frequency (only used to display on the interface)
156 ..
220 ..
311 ..
440 ..
622 ..
880 ..
1250 ..
1750 ..
2500 ..
3500 ..
5000 ..
10000 -> band 14's frequency (only used to display on the interface)
20000 -> band 15's frequency (only used to display on the interface)
I've written the interface to expect a simple layout such as the above - X amount of bands, X amount of frequencies.
The mbeq_1197 LADSPA plugin is quite simple, conforming to the above, containing just 15 bands within its parameters:
Code:
conn@dimension:~$ analyseplugin mbeq_1197
Plugin Name: "Multiband EQ"
Plugin Label: "mbeq"
Plugin Unique ID: 1197
Maker: "Steve Harris <steve@plugin.org.uk>"
Copyright: "GPL"
Must Run Real-Time: No
Has activate() Function: Yes
Has deativate() Function: No
Has run_adding() Function: Yes
Environment: Normal or Hard Real-Time
Ports: "50Hz gain (low shelving)" input, control, -70 to 30, default 0
"100Hz gain" input, control, -70 to 30, default 0
"156Hz gain" input, control, -70 to 30, default 0
"220Hz gain" input, control, -70 to 30, default 0
"311Hz gain" input, control, -70 to 30, default 0
"440Hz gain" input, control, -70 to 30, default 0
"622Hz gain" input, control, -70 to 30, default 0
"880Hz gain" input, control, -70 to 30, default 0
"1250Hz gain" input, control, -70 to 30, default 0
"1750Hz gain" input, control, -70 to 30, default 0
"2500Hz gain" input, control, -70 to 30, default 0
"3500Hz gain" input, control, -70 to 30, default 0
"5000Hz gain" input, control, -70 to 30, default 0
"10000Hz gain" input, control, -70 to 30, default 0
"20000Hz gain" input, control, -70 to 30, default 0
"Input" input, audio
"Output" output, audio
"latency" output, control
The fil-plugins LADSPA plugin is more complicated:
Code:
conn@dimension:~$ analyseplugin filters.so
Plugin Name: "4-band parametric filter"
Plugin Label: "Parametric1"
Plugin Unique ID: 1970
Maker: "Fons Adriaensen <fons@kokkinizita.net>"
Copyright: "GPL"
Must Run Real-Time: Yes
Has activate() Function: Yes
Has deativate() Function: Yes
Has run_adding() Function: No
Environment: Normal or Hard Real-Time
Ports: "Input" input, audio
"Output" output, audio
"Filter" input, control, toggled, default 0
"Gain" input, control, -20 to 20, default 0
"Section 1" input, control, toggled, default 0
"Frequency 1" input, control, 20 to 2000, default 200, logarithmic
"Bandwidth 1" input, control, 0.125 to 8, default 1, logarithmic
"Gain 1" input, control, -20 to 20, default 0
"Section 2" input, control, toggled, default 0
"Frequency 2" input, control, 40 to 4000, default 400, logarithmic
"Bandwidth 2" input, control, 0.125 to 8, default 1, logarithmic
"Gain 2" input, control, -20 to 20, default 0
"Section 3" input, control, toggled, default 0
"Frequency 3" input, control, 100 to 10000, default 1000, logarithmic
"Bandwidth 3" input, control, 0.125 to 8, default 1, logarithmic
"Gain 3" input, control, -20 to 20, default 0
"Section 4" input, control, toggled, default 0
"Frequency 4" input, control, 200 to 20000, default 2000, logarithmic
"Bandwidth 4" input, control, 0.125 to 8, default 1, logarithmic
"Gain 4" input, control, -20 to 20, default 0
The interface could be modified to support the fil-plugins plugin properly, but I'm not sure if it's worthwhile (and I don't think that a regular screen would fit all the details onto the interface without scrolling).
Finally, I don't think you can chain multiple LADSPA plugins together - or at least if it were possible, it would greatly increase CPU usage and latency to make it impractical. The interface would also become far too complicated.
Would this be something you would be interested in pursuing for greater sound customisation or could you offer some tips you might have on this subject if I where to give it a go.
Thanks and best regards,
Wip
I'm not sure if it's worthwhile. The next upstream release of PulseAudio will feature built-in equalization that is not related to my interface or LADSPA plugins, and will probably offer better quality/latency etc.
Bookmarks