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 27th January 2021, 12:53 PM   #1541
darkless is offline darkless  Denmark
diyAudio Member
 
Join Date: Jan 2011
Location: Denmark
Sorry! The external playback had been paused earlier by mistake, so the second scenario involving the built-in speakers as playback device actually works as intended, however the original scenario still does not.
  Reply With Quote
Old 27th January 2021, 01:36 PM   #1542
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by TNT View Post
OK, so not, but what I wanted exists - good. Can you describe the use for the Difference equation? The math is above me... :-/
//
I got several requests for it and it was easy to add. I don't actually know what they are using it for. Most things are easier to do with one or several biquads.

Quote:
Originally Posted by darkless View Post
Sorry! The external playback had been paused earlier by mistake, so the second scenario involving the built-in speakers as playback device actually works as intended, however the original scenario still does not.
Ok! So it seems something locks up when recording and playing back on the same device. I'll try than on my old macbook to see if I can make it happen in catalina on intel.
If you want to play a little, could you try the feedback example of the cpal library?
cpal/feedback.rs at master * RustAudio/cpal * GitHub
Cpal is the library I'm using to provide both CoreAudio and Wasapi support.
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 27th January 2021, 01:44 PM   #1543
darkless is offline darkless  Denmark
diyAudio Member
 
Join Date: Jan 2011
Location: Denmark
OK, I might have an idea as to why we have an issue when the capture and playback device is in fact the same device. The following paragraph is taken from the official CoreAudio docs:
Quote:
If you need to connect to an input device, or a hardware device other than the default output device, you need to use the AUHAL. Although designated as an output device, you can configure the AUHAL to accept input as well by setting the kAudioOutputUnitProperty_EnableIO property on the input (described in more detail in Technical Note TN2091: Device Input Using the HAL Output Audio Unit).
<snip>
An AUHAL instance can connect to only one device at a time, so you can enable both input and output only if the device can accept both. For example, the built-in audio for PowerPC-based Macintosh computers is configured as a single device that can both accept input audio data (through the Mic in) and output audio (through the speaker).
I suspect that the CamillaDSP code (or one of its libraries) isn't handling this special case, although I haven't been able to verify it by going through the code.

Last edited by darkless; 27th January 2021 at 01:46 PM.
  Reply With Quote
Old 27th January 2021, 04:06 PM   #1544
torgeirs is offline torgeirs  Norway
diyAudio Member
 
Join Date: Aug 2011
Quote:
Originally Posted by TNT View Post
OK, so not, but what I wanted exists - good. Can you describe the use for the Difference equation? The math is above me... :-/

//
Difference Equation

The difference equation is a formula for computing an output sample at time based on past and present input samples and past output samples in the time domain.
  • Only past and present input samples: FIR filter
  • Both past and present input samples and past output samples: IIR filter

and

LTI system theory describes linear time-invariant (LTI) filters of all types. LTI filters can be completely described by their frequency response and phase response, the specification of which uniquely defines their impulse response, and vice versa.

and

The input-output characteristics of discrete-time LTI system are completely described by its impulse response

and

b(i) is the value of the impulse response at the i'th instant for N-order FIR filter. If the filter is a direct form FIR filter then b(i) is also a coefficient of the FIR filter.


So that is the relationship without maths between FIR,filter coeficients, inpulse-, frequency- and phase responce

Last edited by torgeirs; 27th January 2021 at 04:33 PM.
  Reply With Quote
Old 27th January 2021, 04:45 PM   #1545
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
I thank you for your effort but due to my limited math ability, I was not further illuminated I'm afraid. My bad. :-)

Can you say one practical audio use-case please?

//
__________________
More distortion to the people! Timing . . . . is paramount.
  Reply With Quote
Old 27th January 2021, 05:22 PM   #1546
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
You can use it to make a higher order filter, like a third or fourth order one, as a single filter. A biquad is by definition second order.
There are some optimization routines (in Matlab and others) that can fit a target response with an iir filter of arbitrary order (where higher orders give a better fit).
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 27th January 2021, 06:36 PM   #1547
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Just tried on my macbook, with both playback and capture on the internal sound card. Works fine. I'll see if I can find some usb-device to try on as well.
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 27th January 2021, 08:10 PM   #1548
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by HenrikEnquist View Post
Just tried on my macbook, with both playback and capture on the internal sound card. Works fine. I'll see if I can find some usb-device to try on as well.
Update on that, if I run with Blackhole or SoundFlower as both capture and playback device, it gets stuck. But the cpal feedback example works fine with both of them so it should be possible to get this to work.
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 27th January 2021, 08:16 PM   #1549
darkless is offline darkless  Denmark
diyAudio Member
 
Join Date: Jan 2011
Location: Denmark
Quote:
Originally Posted by HenrikEnquist View Post
Update on that, if I run with Blackhole or SoundFlower as both capture and playback device, it gets stuck. But the cpal feedback example works fine with both of them so it should be possible to get this to work.
How do you run the feedback example?
  Reply With Quote
Old 27th January 2021, 09:06 PM   #1550
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
If you have rust and cargo installed, just clone cpal from here: GitHub - RustAudio/cpal: Cross-platform audio I/O library in pure Rust


Then run it with:

Code:
cargo run --example feedback -- "Digiface USB (24011413)" "Digiface USB (24011413)"
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  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:21 AM.


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