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

I am trying to run camilladsp on the newly released Ubuntu 23.04 on a raspberry pi. Everything seems fine but I am having some issues installing pycamilladsp and pycamilladsp-plot. Previously I installed these with the commands:

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

When running these commands I now receive the following error.

Code:
sudo pip3 install git+https://github.com/HEnquist/pycamilladsp.git
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I then installed pipx and was able to install pycamilladsp and pycamilladsp-plot but it seems like if the modules are installed this way they cannot be imported as I get the following error when attempting to run the GUI.

Code:
python3 ~/camilladsp/camillagui/main.py
Traceback (most recent call last):
  File "/home/michael3/camilladsp/camillagui/main.py", line 4, in <module>
    from camilladsp import CamillaConnection
ModuleNotFoundError: No module named 'camilladsp'

I am able to install pycamilladsp and pycamilladsp-plot via pip3 if I add --break-system-packages but not sure if this is something I should be doing. Is using --break-system-packages OK? Is there are way to install pycamilladsp and pycamilladsp-plot via pipx where they can imported when running the GUI?

Michael
 
Most likely they implemented this to prevent people from messing up their systems. Probably a good thing overall, but makes some things a little harder.
pipx isn't useful here.
If it's still allowed to use pip to install in the user home for that's probably the easiest. Try "pip install --user git+http://GitHub.com/etc etc"

If that doesn't work then virtual environments are the way to go. There are many ways to handle that. Either plain virtualenvs, or using tools such as conda or pipenv. Not sure what I would recommend.
 
  • Like
Reactions: 1 user
Older versions of pip always run as if --break-system-packages is given. Using this to install a single package that isn't available in the system repos is normally safe. But if that package has dependencies that are not already installed, then pip will install those too from pypi. If that then installs something that is also available via the system repos (for example numpy) then things can get messy.
 
Thanks for the info, that all makes sense. One good thing from the change in pip behavior is I realized I was being inconsistent with installing packages via apt and pip. It somewhat forced me to clean up my tutorial to use apt for all packages (other than pycamilladsp and pycamilladsp-plot).

Michael
 
Hi experts,

Sorry to bother you again, but I am quite confused with the channel mapping into the blackhole 16-ch instance I am using on MacOS. I tried to figure it out by displaying the waveform on Audacity, and it appears to be in the order of front left, front right, surround left, surround right, front center and the subwoofer. However, VLC seems to map them to all over the places among the 16 channels of blackhole. Then, playing with Audacity shows a completely different mapping except first two, and actually it sounds like some channels missing. Did you experience something like this?

Regards,
Jay
 
Regarding the post above, I think I made a small progress through speaker config@audio MIDI setup, but I still seem to see incorrect mapping. I set center/subwoofer to be 3rd/4th channels, but now consistently getting them as 5th/6th channels. Not sure what's going on, but I guess it may be okay as long as it's consistent?
 
Here with 8 channel output, channel 3 and 4 from cdsp (RR and RL) are on position 5 and 6. 🙈
Essence-Evolve-II-4K-rear-scaled.jpg
 
Hi, Does anyone have experience of using this virtual AES67 ALSA device on a RPi4 with CamillaDSP? It looks a little complicated to me, but that's probably because I don't really understand most of this stuff. I just follow the instructions and hope any niggles don't take too long to shake out.

I've already managed to get roonbridge and librespot-java working seamlessly with CamillaDSP in the kitchen. AES67 would give me access to Dolby processing on the Trinnov located remotely in the cinema room, which I'd like to experiment with.

On the separate topic of integrating control of sources and CamillaDSP, I'm using Node-RED to tie everything together. We use the individual apps for Roon and Spotify to select and launch music, after which we use a Harmony Elite to control volume and transport. Node-RED detects a new source playing, and controls CamillaDSP's config and the amplifiers, stopping and restarting the stream if needed to avoid missing the start of the track. If anyone's interested I can share the flow.
 
  • Like
Reactions: 1 user
As long as the stream of commands is sent in one connection they will be processed in the order they are sent. The websocket server always sends the response after executing the command, before picking the next from the queue.
If you send the commands on different connections however there are no guarantees unless you wait for the response for one command before sending the next. Each connection is handled by a dedicated thread.
 
  • Like
Reactions: 1 user
is there a working example (running on linux) of rew -> aloop -> camilla -> aloop -> rew anywhere? I can do it at cli using arecord/aplay but it's not super convenient. REW doesn't seem to let one choose subdevice which (based on what might appear to be feedback recorded) suggests it is recording itself.