A MIDI Library for .NET

OutputDevice.SendProgramChange Method

Sends a Program Change message to this MIDI output device.

public void SendProgramChange(
   Channel channel,
   Instrument instrument
);

Parameters

channel
The channel.
instrument
The instrument.

Remarks

A Program Change message is used to switch among instrument settings, generally instrument voices. An instrument conforming to General Midi 1 will have the instruments described in the Instrument enum; other instruments may have different instrument sets.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException channel or instrument is out-of-range.
InvalidOperationException The device is not open.
DeviceException The message cannot be sent.

See Also

OutputDevice Class | Midi Namespace