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

TNT

Member
Joined 2003
Paid Member
adjust

Hmm, bufferlevel = 0... why cant it keep up?
 

Attachments

  • radj.png
    radj.png
    126.6 KB · Views: 199
Last edited:
But everything is on 44,1 ...

But please, suggest a setting.. how can one do 44,1 -> ~44,1? :)

//
The asynchronous resampler does that! Just enable rresampling and rate adjust. You already have suitable values for chunksize and target level.


adjust

Hmm, bufferlevel = 0... why cant it keep up?
Seems strange, can you post the settings for this?


Just disengaged the rate adjustment. Plays fine - actually sound better I think.

I seem to have the same amount of blipps and plopps actually - there was on or two tight there..

//
Without resampling, the enable_rate_adjust won't be able to do anything. And without rate_adjust the resampler won't do anything useful so you can just as well disable it.
 
My buffer level has always showed 0. I never thought to question it. Resampling and rate adjust both off. No dropouts except for a brief stutter at first track start sometimes. I turned on rate adjust and buffer level goes to ~2000. I haven't noticed any difference in SQ either way.
If rate adjust is off the buffer level value isn't updated, that's why you have 0 there.
If you use rate_adjust with an alsa loopback capture device, it can do the adjustment without resampling, by tuning the virtual sample rate of the loopback. This doesn't affect the sound quality in any way.
It you don't have rate adjust active, you have a 50% chance to have glitch-free playback. If the loopback is faster than your playback device, it's usually fine. You get a slowly increasing delay through the system. That would be a problem for lip sync in movies but if you are streaming music you probably won't notice.

But if the loopback runs slower, then the playback device will get a buffer underrun once in a while. Then you get a glitch. How often they happen depend on the rate difference and chunksize. A larger chunksize means there are fewer gitches but each one will last longer.
 
.../
lykkedk, regarding how to get sample rate from SqueezeLite, you might consider some of the ideas in the attached file. I put the text an attachment, because I believe we are a little bit off topic and I don't want to occupy to much visual space.

Hi audiac..!
I implemented your sleek "first approach" for sample rate switching with squeezelite, from the pdf you posted.
Works like a charm..! :up:

- after some minor modification, mainly to get it compatible with the new websocket protocol in CamillaDSP.

Since this is a squeezelite/pCP subject I posted the details in lykkedk's thread:
 
Windows 10 CamillaDSP, ASUS U7 USB soundcard working

Managed to get a CamillaDSP compiled program to run.
https://github.com/HEnquist/camilladsp/releases/download/v0.3.2/camilladsp-windows-amd64.zip

  • ASUS U7 USB soundcard configured in 8 channel mode. 2 analog in, 8 analog out

  • Set General and effects setting as in pictures enclosed

  • Put CamillaDSP program and config.yml in same directory.

  • Made a minimum config.yml file from the examples in readme file.(zipped file)

  • Used run (Kjør) to execute the program

Some windows tayloring was done in config.yml:

  • capture:
type: Wasapi​
device: "Linje (Xonar U7)"​
format: FLOAT32LE​

  • playback:
type: Wasapi​
channels: 8​
device: "Høyttalere (Xonar U7)"​
format: FLOAT32LE​


Chose low settings for:

  • chunksize: 128

  • queuelimit: 1

  • target_level: 128
to achieve low latancy (No FIR filter)
Had to set the output to 8 chanels of the ASUS card even if only 4 are used her
 

Attachments

  • log.JPG
    log.JPG
    113.1 KB · Views: 234
  • Run.JPG
    Run.JPG
    21.1 KB · Views: 220
  • Generelt.JPG
    Generelt.JPG
    39.7 KB · Views: 236
  • Effects.JPG
    Effects.JPG
    32.7 KB · Views: 236
  • dir.JPG
    dir.JPG
    30 KB · Views: 245
  • config.zip
    1.1 KB · Views: 54
Nice!

A few comments:
- You have input and output on the same device. This means input and output share the sample clock, so there is no drift. You can disable rate adjust (and resampling)!
- On Windows, rate adjust needs the resampler. Enabling rate adjust without also enabling the asynchronous resampler will do nothing.
- I believe you can run with 4 channels if you set the sound card to a 4-speaker config (Sound control panel, click Configure, should give you the speaker config dialog). Then you should be able to set CamillaDSP also to 4 channels. Could you try that?
 
Thank you for your support, Henrik.
Quad speakers did the trick:)
Also removed:
Code:
  adjust_period: 10
  enable_rate_adjust: true
  enable_resampling: true
  resampler_type: BalancedAsync

Noticed that errors in config.yml just crashed the window when using run. Guess it is a windows problem...
 

Attachments

  • config.zip
    525 bytes · Views: 37
  • quad.JPG
    quad.JPG
    32.5 KB · Views: 66
  • Config4ch.JPG
    Config4ch.JPG
    13.7 KB · Views: 55
Hi there.

@Henrik.

I was just wondering about the rate adjust for clock drifts you brought up in your latest post.

Yesterday I opened a thread about a slightly different subject.

It's not related to the convolution. It's related to the recording and filter generation.
REW is using a timing reference chirp inside their sweep. That timing reference puts REW in the position to run a "rate-adjust" to clean up whatever clock drift.

Could Camilla somehow be used to match/rate-adjust the (an) original sweep and the recording.

Just by using e.g. file-in >> Camilla rate-adjust >> file-out >> DRC-Fir impulse response >> DRC-Fir filter

I would like to avoid REW (since there's no CLI) and run the whole recording and filter generation process scripted from commandline.

THX
 
Last edited:
- You have input and output on the same device. This means input and output share the sample clock, so there is no drift. You can disable rate adjust (and resampling)!
That is very nice! I like one clock audio systems:)
So computer/soundcard clock differences is not an issue?
If so: Is it the USB audio 2.0 frame scheme that takes care of soundcard - computer clock differences?


- On Windows, rate adjust needs the resampler. Enabling rate adjust without also enabling the asynchronous resampler will do nothing.
It anables the user to get status messages in the command prompt:)