Search Results for

    Show / Hide Table of Contents

    Class EndpointsConnector

    Provides a way to connect an input MIDI device to an output MIDI devices to redirect all incoming events from the input device to the output ones. More info in the Devices connector article.
    Inheritance
    object
    EndpointsConnector
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Multimedia
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class EndpointsConnector

    Constructors

    EndpointsConnector(IInputEndpoint, params IOutputEndpoint[])

    Initializes a new instance of the EndpointsConnector with the specified input and output MIDI devices.
    Declaration
    public EndpointsConnector(IInputEndpoint inputEndpoint, params IOutputEndpoint[] outputEndpoints)
    Parameters
    Type Name Description
    IInputEndpoint inputEndpoint Input MIDI device to connect to outputEndpoints.
    IOutputEndpoint[] outputEndpoints Output MIDI devices to connect inputEndpoint to.
    Remarks
    inputEndpoint will not be actually connected to outputEndpoints after an instance of EndpointsConnector is created. You must call Connect() method to establish connection between devices.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • inputEndpoint is null.
    • outputEndpoints is null.
    ArgumentException outputEndpoints contains null.

    Properties

    AreEndpointsConnected

    Gets or sets a value indicating whether InputEndpoint currently connected to OutputEndpoints or not (i.e. Connect() method has been called).
    Declaration
    public bool AreEndpointsConnected { get; }
    Property Value
    Type Description
    bool

    EventCallback

    Gets or sets a callback to process events coming from InputEndpoint before they will be sent to OutputEndpoints. The default value is null which means no processing will be applied.
    Declaration
    public EndpointsConnectorEventCallback EventCallback { get; set; }
    Property Value
    Type Description
    EndpointsConnectorEventCallback

    InputEndpoint

    Gets an input MIDI device to connect to OutputEndpoints.
    Declaration
    public IInputEndpoint InputEndpoint { get; }
    Property Value
    Type Description
    IInputEndpoint

    OutputEndpoints

    Gets output MIDI devices to connect InputEndpoint to.
    Declaration
    public IReadOnlyCollection<IOutputEndpoint> OutputEndpoints { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IOutputEndpoint>

    Methods

    Connect()

    Connects InputEndpoint to OutputEndpoints so all events coming from the input device will be redirected to the output ones.
    Declaration
    public void Connect()

    Disconnect()

    Disconnects InputEndpoint from OutputEndpoints so events coming from the input device will not be redirected to the output ones.
    Declaration
    public void Disconnect()
    In this article
    Back to top 2026 / Generated by DocFX