Re: Importing non audio files as raw data
Posted: Thu Oct 25, 2012 2:11 am
Wouldn't that mean the each channel was playing something different?
For questions, answers and opinions
https://forum.audacityteam.org/
So, when we import NTOSKRNL.exe as a sound file into Audacity, we are interpreting the binary code that it contains as if we were interpreting any other audio file. For example, say we cull these two arbitrary bytes/16 bits from the file: 0101 0100 and 1101 1000 (Hex: 54 E8). The order of which these bytes are read depends on the endianness. If we chose “little endian” then the least-significant byte is read first. Thus, we would have “54E8,” or in decimal, 21,736. If our bit depth is 16, we have 65,536 possible amplitude levels of the sound. However, since we imported the file as 2 channel stereo, this number is halved: thus, we have 32,768. Based on the 16 bit PCM encoding, the amplitude of the given sample is then approximately 65,536/32,768 or + .66333. This process repeats based on the sample rate, in our case, 44,100 times a second, until the file is totally read and rendered as an analog wave. Since we imported the file as 2 channel stereo, PCM encoding dictates that the channels are interleaved, meaning that sample 1 goes to the left channel, sample 2 to the right, sample 3 to the left, and so on. Frequency/pitch is a product of wavelength/time, and if we know the amplitude at any given time, we also know the distance from one crest to another and thus the frequency of a given sample.
No it is not halved. If the bit depth is 16 then there are 65,536 possible amplitude levels for each and every sample.rlaliberty wrote: If our bit depth is 16, we have 65,536 possible amplitude levels of the sound. However, since we imported the file as 2 channel stereo, this number is halved:
Yes. That's the whole point of stereo. http://en.wikipedia.org/wiki/Stereorlaliberty wrote:Wouldn't that mean the each channel was playing something different?
We're probably several time zones apart, but next time you're having a beer, raise your glass... cheersrlaliberty wrote: I'd buy you a beer if I could.
Any header in an audio file is rendered and will be heard as an audible click.cloud_canvas wrote:Is the header included in the rendering process as well? As in, the header is rendered as 16-bit samples at the beginning of the audio file as well?