Message boards :
Cafe SETI :
Question about how digital sound playback works
Message board moderation
Author | Message |
---|---|
Bob DeWoody Send message Joined: 9 May 10 Posts: 3387 Credit: 4,182,900 RAC: 10 |
I may have asked this question here before but if I did the replies didn't really answer my question. OK, to start with I understand how analog sound is transmitted and received and sent to speakers. I am also pretty clear on how digital images work. But given the almost infinite variations in sound from speech to a symphony orchestra playing I don't understand how a playback device understands what the binary code it picks up represents in sound. Is there a universal protocol on how to translate each bit of code to it's appropriate sound? Would a device built by someone with no knowledge of what is currently in use be able to make sense of normal digital sound data? Is a codex built into all digital sound media or do all playback devices have the translation key built in requiring all manufacturers to follow a strict protocol? I have read page after page of verbiage encountered after typing my question online but to the best of my understanding none of it is relevant. Bob DeWoody My motto: Never do today what you can put off until tomorrow as it may not be required. This no longer applies in light of current events. |
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
Digital sound doesn't differ so much from analog sound. But with raw data it is the quantization of the amplitude of the signal, in practice, how many different "sound volume levels" can be distinguished. With 16-bit resolution, it becomes 2 ^ 16 = 65536 different levels and 24-bit thus gives 16.7M. If you consider the audio signal as a stair, the sampling frequency controls the length of each step and the quantization controls the height of the steps. At high resolution (eg 24 bit), there are many steps and a slight difference in height between them, thus making the staircase "softer". The same applies to the appearance of the beep, higher resolution gives a smoother and more realistic representation of the sound. Now there are also compressors like mp3 but in practice it works the same. I know how the MPEG2 protocol works but that it perhaps over the top. And of course SETI use the same principal in reverse:) Fourier transforms. https://en.wikipedia.org/wiki/Fourier_transform |
betreger Send message Joined: 29 Jun 99 Posts: 11361 Credit: 29,581,041 RAC: 66 |
And the graph clearly shows why digital music sounds bad compared to a quality analog recording. |
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
And the graph clearly shows why digital music sounds bad compared to a quality analogue recording. I wouldn't say bad but the difference is audible. The sound becomes more "glitchy". |
Carlos Send message Joined: 9 Jun 99 Posts: 29833 Credit: 57,275,487 RAC: 157 |
Keep in mind that the graph is simple representation. In real life sound is made up of multiple frequencies. That is why a "C" played by a flute is not the same sound as a "C" played by a piano. This graph shows how multiple frequencies parallel each other. It also shows how MP3 compress the signal. They cut out data from sounds that the human ear (in theory) cannot hear. Many people in fact can hear overtones. Which is another reason that MP3 files don't sound as rich. |
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
Many people in fact can hear overtones. Which is another reason that MP3 files don't sound as rich. Yes. And MP3 add overtones. Bad overtones(: |
Bob DeWoody Send message Joined: 9 May 10 Posts: 3387 Credit: 4,182,900 RAC: 10 |
But you still haven't addressed the question. How do combinations of 1s and 0s get translated into sounds? Bob DeWoody My motto: Never do today what you can put off until tomorrow as it may not be required. This no longer applies in light of current events. |
rob smith Send message Joined: 7 Mar 03 Posts: 22202 Credit: 416,307,556 RAC: 380 |
At the recording end the sound is sliced into very short time slices. The amplitude of each slice is measured, and this measurement is translated into a digital representation (a string of "0"s and "1"s), and a checksum (or check bit) is calculated. The two are combined into a single message, which can be stored or transmitted as required. At the playback end each message is unpacked, the digital representation is checked against its checksum, and if OK is translated into an analogue value. Obviously the record and playback have to be operating at the same frequency, and have to use the same sequence of bits - (check sum type and format, data size, data-bit sequence...) There are other methods available, but are less common. Bob Smith Member of Seti PIPPS (Pluto is a Planet Protest Society) Somewhere in the (un)known Universe? |
W-K 666 Send message Joined: 18 May 99 Posts: 19062 Credit: 40,757,560 RAC: 67 |
This might help. https://en.wikipedia.org/wiki/Sampling_(signal_processing) Signal sampling representation. The continuous signal is represented with a green colored line while the discrete samples are indicated by the blue vertical lines. If you are worried about sound quality and distortion, then don't. The speakers and the room they are in will produce the most distortion. If you have a partner who objects to speaker size or position and you are not allowed a sufficient sized cave, the only answer is divorce. |
Bob DeWoody Send message Joined: 9 May 10 Posts: 3387 Credit: 4,182,900 RAC: 10 |
So., the three characters at the end of the filename after the (.) determine the format used to translate the digital string to an analog wave format. And each format has it's unique protocols to create the proper tones. Bob DeWoody My motto: Never do today what you can put off until tomorrow as it may not be required. This no longer applies in light of current events. |
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
So., the three characters at the end of the filename after the (.) determine the format used to translate the digital string to an analog wave format. And each format has it's unique protocols to create the proper tones. No. The end of the filename after the (.) is only a hint to the OS how to interpret the content. And this interpretation is only an idea of Microsoft. No other Operation Systems. UNIX and now LINUX and OS X have a header with metadata instead in the beginning of the file so it can open the right application to read it. I don't think it works for sound files though. http://blog.dubspot.com/understanding-audio-interfaces/ There are MANY protocols for sound files. Examples: MP3, OGG, Wave. MP4 and MPEG2 that also include video. |
W-K 666 Send message Joined: 18 May 99 Posts: 19062 Credit: 40,757,560 RAC: 67 |
So., the three characters at the end of the filename after the (.) determine the format used to translate the digital string to an analog wave format. And each format has it's unique protocols to create the proper tones. Or you something like VLC that can read just about everything and is available for most OS's. |
Grant (SSSF) Send message Joined: 19 Aug 99 Posts: 13736 Credit: 208,696,464 RAC: 304 |
And the graph clearly shows why digital music sounds bad compared to a quality analogue recording. Only with low resolution , or high levels of lossy compression. Grant Darwin NT |
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
So., the three characters at the end of the filename after the (.) determine the format used to translate the digital string to an analog wave format. And each format has it's unique protocols to create the proper tones. Yes. I think VLC can read every sound file without problem. |
rob smith Send message Joined: 7 Mar 03 Posts: 22202 Credit: 416,307,556 RAC: 380 |
Well, not quite every sound file - it will not read some of the rather eccentric ones produced by professional recording equipment which have very high sample rates and very high bits/sample. But for general use it is great. Bob Smith Member of Seti PIPPS (Pluto is a Planet Protest Society) Somewhere in the (un)known Universe? |
Admiral Gloval Send message Joined: 31 Mar 13 Posts: 20269 Credit: 5,308,449 RAC: 0 |
|
janneseti Send message Joined: 14 Oct 09 Posts: 14106 Credit: 655,366 RAC: 0 |
How HQ digital sound sounds like. The Pink Floyd 24bit/96kHz sounds like this in 16bit 44.1kHz downsampled to Internet. https://www.youtube.com/watch?v=TYJbLpMepsU If you use an editor like VI you can see whats stored in the file. Not so exciting because you will only see numbers. A lot of them representing the amplitude in every sampled timeframe. I forgot FLAC. https://tracks.technics.com/GB/artists/447 High-definition audio in lossless FLAC format - rediscover Music in 16-bit and 24-bit quality, |
Admiral Gloval Send message Joined: 31 Mar 13 Posts: 20269 Credit: 5,308,449 RAC: 0 |
I use Goldwave for my sound editing. It can use these formats. Supported audio file formats, including WAV, MP3, Windows Media Audio, Ogg, FLAC, AIFF, AU, Monkey's Audio, VOX, mat, snd, and voc. |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.