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

Hi Henrik, all,
On Michael's camilladsp on RPI4 tutorial thread, I have posted about my tedious discovery that RPI3 was buggy with USB audio. Along my camilladsp journey I have made multiple other naive attempts (RPI3 with HDMI multimedia receivers; FireWire; Linux on MacMini to exploit its FireWire output; etc.) most of those have failed. I do not want to pollute this thread with such knowledge. I however believe some future readers may benefit from such knowledge. And I still secretly dream someone would end up explaining me how to activate FireWire of MacMini late 2012 with linux, so that I do not have to keep an obsolete iOS server on my home network, and so I can reuse cheap audio interface like RME FireFace400 or Motu Traveler MK1. Therefore my question: would you see a way for the community to share their noticeable working and failing camilladsp configurations ?
 
  • Like
  • Thank You
Reactions: 8 users
Hello,
Having realized (above) I can't use the RPI3 I have decided to do a fresh camilladsp install of my AMD64 / Intel celeron box - with Ubuntu server 22.04.
I have fist used Michael's instruction for RPI4 - installing "camilladsp-linux-amd64" instead of "camilladsp-linux-aarch64".
Attempting to run camilladsp gives following error
camilladsp: error while loading shared libraries: libpulse-simple.so.0: cannot open shared object file: No such file or directory
This is my first issue; I have no clue what it means, if you have a simple fix I'd be grateful.

Now, I then have made the assumption that maybe the RPI4 tutorial would not be appropriate for my intel machine.
I therefore have attempted to follow the installation steps of @HenrikEnquist with "full_install_venv.sh" - following the readme of the page camilladsp-setupscripts.

Below the issue I have had, and the fix I have attempted:
First attempt:
sh: 112: unar: not found
Failed to uncompress gui
I then have installed unar (sudo apt install unar)

Then I had following error:
Creating venv at /home/daniel/camilladsp/camillagui_venv
sh: 154: python: not found
Failed to create environment
I then have installed the python3 & pip related packages as on Michael's RPI4 thread - to which I've added "python3-venv" (cause it felt right ...).
sudo apt install python3 python3-pip python3-websocket python3-aiohttp python3-venv python3-jsonschema python3-numpy python3-matplotlib unzip
sudo pip3 install --upgrade pip
Then I had following error:
Creating venv at /home/daniel/camilladsp/camillagui_venv
./install-script/full_install_venv.sh: 154: python: not found
Failed to create environment
I have then copied the script locally and replaced the two occurence of "python" by "python3" outside the comments, with which the script has progressed further. Next error:
Creating venv at /home/daniel/camilladsp/camillagui_venv
Environment created
Installing Python libraries
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
Failed to install libraries
I have tricked the script by putting a hard link to an actual duplication of the "requirements.txt" file which I had found in "~/camilladsp/gui -D/camillagui/". This has brought me to:
Basic setup ready.
Edit the gui config file at:
/home/daniel/camilladsp/gui/config/camillagui.yml
as required. Then start the gui with:
cd /home/daniel/camilladsp/gui
/home/daniel/camilladsp/camillagui_venv/bin/python main.py

All done!
Some temporary files were stored in /home/daniel/camilladsp/temp
These are no longer needed and can be deleted.
However .. the directory /home/daniel/camilladsp/gui is empty, it does not contain a "main.py" file. The script actually has failed.
I am at the end of my ideas how to progress. Although I know I have made it once on the previous desktop install of ubuntu on this same machine. But I do not remember what I've done.
Thank you for any suggestion how to progress here.
Merci !
 
You can install the package "python-is-python3" to get around the python3 vs python issue.
For the libpulse error, you need Pulse audio. It's described here: https://github.com/HEnquist/camilladsp?tab=readme-ov-file#additional-dependencies

It should not fail like that if unar is missing, that's something I'll have to look at. I have not tested the script in Ubuntu.

I can't say why the GUI dir ended up empty. Can you run the script again and copy the entire terminal output?
 
  • Like
Reactions: 1 user
You can install the package "python-is-python3" to get around the python3 vs python issue.
Done, indeed it helps.
I can't say why the GUI dir ended up empty. Can you run the script again and copy the entire terminal output?
Attached the terminal output after having removed the camilladsp directory, and added the "python-is-python3" package. Next error is
"ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'"

So I then attempt to circumvent this issue by adding a hard path to an actual duplication of the "requirements.txt" file which I had found in "~/camilladsp/gui -D/camillagui/". That is, I replace the line "$VENV_PATH/bin/python -m pip install -r requirements.txt" by "$VENV_PATH/bin/python -m pip install -r /home/daniel/install-script/requirements.txt".
At this time the scripts claims it succeeds. But the directory "/home/daniel/camilladsp/gui" is empty.
Attached the second file "requirements_hard_path.txt".
(Note that I have not yet installed the package "libpulse-dev").
 

