[How to do instruction] Loudness compensated volume control with CamillaDSP - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Loudness compensated volume control with CamillaDSP (/showthread.php?tid=5112) |
RE: Loudness compensated volume control with CamillaDSP - Tim Curtis - 10-12-2022 (10-12-2022, 06:54 AM)roderickvd Wrote:(10-11-2022, 11:44 PM)Tim Curtis Wrote: Yes alsa-cdsp does not do resampling but IIRC it update the camilla config with the source sample rate before piping the output to Camilla because Camilla itself does not do sample rate switching on-the-fly. Correct? Still a bit confusing since the alsa cdsp doc states Code: To aid in handling hardware parameter changes such as sample rate, format, or the number of input channels the plugin can automatically replace fields in the YAML files with the appropriate parameters and restart CamillaDSP. IIRC its required to enable automatic rate, format and channel switching possible with Camilla, otherwise Camilla has to be manually stopped/started when these parameters change for example when current song is 16/44.1 and next song in the Queue is 24/192. I'm not sure about slaving the mixer device to _audioout but if I understand your config correctly it involves changing the mixer device param in MPD, Shairport-sync, Spotify etc configs. That could possibly be done with a script that has some SED's to apply or revert the changes. Integrating this into moOde as an option though would involve quite a few moving parts and modifications. For example currently all the renderers default to using mixer softvol. That would need to be parameterized. Food for thought. RE: Loudness compensated volume control with CamillaDSP - roderickvd - 10-12-2022 (10-12-2022, 03:17 PM)Tim Curtis Wrote:(10-12-2022, 06:54 AM)roderickvd Wrote:(10-11-2022, 11:44 PM)Tim Curtis Wrote: Yes alsa-cdsp does not do resampling but IIRC it update the camilla config with the source sample rate before piping the output to Camilla because Camilla itself does not do sample rate switching on-the-fly. Correct? Note that it says aid. It is not required. In CamillaDSP's GUI you can see it locking onto a new sample rate when something new comes in. Quote:I'm not sure about slaving the mixer device to _audioout but if I understand your config correctly it involves changing the mixer device param in MPD, Shairport-sync, Spotify etc configs. That could possibly be done with a script that has some SED's to apply or revert the changes. Changing the mixer parameters would be the "hard" route. Slaving it to _audioout would be easier, but I don't know if it can be done. Quote:Integrating this into moOde as an option though would involve quite a few moving parts and modifications. For example currently all the renderers default to using mixer softvol. That would need to be parameterized. Indeed. If this would be considered for the roadmap, I can help of course. RE: Loudness compensated volume control with CamillaDSP - bitlab - 10-12-2022 Nice job @roderickvd! @Tim Curtis some time ago, when I was helping @roderickvd, I submitted the following issue to CamillaDSP https://github.com/HEnquist/camilladsp/issues/231. When this is implemented it will simplify the integration of the loudness function. No need to do all hassle with the alsa conf and also dummy mixer or use the camilladsp volume it self. The implementation is currently planned for CamillaDSP 1.2. RE: Loudness compensated volume control with CamillaDSP - roderickvd - 10-12-2022 Awesome. Let's wait for that then and look back at this as a fun exercise :-) RE: Loudness compensated volume control with CamillaDSP - Tim Curtis - 10-12-2022 Super nice :-) Will alsa cdsp plugin still be needed for upcoming 1.2 ? RE: Loudness compensated volume control with CamillaDSP - bitlab - 10-13-2022 @Tim Curtis: From the beginning Scripples alsa-cdsp is essential for a good integration of CamillaDSP in Moode. It makes it possible when the audio format of a source changes that CamillaDSP is restarted with the correct audio format to use. This is completely separate from other functions like loudness or other CamillaDSP features. RE: Loudness compensated volume control with CamillaDSP - Tim Curtis - 10-14-2022 (10-13-2022, 05:37 PM)bitlab Wrote: @Tim Curtis: From the beginning Scripples alsa-cdsp is essential for a good integration of CamillaDSP in Moode. Yes, now I remember. Also your nice alsa-cdsp fix for r820 release :-) RE: Loudness compensated volume control with CamillaDSP - baoverulk - 06-22-2024 Hey, sorry for commenting on an old thread but I have a few questions about this topic. - Has there been any further work on this? I see that the Camilla ticket (https://github.com/HEnquist/camilladsp/issues/231) was marked solved last December so that should open up some doors. - Does the current implementation allow for loudness compensated volume control on top of an already present CamillaDSP pipeline? - And just to confirm, this also works for renderers such as Spotify Connect even though Camilla volume is set to 0db when connected? Currently I have a pipeline with and without loudness and manually switch between them. I'm considering this as a more elegant solution. Thanks for all your work RE: Loudness compensated volume control with CamillaDSP - Tim Curtis - 06-22-2024 1. Does the current implementation allow for loudness compensated volume control on top of an already present CamillaDSP pipeline? - In Moode 9 / CamillaDSP 2, main volume is integrated and always functioning. Moode proxies its volume knob to CamillaDSP volume automatically. There is also a volume filter but it's used for aux faders and not main volume. - Loudness is just another filter in CamillaDSP 2 so you should be able to add it to any pipeline. [attachment=3920][attachment=3921][attachment=3922][attachment=3923] 2. And just to confirm, this also works for renderers such as Spotify Connect even though Camilla volume is set to 0db when connected? Yes. Moode automatically sets CamillaDSP volume to 0dB when Spotify, Airplay, or Bluetooth clients connect and then restores knob volume when they disconnect. RE: Loudness compensated volume control with CamillaDSP - baoverulk - 06-22-2024 Hey, thanks for the quick response! I'm sorry but I think I read this thread too fast and misunderstood. I thought this loudness compensated volume control increased the loudness dynamically with changes in volume (so if the volume is lower the loudness is higher and if the volume is high the loudness is off). But is this more of a "If volume below threshold -> loudness on"? Or am I still misunderstanding? In any case, my question was just whether there is an easier way to accomplish this now in MoOde or is the method described at the start of this thread the best way? (I already use a loudness filter in cdsp and it works great ?) |