import * as TSU from "@panyam/tsutils";
import { Entity, TimedEntity } from "./entity";
type Fraction = TSU.Num.Fraction;
export type CyclePosition = [number, number, number];
export type CycleIterator = Generator<[CyclePosition, Fraction]>;
export declare class CycleCursor {
    readonly cycle: Cycle;
    barIndex: number;
    beatIndex: number;
    instance: number;
    constructor(cycle: Cycle, barIndex?: number, beatIndex?: number, instance?: number);
    get next(): [CyclePosition, Fraction];
    get prev(): [CyclePosition, Fraction];
}
export declare class Bar extends TimedEntity {
    readonly TYPE: string;
    name: string;
    beatLengths: Fraction[];
    beatCounts: number[];
    constructor(config?: any);
    debugValue(): any;
    equals(another: this): boolean;
    copyTo(another: this): void;
    instanceCount(beatIndex: number): number;
    get beatCount(): number;
    get totalBeatCount(): number;
    get duration(): Fraction;
}
export declare class Cycle extends TimedEntity {
    readonly TYPE: string;
    name: string;
    bars: Bar[];
    static readonly DEFAULT: Cycle;
    constructor(config?: null | {
        name?: string;
        bars?: Bar[];
    });
    debugValue(): any;
    children(): Entity[];
    equals(another: this): boolean;
    getAtIndex(globalIndex: number): [number, CyclePosition, Fraction];
    getPosition(globalOffset: Fraction): [number, CyclePosition, Fraction, number];
    iterateBeats(startBar?: number, startBeat?: number, startInstance?: number): CycleIterator;
    copyTo(another: this): void;
    get beatCount(): number;
    get totalBeatCount(): number;
    get duration(): Fraction;
}
export {};
