• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPi + CamillaDSP Tutorial

You built a loop i guess. Therefor it's not working.
I tried with a USB SPDIF receiver and while it did work with the graph samplerate i wasn't able to configure pipewire to always reopen the receiver with the audio files sampling rate and do a resampling to the fixed sampling rate of the loopback device.

So my chain was USB_SPDIF_Receiver --> Loopback playback (pw-link -i) and then in CamillaDSP hw:Loopback,1,0 as input and my hifiberry card as output.
This did work, but didn't survive a restart of the wireplumber and pipewire demons. I always had to reset the capture device in CamillaDSP to reload the Loopback devices into the wireplumber session manager.

Yes, you could disable the session manager altogether, which i did, but still after a restart of pipewire i had to rebuild the links again (which wireplumber could do automatically in theory).

Now i'm getting me a hifiberry dac+dsp, and while Sigmastudio is a hassle by itself i have a working project that is just forwarding input to output through the hardware resampler of the DSP chip.
 
Michael, I'm attempting to upgrade a test system to CamillaDSP 3.0 - https://www.diyaudio.com/community/...overs-room-correction-etc.349818/post-7897356 -

using https://github.com/mdsimon2/RPi-CamillaDSP?tab=readme-ov-file#10-upgrading-to-future-versions
The GUI and CamillaDSP binary worked fine with just changing version, however the pycamilladsp and plot do not appear to have updated from beta versions using:
sudo pip3 install git+https://github.com/HEnquist/pycamilladsp.git --break-system-packages
sudo pip3 install git+https://github.com/HEnquist/pycamilladsp-plot.git --break-system-packages
sudo service camilladsp restart

A quick search found:https://www.audiosciencereview.com/...amilladsp-tutorial.29656/page-22#post-1218123

The install command is working perfectly, please ignore.

To confirm, you were able to upgrade successfully? I just upgraded my V2 and V3 beta setups using the commands from the tutorial and both seemed fine to me.

I haven't found the need to use the upgrade command as suggested by @RawDlite but want to make sure I am not missing anything.

Michael
 
Hey guys, Im struggling to understand one element of my new CamillaDSP setup. I followed the main tutorial for gadget mode with a Motu M4. The thing that is confusing as follows:

Whenever I download a config file from within CamillaDSP, I have the following:
Code:
capture_samplerate: 96000
.
If I then adjust that to, say,
Code:
capture_samplerate: 48000
and load it back into CamillaDSP, then apply, save it to a new config file, and finally download that new config file back to my computer… the
Code:
capture_samplerate
has returned to
Code:
96000
.

There must be something I am misunderstanding but for now I am just feeling uneasy because I dont 'get it'. I should note also that any other changes I have made to the config are present in the new config file.

Can anyone make sense of this for me?
 
Hey guys, Im struggling to understand one element of my new CamillaDSP setup. I followed the main tutorial for gadget mode with a Motu M4. The thing that is confusing as follows:

Whenever I download a config file from within CamillaDSP, I have the following:
Code:
capture_samplerate: 96000
.
If I then adjust that to, say,
Code:
capture_samplerate: 48000
and load it back into CamillaDSP, then apply, save it to a new config file, and finally download that new config file back to my computer… the
Code:
capture_samplerate
has returned to
Code:
96000
.

There must be something I am misunderstanding but for now I am just feeling uneasy because I dont 'get it'. I should note also that any other changes I have made to the config are present in the new config file.

Can anyone make sense of this for me?

Are you manually editing the configuration file in a text editor or using the GUI?

For gadget mode the tutorial only uses a capture rate of 44100 Hz. If you are seeing 96000 Hz as the default capture rate for a gadget tutorial you are likely using an incorrect configuration. I also imagine if you try to apply a configuration with a capture rate that does not match the rates defined in usb_g_audio.conf it will not work.

Is your intent to use a fixed capture rate as described in the tutorial or do you want to dynamically switch sample rates using gaudio_ctl, camilladsp-setrate or camilladsp-controller?

Michael
 
Does the OLED/FLIRC script still work on V3? Mine isn't working anymore.
 
The pycamilladsp nomenclature changed with v3. I need to update the tutorial wording to reflect but there are oled/flirc scripts appended with v3 already uploaded to GitHub.
Thank you. I thought all files on GitHub were updated months ago, didn't realize you already have v3 scripts ready 4 months ago. Anyway, took me few minutes to get things fixed. Works like a charm now.
 
Are you manually editing the configuration file in a text editor or using the GUI?

For gadget mode the tutorial only uses a capture rate of 44100 Hz. If you are seeing 96000 Hz as the default capture rate for a gadget tutorial you are likely using an incorrect configuration. I also imagine if you try to apply a configuration with a capture rate that does not match the rates defined in usb_g_audio.conf it will not work.

Is your intent to use a fixed capture rate as described in the tutorial or do you want to dynamically switch sample rates using gaudio_ctl, camilladsp-setrate or camilladsp-controller?

Michael

Hey thanks for helping me with this, I do not see a place in the UI for changing capture sample rate.
This value (screenshot below) corresponds with 'samplerate' in the config file with the following tooltip 'Sample rate for processing and output'

