void SendMidiEvent(SmfEvent m) { if ((m.Value & 0xFF) == 0xF0) { WriteSysEx(0xF0, m.Data); } else if ((m.Value & 0xFF) == 0xF7) { WriteSysEx(0xF7, m.Data); } else if ((m.Value & 0xFF) == 0xFF) { return; // meta. Nothing to send. } else { switch (m.StatusByte & 0xF0) { case SmfEvent.Program: case SmfEvent.CAf: buf2 [0] = m.StatusByte; buf2 [1] = m.Msb; output.SendMessage(buf2, buf2.Length); break; default: buf3 [0] = m.StatusByte; buf3 [1] = m.Msb; buf3 [2] = m.Lsb; output.SendMessage(buf3, buf3.Length); break; } } }
void SendMidiMessage(SmfEvent m) { if ((m.Value & 0xFF) == 0xF0) WriteSysEx (0xF0, m.Data); else if ((m.Value & 0xFF) == 0xF7) WriteSysEx (0xF7, m.Data); else if ((m.Value & 0xFF) == 0xFF) return; // meta. Nothing to send. else output.Write (0, new MidiMessage (m.StatusByte, m.Msb, m.Lsb)); }
void SendMidiMessage(SmfEvent m) { if ((m.Value & 0xFF) == 0xF0) { WriteSysEx(0xF0, m.Data); } else if ((m.Value & 0xFF) == 0xF7) { WriteSysEx(0xF7, m.Data); } else if ((m.Value & 0xFF) == 0xFF) { return; // meta. Nothing to send. } else { output.Write(0, new MidiMessage(m.StatusByte, m.Msb, m.Lsb)); } }