Example #1
0
        /// <summary>
        /// Converts a packet into the DWORD expected by the WinMM api.
        /// </summary>
        public UInt32 CreateShortMessage()
        {
            byte main = MidiHelpers.BindTypeAndChannel(Type, Channel);//, (byte)Number, (byte)Value

            return((UInt32)((int)main | (Number << 8) | (Value << 16)));
        }
Example #2
0
 /// <summary>
 /// Converts this MIDI message to an arry of bytes to be
 /// delivered to a low-level MIDI driver.
 /// </summary>
 public byte[] CreatePacket()
 {
     return(new byte[] { MidiHelpers.BindTypeAndChannel(Type, Channel), (byte)Number, (byte)Value });
 }