diyAudio

diyAudio (https://www.diyaudio.com/forums/index.php)
-   PC Based (https://www.diyaudio.com/forums/pc-based/)
-   -   CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc. (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc.html)

Jona66 23rd February 2020 07:51 PM

Using the alsa loopback

HenrikEnquist 23rd February 2020 08:13 PM

I have just updated the master branch. The new version is 0.0.3.

New features:
  • File input/output backend (also supports stdin/stdout)
  • Updated readme to include the Alsa and Pulse packages needed to build.

Bugfixes:
  • It's now possible to have a pipeline without any filters or mixers. (For example, stereo in - stereo out doesn't need a mixer but it wouldn't run if the "mixers" section was empty).

Other changes:
  • Added CI Tests for BiQuad and Convolution filters
  • Automatic testing with Github Actions

theSuede 27th February 2020 02:54 PM

This seems brilliant :)

Could you recommend a compact Linux distro to build and run this on?
I just moved house and am now streaming the music from the main file server to a MacBook Air and listening to it via an older simple sub/sat system, when I used to have one of my work computers (in windows 10) handle x-overs and media ingestion and feed it via an USB soundcard to the power amps of the main system.

As I have a spare low-end NUC just lounging ATM, I though this could be used to feed the music system. I'd like to configure it as a very simple DLNA endpoint - no server or media database - so the video part of the system (also almost 100% streaming based) can share the main sound. I'd output the "x-overed" and room-corrected sound either over HDMI or the old USB soundcared.

Tfive 27th February 2020 04:00 PM

Quote:

Originally Posted by theSuede (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6100400.html#post6100400)
Could you recommend a compact Linux distro to build and run this on?
I just moved house and am now streaming the music from the main file server to a MacBook Air and listening to it via an older simple sub/sat system, when I used to have one of my work computers (in windows 10) handle x-overs and media ingestion and feed it via an USB soundcard to the power amps of the main system.


For a NUC I'd suggest Linux Mint, IMHO the most refined linux distro for x86 based systems there is.

Tfive 27th February 2020 04:06 PM

@HenrikEnquist I'm the author of Pulseaudio crossover rack. Currently I'm using LADSPA plugins to insert them into the pulseaudio chain. This has several drawbacks including
a) left/right channel plugin parameters can not be controlled independently

b) LADSPA plugins cannot accept parameters other than numbers which makes loading FIR filter responses somewhat ugly
c) pulseaudio does not permit to mix/split/combine channels in an arbitrary manner like you woud need for say a 2.1 setup, not to speak of any kind of multichannel setup with say a pair of three way front speakers, 2 subs and a bunch of two way satellites.


Can your software do mixing/spliting/routing for all input channels to all output channels independently? Can you change parameters on the fly or do you have to restart it? Can you route audio output to channels on different pulseaudio sinks to (an example only) route highs to soundcard A and lows to soundcard B?


From all the questions asked you probably already deducted that I'm searching for a more flexible & powerful filtering and routing engine to do the DSP stuff in the background...

HenrikEnquist 27th February 2020 08:25 PM

Quote:

Originally Posted by theSuede (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6100400.html#post6100400)
This seems brilliant :)

Could you recommend a compact Linux distro to build and run this on?
I just moved house and am now streaming the music from the main file server to a MacBook Air and listening to it via an older simple sub/sat system, when I used to have one of my work computers (in windows 10) handle x-overs and media ingestion and feed it via an USB soundcard to the power amps of the main system.

As I have a spare low-end NUC just lounging ATM, I though this could be used to feed the music system. I'd like to configure it as a very simple DLNA endpoint - no server or media database - so the video part of the system (also almost 100% streaming based) can share the main sound. I'd output the "x-overed" and room-corrected sound either over HDMI or the old USB soundcared.

A NUC should work really well for this. I use Fedora for my media computer and that works great. I have not tried Mint so unfortunately I can't compare.

HenrikEnquist 27th February 2020 09:08 PM

Quote:

Originally Posted by Tfive (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6100483.html#post6100483)
@HenrikEnquist I'm the author of Pulseaudio crossover rack. Currently I'm using LADSPA plugins to insert them into the pulseaudio chain. This has several drawbacks including
a) left/right channel plugin parameters can not be controlled independently

