• HEXUS
  • HEXUS.tv
  • channel
  • gaming
  • lifestyle
  • trust
  • community
  • ESReality
  • HEXUS.community discussion forums

    Welcome to the HEXUS.community discussion forums forums.

    You are currently viewing our boards as a guest which gives you limited access to view most discussions and other features. By joining our free community you will have access to post topics, respond to polls and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

    Go Back   HEXUS.community discussion forums > HEXUS.channels > HEXUS.lifestyle > Audio/Visual - Standard and HD

    Audio/Visual - Standard and HD Discussions about audio and visual equipment, media and content for both standard and HD

    Reply
     
    LinkBack Thread Tools
    Old 21-12-2004, 01:05 PM   #1 (permalink)
    Va Va Voom
     
    Lowe's Avatar
     
    Join Date: Jul 2003
    Location: Walsall
    Posts: 5,411
    Thanks: 112
    Thanked 118 Times in 93 Posts
    Lowe's system
    Smile How Digital Audio works

    Digital Audio Systems

    We all have our CD players, MP3 players, and DVD audio is beginning to make an appearance. But, have you ever taken a thought to how all this works? Ever wondered what the “bit rate” and “sample rate“ had to do with the price of fish? Well, if so this post will hopefully answer a few questions. It’s a bit of a slog reading through this so I suggest breaking it down a bit to save your head from hurting. Oh, and if you do have any questions please post them up. Oh.. and excuse my MS Paint skills.. or lack of!


    Digital Audio Basics

    Right, firstly we have our source sound. This could be our voice, an instrument etc. This sound needs to be converted into a signal we can work with. To do this we need a transducer that will take real world sound and convert it into an electrical signal. In most cases this will be some form of microphone. The problem is, the signal that we will get from the mic will be an analogue signal. So… we need to convert it into a digital signal. To do this we use a little device called an Analogue to Digital Converter. The overall quality of this device is critical to the final resulting digital sound. Use a poor quality cheap converter and you’ll get a naff sound. This is why on digital mixers you rarely have more than a few analogue input channels and why a decent digital desk (such as Yamaha’s O2R96) cost so blummin’ much! Once the signal is in the digital domain we can then use our computer to record it, manipulate it and do all sorts of other weird and wonderful things!


    Analogue to Digital Conversion

    This is the science bit peeps. Lets imagine for a second we’re recording a simple sine wave. This sine wave has a fixed amplitude (how loud it is) and a fixed frequency (the musical “pitch”).

    It might look a little like the following:



    For us to convert it into the digital domain we firstly need to snip the wave up into regular segments horizontally and vertically on the X and Y axis. If we now take a “sample” recording at each of the points we get something that looks a bit like this:



    This is a very basic approximation of our analogue source. How might we make this a bit better? Well, if you look at the pic you can see that the wave is staircase like. To get a better representation of the source wave we need to increase the number of steps (samples) on the staircase… To something like this perhaps:



    The increased sample rate has left us with a representation that is far closer to the original. But, it’s far from perfect. The signal is still looking a little staircase like and we’re still having huge jumps on the Y axis. The Y axis showing the amplitude needs increasing as well. So, if we increase our bit depth and up the sample rate again, then we get the following:



    This is looking much more like our original signal. The bit depth has given us a much better representation. This is very important to us, since the less like the original sound our digital representation is, the more hiss and noise we will experience when we listen to it. This noise is known as “Quantise Error”, and is unfortunately an integral part of any digital audio system. The best way of avoiding it is to ensure that the bit depth is as high as reasonably possible. To put it into perspective, if we have a depth of 8 bits, then we would have a possible 256 values or steps on the Y axis. If we boost that to 16 bits then we could have a possible 65,536 steps! This will obviously go a long way to avoiding any quantise error. Just to reiterate though, the quantise error noise will always be there. We can’t remove it, we can just minimise it.

    So, for this section we have established the following. The higher the bit depth and sample rate is, the better the digital representation will be, therefore the better it will sound. If you’re head’s had enough for one day, stop here.. otherwise carry on…



    A clever dude called Harry Nyquist

    So our final sound can always be improved by upping the sample rate (x axis) or the bit rate (y axis) can’t it? Well, yes and no. Like most things in life we have a law of diminishing returns. You do get to a point where the signal is that close to the original source the human ear is unable to detect the difference. The other problem we have is the size of all this data. With recording studios, audio sample rates of 96khz aren’t uncommon… Let’s put this into perspective. With a typical piece of music being 4 minutes long, each mono recording we make (each channel) at 96khz will take up 46,080,000 bytes. That’s 46 meg of space per instrument, and you could have 16+ channels on the go at once. This is before we’ve even started to get into edits, second and third takes etc. Hell, our final recording where we master it down to 2 channels would end up being 92,160,000 bytes. 92 meg! Imagine if every tune you had was 92 meg or more. IBM, Western Digital et al would love it! This is overkill though, we don’t really need to use sample rates of this order unless we’re in a pro studio. Especially, as the human ear has limits…

    The human ear is a fantastic piece of kit. It works over a massive range, of both frequency (pitch) and dynamics (volume). In terms of frequency, a good human ear can hear sounds ranging from 20hz to 20khz. From sounds that make the floor move, to high pitched sounds like nails down a blackboard, your ears do a fantastic job of picking it all up no matter virtually how loud or quiet it is. Hell, I could rave on about our ears for hours but I won’t. So what does this have to do with our digital audio? Nyquist’s Theorem.

    Nyquist’s Theorem states that to reproduce an analogue signal properly in the digital domain, that the sample rate must be at least twice as high as the highest frequency in the analogue signal. So, if our piece of music has a highest frequency of 10khz, we must ensure the sample rate is at least 20khz. With the human ear being able to detect frequencies up to 20khz, it makes sense that we take samples no higher than ~40hkz, else we’re wasting space since the ear won’t be able to hear it.

    It’s no coincidence that the sample rate of CD audio is 44.1khz / 16 bit. This sample rate offers good quality audio, covers the best of human ears, and is also tied into the fact that CD mastering used to use video equipment, but that’s something for another day.


    Oversampling

    So what about these stupidly high sample rates of 192khz and this 2x or 4x playback oversampling stuff I hear you say? Well, remember earlier I mentioned that all digital audio systems suffer from quantise error? Well, oversampling is yet another way of minimising this hiss and noise. The amount of quantise noise in a system is always fixed. It can’t be removed in any way, but it can be “hidden”. Oversampling is a clever way of using the ears limitations to hide the noise as best as possible in a way that we can’t actually hear it.

    Imagine a rectangle. Lets say for example it’s 4 units wide and 2 units high. This gives us as area inside the rectangle of 8 units (4x2). Now, suppose this area inside the rectangle is quantise noise, and the quantise noise is fixed. That means our noise level is 8 units. Still with me?

    Now imagine if we rearrange the rectangle so that instead of being 4x2, it was 2x4. The area inside the rectangle is the same isn’t it? Now what if we rearranged the rectangle again so it was 8x1. Still the same area…

    Imagine that we put those shapes onto a graph. The X axis is frequency, the Y axis is amplitude. Which of those shapes has the lowest amplitude?



    The 8x1…

    Now lets suppose the upper threshold of hearing was 4 units on the X axis. Since the threshold is 4, anything above 4 wouldn’t be heard. We’ve just halved the amount of quantise noise that’s audible! This would be 2x oversampling. We could take it even higher – bump it up to 16x0.5 or 32x0.25 and reduce the audible level even further!

    In case that's as clear as mud, here's another couple of pics illustrating it in a similar way:



    Imagine the first piccy is our typical CD player. 16bit, 44.1khz sample rate. The blue area in the graph is the noise. Now we can't get rid of that - though we can "hide" it. If we oversample.. say twice the rate, then the noise level has to be reduced since the amount of noise in the system as a whole is constant - it cannot be altered.

    The beauty of this is we can't hear above the red dotted line. So the noise level is effectively reduced, or hidden. The higher you oversample, the lower the quantise noise. Once the signal is oversampled, it has to be brought back down to 44.1khz again else it would play at a faster speed. A DAC does this, and in the process reduces our noise overhead.



    And that is the end of the analogue to digital process. Once it’s converted you can store your audio assuming you have enough room for it all… if not, it’s time for compression… which I think we’ll leave for another day!

    Hope you found that useful, and you could understand it. As I said before, if anything puzzles you chuck a question up and I’ll do my best to explain it a different way.

    Last edited by Lowe; 25-05-2006 at 02:28 PM.. Reason: Typo :o
    Lowe is offline   Reply With Quote
    Old 21-12-2004, 01:13 PM   #2 (permalink)
    Drop it like it's hot
     
    Howard's Avatar
     
    Join Date: Jul 2003
    Location: Surrey, South East
    Posts: 11,741
    Thanks: 14
    Thanked 43 Times in 39 Posts
    Howard's system
    Brilliant post I'm sure many people are wondering how it all works!

    Home cinema: Toshiba 42XV555DB Full HD LCD | Onkyo TX-SR705 | NAD C352 | Monitor Audio Bronze B2 | Monitor Audio Bronze C | Monitor Audio Bronze BFX | Yamaha NSC120 | BK Monolith sub | Toshiba HD-EP35 HD-DVD | Samsung BD-P1400 BluRay Player | Pioneer DV-575 | Squeezebox3 | Virgin Media V+ Box
    PC: Asus P5B | Core2duo 2.13GHz | 2GB DDR2 PC6400 | Inno3d iChill 7900GS | Auzentech X-Plosion 7.1 | 250GB | 500GB | NEC DVDRW | Dual AG Neovo 19"
    HTPC: | Core2Duo E6420 2.13GHz | 2GB DDR2 | 250GBx2 | Radeon X1300 | Terratec Aureon 7.1 | Windows MCE 2005
    Laptop: 1.5GHz Centrino | 512MB | 60GB | 15" Wide TFT | Wifi | DVDRW

    Howard is offline   Reply With Quote
    Old 21-12-2004, 01:51 PM   #3 (permalink)
    HEXUS.timelord.
     
    Zak33's Avatar
     
    Join Date: Jul 2003
    Location: On the Battle Field
    Posts: 23,735
    Thanks: 753
    Thanked 587 Times in 343 Posts
    Zak33's system
    bloody hell Lowe


    Agent = Hardware Homosapien | Zak33 = Hardware Homonid - just call me "Lucy"
    Zak33 is online now   Reply With Quote
    Old 21-12-2004, 01:55 PM   #4 (permalink)
    Cable Guy
     
    Jonny M's Avatar
     
    Join Date: Jul 2003
    Location: Loughborough Uni
    Posts: 4,274
    Thanks: 0
    Thanked 4 Times in 1 Post
    Now I know what my Panasonic CD deck is on about when it talks about oversampling
    Jonny M is offline   Reply With Quote
    Old 21-12-2004, 02:01 PM   #5 (permalink)
    HEXUS.timelord.
     
    Zak33's Avatar
     
    Join Date: Jul 2003
    Location: On the Battle Field
    Posts: 23,735
    Thanks: 753
    Thanked 587 Times in 343 Posts
    Zak33's system
    that is SOO good


    Agent = Hardware Homosapien | Zak33 = Hardware Homonid - just call me "Lucy"
    Zak33 is online now   Reply With Quote
    Old 21-12-2004, 04:09 PM   #6 (permalink)
    Cable Guy
     
    Jonny M's Avatar
     
    Join Date: Jul 2003
    Location: Loughborough Uni
    Posts: 4,274
    Thanks: 0
    Thanked 4 Times in 1 Post
    So 4x oversampling means the blue box is stretched out to 4x it's original width?
    Jonny M is offline   Reply With Quote
    Old 21-12-2004, 04:12 PM   #7 (permalink)
    Va Va Voom
     
    Lowe's Avatar
     
    Join Date: Jul 2003
    Location: Walsall
    Posts: 5,411
    Thanks: 112
    Thanked 118 Times in 93 Posts
    Lowe's system
    Yup, which would mean the box is 4x as short.. so far less noisy
    Lowe is offline   Reply With Quote
    Old 21-12-2004, 04:16 PM   #8 (permalink)
    iMc
    Senior Member
     
    iMc's Avatar
     
    Join Date: Aug 2003
    Location: Northants + Derby
    Posts: 3,622
    Thanks: 2
    Thanked 0 Times in 0 Posts
    Very very good post, make it a STICKY!

    HEXUS|iMc
    iMc is offline   Reply With Quote
    Old 21-12-2004, 10:54 PM   #9 (permalink)
    DR
    'with great power comes great responsibility....'
     
    DR's Avatar
     
    Join Date: Jul 2003
    Location: Purton, Wiltshire
    Posts: 11,972
    Thanks: 54
    Thanked 153 Times in 65 Posts
    Jesus Christ - glad I am having a drink...
    DR is offline   Reply With Quote
    Old 23-12-2004, 01:08 AM   #10 (permalink)
    Monkey
     
    Apex's Avatar
     
    Join Date: Jul 2003
    Location: RobertTown, Liversedge, West Yorkshire
    Posts: 3,066
    Thanks: 37
    Thanked 4 Times in 4 Posts
    Apex's system
    Rated

    am now going to have to lay down for a bit.

    Apex is offline   Reply With Quote
    Old 23-12-2004, 09:13 AM   #11 (permalink)
    Va Va Voom
     
    Lowe's Avatar
     
    Join Date: Jul 2003
    Location: Walsall
    Posts: 5,411
    Thanks: 112
    Thanked 118 Times in 93 Posts
    Lowe's system
    It's a bit much for one single read as I warned - best to flick over it once just to try to get your head around it, then come back in a day or so's time and really try to understand each bit. I promise it all makes sense
    Lowe is offline   Reply With Quote
    Old 25-05-2006, 02:30 PM   #12 (permalink)
    Va Va Voom
     
    Lowe's Avatar
     
    Join Date: Jul 2003
    Location: Walsall
    Posts: 5,411
    Thanks: 112
    Thanked 118 Times in 93 Posts
    Lowe's system
    Just redone the links so the pics work. Hopefully someone will find it useful
    Lowe is offline   Reply With Quote
    Old 25-05-2006, 03:09 PM   #13 (permalink)
    More l33t than dangel
     
    directhex's Avatar
     
    Join Date: Jul 2003
    Location: /dev/urandom
    Posts: 14,304
    Thanks: 42
    Thanked 389 Times in 281 Posts
    directhex's system
    couple of the pics are missing, lowe, but it's good stuff

    directhex is offline   Reply With Quote
    Old 25-05-2006, 03:19 PM   #14 (permalink)
    Va Va Voom
     
    Lowe's Avatar
     
    Join Date: Jul 2003
    Location: Walsall
    Posts: 5,411
    Thanks: 112
    Thanked 118 Times in 93 Posts
    Lowe's system
    Aww crap, looks like one's been lost for good then when I moved hosts. I'll have to redraw something then.
    Lowe is offline   Reply With Quote
    Old 25-05-2006, 04:03 PM   #15 (permalink)
    Senior Member
     
    FatalSaviour's Avatar
     
    Join Date: Jun 2004
    Location: Oxford/London
    Posts: 1,651
    Thanks: 13
    Thanked 2 Times in 2 Posts
    FatalSaviour's system
    Originally Posted by David
    Jesus Christ - glad I am having a drink...
    I'm just going for the same . Great post though Lowe
    FatalSaviour is offline   Reply With Quote
    Old 29-05-2006, 09:44 AM   #16 (permalink)
    Senior Member
     
    Join Date: Oct 2005
    Location: North West
    Posts: 955
    Thanks: 2
    Thanked 7 Times in 3 Posts
    It's all really easy if you take time to read it. I've done alot of this over the past 2 years at uni. I can't see it mentioned but during AD conversion - it's good to use "sample and hold" technique. Instead of dropping the voltage and then upping it again for the next part - the voltage is held at a high state to (ADC conversions need a steady voltage).
    Robert is offline   Reply With Quote
    Reply

    Breadcrumb
    Go Back   HEXUS.community discussion forums > HEXUS.channels > HEXUS.lifestyle > Audio/Visual - Standard and HD


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Trackbacks are On
    Pingbacks are On
    Refbacks are On


    Similar Threads
    Thread Thread Starter Forum Replies Last Post
    More Redoute codes ! Scooby Current Bargains 17 31-08-2004 05:14 PM
    3.5mm digital out to digital coax in on a decoder? Alex Audio/Visual - Standard and HD 3 17-03-2004 06:43 PM
    Wireless audio transmission DsW HEXUS.hardware 11 07-01-2004 11:14 PM
    no audio in WinME!! please help shiato storm HEXUS.hardware 3 05-11-2003 02:40 PM
    Audigy 1 Digital Output Zak33 HEXUS.hardware 0 23-08-2003 06:16 PM



    All times are GMT. The time now is 12:56 PM.

    Any representations/statements made on the HEXUS.community discussion forums are the representations/statements of the author i.e. the person/organisation making them. If any such representations/statements are disputed they are a matter between the parties concerned.
    HEXUS Limited accepts no responsibility for any misrepresentations, inaccurate or false statements made by any person/organisation other than HEXUS Limited employees.
    For more information please read HEXUS Limited's terms, conditions and privacy policy.

    Hosted Exchange

    Powered by vBulletin® Version 3.8.4
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Content Relevant URLs by vBSEO 3.3.2
    © Copyright 2009 HEXUS® Limited. All rights reserved. Unauthorised reproduction strictly prohibited.