We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello!
OK, I've got a fantastic idea for a music sequencer but there are minor details (read essential requirements) that I'm wondering how to achieve.
First of all, I need to know how to create a clock, something that ticks at regular intervals, so that my objects could be synchronized. What's the best method to create that clock? I'm a bit dubious about checking millis() at each iteration of the draw loop, is that precise enough? There would be some graphical things happening in the same time, I'm afraid these would lead the clock to behave erratically...
Answers
See if this can help you :)
http://wiki.processing.org/w/How_do_I_display_a_message_for_a_few_seconds?
also...
How about
Would that be sufficient? I'm sure there are people who already coded sequencers around here :)
Modded Sec Counter: >:)
I think millis() is not going to be affected by performance, unless you got really low frame rate where you would not check enough fast for elapsed time. I mean times passes independently of your sketch. So it's performance is going to impact only the frequency you check for elapsed time. In fact time is passing right now... (:
warning, this is going for ever... if you don't stop it (:
Thanks! I will try to build from there. Any suggestion for keeping track of time besides replacing
lastStored = millis();
withlastStored = lastStored + interval;
?what do you mean?
When you store the millis() value, more than 1 s has passed (about 1.02 s on my machine). So using that average, 60 ticks would last 61.2 seconds.