public void SetInstrument(Instrument instrument) { foreach (var c in Enum.GetValues(typeof(Midi.Channel))) { outputDevice.SendProgramChange((Midi.Channel)c, instrument); } }