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

UWP - Error in reading channel from status byte #69

Open
usagi64 opened this issue Jul 1, 2021 · 0 comments
Open

UWP - Error in reading channel from status byte #69

usagi64 opened this issue Jul 1, 2021 · 0 comments

Comments

@usagi64
Copy link

usagi64 commented Jul 1, 2021

In method UwpMidiOutput.Convert(byte[], int, int, long)
the channel for the new MidiNoteOnMessage and MidiNoteOffMessage is calculated by
(byte)(mevent [i] & 0x7F)
instead of
(byte)(mevent [i] & 0x0F)

https://github.com/atsushieno/managed-midi/blob/master/Commons.Music.Midi.UwpShared/UwpMidiAccess.cs#L195
https://github.com/atsushieno/managed-midi/blob/master/Commons.Music.Midi.UwpShared/UwpMidiAccess.cs#L195

Here it is ok:
Commons.Music.Midi.Shared/SMF.cs
https://github.com/atsushieno/managed-midi/blob/master/Commons.Music.Midi.Shared/SMF.cs#L405
public byte Channel {
get { return (byte) (Value & 0x0F); }
}

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

1 participant