hi everyone,
I just started to experiment with the minim sound library because I'm planning on making a small music-related game, and i stumbled upon problems. My question is: whats the best, most precise and efficiant way to play sample patterns?
let's say I have 8 different .wav samples, each 2 seconds (= 1 bar at 120 bpm). I want them to play synchronized and I want to be able to switch them on and off during the game.
I tried to control the samples (.play(), .rewind() ) with a timer-class, based on millis(); but it caused some delay.
I also tried to .loop() every sample and only control the volume, but it wasn't in sync either..
I've tried the whole thing with AudioPlayer, AudioSnippet and AudioSample, but none of them worked properly!
It really has to be precise, because the game is about keeping the rythm of the music/timer.
Any thoughts? Maybe minim isnt the right choice? Should I try THE BEADS?
I just need to know the best way to handle this kind of issue.
please excuse my poor english
thank you!
I just started to experiment with the minim sound library because I'm planning on making a small music-related game, and i stumbled upon problems. My question is: whats the best, most precise and efficiant way to play sample patterns?
let's say I have 8 different .wav samples, each 2 seconds (= 1 bar at 120 bpm). I want them to play synchronized and I want to be able to switch them on and off during the game.
I tried to control the samples (.play(), .rewind() ) with a timer-class, based on millis(); but it caused some delay.
I also tried to .loop() every sample and only control the volume, but it wasn't in sync either..
I've tried the whole thing with AudioPlayer, AudioSnippet and AudioSample, but none of them worked properly!
It really has to be precise, because the game is about keeping the rythm of the music/timer.
Any thoughts? Maybe minim isnt the right choice? Should I try THE BEADS?
I just need to know the best way to handle this kind of issue.
please excuse my poor english
thank you!
1