Class SmpteOffsetEvent
Represents a SMPTE Offset meta event.
Inheritance
SmpteOffsetEvent
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class SmpteOffsetEvent : MetaEvent
Constructors
SmpteOffsetEvent()
Declaration
public SmpteOffsetEvent()
Initializes a new instance of the
SmpteOffsetEvent with the
specified SMPTE format, hours, minutes, seconds, number of frames and sub-frames.
Declaration
public SmpteOffsetEvent(SmpteFormat format, byte hours, byte minutes, byte seconds, byte frames, byte subFrames)
Parameters
Type |
Name |
Description |
SmpteFormat |
format |
SMPTE format. |
byte |
hours |
Number of hours. |
byte |
minutes |
Number of minutes. |
byte |
seconds |
Number of seconds. |
byte |
frames |
Number of frames. |
byte |
subFrames |
Number of sub-frames. |
Exceptions
Type |
Condition |
InvalidEnumArgumentException |
format specified an invalid value. |
ArgumentOutOfRangeException |
One of the following errors occurred:
-
hours is out of valid range. -
minutes is out of valid range. -
seconds is out of valid range. -
frames is out of valid range. -
subFrames is out of valid range.
|
Fields
MaxHours
Represents the largest possible hours value.
Declaration
public const byte MaxHours = 23
Field Value
MaxMinutes
Represents the largest possible minutes value.
Declaration
public const byte MaxMinutes = 59
Field Value
MaxSeconds
Represents the largest possible seconds value.
Declaration
public const byte MaxSeconds = 59
Field Value
MaxSubFrames
Represents the largest possible sub-frames value.
Declaration
public const byte MaxSubFrames = 99
Field Value
Properties
Gets or sets SMPTE format.
Declaration
public SmpteFormat Format { get; set; }
Property Value
Frames
Gets or sets number of frames.
Declaration
public byte Frames { get; set; }
Property Value
Exceptions
Hours
Gets or sets number of hours.
Declaration
public byte Hours { get; set; }
Property Value
Exceptions
Minutes
Gets or sets number of minutes.
Declaration
public byte Minutes { get; set; }
Property Value
Exceptions
Seconds
Gets or sets number of seconds.
Declaration
public byte Seconds { get; set; }
Property Value
Exceptions
SubFrames
Gets or sets number of sub-frames.
Declaration
public byte SubFrames { get; set; }
Property Value
Exceptions
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