Snakeoil Forums

Full Version: CamillaDSP for Room Correction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
https://github.com/HEnquist/camilladsp

The purpose of CamillaDSP is to enable audio processing with combinations of FIR (convolution) and IIR (parametric EQ, crossovers) filters. Instead of implementing BruteFIR for convolution and another for IIR, CamillaDSP could become the DSP engine for SnakeOil, and maybe a way to increase the marketing awareness of SnakeOil. According to ConvoProxy (ConvoFS) author, CamillaDSP may sound better than BruteFIR? 

It appears to be well written.  There is an ALSA plugin,which in theory can be used by all the players (?)
https://github.com/scripple/alsa_cdsp

and a Web Gui.
https://github.com/HEnquist/camillagui-backend

The out of the box build includes Pulse Audio, but there are detailed instructions for a custom build
https://github.com/HEnquist/camilladsp#customized-build

There are instructions for install (which I will try, but will be slow process for me with my limited Linux knowledge)
https://github.com/HEnquist/camilladsp-config

@agent_kith, please have a look and put it on your Todo list.  Would love to see this happening quickly, but I do understand that fine tuning 1.2 is the next priority.
Created a ticket to track it (https://git.snakeoil-os.net/snakeoil/sna...issues/201). Not sure when I'll get to this as I'm only like <5% complete on the new UI.. Been meaning to post something about this but as usual shit kept happening (Microwave died so had to spend a weekend looking for one, and also had a weird issue with my dev machine's network suddenly not working any more so I had to add a different network card, and set everything up).
This is how moOde does it
https://www.bitlab.nl/page_id=665
(17-May-2021, 02:34 PM)agent_kith Wrote: [ -> ]Created a ticket to track it (https://git.snakeoil-os.net/snakeoil/sna...issues/201). Not sure when I'll get to this as I'm only like <5% complete on the new UI.. Been meaning to post something about this but as usual shit kept happening (Microwave died so had to spend a weekend looking for one, and also had a weird issue with my dev machine's network suddenly not working any more so I had to add a different network card, and set everything up).

Wow...given all your devices that have died, crashed, or 'gone-wonky' recently I would be checking the mains supply and possibly even getting the provider to install a temporary logging device.

(17-May-2021, 12:55 PM)Snoopy8 Wrote: [ -> ]There are instructions for install (which I will try, but will be slow process for me with my limited Linux knowledge)
https://github.com/HEnquist/camilladsp-config

I tried adding this to Snakeoil using the pre-built Binary for Ubuntu (Reasoning that as the underlying O/S is Ubuntu it might have the best chance of success.. Smile )
Install went fine but when calling CamillaDSP it fails and crashes MyMPD.   Both use websocket to connect so this appears to be a conflict as the MyMPD error was 'websocket disconnected' when I started CamillaDSP.
I have yet to investigate further...my Linux skills being frugal too Big Grin
On the plus side the install seems to not have produced any detriment to Snakeoil.

Cheers,
Bob.
(18-May-2021, 09:06 AM)Bromf Wrote: [ -> ]Wow...given all your devices that have died, crashed, or 'gone-wonky' recently I would be checking the mains supply and possibly even getting the provider to install a temporary logging device.
Except for the Yamaha Power amp, everything that has died about > 5 years old. Most more than 15. My microwave (may it RIP) is probably over 20 years old now. Mains supply should be better than before, just have my power board fixed to code. There is a surge protector, and mains is constant at around 230 V. Mains should be fine, it's just old age.

Would have wished my Microwave to go another 30 years though. It has fed me well for almost half my life.

(18-May-2021, 09:06 AM)Bromf Wrote: [ -> ]I tried adding this to Snakeoil using the pre-built Binary for Ubuntu (Reasoning that as the underlying O/S is Ubuntu it might have the best chance of success.. Smile )
Install went fine but when calling CamillaDSP it fails and crashes MyMPD.   Both use websocket to connect so this appears to be a conflict as the MyMPD error was 'websocket disconnected' when I started CamillaDSP.
I have yet to investigate further...my Linux skills being frugal too Big Grin
On the plus side the install seems to not have produced any detriment to Snakeoil.
Hopefully I can power my way with the GUI and get that out. Then I can probably work on the kernel and this at the same time. This DSP and the way it integrates with ALSA Is certainly interesting. Given the right situation, it will certainly be interesting to see somebody use SnakeoilOS as an active crossover to a 4-way setup. Just the thought of designing a UI just for that makes me drool.. Big Grin
(18-May-2021, 09:06 AM)Bromf Wrote: [ -> ]I tried adding this to Snakeoil using the pre-built Binary for Ubuntu (Reasoning that as the underlying O/S is Ubuntu it might have the best chance of success.. Smile )
Install went fine but when calling CamillaDSP it fails and crashes MyMPD.   Both use websocket to connect so this appears to be a conflict as the MyMPD error was 'websocket disconnected' when I started CamillaDSP.
I managed to finally get something going. Yes, am using the pre-built Ubuntu binary. I started the service manually, without websockets. Am playing to Loopback device in SnakeOil using mpd 0.22.3.  Also works with LMS, upmpdcli and Tidal.  Thumbs Up

[Image: Initial-camilladsp.jpg]

Using it for convolution room correction, currently running with only 16/44.1 files. Now looking to extend it to cover different sample rates.
https://github.com/scripple/alsa_cdsp
Ooooh Nice!   Cool
I will try again and if not working will beg your config ... Big Grin
(19-May-2021, 02:09 PM)Bromf Wrote: [ -> ]Ooooh Nice!   Cool
I will try again and if not working will beg your config ... Big Grin

Check every file, easy to make a mistake or a typo. I spent a few days chasing why it was not working.  Also, remember to use Sudo on every command...
CamiilaDSP works by intercepting the audio signal played to a "Loopback" device, applying DSP and then sending to an Alsa hardware port e.g. hw:1,0.

[Image: Initial-camilladsp.jpg]

The CamiilaDSP documentation is excellent and extensive but it does take a while to go through. Not sure how many people want to install CamillaDSP but here are some tips.
  1. Download the pre-built Linux versions, either amd64 or armv7 (for pi)
  2. Use WinSCP to transfer files to the SnakeOil home folder and use its editor to modify files; the home folder is a useful location to store all the files
  3. Use either a monitor attached to SnakeOil machine or PuTTY to execute commands; remember to use sudo
  4. The steps to configure are largely correct. Follow the commands in each step, using the information in the following steps.
  5. Pre-built Linux version needs a PulseAudio library (sudo apt-get install -y libpulse0)
  6. Load loopback driver using aloop.conf
  7. Edit asound.conf format and sampling rate; if possible, use playback device values
  8. Use this simple config.yaml as a start
    Code:
    devices:
      samplerate: 44100
      chunksize: 1024
      enable_rate_adjust: true
      capture_samplerate: 44100
      capture:
        type: Alsa
        channels: 2
        device: "hw:Loopback,1"
        format: S16LE
      playback:
        type: Alsa
        channels: 2
        device: "hw:Control,0"
        format: S16LE
  9. If you do not know the details of devices, use this.  Remember to use sudo with aplay.
  10. Check config file formatting by running command: camilladsp -c config.yaml
  11. Run CamillaDSP without the "-c" and play music to the first "Loopback" device in SnakeOil.  It may take time to get a working config.yaml (easy to make typo errors!). But if music plays through first "Loopback" device, you have CamillaDSP running. You can then add filters etc.
  12. To setup a service use this camilladsp.service file.  Please remember to change "/path/to" in file.
    Code:
    [Unit]
    Description=CamillaDSP Daemon
    After=syslog.target
    StartLimitIntervalSec=10
    StartLimitBurst=10

    [Service]
    Type=simple
    ExecStart=/usr/local/bin/camilladsp /path/to/config.yaml
    Restart=always
    RestartSec=1
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=camilladsp
    User=root
    Group=root
    CPUSchedulingPolicy=fifo
    CPUSchedulingPriority=10

    [Install]
    WantedBy=multi-user.target
Please note that this install works with 20.04/1.2.0.  It does not work with 16.04/1.1.x because the kernel does not include Snd-aloop module; the kernel needs to be rebuilt with that module.
@Bromf, did you manage to install and run CamillaDsp?
Pages: 1 2 3