音频频谱包
audioSpectrum的Python项目详细描述
声谱
不是我的虫子
- 不知何故,在googlecolab中,您需要
run all
多次才能加载整个序列,这应该是一个来自依赖关系的错误:soundfile
安装
!pipinstallaudioSpectrum
绘制光谱图
^{pr2}$spectrum: data reshaped from (9086976, 2) to (2, 4543, 2000)
plot: starting
减少频率,保持N最大
freq,time,fftAmp=aus.reduceFreqs(freq,time,fftAmp,keep=1,plot=True)
reduceFreqs: old shapes of freq,fftAmp [(136,), (2, 4542, 136)]
reduceFreqs: enforce freq[fftAmp==0] = 0
reduceFreqs: new shapes of freq,fftAmp [(2, 4542, 1), (2, 4542, 1)]
转换为MIDI并另存为文件
# freq,time,fftAmp must be from aus.reduceFreqs()notes=aus.toMidi(freq,time,fftAmp,fname,minDuration=0.1)aus.plotNotes(notes)
toMidi: fftAmp normalized to 126
其他应用程序的绘图注释
- 项目
标签: