Xeno-rat
Loading...
Searching...
No Matches
NAudio.Midi.SysexEvent Class Reference

Represents a MIDI sysex message. More...

Inheritance diagram for NAudio.Midi.SysexEvent:
Collaboration diagram for NAudio.Midi.SysexEvent:

Public Member Functions

override MidiEvent Clone ()
 Clones the SysexEvent and returns a new instance of MidiEvent.
 
override string ToString ()
 Returns a string representation of the object.
 
override void Export (ref long absoluteTime, BinaryWriter writer)
 Exports the data to a binary writer after exporting the base class and writing the data and a specific byte.
 
- Public Member Functions inherited from NAudio.Midi.MidiEvent
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.
 

Static Public Member Functions

static SysexEvent ReadSysexEvent (BinaryReader br)
 Reads a System Exclusive (Sysex) event from the provided BinaryReader and returns the SysexEvent object.
 
- 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.
 

Private Attributes

byte[] data
 

Additional Inherited Members

- Protected Member Functions inherited from NAudio.Midi.MidiEvent
 MidiEvent ()
 Default constructor.
 
- 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.
 

Detailed Description

Represents a MIDI sysex message.

Member Function Documentation

◆ Clone()

override MidiEvent NAudio.Midi.SysexEvent.Clone ( )
virtual

Clones the SysexEvent and returns a new instance of MidiEvent.

Returns
A new instance of MidiEvent with cloned SysexEvent data.

Reimplemented from NAudio.Midi.MidiEvent.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Export()

override void NAudio.Midi.SysexEvent.Export ( ref long absoluteTime,
BinaryWriter writer )
inlinevirtual

Exports the data to a binary writer after exporting the base class and writing the data and a specific byte.

Parameters
absoluteTimeThe absolute time reference.
writerThe binary writer to which the data is exported.

This method first exports the base class using the provided absolute time and writer, then writes the data to the writer and finally writes a specific byte (0xF7) to the writer.

Reimplemented from NAudio.Midi.MidiEvent.

◆ ReadSysexEvent()

static SysexEvent NAudio.Midi.SysexEvent.ReadSysexEvent ( BinaryReader br)
inlinestatic

Reads a System Exclusive (Sysex) event from the provided BinaryReader and returns the SysexEvent object.

Parameters
brThe BinaryReader used to read the Sysex event data.
Returns
A SysexEvent object containing the data read from the BinaryReader.

This method reads a Sysex event from the provided BinaryReader by parsing the data until the termination byte 0xF7 is encountered. The parsed data is stored in a SysexEvent object and returned.

Here is the caller graph for this function:

◆ ToString()

override string NAudio.Midi.SysexEvent.ToString ( )
inline

Returns a string representation of the object.

Returns
A string containing the hexadecimal representation of each byte in the data array, along with the absolute time and the length of the data array.

This method constructs a string by iterating through each byte in the data array and formatting it as a hexadecimal value. The resulting string includes the absolute time, the length of the data array, and the formatted hexadecimal representation of each byte.

Member Data Documentation

◆ data

byte [] NAudio.Midi.SysexEvent.data
private

The documentation for this class was generated from the following file: