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

You are sure that you have some output on that toslink "out"? You see the VU meter swing? Did you do any setup of the Digiface?
The only config change I made was to change the optical outputs to SPDIF. Both clock settings work (internal and Toslink #1), so I left it at Internal.

Allow me to clarify a bit. As I'm sure you already know TotalMix can operate in either Full Mode and DAW Mode. When in Full Mode I see the VU meters swing for hardware input ch 1/2 and hardware output ch 1/2. However, nothing is reaching the software playback VU meters, and the audio output I do hear is completely unprocessed since it's basically just TotalMix routing from input to output.

In DAW Mode the TotalMix mixer is bypassed, so it behaves virtually like a regular 8-channel soundcard. In this mode I still see audio on the hardware input, but nothing is reaching the hardware output, so it's evident that CamillaDSP is not sending any audio to the playback device. It might very well be because it's not receiving any samples to process, but I simply cannot figure out what I'm doing wrong.
 
Last edited:
Code:
sundebo@m1 ~ % ./camilladsp -vv config.yml
Jan 26 21:16:51.507 DEBG Read config file Some("config.yml"), module: camilladsp
Jan 26 21:16:51.511 DEBG Config is valid, module: camilladsp
Jan 26 21:16:51.511 DEBG Wait for config, module: camilladsp
Jan 26 21:16:51.511 DEBG Config ready, module: camilladsp
Jan 26 21:16:51.511 DEBG Using channels [true, true], module: camilladsp
Jan 26 21:16:51.511 DEBG Build new pipeline, module: camillalib::filters
Jan 26 21:16:51.511 DEBG build filters, waiting to start processing loop, module: camillalib::processing
Jan 26 21:16:51.534 DEBG Opened CPAL playback device Digiface USB (24011413), module: camillalib::cpaldevice
Jan 26 21:16:51.534 DEBG Opened CPAL capture device Digiface USB (24011413), module: camillalib::cpaldevice
Jan 26 21:16:51.534 DEBG Playback thread ready to start, module: camilladsp
Jan 26 21:16:51.534 DEBG Capture thread ready to start, module: camilladsp
Jan 26 21:16:51.534 DEBG Both capture and playback ready, release barrier, module: camilladsp
Jan 26 21:16:51.534 TRCE Build f32 input stream, module: camillalib::cpaldevice
Jan 26 21:16:51.534 TRCE Build f32 output stream, module: camillalib::cpaldevice
Jan 26 21:16:51.773 TRCE f32 output stream ready, module: camillalib::cpaldevice
Jan 26 21:16:51.776 TRCE f32 input stream ready, module: camillalib::cpaldevice
Jan 26 21:16:51.777 DEBG Starting capture loop, module: camillalib::cpaldevice
Jan 26 21:16:51.777 DEBG Starting playback loop, module: camillalib::cpaldevice
 
I removed some trace level output in the latest version because I thought there was too much. But I should probably put some of it back in.

You could read the RMS of the signal with Python using this script:
pycamilladsp/read_rms.py at master * HEnquist/pycamilladsp * GitHub
It reads the playback level, but you can change line 20 to "print(cdsp.get_capture_signal_rms())" to get capture level instead.
 

TNT

Member
Joined 2003
Paid Member
Henrik - even if one uses a pre build of Camilla, I think it would be a good idea to provide a description for a "standard basic" installation on Windows and Mac that also includes the GUI so that less computer savvy people can enjoy the Camilla. It could serve as a check to secure that one have at least a good foundation for a working install. A "Reference Install" so to say...

//
 
I removed some trace level output in the latest version because I thought there was too much. But I should probably put some of it back in.

You could read the RMS of the signal with Python using this script:
pycamilladsp/read_rms.py at master * HEnquist/pycamilladsp * GitHub
It reads the playback level, but you can change line 20 to "print(cdsp.get_capture_signal_rms())" to get capture level instead.
I finally got read_rms.py working using a combination of brew, pip and lots of swearing. I needed to call the script with python3 instead of python which kept complaining about the yaml module missing...

CamillaDSP is accepting the GetPlaybackSignalRms or GetCaptureSignalRms commands just fine, but regardless of whether I ask for playback or capture, I just get lines containing empty brackets [].
 
Henrik,
I'm working on getting Camilla installed on a windows machine.
Camilladsp is working.
However I'm having a bit of a trouble getting the GUI to work, this is what happens when I'm trying to start it.
I'm stuck...



(base) C:\Users\46702\camilladsp\camillagui>python main.py
{'camilla_host': '0.0.0.0', 'camilla_port': 1234, 'port': 5000, 'config_dir': 'C:\\Users\\46702\\camilladsp\\configs', 'coeff_dir': 'C:\\Users\\46702\\camilladsp\\coeffs'}
No plotting!
======== Running on http://0.0.0.0:5000 ========
(Press CTRL+C to quit)
state
offline
state
offline
state
offline
state
offline
capturesignalrms
Error handling request
Traceback (most recent call last):
File "C:\Users\46702\anaconda3\lib\site-packages\aiohttp\web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "C:\Users\46702\anaconda3\lib\site-packages\aiohttp\web_app.py", line 499, in _handle
resp = await handler(request)
File "C:\Users\46702\camilladsp\camillagui\views.py", line 68, in get_list_param
result = cdsp.get_capture_signal_rms()
File "C:\Users\46702\anaconda3\lib\site-packages\camilladsp\camilladsp.py", line 159, in get_capture_signal_rms
sigrms = self._query("GetCaptureSignalRms")
File "C:\Users\46702\anaconda3\lib\site-packages\camilladsp\camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
state
offline
capturesignalrms
Error handling request
 
Error handling request
Traceback (most recent call last):
File "C:\Users\46702\anaconda3\lib\site-packages\aiohttp\web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "C:\Users\46702\anaconda3\lib\site-packages\aiohttp\web_app.py", line 499, in _handle
resp = await handler(request)
File "C:\Users\46702\camilladsp\camillagui\views.py", line 68, in get_list_param
result = cdsp.get_capture_signal_rms()
File "C:\Users\46702\anaconda3\lib\site-packages\camilladsp\camilladsp.py", line 159, in get_capture_signal_rms
sigrms = self._query("GetCaptureSignalRms")
File "C:\Users\46702\anaconda3\lib\site-packages\camilladsp\camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
state
offline
capturesignalrms
Error handling request
When starting CamillaDSP you need to specify the port for the websocket server, otherwise the GUI won't be able to connect:
CamillaDSP -p 1234 /path/to/config.yml
 
CamillaDSP is accepting the GetPlaybackSignalRms or GetCaptureSignalRms commands just fine, but regardless of whether I ask for playback or capture, I just get lines containing empty brackets [].
It looks as if camilla isn't getting any data from CoreAudio, and just gets stuck waiting. No idea why that would happen, maybe some problem that comes if capture and playback are on the same device. Could you try changing the playback device to the built in output?
 
The "Difference equation" filter, is that a generic IIR biquad filter? E.g. it could also have been named "IIR Biquad" ?

//
Biquad is a name for the special case when both polynomials in the difference equation are quadratic. And it's only IIR if you include the "a" terms above a0. If you leave those out it becomes a FIR filter. So it's very generic! I called it difference equation since that was the only name I found that covers what it is.
For generic biquads, just use a Biquad and set the type to "Free". Then you give it a1, a2, b0, b1 & b2 (and a0 is fixed at 1.0).
 
It looks as if camilla isn't getting any data from CoreAudio, and just gets stuck waiting. No idea why that would happen, maybe some problem that comes if capture and playback are on the same device. Could you try changing the playback device to the built in output?
Sure. I still don't get audio, but at least I see something more, basically around 8 seconds of "Measured sample rate" followed by a barrage of "Pausing processing":

Code:
sundebo@m1 ~ % camilladsp -p 1234 config.yml -vv
Jan 27 13:07:42.107 DEBG Read config file Some("config.yml"), module: camilladsp
Jan 27 13:07:42.107 DEBG Config is valid, module: camilladsp
Jan 27 13:07:42.107 DEBG Start websocket server on 127.0.0.1:1234, module: camillalib::socketserver
Jan 27 13:07:42.107 DEBG Wait for config, module: camilladsp
Jan 27 13:07:42.107 DEBG Config ready, module: camilladsp
Jan 27 13:07:42.107 DEBG Using channels [true, true], module: camilladsp
Jan 27 13:07:42.107 DEBG Build new pipeline, module: camillalib::filters
Jan 27 13:07:42.107 DEBG build filters, waiting to start processing loop, module: camillalib::processing
Jan 27 13:07:42.135 DEBG Opened CPAL playback device Mac mini Speakers, module: camillalib::cpaldevice
Jan 27 13:07:42.135 TRCE Build f32 output stream, module: camillalib::cpaldevice
Jan 27 13:07:42.135 DEBG Playback thread ready to start, module: camilladsp
Jan 27 13:07:42.135 DEBG Opened CPAL capture device Digiface USB (24011413), module: camillalib::cpaldevice
Jan 27 13:07:42.135 TRCE Build f32 input stream, module: camillalib::cpaldevice
Jan 27 13:07:42.135 DEBG Capture thread ready to start, module: camilladsp
Jan 27 13:07:42.135 DEBG Both capture and playback ready, release barrier, module: camilladsp
Jan 27 13:07:42.370 TRCE f32 input stream ready, module: camillalib::cpaldevice
Jan 27 13:07:42.402 TRCE f32 output stream ready, module: camillalib::cpaldevice
Jan 27 13:07:42.403 DEBG Starting playback loop, module: camillalib::cpaldevice
Jan 27 13:07:42.403 DEBG Starting capture loop, module: camillalib::cpaldevice
Jan 27 13:07:43.415 TRCE Measured sample rate is 45500.49810307653 Hz, module: camillalib::cpaldevice
Jan 27 13:07:44.437 TRCE Measured sample rate is 44094.182806134 Hz, module: camillalib::cpaldevice
Jan 27 13:07:45.459 TRCE Measured sample rate is 44097.07061454983 Hz, module: camillalib::cpaldevice
Jan 27 13:07:46.480 TRCE Measured sample rate is 44102.270063336015 Hz, module: camillalib::cpaldevice
Jan 27 13:07:47.502 TRCE Measured sample rate is 44102.05780372028 Hz, module: camillalib::cpaldevice
Jan 27 13:07:48.524 TRCE Measured sample rate is 44095.84783725525 Hz, module: camillalib::cpaldevice
Jan 27 13:07:49.546 TRCE Measured sample rate is 44093.47795797071 Hz, module: camillalib::cpaldevice
Jan 27 13:07:50.567 TRCE Measured sample rate is 44104.65884796275 Hz, module: camillalib::cpaldevice
Jan 27 13:07:51.589 TRCE Measured sample rate is 44104.79195197183 Hz, module: camillalib::cpaldevice
Jan 27 13:07:52.146 DEBG Current buffer level: 565.1306413301663, corrected capture rate: 100.05204081632652%, module: camillalib::audiodevice
Jan 27 13:07:52.146 DEBG Current buffer level 565.1306413301663, set capture rate to 100.05204081632652%, module: camillalib::cpaldevice
Jan 27 13:07:52.146 DEBG SetSpeed message received, module: camilladsp
Jan 27 13:07:52.378 DEBG Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.378 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.401 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.425 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.448 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.471 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.494 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.518 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.541 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.564 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.587 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.610 TRCE Measured sample rate is 44097.8133425494 Hz, module: camillalib::cpaldevice
Jan 27 13:07:52.610 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.634 TRCE Pausing processing, module: camillalib::countertimer
Jan 27 13:07:52.657 TRCE Pausing processing, module: camillalib::countertimer

I want to emphasise, however, that Audacity handles both the original scenario with the Digiface as capture+playback as well as this one with Digiface/built-in speakers perfectly, so we're definitely looking at a software and/or setup issue.

I am a C# developer by trade, so if there's a decent debugger available for Rust, I might be able to find out more, especially if you have any ideas I might pursue. Just don't say gdb. We are not on good terms :D