{"id":58,"date":"2023-04-14T10:42:00","date_gmt":"2023-04-14T10:42:00","guid":{"rendered":"http:\/\/karagioza.wordpress.com\/?p=58"},"modified":"2023-05-25T07:42:28","modified_gmt":"2023-05-25T07:42:28","slug":"%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0-%d1%81-%d0%bb%d0%b0%d0%bf%d1%82%d0%be%d0%bf-%d0%b8-%d0%b2%d1%8a%d0%bd%d1%88%d0%b5%d0%bd-%d0%b0%d1%83%d0%b4%d0%b8%d0%be%d0%b8%d0%bd%d1%82%d0%b5%d1%80%d1%84%d0%b5","status":"publish","type":"post","link":"http:\/\/karagyozov.com\/?p=58","title":{"rendered":"Lecture 3 part 2 &#8211; Digital representation of the sound"},"content":{"rendered":"<h4><\/h4>\n<p>In the 80\u2019s a significant step in the improvement&nbsp; of the recording and reproducing of sound was made. The digital technology was born.<\/p>\n<p>The principle of the digital sound representation can be different, but the most common is the PCM (Pulse Code Modulation). In it the sound wave, which is continuous, is divided to frames, or, in the digital audio world,<\/p>\n<h4 style=\"text-align: center;\">SAMPLES.<\/h4>\n<p>&nbsp;<\/p>\n<p><strong><a href=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/quantization.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1109 size-full\" src=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/quantization.gif\" alt=\"\" width=\"536\" height=\"373\"><\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>This process is called <b>quantisation<\/b>.<\/p>\n<p>The number of samples per second can be different, but usually it is 22,050, 32, 44,1, 48, 88,2, 96, 176,4, 192 kHz. This means for example that with 44.1 kHz sampling frequency we have 44100 samples. So our sound wave is measured 44100 times per second and the corresponding&nbsp; number of values are stored in a memory.<\/p>\n<p>This is called <b>sampling frequency<\/b> of <b>sampling rate<\/b>. It is measured in <b>Hz<\/b>.<\/p>\n<p>The number of the combinations on the different values of the signal is dependent from the number of the bits, with which the momentary&nbsp; value of the signal is described. For example:<\/p>\n<p><a href=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/D2quantization.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1113 size-full\" src=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/D2quantization.gif\" alt=\"D2quantization\" width=\"749\" height=\"292\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Here we can see how when the signal is described with more bits, the number of the combinations in the value is more, hence the resulting waveform is closer to the original analog waveform.<\/p>\n<p>Every time you add one more bit to the bit word, the number of the numeric combinations is doubled. So the arithmetic increase in the bits gives us a geometric increase in the quality of the sound.<\/p>\n<p>This levels of quantisation are called <b>quantisation levels<\/b>. They are fixed, we can not describe something between them unless we round up to the nearest quantisation level.<\/p>\n<p>When we round up the levels, we inevitably make an error in the signal (like in the graph above). This error is called <b>quantisation error<\/b>.<\/p>\n<p>If we have more quantisation levels, the error is smaller. The number of quantisation levels depends from the number of the bits, with which the signal is described. They form a digital word, for example:<\/p>\n<p>1001&nbsp; &#8211; a 4-bit digital word;<\/p>\n<p>01001011 &#8211; 8-bit word;<\/p>\n<p>1011010011001111 &#8211; 16 bit word<\/p>\n<p>and so on.<\/p>\n<p>As we can see, every new bit doubles the number of possible combinations. For example. the 4 bit gives us 16 combinations, 16 bit &#8211; more than 50000, 24 bit &#8211; 16 million.<\/p>\n<p>The number of the bits in the digital representation of the signal is called <b>bit resolution<\/b>, or <b>bit depth<\/b>.<\/p>\n<p>Usually the bit resolutions which are mostly used are;<\/p>\n<p>8 bit &#8211; only for non professional use or in a telephone systems. The quality is very bad;<\/p>\n<p>12 bit &#8211; not very often used. Used in some digital cameras for reducing the amount of the signal;<\/p>\n<p>16 bit &#8211; the most commonly used format. Usually it is the final format in most cases;<\/p>\n<p>24 bit &#8211; ideal for recording and post production. Usually we work in it till we make the final render;<\/p>\n<p>32 bit &#8211; specific \u201cfloating point\u201d format. In theory has more dynamic range than the 24 bit.<\/p>\n<p>As we can see, usually we are working in 16 and 24 bit resolution. When working on a project, it is better to use the 24-bit option. When finalising the project, it is better to do it in 16 bit.<\/p>\n<p>So, we have two major recording parameters in the digital domain; <b>sample frequency<\/b> and <b>bit resolution<\/b>.<\/p>\n<p><a href=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/adc_quantization.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1111 size-full\" src=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/adc_quantization.gif\" alt=\"adc_quantization\" width=\"714\" height=\"536\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Every time we create a new file, the software asks us for three major parameters of the file:<\/p>\n<p>1. Sample frequency;<\/p>\n<p>2. Bit resolution;<\/p>\n<p>3. number of channels.<\/p>\n<p>That\u2019s why it is very important to know the parameters of the digital signal. In every day\u2019s work it is vitally important. If you mismatch the sample frequency of the used files with this of the project, strange things can happen with your sound &#8211; for example different pitch of the sound and different length of the file. This means lack of synchronisation and many other problems, so we have to be very careful about this parameters and how to use them.<\/p>\n<p>The <b>low sample frequency means low frequency range of the sound<\/b>, because:<\/p>\n<p><b>Every sound with a given frequency can not be described with less than twice more sample frequency.<\/b><\/p>\n<p>This is called \u201cTheorem of Nyquist\u201d &#8211; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Nyquist%E2%80%93Shannon_sampling_theorem\">https:\/\/en.wikipedia.org\/wiki\/Nyquist\u2013Shannon_sampling_theorem<\/a> &#8211; if you are addicted in mathematic \ud83d\ude42<\/p>\n<p>If not, you can simply believe me \ud83d\ude42<\/p>\n<p>The <b>low bit resolution means less dynamic range<\/b>, because the sound is described with less quantisation levels. That is true especially &nbsp; for low level signals, because they use less levels of quantisation in the same bit depth:<\/p>\n<p><a href=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1112 size-large\" src=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37-1024x683.jpg\" alt=\"slide_37\" width=\"586\" height=\"391\" srcset=\"http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37-1024x683.jpg 1024w, http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37-300x200.jpg 300w, http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37-768x512.jpg 768w, http:\/\/karagyozov.com\/wp-content\/uploads\/2011\/09\/slide_37.jpg 1080w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>that\u2019s all folks \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the 80\u2019s a significant step in the improvement&nbsp; of the recording and reproducing of sound was made. The digital technology was born.<br \/>\nThe principle of the digital sound representation can be different, but the most common is the PCM (Pulse Code Modulation). In it the sound wave, which is continuous, is divided to frames, or, in the digital audio world,<br \/>\nSAMPLES.<br \/>\n&nbsp;<\/p>\n<p>&nbsp;<br \/>\nThis process is called quantisation.<br \/>\nThe number of samples per second can be different, but usually it is 22,050, 32, 44,1, 48, 88,2, 96, 176,4, 192 kHz. This means for example that with 44.1 kHz sampling frequency we have 44100 samples. So our sound wave is measured 44100 times per second and the corresponding&nbsp; number of values are stored in a memory.<br \/>\nThis is called sampling frequency of sampling rate. It is measured in Hz.<br \/>\nThe number of the combinations on the different values of the signal is dependent from the number of the &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1110,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,19],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-audio","category-espol"],"_links":{"self":[{"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/karagyozov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58"}],"version-history":[{"count":6,"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":1751,"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions\/1751"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/karagyozov.com\/index.php?rest_route=\/wp\/v2\/media\/1110"}],"wp:attachment":[{"href":"http:\/\/karagyozov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/karagyozov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/karagyozov.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}