IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Spectrum Analysis - Interesting Results
Zemo
post May 19 2004, 12:37
Post #1





Group: Members
Posts: 20
Joined: 21-January 04
Member No.: 11427



I got bored, so logically I generated a 19Hz - 22kHz sine sweep, encoded it to APS, APX, and API, decompressed it back to WAV, and ran some spectrum analysis on the samples....I got some interesting results! I know how to interpret the low-mid frequncy noise, but what about that pattern at 4kHz? (that pattern continues all the way up through about 15kHz). And the huge amounts of noise at the cutoff point?

WAV ANALYSIS




API ANALYSIS




APX ANALYSIS




APS ANALYSIS



Interpretations/explainations?
Go to the top of the page
+Quote Post
Zemo
post May 19 2004, 12:38
Post #2





Group: Members
Posts: 20
Joined: 21-January 04
Member No.: 11427




Go to the top of the page
+Quote Post
askoff
post May 19 2004, 12:53
Post #3





Group: Members
Posts: 445
Joined: 23-December 02
Member No.: 4214



yup. Nice pictures. smile.gif
Go to the top of the page
+Quote Post
Atlantis
post May 19 2004, 13:11
Post #4





Group: Members
Posts: 250
Joined: 27-December 02
From: ROMA, Italy
Member No.: 4269



rolleyes.gif


--------------------
Vital papers will demonstrate their vitality by spontaneously moving from where you left them to where you can't find them.
Go to the top of the page
+Quote Post
Zemo
post May 19 2004, 18:29
Post #5





Group: Members
Posts: 20
Joined: 21-January 04
Member No.: 11427



Hmmm...hoping for a LITTLE more explaination than that.....for instance, why is there that crazy looking diamond criss-cross pattern with APS and APX? and why the heck is there SO MUCH noise at the end of each frequency range?
Go to the top of the page
+Quote Post
Jebus
post May 19 2004, 20:17
Post #6





Group: Developer
Posts: 1323
Joined: 17-March 03
From: Calgary, AB
Member No.: 5541



those are kinda neat looking.

I have no idea what i'm seeing though... any codec engineers have any insight?

And before someone goes off on a rant about the evils of spectrum analysis, lets just look at this from a point of interest and nothing more, okay? I don't think the original poster actually intends this as damning evidence against the presets or anything.
Go to the top of the page
+Quote Post
ff123
post May 19 2004, 20:34
Post #7


ABC/HR developer, ff123.net admin


Group: Developer (Donating)
Posts: 1396
Joined: 24-September 01
Member No.: 12



What you're seeing may depend on how your sweep actually works. If it steps in frequency rather than doing a smooth ramp, you may be introducing impulses that the codec has to handle. For example:

http://ff123.net/clicking.html

ff123
Go to the top of the page
+Quote Post
indybrett
post May 19 2004, 22:42
Post #8





Group: Members (Donating)
Posts: 1350
Joined: 4-March 02
From: Indianapolis, IN
Member No.: 1440



Did you compare the spectrum analysis of the mp3 to the spectrum analysis of the original wave file?

More importantly, can you hear the pattern and/or noise?


--------------------
flac>fb2k>kernel streaming>audiophile 2496>magni>dt990 pro
Go to the top of the page
+Quote Post
HansHeijden
post May 19 2004, 23:03
Post #9





Group: Members
Posts: 159
Joined: 30-September 01
Member No.: 75



The frequency sweep was probably (almost) full scale amplitude. The lowpass filter in Lame has a slight gain boost just before the cutoff frequency.

So it's just plain clipping.
Go to the top of the page
+Quote Post
Zemo
post May 19 2004, 23:13
Post #10





Group: Members
Posts: 20
Joined: 21-January 04
Member No.: 11427



Right, this is entirely from a curiosity standpoint, nothing more!

QUOTE
Did you compare the spectrum analysis of the mp3 to the spectrum analysis of the original wave file?


The spectrum analysis of the original wave is there too.

QUOTE
So it's just plain clipping.


Cool. I'll generate some 50% amplitute sine sweeps and do the same thing....let's see what happens!

This post has been edited by Zemo: May 19 2004, 23:14
Go to the top of the page
+Quote Post
Pio2001
post May 19 2004, 23:36
Post #11


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



The explanations must not be searched into the psychoacoustic model. Distorded sines always look like this. For example, look at the Udial sample :

http://perso.numericable.fr/laguill2/pictures/udial.png

Now, let's resample it with a poor algorithm :

http://perso.numericable.fr/laguill2/pictures/udialalias.jpg

Or let's clip it :

http://perso.numericable.fr/laguill2/pictures/udialclip.jpg

Or look at this pure lossless sweep, generated with a very poor program (old SoundForge 4.5 ) :

http://perso.numericable.fr/laguill2/pictures/aliases.jpg

(yes, this is ONE sweep ! In green. )

We should first understand how copies of the original are created. Upper copies are just harmonic distortion. For example in your 4 kHz sweep, we can see the harmonics 3 (12 kHz) and 5 (20 kHz), that come from a distortion of the peaks (if distortion only affect peaks, then only odd harmonics will appear).

Reversed copies are called aliases. The first alias is the symmetric above the nyquist frequency (22050 Hz). For a 4 kHz sine, it would be 40100 Hz. This is a wave that, if it was sampled without any digital filter, would lead to the same digital file.
For example consider a 22050 Hz sine. It has only two sampled values : up, down, up, down, etc
Now consider a 66200 Hz sine. If me measured its value 44100 Times per second, we would get the same thing : up, down, up, down etc. We would just skip some peaks in between. That's why any audio signal is lowpassed before being digitalized. To avoid recording some garbage if the sampler would be fast enough to measure the instant value of very high frequency noise. That's why this lowpass filter is also called anti-alias.

Now, looking at the clipped version of udial, we can see that there are copies of the sweep, but below the original instead of above. This should not be harmonic distorion, since harmonic distortion appears above the fundamental frequency, not below. But their frequency oscillation is bigger than the fundamental one. They are in fact aliases of the upper harmonics of the fundamental tone !
The "udial" tone oscillates around 20 kHz. When we clip it, it generates odd harmonics, remember ? Thus 60 kHz, 100 kHz, 140 kHz etc frequencies should appear. They are above the maximum frequency of a 44100 Hz file, but since the volume process does not apply an antialias filter (it should), the aliases of these ultrasonic distortions appear in the resulting file as audible frequencies.
Here, they are aliases of aliases of etc... because the aliasing process also occurs at integer multiples of the nyquist frequency : the graph is symmetric above 22050 Hz, but also above 44100, 66150 etc.

Thus, in the same way, when a sweep seems to bounce on the top of the graph, its mathematical expression actually crosses it, and goes on above 22050 Hz, and what we see coming down is the alias of it.

I don't know exactly the origin of the starry patterns at the end of the sweeps, but I think that it must be related to the relative phase of the sweep and the sample rate, because the sweep generator starts the generation by a zero crossing, and all the additional frequencies gather there.
Go to the top of the page
+Quote Post
Zemo
post May 20 2004, 00:00
Post #12





Group: Members
Posts: 20
Joined: 21-January 04
Member No.: 11427



These frequency spectrums were with a 50% amplitude sine sweet....you were right, it was just clipping (and yes, I could hear it). Clipping sure looks pretty!


API 50%




APX 50%




APS 50%


Go to the top of the page
+Quote Post

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: 28th November 2014 - 11:10