简体   繁体   English

Python WAV如何获得频率量?

[英]Python wav how to get volume of frequency?

I want to make a music (wav) visualizer in pyton. 我想在pyton中制作音乐(wav)可视化程序。

I have code for get volume and frequency, but my output is only: ex. 我有获取音量和频率的代码,但我的输出仅为:例如。 440hz, 30 db. 440hz,30分贝。

I want to see (in one time): ex. 我想看一次(例如)。

100hz, 5db 100Hz,5db

400hz, 20db 400Hz,20db

800hz, 30db 800Hz,30db

1600hz, 20db 1600Hz,20db

4000hz, 2db 4000Hz,2db

How to make it? 怎么做?

I would need more details to be sure, but I believe that some sort of fft algorithm would be required. 我需要确定更多细节,但是我认为将需要某种fft算法。

Perhaps try something from numpy.fft or from scipy fft implementations . 也许尝试从numpy.fftscipy fft实现中进行尝试。

Both of those would need some love to convert amplitude to dB, but it seems possible. 两者都需要一些爱才能将幅度转换为dB,但似乎是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM