这些都非常有帮助。感谢您的启发。尽管目前还不完善,但我还有点贡献。我查看了《史蒂夫·哈里斯文档》,发现压缩器有几种风格,因此我选择使用立体声。使用Pulse Audio Volume Control将压缩器放置在Chrome和VLC等多个应用程序上确实很复杂,但是我喜欢这个结果。我使用压缩机的动机是对音量进行严格限制。为了在深夜不吵醒屋子里的任何人,我不想一直调高音量以听到媒体中的人物讲话,而只是想在发生超级英雄动作或商业广告时赶紧调低音量。我遵循了这里的灵感,并实时调整了值。然后,我取了我想要的值,并将它们放回到示例代码中。总之,我从上面的示例中毫不客气地提供了示例代码,但是立体声压缩器具有相当严格的音量上限和音量下限。最后,我将其放入脚本的形式,但无法完全正常工作。它不喜欢set_default行。我希望这对社区有用。
#!/bin/sh
# ComperssorScript.sh
# Script to start PulseAudio Compressor with desired settings
# Original: 2016 September 17
pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
set-default-sink compressor
# The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
# RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
# 9, Attack time (ms): The attack time in milliseconds.
# 5, Release time (ms): The release time in milliseconds.
# 63, Threshold level (dB): The point at which the compressor will start to kick in.
# 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
# -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
# 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
# 49, Amplitude (dB): The level of the input signal, in decibels.
# no value was placed here
# Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
# Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
# no value was placed here