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

Represents a MIDI pitch wheel change event. More...

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

Public Member Functions

 PitchWheelChangeEvent (BinaryReader br)
 Reads a pitch wheel change event from a MIDI stream.
 
 PitchWheelChangeEvent (long absoluteTime, int channel, int pitchWheel)
 Creates a new pitch wheel change event.
 
override string ToString ()
 Returns a string representation of the object.
 
override int GetAsShortMessage ()
 Gets the short message representation of the MIDI event.
 
override void Export (ref long absoluteTime, BinaryWriter writer)
 Exports the object's data to a binary writer, including the pitch 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.
 

Properties

int Pitch [get, set]
 Pitch Wheel Value 0 is minimum, 0x2000 (8192) is default, 0x3FFF (16383) is maximum.
 
- 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

int pitch
 

Additional Inherited Members

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

Detailed Description

Represents a MIDI pitch wheel change event.

Constructor & Destructor Documentation

◆ PitchWheelChangeEvent() [1/2]

NAudio.Midi.PitchWheelChangeEvent.PitchWheelChangeEvent ( BinaryReader br)
inline

Reads a pitch wheel change event from a MIDI stream.

Parameters
brThe MIDI stream to read from

◆ PitchWheelChangeEvent() [2/2]

NAudio.Midi.PitchWheelChangeEvent.PitchWheelChangeEvent ( long absoluteTime,
int channel,
int pitchWheel )
inline

Creates a new pitch wheel change event.

Parameters
absoluteTimeAbsolute event time
channelChannel
pitchWheelPitch wheel value

Member Function Documentation

◆ Export()

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

Exports the object's data to a binary writer, including the pitch value.

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

This method exports the object's data to the specified binary writer, including the pitch value. The pitch value is written as two bytes, with the least significant 7 bits written first followed by the most significant 7 bits.

Reimplemented from NAudio.Midi.MidiEvent.

◆ GetAsShortMessage()

override int NAudio.Midi.PitchWheelChangeEvent.GetAsShortMessage ( )
inlinevirtual

Gets the short message representation of the MIDI event.

Returns
The short message representation of the MIDI event.

Reimplemented from NAudio.Midi.MidiEvent.

◆ ToString()

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

Returns a string representation of the object.

Returns
A string containing the object's base representation, pitch, and pitch value relative to 0x2000.

This method returns a formatted string that includes the base representation of the object, its pitch, and the pitch value relative to 0x2000.

Member Data Documentation

◆ pitch

int NAudio.Midi.PitchWheelChangeEvent.pitch
private

Property Documentation

◆ Pitch

int NAudio.Midi.PitchWheelChangeEvent.Pitch
getset

Pitch Wheel Value 0 is minimum, 0x2000 (8192) is default, 0x3FFF (16383) is maximum.


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