mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
machine/usb/midi: add NoteOn, NoteOff, and SendCC methods for more complete API
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -39,12 +39,12 @@ func main() {
|
||||
led.Set(current)
|
||||
if current {
|
||||
for _, c := range chords[index].keys {
|
||||
m.Write([]byte{0x08, 0x80, c, 0x40})
|
||||
m.NoteOff(0, 0, c, 0x40)
|
||||
}
|
||||
index = (index + 1) % len(chords)
|
||||
} else {
|
||||
for _, c := range chords[index].keys {
|
||||
m.Write([]byte{0x09, 0x90, c, 0x40})
|
||||
m.NoteOn(0, 0, c, 0x40)
|
||||
}
|
||||
}
|
||||
prev = current
|
||||
|
||||
Reference in New Issue
Block a user