Welcome, Guest
Username: Password: Remember me

TOPIC: Re: Digital crossover for my WMTMW speakers

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4654

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
Unfortunately not, at least not that easy.
In ArtemiS FIR filter can be used to filter time signals (-> convolution in time domain). Don't have the measured impulse response of your speaker at hand (only frequency response). Could you provide it (textfile of time signal will do)? Alternatively i could calculate it by myself but not before this evening ;)
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4660

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Hehe, you aren't doing this at work are you? ;)

I've checked with a couple of other filter responses and it looks good. The resulting phase isn't exactly zero at higher frequencies, but the phase turning is very slow so it won't be a major problem (but it would of course be good to know why).

I've attached the impulse response (calculated by speaker workshop). Hope it'll work!
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: curryman

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4663

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
At work? It's lunch time ;)

Whats the sampling frequency of the impulse response? 44100Hz?
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4665

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
Can speaker workshop also export other formats? Wave file?

As an alternative i'll go over Matlab, but again, this will be this evening ;)
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4666

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
curryman wrote:
At work? It's lunch time ;)
:laugh:

Yes, it's 44100 Hz. I don't think SW exports in wav format, but I think Scilab can. Not sure how to do it though.
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4673

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
So, I have tested some different filters and data combinations in order to check the resulting phase response. As I wrote before, the phase is close to zero in the pass band for low frequencies but at higher frequencies the phase of the result deviates from zero. Below is one example with imported far field data for a midrange driver. Zero for both magnitude and phase is used as target:



The phase of the resulting response after filtering looks like this:



Any ideas? Can the phase shift seen at higher frequencies be a result of the delay of the filter?

By the way, have any of you tried the Scilab code yet with your own data/targets?
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4690

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
Hey Crumboo,

sorry for comming back a little late. Do you have any news?

I didn't test your code with my own data, since it has a logarithmic scale. So I have to rescale the frequency axis first. Will take some time though, quite busy :(

In an earlier post you mentioned a paper from Prof. Hawksford. I got in contact to him and he provided me his matlab code :cheer: If you are interested I recommend to get in contact to him. Very good-natured person!

It'll take some time to analyze all that really interesting code though :huh:

Hope to find some more time soon to do some progress...
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4691

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Hi,

I think I'm on the right track, and have rewritten much of the code (which now accepts log-spaced data). I'll hope to post more about it later tonight! :)
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4692

  • Jakster
  • Jakster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 4
  • Karma: 3
By the way, have any of you tried the Scilab code yet with your own data/targets?

I did a short test using data exported from holmimpulse (www.holmacoustics.com/holmimpulse.php - great input/output possibilities). I just used their demo data which I exported to a text file. Your code looks fine on that dataset too (though I would prefer the fft size to be measured data OR ntaps (the longer)).

I haven't looked at phase response - maybe next week.
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4695

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
@curryman:

Thank you for the tip about Prof. Hawksford. The code you got from him, is it about creating arbitrary FIR filters?

Before I continue with my code - can you please check the response (magnitude and phase) of the attached FIR? Fs is 44100 Hz. I'm feeling some need for further validation. :)

Best regards

File Attachment:

File Name: FIR_example.txt
File Size:4 KB

This message has an attachment file.
Please log in or register to see it.

The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4696

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
The code has been discussed in this Paper:

Matlab Program for Loudspeaker Equalization and Crossover Design

Didn't take a closer look into the code until now...

The FFT in ArtemiS is not complex (more precise: the representation of the FFT result is not complex), so I did the following:

  1. import your txt file and load as a FIR filter
  2. create a dirac impulse (2ch)
  3. filter ch1 of the dirac file with the FIR filter
  4. calculate the complex transfer function "dirac filtered" / "dirac"

here is the result:



Not absolutely sure if this makes sense though :unsure:

have a nice weekend :)

This message has an attachment image.
Please log in or register to see it.

The administrator has disabled public write access.
The following user(s) said Thank You: Crumboo

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4698

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Thanks curryman!

I've found some more problems in my code so I'll have to do some more changes to it.

Really interesting paper by Prof. Hawksford, it will be interesting to study it in more detail. I believe there is some feature in Scilab for converting Matlab code?

Nice weekend to you all! :)
The administrator has disabled public write access.

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4748

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Hi again, I found some time to rewrite the entire code (found lots of problems) and it looks promising. See the example below with a filter that transforms the imported data into a zero phase brickwall HP response @ 2400 Hz (Hanning window was used). The phase now looks better...



Curryman: once again please, can you check the magnitude and phase response of the attached filter with ArtemiS?

Best regards
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: Jakster

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4751

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Here is another example, all-pass filter thats yields zero phase (1000 taps and Hanning window):



It'll soon getting time to realize this. I haven't decided whether to use a computer with bruteFIR or the upcoming miniSHARC, so any news or info about this product will be most welcome. :)

Best regards
The administrator has disabled public write access.
The following user(s) said Thank You: curryman

Re: Digital crossover for my WMTMW speakers 7 years 8 months ago #4794

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 791
  • Thank you received: 181
  • Karma: 100
Crumboo, sorry for comming back that late. I'm just having a great deal to do :(

Great progress! I'll try to check your filter in ArtemiS, however I'm quite confident that your implementation will be OK ;)

One thing we should discuss is how a suitable target phase response should look like. Linear phase response actually means a constant group delay. So your target response should be derived from the derivative of the phase. The driver with the longest group delay (normally the woofer) sets the group delay for the complete system. What do you (and all the others ;)) think about that?
The administrator has disabled public write access.
Moderators: devteam