@audiotool/nexus - v0.0.17
    Preparing search index...

    Variable TicksConst

    Ticks: {
        Beat: 3840;
        SemiBreve: 15360;
        SemiQuaver: 960;
        Bars(n: number, signature?: string): number;
    } = ...

    A few constants to work with ticks.

    A "tick" is the finest resolution something can be scheduled in on the timeline. Ticks are independent of tempo.

    Example:

    In a 4/4 bar, there are 4 beats, so one bar is 4 * Beat = 15360 ticks = SemiBreve.

    For conversion from/to seconds see:

    Type declaration

    • ReadonlyBeat: 3840

      How many ticks pass in 1 quarter note in a 4/4th bar, independent of tempo.

    • ReadonlySemiBreve: 15360

      How many ticks pass in "1 whole note" or 4x1/4th notes in a 4/4th beat, independent of tempo.

    • ReadonlySemiQuaver: 960

      How many ticks pass in 1/16th note in a 4/4th bar, independent of tempo.

    • Bars: function
      • Number of ticks in n bars at the given time signature.

        signature is a string of the form "X/Y" where X is the number of beats per bar and Y is the note value of one beat (4 = quarter note, 8 = eighth note, etc.). Defaults to "4/4".

        Examples:

        • Ticks.Bars(3) → 3 bars in 4/4 = 3 * SemiBreve = 46080
        • Ticks.Bars(2, "3/4") → 2 bars in 3/4 = 2 * 3 * Beat = 23040
        • Ticks.Bars(2, "6/8") → 2 bars in 6/8 = 2 * 6 * (SemiBreve / 8) = 23040

        Parameters

        • n: number
        • signature: string = "4/4"

        Returns number