Search Results for

    Show / Hide Table of Contents

    Class SteppedGrid

    Grid where points in time are distributed with the specified step or collection of steps.
    Inheritance
    object
    SteppedGrid
    Implements
    IGrid
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Interaction
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class SteppedGrid : IGrid

    Constructors

    SteppedGrid(ITimeSpan)

    Initializes a new instance of the SteppedGrid with the specified step so all grid's times will be distributed with equal distance between adjacent ones starting from zero.
    Declaration
    public SteppedGrid(ITimeSpan step)
    Parameters
    Type Name Description
    ITimeSpan step Distance between adjacent times.
    Exceptions
    Type Condition
    ArgumentNullException step is null.

    SteppedGrid(ITimeSpan, ITimeSpan)

    Initializes a new instance of the SteppedGrid with the specified start time and step so all grid's times will be distributed with equal distance between adjacent ones starting from the specified start time.
    Declaration
    public SteppedGrid(ITimeSpan start, ITimeSpan step)
    Parameters
    Type Name Description
    ITimeSpan start Start time of the grid.
    ITimeSpan step Distance between adjacent times.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • start is null.
    • step is null.

    SteppedGrid(ITimeSpan, IEnumerable<ITimeSpan>)

    Initializes a new instance of the SteppedGrid with the specified start time and steps so all grid's times will be stepped according to those steps.
    Declaration
    public SteppedGrid(ITimeSpan start, IEnumerable<ITimeSpan> steps)
    Parameters
    Type Name Description
    ITimeSpan start Start time of the grid.
    IEnumerable<ITimeSpan> steps Collection of grid's steps.
    Remarks
    Grid's times will be distributed according to provided steps. So distance between first adjacent times will be equal to first step, distance between second adjacent times will be equal to second step and so on. When last step reached steps will go from the first one.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • start is null.
    • steps is null.
    ArgumentException steps contains null.

    SteppedGrid(IEnumerable<ITimeSpan>)

    Initializes a new instance of the SteppedGrid with the specified steps so all grid's times will be stepped according to those steps.
    Declaration
    public SteppedGrid(IEnumerable<ITimeSpan> steps)
    Parameters
    Type Name Description
    IEnumerable<ITimeSpan> steps Collection of grid's steps.
    Remarks
    Grid's times will be distributed according to provided steps. So distance between first adjacent times will be equal to first step, distance between second adjacent times will be equal to second step and so on. When last step reached, steps will go from the first one.
    Exceptions
    Type Condition
    ArgumentNullException steps is null.
    ArgumentException steps contains null.

    Properties

    Start

    Start time of the current grid.
    Declaration
    public ITimeSpan Start { get; }
    Property Value
    Type Description
    ITimeSpan

    Steps

    Steps of the current grid.
    Declaration
    public IEnumerable<ITimeSpan> Steps { get; }
    Property Value
    Type Description
    IEnumerable<ITimeSpan>

    Methods

    GetTimes(TempoMap)

    Gets points in time of the current grid.
    Declaration
    public IEnumerable<long> GetTimes(TempoMap tempoMap)
    Parameters
    Type Name Description
    TempoMap tempoMap Tempo map used to get grid's times.
    Returns
    Type Description
    IEnumerable<long> Collection of points in time of the current grid.
    Exceptions
    Type Condition
    ArgumentNullException tempoMap is null.

    Implements

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