Page 1 of 5 123 ... LastLast
Results 1 to 10 of 385

Thread: PulseAudio Equalizer Script

Hybrid View

  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
    Apr 2008
    Beans
    4

    Re: PulseAudio Equalizer Script

    [QUOTE=psyke83;8210866]

    (pulseaudio-equalizer.sh) from this post.


    Hi psyke83

    Need your help from this post. I have Karmic with all of the latest current patches and updates. Pulse Audio working fine, followed your guide, except for two issues.

    Firstly could not find your script (edited out from the rest of your post above), so could not follow the instructions further, in connection with your script.
    Secondly Pulse Audio does not hold my bass / low frequency emitter, between songs, all other surround channels fine (checking with Pulse Audio Volume Meter and can hear the audible difference) using Rhythmbox, XMMS, Totem or any other multimedia player. I have to invoke the bass channel by clicking on the desktop shortcut, and selecting a preset (most common one I like for my listening is "Soft"). Then the bass kicks in.

    Any idea how I cna fix this to permanently activate and keep the low frequency channel active.

    Regards
    Andrew Brown aka Screwbottle

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

    Re: PulseAudio Equalizer Script

    Quote Originally Posted by Screwbottle View Post
    Firstly could not find your script (edited out from the rest of your post above), so could not follow the instructions further, in connection with your script.

    The bash script is packaged in the .deb file, gets installed to "/usr/bin/pulseaudio-equalizer.sh", and is no longer intended for direct use (as a GUI now exists). Please ignore the "v1.8" instructions, they're redundant.

    Secondly Pulse Audio does not hold my bass / low frequency emitter, between songs, all other surround channels fine (checking with Pulse Audio Volume Meter and can hear the audible difference) using Rhythmbox, XMMS, Totem or any other multimedia player. I have to invoke the bass channel by clicking on the desktop shortcut, and selecting a preset (most common one I like for my listening is "Soft"). Then the bass kicks in.
    The "Keep Settings" option will ensure that PulseAudio always uses the equalizer settings (so it will survive a logout/restart/crash).

    Keep in mind that this script's function is to provide software equalization alone - it does not take advantage of hardware bass/treble/equalizer functions. Also, I don't have a surround setup here, so I can't test if the LADSPA sink works correctly for all channels (perhaps not).
    Last edited by psyke83; November 10th, 2009 at 01:31 PM.

  10. #10
    Join Date
    Apr 2008
    Beans
    4

    Re: PulseAudio Equalizer Script

    Quote Originally Posted by psyke83 View Post
    The bash script is packaged in the .deb file, gets installed to "/usr/bin/pulseaudio-equalizer.sh", and is no longer intended for direct use (as a GUI now exists). Please ignore the "v1.8" instructions, they're redundant.



    The "Keep Settings" option will ensure that PulseAudio always uses the equalizer settings (so it will survive a logout/restart/crash).

    Keep in mind that this script's function is to provide software equalization alone - it does not take advantage of hardware bass/treble/equalizer functions. Also, I don't have a surround setup here, so I can't test if the LADSPA sink works correctly for all channels (perhaps not).
    Hi psyke83

    Thanks for the prompt reply. Ummm I think there could be a problem with LADSPA sink for a multichannel setup. I followed your instructions "Keep Settings", rebooted and still the low frequency channel drops out, until I use the PulseAudio EQ. At least now after the reboot, it is holding my chosen EQ, and the low frequency, once selected via the PA EQ, over multiple songs. A small bug to live with until a fix is found. I'll keep tinkering.

    As a matter of interest, in case this helps you, the sound chip is an onboard Realtek HD 82801I (LPCI string Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)), with 7.1 surround sound capability, although I use it with a Yamaha 5.1 surround analogue speaker setup. I know the chip set in LSPCI indicates Intel, as I think Realtek supply the silicon setup, and Intel dope it into their chipset, the X38 chipset, the mobo a MSI X-38 Diamond.

    But other than that your instruction and technique from yourself and sbersier have definitely helped in "improving" my Linux sound. So to both of you your posts are very much appreciated, even for us long time Linux users.

    Regards
    Screwbottle

Page 1 of 5 123 ... 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
  •