Xeno-rat
|
Represents a MIDI meta event with raw data. More...
Public Member Functions | |
RawMetaEvent (MetaEventType metaEventType, long absoluteTime, byte[] data) | |
Creates a meta event with raw data. | |
override MidiEvent | Clone () |
Clones the current MidiEvent and returns a new instance of RawMetaEvent. | |
override string | ToString () |
Returns a string representation of the object, including the hexadecimal representation of the data. | |
override void | Export (ref long absoluteTime, BinaryWriter writer) |
Exports the data to a binary writer, updating the absoluteTime and writing the data if it is not null. | |
![]() | |
MetaEvent (MetaEventType metaEventType, int metaDataLength, long absoluteTime) | |
Custom constructor for use by derived types, who will manage the data themselves. | |
override string | ToString () |
Returns a string representation of the object, combining the AbsoluteTime and metaEvent properties. | |
![]() | |
virtual int | GetAsShortMessage () |
Returns the short message value calculated based on the channel and command code. | |
MidiEvent (long absoluteTime, int channel, MidiCommandCode commandCode) | |
Creates a MIDI event with specified parameters. | |
override string | ToString () |
Returns a string representation of the current Midi event. | |
Properties | |
byte[] | Data [get, set] |
Raw data contained in the meta event. | |
![]() | |
MetaEventType | MetaEventType [get] |
Gets the type of this meta event. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
static MetaEvent | ReadMetaEvent (BinaryReader br) |
Reads a meta event from the provided BinaryReader and returns the corresponding MetaEvent object. | |
![]() | |
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. | |
![]() | |
MetaEvent () | |
Empty constructor. | |
![]() | |
MidiEvent () | |
Default constructor. | |
Represents a MIDI meta event with raw data.
|
inline |
Creates a meta event with raw data.
|
virtual |
Clones the current MidiEvent and returns a new instance of RawMetaEvent.
Reimplemented from NAudio.Midi.MetaEvent.
|
inlinevirtual |
Exports the data to a binary writer, updating the absoluteTime and writing the data if it is not null.
absoluteTime | The absolute time reference to be updated. |
writer | The binary writer to which the data will be exported. |
This method first calls the base class's Export method to update the absoluteTime . If the Data is not null, it writes the data to the writer .
Reimplemented from NAudio.Midi.MetaEvent.
|
inline |
Returns a string representation of the object, including the hexadecimal representation of the data.
This method overrides the base ToString method and appends the hexadecimal representation of the data in the object to the string representation. The hexadecimal representation is obtained by iterating through each byte in the Data array and formatting it as a two-digit hexadecimal number. The resulting string includes the base ToString representation followed by the hexadecimal data representation.
|
getset |
Raw data contained in the meta event.