Go Back   Home > Forums > >

PC Based Computer music servers, crossovers, and equalization

CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools
Old 26th October 2020, 12:41 PM   #1221
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by xorcz View Post
How to play directly to ALSA loopback with started Camilla?

aplay -c2 -fS32_LE -r96000 -D"hw:Loopback,1" --buffer-size=2048 --period-size=1024 note96_2ch.wav

Playing WAVE 'note96_2ch.wav' : Signed 32 bit Little Endian, Rate 96000 Hz, Stereo


makes no sound, Camilla does not see any signal (Signal range: -1000).
If Camilla is capturing from Loopback,1, then you should let aplay output to Loopback,0:
Code:
aplay -c2 -fS32_LE -r96000 -D"hw:Loopback,0" --buffer-size=2048 --period-size=1024 note96_2ch.wav
  Reply With Quote
Old 27th October 2020, 04:31 PM   #1222
torgeirs is offline torgeirs  Norway
diyAudio Member
 
Join Date: Aug 2011
Quote:
Originally Posted by HenrikEnquist View Post
Yes it would be possible to use a minimum phase interpolation filter. For the same steepness is has the same amount of ringing as the sinc, but puts all of it after the impulse. I didn't add this (yet) to the resampler as I didn't see a large enough need for it to motivate the extra complexity.
Sorry to ponder on this topic still.
When i look at GitHub - HEnquist/camilladsp: A flexible linux IIR and FIR engine for crossovers, room correction etc. it reads like no sinc is involved for synchronous resampling (FFT/IFFT), but when i look at the rubato code it says:
Code:
/// The resampling is done by FFT:ing the input data. The spectrum is then extended or
/// truncated as well as multiplied with an antialiasing filter
/// before it's inverse transformed to get the resampled waveforms.
:
:
filter_t[n] = sinc[0][n] / (fft_size_in as $ft);
So I see always sinc....
  Reply With Quote
Old 27th October 2020, 04:42 PM   #1223
torgeirs is offline torgeirs  Norway
diyAudio Member
 
Join Date: Aug 2011
But also see that for someone that manages coding in rust, it is quite simple to make a program with rubato that takes a FIR filter and resamples it with synchronous resampling to all the common samplerates.
The resampled FIR filter will allways be a few samples longer as i understand (sinc)? So a litte "irritating" when original filter is 2^n length.
  Reply With Quote
Old 27th October 2020, 04:56 PM   #1224
torgeirs is offline torgeirs  Norway
diyAudio Member
 
Join Date: Aug 2011
The solution to the 2^n anoyance is maybe to generate a FIR filter that is, lets say, 256 samples shorter than 2^n and force resampler to be fixed length out and length is 2^n. And also resample original filter to original samplerate. (lose some HF, but guess original filter will be at least 192kHz samplerate)

Last edited by torgeirs; 27th October 2020 at 05:01 PM.
  Reply With Quote
Old 27th October 2020, 05:49 PM   #1225
torgeirs is offline torgeirs  Norway
diyAudio Member
 
Join Date: Aug 2011
Fixed filter length i time. I give up on 44.1, 88,2, 176,4 to 48,96 or 192 or vice versa

Last edited by torgeirs; 27th October 2020 at 05:53 PM.
  Reply With Quote
Old 27th October 2020, 08:29 PM   #1226
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by torgeirs View Post
Sorry to ponder on this topic still.
When i look at GitHub - HEnquist/camilladsp: A flexible linux IIR and FIR engine for crossovers, room correction etc. it reads like no sinc is involved for synchronous resampling (FFT/IFFT), but when i look at the rubato code it says:
Code:
 
/// The resampling is done by FFT:ing the input data. The spectrum is then extended or 
/// truncated as well as multiplied with an antialiasing filter 
/// before it's inverse transformed to get the resampled waveforms. 
: 
: 
filter_t[n] = sinc[0][n] / (fft_size_in as $ft);
So I see always sinc....
The sinc is just the impulse response of a brickwall filter. For an infinitely sharp brickwall filter, the impulse response is the infinite sinc function. If I didn't explicitly make a filter in the synchronous resampler, the resampling would anyway act as a brickwall filter and generate such an infinitely long sinc. Infinitely long functions are not that great to work with in practice for many reasons. So instead you use windowed sinc filters, which aren't as steep but limit the length of the pre-and post-ringing. That's why you see a sinc filter also in the synchronous resampler.

