how does your portable music player work? j.d. (jj) johnston chief scientist neural audio kirkland,...

33
How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Upload: rhiannon-flook

Post on 28-Mar-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

How does your portable music player work?

J.D. (jj) JohnstonChief ScientistNeural AudioKirkland, Wa

Page 2: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

So, how do we carry music around?

• We need a few things:1. Some way to store music recordings2. Some way to control what you want to play3. Some way to play it back4. A level control5. Some way to get it to headphones6. Some way to power 1 to 3.

Page 3: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Graphically Speaking

StorageMechanism

ReproductionMechanism

ControlMechanism

Power

Source Headphones

Page 4: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Yes, it’s that simple.But:

• The bit rate for PCM CD storage is 11 megabytes per minute. (well, 10.5)

• Storage takes space (although a few orders of magnitude less than it did 10 years ago)

• You need power to drive headphones• Batteries are still not very good, in terms of

energy density vs. volume• It has to fit in your pocket

Page 5: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Let’s get Power out of the way• Power is the basic problem in any portable player.

• CPU uses power

• Amplifiers use power

• Discs use power

• Memory uses power when you read it.

• POWER IS THE BIG PROBLEM– That wasn’t always the case, though. See the storage issue coming up.

Page 6: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Storage Issues

• At first Storage of 22 minutes (a2b music) was acceptable

• Disc storage of many GB was the next step• Flash storage of several GB is now common.

(8,16,or 32 for one common player)

• At each step the memory power has been reduced.

Page 7: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

So, what is the relationship of time vs. storage for a standard rate?

Bit rate (kb/s) Storage Size Minutes of Music

128 100 MB 100192 100 MB 70128 1 GB 1000192 1 GB 700128 32 GB 32000192 32 GB 21000320 32 GB 12000

Note: Minutes are rounded

Page 8: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Reproduction stages:

Digital Processing Digital to Analog Conversion

PowerAmplifier

Page 9: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The Digital Processing• The digital processing must do at least the

following steps– Figure out where the music to be played is stored– Read the storage medium– Convert whatever (MP3, AAC, FLAC, PCM) is on the

storage medium to PCM– Do whatever other processing is desired

• Level compression• EQ• In some cases, volume control

– Send the PCM to the Digital to Analog Convertor

Page 10: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

What does this entail?

• An operating system• A file system• An audio decoder (or decoders)• Signal Processing• PCM transmission to the DAC

Page 11: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

What? An Operating System???

• Well, yes, you need an operating system in order to:– Tell the user what is available to play– Get user input – Figure out what that means– Find the data– Play it, decoding it and processing it if necessary

Page 12: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

and a file system

• The operating system has to know– Where to find the list(s) of songs– Where the music is stored– How big it is– Where to read it from– Any metadata (album art, whatever)

• That’s what file systems are for

Page 13: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The “decoder”

• Most (nearly all) music is stored on portable players in a compressed form. There are two kinds:– Lossy perceptual coders– Lossless coders

• Both of these require decoding in order to recover the PCM data.

Page 14: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

What’s the difference?• Lossless coders are simple, they reduce the bit rate in a

fashion that preserves the PCM data exactly.

• Perceptual coders, on the other hand, attempt to remove parts of the signal that are not PERCIEVED – They are lossy, you can never get the PCM data back exactly.– Done right, they sound very similar, if not identical, to the

original.– They have a much lower data rate than lossless coders

– MP3, AAC, WMA (and Pro), AC3, AC2, Ogg-Vorbis, and DTS are all lossy coders of various rates, qualities, and designs.

Page 15: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

What’s the implication here?

• Typically, the more efficient the encoding, the more complex the encoder and decoder– This is not quite exact, due to differences in

entropy coding methods– These coders take CPU.

Page 16: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Why does CPU matter?

• Physics.

– The more you use the CPU, the more you use the battery

– The more you use the battery, the more often you need to charge/replace it.

Page 17: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

More about Coders

• Nope, not here.

• I have a 3 hour basic tutorial on coding.– I haven’t given it here, but I don’t sense a huge

desire from the audience• I hope!

• That’s for another day

Page 18: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Some notes on coding• Many players will set a default bit rate for encoded audio

that maximizes the amount of music you can put on your device.

• This may not be the ideal setting for your own listening pleasure.

• Always check the default rate, and if you can notice audio quality problems, increase it to the maximum your player can accept.– This cuts down storage.– With modern storage capacity, this doesn’t matter a whole lot

any more.

Page 19: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

EVIL Coding mistakes

• Using more than one layer of perceptual coding, i.e.– First, code into MP3– Then, to get it into your device, use WMA– OR VICE VERSA

• Using codecs sequentially is wrong. It is evil. It is not to be done. Don’t do that.

Page 20: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Signal Processing• Wait! Won’t that use more CPU and more

battery?– Yep. Hence the rudimentary DSP in most players.

• The most common device is an equalizer, with some number of fixed profiles.

• Some Chinese players also have:– Externalization (i.e. “not in the head”) processing– Loudness adjustment (level compression based on

loudness)

Page 21: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Level Control

• In many players, the level control is performed digitally on the PCM signal. This is simply one more multiply/sample on the PCM output samples.

– This means that when the volume control is low, the SNR out of the DAC isn’t very good.

– Some players use a control integrated into the DAC.

Page 22: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

PCM Output

• Because of the way the disc/memory fetching and processing work, PCM is usually generated in “blocks”.– A final process (often hardware) spreads out the

blocks into individual samples to send to the DAC.– Various other hardware-related things happen

here, exactly what depends on what kind of hardware is in the player.

Page 23: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The Control System (User Controls)

Screen and controls

Operating system

Page 24: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

More on the control issue

• This is a major marketing point– I’m not even going to try to cover the various

methods– Some players can now decode video– Some have no display, and only “forward” and

“reverse”

– To each his own

Page 25: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The Power Amplifier

• Now, recall:– The biggest problem in portable players is POWER

• Headphones require power– Not much, but even sensitive modern headphones

require many milliwatts in order to get to levels that can cause hearing damage

– Most players will put out that much, too.• FOR SHAME!

Page 26: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The Power amplifier

• Many are “switching” amps, some are linear.

• They all use many tricks to get power dissipation down.– Low idle current – i.e. crossover distortion– Low current capability• Problems with low impedance (32 ohm) phones

Page 27: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

The output capacitor

• Nearly all power amps are also single-ended amps that run from a single power supply– They have a DC blocking capacitor per channel• This is expensive, and requires volume• These capacitors are often, well, to put it not too

kindly, cheaped out on.• This means that LF response varies with headphones.• Digital equalizers can only fix this to some extent. As

you ‘correct’ peak level goes down– Bass is the most energetic part of most audio

Page 28: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

More on the capacitor

• They don’t match,either capacitance or ESR.– Frequency response mismatches– Level mismatches

• When running into 10K loads, this improves gigantically.– Then the crossover distortion that sometimes

exists will get you.– Still, using line-level outputs is usually better.

Page 29: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

Some measurements on devices.(thanks to Bob Smith)

FrequencyResponse

IMD

THD

Crosstalk

Red: HeadphonesBlack: No load

Page 30: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

And, some more measurements(thanks to Rick C)

Headphone Line (100k)

Page 31: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

To summarize

1. Portable players usually use lossy coding – so they generally cause at least some audio impairment

2. Portable players are generally not intended for “critical” uses. N.B. a few, special, expensive ones may be.

3. The headphone amp vs. power issue also reduces quality.

Page 32: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

So, what are they good for?

• Playing music in an easily portable fashion.

• What problem can this cause?– When you listen too loud, you go slowly deaf.– You might not be paying attention to that siren

behind you– Or the car honking its horn

Page 33: How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa

(((

Be CarefulOut There!