Jump to content
IGNORED

John Atkinson: Yes, MQA IS Elegant...


Recommended Posts

14 minutes ago, Shadders said:

Hi,

I am stating that the positive and negative unit steps discontinuities at the point (5pi/2) cancel, and contribute no spectrum.

 

Regards,

Shadders.

still not following... are you saying there are + and - steps in the dV/dt of the gated sine that occur at the same time?

Link to comment
Just now, psjug said:

still not following... are you saying there are + and - steps in the dV/dt of the gated sine that occur at the same time?

Hi,

For the equation :

y(x) = [u(x)-u(x-5pi/2)].sin(x) + u(x-5pi/2)

 

The negative unit step multiplied by the sin function occurs at (5pi/2). The positive unit step at (5pi/2) cancels this negative unit step.

 

The positive unit step [u(x)] multiplied by the sin(x) occurs at x=0, not at (5pi/2).

 

Regards,

Shadders.

Link to comment
24 minutes ago, mansr said:

There are no step functions in nature.

 

For that matter there probably isn't such a thing in practice as a perfectly band limited signal. 

One never knows, do one? - Fats Waller

The fairest thing we can experience is the mysterious. It is the fundamental emotion which stands at the cradle of true art and true science. - Einstein

Computer, Audirvana -> optical Ethernet to Fitlet3 -> Fibbr Alpha Optical USB -> iFi NEO iDSD DAC -> Apollon Audio 1ET400A Mini (Purifi based) -> Vandersteen 3A Signature.

Link to comment
35 minutes ago, Shadders said:

Hi,

For the equation :

y(x) = [u(x)-u(x-5pi/2)].sin(x) + u(x-5pi/2)

 

The negative unit step multiplied by the sin function occurs at (5pi/2). The positive unit step at (5pi/2) cancels this negative unit step.

 

The positive unit step [u(x)] multiplied by the sin(x) occurs at x=0, not at (5pi/2).

 

Regards,

Shadders.

Hi Shadders,

Given that your function does violate the bandwidth requirements, you can look at this in 3 ways (or more?):

 

1- Why? As explained by @mansr, your function is a rectangle multiplied by a sine added to a step. Both the rectangle and step have infinite frequency content. And the sine is a single frequency. In the frequency domain, you convolve the spectrums of the rectangle(infinite bandwidth) and sine (impulse), and add the spectrum of the step (infinite bandwidth). The cancellation you seek (and see in the time domain) doesn't occur in the frequency domain.

 

2- Prove it. Just look at the Fourier Transform of your function. @mansr suggests doing it analytically, but you can also just do it numerically on your time domain data:

image.thumb.png.8d4b018825fc0e4c3ec2b79209299ce6.png
3- Work backwards. Look at your filtered result:

image.thumb.png.fddb110f3b43fd776ac29524ef220b17.png

This shows that that transition contains higher frequencies than you expect.

Link to comment
2 minutes ago, SoundAndMotion said:

Hi Shadders,

Given that your function does violate the bandwidth requirements, you can look at this in 3 ways (or more?):

 

1- Why? As explained, your function is a rectangle multiplied by a sine added to a step. Both the rectangle and step have infinite frequency content. And the sine is a single frequency. In the frequency domain, you convolve the spectrums of the rectangle(infinite bandwidth) and sine and add the spectrum of the step (infinite bandwidth). The cancellation you seek (and see in the time domain) doesn't occur in the frequency domain.

 

2- Prove it. Just look at the Fourier Transform of your function. @mansr suggests doing it analytically, but you can also just do it numerically on your time domain data:

image.thumb.png.8d4b018825fc0e4c3ec2b79209299ce6.png
3- Work backwards. Look at your filtered result:

image.thumb.png.fddb110f3b43fd776ac29524ef220b17.png

This shows that that transition contains higher frequencies than you expect.

Hi,

Thanks. I will examine the start of the gated sine more closely later.

 

