Hello,
I would like to draw the waveform of an entire sound file.
I have seen the example from the documentation, but this is an osciloscope, which works with a buffer, whereas I would like to draw for the entire file, as in soundcloud for example.
import ddf.minim.*;
Minim minim;
AudioPlayer sound;
void setup() {
size(300, 200);
minim = new Minim(this);
sound = minim.loadFile("mySound.wav");
println(sound.length());
for (int i=0; i < sound.length()-1024; i+=16) {
println( sound.mix.get(i));
}
exit();
}
this did not work because, because get(i) "Gets the i sample in the buffer", wich size is 1024...
how to have all the sample value inside the file ?
thx.