Attachments

  • requirements_not_found-clean.txt
    3.4 KB · Views: 17
  • requirements_hard_path.txt
    9.4 KB · Views: 23
Last edited:
  • Like
Reactions: 1 user
For the libpulse error, you need Pulse audio. It's described here: https://github.com/HEnquist/camilladsp?tab=readme-ov-file#additional-dependencies
Thank you Henrik. I confirm that "sudo apt-get install libpulse-dev" has solved my "error while loading shared libraries: libpulse-simple.so.0" issue.
I kind of vaguely remember I have asked you this question once already Henrik, sorry. Kindly note that, as presented in camilladsp's github readme, "libpulse-dev" appears to be needed only when building camilladsp, and if choosing pulse-backend. Also noteworthy: I do not seem to have had to install any pulseaudio related package when installing the desktop version of the same ubuntu on the same machine.
This however does not explain why this package is not needed when installing camilladsp with the same ubuntu server 22.04 version on the RPI4 (thread of Michael). Package "linux-modules-extra-raspi" maybe ?
 
For the libpulse error, you need Pulse audio.
With libpulse-dev (sudo apt-get install libpulse-dev) as above, I now have strictly carried on Michael's rpi4-camilladsp-tutorial and I am happy to report that my AMD64 machine is now running Ubuntu server 22.04 with both camilladsp & camillagui as services and web gui available. I have not installed alsa loopback since I do not need it. Detailed steps in the history file attached - but actually I"m just following Michael's tutorial. Thank you Henrik & Michael for this cool technology that you're making available !
 

Attachments

  • rpi4-camilladsp-tutorial_on_an_AMD64_machine.txt
    2.6 KB · Views: 26
Last edited:
I do not seem to have had to install any pulseaudio related package when installing the desktop version of the same ubuntu on the same machine.
The pulse audio libraries are normally installed as a dependency for a graphical desktop, so they will usually not be installed by default in a terminal-only system.

This however does not explain why this package is not needed when installing camilladsp with the same ubuntu server 22.04 version on the RPI
The aarch64 binary is built without pulse audio support. The idea is that this version is likely to be used on a headless raspberry pi or such, without and graphical desktop installed. While the amd64 build is more likely to be running on a full desktop system. Not always true obviously, but seems to mostly work out. Maybe there should be separate versions with and without pulse for both architectures.
 
  • Like
Reactions: 1 user
I'm running into a problem with the new GUI backend.
I'm running CDSP on PiCorePlayer using LykkeDK's samplerate changer, but I don't think that's the problem, I think there's a deeper issue with the python install. When trying to start camillagui I get the following error:
Code:
Traceback (most recent call last):
  File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/main.py", line 9, in <module>
    from backend.routes import setup_routes, setup_static_routes
  File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/backend/routes.py", line 1, in <module>
    from .settings import BASEPATH
  File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/backend/settings.py", line 7, in <module>
    from jsonschema import Draft202012Validator
ImportError: cannot import name 'Draft202012Validator' from 'jsonschema' (/usr/local/lib/python3.8/site-packages/jsonschema/__init__.py)
From looking through the code it seems that "from jsonschema import Draft202012Validator" in settings.py is a new addition for the 2.1.0 release, and if I roll back to 2.0.1 then camillagui works again. I'm using the standard python3.8 package released for PiCorePlayer, but it looks like this doesn't support this particular validator. Here's what's present in my /usr/local/lib/python3.8/site-packages/jsonschema/init.py:
Code:
"""
An implementation of JSON Schema for Python

The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.

Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""

from jsonschema.exceptions import (
    ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from jsonschema._format import (
    FormatChecker,
    draft3_format_checker,
    draft4_format_checker,
    draft6_format_checker,
    draft7_format_checker,
)
from jsonschema._types import TypeChecker
from jsonschema.validators import (
    Draft3Validator,
    Draft4Validator,
    Draft6Validator,
    Draft7Validator,
    RefResolver,
    validate,
)
try:
    from importlib import metadata
except ImportError: # for Python<3.8
    import importlib_metadata as metadata
__version__ = metadata.version("jsonschema")

Is there a solution? Do I need to update the python installation somehow?
 
After doing some digging I see I'm using the jsonschema implementation from LykkeDK's package. From the filename I guess this is version 3.2.0. I found a git which provides up-to-date code which says it's compatible with python3.8, but (predictably) my simplistic attempt to graft this in failed ( "No module named 'attrs' " ). This is complicated by the fact that TinyCore uses its own idiosyncratic installation environment, so I've probably missed something important (you can't just 'pip install'). I've posted in Jesper's thread to see if he can give any help.