Author Topic: Audio Signals quality in X-Y mode, what is important, what is not?  (Read 6868 times)

0 Members and 1 Guest are viewing this topic.

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
I recently showed some friends the song "Oscillofun" by "Atom Delta", which combines nice music with visuals if you plug it in to X-Y mode on your scope (look it up on YouTube if you haven't seen it). I found it fascinating how they could make both nice visuals and audio from the same source. I also noticed that the quality of the X-Y visuals degrade before you can actually hear a loss of sound quality, for example if you apply some EQ to it or use compression such as MP3.

Since the ear is very very sensitive to certain things but not others, what is actually important for audio? Is other things important for Video signals? (balanced signals, what is our sensitivity to noise/harmonic distortion, can you measure it on a scope?, thickness of speaker cables (impedance/inductance of speaker coil), is skin depth important etc.)

Edit:
Here is uncompressed .flac audio file from artists webpage if you want to try it on the scope.
http://www.darkbits.org/~per/music/oscillofun.flac
Original scope video by the artist.




« Last Edit: November 20, 2012, 02:09:55 pm by eV1Te »
 
The following users thanked this post: T. Mandresy Billy

Offline nitro2k01

  • Frequent Contributor
  • **
  • Posts: 845
  • Country: se
Re: Audio Signals quality in X-Y mode, what is important, what is not?
« Reply #1 on: November 21, 2012, 05:49:08 pm »
MP3 and similar lossy compression is, well lossy. What does it remove? It converts the sampled data (which consists of periodically sampled air pressure data) to spectral data, i.e. the amount of intensity in any given frequency band at any given time. It then uses a psychoacoustic model of masking effects in the ear to figure out which frequency bands can be represented with lower precision. The masking effects are based on the assumption that if the cochlea is subjected to stimulation in one frequency band, it gets desensitized to stimulation in other bands.

If you imagine a sawtooth or square wave for example, they can be represented as a Fourier series of harmonics, ie a sum of a number of sine waves of various frequencies, amplitudes and phase positions. This corresponds well to how the ear perceives the audio.

Now let's compare some signals:

This is a 440 Hz sawtooth wave generated in Adobe Audition. The ringing near the edges is caused by the waveform display's interpolation/bandlimiting (sinc perhaps?) Disregard that and look at the dots, which are the sample values, which line up to form a ramp. The spectral view shows a gradual decrease in intensity as frequency increases.
This could be a part of a straight line segment in the demo.



Now let's look at the same data after a round of 96 kbps MP3 compression. This an intentionally low bitrate to show the effects more clearly, but the same principle applies to all lossy audio compression. The waveform is noticeably squiggly, and the spectral view shows how the harmonics don't simply decrease as frequency increases, but vary a lot. For example, the bands near 6000 and 9000 Hz are noticeably lower in amplitude. And all content above 17 kHz is simple filtered away. The individual harmonics are also likely phase shifted, ie shifted slightly back or forth in time.

The human ear doesn't particularly care if the samples are lined up in a straight line (or some otherwise perfect representation)  as long as it stimulates the right portions of the cochlea, but the smallest squiggle on the line will show up as a similar squiggle on the oscilloscope.



However, it's not simply the waveform that matters, but the relation between the channels. MP3 assumes that the ear cannnot locate high frequency sounds above at higher frequency and reduces the stereo imaging for higher frequencies in order to save space. This is also detrimental to the quality of the image shown on the oscilloscope, among other things, for sharp corners.

Another aspect is the update rate of the oscilloscope. Any analog scope beats cheapo digitals like the Rigol DS1052 by kilometers.

Yet another thing that matters is AC coupling, and which frequency it occurs at. (AC coupling is really just a HP filter at some selected frequency.) Soundcards are typically AC coupled, probably in order not to set people's headphones on fire from a residual DC current. However, a demo like this is most likely designed to work under that condition.
Whoa! How the hell did Dave know that Bob is my uncle? Amazing!
 

Offline poptones

  • Frequent Contributor
  • **
  • Posts: 709
  • Country: 00
Re: Audio Signals quality in X-Y mode, what is important, what is not?
« Reply #2 on: November 21, 2012, 06:10:50 pm »
The ear is extremely sensitive to phase. Not absolute phase, but relative phase. Having harmonics "misaligned slightly" is not a trivial error.

The musical selection is pretty awesome. Seems I saw something like this a few years ago but it wasn't nearly as elaborate.
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Audio Signals quality in X-Y mode, what is important, what is not?
« Reply #3 on: November 21, 2012, 07:07:23 pm »
MP3 and similar lossy compression is, well lossy. What does it remove? It converts the sampled data (which consists of periodically sampled air pressure data) to spectral data, i.e. the amount of intensity in any given frequency band at any given time. It then uses a psychoacoustic model of masking effects in the ear to figure out which frequency bands can be represented with lower precision. The masking effects are based on the assumption that if the cochlea is subjected to stimulation in one frequency band, it gets desensitized to stimulation in other bands.


The human ear doesn't particularly care if the samples are lined up in a straight line (or some otherwise perfect representation)  as long as it stimulates the right portions of the cochlea, but the smallest squiggle on the line will show up as a similar squiggle on the oscilloscope.

However, it's not simply the waveform that matters, but the relation between the channels. MP3 assumes that the ear cannnot locate high frequency sounds above at higher frequency and reduces the stereo imaging for higher frequencies in order to save space. This is also detrimental to the quality of the image shown on the oscilloscope, among other things, for sharp corners.

Another aspect is the update rate of the oscilloscope. Any analog scope beats cheapo digitals like the Rigol DS1052 by kilometers.

Yet another thing that matters is AC coupling, and which frequency it occurs at. (AC coupling is really just a HP filter at some selected frequency.) Soundcards are typically AC coupled, probably in order not to set people's headphones on fire from a residual DC current. However, a demo like this is most likely designed to work under that condition.

Nice explanation with graphs of how the signal behaves post compression.

Since this is the only example of a signal that I know of that produces both Music and Video at the same time, it would be ideal to use this to demonstrate different degrading effects that one might encounter (super long cables, bad screening, incorrect termination etc.) and see in what cases you can hear the difference before you can see it, or when you can see the effects before you can hear them

I can guess that adding just small amounts of EQ or compression is instantaneously visible, but difficult to hear?
And adding a hissing sound of -40 dB is difficult to see on the scope but very easy to hear with your ears?

This gave me an idea: Is there a way to "slow down" high frequency signals to audible frequencies so that you can listen to them in slow motion, in order to discover glitches/noise etc. more easily than on a scope?  :P



 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Audio Signals quality in X-Y mode, what is important, what is not?
« Reply #4 on: November 21, 2012, 11:43:35 pm »
I decided to record the audio displayed on my cheap Instek scope (same class as Rigol I presume?)
« Last Edit: November 21, 2012, 11:45:53 pm by eV1Te »
 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Audio Signals quality in X-Y mode, what is important, what is not?
« Reply #5 on: November 29, 2012, 11:21:28 am »
wow I am going to have to put that through my scope now.
That looks awesome
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf