• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

LinFIR – DSP Software for FIR/IIR Filter Design and Speaker Correction

Oh! do you mean time difference of arrival (TDOA) or phase shift? I understand that it is the time difference of a signal arriving at left and right ear that the brain uses to deduce the direction from which the sound originates.
Ah. yes, the usual distinction between time delay and phase. Time delay could be seen as frequency-dependent phase shift.
 
Thanks for the references which I will study.

I certainly would not worry about a 4 degrees phase shift between 100 and 10,000 Hz, but a 20 degree phase shift between 1000 Hz and 10,000Hz is worth making compensation.
Any temperature gradient in your room will result in more than 20 degrees of phase shift.
 
Anyway, turntables integration is nearly finished :-)

I still need to make sure that everything is working perfectly.

Capture d’écran 2026-06-26 à 18.10.59.png
 
Any temperature gradient in your room will result in more than 20 degrees of phase shift.

Could you clarify, please? What do you mean by temperature gradient? As in, the top half of the room is a few degrees warmer than the bottom half? And how did you get that result of 20 degrees? Presumably the mechanism is the different speed of sound in cold vs. hot air due to the density difference?
 
Indeed. I think @Waveform Fidelity should start a separate thread about his theories/speculation about phase.
I have no theories nor speculation about "phase" as you put it - what I actually said was why not compensate the electroncs phase shifts if it costs nothing to do, in the design of the EQ filters. Then came the claims (almost protests) that phase shifts are not audiable - without any references, studies etc. So that shuts down any further exchanges with the opportunity for members to advance their knowledge - sigh.
 
I have no theories nor speculation about "phase" as you put it - what I actually said was why not compensate the electroncs phase shifts if it costs nothing to do, in the design of the EQ filters. Then came the claims (almost protests) that phase shifts are not audiable - without any references, studies etc. So that shuts down any further exchanges with the opportunity for members to advance their knowledge - sigh.
That is not how it works. You are the one claiming the phase shifts are audible, counter to most literature in the field, so the burden of proof is on you.
 
I don't think anyone is claiming "no phase issues cause audible problems" right?

Surely there are degrees of severity?

Is there a quantified range where "problem vs not" is not settled?

I've seen consensus here that "perfection is not achievable", and many members I respect advise minimalism in DSP generally, advocate for a light touch, striving for false goals causes additional unintended problems, the secret sauce is knowing when it's "good enough"...
 
Could you clarify, please? What do you mean by temperature gradient? As in, the top half of the room is a few degrees warmer than the bottom half? And how did you get that result of 20 degrees? Presumably the mechanism is the different speed of sound in cold vs. hot air due to the density difference?
Let's say you have a wall exposed to the sun: the temperature in your room will not be homogeneous. You can have 2-4 °C of temperature difference between the sides of the room.

Anyway, I have Pololu Tic and Arduino (Grill/Audiomatica) based turntables working. I need to check if everything works fine under Windows before releasing the update.
 
Let's say you have a wall exposed to the sun: the temperature in your room will not be homogeneous. You can have 2-4 °C of temperature difference between the sides of the room.

Okay, I looked it up. The typical temperature gradient in a room is about 0.5C - 1.5C per meter of height. For a 3m tall room, that's between 1.5C - 4.5C. I was not aware that the temperature gradient would be so high, you learn something new eh! Anyway let's do some maths.

Speed of sound c = 331.4 + 0.6T
Minimum speed of sound (assuming ambient temp = 20C) = 343.4m/s
Maximum speed of sound (20C + 4.5C) = 346.1m/s

Assume 3m listening distance.
Minimum time of flight delay (speed of sound 346.1m/s) = 8.67
Maximum TOF delay (speed of sound 343.3m/s) = 8.74ms
Delta = 0.07ms

One period of 20kHz = 1000/20000 = 0.05ms
Phase rotation at 20kHz = (360 * 0.07/0.05) = 504deg

One period of 1kHz = 1000/1000 = 1ms
Phase rotation at 1kHz = (360 * 0.07/1) = 25.2deg

One period of 100Hz = 1000/100 = 10ms
Phase rotation at 100Hz = (360 * 0.07/10) = 2.52deg

... looks like you are right. Thanks for that.
 
