bmc0 / dsp

An audio processing program with an interactive mode.
ISC License
219 stars 31 forks source link

DSP config switcher #41

Open dheishman opened 5 years ago

dheishman commented 5 years ago

I made a helper script for myself and thought a few others may be able to use it. It's a short command that swaps out the current DSP config file and reconfigures the PulseAudio module appropriately. It could easily be bound to a key or button, or just run from a launcher. I would imagine it's useful for any scenario where you have multiple devices driven (with different DSP correction profiles) by the same output from the computer.

Ape commented 5 years ago

You could also load multiple sinks with different dsp configurations and the switch between the sinks.

arjunmenon commented 5 years ago

Nice one. If you are using alsa, can this be configured?

dheishman commented 5 years ago

Nice one. If you are using alsa, can this be configured?

From my experience so far trying to use this DSP plugin with ALSA, it seems like it's tricker to get the changes to take effect. It's certainly not as simple as pausing and unpausing your music, at least.

You could also load multiple sinks with different dsp configurations and the switch between the sinks.

Yes, but assuming pulse is configured to automatically stop after a certain idle period (I think this is the default config in most cases), you're going to lose those loaded sinks when it shuts down. You can load one in default.pa, but loading multiple sinks with this plugin as it is requires changing out ~/.config/ladpsa_dsp/config before each sink is loaded, since it only looks for that one file to get its config. That's where the problem comes in.

You would either have to:

bmc0 commented 5 years ago

requires changing out ~/.config/ladpsa_dsp/config before each sink is loaded, since it only looks for that one file to get its config.

You can have multiple config files. See the README. In short: name the file(s) config_<name> (replace <name> with whatever you want) and then load module-ladspa-sink with a label=ladspa_dsp:<name> argument instead of label=ladspa_dsp.

Ape commented 5 years ago

Just configure Pulseaudio so that it doesn't stop automatically and you can switch between dsp configs even without pausing your music.

dheishman commented 5 years ago

You can have multiple config files. See the README. In short: name the file(s) config_<name> (replace <name> with whatever you want) and then load module-ladspa-sink with a label=ladspa_dsp:<name> argument instead of label=ladspa_dsp.

Wow, I completely missed that. Rewrote the script now that I know that, but it still needs some work.