CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.

Member
Joined 2008
Paid Member
I am kind of stuck (I think). I made CDSP with GUI to the running state, my config is finally OK. However while playing, I see no bar graps moving when playing a youtube video. I am not sure which loopback card to select from these:
1707723874566.png

My guess would be the first one. Am I correct that the bargraphs should actually show something when the sound is playing? I have my sound output set to loopback, using latest Fedora (installed yesterday). I used the default config files from Henrik's repository to create the loopback. I think I must have missed something. Now running CDSP and GUI from command line, I installed it using the poetry script which went really smooth.

This is what Alsamixer shows when F6 is pressed:
1707724701437.png

Thanks in advance for helping me with what I hope is the last step:)

Edit: I use Anydesk now to access the computer - and I can hear sound via Anydesk, so something is definitely playing.
 
Last edited:
Member
Joined 2008
Paid Member
I have disabled all cards in PulseAudio, selected Pulse audio as the capture source and it is playing sound from Firefox. I have no luck using any of the Alsa devices for capture. My aim was to be able to stream from this computer and that should be now doable.
The funny thing is it seems I am limited to use Pulseaudio for capture source even if I want to use the external soundcard. Could it be somehow PulseAudio fighting with Alsa for open channels? Could this be a problem or can I just run PulseAudio capture and Alsa playback?
 
I have my sound output set to loopback, using latest Fedora (installed yesterday).
How/where did you select the loopback? In the audio section of the system settings? And did you modify any pulse audio config files?
If you select Loopback,0 as playback device, then you need to use Loopback,1 as capture device (or vice versa). The second number is subdevice. It's often omitted and then defaults to 0, so Loopback,0 is equivalent to Loopback,0,0.

Are you sure you are using pulse audio? I would have guessed that the latest Fedora is using pipewire.
 
Member
Joined 2008
Paid Member
Are you sure you are using pulse audio? I would have guessed that the latest Fedora is using pipewire.
Unfortunately I am not. I installed the two loopback config files from the repository and the loopback devices appeared.

I used Pavucontrol and it seems to contain the same things as the sound menu. I am a bit lost - selecting pipewire in the Gui did nothing.

However now I can either play from the system or from the soundcard inputs when selecting Pulse audio in the gui. When I enable UMC1820 inputs in Pavucontrol, I get signal from them. If I disable them, I get sound from the operating system. It works as I need, but I do not know why:)
 
the thing is, I haven't used command line software since late 1983, so the prospect of it is more than a little daunting. I'm stuck at the download page, as I'm not sure where to even begin.

You are running a Mac, do you know if it has an Intel (i3, i5, i7) or Apple (M1, M2) processor? If it is Intel, camilladsp-macos-amd64.tar.gz is the correct binary, if it is Apple camilladsp-macos-aarch64.tar.gz is the correct binary.

Here are updated instructions for Mac with the latest version of CamillaDSP assuming you have an Intel Mac. All commands below should be run in terminal. If you can copy / paste you should be able to get this working. Once you get it running in terminal I can talk you through how to create a launch agent to automatically start CamillaDSP and CamillaGUI.

1) Install homebrew. Homebrew is a package manager which will allow you to install the required dependencies.

Code:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2) Create CamillaDSP directories. This will create folders to store FIR coefficients and CamillaDSP configurations. These directories will be created in a folder named camilladsp in your home directory.

Code:
mkdir ~/camilladsp ~/camilladsp/coeffs ~/camilladsp/configs

3) Install python. This is required for CamillaGUI.

Code:
brew install python

4) Install websocket_client, aiohttp and jsonschema. These are required for CamillaGUI.

Code:
pip3 install websocket_client aiohttp jsonschema

5) Install pycamilladsp and pycamilladsp-plot. These are required for CamillaGUI.

Code:
pip3 install git+https://github.com/HEnquist/pycamilladsp.git
pip3 install git+https://github.com/HEnquist/pycamilladsp-plot.git

6) Download CamillaDSP. This will download the binary to your camilladsp folder.

Code:
wget https://github.com/HEnquist/camilladsp/releases/download/v2.0.2/camilladsp-macos-amd64.tar.gz -P ~/camilladsp/

7) Unpack CamillaDSP. This will unpack the binary to /usr/local/bin which will allow you to run camilladsp by simply entering camilladsp in the terminal without the need to specify the path in front of it.

Code:
sudo tar -xvf ~/camilladsp/camilladsp-macos-amd64.tar.gz -C /usr/local/bin/

8) Download CamillaGUI. This will download the zipped GUI to the camilladsp folder you created in your home directory.

Code:
wget https://github.com/HEnquist/camillagui-backend/releases/download/v2.0.2/camillagui.zip -P ~/camilladsp/

9) Unpack CamillaGUI. This will unpack the GUI in a folder called camillagui within your camilladsp folder.

Code:
unzip ~/camilladsp/camillagui.zip -d ~/camilladsp/camillagui

10) Start camilladsp.

Code:
 camilladsp -s ~/statefile.yml -w -p 1234

You should see something like this in terminal

Code:
camilladsp -s ~/camilladsp/statefile.yml -w -p 1234
2024-02-12 23:33:23.475493 INFO [src/bin.rs:683] CamillaDSP version 2.0.2
2024-02-12 23:33:23.475546 INFO [src/bin.rs:684] Running on macos, x86_64

