This does not work, as my java in eclipse complains that setData requires doubles, not floats.
Also, the SampleChunk sc seems to have no purpose in the while loop.
So I tried to fix it:
The visualisation window just has a flat line (say: f(x) = 0 kind of line). The peak is not there!
But now I wonder whether "SampleChunk sc" should be used inside the while loop in order to visualise the FFT of the "next chunk"..... Anyway, I suspect something is wrong with this example, but I can't see what....
In Tutorial chapter 10 "getLastGeneratedFeature()" method does not seem to exist; should that be "getLastCalculatedFeature()"? Also "setAxisLocation( 100 )" suggested in the tip does not exist....
Hi,
I'm trying Tutorial chapter 9 about FFT. The example code suggestion is this:
This does not work, as my java in eclipse complains that setData requires doubles, not floats.
Also, the SampleChunk sc seems to have no purpose in the while loop.
So I tried to fix it:
The visualisation window just has a flat line (say: f(x) = 0 kind of line). The peak is not there!
But now I wonder whether "SampleChunk sc" should be used inside the while loop in order to visualise the FFT of the "next chunk"..... Anyway, I suspect something is wrong with this example, but I can't see what....
In Tutorial chapter 10 "getLastGeneratedFeature()" method does not seem to exist; should that be "getLastCalculatedFeature()"? Also "setAxisLocation( 100 )" suggested in the tip does not exist....
Anyway, I modified the code into this:
However, the visualisation is again just a flat line.....
R.
Last edit: spamrefuse 2017-09-08
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello,
I have experiment the same problems. Perhaps we need to join effort and fix the java code ourselves?
I'm not all that hot on how the audio bits work, however it's possible that the tutorial has just got out of sync with the actual API. For all the tutorial chapters there is code in the github repo which should mirror what the chapters do. Can you use this as a starting point: https://github.com/openimaj/openimaj/tree/master/documentation/tutorial/tutorial-code/src/main/java/org/openimaj/docs/tutorial/fund/audio
Great information Jonathan. Thanks for clarifying this.
@Jonathan that was it. The GIT source code works perflectly (at least for MFCC). The documentation is running behind. ;-)