Bug with payload.velocity
elmcapp opened this issue · 2 comments
Describe the Bug
When receiving midi there is a bug where the payload.velocity is providing wrong value. This happens for noteOn, noteOff, cc, programChange, etc
Example Code, Steps to Reproduce, Crash Logs, etc.
I am running the simple class example to receive midi messages. When a message comes the velocity values are wrong
Screenshots
I attached a video showing the error
System Information
macOS 13.4
bug.mov
That is actually correct, it's showing a MIDI 2.0 value since by default on your system MIDI 2.0 is used. You can see it is printing an enum case of midi2(value)
.
MIDI 1.0 values can be accessed with payload.velocity.midi1Value
.
Most value types in MIDIKit will have multiple accessors. Please familiarize yourself with them. They are all extensively documented in the inline documentation. Option+clicking on any method or type will provide more information.
The MIDI 2.0 spec can also be found here: https://www.midi.org/specifications/midi-2-0-specifications