deadzone_test.py (448B)
1 import numpy as np 2 import matplotlib.pyplot as plt 3 import soundfile as sf 4 5 def toMono (arr): 6 list = [] 7 for samp in arr: 8 list.append (samp[0]) 9 return list 10 11 data, fs = sf.read ("RisingSine_NoBias.wav") 12 mono = toMono (data) 13 14 N = 450 15 start = 5900 16 17 t = np.arange (len (mono)) 18 19 plt.plot (t[start:start+N], mono[start:start+N]) 20 plt.xlabel ("Time [samples]") 21 plt.ylabel ("Output Amplitude") 22 plt.title ("\"Deadzone\" Effect") 23 plt.show()