To explain, the filter has a finite memory - 512 taps. So, any spectrum generated by the start of the gated sine will have decayed to zero - the transient will have stopped and the steady state condition remains - the sine wave.

 

At the transition of the sine to the constant 1, there is no discontinuity. This transition can be seen as a negative unit step multiplied by the sine (the unit step will essentially be time reversed and delayed to 5pi/2), and the positive unit step delayed to (5pi/2). It is this transition to the constant level 1, which has no discontinuity, where the unit steps discontinuities cancel out, is of interest.

 

My point is - there are transients in music, and the transient response of the filter can be seen graphically, and they do not need to have out of band energy for the transient response to be seen. Every case of "ringing" is seen as the result of out of band energy, whereas this ringing occurs without the need for out of band energy. Every filter has the steady state response, and the transient response.

 

Regards,

Shadders.

Link to comment
7 minutes ago, Shadders said:

Every case of "ringing" is seen as the result of out of band energy

Ringing is the result of energy at the cut-off frequency. What happens at either side is irrelevant. Please see the examples on the website I linked earlier.

Link to comment
55 minutes ago, Shadders said:

Hi,

For the equation :

y(x) = [u(x)-u(x-5pi/2)].sin(x) + u(x-5pi/2)

 

The negative unit step multiplied by the sin function occurs at (5pi/2). The positive unit step at (5pi/2) cancels this negative unit step.

 

The positive unit step [u(x)] multiplied by the sin(x) occurs at x=0, not at (5pi/2).

 

Regards,

Shadders.

OK now I'm following you better.  I didn't realize you were adding a step function at the close of the gate.  But you see derivatives show that this is not a smooth function at 5*pi/2 even though you don't see a "corner" there?

Link to comment
6 hours ago, mansr said:

There are no step functions in nature.

 

Quanta?

 

Also, the whole ringing house of cards assume there is does it not?  

 

 

5 hours ago, Jud said:

 

For that matter there probably isn't such a thing in practice as a perfectly band limited signal. 

 

I was thinking the opposite - only in nature is there such thing as a perfectly band limited signal... O.o

 

Oh well, I will try to quit thinking...

Hey MQA, if it is not all $voodoo$, show us the math!

Link to comment
5 hours ago, mansr said:

Ringing is the result of energy at the cut-off frequency. What happens at either side is irrelevant. Please see the examples on the website I linked earlier.

Hi,

I ran the sine with constant level through Octave - indeed there is out of band energy - see plot :

 

image.thumb.png.b22b04853129aa37b0c0dd91be5dfb49.png

The signal is sampled at 192kHz, filter is set to cut off at 48kHz. Energy at 48kHz is -108.21dB. This energy causes the following "ringing" :

image.thumb.png.e998251110c779401bb533b3c7fba2d4.png

 

The peak value in the waveform is 1.0003 - this is 0.0003 greater than the input waveform - where the 0.0003 is -70.46dB (compared to 1.0volt). The maximum value of the filter coefficient is 0.24905. To be analysed, is how the power at 48kHz which is -108.21dB causes the -70dB peak (+38dB), when the peak coefficient is 0.25.

 

What does need to be investigated is the hump in the plot - which is not part of the filter ringing.

 

Regards,

Shadders.

Link to comment
18 minutes ago, Shadders said:

I ran the sine with constant level through Octave - indeed there is out of band energy - see plot :

 

image.thumb.png.b22b04853129aa37b0c0dd91be5dfb49.png

The signal is sampled at 192kHz, filter is set to cut off at 48kHz. Energy at 48kHz is -108.21dB. This energy causes the following "ringing" :

image.thumb.png.be18e7db1f6ce1261bfbd6dbc167241f.png

