Open usagi64 opened 3 years ago
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)
(byte)(mevent [i] & 0x7F)
(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); } }
public byte Channel {
get { return (byte) (Value & 0x0F); }
}
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); }
}