Table of Contents

Class NoteOnEvent

Namespace
NAudio.Midi
Assembly
NAudio.Midi.dll

Represents a MIDI note on event

public class NoteOnEvent : NoteEvent, ICloneable
Inheritance
NoteOnEvent
Implements
Inherited Members

Constructors

NoteOnEvent(BinaryReader)

Reads a new Note On event from a stream of MIDI data

public NoteOnEvent(BinaryReader br)

Parameters

br BinaryReader

Binary reader on the MIDI data stream

NoteOnEvent(long, int, int, int, int)

Creates a NoteOn event with specified parameters

public NoteOnEvent(long absoluteTime, int channel, int noteNumber, int velocity, int duration)

Parameters

absoluteTime long

Absolute time of this event

channel int

MIDI channel number

noteNumber int

MIDI note number

velocity int

MIDI note velocity

duration int

MIDI note duration

Properties

Channel

Get or set the channel, updating the off event at the same time

public override int Channel { get; set; }

Property Value

int

NoteLength

The duration of this note

public int NoteLength { get; set; }

Property Value

int

Remarks

There must be a note off event

NoteNumber

Get or set the Note Number, updating the off event at the same time

public override int NoteNumber { get; set; }

Property Value

int

OffEvent

The associated Note off event

public NoteEvent OffEvent { get; set; }

Property Value

NoteEvent

Methods

Clone()

Creates a deep clone of this MIDI event.

public override MidiEvent Clone()

Returns

MidiEvent

ToString()

Calls base class export first, then exports the data specific to this event MidiEvent.Export

public override string ToString()

Returns

string