NOW LOADING

MidiSystemExclusiveReceiver


Receives SysEx 7 data from an endpoint connection and raises byte events
Namespace Windows.Devices.Midi2.Utilities.SysExTransfer
Type Name MidiSystemExclusiveReceiver
Type WinRT Runtime Class
Implements IClosable 
IDL MidiSystemExclusiveReceiver.idl

Use this type to collect incoming SysEx 7 messages from a MidiEndpointConnection, and get them as blocks of bytes.

Constructors

Constructor Description
MidiSystemExclusiveReceiver(sourceConnection, sourceGroup, maximumBytesPerEvent) Creates a receiver for one connection and group. maximumBytesPerEvent is the most bytes it collects before it raises an event

Events

Event Description
BytesReceived Raised when a complete SysEx message is ready, or when the collected bytes reach maximumBytesPerEvent

Methods

Method Description
Start() Starts receiving. Returns true if it worked
Stop() Stops receiving, and passes on any bytes it’s holding. That may raise more BytesReceived events before it returns

Properties

Property Description
IsReceiving True while it’s receiving
CountBytesReceived The total number of bytes received
CountMessagesReceived The total number of complete SysEx messages received

Remarks

maximumBytesPerEvent trades memory for how often events are raised. A smaller value means more frequent events. A larger value means fewer events, but more memory held between them.

Samples

These samples receive a System Exclusive message and write it to a .syx file. They replace the WinMM work of handling MIM_LONGDATA, preparing and queuing MIDIHDR buffers again and again, and putting back together a message that arrived across several of them.

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.