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:
deadprogram
2022-07-20 17:13:44 +02:00
committed by Ron Evans
parent 5271bd8cfa
commit 13ed58950f
3 changed files with 22 additions and 2 deletions
+2 -2
View File
@@ -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