We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Sleep or Wait and Music
Page Index Toggle Pages: 1
Sleep or Wait and Music (Read 2380 times)
Sleep or Wait and Music
Sep 25th, 2009, 6:14am
 
What is the right method to introduce pauses into music?
Are there wait() or sleep() methods? or do you use the framerate somehow?

Sorry I'm very new to this. Any good "making music with Processing" tutorials? or websites?

Thanks,
Matt
Re: Sleep or Wait and Music
Reply #1 - Sep 25th, 2009, 6:42am
 
there is minim documentation and examples

http://code.compartmental.net/tools/minim/manual-playable/

the magic word is pause().
Re: Sleep or Wait and Music
Reply #2 - Sep 25th, 2009, 7:21am
 
Thanks this helps me understand how to do it from the minim lib.

But what if you want your processing file itself to wait.

for example I'd like play a sample wait a second, play it again, then loop.
Re: Sleep or Wait and Music
Reply #3 - Sep 25th, 2009, 11:14am
 
Since it's Java underneath - is the following recommended?

Thread.currentThread().sleep(1000);
Page Index Toggle Pages: 1