I was reading this StackOverflow post:
How is audio represented with numbers?
According to the answer the digital signal will have one +ve component and one negative component. So i'm trying to relate this with a very basic wav audio file.
I'm reading all frames of one WAV audio file using python. I using below code:
import wave
import sys
ip = wave.open(sys.argv[1], 'r')
print ip.getparams()
for i in range(ip.getnframes()):
iframe = ip.readframes(1)
print iframe.encode('hex') , ' >>> ',int(iframe.encode('hex'), 16)
ip.close()
'''
Output :
C:\>python readframe.py test.wav
(1, 2, 44100, 176400, 'NONE', 'not compressed')
0000 >>> 0
0204 >>> 516
0008 >>> 8
f70b >>> 63243
e10f >>> 57615
bb13 >>> 47891
8217 >>> 33303
311b >>> 12571
c41e >>> 50206
3922 >>> 14626
8b25 >>> 35621
b728 >>> 46888
bb2b >>> 47915
922e >>> 37422
3b31 >>> 15153
b233 >>> 45619
f535 >>> 62773
'''
My question is how can I get the positive and negative component of the wav audio from each frame data ..??
Thanks in Advance,