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

I am just curious, how did you setup the chain - where do you resample and what formats.
I just used the default settings of Fedora, camilla running at 44.1 kHz and playing 44.1 kHz material. I didn't try to optimize the pulse settings.

@Henrik...

Well i was storking your'e github and i see that you have a numpyless development in the github :)

Looking forward to see when it's eventually done.
You also mentioned some time ago, that you are developing a plugin without matplotlib also, is this part of this development (not to rush you at all, just curious) :up:

Good day out there.

Jesper.
Matplotlib depends on numpy, so numpyless also means matplotlibless! I have all the plots working now, only needs a little cleanup and then it's ready. As a bonus this also made plotting much faster.
 
I just used the default settings of Fedora, camilla running at 44.1 kHz and playing 44.1 kHz material. I didn't try to optimize the pulse settings.
Just an idea, in Fedora Chromium, Firefox and also Audacious (default configuration) output with format:
sample spec: float32le 2ch 44100Hz



Is it possible to set capture alsa loopback device also to FLOAT_LE? I tried to change in the asound.conf, but it changed only playback device.
 
And one more question, I changed configuration so it is more similar to your setup, but tried again 192000 samplerate:


devices:
adjust_period: 10
capture:
channels: 2
device: hw:Loopback,1
format: S16LE
type: Alsa
capture_samplerate: 44100
chunksize: 4096
enable_rate_adjust: true
enable_resampling: true
playback:
channels: 8
device: hw:1,10,0
format: S32LE
type: Alsa
queuelimit: 100
resampler_type: BalancedAsync
samplerate: 192000
silence_threshold: -90
silence_timeout: 3
target_level: 0


