[minim] building a laserharp with arduino&processing: don't stop current playback on re-trigger

edited October 2013 in Library Questions

Hi everybody!

OK here our project: we are building a laser-harp with arduino and processing. Light sensors detect when a laser (=string of the harp) is interrupted and trigger a soundfile (and much more) in processing. Works (nearly) perfect. I'm not that much into processing, it's the first time I use it with an arduino project. So this might be very simple to solve....

There is an array of 6 minim players (one for every string of the harp). Everytime an interruption is noticed, the player will be reset und the play() function is called. Simple as that (called for every string):

if (pressed[i] == 1) {  
      player[i].rewind();
      player[i].play ();
    }

The problem: when the player is not done playing, but the player triggered a second time, it will cut off the currently playing sound and replay from the beginning. I have never used minim till today.... Is there any simple way to let the current sound finish and overlay it with "itselve" as soon as it's triggered a second/third/... time?

Thanks! Fabian

Answers

  • hi! i need to do exactly the same thing for my study.... i'm in trouble with the code! how do you solve it??? please i know you can save me :P

Sign In or Register to comment.