Class SteppedGrid
Grid where points in time are distributed with the specified step or
collection of steps.
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
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
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
Exceptions
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
Exceptions
Properties
Start
Start time of the current grid.
Declaration
public ITimeSpan Start { get; }
Property Value
Steps
Steps of the current grid.
Declaration
public IEnumerable<ITimeSpan> Steps { get; }
Property Value
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
Implements