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

Hi!

The whole list don't fit but you get the hang of it...

Wonder what corresponds to channel in:

pipeline:
- type: Filter
channel: 0
names:
- lowpass

"ADAT 1-8 ADAT 1" ?

This is why I asked for your program to list the channels so that one could get a view of how the system sees them...

//
"channel" in the pipeline is an index from 0 to number of channels - 1. Cpal doesn't provide the names of the channels unfortunately.
I'm guessing all your channels are just numbered 0-33, where 0-7are on adat 1, 8-15 on the next and so on. But this will probably need some experimentation to get right.
 

TNT

Member
Joined 2003
Paid Member
Trying things :) - yet no success... :)

I load:

---
devices:
samplerate: 44100
chunksize: 4096
target_level: 2048
adjust_period: 10
enable_rate_adjust: true
resampler_type: BalancedAsync
enable_resampling: true
capture:
type: CoreAudio
channels: 2
device: "QUAD-CAPTURE"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Built-in Output"
format: FLOAT32LE

filters:
lowpass:
type: Biquad
parameters:
type: Lowpass
freq: 500
q: 0.5

pipeline:
- type: Filter
channel: 0
names:
- lowpass
- type: Filter
channel: 1
names:
- lowpass

If I play a song with a sound app (VOX) configured to play to QUAD-CAPTURE, I hoped to get the sound out on Built-in Output (headphones actually) without any treble. Should this work?

//
 

TNT

Member
Joined 2003
Paid Member
Yes - success - with Black Hole as capture I get a dark sound of whats playing from Vox towards the Black Hole sound device routed to my headphones on the internal output interface.

:-D

Now the fun starts... :-DD

Thanks Henrik!


//
 
Last edited:
Yes - success - with Black Hole as capture I get a dark sound of whats playing from Vox towards the Black Hole sound device routed to my headphones on the internal output interface.

:-D

Now the fun starts... :-DD

Thanks Henrik!


//
Excellent! I had some trouble with Blackhole behaving odd sometimes. Don't know if it's caused by Blackhole, or by Cpal (or maybe the combination of the two) but if you also have issues with it, try Soundflower instead. That one has been perfectly reliable for me.
The problems were that often I got half a second of loud garbage when I started recording from it. And once in a while I instead got nothing at all.
 

TNT

Member
Joined 2003
Paid Member
If I wanted to do a 2to4 mixer split and have the same processing on all 4 legs, can I add filter to the capture side or do I need to do it on all 4 individually? Thinking processor load here!?

I think the Soundflower worked much better - I think you can remove the references to BH.

In my file below, I suppose the filter ends up on ch 0 and 1 on Digiface USB (24007543) playback?

---
devices:
samplerate: 44100
chunksize: 16384
capture:
type: CoreAudio
channels: 2
device: "Soundflower (64ch)"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Digiface USB (24007543)"
format: FLOAT32LE

mixers:
to4chan:
channels:
in: 2
out: 4
mapping:
- dest: 8
sources:
- channel: 0
gain: 0
inverted: false
- dest: 9
sources:
- channel: 1
gain: 0
inverted: false
- dest: 16
sources:
- channel: 0
gain: 0
inverted: false
- dest: 17
sources:
- channel: 1
gain: 0
inverted: false

filters:
lowpass_fir:
type: Conv
parameters:
type: File
filename: /Users/MBPr/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt
format: TEXT

pipeline:
- type: Filter
channel: 0
names:
- lowpass_fir
- type: Filter
channel: 1
names:
- lowpass_fir
 

TNT

Member
Joined 2003
Paid Member
[2020-09-12T22:23:20Z ERROR camilladsp] Invalid config file!
while parsing a block mapping, did not find expected key at line 60 column 1
[2020-09-12T22:23:20Z DEBUG camilladsp] Exiting due to config error

for

---
devices:
samplerate: 44100
chunksize: 16384
capture:
type: CoreAudio
channels: 2
device: "Soundflower (64ch)"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Digiface USB (24007543)"
format: FLOAT32LE

mixers:
to4chan:
channels:
in: 2
out: 4
mapping:
- dest: 8
sources:
- channel: 0
gain: 0
inverted: false
- dest: 9
sources:
- channel: 1
gain: 0
inverted: false
- dest: 16
sources:
- channel: 0
gain: 0
inverted: false
- dest: 17
sources:
- channel: 1
gain: 0
inverted: false

