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

Some more progress on the GUI :)
View attachment 1081289
The level meter now goes down to -108 dB.
And I split the too complicated "Apply to DSP button" into three separate buttons with one function each. There is also separate controls for saving and applying automatically, as well as indicators for when there are changes that have not been saved or applied to the DSP.
I'll clean up a little, then release a new preview.
I'll update the macOS setup script also so TNT can run it and give feedback :)
"The level meter now goes down to -108 dB." - that was a bit disturbing the first time I ran the new gui as there was suddenly some input when connected and nothing playing,
Right now the scale starts at -50dB, and it's linear in dB. I would like to change that to get a larger range. Sometimes it's useful to see if there is some very low level noise, so would like to expand the scale range up to 100 dB or so. I'm thinking something similar to your sketch, where it gets finer towards the right. Gridlines at 0, -3, -6, -12, -24, -48 and -96? I'll try that to see how it looks. But this is maybe something that should wait until the next version. Have to stop somewhere if it's ever going to get ready :)
The "very low level noise" explains it as I couldn't hear anything from speakers, the level was below -96. A useful enhancement.
 
20-30 ms depending on what chunk size you are using, whether resampling is used and assuming no FIR filters. This should be fine for most A/V applications, I use CamillaDSP with AppleTVs and do not have any perceptible latency issues.

Michael

Hey Michael (or anyone else who’s on top of this stuff),

I’m just looking into this again, when you suggest I can achieve low latency as long as I don’t use any FIR filters … is there another way to apply the rew eq curve?

Please forgive my ignorance here. Currently I use a Yamaha receiver as my speaker system, with its built-in automated room EQ. So I’m admittedly very novice.
 
Hey Michael (or anyone else who’s on top of this stuff),

I’m just looking into this again, when you suggest I can achieve low latency as long as I don’t use any FIR filters … is there another way to apply the rew eq curve?

Please forgive my ignorance here. Currently I use a Yamaha receiver as my speaker system, with its built-in automated room EQ. So I’m admittedly very novice.
You can use multiple IIR filters instead of one FIR filter, the IIR filter being a parametric EQ or shelving filter.

I had thought that with the Partitioned Convolution that Henrik implemented that latency was actually pretty low for FIR. I haven't or don't recall seeing actual numbers on that, however. Maybe someone can chime in with some practical FIR filter examples and what sort of latency they generate?
 
You can use multiple IIR filters instead of one FIR filter, the IIR filter being a parametric EQ or shelving filter.

I had thought that with the Partitioned Convolution that Henrik implemented that latency was actually pretty low for FIR. I haven't or don't recall seeing actual numbers on that, however. Maybe someone can chime in with some practical FIR filter examples and what sort of latency they generate?
The extra latency for fir is just the delay of the filter itself. If the filter has the main impulse close to the beginning, there isn't really any difference compared to iir. But if the main impulse is centered (as is often the case) and the filter is long, then if course the delay can get pretty large.
 
The extra latency for fir is just the delay of the filter itself. If the filter has the main impulse close to the beginning, there isn't really any difference compared to iir. But if the main impulse is centered (as is often the case) and the filter is long, then if course the delay can get pretty large.

Ah, you are totally correct there. I completely forgot about the delay inherent to the FIR filter kernel. That can definitely result in a large number of samples worth of delay, e.g. as much as half the filter length times the sample period.
 
Henrik, the attached picture explains it a bit better, with all the biquads the pipeline is reduced to unreadable, but if the biquads were grouped it would be readable.

"The pipeline plot could optionally "group" biquads with the same name less the _nn suffix, reducing a potential 17 boxes to 1 box for the plot."

I implemented a way to draw filter steps as single boxes, instead of drawing each included filter separately. This is how it looks now, with this dummy pipeline:
pipeline_def.PNG


Expanded (same as before):
pipeline_exp.PNG


And the new collapsed view:
pipeline_coll.PNG
 
  • Like
Reactions: 1 users

TNT

