IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
Representing frequency of n Hz needs sampling rate >2n Hz, not =2n, From: Badly drawn waveforms vs. the audio that’s actually output/93496
pdq
post Feb 22 2012, 19:52
Post #26





Group: Members
Posts: 3587
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



I recall a study in which members of an orchestra were asked to compare two tones very close in frequency (I think it was A440).

Many of the members were able to distinguish tones only 1 Hz apart, and one member was able to distinguish tones only 0.1 Hz apart.

I then ask myself, did he need to hear the tones for a full ten seconds each so that there was one full cycle difference between them?
Go to the top of the page
+Quote Post
greynol
post Feb 22 2012, 19:54
Post #27





Group: Super Moderator
Posts: 10988
Joined: 1-April 04
From: Northern California
Member No.: 13167



Regarding what happens at the edges, sinc pulses die out fairly rapidly, don't they; especially when realistic levels are taken into account?

This post has been edited by greynol: Feb 22 2012, 20:29


--------------------
Golden ears? Nope. Golden EYE$.
Go to the top of the page
+Quote Post
Woodinville
post Feb 22 2012, 20:25
Post #28





Group: Members
Posts: 1425
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



QUOTE (xnor @ Feb 22 2012, 10:20) *
Even a 8192 samples long filter doesn't cause anything I could hear. Maybe because the passband has to be a lower to make the filter audible, e.g. 18 kHz instead of 21 kHz? Anyway the filter is quite steep. -6 dB at 21 kHz and -90 dB at 21.0157 kHz.


You want to make the filter as steep as possible, not with as much rejection as possible. If I had access to matlab right now I'd give you firpm paramaters, but I tried what I recall in octave via remez and it just died instead. sad.gif


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
Woodinville
post Feb 22 2012, 20:27
Post #29





Group: Members
Posts: 1425
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



QUOTE (pdq @ Feb 22 2012, 10:52) *
I recall a study in which members of an orchestra were asked to compare two tones very close in frequency (I think it was A440).

Many of the members were able to distinguish tones only 1 Hz apart, and one member was able to distinguish tones only 0.1 Hz apart.

I then ask myself, did he need to hear the tones for a full ten seconds each so that there was one full cycle difference between them?


Different problem than you're thinking of for frequency determination, you have here a fixed reference, and a high SNR environment to determine match or not.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
xnor
post Feb 22 2012, 21:07
Post #30





Group: Developer
Posts: 1718
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Woodinville @ Feb 22 2012, 20:25) *
You want to make the filter as steep as possible, not with as much rejection as possible. If I had access to matlab right now I'd give you firpm paramaters, but I tried what I recall in octave via remez and it just died instead. sad.gif

It doesn't get much steeper than that with 8192 samples. I used a windowed sinc filter (Fc=21 kHz) and chose the best window function I could find to give about 90 dB rejection - not more - in my second try. Diffing the original file with the filtered one leaves some high frequency, low level ringing behind. Can't hear that either at normal levels.

This post has been edited by xnor: Feb 22 2012, 21:11


--------------------
Sighted evaluation without blind testing is blind.
Go to the top of the page
+Quote Post
bandpass
post Feb 22 2012, 22:57
Post #31





Group: Members
Posts: 381
Joined: 3-August 08
From: UK
Member No.: 56644



QUOTE (greynol @ Feb 22 2012, 18:54) *
Regarding what happens at the edges, sinc pulses die out fairly rapidly, don't they; especially when realistic levels are taken into account?

Not really; it's because they they die out slowly that we need to window them to make reasonably-lengthed filters.

QUOTE (Woodinville @ Feb 22 2012, 19:25) *
You want to make the filter as steep as possible, not with as much rejection as possible. If I had access to matlab right now I'd give you firpm paramaters, but I tried what I recall in octave via remez and it just died instead. sad.gif

