Presentation on theme: "How does your portable music player work? J.D. (jj) Johnston Chief Scientist Neural Audio Kirkland, Wa."— Presentation transcript:
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 recordings 2.Some way to control what you want to play 3.Some way to play it back 4.A level control 5.Some way to get it to headphones 6.Some way to power 1 to 3.
Graphically Speaking Storage Mechanism Reproduction Mechanism Control Mechanism Power Source Headphones
Yes, its 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
Lets 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 wasnt always the case, though. See the storage issue coming up.
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.
So, what is the relationship of time vs. storage for a standard rate? Bit rate (kb/s)Storage SizeMinutes of Music 128100 MB100 192100 MB70 1281 GB1000 1921 GB700 12832 GB32000 19232 GB21000 32032 GB12000 Note: Minutes are rounded
Reproduction stages: Digital Processing Digital to Analog Conversion Power Amplifier
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
What does this entail? An operating system A file system An audio decoder (or decoders) Signal Processing PCM transmission to the DAC
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
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) Thats what file systems are for
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.
Whats 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.
Whats 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.
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.
More about Coders Nope, not here. I have a 3 hour basic tutorial on coding. – I havent given it here, but I dont sense a huge desire from the audience I hope! Thats for another day
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 doesnt matter a whole lot any more.
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. Dont do that.
Signal Processing Wait! Wont 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)
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 isnt very good. – Some players use a control integrated into the DAC.
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.
The Control System (User Controls) Screen and controls Operating system
More on the control issue This is a major marketing point – Im 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
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!
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
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
More on the capacitor They dont 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.
Some measurements on devices. (thanks to Bob Smith) Frequency Response IMD THD Crosstalk Red: Headphones Black: No load
And, some more measurements (thanks to Rick C) HeadphoneLine (100k)
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.
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
Your consent to our cookies if you continue to use this website.