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

Represents a MIDI time signature event. More...

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

Public Member Functions

 TimeSignatureEvent (BinaryReader br, int length)
 Reads a new time signature event from a MIDI stream.
 
 TimeSignatureEvent (long absoluteTime, int numerator, int denominator, int ticksInMetronomeClick, int no32ndNotesInQuarterNote)
 Creates a new TimeSignatureEvent.
 
override MidiEvent Clone ()
 Clones the current TimeSignatureEvent and returns the cloned instance.
 
override string ToString ()
 Returns a formatted string that includes the base string representation, time signature, ticks in metronome click, and 32nd notes in a quarter note.
 
override void Export (ref long absoluteTime, BinaryWriter writer)
 Exports the object's data to a binary writer.
 
- Public Member Functions inherited from NAudio.Midi.MetaEvent
 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.
 
- 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.
 

Properties

int Numerator [get]
 Numerator (number of beats in a bar)
 
int Denominator [get]
 Denominator (Beat unit), 1 means 2, 2 means 4 (crochet), 3 means 8 (quaver), 4 means 16 and 5 means 32.
 
int TicksInMetronomeClick [get]
 Ticks in a metronome click.
 
int No32ndNotesInQuarterNote [get]
 Number of 32nd notes in a quarter note.
 
string TimeSignature [get]
 The time signature.
 
- Properties inherited from NAudio.Midi.MetaEvent
MetaEventType MetaEventType [get]
 Gets the type of this meta event.
 
- 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 numerator
 
byte denominator
 
byte ticksInMetronomeClick
 
byte no32ndNotesInQuarterNote
 

Additional Inherited Members

- Static Public Member Functions inherited from NAudio.Midi.MetaEvent
static MetaEvent ReadMetaEvent (BinaryReader br)
 Reads a meta event from the provided BinaryReader and returns the corresponding MetaEvent 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.
 
- Protected Member Functions inherited from NAudio.Midi.MetaEvent
 MetaEvent ()
 Empty constructor.
 
- Protected Member Functions inherited from NAudio.Midi.MidiEvent
 MidiEvent ()
 Default constructor.
 

Detailed Description

Represents a MIDI time signature event.

Constructor & Destructor Documentation

◆ TimeSignatureEvent() [1/2]

NAudio.Midi.TimeSignatureEvent.TimeSignatureEvent ( BinaryReader br,
int length )
inline

Reads a new time signature event from a MIDI stream.

Parameters
brThe MIDI stream
lengthThe data length

◆ TimeSignatureEvent() [2/2]

NAudio.Midi.TimeSignatureEvent.TimeSignatureEvent ( long absoluteTime,
int numerator,
int denominator,
int ticksInMetronomeClick,
int no32ndNotesInQuarterNote )
inline

Creates a new TimeSignatureEvent.

Parameters
absoluteTimeTime at which to create this event
numeratorNumerator
denominatorDenominator
ticksInMetronomeClickTicks in Metronome Click
no32ndNotesInQuarterNoteNo of 32nd Notes in Quarter Click

Member Function Documentation

◆ Clone()

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

Clones the current TimeSignatureEvent and returns the cloned instance.

Returns
A new instance of TimeSignatureEvent that is a copy of the current instance.

Reimplemented from NAudio.Midi.MetaEvent.

◆ Export()

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

Exports the object's data to a binary writer.

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

This method exports the numerator, denominator, ticks in metronome click, and number of 32nd notes in a quarter note to the specified binary writer.

Reimplemented from NAudio.Midi.MetaEvent.

◆ ToString()

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

Returns a formatted string that includes the base string representation, time signature, ticks in metronome click, and 32nd notes in a quarter note.

Returns
A formatted string containing the base string representation, time signature, ticks in metronome click, and 32nd notes in a quarter note.

Member Data Documentation

◆ denominator

byte NAudio.Midi.TimeSignatureEvent.denominator
private

◆ no32ndNotesInQuarterNote

byte NAudio.Midi.TimeSignatureEvent.no32ndNotesInQuarterNote
private

◆ numerator

byte NAudio.Midi.TimeSignatureEvent.numerator
private

◆ ticksInMetronomeClick

byte NAudio.Midi.TimeSignatureEvent.ticksInMetronomeClick
private

Property Documentation

◆ Denominator

int NAudio.Midi.TimeSignatureEvent.Denominator
get

Denominator (Beat unit), 1 means 2, 2 means 4 (crochet), 3 means 8 (quaver), 4 means 16 and 5 means 32.

◆ No32ndNotesInQuarterNote

int NAudio.Midi.TimeSignatureEvent.No32ndNotesInQuarterNote
get

Number of 32nd notes in a quarter note.

◆ Numerator

int NAudio.Midi.TimeSignatureEvent.Numerator
get

Numerator (number of beats in a bar)

◆ TicksInMetronomeClick

int NAudio.Midi.TimeSignatureEvent.TicksInMetronomeClick
get

Ticks in a metronome click.

◆ TimeSignature

string NAudio.Midi.TimeSignatureEvent.TimeSignature
get

The time signature.


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