It is crashing:
Code:
ct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Read config file Some("/opt/camilladsp/configs/config_alsa.yml")
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Config is valid
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::socketserver] Start websocket server on 127.0.0.1:1234
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Wait for config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Config ready
Oct 29 23:22:20 localhost camilladsp[6574]: Buffer frames 2048
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build new pipeline
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.99277506546254 a2=0.9928623492296514 b0=0.00002182094177779448 b1=0.00004364188355558896 b2=0.00002182094177779448
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.982767874875442 a2=0.9828547203265044 b0=0.00002171136276561948 b1=0.00004342272553123896 b2=0.00002171136276561948
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Creating resampler
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.99277506546254 a2=0.9928623492296514 b0=0.00002182094177779448 b1=0.00004364188355558896 b2=0.00002182094177779448
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::audiodevice] Creating asynchronous resampler with parameters: InterpolationParameters { sinc_len: 128, f_cutoff: 0.92591465, oversampling_factor: 1024, interpolation: Linear, window: Blackman2 }
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG rubato] Create new SincFixedOut, ratio: 4.35374149659864, chunk_size: 4096, channels: 2, parameters: InterpolationParameters { sinc_len: 128, f_cutoff: 0.92591465, oversampling_factor: 1024, interpolation: Linear, window: Blackman2 }
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG rubato] sinc_len rounded up to 128
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.982767874875442 a2=0.9828547203265044 b0=0.00002171136276561948 b1=0.00004342272553123896 b2=0.00002171136276561948
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.0016935106607580248 b1=0.0033870213215160495 b2=0.0016935106607580248
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.0016935106607580248 b1=0.0033870213215160495 b2=0.0016935106607580248
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.9809331968875066 a2=0.981113259870915 b0=0.9905116141896054 b1=-1.9810232283792109 b2=0.9905116141896054
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.9809331968875066 a2=0.981113259870915 b0=0.9905116141896054 b1=-1.9810232283792109 b2=0.9905116141896054
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.0016935106607580248 b1=0.0033870213215160495 b2=0.0016935106607580248
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.0016935106607580248 b1=0.0033870213215160495 b2=0.0016935106607580248
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.9809331968875066 a2=0.981113259870915 b0=0.9905116141896054 b1=-1.9810232283792109 b2=0.9905116141896054
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.9809331968875066 a2=0.981113259870915 b0=0.9905116141896054 b1=-1.9810232283792109 b2=0.9905116141896054
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.9418265237143423 b1=-1.8836530474286846 b2=0.9418265237143423
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.9418265237143423 b1=-1.8836530474286846 b2=0.9418265237143423
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::filters] Build from config
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.9418265237143423 b1=-1.8836530474286846 b2=0.9418265237143423
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::biquad] a1=-1.8802660261071684 a2=0.8870400687502007 b0=0.9418265237143423 b1=-1.8836530474286846 b2=0.9418265237143423
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::processing] build filters, waiting to start processing loop
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG rubato::sinc] Generate sincs, length: 128, oversampling: 1024, normalized by: Some(1.0800131580457402)
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Opened audio device "hw:Loopback,1" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S16LE), access: Ok(RWInterleaved), period_size: "Ok(512) frames", buffer_size: "Ok(4096) frames" }, SwParams(avail_min: Ok(512) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(4096) frames)
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Capture thread ready to start
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Opened audio device "hw:1,10,0" with parameters: HwParams { channels: Ok(8), rate: "Ok(192000) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(1024) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(1024) frames, start_threshold: Ok(3072) frames, stop_threshold: Ok(8192) frames)
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Playback thread ready to start
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camilladsp] Both capture and playback ready, release barrier
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Starting playback loop
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Starting captureloop
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z INFO  camillalib::alsadevice] Capture device supports rate adjust
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z WARN  camillalib::alsadevice] Async resampler not needed since capture device supports rate adjust. Switch to Sync type to save CPU time.
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Capture buffer too small, extending
Oct 29 23:22:20 localhost audit[6574]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=6574 comm="AlsaCapture" exe="/opt/camilladsp/camilladsp" sig=6 res=1
Oct 29 23:22:20 localhost camilladsp[6574]: memory allocation of 18446744073709547452 bytes failed
Oct 29 23:22:20 localhost systemd[1]: camilladsp.service: Main process exited, code=killed, status=6/ABRT
Oct 29 23:22:20 localhost systemd[1]: camilladsp.service: Failed with result 'signal'.
Oct 29 23:22:20 localhost audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=camilladsp comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Oct 29 23:22:20 localhost systemd-coredump[6580]: Process 6574 (camilladsp) of user 0 dumped core.#012#012Stack trace of thread 6578:#012#0  0x00007f0fdf950bc5 raise (libc.so.6 + 0x3dbc5)#012#1  0x00007f0fdf9398a4 abort (libc.so.6 + 0x268a4)#012#2  0x000055c08c4b1347 _ZN3std3sys4unix14abort_internal17h0f898796c2c7a3a0E (camilladsp + 0x2f1347)#012#3  0x000055c08c4a9e16 _ZN3std7process5abort17h09286292ab5084e4E (camilladsp + 0x2e9e16)#012#4  0x000055c08c4ace0e rust_oom (camilladsp + 0x2ece0e)#012#5  0x000055c08c4c4aa7 _ZN5alloc5alloc18handle_alloc_error17h7945fa3f20835640E (camilladsp + 0x304aa7)#012#6  0x000055c08c2d2859 _ZN10camillalib10alsadevice18capture_loop_bytes17h73f84cbba1b0430dE (camilladsp + 0x112859)#012#7  0x000055c08c33e281 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h58b7d2b40a33b7e1E (camilladsp + 0x17e281)#012#8  0x000055c08c354e05 _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h286d547bb7dadcc6E (camilladsp + 0x194e05)#012#9  0x000055c08c4b0d1a _ZN3std3sys4unix6thread6Thread3new12thread_start17h5ad4ddffe24373a8E (camilladsp + 0x2f0d1a)#012#10 0x00007f0fdfb053f9 start_thread (libpthread.so.0 + 0x93f9)#012#11 0x00007f0fdfa14b03 __clone (libc.so.6 + 0x101b03)#012#012Stack trace of thread 6574:#012#0  0x00007f0fdfb0b9e8 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf9e8)#012#1  0x000055c08c4afae8 _ZN3std3sys4unix7condvar7Condvar12wait_timeout17h179794ff6e1c6db4E (camilladsp + 0x2efae8)#012#2  0x000055c08c49f45f _ZN3std6thread12park_timeout17h1e113769b9fc6214E (camilladsp + 0x2df45f)#012#3  0x000055c08c4aa037 _ZN3std4sync4mpsc8blocking9WaitToken14wait_max_until17ha87d9e217eab05d0E (camilladsp + 0x2ea037)#012#4  0x000055c08c21a840 _ZN3std4sync4mpsc6shared15Packet$LT$T$GT$4recv17had750f2886547df0E (camilladsp + 0x5a840)#012#5  0x000055c08c22333d _ZN3std4sync4mpsc17Receiver$LT$T$GT$12recv_timeout17hdbb738c746756b05E (camilladsp + 0x6333d)#012#6  0x000055c08c20fd6d _ZN10camilladsp3run17hc91f4069af2db3feE (camilladsp + 0x4fd6d)#012#7  0x000055c08c213a97 _ZN10camilladsp4main17h6aca6b1442d367aaE (camilladsp + 0x53a97)#012#8  0x000055c08c215e63 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hd62180310806cf24E (camilladsp + 0x55e63)#012#9  0x000055c08c215e79 _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd6392be1a4ffc669E.llvm.9561805414456027721 (camilladsp + 0x55e79)#012#10 0x000055c08c4ae011 _ZN3std2rt19lang_start_internal17h73711f37ecfcb277E (camilladsp + 0x2ee011)#012#11 0x000055c08c214992 main (camilladsp + 0x54992)#012#12 0x00007f0fdf93b1a2 __libc_start_main (libc.so.6 + 0x281a2)#012#13 0x000055c08c20b0ae _start (camilladsp + 0x4b0ae)#012#012Stack trace of thread 6575:#012#0  0x00007f0fdfa16550 accept4 (libc.so.6 + 0x103550)#012#1  0x000055c08c4a8ba4 _ZN3std3net3tcp11TcpListener6accept17hf3e2def4282f28a7E (camilladsp + 0x2e8ba4)#012#2  0x000055c08c4a8d36 _ZN82_$LT$std..net..tcp..Incoming$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbeb3837f47974a2bE (camilladsp + 0x2e8d36)#012#3  0x000055c08c33da49 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h3f08367dc390a1f0E (camilladsp + 0x17da49)#012#4  0x000055c08c3550ff _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h5279fb5ef45d6e50E (camilladsp + 0x1950ff)#012#5  0x000055c08c4b0d1a _ZN3std3sys4unix6thread6Thread3new12thread_start17h5ad4ddffe24373a8E (camilladsp + 0x2f0d1a)#012#6  0x00007f0fdfb053f9 start_thread (libpthread.so.0 + 0x93f9)#012#7  0x00007f0fdfa14b03 __clone (libc.so.6 + 0x101b03)#012#012Stack trace of thread 6576:#012#0  0x00007f0fdfb0b6c2 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf6c2)#012#1  0x000055c08c49f0d3 _ZN3std6thread4park17hc96bf027914d3461E (camilladsp + 0x2df0d3)#012#2  0x000055c08c4a9f22 _ZN3std4sync4mpsc8blocking9WaitToken4wait17h5c4c3964dcd70993E (camilladsp + 0x2e9f22)#012#3  0x000055c08c34db00 _ZN3std4sync4mpsc4sync4wait17h4dfc36e7d98b6f00E (camilladsp + 0x18db00)#012#4  0x000055c08c34b19f _ZN3std4sync4mpsc4sync15Packet$LT$T$GT$4recv17h88740c28850c2e29E (camilladsp + 0x18b19f)#012#5  0x000055c08c352ec9 _ZN3std4sync4mpsc17Receiver$LT$T$GT$4recv17h88e73e39572bda4bE (camilladsp + 0x192ec9)#012#6  0x000055c08c33a570 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h2112ec3fb3284dfbE (camilladsp + 0x17a570)#012#7  0x000055c08c354c95 _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h213c7e082add7064E (camilladsp + 0x194c95)#012#8  0x000055c08c4b0d1a _ZN3std3sys4unix6thread6Thread3new12thread_start17h5ad4ddffe24373a8E (camilladsp + 0x2f0d1a)#012#9  0x00007f0fdfb053f9 start_thread (libpthread.so.0 + 0x93f9)#012#10 0x00007f0fdfa14b03 __clone (libc.so.6 + 0x101b03)#012#012Stack trace of thread 6577:#012#0  0x00007f0fdfb0b6c2 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf6c2)#012#1  0x000055c08c49f0d3 _ZN3std6thread4park17hc96bf027914d3461E (camilladsp + 0x2df0d3)#012#2  0x000055c08c4a9f22 _ZN3std4sync4mpsc8blocking9WaitToken4wait17h5c4c3964dcd70993E (camilladsp + 0x2e9f22)#012#3  0x000055c08c34db00 _ZN3std4sync4mpsc4sync4wait17h4dfc36e7d98b6f00E (camilladsp + 0x18db00)#012#4  0x000055c08c34b19f _ZN3std4sync4mpsc4sync15Packet$LT$T$GT$4recv17h88740c28850c2e29E (camilladsp + 0x18b19f)#012#5  0x000055c08c352ec9 _ZN3std4sync4mpsc17Receiver$LT$T$GT$4recv17h88e73e39572bda4bE (camilladsp + 0x192ec9)#012#6  0x000055c08c2cff92 _ZN10camillalib10alsadevice19playback_loop_bytes17h270d9f7cd99f17e8E (camilladsp + 0x10ff92)#012#7  0x000055c08c33cd1c _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h35237c0523ddd84dE (camilladsp + 0x17cd1c)#012#8  0x000055c08c355297 _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6d5d1963a1202281E (camilladsp + 0x195297)#012#9  0x000055c08c4b0d1a _ZN3std3sys4unix6thread6Thread3new12thread_start17h5ad4ddffe24373a8E (camilladsp + 0x2f0d1a)#012#10 0x00007f0fdfb053f9 start_thread (libpthread.so.0 + 0x93f9)#012#11 0x00007f0fdfa14b03 __clone (libc.so.6 + 0x101b03)
 
I just used the default settings of Fedora, camilla running at 44.1 kHz and playing 44.1 kHz material. I didn't try to optimize the pulse settings.


Matplotlib depends on numpy, so numpyless also means matplotlibless! I have all the plots working now, only needs a little cleanup and then it's ready. As a bonus this also made plotting much faster.

This is really great news Henrik.

Tell me if you need some external testing :p

Jesper.
 
Perhaps this?

Code:
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Capture buffer too small, extending
Oct 29 23:22:20 localhost audit[6574]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=6574 comm="AlsaCapture" exe="/opt/camilladsp/camilladsp" sig=6 res=1
Oct 29 23:22:20 localhost camilladsp[6574]: memory allocation of 18446744073709547452 bytes failed
 
Perhaps this?

Code:
Oct 29 23:22:20 localhost camilladsp[6574]: [2020-10-29T22:22:20Z DEBUG camillalib::alsadevice] Capture buffer too small, extending
Oct 29 23:22:20 localhost audit[6574]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=6574 comm="AlsaCapture" exe="/opt/camilladsp/camilladsp" sig=6 res=1
Oct 29 23:22:20 localhost camilladsp[6574]: memory allocation of 18446744073709547452 bytes failed
Yes and there should be a few trace level messages before. But it doesn't matter, I figured it out :) There will be a fixed version soon.
 
