Skip to first unread message

Greg Marsh

unread,
Jun 8, 2014, 1:55:59 PM6/8/14
to mitappinv...@googlegroups.com
I'm looking for suggestions on how to do a metronome app that has one sound on odd beat (1,3 ...) another sound on even beats (2,4 ....) and another sound on half beats (.5, 1.5, 2.5 ...). Use one clock? Three clocks?

Taifun

unread,
Jun 8, 2014, 2:05:04 PM6/8/14
to mitappinv...@googlegroups.com
I would use 1 clock and a counter variable
then in the clock.timer event:

counter = counter + 1
if counter = 1
then play sound 1
elseif counter = 2
then play sound 2
elseif counter = 3
then play sound 3
       set counter = 0

Taifun

PS: first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         


Reply all
Reply to author
Forward
0 new messages