ArrayList trouble
in
Programming Questions
•
2 years ago
Hi guys, sorry for yet another noob question but I've started a pretty ambitious project as a way of getting stuck into processing, in my experience getting your hands dirty is the best way of getting your head round things! I'm probably going about this all wrong but I'll try and explain what I am trying to do.
I'm using the
ess library to carry out FFT analysis on an incoming sound source. All of the FFT window values are stored in the
myFFT.spectrum[] array and replaced by with each consecutive FFT window. I want to store them within an ArrayList so that I have a stored copy of all the past FFT values with which to construct
shapes.
I have written this very simple bit of code, but its not working properly for some reason, I'm sure its something pretty easy! What I want to do is add the myFFT.spectrum[1] values to myArrayList (which seems to be working), and then, after the information has been stored, recall it and use the value to dictate the length of a line.
After the following value from myFFT.spectrum[1] is stored in
myArrayList I want to draw another line but move it along the y axis by 10. Any idea where I'm going wrong? It keeps coming up with the error message:
"The method line(float,float,float,float) in the type PAplet is not applicable for the arguments (int, int, Object, int)"
Many thanks! :)
- myArrayList.add(myFFT.spectrum[1]);
- int a = 0;
- int b = 10;
- line (90,b,myArrayList.get(a),b);
- a +=1;
- b +=10;
1