Class BarBeatUtilities
Utilities for working with bars and beats.
Inheritance
BarBeatUtilities
Assembly: Melanchall.DryWetMidi.dll
Syntax
public static class BarBeatUtilities
Methods
GetBarLength(long, TempoMap)
Gets the length of a bar (in ticks) that is started at distance of the specified bars.
Declaration
public static int GetBarLength(long bars, TempoMap tempoMap)
Parameters
Type |
Name |
Description |
long |
bars |
Distance in bars where the bar is started. |
TempoMap |
tempoMap |
Tempo map used for calculations. |
Returns
Type |
Description |
int |
Length of a bar in ticks. |
Exceptions
GetBeatLength(long, TempoMap)
Gets the length of a beat (in ticks) of the bar that is started at distance of the specified bars.
Declaration
public static int GetBeatLength(long bars, TempoMap tempoMap)
Parameters
Type |
Name |
Description |
long |
bars |
Distance in bars where the bar is started. |
TempoMap |
tempoMap |
Tempo map used for calculations. |
Returns
Type |
Description |
int |
Length of a beat in ticks. |
Exceptions