The peak value in the waveform is 1.0003 - this is 0.0003 greater than the input waveform - where the 0.0003 is -70.46dB (compared to 1.0volt). The maximum value of the filter coefficient is 0.24905. To be analysed, is how the power at 48kHz which is -108.21dB causes the -70dB peak (+38dB), when the peak coefficient is 0.25.

 

The hump in the response also needs to be examined - this shows that the filter response if not just ringing.

Could you post the Octave commands you used to create those plots.

Link to comment
1 minute ago, mansr said:

Could you post the Octave commands you used to create those plots.

Hi,

As follows - should produce the plots :

fs = 192000;
ts = 1/fs;
n = 0:192000;               % Variable used for indexing
x = zeros(1, length(n));  % Input signal initialisation
b = fir1(500, 0.25);        % Create the FIR response

f = 1000;
t = n(1:fs);
x = sin(2*pi*f*t/fs);
gate = zeros(1,fs);
gate(9409:10370) = 1;  %Select 5 sine waves
z = gate.*x;
z(9841:192000) = 1;      %Set the remaining samples to 1 after 2 1/4 sine waves
zf = filter(b, 1, z);       %filter the input signal
 

xftfilt=abs(fft(filter(b,1, z)));
xftfilt = xftfilt./max(xftfilt);
figure(1);
plot(1:length(xftfilt), 20*log10(xftfilt));

 

figure(2);
plot(1:length(zf), zf);

Link to comment

Hi,

Need to correct the data above - cut off frequency is at 24kHz - now assumed. I used the fir1 command which by default uses a Hamming window to generate the filter - this has some in band ripple, and has a response similar to a Chebyshev filter. There is no note in the help text online about the Nyquist frequency.

 

If you examine the online help for Remez :

https://octave.sourceforge.io/signal/function/remez.html

 

States "Frequency is in the range (0, 1), with 1 being the Nyquist frequency.". As such, setting the filter parameter to 0.25 equates to 24kHz. (Matlab uses 0.5 for Nyquist Frequency, from memory)

 

I attempted to use a Butterworth filter, but a bug in Octave for this command failed in creating a 512tap filter.

 

The power at 24kHz is -102.86dB and the peak in the ringing is -70.86dB. This means that the difference between the energy creating the ringing and the ringing is +32dB. The filter should have a gain of 1, whereas the gain is 1,000.

 

The ringing seems to be modulated - here are the plots of the fir1 with 512taps, and 1024taps.

image.thumb.png.7961f2e40a6a321bd6de8050b496fda1.png 512tap

image.thumb.png.8f8ca7b3a22a646f9dd7b386ea7cd4be.png1024 tap

The lower frequency humps/ringing seems to be at 1kHz - the input sine wave frequency. There is a possibility that Octave has a bug - but the energy/power at 1kHz is -57dB - and i would expect that this frequency range is the main contributor to the transient response seen in the graph.

image.thumb.png.57812506a64820b0340f11edd0591afa.png

Since the system is linear, then we can state that despite the ringing caused by the -102.86dB at 24kHz, that the response seen in graphs above are the transient response to the in band signals.

 

As such, even though a band limited signal does not generate ringing, it will generate a transient response as per the graphs. The transient response changes depending on the filter length, and will change depending on the filter type.

 

The Octave text previously posted will allow anyone else to examine - Octave is free - it is provided as free alternative to Matlab.

 

Regards,

Shadders.

 

Link to comment

Hi,

Ran a few calculations - each period of the sine wave at 1kHz has 192 samples with the sample rate at 192kHz. The filter length stores these samples, where 256tap will store 1 period, 512tap will store 2 periods, and 1024taps stores 4 periods.

 

The input signal has 2 1/4 periods before levelling, hence the reason for the 2 sine waves in the output for the large filters.

 

image.thumb.png.eeb5a61c3d1fa723e713c212ceb48772.png256tap

 

image.thumb.png.df62913bc0b185d003bdda5b72fbccb9.png512tap

 

image.thumb.png.d6957b458872f0701d5688037511fd4e.png1024tap

