I used the answer at the link below to successfully set Dynamic Range Compression on my Ubuntu media box running Ubuntu 14.04 (SteamOS session, so no Ubuntu desktop session available).

Realtime sound post-processing, sound effects, Ubuntu 10.04

I created a super simple bash script to run those commands back to back. It looks like this

pacmd load-module module-ladspa-sink sink_name=ladspa_out \
  plugin=mbeq_1197 label=mbeq \
  control=11.621622,10,4.594594,2.702703,0,0, \
  -1.621622,-0.270270,-5.405406,-3.513514,-8.648648, \
  -5.675676,-4.054054,1.351351,9.189189 &&
pacmd load-module module-ladspa-sink sink_name=sc4m \
  plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12 &&
pacmd set-default-sink sc4m

How can I get this to run on system startup?

I can run this no problem from my home directory, or from /usr/bin/compress_audio.sh but it won't run on boot. I tried adding /usr/bin/compress_audio.sh to /etc/rc.local but no dice. I'm thinking that maybe the PulseAudio daemon doesn't start until after rc.local is run, but I'm not sure what to do in that case.

I have another line in /etc/rc.local nohup plexmediaserver & and I'm not sure if that may be problematic?

Thanks for any suggestions or advice!

Edit: I tried putting just the pacmd commands into /etc/rc.local and I still have to manually run /etc/rc.local after boot in order to get DRC working. This is driving me absolutely bonkers. Does the user that runs /etc/rc.local not have access to pacmd maybe?

Edit2: Changed /etc/rc.local to su [user] -c '/usr/bin/compress_audio.sh > /home/gsparx/audio_compress.log' to hopefully force the user and log. When I run /etc/rc.local as root, it logs correctly and adds the DRC. On boot, it does not log nor does it enable DRC, so it seems like it's not running at all.

Edit3: Tried adding those configurations to /etc/pulse/system.pa to no avail as well

  • Just a question writing tip: When you quote more than one line of code, select and hit ctrl-k, or indent each line four-spaces. This formats scripts correctly. Line breaks also help for readability. – glallen Nov 26 '14 at 19:25

Late response, but since this question is unanswered and I found it before I found an answer, it seems worth answering.

Taken from this answer on LADSPA, via this answer on dynamic compression:

Load LADSPA module at startup:

This can be done by including it to the /etc/pulse/default.pa configuration file to be loaded by the daemon on startup:

.ifexists module-ladspa-sink.so
load-module module-ladspa-sink <options>

The second link also covers loading the compressor as a real-time adjustable ALSA plugin, which is useful for tuning the effect because PulseAudio plugins cannot be adusted in realtime.

Hope this helps someone. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.