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

It turns out the whole time-reversal-issue can be avoided by measuring time with a different function. Nice easy fix, but of course it means there is no space for a cool error message any more..



Websocket-client is required for the gui (and pycamilladsp).

The missing files in build is because I messed up the 0.4.0-release of the backend, sorry about that. I'll try again.
 
New versions of everything!

New CamillaDSP here: Release v0.4.0 beta 3 * HEnquist/camilladsp * GitHub

This should fix the problem where it can panic if the system time changes.


New gui backend here: Release v0.4.1 * HEnquist/camillagui-backend * GitHub

The major change is that it builds properly again :) It also includes an early version of a system to upload new coefficient files via the gui, and then select them in the filter config (button marked "...").


Last point, how to update Jespers scripts to work with v0.4 and above.
It just needs a small change in all the "exec_NNNNN.py" scripts, like this one: SuperPlayer/exec_44100.py at master * Lykkedk/SuperPlayer * GitHub


Modify line 7 there to this (note that both " and ' are used, this is important):
Code:
ws.send('{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}')
 
New versions of everything!

New CamillaDSP here: Release v0.4.0 beta 3 * HEnquist/camilladsp * GitHub

This should fix the problem where it can panic if the system time changes.


New gui backend here: Release v0.4.1 * HEnquist/camillagui-backend * GitHub

The major change is that it builds properly again :) It also includes an early version of a system to upload new coefficient files via the gui, and then select them in the filter config (button marked "...").


Last point, how to update Jespers scripts to work with v0.4 and above.
It just needs a small change in all the "exec_NNNNN.py" scripts, like this one: SuperPlayer/exec_44100.py at master * Lykkedk/SuperPlayer * GitHub


Modify line 7 there to this (note that both " and ' are used, this is important):
Code:
ws.send('{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}')

Thanks! I got the new GUI going and can manually upload and apply config files. Jespers auto sample rate is not working though. Should there be a colon or a space after SetConfigName in line 7?
 
GUI build scrips? :)

//
Coming, but free time isn't unlimited...


I really like your rust code, the effective way you use its Options etc. Reading like a tale. E.g. Split common timer and counter functions to own file * HEnquist/camilladsp@42d8b8f * GitHub is a pleasure to read. Or this implicit unwrap Split common timer and counter functions to own file * HEnquist/camilladsp@42d8b8f * GitHub where the averager should have some values and the unwrap should not panic (IIUC it correctly :) ). Makes a great learning material for me, thanks.
Thanks! I'm making an effort to write clean understandable code. It's mostly for my own benefit, since it makes it so much easier to maintain. But really nice that others also appreciate it :)
I got a lot of help and good ideas from this book: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882



Thanks! I got the new GUI going and can manually upload and apply config files. Jespers auto sample rate is not working though. Should there be a colon or a space after SetConfigName in line 7?
Yes, where on earth did that go?? Seems like the CODE blocks here can't be trusted.. Let's try again:
Code:
'{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}'
And let's try QUOTE too:
'{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}'
I am getting from Camilladsp :

2020-09-30T06:36:57Z WARN camillalib::socketserver] Lost connection: IO error: Connection reset by peer (os error 104)
When does this happen?
 
Coming, but free time isn't unlimited...



Thanks! I'm making an effort to write clean understandable code. It's mostly for my own benefit, since it makes it so much easier to maintain. But really nice that others also appreciate it :)
I got a lot of help and good ideas from this book: Clean Code: A Handbook of Agile Software Craftsmanship: Robert C. Martin: 9780132350884: Amazon.com: Books




Yes, where on earth did that go?? Seems like the CODE blocks here can't be trusted.. Let's try again:
Code:
'{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}'
And let's try QUOTE too:

When does this happen?

Ok thanks I tried the quoted text as a replacement but still no go. This is the sequence of commands I am using for testing :

root@DietPi:/home/tc# sudo /home/tc/DSP_Engine/camilladsp /home/tc/DSP_Engine/filters/null_44100.yml -p 3011
Buffer frames 8192
[2020-09-30T07:22:36Z INFO camillalib::alsadevice] Capture device supports rate adjust
[2020-09-30T07:22:36Z INFO camillalib::alsadevice] Starting playback from Prepared state


