rbn42/panon

[BUG] Incorrect harmonics appear when volume of sound goes beyond a certain level

ShawkMusic opened this issue · 1 comments

Desktop (please complete the following information):

  • OS: Manjaro 5.10.42-1-MANJARO
  • Version of Plasma Framework: 5.21.5
  • Back-end: PulseAudio (Monitor of Current Device)

Describe the bug
When I play a pure sinewave I should only see one hump going up, because sinewaves don't have any harmonics. Panon displays this correctly, but only if the volume of the sinewave is below a certain level. If it's above that level, it starts showing a bunch of incorrect harmonics,
This is what it shows when I play a single sinewave at 155Hz at a low volume (this is displayed correctly):
Screenshot_2021_06_20_(03:53:52)

This is what it shows when I play a single sinewave at 155Hz at a higher volume (notice how there are many more humps that shouldn't be there):
Screenshot_2021_06_20_(03:29:35)

rbn42 commented

Confirmed. panon uses numpy's FFT to visualize wave data. Apparently it draws more than necessary humps for low frequency signals.

So, does anyone know a better algorithm than FFT for real-time audio visulization?