b) LADSPA plugins cannot accept parameters other than numbers which makes loading FIR filter responses somewhat ugly
c) pulseaudio does not permit to mix/split/combine channels in an arbitrary manner like you woud need for say a 2.1 setup, not to speak of any kind of multichannel setup with say a pair of three way front speakers, 2 subs and a bunch of two way satellites.


Can your software do mixing/spliting/routing for all input channels to all output channels independently? Can you change parameters on the fly or do you have to restart it? Can you route audio output to channels on different pulseaudio sinks to (an example only) route highs to soundcard A and lows to soundcard B?


From all the questions asked you probably already deducted that I'm searching for a more flexible & powerful filtering and routing engine to do the DSP stuff in the background...

I have also looked at LADSPA plugins and it seemed quite difficult to implement FIR filtering that way. Not impossible, but definitely a challenge. The limitations on passing parameters will definitely lead to some ulgy hacks. That's part of the reason I chose to do something else.

> Can your software do mixing/spliting/routing for all input channels to all output channels independently?
Yes!

> Can you change parameters on the fly or do you have to restart it?
You have to restart. For changing the config on the fly I would still have to rebuild the pipeline, so it would probably take as long as just restarting. But it starts in a fraction of a second, so that may not be a big problem.

> Can you route audio output to channels on different pulseaudio sinks to (an example only) route highs to soundcard A and lows to soundcard B?
No, but you can maybe join the two soundcards with alsa. Read here: Alsa Opensrc Org - Independent ALSA and linux audio support site
Synchronization might be a problem. I would guess that the relative delay between the two can be a little different every time playback starts, and unless they share the clock source they will slowly drift apart while playing. Not so nice for a crossover..


If you have any ideas for improvements or new features, please let me know!

Tfive 28th February 2020 07:42 AM

Quote:

Originally Posted by HenrikEnquist (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6100908.html#post6100908)
No, but you can maybe join the two soundcards with alsa. Read here: Alsa Opensrc Org - Independent ALSA and linux audio support site
Synchronization might be a problem. I would guess that the relative delay between the two can be a little different every time playback starts, and unless they share the clock source they will slowly drift apart while playing. Not so nice for a crossover..

If you have any ideas for improvements or new features, please let me know!


OK, I know the implications of using two soundcards. Personally I wouldn't go that route anyway but users seem to do it already. So I wouldn't want to take away that functionality from them without reason.


Here's an imporvement you might want to consider: add an interface to camilladsp to set parameters of filters in real time (change biquad coeffs, fir responses etc). How (http, tcp, sockets, ...) I couldn't care less, just something to update params for a running process would be superb. If you do this I'm pretty sure that I might give it a try and replace the whole LADPSA insanity in version 2.0...

HenrikEnquist 28th February 2020 09:33 AM

Quote:

Originally Posted by Tfive (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6101328.html#post6101328)
OK, I know the implications of using two soundcards. Personally I wouldn't go that route anyway but users seem to do it already. So I wouldn't want to take away that functionality from them without reason.


Here's an imporvement you might want to consider: add an interface to camilladsp to set parameters of filters in real time (change biquad coeffs, fir responses etc). How (http, tcp, sockets, ...) I couldn't care less, just something to update params for a running process would be superb. If you do this I'm pretty sure that I might give it a try and replace the whole LADPSA insanity in version 2.0...


Adding a tcp socket or such would require a lot of changes but maybe it's not needed... It would be quite easy to let it watch for changes in the config file, and just reload it when needed. If only filters and mixers changed, I can then build the new pipeline with all filters while the processing is still running, and then swap once it's ready. There would only be a small interruption on the order of one buffer length.
What do you think?

Tfive 28th February 2020 09:39 AM

One thing I definitely don't want to loose is instant parameter changing without any interruption of the sound. I have sliders on the filter configuration dialogs which of course can spit out lots of updates per second. Currently I have a memory-mapped-file interface in my LADSPA plugins to achieve seamless, uninterrupted updates of parameters.

Please don't feel bothered by me, just stating my needs here. If it can't be done easily in your design then I won't (and can't) beat you to it ;)


PS: it's just a curious coincidence that I thought about moving the DSP processing to a monolythic process instead of LADSPA plugins since a few weeks. It just offers so much greater flexiblity. So then I stumbled upon your project and it immediately seemed like a good candidate to just plug in there. And FIR filters are on my todo list also, so your software would tick that box "for free" :)


All times are GMT. The time now is 08:32 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 17.65%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio

Wiki