Page 1 of 39 12311 ... LastLast
Results 1 to 10 of 385

Thread: PulseAudio Equalizer Script

  1. #1
    Join Date
    Nov 2005
    Location
    Ireland
    Beans
    2,605
    Distro
    Ubuntu Development Release

    Post PulseAudio Equalizer Script



    Note 1: This package provides an equalizer interface for the LADSPA sound processing functionality of PulseAudio. If you wish to test or discuss an alternate PulseAudio equalizer implementation which does not rely on LADSPA processing, please see phish3's thread here.

    Note 2: This script requires PulseAudio 0.9.19 or later to function properly, which has the following implications:
    • Jaunty users: your version of PulseAudio is outdated - you must upgrade. I recommend Luke Yelavich's PPA.
    • Karmic users: you do not need to upgrade PulseAudio. If you are already using the 0.9.20 packages from the semi-official Ubuntu Audio Dev PPA, the equalizer will continue working.
    • Lucid (testing) users: you have the latest version of PulseAudio - no further action is necessary.

    Note 3: This script assumes that your PulseAudio setup is functioning properly. In other words: if your audio is not working, neither will this script.


    Hey folks,

    I'm releasing GUI and script for PulseAudio users that will set up system-wide equalized audio, without needing to restart PulseAudio or any running applications.

    Enjoy!

    Advantages:
    • Configurable 15 band equalizer for PulseAudio;
    • You can enable or disable equalized audio on-the-fly, without having to restart any running applications;
    • Offers the choice of using equalized audio for the current session or permanently;
    • No need to edit any configuration files by hand;
    • User-customizable: you can use any LADSPA audio processing plugin (which can apply various audio effects beyond equalization);
    • Packaged as a .deb file for easy installation;
    • Graphical User Interface.


    Installation:
    Since v2.6, the pulseaudio-equalizer package is available from my PPA, which you can access like so:
    Code:
    $ sudo software-properties-gtk --enable-ppa=psyke83/ppa; sudo apt-get update; sudo apt-get install pulseaudio-equalizer
    Source code:
    The source is available on Launchpad.

    Usage:
    Open the PulseAudio Equalizer (Applications -> Sound & Video). The interface should be fairly self-explanatory:

    • 15 frequency bands you can adjust to your liking;
    • Preamp will boost your equalized volume (as a multiplier value from 1x to 4x);
    • Presets are included (based on VLC's built-in equalizer), or you can choose to save own favourite configuration as a new preset;
    • EQ Enabled will enable the equalizer in the current session (which applies to all running applications);
    • Keep Settings will configure your PulseAudio configuration to remain permanently equalized (and therefore, you won't need to run the PulseAudio Equalizer interface each time you login);
    • Advanced menu options so that you can reset all settings (useful for troubleshooting) or delete user presets;
    • Apply Settings will apply all changes.


    TECHNICAL: How does the equalizer work?
    The script uses a LADSPA audio processing plugin, specifically the Multiband EQ/mbeq_1197 plugin from the swh-plugins package.

    If you examine the pulseaudio-equalizer.sh script, you will see the following lines near the beginning:

    Code:
    # Default LADSPA plugin & control settings; control settings will be overridden if $HOME/.equalizerrc file exists.
    PA_LADSPA_PLUGIN="mbeq_1197"
    PA_LADSPA_LABEL="mbeq"
    PA_LADSPA_CONTROL="-1,-1,-1,-1,-5,-10,-18,-15,-10,-5,-5,-5,-5,0,0"
    What do these variables mean?
    • "mbeq_1197" refers to the LADSPA plugin file (located in /usr/lib/ladspa/);
    • "mbeq" refers to the internal label used by the LADSPA plugin (some plugin files can have multiple labels embedded inside);
    • the comma separated numbers refers to the actual equalization settings (detailed below).


    You can use the "analyseplugin" utility from the "ladspa-sdk" package in order to see the detailed information on a particular LADSPA plugin. Here's the information for the plugin used by the script:

    Code:
    conn@inspiron:~$ 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
    As you can see from the text in blue, the mbeq_1197 plugin allows you to equalize 15 different bands. If you wish to customize the plugin or control settings, you can manually edit a preset and enter the appropriate LADSPA information (future versions will support different plugins easily via the interface). If you want to see the plugins available (for all audio processing effects, not merely equalization), use the "listplugins" and "analyseplugin <plugin_name>" utilities for guidance.

    I have provided a "Laptop" preset which I have customized to improve the "tinny" audio from the internal speaker of my laptop (a Dell Inspiron 510m). While the settings may not be optimal for your setup, you may also find it useful for your own hardware.

    If you have any problems, questions or suggestions to improve the script, please let me know.

    Changelog:
    v1.0 - 24/10/2009 - Initial version.
    v1.1 - 25/10/2009 - Improved status checking; transition entire script to pacmd.
    v1.2 - 25/10/2009 - Improved script indenting; added toggle option.
    v1.3 - 25/10/2009 - Improved volume handling (existing levels are always maintained when toggling equalizer).
    v1.4 - 25/10/2009 - Improved mute handling (existing mute setting is always maintained when toggling equalizer); renamed sink to match LADSPA plugin.
    v1.5 - 02/11/2009 - Improved sink handling (user-defined sink will always be used/restored when equalizer is enabled/disabled); better status equalizer detection; better detection of running clients to transfer to equalized audio.
    v1.6 - 04/11/2009 - Added options "always-on" and "always-off" to permanently store equalizer settings; added support for custom control settings (if $HOME/.equalizerrc file is present).
    v1.7 - 04/11/2009 - Renamed options; options "enable-config" and "disable-config" will edit, backup & restore user configuration ($HOME/.pulse/default.pa) when possible; better status checking.
    v1.8 - 04/11-2009 - Avoid duplicate module-ladspa-sink modules getting loaded; added undocumented options "write-equalizerrc" and "delete-equalizerrc" for interfaces.
    v1.9 - 08/11/2009 - Now includes PyGtk interface; packaged as a .deb file; interface supports presets (but few meaningful presets are yet included). Requires testing.
    v2.0 - 08/11/2009 - Added VLC's equalizers; better support for loading user presets.
    v2.1 - 10/11/2009 - Added "debug" option to script; added swh-plugins, ladspa-sdk to depends; "Keep Settings" or selecting a preset will take effect immediately.
    v2.2 - 14/11/2009 - Major re-write of PyGTK interface; now supports pre-amp, saving/deleting presets; fixed rare bug which caused "Keep Settings" to mute audio on restart.
    v2.3 - 17/11/2009 - Better formatting of scale values on interface; ensure that preset list always remains sorted; script will automatically create user preset folder; confirmed Lucid Lynx compatibility.
    v2.4 - 19/11/2009 - Preamp range now 1x to 2x, default is 1.5x and increments are now allowed; added Flat preset; selecting a preset will now apply settings immediately; improved script to make enabling EQ slightly faster; preamp setting is no longer controlled by presets; added application icon.
    v2.5 - 04/02/2010 - Preamp range now between 0x and 2x, defaulting to 1x; improved script compatibility with new PulseAudio/Lucid Lynx version; misc bugfixes to prevent hangs on moving streams; optimized script to improve initialization speed and prevent loud pops when applying new settings; Fedora guideline compliance.
    v2.6 - 05/02/2010 - Small configuration detection fix - first version in PPA.
    v2.7 - 05/02/2010 - Small packaging fix.
    Attached Images Attached Images
    Last edited by psyke83; February 5th, 2010 at 10:38 AM.

  2. #2
    Join Date
    Oct 2009
    Location
    Geneva, Switzerland
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: PulseAudio Equalizer Script

    This post has been removed since psyke83 provided us for a nice python GUI. There no need anymore for the java GUI that was provided in this post and which made use of the now outdated v1.8 version of the pulseaudio-equalizer.sh

    Last edited by sbersier; November 11th, 2009 at 10:00 PM.

  3. #3
    Join Date
    Nov 2005
    Location
    Ireland
    Beans
    2,605
    Distro
    Ubuntu Development Release

    Re: PulseAudio Equalizer Script

    (Quoted from the PulseAudio Fixes thread):

    Quote Originally Posted by sbersier View Post
    OK. So...
    - There is no more reference to an existing or non-existing default.pa file. It performs a "pulseaudio-equalizer status" operation.
    - I didn't make use of the write-equalizerrc feature since I prefer to start in a neutral position (zeros everywhere)
    - I separated in the GUI the two functions: (1)(enable, disable) and (2)(enable-config, disable-config)
    It means that you can select the "Keep config" option without necessarily starting the equalizer
    and as well you can deselect the "Keep config" option without stopping the equalizer
    I did this because it was easier for me (I'm not a programmer. In fact, this is my first java program...)
    - I've build a equalizer.jar and modified the install instructions.

    The result is posted on the new thread and I will no more interfere in this one. My first post will be obsolete and will point to the new thread.
    Thanks and best regards.
    Steph
    I see, thanks for the explanation, and thanks again for writing the interface.

    Perhaps the next time you update the interface, you can also attach the equalizer.java file to your post, so that the source code is available?

  4. #4
    Join Date
    Nov 2009
    Beans
    1

    Re: PulseAudio Equalizer Script

    Merci, ça fonctionne.

  5. #5
    Join Date
    Jun 2009
    Beans
    56

    Smile Re: PulseAudio Equalizer Script

    thanks psyke83 and sbersier. If I could I would give you some of my beans for this.

  6. #6
    Join Date
    Oct 2009
    Location
    Geneva, Switzerland
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: PulseAudio Equalizer Script

    [removed]
    Last edited by sbersier; November 6th, 2009 at 06:37 PM. Reason: problem solved

  7. #7
    Join Date
    Apr 2006
    Location
    Finland
    Beans
    42
    Distro
    Ubuntu Development Release

    Re: PulseAudio Equalizer Script

    Thanks a lot for working on this.

  8. #8
    Join Date
    Nov 2009
    Beans
    3

    Re: PulseAudio Equalizer Script

    This fixed my sound problem, Thank you very much for doing this!

  9. #9
    Join Date
    Oct 2009
    Location
    Austria
    Beans
    44
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: PulseAudio Equalizer Script

    Hi guys,

    thank you so much for this little script an the config app. It solved my problem described here: http://ubuntuforums.org/showthread.p...02#post8205002.

    Finally, sound is smootly and equally distributed over all speakers.

    What I noticed is, that now the overall sound volume is much lower. Is there a way to make the whole sound louder as well?
    I played around with the equalizer but couldn't make the volume louder.
    Last edited by mojo2012; November 7th, 2009 at 01:49 PM.

  10. #10
    Join Date
    Oct 2009
    Location
    Geneva, Switzerland
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: PulseAudio Equalizer Script

    Even if you push all the sliders to their maximum value?
    If so, maybe you could have a look at http://ubuntuforums.org/showthread.php?t=795525
    You should look at "THE HARD WAY" section (if not already tried)...
    ... "So if you have a subwoofer and four speakers you're really in a bit of trouble here, because if you tell pulseaudio to use 6 channels, you get low frequency subwoofer sound, but surround sound movies send sound to a centre speaker that doesn't exist, and you don't get any voice on the front speakers. But if you tell pulseaudio that you have four channels, the subwoofer gets no sound. In this case you must define what channels to use manually."

    It looks a bit like the problem you seem to have. I do not have a surround installation myself so I can't help you very much...

    Good luck,
    Steph
    Last edited by sbersier; November 7th, 2009 at 03:41 PM.

Page 1 of 39 12311 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •