Reputation:
i started to get into digital audio and the wave file format / pcm i think i understood it. But i did not understood the part how you translate from the values in the file to "actual" audio get a frequency. And could not find it on the internet.
So in the wave file i have my sampling rate an bit depht and now i want to get an exact frequency out of it.
I modified the hex values to be all the same (surely after the header) an expected to hear a steady tone. But it did not work. So my other conclusion was that i have to modulate the actual "wave". If i have 8k hz samplingrate I can define the "strenght" by choosing a value in the range of the choosen bitdepth 8k times per second. And have to "draw" like a Wave to get a sinus tone and if i want to make it louder i draw the same thing with higher values like 0 to 256 for 8 bit.
And how is Stereo saved? first left channel then right channel or like one sample for right one for left?
and what happens if there are more byte of informations in the file then given in the data block? I thing the audio just stops after the defined value is that right?
sorry english is not my native language hope you understand
Upvotes: 1
Views: 349
Reputation: 51
Your understanding about audio sampling are correct. Basically the audio/sound is a sine wave, the more amplitude, more the sound. Quantization is done across sine wave discret points, then stored as digital values.
And how is Stereo saved? first left channel then right channel or like one sample for right one for left?
It depends, it can be interleaved or non-interleaved. Based on the file type.
and what happens if there are more byte of informations in the file then given in the data block? I thing the audio just stops after the defined value is that right?
It depends on the player, you choose. Most of the players just plays all the data based on sampling rate and bit depth blindly till end of the file.
Hope it helps you.
Upvotes: 1