import ddf.minim.*;
import ddf.minim.effects.*;
Minim minim;
AudioPlayer groove;
AudioPlayer groove1;
void setup()
{
size(570, 200, P2D);
minim = new Minim(this);
// try changing the buffer size to see how it changes the effect
groove = minim.loadFile("Kenny3.wav",16348);
groove.loop(0);
groove1 = minim.loadFile("
Kenny3.wav",1024 );/
/ for this audio track
groove1.loop(0);
}
void draw()
{
background(0);
stroke(255);
// we multiply the values returned by get by 50 so we can see the waveform
line(0, height/2 , 0, height/2 );
this.delay(500);
for ( int i = 0; i < groove.bufferSize() - 1; i++ )
{
float x1 = map(i, 0, groove.bufferSize(), 0, width);
float x2 = map(i+1, 0, groove.bufferSize(), 0, width);
line(x1, height/2 - groove.left.get(i)*50, x2, height/2 - groove.left.get(i+1)*50);
}
}
void stop()
{
groove.close();
groove1.close();
minim.stop();
super.stop();
}
In the above prog.. have generated a wave form line graph, and exported so i got a class files,HTML file,Java file.
Pertaining
to that wave track.and
if i dynamically change the audio track and i need a the Html & all supporting class to be generated every time.
what should i do??
i am finally trying to integrate this HTML pages for my prog.. out put.
for which i am thinking to call "export" by code automatically at the end of the program.