IPB

Welcome Guest ( Log In | Register )

> Upload forum rules

- No over 30 sec clips of copyrighted music. Cite properly and never more than necessary for the discussion.


- No copyrighted software without permission.


- Click here for complete Hydrogenaudio Terms of Service

3999hz Sine at 8khz SR, Generated by Audacity to prove a point.
hornpipe2
post Aug 30 2013, 21:04
Post #1





Group: Members
Posts: 5
Joined: 30-August 13
Member No.: 109888



Here is a 5 second tone produced by:

* Start Audacity
* Set Project Rate to 8000hz
* Generate -> Tone
- 3999hz
- 1.0 peak amplitude
- 5 sec duration
* Export as 16-bit 8khz WAV.

Shannon-Nyquist says: my 8khz wave file should perfectly capture my 3.999khz sine wave, because 3.999khz < (8khz / 2).

Now my question: Why, oh why, does Audacity, foobar2000, WMP et al play this back with beats? There is a .5sec periodic amplitude osc going on.

What setup do I need to hear this played back as a pure 3.999khz tone?
Attached File(s)
Attached File  tone.wav ( 78.17K ) Number of downloads: 90
 
Go to the top of the page
+Quote Post
 
Start new topic
Replies
greynol
post Aug 31 2013, 18:51
Post #2





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



...so long as the rest of the process up to the sound waves reaching the listener's ear is linear, or are you suggesting that a 23kHz tone and a 25kHz tone with a 48kHz sample rate cannot create a 2kHz tone?

What I find curious is that I see the beating in Adobe Audition where I had assumed it could display what the waveform would look like with perfect reconstruction. Clearly I don't understand how the program is going about connecting the dots.

This post has been edited by greynol: Aug 31 2013, 19:09


--------------------
I should publish a list of forum idiots.
Go to the top of the page
+Quote Post
saratoga
post Aug 31 2013, 19:33
Post #3





Group: Members
Posts: 4962
Joined: 2-September 02
Member No.: 3264



QUOTE (greynol @ Aug 31 2013, 13:51) *
What I find curious is that I see the beating in Adobe Audition where I had assumed it could display what the waveform would look like with perfect reconstruction. Clearly I don't understand how the program is going about connecting the dots.


That beating is just because its using linear or at most polynomial to generate the display. Its too slow to use high quality interpolation for display so almost nothing does.
Go to the top of the page
+Quote Post
C.R.Helmrich
post Aug 31 2013, 21:32
Post #4





Group: Developer
Posts: 686
Joined: 6-December 08
From: Erlangen Germany
Member No.: 64012



Thanks, ktf and xnor, now I get it. I was thinking only about resampling for file storage (i.e. 8 to 48-ish kHz), not about D/A conversion (which, as I failed to realize, ideally represents resampling to an infinitely large sampling rate). So yes, both any D/A converter as well as Audition's interpolative waveform display use time-limited interpolation filters for reasons mentioned earlier.

QUOTE (saratoga @ Aug 31 2013, 20:33) *
QUOTE (greynol @ Aug 31 2013, 13:51) *
What I find curious is that I see the beating in Adobe Audition where I had assumed it could display what the waveform would look like with perfect reconstruction. Clearly I don't understand how the program is going about connecting the dots.

That beating is just because its using linear or at most polynomial to generate the display. Its too slow to use high quality interpolation for display so almost nothing does.

I think - and recall reading this somewhere - that Audition is doing better than that, meaning it uses a time-windowed sinc filter. Here's what a Dirac (single-sample) impulse looks like in Audition 1.x:

Attached Image


Edit: zooming in vertically reveals that this smooth interpolation curve extends to the entire time-range visible in that screenshot.

Chris

This post has been edited by C.R.Helmrich: Aug 31 2013, 21:39


--------------------
If I don't reply to your reply, it means I agree with you.
Go to the top of the page
+Quote Post
greynol
post Sep 1 2013, 03:00
Post #5





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (C.R.Helmrich @ Aug 31 2013, 13:32) *
I think - and recall reading this somewhere - that Audition is doing better than that, meaning it uses a time-windowed sinc filter.

I think there may have been some confusion between Audition and Audacity. Audacity just connects the dots with straight lines. Audition does far better.

I'm going to walk back what I said earlier. When I looked at the waveform in Audition, I had created the tone in Audition. The visual beating may be due to this and not some problem with the way the program renders the waveform. For all I know a waveform created or resampled with sox or some other capable software will display perfectly in Audition and maybe Audacity too, despite its gross rendering.

This post has been edited by greynol: Sep 1 2013, 03:32


--------------------
I should publish a list of forum idiots.
Go to the top of the page
+Quote Post

Posts in this topic
- hornpipe2   3999hz Sine at 8khz SR   Aug 30 2013, 21:04
- - saratoga   QUOTE (hornpipe2 @ Aug 30 2013, 16:04) No...   Aug 30 2013, 21:08
- - hornpipe2   Ok... REALLY not understanding. If the second vid...   Aug 30 2013, 21:53
- - greynol   Why not try a signal at -3dB? Also, I hope you re...   Aug 30 2013, 22:11
- - hornpipe2   saratoga I don't think that's it. Here is...   Aug 30 2013, 22:12
- - Silversight   I don't know about the math here, but I can at...   Aug 30 2013, 22:15
- - hornpipe2   Yes Greynol, re: Audacity lines, I watched this ea...   Aug 30 2013, 22:23
- - saratoga   I doubt that article claims that you can perfectly...   Aug 30 2013, 23:59
- - xnor   I have no idea what you guys are talking about. W...   Aug 31 2013, 01:40
- - hornpipe2   I think this is all making sense to me now. I gen...   Aug 31 2013, 04:33
- - ktf   There's a simpler explanation: Nyquist-Shannon...   Aug 31 2013, 09:01
- - bandpass   QUOTE (hornpipe2 @ Aug 31 2013, 04:33) Is...   Aug 31 2013, 10:05
|- - C.R.Helmrich   QUOTE (xnor @ Aug 31 2013, 02:40) When I ...   Aug 31 2013, 11:01
|- - ktf   QUOTE (C.R.Helmrich @ Aug 31 2013, 12:01)...   Aug 31 2013, 15:54
|- - xnor   QUOTE (C.R.Helmrich @ Aug 31 2013, 12:01)...   Aug 31 2013, 16:27
- - xnor   A very pragmatic explanation: When you sample a s...   Aug 31 2013, 14:24
- - saratoga   Its nonlinear because you put in one tone and got ...   Aug 31 2013, 17:56
- - xnor   Sure but once you have the two tones (which you ge...   Aug 31 2013, 18:38
- - greynol   ...so long as the rest of the process up to the so...   Aug 31 2013, 18:51
|- - xnor   QUOTE (greynol @ Aug 31 2013, 19:51) ...s...   Aug 31 2013, 19:18
|- - saratoga   QUOTE (greynol @ Aug 31 2013, 13:51) What...   Aug 31 2013, 19:33
|- - C.R.Helmrich   Thanks, ktf and xnor, now I get it. I was thinking...   Aug 31 2013, 21:32
|- - greynol   QUOTE (C.R.Helmrich @ Aug 31 2013, 13:32)...   Sep 1 2013, 03:00
||- - xnor   QUOTE (greynol @ Sep 1 2013, 04:00) I thi...   Sep 1 2013, 03:38
|- - stv014   QUOTE (C.R.Helmrich @ Aug 31 2013, 22:32)...   Sep 1 2013, 09:14
- - bandpass   Here are some pics which may help. Generate a ton...   Aug 31 2013, 19:21
- - saratoga   Aliasing is nonlinear distortion so I don't se...   Aug 31 2013, 19:37
|- - xnor   QUOTE (saratoga @ Aug 31 2013, 20:37) Ali...   Aug 31 2013, 20:15
|- - Banned   QUOTE (saratoga @ Aug 31 2013, 20:37) Ali...   Aug 31 2013, 22:15
|- - xnor   QUOTE (Banned @ Aug 31 2013, 23:15) Alias...   Aug 31 2013, 22:20
- - saratoga   What is the fft of Sox's output? I suspect tha...   Aug 31 2013, 20:20
- - xnor   Well, yeah if you already know the answer you...   Aug 31 2013, 20:36
|- - bandpass   QUOTE (xnor @ Aug 31 2013, 20:36) Regardi...   Aug 31 2013, 21:24
- - phofman   The spectrograms generated by sox look and sound s...   Aug 31 2013, 20:41
- - Alexey Lukin   Audition's interpolation depends on your zoom ...   Sep 1 2013, 03:53
- - greynol   Thanks everyone. Sorry for not getting it the fir...   Sep 1 2013, 06:33
- - stv014   Using the resampler from here with the "-r 44...   Sep 1 2013, 09:34


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: 18th September 2014 - 00:28