Skip to content

Commit

Permalink
machine/usb/adc/midi: fix PitchBend
Browse files Browse the repository at this point in the history
  • Loading branch information
sago35 authored and deadprogram committed Oct 25, 2024
1 parent f0d523f commit b8420e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/machine/usb/adc/midi/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b8420e7

Please sign in to comment.