I'm trying to get information about songs (mainly volume and frequency info) without actually listening to the entire song.
The point is to get all this information at a much quicker rate than I would be able to by doing it in real-time. However, I haven't been able to figure out a way to load samples into a buffer (which is what FFTs, etc. analyze when you call their functions) without actually playing the music.
does anybody know if what I'm attempting to do is possible with minim? if it is, can somebody point me in the right direction? i've spent numerous hours at this point reading lots of articles about this, and am on the verge of either programming my own extension to minim or javasound... i figured it was worth a post on the processing forums!
I have a sketch in processing that currently includes a loading feature, where my program reads through a large array and loads information from each location in the array, in a manner similar to the following:
int length = array.length();
for(int i = 0; i < length; i++)
{
load information at current location;
}
I'm trying to add a progress bar to this feature where I draw rectangles with increasing widths starting from the same location as different indices in the array are reached. Upon browsing through these forums for a while, I figured that if I want something to animate this way, I would have to have the loading code running from within draw(). As such, I rewrote my code to be called from within draw(), but nothing is getting displayed. I have print statements that concurrently print out the progress the load function is making, so I know that the code is otherwise running properly.
The only explanation that I can think of is that processing draws all the stuff from within draw() only after an entire iteration through the function is completed. I've spent the past 30-40 minutes or so browsing around online trying to find some technical documentation for the draw() function, but I haven't had any luck finding something of that sort. Can anybody on this forum point me to such a page, or alternatively confirm/deny my hypothesis?