Class Parameter
Represents parameter (RPN or NRPN) encoded as series of Control Change events.
Inherited Members
Namespace: Melanchall.DryWetMidi.Interaction
Assembly: Melanchall.DryWetMidi.dll
Syntax
public abstract class Parameter : ITimedObject, INotifyTimeChanged
Properties
Channel
Gets or sets the channel of the current parameter. This channel is in fact
the channel of Control Change events that represent the parameter.
Declaration
public FourBitNumber Channel { get; set; }
Property Value
Type | Description |
---|---|
FourBitNumber |
Time
Gets or sets absolute time of the parameter data in units defined by the time division of a MIDI file.
Declaration
public long Time { get; set; }
Property Value
Type | Description |
---|---|
long |
Remarks
Note that the returned value will be in ticks (not seconds, not milliseconds and so on).
Please read Time and length article to learn how you can
get the time in different representations.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | value is negative. |
ValueType
Gets or sets the type of the current parameter's value.
Declaration
public ParameterValueType ValueType { get; set; }
Property Value
Type | Description |
---|---|
ParameterValueType |
Exceptions
Type | Condition |
---|---|
InvalidEnumArgumentException | value specified an invalid value. |
Methods
Clone()
Clones object by creating a copy of it.
Declaration
public abstract ITimedObject Clone()
Returns
Type | Description |
---|---|
ITimedObject | Copy of the object. |
GetTimedEvents()
Returns the collection of TimedEvent objects that represent the current
parameter. In fact, each TimedEvent object will contain ControlChangeEvent event.
Declaration
public abstract IEnumerable<TimedEvent> GetTimedEvents()
Returns
Type | Description |
---|---|
IEnumerable<TimedEvent> | Collection of TimedEvent objects that represent the current parameter. |
Events
TimeChanged
Occurs when the time of an object has been changed.
Declaration
public event EventHandler<TimeChangedEventArgs> TimeChanged
Event Type
Type | Description |
---|---|
EventHandler<TimeChangedEventArgs> |