Class InputEndpoint
Inheritance
InputEndpoint
Assembly: Melanchall.DryWetMidi.dll
public sealed class InputEndpoint : MidiEndpoint, IInputEndpoint, IDisposable
Properties
Gets a value that indicates whether
InputEndpoint is currently listening for
incoming MIDI events.
Declaration
public bool IsListeningForEvents { get; }
Property Value
Gets the name of the current MIDI device.
Declaration
public override string Name { get; }
Property Value
Overrides
Gets or sets a value indicating if
MidiTimeCodeReceived event should be raised or not.
Default value is
true.
Declaration
public bool RaiseMidiTimeCodeReceived { get; set; }
Property Value
Gets or sets reaction of the input device on
Note On events with velocity of zero.
The default is
NoteOn.
Declaration
public SilentNoteOnPolicy SilentNoteOnPolicy { get; set; }
Property Value
Exceptions
Declaration
public int SysExBufferSize { get; set; }
Property Value
Declaration
public int SysExBuffersCount { get; set; }
Property Value
Gets or sets a value indicating whether system exclusive event is treated as received only
when it's completed or not. Default value is true.
Declaration
public bool WaitForCompleteSysExEvent { get; set; }
Property Value
Methods
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object. |
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false. |
Overrides
Retrieves all input MIDI devices presented in the system.
Declaration
public static ICollection<InputEndpoint> GetAll()
Returns
Exceptions
Retrieves a first input MIDI device with the specified name.
Declaration
public static InputEndpoint GetByName(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
The name of an input MIDI device to retrieve. |
Returns
| Type |
Description |
| InputEndpoint |
Input MIDI device with the specified name. |
Exceptions
| Type |
Condition |
| ArgumentException |
One of the following errors occurred:
-
name is null or contains white-spaces only. -
name specifies an input MIDI device which is not presented in the system.
|
| NativeApiException |
An error occurred. |
| PlatformNotSupportedException |
This operation is not supported on the current operating system. |
Retrieves the number of input MIDI devices presented in the system.
Declaration
public static int GetEndpointsCount()
Returns
| Type |
Description |
| int |
Number of input MIDI devices presented in the system. |
Exceptions
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object. |
Overrides
Returns current value of the specified property attached to the current input device.
Declaration
public object GetProperty(InputEndpointProperty property)
Parameters
Returns
| Type |
Description |
| object |
The current value of the property. |
Exceptions
Returns the list of the properties supported by input devices on the current
operating system.
Declaration
public static InputEndpointProperty[] GetSupportedProperties()
Returns
| Type |
Description |
| InputEndpointProperty[] |
The list of the properties supported by input devices on the current
operating system. |
Exceptions
Starts listening for incoming MIDI events on the current input device.
Declaration
public void StartEventsListening()
Exceptions
Stops listening for incoming MIDI events on the current input device.
Declaration
public void StopEventsListening()
Exceptions
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
A string that represents the current object. |
Overrides
Events
Occurs when a MIDI event is received.
Declaration
public event EventHandler<MidiEventReceivedEventArgs> EventReceived
Event Type
Occurs when MIDI time code received, i.e. all MIDI events to complete MIDI time code are received.
Declaration
public event EventHandler<MidiTimeCodeReceivedEventArgs> MidiTimeCodeReceived
Event Type
Operators
Declaration
public static bool operator ==(InputEndpoint inputEndpoint1, InputEndpoint inputEndpoint2)
Parameters
Returns
| Type |
Description |
| bool |
true if the devices are equal, false otherwise. |
Declaration
public static bool operator !=(InputEndpoint inputEndpoint1, InputEndpoint inputEndpoint2)
Parameters
Returns
| Type |
Description |
| bool |
false if the devices are equal, true otherwise. |
Implements
Extension Methods