Quote:
Originally Posted by torgeirs View Post
But also see that for someone that manages coding in rust, it is quite simple to make a program with rubato that takes a FIR filter and resamples it with synchronous resampling to all the common samplerates.
The resampled FIR filter will allways be a few samples longer as i understand (sinc)? So a litte "irritating" when original filter is 2^n length.
Yes it would be quite easy to write such a program. The examples in the rubato repo would be a good starting point. It should also be possible to use sox, with a simple bash script to resample to all the desired rates.

Quote:
Originally Posted by torgeirs View Post
The solution to the 2^n anoyance is maybe to generate a FIR filter that is, lets say, 256 samples shorter than 2^n and force resampler to be fixed length out and length is 2^n. And also resample original filter to original samplerate. (lose some HF, but guess original filter will be at least 192kHz samplerate)
Quote:
Originally Posted by torgeirs View Post
Fixed filter length i time. I give up on 44.1, 88,2, 176,4 to 48,96 or 192 or vice versa
It doesn't matter so much what the filter length is, the convolution will anyway be done in chunks of a fixed size. If the length is more than one chunksize, it will just switch to segmented convolution with as many segments as needed.
  Reply With Quote
Old 27th October 2020, 08:37 PM   #1227
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
It should also be possible to use sox, with a simple bash script to resample to all the desired rates.
The wonderful sox resampler has been extracted to libsoxr library - with rust unsurprisingly having a wrapper for: GitHub - lrbalt/libsoxr-rs: Rust wrapper for libsoxr (resampling library for sounds)
  Reply With Quote
Old 27th October 2020, 09:27 PM   #1228
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by phofman View Post
The wonderful sox resampler has been extracted to libsoxr library - with rust unsurprisingly having a wrapper for: GitHub - lrbalt/libsoxr-rs: Rust wrapper for libsoxr (resampling library for sounds)
Nice find! Looks good, strange that it hasn't been uploaded to crates.io so more people can find it.
  Reply With Quote
Old 28th October 2020, 05:06 PM   #1229
xorcz is online now xorcz  Czech Republic
diyAudio Member
 
Join Date: Feb 2020
Quote:
Originally Posted by HenrikEnquist View Post
If Camilla is capturing from Loopback,1, then you should let aplay output to Loopback,0:
Code:
aplay -c2 -fS32_LE -r96000 -D"hw:Loopback,0" --buffer-size=2048 --period-size=1024 note96_2ch.wav

I chose the easier way and changed OS to Fedora 33 Cinnamon. It is working fine with chunksize 4096 and there are no pops. I tried also Linuxmint 20, but it was the same as Ubuntu 18.04, no chunksize above 2048. I briefly tried 5.8 kernel instead of stock 5.4, but it has more dependencies. So now I will change to Pulse without the Alsa loopback.
  Reply With Quote
Old 28th October 2020, 09:27 PM   #1230
ChrisPatlach is offline ChrisPatlach  Canada
diyAudio Member
 
Join Date: Jun 2020
Hi,


I have been using camillagui on an RPI and notices a few things.

I am not able to enter negative values for a gain filter via the gui. The negative character does not seem to be accepted. I have tried safari and firefox.


I use two config files, one with FIR filters and one with IIR. Both run fine and pass the config check. Ploting of the filters via the gui works for the configuration with IIR but not for the FIR configuration. With the FIR config, a blank window opens for any of the filters.



Christian
  Reply With Quote

Reply


CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.Hide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The room correction or speaker correction? What can we do with dsp power now availabl Raimonds Full Range 233 28th January 2017 08:51 AM
Introducing OpenDRC, Open Digital Room Correction engine minidsp miniDSP 20 20th January 2016 06:37 PM
What the difference between dsp room correction eq and software correction erez1012 PC Based 0 10th March 2014 08:07 PM
Writing a Cross-Platform, Free Software Modeling Tool and TS-Parameter DB justinzane Software Tools 6 31st December 2013 07:55 AM
FS: DAC, room-correction, active crossovers, amp, speakers! taloyd Swap Meet 4 14th April 2009 04:16 PM


New To Site? Need Help?

All times are GMT. The time now is 10:30 PM.


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