v0.4.0-beta5 is up. Changes:
New features:

  • Add loglevel option.
  • Use local time instead of UTC in log messages.
Bugfixes:

  • Fix buffer size handling for alsa capture (the bug reported by xorcz).
This will probably be the last beta before a proper 0.4.0 release. But I'm getting a bit tired of the leading zero, maybe it's time to bump it to 1.0.0...
 
The new gui is also up now!
It can be used without numpy and matplotlib. The plots are now generated in the browser, and as a bonus plotting is also much faster.


To run it you need:
Backend v0.5.0: Release v0.5.0: Merge pull request #6 from HEnquist/develop * HEnquist/camillagui-backend * GitHub
pycamilladsp v0.4.1: Release v0.4.1: Merge pull request #8 from HEnquist/develop * HEnquist/pycamilladsp * GitHub
pycamilladsp-plot v0.4.0: Release v0.4.0 * HEnquist/pycamilladsp-plot * GitHub

There still seems to be a matplotlib dependency in plot_filters.py line 4 of pycamilladsp-plot v0.4.0 viz :

import matplotlib

BTW the new plots with impulse and phase are very nice! Plotting takes about 7 seconds though.
 
Last edited:
There still seems to be a matplotlib dependency in plot_filters.py line 4 of pycamilladsp-plot v0.4.0 viz :

import matplotlib

BTW the new plots with impulse and phase are very nice! Plotting takes about 7 seconds though.
Oh right, I'll fix that. It still uses matplotlib for the command line tool, but it should only import it when running that.

7 seconds is annoyingly slow. What hardware was that done on, and how long was the filter?
 
Thank you, Henrik for your answers in post #1226 CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
I accept that windowing is needed both in time and frequency domain in real world signal prosessing:yes:

Does anyone know if polyphase techniques can be used when a FIR filter with FIR sampling freq = M x signal sampling freq (like FIR at 192k fs and signal 48k fs, M = 4)
Thinking og page 23 in this:
http://www.ws.binghamton.edu/fowler.../EE521_files/IV-05 Polyphase Filters_2003.pdf

To Implement Polyphase Decimation
•Chop up filter into M sub-filters
•Chop up signal into M sub-signals
•Filter each sub-signal w/ a sub-filter
•Add outputs point-by-point

My naive approach is then to use signal as lovest freq sub-signal and pad the rest sub-signals with zeros.

Quess the sub-filters must be combined by last bulletpoint?
But the signal can always be downsampled to signal fs afterwards.

Then just one FIR filter is needed for all (FIR fs)/M signal sample rates
 
Last edited:
And when I'm at it:
FIR filter that has only unity gain and 0 phase in upper half of spectrum. Can polyphase be used to simplify filtering of upper sub-signal?

Think alot of FIR filters out there do nothing to the signal over 24k Hz and 96 kHz sampling frequency is used. (Disregarding windowing :cool:)
0Hz - 24 kHz: Filter is changing signal
24kHz - 48 kHz: Filter is not changing signal, CPU power wasted
 
Last edited:
And the magic lies in the summing of the subfilters (last bullet point) This is where the anti aliasing occurs as described here for quadrature version:
Polyphase quadrature filter - Wikipedia
And it also shows that this tecnique is widely used in audio. (Subband coding and other)
I started looking a little at polyphase filters when I started on the resampler. I actually use a simple form in the asynchronous resampler. But doing more general filtering seems a bit tricky and I would need to do a lot of reading, so I didn't continue along that path. It's interesting though and I would like to dig into it. If I only had more time...