Closed brentru closed 6 years ago
looks good, please refactor to avoid the big code dupliation!
+ p = None
+ d = duration
+ if note[0].isdigit():
+ d = int(note[0])
+ p = note[1]
+ else:
+ p = note[0]
+ if "." in note:
+ d *= 1.5
+ if "#" in note:
+ p += "#"
+ o = octave
+ if note[-1].isdigit():
+ o = note[-1]
+ p = o + p
etc
There are outstanding comments and no response. Please reopen if you want to continue this.
Uses tone() from simpleio to avoid using builtin speakers on boards without them (square wave instead of sine wave for a piezo)
@ladyada