Author Topic: Alsa-Equalizer config files  (Read 466 times)

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Alsa-Equalizer config files
« on: October 18, 2012, 12:40:55 PM »
Info might be easier to find in this forum for the
Alsa Equalizer plugin in Synaptic.

Two files are needed.


For the Alsa-EQ plugin the file reads :


# /etc/asound.conf file for terminal command: $alsamixer -D equal
ctl.equal {
 type equal;
}

pcm.plugequal {
  type equal;
  # Modify the line below if you do not
  # want to use sound card 0.
  #slave.pcm "plughw:0,0";
  #by default we want to play from more sources at time:
  slave.pcm "plug:dmix";
}
#pcm.equal {
  # If you don't want the equalizer to be your
  # default soundcard comment the following
  # line and uncomment the above line. (You can
  # choose it as the output device by addressing
  # it with specific apps,eg mpg123 -a equal 06.Back_In_Black.mp3)
pcm.!default {
  type plug;
  slave.pcm plugequal;
}


Alsa-EQ.desktop file to put in /usr/share/applications reads :

[Desktop Entry]
Name=AlsaMixer - EQ
Comment=Advanced Linux Sound Architecture (ALSA) Equalizer
Exec=alsamixer -D equal
Icon=sound_section
Terminal=true
Type=Application
Categories=Audio;Mixer;X-MandrivaLinux-Multimedia-Sound;



The Alsa-EQ.desktop file goes into /usr/share/applications     only.
Should appear in the main menu under Sound then.    Should fire right
up then after reboot to load the plugin file in /etc/asound.conf

Any question, just post back.

regards,


FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Alsa-Equalizer config files
« Reply #1 on: November 09, 2012, 04:36:47 PM »
Really useful, thanks for posting. Just got it working.

Does the plugin support presets at all? e.g. one preset for dance, another for classical, another for rock etc?

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: Alsa-Equalizer config files
« Reply #2 on: November 09, 2012, 05:00:13 PM »
Really useful, thanks for posting. Just got it working.

Does the plugin support presets at all? e.g. one preset for dance, another for classical, another for rock etc?

Hi,

There are other plugins for other effects but none for separate presets.    Check
their website for those.   

I use it all the time for RadioTray, with FlashPlayer, Shoutcast internal web player, etc..
I have 4 inch three-way speakers so it's very dynamic using those.

It also works in QASMixer in Synaptic within the GUI.

regards,

FF





ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Alsa-Equalizer config files
« Reply #3 on: November 11, 2012, 04:02:39 AM »
I've found a way of storing EQ presets. If anyone else is interested it's here:
http://wiki.cyberleo.net/wiki/KnowledgeBase/AlsaEqual

For example, with the Winamp EQ presets added the script looks like this:
Code: [Select]
#!/bin/sh

set_equalizer_curve() {
  curve="${*}"
  ctl=0
  for point in ${curve}
  do
    ctl=$(( ${ctl} + 1 ))
    echo cset numid=${ctl} ${point}
  done | amixer -D equal -s
}

profile="${1:-flat}"
case "${profile}" in
flat) curve="65 65 65 65 65 65 65 65 65 65" ;;
classical) curve="71 71 71 71 71 71 84 83 83 87" ;;
club) curve="71 71 67 63 63 63 67 71 71 71" ;;
dance) curve="57 61 69 71 71 81 83 83 71 71" ;;
headphones) curve="65 55 64 77 75 70 65 57 52 49" ;;
bass) curve="59 59 59 63 70 78 85 88 89 89" ;;
treble) curve="87 87 87 78 68 55 47 47 47 45" ;;
large_hall) curve="56 56 63 63 71 79 79 79 71 71" ;;
live) curve="79 71 66 64 63 63 66 68 68 69" ;;
party) curve="61 61 71 71 71 71 71 71 61 61" ;;
pop) curve="74 65 61 60 64 73 75 75 74 74" ;;
reggae) curve="71 71 72 81 71 62 62 71 71 71" ;;
rock) curve="58 63 80 84 77 66 58 55 55 55" ;;
ska) curve="75 79 78 72 66 63 58 57 55 57" ;;
soft_rock) curve="66 66 69 72 78 80 77 72 68 58" ;;
soft) curve="65 70 73 75 73 66 59 57 55 53" ;;
techno) curve="60 63 71 80 79 71 60 57 57 58" ;;
*) echo "Unknown profile ${profile}" >&2 ;;
esac

[ "${curve}" ] && set_equalizer_curve "${curve}"

Obviously you can add your own presets and tailor it to suit your tastes, speakers, room acoustics, etc. etc.

Once saved as presets.sh it can be called simply from the command line, e.g.:
presets.sh reggae

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Alsa-Equalizer config files
« Reply #4 on: November 11, 2012, 04:52:53 AM »
There are other plugins for other effects but none for separate presets.    Check
their website for those.


I can't see any other audio plugins - was it http://www.thedigitalmachine.net/alsaequal.html or somewhere else you found them?

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15283
  • ┌∩┐(◕_◕)┌∩┐
Re: Alsa-Equalizer config files
« Reply #5 on: November 11, 2012, 06:57:23 AM »
Thanks for posting Ferdes Fides

What file extension have you used for the plugin?
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: Alsa-Equalizer config files
« Reply #6 on: November 11, 2012, 11:09:24 AM »
There are other plugins for other effects but none for separate presets.    Check
their website for those.


I can't see any other audio plugins - was it http://www.thedigitalmachine.net/alsaequal.html or somewhere else you found them?


Some of these are in Synaptic but finding config files that are
current is somewhat of a problem, at least for me.    CAPS
is the one I meant, and is listed at the site below as well as
some others.

http://www.ladspa.org/
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: Alsa-Equalizer config files
« Reply #7 on: November 11, 2012, 11:12:10 AM »
Thanks for posting Ferdes Fides

What file extension have you used for the plugin?

Just /etc/asound.conf

and then in terminal

$alsamixer -D equal


Loads right up then.


FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15283
  • ┌∩┐(◕_◕)┌∩┐
Re: Alsa-Equalizer config files
« Reply #8 on: November 11, 2012, 01:53:27 PM »
Thanks for posting Ferdes Fides

What file extension have you used for the plugin?

Just /etc/asound.conf

and then in terminal

$alsamixer -D equal


Loads right up then.


FF

Many thanks FF
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000