We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
From the example http://p5js.org/examples/examples/Sound_Load_and_Play_Sound.php I made a test
var song;
function setup() {
song = loadSound('assets/lucky_dragons_-_power_melody.mp3');
createCanvas(720, 200);
background(255,0,0);
}
function mousePressed() {
if ( song.isPlaying() ) { // .isPlaying() returns a boolean
song.stop();
song.jump(3);
background(255,0,0);
} else {
song.play();
background(0,255,0);
}
}
When I click, there is more than one "song". I would like to make a jquery ui slider (https://api.jqueryui.com/slider/#entry-examples) and jump in the song. How to go to a position in the song without multiplaying it ?
Answers
found ! playmode http://p5js.org/reference/#/p5.SoundFile/playMode