Represents a note MIDI event.
More...
|
static readonly string[] | NoteNames = new string[] { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" } |
|
|
static MidiEvent | FromRawMessage (int rawMessage) |
| Converts a raw MIDI message to a MidiEvent object.
|
|
static MidiEvent | ReadNextEvent (BinaryReader br, MidiEvent previous) |
| Reads the next MIDI event from the BinaryReader and returns the corresponding MidiEvent.
|
|
static bool | IsNoteOff (MidiEvent midiEvent) |
| Checks if the given MIDI event represents a Note Off message.
|
|
static bool | IsNoteOn (MidiEvent midiEvent) |
| Checks if the provided MIDI event is a Note On event and returns true if the velocity is greater than 0.
|
|
static bool | IsEndTrack (MidiEvent midiEvent) |
| Checks if the provided MIDI event is an end track event.
|
|
static int | ReadVarInt (BinaryReader br) |
| Reads a variable-length encoded integer from the provided BinaryReader and returns the result.
|
|
static void | WriteVarInt (BinaryWriter writer, int value) |
| Writes a variable-length encoded integer to the specified BinaryWriter.
|
|
| MidiEvent () |
| Default constructor.
|
|
Represents a note MIDI event.
◆ NoteEvent() [1/2]
NAudio.Midi.NoteEvent.NoteEvent |
( |
BinaryReader | br | ) |
|
|
inline |
Reads a NoteEvent from a stream of MIDI data.
- Parameters
-
br | Binary Reader for the stream |
◆ NoteEvent() [2/2]
NAudio.Midi.NoteEvent.NoteEvent |
( |
long | absoluteTime, |
|
|
int | channel, |
|
|
MidiCommandCode | commandCode, |
|
|
int | noteNumber, |
|
|
int | velocity ) |
|
inline |
Creates a MIDI Note Event with specified parameters.
- Parameters
-
absoluteTime | Absolute time of this event |
channel | MIDI channel number |
commandCode | MIDI command code |
noteNumber | MIDI Note Number |
velocity | MIDI Note Velocity |
◆ Export()
override void NAudio.Midi.NoteEvent.Export |
( |
ref long | absoluteTime, |
|
|
BinaryWriter | writer ) |
|
inlinevirtual |
Exports the note number and velocity to a binary writer.
- Parameters
-
absoluteTime | The absolute time of the event. |
writer | The binary writer to which the note number and velocity will be exported. |
This method exports the note number and velocity to the specified binary writer.
Reimplemented from NAudio.Midi.MidiEvent.
◆ GetAsShortMessage()
override int NAudio.Midi.NoteEvent.GetAsShortMessage |
( |
| ) |
|
|
inlinevirtual |
Gets the short message representation of the note event.
- Returns
- The short message representation of the note event.
This method calculates the short message representation of the note event by combining the base short message with the note number and velocity. The note number is shifted left by 8 bits and the velocity is shifted left by 16 bits before being added to the base short message.
Reimplemented from NAudio.Midi.MidiEvent.
◆ ToString()
override string NAudio.Midi.NoteEvent.ToString |
( |
| ) |
|
|
inline |
Returns a formatted string representing the note's name and velocity.
- Returns
- A string containing the note's name and velocity, formatted as "{base.ToString()} {this.NoteName} Vel:{this.Velocity}"
◆ NoteNames
readonly string [] NAudio.Midi.NoteEvent.NoteNames = new string[] { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" } |
|
staticprivate |
◆ noteNumber
int NAudio.Midi.NoteEvent.noteNumber |
|
private |
◆ velocity
int NAudio.Midi.NoteEvent.velocity |
|
private |
◆ NoteName
string NAudio.Midi.NoteEvent.NoteName |
|
get |
◆ NoteNumber
virtual int NAudio.Midi.NoteEvent.NoteNumber |
|
getset |
◆ Velocity
int NAudio.Midi.NoteEvent.Velocity |
|
getset |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Midi/Midi/NoteEvent.cs