Search Results for

    Show / Hide Table of Contents

    Class ConstantBounds

    Time range which is constant for each object to be processed.
    Inheritance
    object
    ConstantBounds
    Implements
    IBounds
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Tools
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class ConstantBounds : IBounds

    Constructors

    ConstantBounds(ITimeSpan)

    Initializes a new instance of the ConstantBounds with the specified size so time range will span for equal length to the left and to the right from time to calculate bounds relative to.
    Declaration
    public ConstantBounds(ITimeSpan size)
    Parameters
    Type Name Description
    ITimeSpan size Size of the time range. The length of time range will be 2 * size.
    Exceptions
    Type Condition
    ArgumentNullException size is null.

    ConstantBounds(ITimeSpan, ITimeSpan)

    Initializes a new instance of the ConstantBounds with the specified size of left and right parts so time range will span for different length to the left and to the right from time to calculate bounds relative to.
    Declaration
    public ConstantBounds(ITimeSpan leftSize, ITimeSpan rightSize)
    Parameters
    Type Name Description
    ITimeSpan leftSize Left part's size of the time range.
    ITimeSpan rightSize Right part's size of the time range.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • leftSize is null.
    • rightSize is null.

    Properties

    LeftSize

    Gets the size of left part of the time range represented by the current ConstantBounds.
    Declaration
    public ITimeSpan LeftSize { get; }
    Property Value
    Type Description
    ITimeSpan

    RightSize

    Gets the size of right part of the time range represented by the current ConstantBounds.
    Declaration
    public ITimeSpan RightSize { get; }
    Property Value
    Type Description
    ITimeSpan

    Methods

    GetBounds(long, TempoMap)

    Gets minimum and maximum times in MIDI ticks for the current time range.
    Declaration
    public Tuple<long, long> GetBounds(long time, TempoMap tempoMap)
    Parameters
    Type Name Description
    long time Time bounds should be calculated relative to.
    TempoMap tempoMap Tempo map used to calculate bounds.
    Returns
    Type Description
    Tuple<long, long> Pair where first item is minimum time and the second one is maximum time.

    Implements

    IBounds
    In this article
    Back to top 2024 / Generated by DocFX