Last active
December 3, 2018 18:19
-
-
Save spion/90f46c0c27ba6f374845 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#---------------------------------------------------------------------------------- | |
# Settings | |
#---------------------------------------------------------------------------------- | |
#BANDN="Toggle,Freq,Band,Gain" | |
BAND1="1,150,1.3,-7" | |
BAND2="1,100,0.4,4" | |
BAND3="1,5400,0.9,-5" | |
BAND4="1,3400,1.5,3" | |
#EQ="Toggle,Gain,Bands" | |
EQ="1,0,$BAND1,$BAND2,$BAND3,$BAND4" | |
#---------------------------------------------------------------------------------- | |
# Code | |
#---------------------------------------------------------------------------------- | |
function getname { | |
pactl list short $1 | grep $2 | awk '{print $2}' | |
} | |
function getid { | |
pactl list short $1 | grep $2 | awk '{print $1}' | |
} | |
for existing_eq in `getid modules paraeq` | |
do | |
echo "Unloading existing EQ" | |
pactl unload-module $existing_eq | |
done | |
for existing_bt in `getid modules loopback.*bluez` | |
do | |
echo "Disconnecting bluetooth from master output" | |
pactl unload-module $existing_bt | |
done | |
OUT=`getname sinks alsa` | |
pactl load-module module-ladspa-sink sink_name=paraeq master=$OUT plugin=filters label=Parametric1 control=$EQ | |
INP=`getname sources bluez` | |
OUTEQ=`getname sinks paraeq` | |
pactl load-module module-loopback source=$INP sink=$OUTEQ |
Hey, thanks a lot, I implemented the eq. Do you know where I can read more about this particular filter? I don't know with precision the interaction between toggle/frequency and band.
You should look into pulseeffects, a much more elaborate parametric EQ with a GUI :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, I have been trying to run a system-wide parametric equalizer for some time, but I'm pretty new in Linux. I believe that your script can help me out, I try to run it, but I get
Failure: Module initialization failed
.