aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorsago35 <[email protected]>2024-10-25 08:44:09 +0900
committerRon Evans <[email protected]>2024-10-25 06:25:49 +0100
commitb8420e78bb3fe9db73898f2168a91a27e313f1c8 (patch)
tree82d539934ba5f864e66e09be4639d78f2bdc5919 /src
parentf0d523f7782f9088c3841e955a37fcddb9d2da56 (diff)
downloadtinygo-b8420e78bb3fe9db73898f2168a91a27e313f1c8.tar.gz
tinygo-b8420e78bb3fe9db73898f2168a91a27e313f1c8.zip
machine/usb/adc/midi: fix PitchBend
Diffstat (limited to 'src')
-rw-r--r--src/machine/usb/adc/midi/messages.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/usb/adc/midi/messages.go b/src/machine/usb/adc/midi/messages.go
index baeb0c409..c123acb73 100644
--- a/src/machine/usb/adc/midi/messages.go
+++ b/src/machine/usb/adc/midi/messages.go
@@ -177,7 +177,7 @@ func (m *midi) PitchBend(cable, channel uint8, bend uint16) error {
return errInvalidMIDIPitchBend
}
- m.msg[0], m.msg[1], m.msg[2], m.msg[3] = ((cable&0xf)<<4)|CINPitchBendChange, MsgPitchBend|((channel-1)&0xf), byte(bend&0x7f), byte(bend>>8)&0x7f
+ m.msg[0], m.msg[1], m.msg[2], m.msg[3] = ((cable&0xf)<<4)|CINPitchBendChange, MsgPitchBend|((channel-1)&0xf), byte(bend&0x7f), byte(bend>>7)&0x7f
_, err := m.Write(m.msg[:])
return err
}