filters:
lowpass_fir:
type: Conv
parameters:
type: File
filename: /Users/MBPr/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt
format: TEXT

pipeline:
- type: Filter
channel: 8
names:
- lowpass_fir
- type: Filter
channel: 9
names:
- lowpass_fir
- type: Filter <----- line 60
channel: 16
names:
- lowpass_fir
- type: Filter
channel: 17
names:
- lowpass_fir

?

//
 
If I wanted to do a 2to4 mixer split and have the same processing on all 4 legs, can I add filter to the capture side or do I need to do it on all 4 individually? Thinking processor load here!?

I think the Soundflower worked much better - I think you can remove the references to BH.

In my file below, I suppose the filter ends up on ch 0 and 1 on Digiface USB (24007543) playback?

---
devices:
samplerate: 44100
chunksize: 16384
capture:
type: CoreAudio
channels: 2
device: "Soundflower (64ch)"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Digiface USB (24007543)"
format: FLOAT32LE

mixers:
to4chan:
channels:
in: 2
out: 4
mapping:
- dest: 8
sources:
- channel: 0
gain: 0
inverted: false
- dest: 9
sources:
- channel: 1
gain: 0
inverted: false
- dest: 16
sources:
- channel: 0
gain: 0
inverted: false
- dest: 17
sources:
- channel: 1
gain: 0
inverted: false

filters:
lowpass_fir:
type: Conv
parameters:
type: File
filename: /Users/MBPr/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt
format: TEXT

pipeline:
- type: Filter
channel: 0
names:
- lowpass_fir
- type: Filter
channel: 1
names:
- lowpass_fir
You can do some filtering before the mixer, and some after. Just add Filter and Mixer steps in the order you want them to be applied.
One thing, the dest: if a mixer must be a number from 0 to channels/out-1. So if you want to send audio to channel 17, make sure the mixer has 18 output channels! Any unused channel will be fed silence, you dont need to assign anything to them. The playback device then also need to have 18 channels.
 
[2020-09-12T22:23:20Z ERROR camilladsp] Invalid config file!
while parsing a block mapping, did not find expected key at line 60 column 1
[2020-09-12T22:23:20Z DEBUG camilladsp] Exiting due to config error

for

---
devices:
samplerate: 44100
chunksize: 16384
capture:
type: CoreAudio
channels: 2
device: "Soundflower (64ch)"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Digiface USB (24007543)"
format: FLOAT32LE

mixers:
to4chan:
channels:
in: 2
out: 4
mapping:
- dest: 8
sources:
- channel: 0
gain: 0
inverted: false
- dest: 9
sources:
- channel: 1
gain: 0
inverted: false
- dest: 16
sources:
- channel: 0
gain: 0
inverted: false
- dest: 17
sources:
- channel: 1
gain: 0
inverted: false

filters:
lowpass_fir:
type: Conv
parameters:
type: File
filename: /Users/MBPr/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt
format: TEXT

pipeline:
- type: Filter
channel: 8
names:
- lowpass_fir
- type: Filter
channel: 9
names:
- lowpass_fir
- type: Filter <----- line 60
channel: 16
names:
- lowpass_fir
- type: Filter
channel: 17
names:
- lowpass_fir

?

//
This is probably an indentation problem! Yaml is sensitive to correct indentation, it uses it to separate levels. Always use spaces, never tabs. The best is to use an editor with syntax highlighting (vim, Atom, VSCode, notepad++ etc).
If you paste the config as a code block instead, it should preserve the indentation. Now it all got removed so I can only guess.
 

TNT

Member
Joined 2003
Paid Member
Yes, it might be an indentation - I took 2 of these pipeline statements and copy / paste them to get another pair (3 in all) - something maybe happened there...

But I have played the filter (FIR) by pointing them to the inlet of the RME. Sounds really open and nice.

//
 

TNT

Member
Joined 2003
Paid Member
I got hold of a used Mac Mini Late 2012 for 215€ with i7 2,3GHz 1TB SSD and 4 GB RAM. Reformatted disk and loaded Catalina (10.15). Could not play via Camilla with what I think is exactly the same configuration as I used on my laptop with High Sierra.

Any ideas?

//
 
