Class TimedEvent
Represents wrapper for the MidiEvent that provides absolute time of an event.
Inherited Members
Namespace: Melanchall.DryWetMidi.Interaction
Assembly: Melanchall.DryWetMidi.dll
Syntax
public class TimedEvent : ITimedObject, INotifyTimeChanged
Constructors
TimedEvent(MidiEvent)
Initializes a new instance of the TimedEvent with the
specified MIDI event.
Declaration
public TimedEvent(MidiEvent midiEvent)
Parameters
Type | Name | Description |
---|---|---|
MidiEvent | midiEvent | An event to wrap into TimedEvent. |
TimedEvent(MidiEvent, Int64)
Initializes a new instance of the TimedEvent with the
specified MIDI event and absolute time.
Declaration
public TimedEvent(MidiEvent midiEvent, long time)
Parameters
Type | Name | Description |
---|---|---|
MidiEvent | midiEvent | An event to wrap into TimedEvent. |
Int64 | time | Absolute time of an event in units defined by the time division of a MIDI file. |
Properties
Event
Gets wrapped MIDI event.
Declaration
public MidiEvent Event { get; }
Property Value
Type | Description |
---|---|
MidiEvent |
Time
Gets or sets absolute time of the event in units defined by the time division of a MIDI file.
Declaration
public long Time { get; set; }
Property Value
Type | Description |
---|---|
Int64 |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | value is negative. |
Methods
Clone()
Clones object by creating a copy of it.
Declaration
public virtual ITimedObject Clone()
Returns
Type | Description |
---|---|
ITimedObject | Copy of the object. |
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
Events
TimeChanged
Occurs when the time of an object has been changed.
Declaration
public event EventHandler<TimeChangedEventArgs> TimeChanged
Event Type
Type | Description |
---|---|
EventHandler<TimeChangedEventArgs> |