Normalize FFT magnitude to imitate WMP

后端 未结 4 1603
情歌与酒
情歌与酒 2020-12-30 14:51

So, I\'ve been working on a little visualizer for sound files, just for fun. I basically wanted to imitate the \"Scope\" and \"Ocean Mist\" visualizers in Windows Media Play

4条回答
  •  感情败类
    2020-12-30 15:35

    Normally for this kind of thing you want to convert your FFT output to a power spectrum, usually with a log (dB) amplitude scale, e.g. for a given output bin:

    p = 10.0 * log10 (re * re + im * im);

提交回复
热议问题