robot music generator - keeps missing notes!


i'm having difficulties coding program, i'd grateful if take me.

there's gremlin in playphrase() method - think?
what i'm trying interlace 2 streams or phrases of notes - bot can play 2 notes @ same time.

i've been attempting using millis() method synchronize them - i'm not familiar it.

thanks  
 
code -> http://www.sonodrome.co.uk/log.pde

code: [select]
if (millis() - previousmillis == lengths[playnotecounter] + gaps[playnotecounter])

this problem. there assumption millis return consecutive values, exact match occur. but, millis not return consecutive values.

that code should written as:

code: [select]
if (millis() - previousmillis [glow]>[/glow]= lengths[playnotecounter] + gaps[playnotecounter])


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > robot music generator - keeps missing notes!


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums