-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
EdWare can play Tunes with "rest notes" and this tune plays nice:" f3R1c3R1a3R1f3"
EdPy has some bug and cannot handle R for Rest in tune string. Rest note is documented in documentation in Ed.TuneString() and Ed.PlayTune() but there is no example of tune string with "REST" note.
https://meetedison.com/content/EdPy-app-documentation-guide.pdf
This is demo, note that tune2 and tune3 is not played as expected:
#-------------Setup----------------
import Ed
Ed.EdisonVersion = Ed.V2
Ed.DistanceUnits = Ed.CM
Ed.Tempo = Ed.TEMPO_MEDIUM
#--------Your code below-----------
Ed.TimeWait(1, Ed.TIME_SECONDS)
tune1 = Ed.TuneString(9, "f4c4a4f4z") # OK
tune2 = Ed.TuneString(15, "f4R6c4R6a4R6f4z") # BUG is here, only the first note is played
tune3 = Ed.TuneString(13, "f4c4R6a4R6f4z") # BUG is here, only first two notes are played
Ed.LeftLed(Ed.ON)
Ed.RightLed(Ed.OFF)
Ed.PlayTune(tune1)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)
Ed.LeftLed(Ed.OFF)
Ed.RightLed(Ed.ON)
Ed.PlayTune(tune2)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)
Ed.LeftLed(Ed.ON)
Ed.RightLed(Ed.ON)
Ed.PlayTune(tune3)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)
Metadata
Metadata
Assignees
Labels
No labels