public SimplisticPianoNote(ChannelMessage message) { message.NullCheck(); SimplisticPianoNote.PianoNoteRetriever.IndexInRange((int)message.MidiChannel).AssertTrue(); this.Note = SimplisticPianoNote.PianoNoteRetriever.RetrieveNote(message).Note; this.Message = message; }
public static GeneralMidiInstrument Instrument(this ChannelMessage message) { message.NullCheck(); return((GeneralMidiInstrument)Enum.ToObject(typeof(GeneralMidiInstrument), message.MidiChannel)); }