Representing frequency of n Hz needs sampling rate >2n Hz, not =2n, From: Badly drawn waveforms vs. the audio that’s actually output/93496 |
![]() ![]() |
Representing frequency of n Hz needs sampling rate >2n Hz, not =2n, From: Badly drawn waveforms vs. the audio that’s actually output/93496 |
Feb 22 2012, 19:52
Post
#26
|
|
|
Group: Members Posts: 3083 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? |
|
|
|
Feb 22 2012, 19:54
Post
#27
|
|
![]() Group: Super Moderator Posts: 9269 Joined: 1-April 04 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 -------------------- Everything sounds the same until it is proven otherwise.
|
|
|
|
Feb 22 2012, 20:25
Post
#28
|
|
![]() Group: Members Posts: 1355 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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. -------------------- -----
J. D. (jj) Johnston |
|
|
|
Feb 22 2012, 20:27
Post
#29
|
|
![]() Group: Members Posts: 1355 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
Feb 22 2012, 21:07
Post
#30
|
|
![]() Group: Developer Posts: 304 Joined: 29-April 11 From: Austria Member No.: 90198 |
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. 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 |
|
|
|
Feb 22 2012, 22:57
Post
#31
|
|
![]() Group: Members Posts: 266 Joined: 3-August 08 From: UK Member No.: 56644 |
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. 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. 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. |
|
|
|
Feb 23 2012, 00:04
Post
#32
|
|
![]() Group: Members Posts: 1476 Joined: 30-November 06 Member No.: 38207 |
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. -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 23 2012, 05:00
Post
#33
|
|
![]() Group: Members Posts: 1355 Joined: 9-January 05 From: JJ's office. Member No.: 18957 |
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 |
|
|
|
Feb 23 2012, 11:16
Post
#34
|
|
|
Group: Members Posts: 121 Joined: 25-January 12 Member No.: 96698 |
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. 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... |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 26th May 2013 - 07:42 |