Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux
Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux
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 Search this Thread
Old 5th December 2018, 06:46 PM   #31
dukanvadet is offline dukanvadet
diyAudio Member
 
Join Date: Jan 2014
Location: Sweden
This might be exactly what i want, if i understand it correctly this is system wide so anything that outputs trough pulseaudio is filtered? Can you add latency on a channel? Is there any latency inherent in the filtering?

One feature that would be nice is if you could import a frequency response and see the changes directly on the curve. Not that necessary or important but would be nice
  Reply With Quote
Old 5th December 2018, 07:06 PM   #32
Tfive is offline Tfive  Germany
diyAudio Member
 
Tfive's Avatar
 
Join Date: Jun 2018
Location: Straubing
Quote:
Originally Posted by dukanvadet View Post
This might be exactly what i want, if i understand it correctly this is system wide so anything that outputs trough pulseaudio is filtered? Can you add latency on a channel? Is there any latency inherent in the filtering?

One feature that would be nice is if you could import a frequency response and see the changes directly on the curve. Not that necessary or important but would be nice
Yes, this is system-wide as the input sink of PaXoverRack is set as default sink.

AFAIK there is no latency induced by filtering itself as all the pulseaudio buffers have to be handed around anyways and the simply get put through all LADSPA sinks additionally.

Yes, you can add a latency to a path by adding a (sub)sample delay.

Not sure what you mean by "import a frequency response" though. Hint: you can show the overall frequency response of the filter chain on an output.
  Reply With Quote
Old 5th December 2018, 09:04 PM   #33
dukanvadet is offline dukanvadet
diyAudio Member
 
Join Date: Jan 2014
Location: Sweden
Sounds good! What i meant was to load a measured frequency response as .frd file and see the changes on that kinda like in most passive crossover simulators.
  Reply With Quote
Old 5th December 2018, 09:45 PM   #34
Tfive is offline Tfive  Germany
diyAudio Member
 
Tfive's Avatar
 
Join Date: Jun 2018
Location: Straubing
Quote:
Originally Posted by dukanvadet View Post
Sounds good! What i meant was to load a measured frequency response as .frd file and see the changes on that kinda like in most passive crossover simulators.
OK, will think about that. It probably only makes sense to compare the .frd to the inverse eq curve of a specific parametric eq as you wouldnt want to compare it to adjustments already made and inserted when measuring that frequency response, correct? So then you could adjust the eq so that the combined .frd and inverse eq FR would yield a flat frequency response...
  Reply With Quote
Old 9th December 2018, 03:46 PM   #35
theSuede is offline theSuede  Sweden
diyAudio Member
 
Join Date: Aug 2006
Quote:
Originally Posted by Tfive View Post
Another update: I'm struggling hard to find a formula to calculate the IIR filter coefficients for a third order Butterworth filter. Anybody here who can help with this?

I'm searching for something like:
Code:
    def _coeffsBA(f, samplerate):
        """ return 12db/oct high pass biquad coeffs for given frequency """
        w0 = 2 * pi * f / samplerate
        alpha = sin(w0) / 2 / 0.7071067811865476 # Butterworth characteristic, Q = 0.707...
        cs = cos(w0)
        norm = 1 / (1 + alpha)
        b0 = (1 + cs) / 2 * norm
        b1 = -1.0 * (1 + cs) * norm
        b2 = b0
        a1 = -2 * cs * norm
        a2 = (1 - alpha) * norm
        return (b0, b1, b2), (1, a1, a2)
In the meantime I'm trying my luck with some DSP literatur but my head is already aching like hell!
I think this would be a good place to start - it's good to understand the basics and not just "plug in" values from a chart....
Design IIR Butterworth Filters Using 12 Lines of Code - Neil Robertson

There's some (quite) easy to read Matlab code in the appendix at the bottom of the page.

But the odd order Butterworth filters are generally easiest to think of as the even order BW filter one step lower multiplied by the product of a first order BW filter (5th order = 4th order x 1st order and so on).

First order = 1+s
Second order = 1+1.414s+s^2
>>>
Third order = (1+s)(1+1.414s+s^2)

I think that would give
a = [1, -2.0286, 1.4762, -0.3714]
b = [1, 3, 3, 1]
  Reply With Quote
Old 10th December 2018, 04:03 PM   #36
Tfive is offline Tfive  Germany
diyAudio Member
 
Tfive's Avatar
 
Join Date: Jun 2018
Location: Straubing
Quote:
Originally Posted by theSuede View Post
First order = 1+s
Second order = 1+1.414s+s^2
>>>
Third order = (1+s)(1+1.414s+s^2)

I think that would give
a = [1, -2.0286, 1.4762, -0.3714]
b = [1, 3, 3, 1]
Would you care to elaborate what "s" refers to?
  Reply With Quote
Old 18th December 2018, 05:25 PM   #37
Tfive is offline Tfive  Germany
diyAudio Member
 
Tfive's Avatar
 
Join Date: Jun 2018
Location: Straubing
FWIW I still am trying to figure out how to calculate the damn filter coefficients for 3rd order filters. I reverse engineered the code of butter() in scipy.signal, simplified it for the case of N=3 (3rd order) and tried to implement it in C. Here's the preliminary result:
[C] #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> - Pastebin.com

What I still need to figure out how to emulate numpy.poly() in this case, which takes the zeroes of a polynomial function and returns the coefficients of it. Any chance sombody knows about this stuff?
  Reply With Quote
Old 19th December 2018, 12:39 PM   #38
Tfive is offline Tfive  Germany
diyAudio Member
 
Tfive's Avatar
 
Join Date: Jun 2018
Location: Straubing
Update: somehow I figured out, how to calculate third order filter coefficients and I just released version 1.8 which adds second and third order butterworth low/high pass filters together with a number of small bug fixes and the corresponding ladspa-t5-plugins 1.4 package.

Have fun!
  Reply With Quote
Old 19th December 2018, 04:53 PM   #39
DRONE7 is offline DRONE7  New Zealand
diyAudio Member
 
Join Date: Aug 2008
Hoping for some time over the festive break to try on a Pi..
  Reply With Quote
Old 31st December 2018, 09:02 AM   #40
morgot9999 is offline morgot9999  Romania
diyAudio Member
 
morgot9999's Avatar
 
Join Date: Mar 2018
Thumbs up Respect!

Wonderful project!

Can be extended to a 4 way design?
My future project is a 3-way active full-range speaker plus 1 or 2 subs.

Thinking to use a 7.1 soundcard with this kind of digital crossover
 

Reply


Pulseaudio Crossover Rack - multi-way crossover design &amp; implementation with linuxHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
analyzing my Linux/ecasound dsp crossover speaker system gibbyj Multi-Way 5 6th August 2017 07:42 PM
Linux + MPD player + dsp crossover via ecasound jplesset PC Based 11 15th September 2013 10:24 PM
Can you use a digital active crossover to design a passive analog crossover ? RickDangerous Digital Line Level 27 1st April 2013 05:59 AM
Active Crossover using PC and multi ch. Soundcard? vision Digital Source 22 7th July 2012 11:59 PM
Implementation of 3 ways speaker with digital crossover ackcheng Multi-Way 4 6th December 2010 03:50 PM


New To Site? Need Help?

All times are GMT. The time now is 11:22 AM.


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