Skip to content

Fix MidiEvent.EventType#83

Merged
atsushieno merged 2 commits intoatsushieno:masterfrom
Nytra:improveEventType
Sep 28, 2025
Merged

Fix MidiEvent.EventType#83
atsushieno merged 2 commits intoatsushieno:masterfrom
Nytra:improveEventType

Conversation

@Nytra
Copy link
Contributor

@Nytra Nytra commented Sep 28, 2025

Currently there is a problem with this property: if you have a MidiClock (0xF8) message, the property returns SysEx1 (0xF0)

MidiClock (0xF8): 1111 1000
EventType property returns SysEx1 (0xF0) 1111 0000 (discarded lower 4 bits)

The change made in this PR simply returns the unmodified status byte if it's above or equal to 0xF0, because messages in this range don't encode the channel into the status byte

@Nytra Nytra closed this Sep 28, 2025
@Nytra Nytra reopened this Sep 28, 2025
@atsushieno atsushieno merged commit 98e269a into atsushieno:master Sep 28, 2025
0 of 2 checks passed
@atsushieno
Copy link
Owner

Ah, that's a good catch. Thanks!

@Nytra Nytra deleted the improveEventType branch September 28, 2025 17:39
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

Successfully merging this pull request may close these issues.

2 participants