05-11-2020, 11:52 AM
(05-10-2020, 09:50 PM)Tim Curtis Wrote: mpd.conf is a critical file and is programmatically generated from a sql table and other dependent settings in moOde. It's just not possible to support user edits to this file.
Charlie's code is really cool and I'd like to find a way to support it in moOde. It could be as simple as creating an additional MPD output with a specific name for an ALSA virtual device. You could then use that name in your ALSA config and then switch to the MPD output.
Is your usage scenario and ALSA configuration specific or does it represent a more general scenario for using the plugins?
No, I don't think it's Alsa configuration specific. Charlie uses Gstreamer, I think. What I found was that its more processor efficient to do this as an alsa confguration on its way out to the hardware. Using asound.conf makes it my default, so all audio goes through that crossover and EQ.
I have figured out why hacking the mpd.conf wasn't working. Whenever I restarted MPD it was bringing back the graphic eq alsa configuration - I had tried to edit that alsa configuration so that it connected to "default" rather than to hw:0,0
If the settings are stored in a db, can't I just edit the DB then?
I have a few other tweaks that I want to make, like getting an analog input working from a different device (usb), and making sure that all inputs/outputs are routed through 'default' rather than direct to hardware.
in case you are interested, my asound.conf is below. This worked fine on my old pi2 running squeezelite. The pi4 is so different that I figured it was worth a shot to try something new, like Moode

Thanks!
Code:
#asound rc new version jrubinstein - experimental with charlies plugin
pcm.!default {
type plug
slave.pcm filtereq
}
ctl.!default {
type hw
card 0
}
pcm.filtereq {
type ladspa
slave.pcm filtercross
path "/usr/lib/ladspa"
channels 8
plugins
{
0{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -8.8 113 3.82 1 1] } #parametric digital eq cutting 8.8db at 113hz with q of 3.82
}
1{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -6.6 157 3.87 1 1] } #parametric digital eq
}
2{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 9 408 5 1 1] } #parametric digital eq
}
3{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -8.3 409 5 1 1] } #parametric digital eq
}
4{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -7 800 1.15 1 1] } #parametric digital eq
}
5{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -6.2 4440 1 1 1] } #parametric digital eq
}
6{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [0 1 -9 1 1 1 1] } #gain block cutting boost by 9db to accommadate boost in filter 2
}
7{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -8.8 113 3.82 1 1] } #parametric digital eq cutting 8.8db at 113hz with q of 3.82
}
8{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -6.6 157 3.87 1 1] } #parametric digital eq
}
9{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 9 408 5 1 1] } #parametric digital eq
}
10{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -8.3 409 5 1 1] } #parametric digital eq
}
11{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -7 800 1.15 1 1] } #parametric digital eq
}
12{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -6.2 4440 1 1 1] } #parametric digital eq
}
13{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [0 1 -9 1 1 1 1] } #gain block cutting boost by 9db to accommadate boost in filter 2
}
}
}
pcm.filtercross {
type ladspa
slave.pcm speaker
path "/usr/lib/ladspa"
channels 8
plugins
{
0 {
label ACDf #lowpass for woofer output to channel2
policy none
input.bindings.0 "Input"
output.bindings.2 "Output"
input { controls [21 1 0 330 0.5 1 1] } # [filter type polarity dbgain frequency q]
}
1 {
label ACDf #lowpass for woofer output to channel3
policy none
input.bindings.1 "Input"
output.bindings.3 "Output"
input { controls [21 1 0 330 0.5 1 1] } #2nd order lowpass at 300hz
}
2 {
label ACDf #highpass for tweeter output to channel4
policy none
input.bindings.0 "Input"
output.bindings.4 "Output"
input { controls [22 -1 -5 3000 1 1 1] } #2nd order highpass at 3000 hz
}
3 {
label ACDf #highpass for tweeter output to channel4 filter 2
policy none
input.bindings.0 "Input"
output.bindings.4 "Output"
input { controls [22 1 0 3000 1 1 1] } #2nd order highpass at 3000 hz
}
4 {
label ACDf #highpass for tweeter output to channel4
policy none
input.bindings.1 "Input"
output.bindings.5 "Output"
input { controls [22 -1 -5 3000 1 1 1] } #2nd order highpass at 3000 hz
}
5 {
label ACDf #highpass for tweeter output to channel4 filter 2
policy none
input.bindings.1 "Input"
output.bindings.5 "Output"
input { controls [22 1 0 3000 1 1 1] } #2nd order highpass at 3000 hz
}
6 {
label ACDf #lowpass1 for mid output to channel0
policy none
input.bindings.0 "Input"
output.bindings.6 "Output"
input { controls [21 1 -6 3000 0.707 1 1] } # 2nd order lowpass at 3000 hz -4db cut
}
7 {
label ACDf #lowpass2 for mid output to channel0
policy none
input.bindings.0 "Input"
output.bindings.6 "Output"
input { controls [21 1 0 3000 0.707 1 1] } # 2nd order lowpass at 3000 hz
}
8 {
label ACDf #highpass for mid output to channel0
policy none
input.bindings.0 "Input"
output.bindings.6 "Output"
input { controls [22 1 0 300 0.5 1 1] } # 2nd order highpass at 300 hz
}
9 {
label ACDf #lowpass1 for mid output to channel1
policy none
input.bindings.1 "Input"
output.bindings.7 "Output"
input { controls [21 1 -6 3000 0.707 1 1] } # 2nd order lowpass at 3000 hz -4db cut
}
10 {
label ACDf #lowpass2 for mid output to channel1
policy none
input.bindings.1 "Input"
output.bindings.7 "Output"
input { controls [21 1 0 3000 0.707 1 1] } # 2nd order lowpass at 3000 hz
}
11 {
label ACDf #highpass for mid output to channel1
policy none
input.bindings.1 "Input"
output.bindings.7 "Output"
input { controls [22 1 0 300 0.5 1 1] } # 2nd order highpass at 300 hz
}
12{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.2 "Output"
input { controls [22 1 0 50 1 1 1] } #2nd order highpass at 30 hz to act as subsonic filter
}
13{
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.2 "Output"
input { controls [22 1 0 50 1 1 1] } #2nd order highpass at 30 hz
}
14{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.3 "Output"
input { controls [22 1 0 50 1 1 1] } #2nd order highpass at 30 hz to act as subsonic filter
}
15{
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.3 "Output"
input { controls [22 1 0 50 1 1 1] } #2nd order highpass at 30 hz
}
16{
label ACDf #lowpass for woofer output to channel2
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [21 1 0 50 0.5 1 1] } # [filter type polarity dbgain frequency q]
}
17{
label ACDf #lowpass for woofer output to channel3
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [21 1 0 50 0.5 1 1] } #2nd order lowpass at 50hz
}
}
}
pcm.speaker {
type plug
slave {
pcm "t-table"
channels 8
rate "unchanged"
}
}
pcm.t-table {
type route
slave {
pcm "hw:0,0"
channels 8
}
ttable {
0.2 1 # audio = left woofer channel = left front (channel 2 is sub out)
1.2 1 # channel in.channel out on/off
2.1 1 #left bass this gives me the low filter for left woofer onto channel 0 = front left
3.0 1 #right bass = SBR
4.7 1 #left tweeter = SBL
5.6 1 #right tweeter = Surr Right
6.5 1 #left mid = surr left
7.4 1 #right mid = center
}
}
pcm.plughw.slave.rate = "unchanged";