11) Open a separate terminal and start camillagui.

Code:
python3 ~/camilladsp/camillagui/main.py

You should see something like this in terminal.

Code:
python3 ~/camilladsp/camillagui/main.py
======== Running on http://0.0.0.0:5000 ========
(Press CTRL+C to quit)

12) Open a browser and navigate to http://YOURIPADDRESS:5000. You should see a webpage that looks like this.

1707799711050.png


Once get this far let me know and we can work on the launch agent / configuration.

Michael
 
Last edited:
  • Like
Reactions: 1 users
Noticed one thing. And I recognize changing this might involve major rewrite and therefore not happening.

With version 2 a great feature where introduced. The ability to change in/out sound devices from drop down list. (y)

Having issue with sound card configuration due to disabling the RPi headphone jack elsewhere I now just realized when you need this feature the most it's not available. These lists seem to be provided by CamillaDSP and not the backend. Course when any of these settings are wrong CamillaDSP wont start and the drops down lists now show up emty.

CamilaDSP could possible warn rather than stop when capture or playback connections fails? Or these lists could be provided by the backend for easy correction of these errors?

Edit: No it can't warn, then the restart when error wont function.
 
Last edited:
Having issue with sound card configuration due to disabling the RPi headphone jack elsewhere I now just realized when you need this feature the most it's not available. These lists seem to be provided by CamillaDSP and not the backend. Course when any of these settings are wrong CamillaDSP wont start and the drops down lists now show up emty.
Yes the list is provided by CamilladDSP, because it already has bindings to all the audio api:s. Doing it in the gui backend instead would mean that the backend also needs similar code, but in python instead of Rust.
If you start camilladsp in wait mode, with -w, it should not exit if you have a bad config, and then the list should still be available.
 
Thanks @HenrikEnquist. Seems I've come to a loop then. I've been trought this ending up with me adding --wait in the service start command. Which introdused other problems with CDSP not recovering from temporary errors.

Admittedly this is a somewhat constructet problem for a working system. What I'm really at is trying to get CamillaDSP up running for user not knowing what ´aplay -l´ does. I can of course list availby audio devices and let user select when installing everything. But that doesn't help them if they connect a new DAC.

Would it it be fesably to have CamillaDSP from a button on the GUI restart with current startup line adding the wait argument?
 
Last edited:
I have added a shortcut to CamillaGUI on my android phone by using the Chrome function "Add to home screen".
Unfortunately, when I double-click on the icon (which is the "React" icon), I obtain the message "403: Forbidden". The same happens with other browsers.
This only happens with CamillaGUI, no problems adding other URLs to the home screen, thus I suspect that the issue is related to React.
Note that CamillaGUI works quite well when opened directly in the browser.
 
For those few, if any that are interested a special version of the LMS to CamillaDSP Volume control are now availble. This version are complying with the theorem found in Leedh Processing.

Minimise the number of bits used to quantize volume control coefficients so that information loss is minimized at truncation stage. In other words, it trades volume control coefficients precision against information loss minimization.

-- https://www.processing-leedh.com/copie-de-presentation

Now using CamillaDSP for its intended use of constructing filters this is of course a rather useless exercise. But for test purpose it could be fun. There are two caveats I don't have control over. I where not able to have CamillaDSP take coefficient values for volume setting and might therefore already have loss in the coefficient to dB conversion done as python float. The other thing I dont fully understand are if CamillaDSP do any amplitude reduction at input to ensure headroom if resample is implementet?

Anyhow, you find it here: https://github.com/StillNotWorking/...s#adjust-volume-on-camilladsp-from-lms-player
 
Last edited:
For anyone using Linux and a Focusrite sound card, there is an updated alsa-scarlett-gui alsa mixer with patch panel UI.

It should make configuring your Scarlett/Clarett easier on Linux than using the default alsamixer.

It uses a newer graphics library and the kernels listed below.

https://github.com/geoffreybennett/alsa-scarlett-gui
  • Scarlett Gen 2: Linux 5.4 (bugs fixed in Linux 5.14)
  • Scarlett Gen 3: Linux 5.14
  • Clarett+ 8Pre: Linux 6.1
  • Clarett 2Pre/4Pre/8Pre USB, Clarett+ 2Pre/4Pre: Linux 6.7
This is the 3rd Gen 8i6 interface examples:

8i6 MIXER.png

8i6 DIRECT.png

8i6 PREAMP.png
8i6 STEREO.png
 
Thanks @HenrikEnquist. Seems I've come to a loop then. I've been trought this ending up with me adding --wait in the service start command. Which introdused other problems with CDSP not recovering from temporary errors.
Yes that is a problem with running with the wait flag. At the moment there is no way to get both an always running camilladsp, and automatic restart on errors.
I'm working on a watchdog for the camilladsp process, that will watch the status and apply a known good config any time the status goes to inactive. The idea is to make it general enough to work for most cases, and simple to modify for the cases when it doesn't.

Would it it be fesably to have CamillaDSP from a button on the GUI restart with current startup line adding the wait argument?
That would be nearly impossible to implement well, especially since it needs to work on all platforms.
 
  • Thank You
Reactions: 1 user