NOW LOADING

MidiRtpClientConnectConfig


Config sent to the service to connect to a remote RTP-MIDI device
Namespace Windows.Devices.Midi2.Transports.Rtp
Type Name MidiRtpClientConnectConfig
Type WinRT Runtime Class
Implements IMidiServiceTransportPluginConfig 
IDL MidiRtpClientConnectConfig.idl

Describes a remote device for this PC to connect to. Pass it to MidiRtpTransportManager.ConnectRtpClientAsync. To connect again after the service restarts, also pass it to MidiServiceTransportPluginConfigManager.SaveUpdate.

Constructors

Constructor Description
MidiRtpClientConnectConfig() Creates a configuration with a new ClientId, AutoReconnect and SendRecoveryJournal turned on, and no MatchCriteria

Properties

Property Description
ClientId The GUID that identifies this client entry. Use it to reconnect and disconnect later, and to find the entry in GetConfiguredClients()
Comment An optional comment saved with the entry in the configuration. The service doesn’t use it
Name What the remote device shows for this PC. Leave it empty to use this PC’s name. At most 63 bytes in UTF-8
CustomEndpointName The name for the MIDI endpoint this connection creates. It’s used from the moment the endpoint is created, so the endpoint and its MIDI 1.0 ports never appear under the remote device’s own name first. Leave it empty to use the name the remote device sends. At most 255 characters
MatchCriteria A MidiRtpClientMatchCriteria that says which remote device to connect to. Required
AutoReconnect When true, the service connects again whenever a try or a connection ends. When false, it connects once, and the entry is marked Unavailable when that try or connection ends
SendRecoveryJournal When true, each packet carries a recovery journal, so the remote device can repair a lost Note Off. Only turn it off for a device that can’t read one
SendSpeedLimit How fast this PC sends to the remote device. Unlimited by default. Choose a slower speed for a device that loses data when a lot of it arrives at once, like a long SysEx dump. A lone message is never delayed. See MidiRtpSendSpeedLimit
OfflineRetentionSeconds How long the endpoint and its MIDI 1.0 port stay while the remote device is away. Immediate by default. KeepAlways keeps them, so an app started while the device is off still finds its port. A number from 1 to 86400 keeps them that many seconds. See MidiRtpOfflineRetention. Added in version 2 of MidiTransportsRtpApiContract
SkipInBetweenValuesToCatchUp When true, and messages pile up behind SendSpeedLimit, the connection skips some in-between steps of long control change, pressure and pitch bend moves so the remote device catches up. True by default. Set it to false for a device that needs every message, however late. Added in version 2 of MidiTransportsRtpApiContract

Remarks

Calling ConnectRtpClientAsync with a ClientId that already exists replaces that entry’s settings. It doesn’t create a copy. Sending the same settings again doesn’t make the service try again, so to retry an existing entry without changing it, use ReconnectRtpClientAsync.

To change only SendSpeedLimit, send the entry’s other settings unchanged with the new speed. The new speed applies to the running connection straight away, without disconnecting. OfflineRetentionSeconds and SkipInBetweenValuesToCatchUp work the same way.

When you change one setting this way, copy every other setting from MidiRtpSavedClient, OfflineRetentionSeconds and SkipInBetweenValuesToCatchUp included. A setting you leave out goes back to its default.

See the namespace overview for when the service tries again by itself.

Didn't find what you were looking for?

Windows MIDI Services is an open source project with all source available on GitHub. We have a great community on Discord as well. Between GitHub and Discord, you should find the information you are looking for.