Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with payload.velocity #98

Closed
elmcapp opened this issue Jun 3, 2022 · 2 comments
Closed

Bug with payload.velocity #98

elmcapp opened this issue Jun 3, 2022 · 2 comments

Comments

@elmcapp
Copy link

elmcapp commented Jun 3, 2022

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
@elmcapp elmcapp added the 🐞 bug Something isn't working label Jun 3, 2022
@orchetect
Copy link
Owner

orchetect commented Jun 4, 2022

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.

@orchetect orchetect removed the 🐞 bug Something isn't working label Jun 4, 2022
@orchetect
Copy link
Owner

The MIDI 2.0 spec can also be found here: https://www.midi.org/specifications/midi-2-0-specifications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants