/// <summary>Returns a comment for the first data byte of a channel message/event.</summary> /// <param name="messageType">Identifies the type of channel message (high nibble of status byte).</param> /// <param name="data">The first data byte of the event.</param> /// <param name="channel">One of the sixteen logical MIDI channels on which the event is transmitted.</param> /// <param name="keySignature">A MidiKeySignature value that applies to the event.</param> /// <returns>A comment for the data byte.</returns> public static string GetData1Comment(MidiMessageType messageType, int data, int channel, MidiKeySignature keySignature) { string s = (MidiChannelEvent.TypeMap[messageType].DescribeData1 == null) ? null : MidiChannelEvent.TypeMap[messageType].DescribeData1(data, channel, keySignature); return(MidiChannelEvent.BuildDataComment(MidiChannelEvent.TypeMap[messageType].Data1Name, data, s)); }
/// <summary>Returns a comment for the second data byte of a channel message/event.</summary> /// <param name="messageType">Identifies the type of channel message (high nibble of status byte).</param> /// <param name="data">The second data byte of the event.</param> /// <returns>A comment for the data byte.</returns> public static string GetData2Comment(MidiMessageType messageType, int data) { if (!MidiChannelEvent.HasData2(messageType)) { return(null); } string s = (MidiChannelEvent.TypeMap[messageType].DescribeData2 == null) ? null : MidiChannelEvent.TypeMap[messageType].DescribeData2(data, 0, MidiKeySignature.NA); return(MidiChannelEvent.BuildDataComment(MidiChannelEvent.TypeMap[messageType].Data2Name, data, s)); }