Skip to main content

Topic: Spectrum Analysis - Interesting Results (Read 3945 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Zemo
  • [*]
Spectrum Analysis - Interesting Results
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?

  • Zemo
  • [*]
Spectrum Analysis - Interesting Results
Reply #1


  • askoff
  • [*][*][*][*]
Spectrum Analysis - Interesting Results
Reply #2
yup. Nice pictures.

  • Atlantis
  • [*][*][*][*]
Spectrum Analysis - Interesting Results
Reply #3
Vital papers will demonstrate their vitality by spontaneously moving from where you left them to where you can't find them.

  • Zemo
  • [*]
Spectrum Analysis - Interesting Results
Reply #4
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?

  • Jebus
  • [*][*][*][*][*]
  • Developer
Spectrum Analysis - Interesting Results
Reply #5
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.

  • ff123
  • [*][*][*][*][*]
  • Developer (Donating)
Spectrum Analysis - Interesting Results
Reply #6
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

  • indybrett
  • [*][*][*][*][*]
  • Members (Donating)
Spectrum Analysis - Interesting Results
Reply #7
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

  • HansHeijden
  • [*][*][*]
Spectrum Analysis - Interesting Results
Reply #8
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.

  • Zemo
  • [*]
Spectrum Analysis - Interesting Results
Reply #9
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!
  • Last Edit: 19 May, 2004, 06:14:12 PM by Zemo

  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Spectrum Analysis - Interesting Results
Reply #10
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.
  • Last Edit: 19 May, 2004, 06:38:22 PM by Pio2001

  • Zemo
  • [*]
Spectrum Analysis - Interesting Results
Reply #11
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%