Skip to content

UWP - Error in reading channel from status byte #69

@usagi64

Description

@usagi64

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); }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions