0
我正在尝试编写代码来确定.wav文件的最小值,最大值和总零值。输出应该返回类似最大采样值(声音文件)python
Largest Sample Value is:xxxx
Smallest Sample Value is:xxxx
There are x amount of 0's in sample.
我无法确定是否使用max()为.WAV样本使用for循环后,做正确的事。
f=pickAFile()
sound=makeSound(f)
for i in range(0,getLength(sound)):
value=getSampleValueAt(sound,i)
print max(value)
print min(value)
不知道如何找到其中的零值。我可以使用打印功能输出最小和最大的语句,但我无法弄清楚要启动的最小/最大值。