Search Results for

    Show / Hide Table of Contents

    Class BarBeatUtilities

    Utilities for working with bars and beats.
    Inheritance
    object
    BarBeatUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Interaction
    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
    Type Condition
    ArgumentOutOfRangeException bars is negative.
    ArgumentNullException tempoMap is null.

    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
    Type Condition
    ArgumentOutOfRangeException bars is negative.
    ArgumentNullException tempoMap is null.
    In this article
    Back to top 2024 / Generated by DocFX