Then in a duplicate Putty login :

root@DietPi:/home/tc/DSP_Engine/filters# python3 exec_96000.py

yields this in the main putty session :

root@DietPi:/home/tc# sudo /home/tc/DSP_Engine/camilladsp /home/tc/DSP_Engine/filters/null_44100.yml -p 3011
Buffer frames 8192
[2020-09-30T07:22:48Z INFO camillalib::alsadevice] Capture device supports rate adjust
[2020-09-30T07:22:48Z INFO camillalib::alsadevice] Starting playback from Prepared state
[2020-09-30T07:25:55Z WARN camillalib::socketserver] Lost connection: IO error: Connection reset by peer (os error 104)


BTW does reload need to be changed to Reload? This is my exec_96000.py :

from subprocess import *
import time

from websocket import create_connection
ws = create_connection("ws://127.0.0.1:3011")

ws.send('{"SetConfigName": "/home/tc/DSP_Engine/filters/null_96000.yml"}')
ws.send("reload")
 
Last edited:
Dear All, I would like to start learning abuot room correction, in fact I would like to buy the mic miniDSP UMIK-1 but before to buy it, I would like to be sure I can apply the room correction file found with REW.



I am using a RPI 4 (2 GB of RAM) with picoreplayer. I would like to use CamillaDSP to apply room correction in real time.



Can I use CamillaDSP with picoreplayer?


I do not how to use linux, could you give me some instruction in order to proceed with the installation?


Thank you so much in advance.
 
Dear All, I would like to start learning abuot room correction, in fact I would like to buy the mic miniDSP UMIK-1 but before to buy it, I would like to be sure I can apply the room correction file found with REW.



I am using a RPI 4 (2 GB of RAM) with picoreplayer. I would like to use CamillaDSP to apply room correction in real time.



Can I use CamillaDSP with picoreplayer?


I do not how to use linux, could you give me some instruction in order to proceed with the installation?


Thank you so much in advance.
This is the same setup that Jesper (lykkedk) is using. He made some modifications to squeezelite and scripts for changing sample rate. There is a very nice readme here for setting it all up: GitHub - Lykkedk/SuperPlayer: Hacking software & scripts to play music


The scripts for changing the sample rate have to be slightly modified to work with the latest version of CamillaDSP, see posts 882, 887 and 890!
 
Hi guy's here!

I missed you all :grouphug:...
Well i was away for nearly two months filling my sparetime building a new shed for our garden; turned out pretty well, but took too much time...

I will try to catch up again... and try to make the new version CamillaDSP work with my SuperPlayer.

OFFTOPIC below :)
Btw. : I was writing with the nice guy Alan, who wrote the DRC designer program, and he was kindly creating a version which does not delete the PCM files.
The .PCM files can be renamed to .bin and used directly in CamillaDSP convolver.
The link is here:: http://www.alanjordan.org/DRCDesigner/DRCDesigner-setup-Jesper.exe


Jesper.
 

Attachments

  • Shed_cut.png
    Shed_cut.png
    717.3 KB · Views: 160
Henrik.

I installed the version::
Release v0.4.0 beta 3 * HEnquist/camilladsp * GitHub

I can get the .yml config's to change by modifying the syntax:
Code:
from subprocess import *
import time

from websocket import create_connection
ws = create_connection("ws://127.0.0.1:3011")

ws.send('{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}')
ws.send('"Reload"')

