我查看了同时使用 CamillaDSP 和直接在 Python 中进行过滤,但两者的学习曲线似乎都很陡峭。
相反,我发现的是一个名为 ACDf 的 LADSPA 滤波器,它提供了一个多频带参数均衡器,可以直接与alsa
. 让它工作的步骤非常简单:
- 下载
ACDf
源代码
make
它构建ACDf.so
二进制文件然后移动到/usr/lib/ladspa/
- 在alsa配置文件中加载并配置
ACDf
插件~/.asoundrc
ACDf 多频段参数均衡器的配置选项允许您指定频率、增益和 q 因子。Room EQ Wizard 显示所有这三个值,因此只需将它们从 REW 转录到~/.asoundrc
文件中即可。
左声道的一个均衡器频段配置如下所示:
0 {
label ACDf
policy none
input.bindings.0 "Input" #process input channel 0 (left)
output.bindings.0 "Output" #send to output channel 0
input { controls [26 1 6.0 53.1 8.530 1 1]}
}
请注意,这input/output.bindings.0
是左侧输入/输出。用于1
正确的通道。
在控制部分,数字如下:
26
- 参数均衡器是 26 号滤波器(ACDf 中有许多不同的滤波器可用)
1
- 不曾用过
6.0
- 分贝增益
53.1
- 以赫兹为单位的频率
8.53
- Q 因子
1
- 不曾用过
1
- 不曾用过
这是 Room EQ Wizard 为我的 DML 扬声器生成的 EQ:
现在我的完整 ~/.asoundrc 文件每个通道有 15 个 EQ 设置:
pcm.!default {
type plug
slave.pcm equalizer
}
pcm.equalizer {
type ladspa
path "/usr/lib/ladspa"
channels 2
slave {
pcm "plughw:0"
}
plugins {
0 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 6.0 53.1 8.530 1 1]}
}
1 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -8.2 59.1 3.793 1 1]}
}
2 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -6.0 69.7 9.912 1 1]}
}
3 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -3.5 126 18.191 1 1]}
}
4 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 6.0 305 5.000 1 1]}
}
5 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -5.4 325 5.000 1 1]}
}
6 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -3.3 509 5.000 1 1]}
}
7 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -4.3 685 5.000 1 1]}
}
8 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 6.0 1433 5.000 1 1]}
}
9 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -8.2 1501 5.000 1 1]}
}
10 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -5.8 1780 5.000 1 1]}
}
11 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -5.8 2017 5.000 1 1]}
}
12 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -5.4 2231 5.000 1 1]}
}
13 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -8.3 3265 5.000 1 1]}
}
14 {
label ACDf
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [26 1 -4.1 4985 5.000 1 1]}
}
15 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 6.0 53.1 8.530 1 1]}
}
16 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -8.2 59.1 3.793 1 1]}
}
17 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -6.0 69.7 9.912 1 1]}
}
18 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -3.5 126 18.191 1 1]}
}
19 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 6.0 305 5.000 1 1]}
}
20 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -5.4 325 5.000 1 1]}
}
21 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -3.3 509 5.000 1 1]}
}
22 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -4.3 685 5.000 1 1]}
}
23 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 6.0 1433 5.000 1 1]}
}
24 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -8.2 1501 5.000 1 1]}
}
25 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -5.8 1780 5.000 1 1]}
}
26 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -5.8 2017 5.000 1 1]}
}
27 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -5.4 2231 5.000 1 1]}
}
28 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -8.3 3265 5.000 1 1]}
}
29 {
label ACDf
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [26 1 -4.1 4985 5.000 1 1]}
}
}
}
非常感谢 jrubinstein 在GitHub 上的帮助。