We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to make this audio that I have in the code to loop every 5 seconds. With the delay I thought it would do this but instead it plays it perfectly the first time and then when five seconds comes around it seems to cut the audio to a millisecond of it. I was told to use mills but I am not sure as to how to implement this into my code?
import ddf.minim.*;
Minim minim;
AudioPlayer player;
void setup()
{
size(512, 200, P3D);
minim = new Minim(this);
player = minim.loadFile("clap_01.mp3");
}
void draw()
{
player.play();
delay(5000);
background(0);
stroke(255);
}
any help would be very appreciated!
Also is it a possibility to get the audio to only play out from the left speaker? Ot is that down the audio editing itself?
Answers
I think you need to call player.rewind() as well.
Calling that instead of player.play? Or add it in completely?
Fixed it! you were right just added in the player.rewind(); after my delay! Thank you!!
Any idea on how to get this code play on the left speaker only?
Nope, maybe the javadoc helps: http://code.compartmental.net/minim/javadoc/