Let's say you have a wall exposed to the sun: the temperature in your room will not be homogeneous. You can have 2-4 °C of temperature difference between the sides of the room.

Anyway, I have Pololu Tic and Arduino (Grill/Audiomatica) based turntables working. I need to check if everything works fine under Windows before releasing the update.
Obviously it was Grbl, not Grill... Thanks autocorrect...
 
Okay, I looked it up. The typical temperature gradient in a room is about 0.5C - 1.5C per meter of height. For a 3m tall room, that's between 1.5C - 4.5C. I was not aware that the temperature gradient would be so high, you learn something new eh! Anyway let's do some maths.

Speed of sound c = 331.4 + 0.6T
Minimum speed of sound (assuming ambient temp = 20C) = 343.4m/s
Maximum speed of sound (20C + 4.5C) = 346.1m/s

Assume 3m listening distance.
Minimum time of flight delay (speed of sound 346.1m/s) = 8.67
Maximum TOF delay (speed of sound 343.3m/s) = 8.74ms
Delta = 0.07ms

One period of 20kHz = 1000/20000 = 0.05ms
Phase rotation at 20kHz = (360 * 0.07/0.05) = 504deg

One period of 1kHz = 1000/1000 = 1ms
Phase rotation at 1kHz = (360 * 0.07/1) = 25.2deg

One period of 100Hz = 1000/100 = 10ms
Phase rotation at 100Hz = (360 * 0.07/10) = 2.52deg

... looks like you are right. Thanks for that.
Not to debate this much further, but we were discussing whether the medium is dispersive. That means the speed of sound vs frequency. Your calculations are showing speed of sound with temperature - no debate about that
 
Not to debate this much further, but we were discussing whether the medium is dispersive. That means the speed of sound vs frequency. Your calculations are showing speed of sound with temperature - no debate about that
A temperature gradient will render the medium more dispersive in frequency. For large wavelengths, the waves see an average air density, whereas shorter wavelengths will travel through the gradient and locally see a varying speed of sound:
If the wavelength λ is larger than the length L of the gradient, the effective speed of sound in the medium will be

c1=sqrt(K/<ρ>), where K is the elasticity modulus and <ρ> the average density.

For shorter wavelengths this is a bit more interesting. The travel time is,

T= int_0^L 1/c(x) dx,

where int_0^L is the integral from 0 to L and c(x) the local speed of sound along the gradient. Replacing c(x) with sqrt(K/ρ(x)) we get,

T= 1/sqrt(K) int_0^L sqrt(ρ(x)) dx = L <sqrt(ρ)>/sqrt(K)

And the effective speed of sound is

c2=sqrt(K)/<sqrt(ρ)>

Note that in the first case we have sqrt(<ρ>) and in the second we have <sqrt(ρ)>, which is the square root of the average vs. the average of the square roots. The Jansen inequality implies that c2 > c1. Thus, different wavelengths have strictly different speed of sound in a temperature gradient. Anyway, I guess the difference is ridiculously small in a room.

I hope this clarifies everything and that we can move forward. BUT, if I made a calculation error, please correct me. :)
 
Last edited:
Indeed, this is totally negligible. :p

I get a difference of the order of a few nanoseconds. That's the value of doing the math properly: sorting problems by order of magnitude. Room reflections and acoustic loading have an incomparably greater impact.

Anyway, back to LinFIR. This week I'll do some real-world testing of the latest beta build. I’m setting up a DIY 2.1 system I built for my dad, which is the perfect excuse to finally run some practical trials with the automated turntable control.
 
I just released LinFIR v1.3.5!

It now supports turntables based on Pololu Tic controllers or Arduino/Grbl (like the Audiomatica Medusa). It allows automated spinorama measurements, which alleviates the burden of doing it manually.

Also, FIR filters can now be exported in C array format and I've updated several dependencies to fix underlying bugs.

The Windows version should be available in a few hours.

As always, feedback is welcome. :)
 
allows automated spinorama measurements
Wow that is huge!

I hope to see a cookbook HowTo on that.

> FIR filters can now be exported in C array format

Which DSPs use those?

I've seen IRS, BIN, TXT / CSV / YAML

WAV of course - is that "the" standard in the XKCD sense?

Are there others?
 
Back
Top Bottom