I got hold of a used Mac Mini Late 2012 for 215€ with i7 2,3GHz 1TB SSD and 4 GB RAM. Reformatted disk and loaded Catalina (10.15). Could not play via Camilla with what I think is exactly the same configuration as I used on my laptop with High Sierra.

Any ideas?

//
Hmm I run Catalina on mine (macbook pro, also late 2012 with an i7) without issues. What error do you get? Run with -vv and paste all the output here.
 

TNT

Member
Joined 2003
Paid Member
There are no errors. Just that when I select the Soundflower interface in Tidal, no sound is coming out. When the RME device is selected, it plays fine. Same config file but with changed user name...

audio1@Audio1 bin % ./camilladsp -vv /Users/audio1/Documents/Ca+Di/Camilla/configs/eggPhase2.txt
[2020-09-13T20:24:22Z DEBUG camilladsp] Read config file Some("/Users/audio1/Documents/Ca+Di/Camilla/configs/eggPhase2.txt")
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Read file: /Users/audio1/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt, number of coeffs: 16384
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Read file: /Users/audio1/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt, number of coeffs: 16384
[2020-09-13T20:24:22Z DEBUG camilladsp] Config is valid
[2020-09-13T20:24:22Z DEBUG camilladsp] Wait for config
[2020-09-13T20:24:22Z DEBUG camilladsp] Config ready
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Build new pipeline
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Build from config
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Read file: /Users/audio1/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt, number of coeffs: 16384
[2020-09-13T20:24:22Z DEBUG camillalib::fftconv] Conv lowpass_fir is using 1 segments
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Build from config
[2020-09-13T20:24:22Z DEBUG camillalib::filters] Read file: /Users/audio1/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt, number of coeffs: 16384
[2020-09-13T20:24:22Z DEBUG camillalib::fftconv] Conv lowpass_fir is using 1 segments
[2020-09-13T20:24:22Z DEBUG camillalib::processing] build filters, waiting to start processing loop
[2020-09-13T20:24:22Z DEBUG camillalib::cpaldevice] Opened CPAL capture device Soundflower (64ch)
[2020-09-13T20:24:22Z TRACE camillalib::cpaldevice] Build f32 input stream
[2020-09-13T20:24:22Z DEBUG camilladsp] Capture thread ready to start
[2020-09-13T20:24:22Z DEBUG camillalib::cpaldevice] Opened CPAL playback device Digiface USB (24007543)
[2020-09-13T20:24:22Z TRACE camillalib::cpaldevice] Build f32 output stream
[2020-09-13T20:24:22Z DEBUG camilladsp] Playback thread ready to start
[2020-09-13T20:24:22Z TRACE camillalib::cpaldevice] f32 input stream ready
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] f32 output stream ready
[2020-09-13T20:24:23Z DEBUG camillalib::cpaldevice] Starting playback loop
[2020-09-13T20:24:23Z DEBUG camillalib::cpaldevice] Starting capture loop
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Capture device provides 1024 samples
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Write data to device
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Read message to fill capture buffer
[2020-09-13T20:24:23Z TRACE camillalib::cpaldevice] Playback device requests 1024 samples

... and so forth...

---
devices:
samplerate: 44100
chunksize: 16384
capture:
type: CoreAudio
channels: 2
device: "Soundflower (64ch)"
format: FLOAT32LE
playback:
type: CoreAudio
channels: 2
device: "Digiface USB (24007543)"
format: FLOAT32LE



filters:
lowpass_fir:
type: Conv
parameters:
type: File
filename: /Users/audio1/Documents/Ca+Di/Camilla/FIRs/eggPhase.txt
format: TEXT

pipeline:
- type: Filter
channel: 0
names:
- lowpass_fir
- type: Filter
channel: 1
names:
- lowpass_fir

//
 
Ok, then there is something fishy going on. The first question is whether the problem is on the capture or playback side. Does it work with the built in output?
Another thing to try would be to run with a file output device, and then check if the file contains anything except zeroes.
If you do that and run for a second or so, you can maybe attach the file here and I'll take a look.
 

TNT

Member
Joined 2003
Paid Member
Is that the stdout thingy? :)

Where does it end up?

I did some test with my Roland interface yesterday before I dared to hook up my power speakers... but the Mini could not muster the USB power to run them both apparently. And I cant find the wallpowerthingy for my powered Belkin USB hub...

I'll try the standard output also - thanks!

//