You can use sox to create some sharp FIRs (if you're happy to use a slightly longer filter than remez/firpm would give); e.g.

CODE
sox castanets-2_2496.wav output.wav sinc -a 90 -n 32767 -21k


For 90dB attenuation low-pass, 32767 taps, 6dB corner @ 21kHz; which gives a TBW of 16.6Hz.
Go to the top of the page
+Quote Post
Porcus
post Feb 23 2012, 00:04
Post #32





Group: Members
Posts: 2261
Joined: 30-November 06
Member No.: 38207



QUOTE (greynol @ Feb 22 2012, 19:49) *
A simple impulse will set them in motion, just like any other mechanical device.

That is not to say that this 'motion' can be used to detect a frequency.
Go to the top of the page
+Quote Post
Woodinville
post Feb 23 2012, 05:00
Post #33





Group: Members
Posts: 1425
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



QUOTE (bandpass @ Feb 22 2012, 13:57) *
For 90dB attenuation low-pass, 32767 taps, 6dB corner @ 21kHz; which gives a TBW of 16.6Hz.


What I'm thinking of and trying to build is a remez-designed filter with a cutoff frequency of 20kHz and a -90dB point of about 20050 (not 22050!) Hz. I managed do that after some fiddling in Matlab. No such luck in octave.

I'm not saying that it's a good idea to use such a filter, to be sure.

It's also possible to make a "bad" filter by having too much passband ripple, but that's kind of cheating.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
icstm
post Feb 23 2012, 11:16
Post #34





Group: Members
Posts: 121
Joined: 25-January 12
Member No.: 96698



QUOTE (Woodinville @ Feb 22 2012, 19:25) *
You want to make the filter as steep as possible, not with as much rejection as possible. If I had access to matlab right now I'd give you firpm paramaters, but I tried what I recall in octave via remez and it just died instead. sad.gif
That brings back memories, problem is I cannot remember any of it now. I would probably have to review my own code (I became quite good to commenting my code to read like pseudo code, which should hopefully help me now). Now all I need to do is dig out my old 10-yr old PC that should still have a copy of MatLab...
Go to the top of the page
+Quote Post
bandpass
post Apr 10 2015, 16:07
Post #35





Group: Members
Posts: 381
Joined: 3-August 08
From: UK
Member No.: 56644



QUOTE (Woodinville @ Feb 21 2012, 20:23) *
Well, something fun to try. Build the sharpest 20kHz passband filter you can with whatever FIR design program you have available.

Not one that goes 20kHz passband, 22kHz stop band, but as sharp as your software will design.

Then filter castinetts with it and see what happens. Use ABX, of course. Just give it a try.
...
What I'm thinking of and trying to build is a remez-designed filter with a cutoff frequency of 20kHz and a -90dB point of about 20050 (not 22050!) Hz.

I've been trying this with a remez design of Fp=20000, Fs=20001, and dp=ds=–90dB, which gives a filter around 5 seconds long.

Nothing bad happens AFAICT—I can't ABX it with castanets.

Dunn's pre/post echos can be heard by cranking up the volume, but they are a further 6dB below the nominal rejection level, so nothing untoward.

Samples & filter coefficients (@ 44100, 48k, & 96k) are here if anyone wants to play.

Go to the top of the page
+Quote Post
Wombat
post Apr 10 2015, 16:50
Post #36





Group: Members
Posts: 1257
Joined: 7-October 01
Member No.: 235



QUOTE (bandpass @ Apr 10 2015, 17:07) *
Nothing bad happens AFAICT—I can't ABX it with castanets.

Nice pics for illustrating the frequencies of ringing, better as this impulse crap we see elsewhere.
Since the strong ringing happens at 20kHz it should be not touched by the filter of the DAC playing it back.
If this isn't abxble what is?


--------------------
Is troll-adiposity coming from feederism?
Go to the top of the page
+Quote Post
krabapple
post Apr 10 2015, 18:50
Post #37





Group: Members
Posts: 2758
Joined: 18-December 03
Member No.: 10538



QUOTE (Wombat @ Apr 10 2015, 11:50) *
QUOTE (bandpass @ Apr 10 2015, 17:07) *
Nothing bad happens AFAICT—I can't ABX it with castanets.

Nice pics for illustrating the frequencies of ringing, better as this impulse crap we see elsewhere.
Since the strong ringing happens at 20kHz it should be not touched by the filter of the DAC playing it back.
If this isn't abxble what is?


Well we don't absolutely know that 'this isn't abxable'.

False negatives, and all that ;>
Go to the top of the page
+Quote Post
greynol
post Apr 10 2015, 19:11
Post #38





Group: Super Moderator
Posts: 10988
Joined: 1-April 04
From: Northern California
Member No.: 13167



We could pull a ten year old off the street.


--------------------
Golden ears? Nope. Golden EYE$.
Go to the top of the page
+Quote Post
Wombat
post Apr 10 2015, 19:50
Post #39





Group: Members
Posts: 1257
Joined: 7-October 01
Member No.: 235



I don't want to hijack this thread to much but this talk about ringing everywhere makes me wonder.
You can't argue much about it. To many audiophiles and people insist on this is what matters most with HiBitrate music.
Archimago lately did some about how software is handling dsd conversion.
dsd encoders
Unfortunately on his blog everyone can add his own view. You see jk_audio rates the dsd conversation to 24/96 on the amount of ringing as it was the most well understood thing in audio.
For a 96kHz samplerate this means no matter how the funny impulse picture looks like it only is slight noise at the filters edge.
To me this means if some low noise at frequencies way above our hearing damage sound it may be better to record nothing at all above 20kHz.
I feel a bit lost arguying about these things and slightly seem to get paranoid about 'RINGING' because i find nothing that convinces me at all.


--------------------
Is troll-adiposity coming from feederism?
Go to the top of the page
+Quote Post
Canar
post Apr 10 2015, 21:06
Post #40





Group: Super Moderator
Posts: 3402
Joined: 26-July 02
From: To:
Member No.: 2796



"Ringing" is an arbitrary term we've assigned to a visually-perceived phenomenon. I believe that claims of ringing's audibility are strongly overstated. Perhaps some of the more savvy folks will clue me in here.

What "audiophiles and people" claim is irrelevant to what is actually true. My experience is that when "audiophiles" talk about a phenomenon that is visually-apparent but I struggle to even perceive audibly, the audiophiles are most likely out to lunch.

This post has been edited by Canar: Apr 10 2015, 21:10


--------------------
1. Attack the argument, not the arguer.
2. Assume good faith.
Go to the top of the page
+Quote Post
greynol
post Apr 10 2015, 21:12
Post #41





Group: Super Moderator
Posts: 10988
Joined: 1-April 04
From: Northern California
Member No.: 13167



Audibility depends on the frequency (wrt human thresholds) and the signal being filtered. In the case of Meridian et. al, I'm not buying it.

One can argue that terms are arbitrarily chosen for all kinds of phenomena. In the case of filters, I believe it is aptly chosen.

This post has been edited by greynol: Apr 10 2015, 21:15


--------------------
Golden ears? Nope. Golden EYE$.
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Apr 11 2015, 13:42
Post #42





Group: Members
Posts: 5965
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (greynol @ Feb 17 2012, 16:09) *
Put another way it is impossible to know with any certainty the amplitude of a pure tone with only two regularly spaced points per cycle.



Another way to look at it is that as the sampled frequency closely approaches the Nyquist frequency, the tone burst fidelity decreases considerably.

Here are some examples of the same downsampling from 2496 to 1644, but with vastly different width transition bands

Link to pictures in the uploads forum

This post has been edited by Arnold B. Krueger: Apr 11 2015, 14:12
Go to the top of the page
+Quote Post
xnor
post Apr 11 2015, 18:39
Post #43





Group: Developer
Posts: 1718
Joined: 29-April 11
From: Austria
Member No.: 90198



There is actually very simple way to explain why this is:

Imagine a single sine wave cycle: it starts out at 0, rises to +1 (at 90°), drops to 0 again (180°), drops further to -1 (270°), rises to 0 again (360°).


If you take just 2 samples starting at 90° we get (+1, -1) and everything is fine, right? Well, what if we start a 0° or 180° ... we get (0, 0) which is digital silence, and not a tone.

This post has been edited by xnor: Apr 11 2015, 18:39


--------------------
Sighted evaluation without blind testing is blind.
Go to the top of the page
+Quote Post
krabapple
post Apr 12 2015, 02:18
Post #44





Group: Members
Posts: 2758
Joined: 18-December 03
Member No.: 10538



QUOTE (Wombat @ Apr 10 2015, 14:50) *
I don't want to hijack this thread to much but this talk about ringing everywhere makes me wonder.
You can't argue much about it. To many audiophiles and people insist on this is what matters most with HiBitrate music.
Archimago lately did some about how software is handling dsd conversion.
dsd encoders
Unfortunately on his blog everyone can add his own view. You see jk_audio rates the dsd conversation to 24/96 on the amount of ringing as it was the most well understood thing in audio.


you mean jr_audio.

freudian slip there? ;>


All I'll say about that thread is, Archimago is being very polite. I see Oohashi et al. and the 'hypersonic effect' have made their predictable entrance rolleyes.gif

This post has been edited by krabapple: Apr 12 2015, 02:20
Go to the top of the page
+Quote Post
greynol
post Apr 12 2015, 03:30
Post #45





Group: Super Moderator
Posts: 10988
Joined: 1-April 04
From: Northern California
Member No.: 13167



QUOTE (xnor @ Apr 11 2015, 10:39) *
If you take just 2 samples starting at 90° we get (+1, -1)

What if I had sampled that sine wave at 30 and 210 and gave you the data. How do you know how loud it was initially?


--------------------
Golden ears? Nope. Golden EYE$.
Go to the top of the page
+Quote Post
Woodinville
post Apr 12 2015, 06:00
Post #46





Group: Members
Posts: 1425
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



Waaaiiittt.

When dealing with anything close to FS/2, you have to consider, carefully, what the bandwidth of the signal you're putting in actually is.

If it's one cycle of a sine wave, like you all keep talking about, that has an enormous bandwidth, not just a line at the frequency of the sine wave that was windowed.

It's all about the input bandwidth. If it's over fs/2 weird stuff happens. No more, no less.

Because of the requirement for filtering, the closer you get to fs/2, the more delay you must have in a filter. At fs/2 the delay goes to infinity.

It's that simple. Really.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
splice
post Apr 12 2015, 08:45
Post #47





Group: Members
Posts: 158
Joined: 23-July 03
Member No.: 7935



QUOTE (greynol @ Apr 10 2015, 10:11) *
We could pull a ten year old off the street.


I see what you did there. Or just another Freudian slip?

This post has been edited by splice: Apr 12 2015, 08:46


--------------------
Regards,
Don Hills
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Apr 12 2015, 13:17
Post #48





Group: Members
Posts: 5965
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (greynol @ Apr 11 2015, 22:30) *
QUOTE (xnor @ Apr 11 2015, 10:39) *
If you take just 2 samples starting at 90° we get (+1, -1)

What if I had sampled that sine wave at 30 and 210 and gave you the data. How do you know how loud it was initially?


As we all know that's the point. Given only two values for samples along a wave, and an infinite number of different wave frequencies, phase shifts, and amplitudes can fit them.

Given 3 points, or even just slightly more than 2 points, and those values define exactly one combination of frequency, phase, and amplitude.

The only wave form that can be accurately reproduced just below a brick wall filter's corner frequency is a pure sine wave.

Apply any signal you want to a good digital channel, but only modulated sine waves will be passed above half Nyquist.

As those sine waves frequencies approach Nyquist, smaller and smaller proportions of any modulation of the sine wave will be accurately reproduced.
Go to the top of the page
+Quote Post
xnor
post Apr 12 2015, 13:18
Post #49





Group: Developer
Posts: 1718
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (greynol @ Apr 12 2015, 03:30) *
What if I had sampled that sine wave at 30 and 210 and gave you the data. How do you know how loud it was initially?

Exactly, you get this ambiguity with any amount of phase shift. Starting at 0° resulting in silence was the extreme example of that.

But you can use an alternating sequence of +1, -1. You could for example turn it into a FIR filter, a high pass, by attenuating it such that your gain is 0 dB at Fs/2. Here's a thought experiment: what happens if we approach an infinitely long sequence ... wink.gif


QUOTE (Woodinville @ Apr 12 2015, 06:00) *
If it's one cycle of a sine wave, like you all keep talking about, that has an enormous bandwidth, not just a line at the frequency of the sine wave that was windowed.

Yes, of course, but only if the amplitude was zero outside that range of the single cycle.

In the image I posted the sine continues with a dashed line in both directions, so interpret that 'single cycle' as just looking at a section of a pure tone of infinite duration.


--------------------
Sighted evaluation without blind testing is blind.
Go to the top of the page
+Quote Post
[JAZ]
post Apr 12 2015, 15:05
Post #50





Group: Members
Posts: 1835
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



QUOTE (xnor @ Apr 12 2015, 13:18) *
Yes, of course, but only if the amplitude was zero outside that range of the single cycle.

In the image I posted the sine continues with a dashed line in both directions, so interpret that 'single cycle' as just looking at a section of a pure tone of infinite duration.


This concrete discussion needs not take any longer. The theorem only guarantees signals >2Fs, not >=2Fs. Basically, if the sampled frequency is smaller than the sampling frequency, after some amount of time, all the possible points have been sampled.
If it is exactly 2F, this cannot happen, and only when knowing the phase (and this one not being 0 or 180degree), it might get reconstructed. (which is a special case that resamplers do not contemplate) . Actually, no, it cannot either, you need another assumption which is knowing the signal,and if you know the signal, you've "sampled" it in some other way. (Although, in fact, it can only be a sine, because any other signal would have been theoretically filtered away due to the Sampling frequency cutoff)

This post has been edited by [JAZ]: Apr 12 2015, 15:17
Go to the top of the page
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 5th August 2015 - 01:44