Member
Joined 2003
Paid Member
That could be handy. I suppose I can name the boxes.

  • Could sorting on date and name be added for Files?
  • I still have the urge to reset the clip counter now and then...
  • I get switched colors viewing filters - black traces when legend says withe and vv. when saved to file..
  • Still don't fancy that a just named new filter jumps away somewhere in a perhaps long list of filters...

I found that working with configurations was now much easier than before - thanks for the improvements Henrik!

//
 

Attachments

  • bl.jpg
    bl.jpg
    94.2 KB · Views: 76
  • whi.jpg
    whi.jpg
    121.2 KB · Views: 68
  • Could sorting on date and name be added for Files?
Sure, the current file list is very simple. I'll change it to a proper table with sorting etc, but I'll save that for the next version.

  • I still have the urge to reset the clip counter now and then...
Not forgotten! Also for next version. Camilladsp v1.1 will have some changes that makes this much easier to implement.
  • I get switched colors viewing filters - black traces when legend says withe and vv. when saved to file..
Strange, the group delay should be orange. Probably some issue with Safari, I'll dig up my mac and make sure it works properly there too.
  • Still don't fancy that a just named new filter jumps away somewhere in a perhaps long list of filters...
It's not perfect no, but fixing that gets quite complicated. At the moment I have a single list of filter names, that is generated (and sorted) automatically from the config. To fix this, I would need to keep a separate list for the ordering, and make sure it's kept updated with any new and changed names. I think there would be many new and interesting species of bugs along that path..
I found that working with configurations was now much easier than before - thanks for the improvements Henrik!
:)
 
  • Like
Reactions: 1 user
I just tried the filter plot on my mac, and it looks as it's supposed to with an orange group delay. I'm on Catalina, with Safari 15.6.1.
BTW if someone is wondering about the white background in the saved plot above, it's because the image is saved with transparent background. Some viewers show transparent images on a dark background, and some on white.
 
I was just wondering, a sound chip usually has two-channel out (2 wires + ground). How do you connect all the channels? How do you connect the drivers in a speaker cabinet to separate channels if there are only two terminals on the outside? Do you need special speakers?

Believe it or not I'm an engineer, but this stuff is way past my pay grade! I'm vaguely aware of signal processing in which specially designed speaker systems can have more than 2 channels, because there is more information in the digital sampling than just the sound part. But I totally don't know how it works.

I do have to make a compliment on something typically much neglected with github projects, your documentation is quite complete, rational and understandable by practically anyone.
 
I was just wondering, a sound chip usually has two-channel out (2 wires + ground). How do you connect all the channels? How do you connect the drivers in a speaker cabinet to separate channels if there are only two terminals on the outside? Do you need special speakers?

Believe it or not I'm an engineer, but this stuff is way past my pay grade! I'm vaguely aware of signal processing in which specially designed speaker systems can have more than 2 channels, because there is more information in the digital sampling than just the sound part. But I totally don't know how it works.

I do have to make a compliment on something typically much neglected with github projects, your documentation is quite complete, rational and understandable by practically anyone.
Hey Alligator,

Yep, 'special' speakers. Some speakers allow you to connect each driver separately, like this for example:
image.jpeg
 
@alligatorblues
Normal speakers have passive crossovers (highpass and lowpass for tweeter and woofer), and a single terminal to hook them up to an amplifier. Something like this:
passive.PNG
The source can be anything, but let's say it's a computer running some music player app.

What Neigh showed is just a variation of the first one. Still a speaker with passive crossovers, but with terminals for bi-wiring. Like this:
passive_biamp.PNG
There is still a passive crossover inside that you can't bypass (without opening and modifying).

Then there are speakers with active crossovers. They contain an analog or digital crossover, followed by one amplifier per driver. Like this:
active.PNG
Each speaker still needs just a single signal as input.

And finally we have a system where the crossover is done in the source (computer):
active_dsp.PNG
It's the same as the previous one, I just moved the frames. Now the "source" is the music player app, and the highpass and lowpass crossover filters are done in software in the computer. This creates two signals per speaker, so if we want stereo, we need a soundcard/dac with at least four output channels.
The speaker has no filters at all, and is most likely DIY. It could also be a modified passive speaker, and then the models with bi-wiring terminals are quite handy.
 
  • Like
Reactions: 1 user