Class TimeSignatureEvent
Represents a Time Signature meta event.
Inheritance
TimeSignatureEvent
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class TimeSignatureEvent : MetaEvent
Constructors
TimeSignatureEvent()
Declaration
public TimeSignatureEvent()
TimeSignatureEvent(byte, byte)
Initializes a new instance of the
TimeSignatureEvent with the
specified numerator and denominator.
Declaration
public TimeSignatureEvent(byte numerator, byte denominator)
Parameters
Type |
Name |
Description |
byte |
numerator |
Numerator of the time signature. |
byte |
denominator |
Denominator of the time signature. |
Exceptions
TimeSignatureEvent(byte, byte, byte, byte)
Initializes a new instance of the
TimeSignatureEvent with the
specified numerator, denominator, number of MIDI clocks per metronome click
and number of 32nd notes per beat.
Declaration
public TimeSignatureEvent(byte numerator, byte denominator, byte clocksPerClick, byte thirtySecondNotesPerBeat)
Parameters
Type |
Name |
Description |
byte |
numerator |
Numerator of the time signature. |
byte |
denominator |
Denominator of the time signature. |
byte |
clocksPerClick |
Number of MIDI clocks per metronome click. |
byte |
thirtySecondNotesPerBeat |
Number of 32nd notes per beat. |
Exceptions
Fields
DefaultClocksPerClick
Default number of MIDI clock ticks per metronome click.
Declaration
public const byte DefaultClocksPerClick = 24
Field Value
DefaultDenominator
Denominator of the default time signature.
Declaration
public const byte DefaultDenominator = 4
Field Value
DefaultNumerator
Numerator of the default time signature.
Declaration
public const byte DefaultNumerator = 4
Field Value
DefaultThirtySecondNotesPerBeat
Default number of 32nd notes per beat.
Declaration
public const byte DefaultThirtySecondNotesPerBeat = 8
Field Value
Properties
ClocksPerClick
Gets or sets number of MIDI clock ticks per metronome click.
Declaration
public byte ClocksPerClick { get; set; }
Property Value
Denominator
Gets or sets denominator of the time signature.
Declaration
public byte Denominator { get; set; }
Property Value
Exceptions
Numerator
Gets or sets numerator of the time signature.
Declaration
public byte Numerator { get; set; }
Property Value
ThirtySecondNotesPerBeat
Gets or sets number of 32nd notes per beat.
Declaration
public byte ThirtySecondNotesPerBeat { get; set; }
Property Value
Methods
CloneEvent()
Clones event by creating a copy of it.
Declaration
protected override MidiEvent CloneEvent()
Returns
Type |
Description |
MidiEvent |
Copy of the event. |
Overrides
GetContentSize(WritingSettings)
Gets the size of the content of a MIDI meta event.
Declaration
protected override int GetContentSize(WritingSettings settings)
Parameters
Type |
Name |
Description |
WritingSettings |
settings |
Settings according to which the event's content must be written. |
Returns
Type |
Description |
int |
Size of the event's content. |
Overrides
ReadContent(MidiReader, ReadingSettings, int)
Reads content of a MIDI meta event.
Declaration
protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size)
Parameters
Type |
Name |
Description |
MidiReader |
reader |
Reader to read the content with. |
ReadingSettings |
settings |
Settings according to which the event's content must be read. |
int |
size |
Size of the event's content. |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
A string that represents the current object. |
Overrides
WriteContent(MidiWriter, WritingSettings)
Writes content of a MIDI meta event.
Declaration
protected override void WriteContent(MidiWriter writer, WritingSettings settings)
Parameters
Type |
Name |
Description |
MidiWriter |
writer |
Writer to write the content with. |
WritingSettings |
settings |
Settings according to which the event's content must be written. |
Overrides