So I am making a responsive audio waveform, if you don't know what that is, it is something like this: (btw this is my goal to make those audio waveforms).
https://i.ytimg.com/vi/J7uN-SQtOYI/maxresdefault.jpg
https://www.youtube.com/watch?v=OVMuwa-HRCQ
https://www.youtube.com/watch?v=SCD2tB1qILc
I don't know how to describe it, so just look at the videos and image.
but my question is, how do I get the values from the "AudioSpectrumListener", it has a lambda expression.
And I need the value of the magnitude. So I can print out the values.
Later I will use the values to make rectangles and that rectangles will change height shape because of the changing value from the magnitude.
I looked at some examples and tutorials, here are some:
jnlps://download.oracle.com/otndocs/products/javafx/8/samples/Ensemble/Ensemble.jnlp
https://victor-fx.blogspot.com/2017/08/audio-visualization-in-javafx.html
as you can see, I used animation timer, because the "AudioSpectrumInterval" is on 60, that means it updates 60 times in a second.
I can use a for a loop too, but it will print out the same values about a couple of times, or even more than that.