Introduction to digital audio - Gary explains

no loss of any of that data that was used to record the sound originally and the other is lossy which means that there has been some quality lost during the production of the sound file now the wave. wav files that you might find on PCS is really a raw PCM format and that is lossless there's nothing loss in that there's also this very popular codec called flak and that also is lossless now flak has the advantage that while it doesn't lose any of the data in the file it does use compression which means it can shrink down the file size to to roughly a half however that's still pretty big so then we move on to the lossy formats now the way these work for example MP3 is a classic example of a lossy format is there are algorithms that are used trying to understand how the brain works trying to understand how the ear interprets these sounds and chops out bits that they reckon can't be heard now of course those that are very sensitive about music will say but you can hear it there is a big difference and I'm not going to get into that argument but the idea of a loss lossy compression algorithm is it doesn't just strip away randomly things it tries to strip away things that are not needed and then it also uses compression on top of that to reduce the file size so for example 4 minutes of might be 40 megabytes but 4 minutes of an MP3 at 320 kilobit per second might only be 9 mgab 10 megabytes so that's really like a quarter of the size and that's why MP3 is so popular today because we can have relatively high quality music near CD quality music that is actually a lot smaller which is great for streaming and great for storing on our devices now there are other loss lossy formats other than just MP3 three there's also OG vorbis which is an open source codec and there's also the advanced audio codec AAC and AAC plus which is used more predominantly by Apple and within iTunes and so on however Android can play AAC files that don't have any DRM now the advantage of AAC is that at lower bit rates it certainly has a greater audio quality than MP3 files at higher bit rates there are arguments between people about which one's actually best probably AAC comes out on top however at higher bit rates they certainly are comparable with each other so let's just sum up audio is recorded by measuring the amplitude of a wave at a certain time interval and we measure that roughly nowadays at 44,000 times a second or 48,000 times a second the measure the gradient that's used to measure that is 16 bit is 65,000 different levels 24 bit is 16 million different levels and that produces the accuracy of which we're registering something that come from from the analog world into a digital representation now when that gets into your phone and you want to turn it back into analog again it goes through a Dack and the Dack converts that data back into a soundwave and it's got lots of clever technology inside of it that does things like smoothing and shaping that actually makes the sound that comes out as close as possible to the original and there are different quality dacks and different quality phones have different dacks in them and they are able to produce different qualities of sound and that's basically based on the cost of the Dack inside of that phone

"WEBVTTKind: captionsLanguage: enhello there my name is Gary Sims from Android authority now audio is a big part of the smartphone experience and people spend time and money investing in headphones and wireless headphones and speakers to try to improve that audio experience but of course if the source of your audio is bad then it doesn't matter how expensive your equipment is you're still going to get bad quality sound so the question before us today is how do computers store audio well let me explain in the real world sound waves travel through the air they arrive at our ears and our brain interprets them into music and speech and other types of sound now we can see those sound waves when we register them on a computer now the biggest difference between the analog world and the digital world is a digital world works on time slots everything happens in a certain time frame now those time slots might be very very tiny however they are still time slots they are not continuous so when we record sound we need to ask ourselves the question how often should we be recording the level of the sound wve the amplitude of the sound wve let me give you an example if I said to you I wonder if you could tell me in an email the temperature throughout the day outside your house now you could just go outside your house once look at the temperature and come back and send me a number 23° c well that doesn't tell me how much it is through the day I've lost a lot of information there so I say no can I have something that's a bit more accurate please so maybe you go out and you register it in the morning at lunchtime and in the evening but again that's only three points of data and it's a very very rough so we could say well okay measure it every hour now that would give me maybe a better graph could you measure the temperature every 10 minutes could you measure it every minute could you measure it every second so you see as we increase the accuracy we do it more and more often and it's exactly the same with sound you could measure it once uh over a whole second and you would get no information at all it would just be be rubbish you could start to measure it quicker and quicker and quicker and there you get a better representation of the Soundwave now in audio this is called the sampling rate how often do you take a sample to see the level of the uh sound wave now there are some mathematical theorems that come in here and the most important is one called the nyis theorem which tells us that to register something we need to use twice the frequency of the sound wave that we're measuring now the human ear can hear up to about 20 khz so we need to use 40 khz as our sampling rate as a bare minimum now CD quality was 44.1 khz and today some systems use 48 khz and those are basically the standard sampling rates for music now there are some situations where people record in a higher sampling rate now I'm talking here about playback through your smartphone or maybe through some other audio equipment if you're doing Studio work there may be Arguments for recording for sampling at a higher rate but for playback 44.1 or 48 khz are just absolutely fine now the other side of this is you say well what great what measure what gradient are we using to measure this sound wve again I can say to you please go outside every hour and tell me the temperature and you could come back and say it was hot and then it was hot and then it was cold well that doesn't really tell me very much that's just binary information hot or cold one bit of information so maybe you could increase your scale maybe in the morning you could come out and say it was very cold by midm morning it was just cold during the afternoon it was hot then late afternoon it was very hot and then it got cold again and then very cold and here I just have four different states that gives me two bits of information well of course if you think about a thermometer when we're measuring temperature maybe there's 100 or 120 130 different levels that we can measure temperature on maybe even more if we use fractions so with audio we need to have a good system for measuring the level of the audio now 8 Bits would give us 256 different levels and 16 bits giv us over 65,000 different levels and 24 bit gives us over 16 million different levels now there are some arguments for using 24-bit audio and we'll go into that in a minute however a lot of systems use just 16 bit audio which gives you 655,000 different levels when you are registering the sound so at 44,000 times a second a point is plotted on a graph somewhere within a range of 65,000 different points and that is how the sound is recorded and that system is called PCM pulse code modulation now when you have this digital music on your smartphone it needs to be turned back from a digital system into an analog system that then Powers your headphones or a speaker or something else now to do that you need to use something it's called a digital to audio converter and the digital to audio converter the Dack has the job of taking all those reference points of uh information about the waves in the sound and converting it back again into real sound now there are lots of different Technologies involved in doing that however there are a couple of important things to realize one is that sometimes you might see diagrams that show kind of the Waves being squares with big steps on them well that's actually not quite true the way Dax work is that using interpolation using some filters they are actually able to smooth out the data the sine wave that comes out from that data one of the ways they do that is using oversampling and every time you oversample something you can actually if you double the oversample you can reduce the amount of noise in the audible Spectrum by up to 3 DB so actually some D will go do lots of oversampling and then reduce it back down again to produce the sound wave so there's lots of Technologies involved but don't think that DXs are producing kind of these square waves they're not it's all very very smooth now your mobile phone will have a Dack in it and hopefully it will have a high quality Dack and hopefully it will produce good sound from that digital audio of course the cheaper the phone the chance are the cheaper the components and the chance to have the cheaper the Dack that's why you need to be happy with a Dack that's inside your phone now I mentioned earlier on there was an argument for using 24bit uh playback and 24-bit recording now the reason behind it is this all audio circuits produce an amount of noise now the amount of noise they produce depends on the quality and so on now the best we can produce a day is 124 DB of signal to noise ratio now 124 DB means 21 bits of information now 21 bits is greater than the 16 bits you find in a lot of format and it's coming close to 100 uh to 20 24 bits so 24 bits would seem to be the optimum best situation for audio playback now I'm not talking about Studio stuff here if you're doing things in a studio there is a good argument for using 32bits because sound waves need to be manipulated they need to be added they need to be changed they need to be mixed around and you need a lot of bandwidth so there's no clipping going on I'm talking now about playback 24-bit playback really is the best that we can expect now the problem with the PCM format this raw format of all this data we've captured as we're registering the sound wve is it can produce very large files for example a 16bit capture or 4 minutes of Music at 16 bits 44.1 khz will produce a file size of around 40 megabytes now clearly that's not good for streaming services it's not good when you're streaming data over 3G or 4G so there has to be a way of generating smaller files and that's where we get into the different file format formats that are available today now there are two different types of file format one is called lossless which means there is no loss of any of that data that was used to record the sound originally and the other is lossy which means that there has been some quality lost during the production of the sound file now the wave. wav files that you might find on PCS is really a raw PCM format and that is loss L there's nothing loss in that there's also this very popular codec called flak and that also is lossless now flak has the advantage that while it doesn't lose any of the data in the file it does use compression which means it can shrink down the file size to to roughly a half however that's still pretty big so then we move on to the lossy formats now the way these work for example MP3 is a classic example of a lossy format is there are algorithms that are used trying to understand how the brain works trying to understand how the ear interprets these sounds and chops out bits that they reckon can't be heard now of course those that are very sensitive about music will say but you can hear it there is a big difference and I'm not going to get into that argument but the idea of a loss lossy compression algorithm is it doesn't just strip away randomly things it tries to strip away things that are not needed and then it also uses compression on top of that to reduce the file size so for example 4 minutes of might be 40 megabytes but 4 minutes of an MP3 at 320 kilobit per second might only be 9 mgab 10 megabytes so that's really like a quarter of the size and that's why MP3 is so popular today because we can have relatively high quality music near CD quality music that is actually a lot smaller which is great for streaming and great for storing on our devices now there are other loss lossy formats other than just MP3 three there's also OG vorbis which is an open source codec and there's also the advanced audio codec AAC and AAC plus which is used more predominantly by Apple and within iTunes and so on however Android can play AAC files that don't have any DRM now the advantage of AAC is that at lower bit rates it certainly has a greater audio quality than MP3 files at higher bit rates there are arguments between people about which one's actually best probably AAC comes out on top however at higher bit rates they certainly are comparable with each other so let's just sum up audio is recorded by measuring the amplitude of a wave at a certain time interval and we measure that roughly nowadays at 44,000 times a second or 48,000 times a second the measure the gradient that's used to measure that is 16 bit is 65,000 different levels 24 bit is 16 million different levels and that produces the accuracy of which we're registering something that come from from the analog world into a digital representation now when that gets into your phone and you want to turn it back into analog again it goes through a Dack and the Dack converts that data back into a soundwave and it's got lots of clever technology inside of it that does things like smoothing and shaping that actually makes the sound that comes out as close as possible to the original and there are different quality dacks and different quality phones have different dacks in them and they are able to produce different qualities of sound and that's basically based on the cost of the Dack inside of that phone and finally there are different formats now we have an old saying in software engineering that if you put rubbish in you're going to get rubbish out so if you start with a rubbish audio file doesn't matter how good your audio equipment is you're going to get rubbish out the other end but if you start with a good source then there's a chance you're going to get good output now there are lossless and lossy uh codecs lossless include Flack and wav wave files lossi include MP3 ogis and uh AAC and AAC plus each have their own characteristics about the amount of compression they can do the amount of data that's stripped out of them and the final file size well my name is Gary Sims from Andro Authority I hope you enjoyed this introduction to audio and as I've said on other of my videos this only is an introduction it can't be more than that in just a few minute or video but I do hope you liked it and if you did please do give it a thumbs up also don't forget to subscribe to Android authority you can follow me on Twitter you can follow Android authority on Twitter Google+ and on Instagram don't forget to download the Android app but last but not least don't forget to go to androidauthority.com because we are your source for all things Androidhello there my name is Gary Sims from Android authority now audio is a big part of the smartphone experience and people spend time and money investing in headphones and wireless headphones and speakers to try to improve that audio experience but of course if the source of your audio is bad then it doesn't matter how expensive your equipment is you're still going to get bad quality sound so the question before us today is how do computers store audio well let me explain in the real world sound waves travel through the air they arrive at our ears and our brain interprets them into music and speech and other types of sound now we can see those sound waves when we register them on a computer now the biggest difference between the analog world and the digital world is a digital world works on time slots everything happens in a certain time frame now those time slots might be very very tiny however they are still time slots they are not continuous so when we record sound we need to ask ourselves the question how often should we be recording the level of the sound wve the amplitude of the sound wve let me give you an example if I said to you I wonder if you could tell me in an email the temperature throughout the day outside your house now you could just go outside your house once look at the temperature and come back and send me a number 23° c well that doesn't tell me how much it is through the day I've lost a lot of information there so I say no can I have something that's a bit more accurate please so maybe you go out and you register it in the morning at lunchtime and in the evening but again that's only three points of data and it's a very very rough so we could say well okay measure it every hour now that would give me maybe a better graph could you measure the temperature every 10 minutes could you measure it every minute could you measure it every second so you see as we increase the accuracy we do it more and more often and it's exactly the same with sound you could measure it once uh over a whole second and you would get no information at all it would just be be rubbish you could start to measure it quicker and quicker and quicker and there you get a better representation of the Soundwave now in audio this is called the sampling rate how often do you take a sample to see the level of the uh sound wave now there are some mathematical theorems that come in here and the most important is one called the nyis theorem which tells us that to register something we need to use twice the frequency of the sound wave that we're measuring now the human ear can hear up to about 20 khz so we need to use 40 khz as our sampling rate as a bare minimum now CD quality was 44.1 khz and today some systems use 48 khz and those are basically the standard sampling rates for music now there are some situations where people record in a higher sampling rate now I'm talking here about playback through your smartphone or maybe through some other audio equipment if you're doing Studio work there may be Arguments for recording for sampling at a higher rate but for playback 44.1 or 48 khz are just absolutely fine now the other side of this is you say well what great what measure what gradient are we using to measure this sound wve again I can say to you please go outside every hour and tell me the temperature and you could come back and say it was hot and then it was hot and then it was cold well that doesn't really tell me very much that's just binary information hot or cold one bit of information so maybe you could increase your scale maybe in the morning you could come out and say it was very cold by midm morning it was just cold during the afternoon it was hot then late afternoon it was very hot and then it got cold again and then very cold and here I just have four different states that gives me two bits of information well of course if you think about a thermometer when we're measuring temperature maybe there's 100 or 120 130 different levels that we can measure temperature on maybe even more if we use fractions so with audio we need to have a good system for measuring the level of the audio now 8 Bits would give us 256 different levels and 16 bits giv us over 65,000 different levels and 24 bit gives us over 16 million different levels now there are some arguments for using 24-bit audio and we'll go into that in a minute however a lot of systems use just 16 bit audio which gives you 655,000 different levels when you are registering the sound so at 44,000 times a second a point is plotted on a graph somewhere within a range of 65,000 different points and that is how the sound is recorded and that system is called PCM pulse code modulation now when you have this digital music on your smartphone it needs to be turned back from a digital system into an analog system that then Powers your headphones or a speaker or something else now to do that you need to use something it's called a digital to audio converter and the digital to audio converter the Dack has the job of taking all those reference points of uh information about the waves in the sound and converting it back again into real sound now there are lots of different Technologies involved in doing that however there are a couple of important things to realize one is that sometimes you might see diagrams that show kind of the Waves being squares with big steps on them well that's actually not quite true the way Dax work is that using interpolation using some filters they are actually able to smooth out the data the sine wave that comes out from that data one of the ways they do that is using oversampling and every time you oversample something you can actually if you double the oversample you can reduce the amount of noise in the audible Spectrum by up to 3 DB so actually some D will go do lots of oversampling and then reduce it back down again to produce the sound wave so there's lots of Technologies involved but don't think that DXs are producing kind of these square waves they're not it's all very very smooth now your mobile phone will have a Dack in it and hopefully it will have a high quality Dack and hopefully it will produce good sound from that digital audio of course the cheaper the phone the chance are the cheaper the components and the chance to have the cheaper the Dack that's why you need to be happy with a Dack that's inside your phone now I mentioned earlier on there was an argument for using 24bit uh playback and 24-bit recording now the reason behind it is this all audio circuits produce an amount of noise now the amount of noise they produce depends on the quality and so on now the best we can produce a day is 124 DB of signal to noise ratio now 124 DB means 21 bits of information now 21 bits is greater than the 16 bits you find in a lot of format and it's coming close to 100 uh to 20 24 bits so 24 bits would seem to be the optimum best situation for audio playback now I'm not talking about Studio stuff here if you're doing things in a studio there is a good argument for using 32bits because sound waves need to be manipulated they need to be added they need to be changed they need to be mixed around and you need a lot of bandwidth so there's no clipping going on I'm talking now about playback 24-bit playback really is the best that we can expect now the problem with the PCM format this raw format of all this data we've captured as we're registering the sound wve is it can produce very large files for example a 16bit capture or 4 minutes of Music at 16 bits 44.1 khz will produce a file size of around 40 megabytes now clearly that's not good for streaming services it's not good when you're streaming data over 3G or 4G so there has to be a way of generating smaller files and that's where we get into the different file format formats that are available today now there are two different types of file format one is called lossless which means there is no loss of any of that data that was used to record the sound originally and the other is lossy which means that there has been some quality lost during the production of the sound file now the wave. wav files that you might find on PCS is really a raw PCM format and that is loss L there's nothing loss in that there's also this very popular codec called flak and that also is lossless now flak has the advantage that while it doesn't lose any of the data in the file it does use compression which means it can shrink down the file size to to roughly a half however that's still pretty big so then we move on to the lossy formats now the way these work for example MP3 is a classic example of a lossy format is there are algorithms that are used trying to understand how the brain works trying to understand how the ear interprets these sounds and chops out bits that they reckon can't be heard now of course those that are very sensitive about music will say but you can hear it there is a big difference and I'm not going to get into that argument but the idea of a loss lossy compression algorithm is it doesn't just strip away randomly things it tries to strip away things that are not needed and then it also uses compression on top of that to reduce the file size so for example 4 minutes of might be 40 megabytes but 4 minutes of an MP3 at 320 kilobit per second might only be 9 mgab 10 megabytes so that's really like a quarter of the size and that's why MP3 is so popular today because we can have relatively high quality music near CD quality music that is actually a lot smaller which is great for streaming and great for storing on our devices now there are other loss lossy formats other than just MP3 three there's also OG vorbis which is an open source codec and there's also the advanced audio codec AAC and AAC plus which is used more predominantly by Apple and within iTunes and so on however Android can play AAC files that don't have any DRM now the advantage of AAC is that at lower bit rates it certainly has a greater audio quality than MP3 files at higher bit rates there are arguments between people about which one's actually best probably AAC comes out on top however at higher bit rates they certainly are comparable with each other so let's just sum up audio is recorded by measuring the amplitude of a wave at a certain time interval and we measure that roughly nowadays at 44,000 times a second or 48,000 times a second the measure the gradient that's used to measure that is 16 bit is 65,000 different levels 24 bit is 16 million different levels and that produces the accuracy of which we're registering something that come from from the analog world into a digital representation now when that gets into your phone and you want to turn it back into analog again it goes through a Dack and the Dack converts that data back into a soundwave and it's got lots of clever technology inside of it that does things like smoothing and shaping that actually makes the sound that comes out as close as possible to the original and there are different quality dacks and different quality phones have different dacks in them and they are able to produce different qualities of sound and that's basically based on the cost of the Dack inside of that phone and finally there are different formats now we have an old saying in software engineering that if you put rubbish in you're going to get rubbish out so if you start with a rubbish audio file doesn't matter how good your audio equipment is you're going to get rubbish out the other end but if you start with a good source then there's a chance you're going to get good output now there are lossless and lossy uh codecs lossless include Flack and wav wave files lossi include MP3 ogis and uh AAC and AAC plus each have their own characteristics about the amount of compression they can do the amount of data that's stripped out of them and the final file size well my name is Gary Sims from Andro Authority I hope you enjoyed this introduction to audio and as I've said on other of my videos this only is an introduction it can't be more than that in just a few minute or video but I do hope you liked it and if you did please do give it a thumbs up also don't forget to subscribe to Android authority you can follow me on Twitter you can follow Android authority on Twitter Google+ and on Instagram don't forget to download the Android app but last but not least don't forget to go to androidauthority.com because we are your source for all things Android\n"