Search Results for

    Show / Hide Table of Contents

    Class ValueChange<TValue>

    Represents a change of a parameter's value at some time.
    Inheritance
    object
    ValueChange<TValue>
    Implements
    ITimedObject
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.Interaction
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class ValueChange<TValue> : ITimedObject
    Type Parameters
    Name Description
    TValue Type of value.

    Properties

    Time

    Gets the MIDI time when value is changed.
    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
    InvalidOperationException Setting time of value change object is not allowed.

    Value

    Gets the new value that will last until next value change.
    Declaration
    public TValue Value { get; }
    Property Value
    Type Description
    TValue

    Methods

    Clone()

    Clones object by creating a copy of it.
    Declaration
    public ITimedObject Clone()
    Returns
    Type Description
    ITimedObject Copy of the object.

    Equals(object)

    Determines whether the specified object is equal to the current object.
    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj The object to compare with the current object.
    Returns
    Type Description
    bool true if the specified object is equal to the current object; otherwise, false.
    Overrides
    object.Equals(object)

    GetHashCode()

    Returns the hash code for this instance.
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int A 32-bit signed integer hash code.
    Overrides
    object.GetHashCode()

    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
    object.ToString()

    Operators

    operator ==(ValueChange<TValue>, ValueChange<TValue>)

    Determines if two ValueChange<TValue> objects are equal.
    Declaration
    public static bool operator ==(ValueChange<TValue> change1, ValueChange<TValue> change2)
    Parameters
    Type Name Description
    ValueChange<TValue> change1 The first ValueChange<TValue> to compare.
    ValueChange<TValue> change2 The second ValueChange<TValue> to compare.
    Returns
    Type Description
    bool true if the value changes are equal, false otherwise.

    operator !=(ValueChange<TValue>, ValueChange<TValue>)

    Determines if two ValueChange<TValue> objects are not equal.
    Declaration
    public static bool operator !=(ValueChange<TValue> change1, ValueChange<TValue> change2)
    Parameters
    Type Name Description
    ValueChange<TValue> change1 The first ValueChange<TValue> to compare.
    ValueChange<TValue> change2 The second ValueChange<TValue> to compare.
    Returns
    Type Description
    bool false if the value changes are equal, true otherwise.

    Implements

    ITimedObject

    Extension Methods

    TimedObjectUtilities.TimeAs(ITimedObject, TimeSpanType, TempoMap)
    TimedObjectUtilities.TimeAs<TTime>(ITimedObject, TempoMap)
    TimedObjectUtilities.SetTime<TObject>(TObject, ITimeSpan, TempoMap)
    In this article
    Back to top 2024 / Generated by DocFX