Fix Property message serialization to match Kotlin implementation #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Property Message Serialization to Match Kotlin Implementation
Problem
The C++ MIDI-CI tool was sending corrupt GetPropertyData messages that triggered NAK responses when connected to ktmidi-ci-tool. The root cause was that the C++ implementation used custom serialization logic that didn't follow the MIDI-CI specification properly.
Solution
This PR fixes the Property message serialization by aligning it with the Kotlin reference implementation:
Key Changes Made:
Fixed MessageType enum values - Corrected incorrect hex values in Message.hpp:
Added proper MIDI-CI chunking protocol - Implemented
serialize_property_chunks()function in MidiCIConstants.hpp that matches the KotlinmidiCIPropertyChunks()implementation with:Rewrote all Property message serialize() methods - Updated serialization for:
Technical Details:
serialize_7bit_int14()andserialize_property_common()helper functionsTesting
Link to Devin run
https://app.devin.ai/sessions/42a4dd18eab74348af056c6b31db4ae5
Requested by
Atsushi Eno (atsushieno@gmail.com)