1

This question is related to this other one. Like advised, I'm having a look at the AudioSpectrumListener, but my question is "what do those 128 bands represent?" A band is usually define by a frequency in Hz. So, shall I just estimate that the frequencies measured are from 20 Hz to 20.000 Hz and I just divide the range of 19.980 Hz by 128?
Or does the central frequency of each band is following a logarithmic rule, so the visual representation is closer to what the human is hearing ?

I looked for informations in the Oracle documentation but I didn't really found an answer to that question.

Thank you for your help.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Dr_Click
  • 449
  • 4
  • 16
  • 2
    See also [`audioSpectrumNumBands`](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/media/MediaPlayer.html#audioSpectrumNumBandsProperty). – trashgod Mar 01 '19 at 10:10
  • @trashgod : Thank you. But what a pity it follows a linear scale and not a logarithmic one. The human ears have a logarithmic approach to make the difference between two sounds. – Dr_Click Mar 01 '19 at 10:46
  • 2
    See also [*Convert Linear scale to Logarithmic*](https://stackoverflow.com/q/19472747/230513). – trashgod Mar 01 '19 at 12:28

0 Answers0