MidiSynthesizer MidiSynthesizer MidiSynthesizer MidiSynthesizer Class

Definition

Represents the Microsoft GS wavetable software synthesizer, included in Windows. This synthesizer provides a Roland GS sound set, which includes and extends the General MIDI sound set.

public : sealed class MidiSynthesizer : IMidiOutPort, IMidiSynthesizer, IClosablepublic sealed class MidiSynthesizer : IMidiOutPort, IMidiSynthesizer, IDisposablePublic NotInheritable Class MidiSynthesizer Implements IMidiOutPort, IMidiSynthesizer, IDisposable// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AudioDevice AudioDevice AudioDevice AudioDevice

Gets the audio output device being used by this instance of the Microsoft MIDI synthesizer.

public : DeviceInformation AudioDevice { get; }public DeviceInformation AudioDevice { get; }Public ReadOnly Property AudioDevice As DeviceInformation// You can use this property in JavaScript.
Value
DeviceInformation DeviceInformation DeviceInformation DeviceInformation

An object that represents the audio output device. Use the methods and properties of this object to further identify the device.

DeviceId DeviceId DeviceId DeviceId

Gets the device ID of the Microsoft MIDI synthesizer. Note that all instances of the synthesizer have the same ID.

public : PlatForm::String DeviceId { get; }public string DeviceId { get; }Public ReadOnly Property DeviceId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The device ID of this instance of the Microsoft MIDI synthesizer.

Volume Volume Volume Volume

Gets or sets the output volume of this instance of the Microsoft MIDI synthesizer.

public : double Volume { get; set; }public double Volume { get; set; }Public ReadWrite Property Volume As double// You can use this property in JavaScript.
Value
double double double double

The synthesizer's output volume, a number between 0 and 1, inclusive.

Methods

Close() Close() Close() Close()

Closes this instance of the Microsoft MIDI synthesizer. It is a best practice for the caller to use this method to clear resources used by the MIDI object.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

CreateAsync() CreateAsync() CreateAsync() CreateAsync()

Creates a new instance of the Microsoft MIDI synthesizer that uses the system's default audio output device.

public : static IAsyncOperation<MidiSynthesizer> CreateAsync()public static IAsyncOperation<MidiSynthesizer> CreateAsync()Public Static Function CreateAsync() As IAsyncOperation( Of MidiSynthesizer )// You can use this method in JavaScript.
Returns
See Also

CreateAsync(DeviceInformation) CreateAsync(DeviceInformation) CreateAsync(DeviceInformation) CreateAsync(DeviceInformation)

Creates a new instance of the Microsoft MIDI synthesizer with a specified audio output device.

public : static IAsyncOperation<MidiSynthesizer> CreateAsync(DeviceInformation audioDevice)public static IAsyncOperation<MidiSynthesizer> CreateAsync(DeviceInformation audioDevice)Public Static Function CreateAsync(audioDevice As DeviceInformation) As IAsyncOperation( Of MidiSynthesizer )// You can use this method in JavaScript.
Parameters
Returns
See Also

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

IsSynthesizer(DeviceInformation) IsSynthesizer(DeviceInformation) IsSynthesizer(DeviceInformation) IsSynthesizer(DeviceInformation)

Determines whether a particular device is an instance of the Microsoft MIDI synthesizer. When all MIDI out ports on the system are enumerated, this method can be used to identify which of them is the Microsoft MIDI synthesizer.

public : static PlatForm::Boolean IsSynthesizer(DeviceInformation midiDevice)public static bool IsSynthesizer(DeviceInformation midiDevice)Public Static Function IsSynthesizer(midiDevice As DeviceInformation) As bool// You can use this method in JavaScript.
Parameters
midiDevice
DeviceInformation DeviceInformation DeviceInformation DeviceInformation

An object that represents the device in question.

Returns
PlatForm::Boolean bool bool bool

True if the device is the Microsoft MIDI synthesizer; otherwise, false.

SendBuffer(IBuffer) SendBuffer(IBuffer) SendBuffer(IBuffer) SendBuffer(IBuffer)

Sends an array of bytes through the synthesizer's out port. This enables you to send your data as a byte array instead of as a defined MIDI message.

public : void SendBuffer(IBuffer midiData)public void SendBuffer(IBuffer midiData)Public Function SendBuffer(midiData As IBuffer) As void// You can use this method in JavaScript.
Parameters
midiData
IBuffer IBuffer IBuffer IBuffer

The array of bytes to send.

SendMessage(IMidiMessage) SendMessage(IMidiMessage) SendMessage(IMidiMessage) SendMessage(IMidiMessage)

Sends a MIDI message through the Microsoft MIDI synthesizer's out port.

public : void SendMessage(IMidiMessage midiMessage)public void SendMessage(IMidiMessage midiMessage)Public Function SendMessage(midiMessage As IMidiMessage) As void// You can use this method in JavaScript.
Parameters
midiMessage
IMidiMessage IMidiMessage IMidiMessage IMidiMessage

The MIDI message to send.