It's working, but wonder if the "debug -v" messages looks right; example here i change samplerate from 44100 to 192000:
2020-10-01T18:06:25Z DEBUG camilladsp] Playback thread ready to start
[2020-10-01T18:06:25Z DEBUG camillalib::alsadevice] Starting captureloop
[2020-10-01T18:06:25Z DEBUG camillalib::alsadevice] Starting playback loop
[2020-10-01T18:06:25Z INFO camillalib::alsadevice] Capture device supports rate adjust
[2020-10-01T18:06:25Z INFO camillalib::alsadevice] Starting playback from Prepared state
[2020-10-01T18:06:25Z DEBUG tungstenite::handshake::server] Server handshake done.
[2020-10-01T18:06:25Z DEBUG camillalib::socketserver] parsed command: Ok(SetConfigName("/home/tc/DSP_Engine/filters/null_44100.yml"))
[2020-10-01T18:06:25Z DEBUG camillalib::socketserver] parsed command: Ok(Reload)
[2020-10-01T18:06:25Z WARN camillalib::socketserver] Lost connection: IO error: Connection reset by peer (os error 104)
[2020-10-01T18:06:25Z DEBUG camilladsp] Reloading configuration...
[2020-10-01T18:06:25Z DEBUG camilladsp] Reload using config file
[2020-10-01T18:06:25Z DEBUG camilladsp] No changes in config.
[2020-10-01T18:13:35Z DEBUG tungstenite::handshake::server] Server handshake done.
[2020-10-01T18:13:35Z DEBUG camillalib::socketserver] parsed command: Ok(SetConfigName("/home/tc/DSP_Engine/filters/null_192000.yml"))
[2020-10-01T18:13:35Z DEBUG camillalib::socketserver] parsed command: Ok(Reload)
[2020-10-01T18:13:35Z DEBUG camilladsp] Reloading configuration...
[2020-10-01T18:13:35Z DEBUG camilladsp] Reload using config file
[2020-10-01T18:13:35Z DEBUG camilladsp] Devices changed, restart required.
[2020-10-01T18:13:35Z WARN camillalib::socketserver] Lost connection: IO error: Connection reset by peer (os error 104)
[2020-10-01T18:13:35Z DEBUG camilladsp] Restarting with new config
[2020-10-01T18:13:35Z DEBUG camilladsp] Wait for config
[2020-10-01T18:13:35Z DEBUG camilladsp] Config ready

Jesper.
 
Henrik.

I installed the version::
Release v0.4.0 beta 3 * HEnquist/camilladsp * GitHub

I can get the .yml config's to change by modifying the syntax:
Code:
from subprocess import *
import time

from websocket import create_connection
ws = create_connection("ws://127.0.0.1:3011")

ws.send('{"SetConfigName": "/home/tc/DSP_Engine/filters/null_44100.yml"}')
ws.send('"Reload"')

It's working, but wonder if the "debug -v" messages looks right; example here i change samplerate from 44100 to 192000:


Jesper.
I think what happens is that you send the Reload command, and then exit the Python program right after. This closes the connection without shutting it down it nicely. Also the websocket server tries to send a reply to both commands. The error probably comes after it tries to reply on a closed connection.
You can add a ws.recv() after each command to get the replies. You can just ignore the replies, or perhaps print them. And add ws.close() at the end to close the connection nicely.
 
Cool... Yes my shed is an secret entrance ofcause... busted :mad:

Well.

I was looking at the nice gui, but i'am in doubt what i need to have running on the Picoreplayer/Tinycore linux dist.

I have this running on the Picoreplayer now:
python3.6
websocket-client
CamillaDSP
Custom-squeezelite



I need to have as little as possible running on the Picoreplayer, so what is the minimum we need to have to connect to CamillaDSP from a laptop or like?
I will then start to create Picoreplayer/TinyCoreLinux .tcz extensions for thoose needed :)

Jesper.
 
I have this running on the Picoreplayer now:
python3.6
websocket-client
CamillaDSP
Custom-squeezelite



I need to have as little as possible running on the Picoreplayer, so what is the minimum we need to have to connect to CamillaDSP from a laptop or like?
Right now, you would need all of these python packages:
- aiohttp
- pycamilladsp
- pycamilladsp-plot
- numpy
- matplotlib


Both numpy and matplotlib are quite big, maybe not something you want on a tiny system. They are only used to plot filters and pipelines. It would be possible to make these features optional, and let the backend enable them if the libraries are available. Then you would only need to add pycamilladsp and aiohttp.