image.thumb.png.c2010353f6855ed6ebce4ae89becff87.png2048tap

 

So, the memory of the filter means that the stored input is added to the incoming input when there is a transient change - in this case a faster signal added to a slower signal.

 

I can see why MQA claim that the current filters smear. So maybe the concept behind MQA using smaller tap filters is a very good strategy. Their ability to store previous inputs (memory) is low, such that when transients occur in the music, that their distortion of the music is minimised.

 

Regards,

Shadders.

Link to comment
18 minutes ago, Shadders said:

So, the memory of the filter means that the stored input is added to the incoming input when there is a transient change - in this case a faster signal added to a slower signal.

There's nothing surprising about this. A better filter doesn't do that:

shadders-filter.thumb.png.02daf64657e99351ee917d6b040a9643.png

Blue line is from the Octave code you posted above. Red is the same with only a change to the filter.

Link to comment
1 minute ago, Miska said:

 

Just remember to always look time domain analysis side by side with frequency domain analysis... It so common mistake to look at only one of the viewpoints and forget the other one, while the two are mathematically bound to each other.

 

All-pass filter will have perfect time-domain performance but completely imperfect frequency-domain performance. As an example, abstract step response has infinite frequency spectrum. Naturally something sampled at non-infinite sampling rate will have bandwidth capacity less than infinite, so the step cannot retain infinite frequency spectrum either. You will just need to decide what kind of response is acceptable from both frequency and time domain perspective.

 

Hi,

Yes - i posted the frequency spectrum for the 512tap earlier. This is about the transient response of a filter, not the steady state.

 

All measurements or frequency and phase plots etc., are discussed based on the filters steady state condition. Although my signal has out of band energy due to construction of the levelling of the sine to 1, it is the in band energy that causes the distortion of the output of the signal from the filter.

 

I understand that the input signal used is perhaps not real world - who would listen to it ?., but it was done to illustrate a point.

 

Not all that MQA is saying is wrong or should be dismissed. They have just not shared the detail. If there is little energy at the extremities of the audio, then why use a large tap filter with the "smearing" (MQA's words not mine) if you can relax the filter sufficiently and reduce the transient effects (smear) too. I think what MQA have done in this aspect, is quite ingenious.

 

Regards,

Shadders.

Link to comment
5 minutes ago, mansr said:

There's nothing surprising about this. A better filter doesn't do that:

shadders-filter.thumb.png.02daf64657e99351ee917d6b040a9643.png

Blue line is from the Octave code you posted above. Red is the same with only a change to the filter.

Hi,

Which filter did you use ?

I just ran 64 taps - and get a better response.

Regards,

Shadders.

Link to comment
7 minutes ago, Shadders said:

Yes - i posted the frequency spectrum for the 512tap earlier. This is about the transient response of a filter, not the steady state.

 

All measurements or frequency and phase plots etc., are discussed based on the filters steady state condition. Although my signal has out of band energy due to construction of the levelling of the sine to 1, it is the in band energy that causes the distortion of the output of the signal from the filter.

 

No, I am talking precisely about frequency content of the transient. You can easily deduct filter impulse response - it's frequency response, from it's time domain step response.

 

Plain sine is pretty useless for inspecting filters in frequency domain, unless you have wider bandwidth than the data represents (like example plots above which are sampled at 10 MHz).

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
33 minutes ago, mansr said:

fir1(500, 0.25, 'low', kaiser(501, 32))

Hi,

Thanks. So does everyone use the kaiser window ?.

 

EDIT : OK, just did a quick check, the values of the filter coefficients have a dynamic range from 2x10^-17 to 0.25. So not appropriate for fixed point arithmetic in IC's.

 

How would you implement this filter with similar performance using fixed point arithmetic ?

 

Is this an issue in DAC IC's from Texas, Cirrus etc. ???

 

Regards,

Shadders.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...