SCR-20250115-npjt.png


I only want to be able to set a fixed sample rates. At this stage I do not need to switch between them dynamically.

This is the contents of my usb_g_audio.conf

Code:
options g_audio c_srate=44100,48000,88200,96000,192000 c_ssize=4 c_chmask=3 p_chmask=0

On my host computer (Mac Studio) I can choose the sample rate for the audio interface (the usbgadget). The options available are those set in usb_g_audio.conf

If I set the samplerate there to, say, 44100

and also set the samplerate field in the CamillaDSP GUI to match 44100

Then I save the config and download it. within the config file, there is a field named 'capture_samplerate' which is set to '96000'

Is it correct that I should expect the 'capture_samplerate' to read 44100?
 
I should add, I am quite sure this is just me not understanding something. I'm just hoping to get a handle on all this, and this one has me stumped
 
@Neigh : I would suggest to troubleshoot your setup without the GUI first, writing configuration directly into the CDSP config file. Since GUI has already prepared your config file, it should be trivial.
 
Hey thanks for helping me with this, I do not see a place in the UI for changing capture sample rate.
This value (screenshot below) corresponds with 'samplerate' in the config file with the following tooltip 'Sample rate for processing and output'

View attachment 421167

I only want to be able to set a fixed sample rates. At this stage I do not need to switch between them dynamically.

This is the contents of my usb_g_audio.conf

Code:
options g_audio c_srate=44100,48000,88200,96000,192000 c_ssize=4 c_chmask=3 p_chmask=0

On my host computer (Mac Studio) I can choose the sample rate for the audio interface (the usbgadget). The options available are those set in usb_g_audio.conf

If I set the samplerate there to, say, 44100

and also set the samplerate field in the CamillaDSP GUI to match 44100

Then I save the config and download it. within the config file, there is a field named 'capture_samplerate' which is set to '96000'

Is it correct that I should expect the 'capture_samplerate' to read 44100?

Thanks for the info.

When you are not using resampling, the playback and capture sample rates are the same and will be the rate you have circled in pink. The capture sample rate reported in the GUI under Capt. samplerate seems to be a measured rate and may not change as soon as you change a configuration in CamillaDSP.

There seems to be an order of operations you need to follow when manually switching sample rates. First switch the sample rate on your USB host, then change the sample rate in CamillaDSP and apply/save the configuration. If you change the sample rate in CamillaDSP first, it seems to get stuck in STARTING state and you need to re-apply/save the configuration after you change the rate on your USB host.

Michael
 
When you are not using resampling, the playback and capture sample rates are the same and will be the rate you have circled in pink.

Bingo! this was the part I was misunderstanding - I knew it was working, despite the inconsistency between the sample rates in the config file, this explains it. The next quirk that was adding to the confusion is that it seems I am actually unable to import a config file through the GUI, it was just failing silently - with the following error in the browser console:

Code:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Unhandled Promise Rejection: Error: Could extract filters from file
(anonymous function) - configimport.ts:160
enqueueJob

I tried this in both Safari and Chrome. for now I will simply edit my config files directly through SSH using nano
 
My next area of intrigue is adding a rotary encoder to the pi to control the volume levels. I am sad to have lost the tactile control of volume from my M4 and I crave a well damped satisfying high quality volume knob. Would anyone that's successfully done this mind helping me (a newcomer to the electronics discipline) work out how to do this? The closest I found was this post (https://audiosciencereview.com/forum/index.php?threads/rpi-camilladsp-tutorial.29656/post-1379881), but the linked files are 404'ing
 
Here is another one by @MCH -> https://www.audiosciencereview.com/...r-raspberry-pi-help-needed-with-python.40320/.

pycamilladsp gives you the tools to accomplish it, just a matter of finding a way to get the output of your knob to interface with it.

You can also look at the flirc.py routine on my GitHub to see how I interface the FLIRC (which is essentially a keyboard) with pycamilladsp, might give you some ideas.

Good luck!

Michael
 
Here is another one by @MCH -> https://www.audiosciencereview.com/...r-raspberry-pi-help-needed-with-python.40320/.

pycamilladsp gives you the tools to accomplish it, just a matter of finding a way to get the output of your knob to interface with it.

You can also look at the flirc.py routine on my GitHub to see how I interface the FLIRC (which is essentially a keyboard) with pycamilladsp, might give you some ideas.

Good luck!

Michael
@Neigh Yes, I still use the remote knob linked and I am quite happy with it.
After all this time, I would say the pros are low cost and battery life and the cons are somehow complex setup, and latency, this last probably due to my poor coding skills.
If you don't need wireless, I am sure it can be done much easier and the latency can be much lower. Pycamilladsp is quite straightforward and allows lots of functions, I even added a tone control to my knob.
 
Interesting, I don't typically use the "Import Config" button which allows for partial configuration uploads (circled in red below), I use the upload arrow button to load the whole configuration (circled in green below).

View attachment 421378

Michael
@mdsimon2 : Thanks for adding the update commands to your tutorial. Before I give it a go: do the V2 config files need any changes made? I thought not, but recent posts on DIYaudio have me confused.
 
Back
Top Bottom