Table of Contents

Struct UINoteEvent

Namespace
PluginUI.NPlug
Assembly
PluginUI.NPlug.dll

A note played on the editor (on-screen keyboard, pads), delivered to the processor.

public readonly record struct UINoteEvent : IEquatable<UINoteEvent>
Implements
Inherited Members

Constructors

UINoteEvent(UINoteKind, int, float, int)

A note played on the editor (on-screen keyboard, pads), delivered to the processor.

public UINoteEvent(UINoteKind Kind, int Pitch, float Velocity, int Channel = 0)

Parameters

Kind UINoteKind

What happens.

Pitch int

MIDI note number (0..127); unused for AllNotesOff.

Velocity float

Velocity in [0, 1] (note-on), release velocity (note-off).

Channel int

MIDI channel, 0-based.

Properties

AllOff

The "all notes off" event.

public static UINoteEvent AllOff { get; }

Property Value

UINoteEvent

Channel

MIDI channel, 0-based.

public int Channel { get; init; }

Property Value

int

Kind

What happens.

public UINoteKind Kind { get; init; }

Property Value

UINoteKind

Pitch

MIDI note number (0..127); unused for AllNotesOff.

public int Pitch { get; init; }

Property Value

int

Velocity

Velocity in [0, 1] (note-on), release velocity (note-off).

public float Velocity { get; init; }

Property Value

float

Methods

Off(int, int)

A note-off event.

public static UINoteEvent Off(int pitch, int channel = 0)

Parameters

pitch int

MIDI note number.

channel int

MIDI channel, 0-based.

Returns

UINoteEvent

The event.

On(int, float, int)

A note-on event.

public static UINoteEvent On(int pitch, float velocity, int channel = 0)

Parameters

pitch int

MIDI note number.

velocity float

Velocity in [0, 1].

channel int

MIDI channel, 0-based.

Returns

UINoteEvent

The event.