Xeno-rat
|
Represents a MIDI patch change event. More...
Public Member Functions | |
PatchChangeEvent (BinaryReader br) | |
Reads a new patch change event from a MIDI stream. | |
PatchChangeEvent (long absoluteTime, int channel, int patchNumber) | |
Creates a new patch change event. | |
override string | ToString () |
Returns a string that represents the current object, including the patch name. | |
override int | GetAsShortMessage () |
Adds the patch value shifted by 8 bits to the result of the base class's short message. | |
override void | Export (ref long absoluteTime, BinaryWriter writer) |
Exports the object's data to a binary writer, including the patch value. | |
Public Member Functions inherited from NAudio.Midi.MidiEvent | |
MidiEvent (long absoluteTime, int channel, MidiCommandCode commandCode) | |
Creates a MIDI event with specified parameters. | |
virtual MidiEvent | Clone () |
Creates a new object that is a copy of the current instance. | |
override string | ToString () |
Returns a string representation of the current Midi event. | |
Static Public Member Functions | |
static string | GetPatchName (int patchNumber) |
Retrieves the patch name corresponding to the given patch number. | |
Static Public Member Functions inherited from NAudio.Midi.MidiEvent | |
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. | |
Properties | |
int | Patch [get, set] |
The Patch Number. | |
Properties inherited from NAudio.Midi.MidiEvent | |
virtual int | Channel [get, set] |
The MIDI Channel Number for this event (1-16) | |
int | DeltaTime [get] |
The Delta time for this event. | |
long | AbsoluteTime [get, set] |
The absolute time for this event. | |
MidiCommandCode | CommandCode [get] |
The command code for this event. | |
Private Attributes | |
byte | patch |
Static Private Attributes | |
static readonly string[] | patchNames |
Additional Inherited Members | |
Protected Member Functions inherited from NAudio.Midi.MidiEvent | |
MidiEvent () | |
Default constructor. | |
Represents a MIDI patch change event.
|
inline |
Reads a new patch change event from a MIDI stream.
br | Binary reader for the MIDI stream |
|
inline |
Creates a new patch change event.
absoluteTime | Time of the event |
channel | Channel number |
patchNumber | Patch number |
|
inlinevirtual |
Exports the object's data to a binary writer, including the patch value.
absoluteTime | The absolute time reference for the export operation. |
writer | The binary writer to which the data is exported. |
This method exports the object's data to the specified binary writer, including the patch value. It first calls the base class's Export method to export any base class data, and then writes the patch value to the binary writer.
Reimplemented from NAudio.Midi.MidiEvent.
|
inlinevirtual |
Adds the patch value shifted by 8 bits to the result of the base class's short message.
Reimplemented from NAudio.Midi.MidiEvent.
|
inlinestatic |
Retrieves the patch name corresponding to the given patch number.
patchNumber | The number representing the patch. |
|
inline |
Returns a string that represents the current object, including the patch name.
|
private |
|
staticprivate |
|
getset |
The Patch Number.