Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Implementing convolution filters on Camilla DSP (in v7.3.0)
#1
Hi

Huge thanks to @Tim Curtis for this software. I've got v7.3.0 running on my second hand Allo USBridge Signature/Shanti LPS to render both Roon and Spotify without too much difficulty this afternoon. So the SOtM sms200 is already retired - stage one completed.

But the main reason for making this switch is to be able to run Audiolense convolution filers in Camilla. Currently they run in Roon, but with Spotify HiFi promised soon, I'd like to be able to apply these filters to both these moode sources. That's stage two, on which I'm hoping someone can point me in the right direction. Normally I just dive in and try to work things as I go, but given there seem to be so many options I'll admit to being intimidated by them all, even after looking at the Camilla documentation.

Uploading the convolution wav and cfg files
Audiolense generates a zip file containing wav and cfg files for each sample rate my DAC can handle (44.1, 48, 88.2, 96 and 192). Roon allows this zip file to be uploaded and during playback will automatically choose the appropriate files to match the sample rate playing.

- In moode, do I have to upload the wav files separately for each sample rate?
- Will moode/Camilla also select the appropriate file for the sample rate or do I have to do something different?

Resolution control
In Roon the source signal is converted up to 64 bits for all the DSP calculations and then truncated at the end to 32 bits which is what the DAC can handle. I couldn't see anything I needed to configure for this - have I missed something?

Upsampling
In Roon I've set the DSP to upsample to the best rate that my DAC will support before carrying out the convolution. This is a very simple process in Roon since it recognises the DAC and already knows what rates it supports - maybe ALSA works this out when the DAC connects? However, I'm struggling to understand the corresponding Camilla options, and what I need to do to upsample simply by factors of two to simplify/maximise the quality of the interpolation process.

Scaling
Again, in Roon, to avoid clipping I needed headroom management to reduce the signal level before convolution, and then rescale upwards afterwards. With 64 bit calculations there's enormous scope to do this with no risk of degrading the quality. I guess the same must apply in Camilla, but what's the best way to do it? Again, I'm afraid I'm confused by the options!

Thanks for reading - all pointers welcome
Reply
#2
(08-09-2021, 06:32 PM)johnanon Wrote: Hi

Huge thanks to @Tim Curtis for this software. I've got v7.3.0 running on my second hand Allo USBridge Signature/Shanti LPS to render both Roon and Spotify without too much difficulty this afternoon. So the SOtM sms200 is already retired - stage one completed.

But the main reason for making this switch is to be able to run Audiolense convolution filers in Camilla. Currently they run in Roon, but with Spotify HiFi promised soon, I'd like to be able to apply these filters to both these moode sources. That's stage two, on which I'm hoping someone can point me in the right direction. Normally I just dive in and try to work things as I go, but given there seem to be so many options I'll admit to being intimidated by them all, even after looking at the Camilla documentation.

Uploading the convolution wav and cfg files
Audiolense generates a zip file containing wav and cfg files for each sample rate my DAC can handle (44.1, 48, 88.2, 96 and 192). Roon allows this zip file to be uploaded and during playback will automatically choose the appropriate files to match the sample rate playing.

- In moode, do I have to upload the wav files separately for each sample rate?
- Will moode/Camilla also select the appropriate file for the sample rate or do I have to do something different?

Resolution control
In Roon the source signal is converted up to 64 bits for all the DSP calculations and then truncated at the end to 32 bits which is what the DAC can handle. I couldn't see anything I needed to configure for this - have I missed something?

Upsampling
In Roon I've set the DSP to upsample to the best rate that my DAC will support before carrying out the convolution. This is a very simple process in Roon since it recognises the DAC and already knows what rates it supports - maybe ALSA works this out when the DAC connects? However, I'm struggling to understand the corresponding Camilla options, and what I need to do to upsample simply by factors of two to simplify/maximise the quality of the interpolation process.

Scaling
Again, in Roon, to avoid clipping I needed headroom management to reduce the signal level before convolution, and then rescale upwards afterwards. With 64 bit calculations there's enormous scope to do this with no risk of degrading the quality. I guess the same must apply in Camilla, but what's the best way to do it? Again, I'm afraid I'm confused by the options!

Thanks for reading - all pointers welcome

Did you ever get this working how you wanted it? I want to test doing the exact same thing as you.
Reply
#3
@johnanon

Uploading the convolution wav and cfg files

Audiolense IR wave files contains extended WAVE headers, which is supported starting from CamillaDSP 6.2.
That requires moOde 7.4 or convert the IR files wave to use standard wave headers.

Indeed you have to upload each samplerate variant to moOde.

You can't use automatic samplerate selection with the Quick Convolution. But if you create your own camilladsp config there is a construction in CamillaDSP which support automatic selection of the correct IR file. See at https://github.com/HEnquist/camilladsp#fir the part about $samplerate$.

Resolution Control
The output resolution is automaticly set by moOde to mach the used output device. When toggling the expert mode for camilladsp edtior, your see the actual used bitdepth.

Upsampling
This is possible on two locations:
  1. MPD with sox (configuratable from the moode mpd configuration page), this will resample before the audio will enter camilladsp.
  2. It CamillaDSP itself (requires to enable the expert mode)

Scaling
You can add a gain filter or mixer to your filter pipeline to reduce the signal level.
See https://github.com/HEnquist/camilladsp#gain
Reply


Forum Jump: