We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
A try to use the level of a wave sound as a parameter to a warp an image. I've tried this (simplified) algorithm :
PImage source;
AudioPlayer player;
void setup() {
source = loadImage("myimage.jpg");
minim = new Minim(this);
player = minim.loadFile("mysound.wav");
}
void draw() {
player.cue(toTheRightPosition);
player.play();
PImage destination = warp(source,player.left.level());
image(destination, 0, 0);
saveFrame("line-######.png");
}
It does not work very well. So I would like to know if it is possible to get the sound buffer of an AudioPlayer without playing it (I don't need to play the sound, I use virtualDub to create an avi with the sound afterward).
It could look like :
player.cue(toTheRightPosition);
AudioBuffer mybuffer = player.getbuffer();
I hope my question is clear enough... Anybody could help me ?
Regards
Answers
Hi, I've looked in the src directory of minim. And in the AudioSource.Java Damien wrote :
That is exactly what I need ! Image and sound synchronisation would be very easy that way...
Regards