@libraz/libcantus - v1.1.0
    Preparing search index...

    Type Alias ImitationOptions

    Options controlling imitate.

    type ImitationOptions = {
        atBeat: number;
        interval: IntervalLike;
        key: KeyLike;
        answer?: ImitationAnswer;
        invert?: boolean;
        from?: number;
        to?: number;
        velocityScale?: number;
    }
    Index
    atBeat: number

    Beat at which the imitation enters; the copied material starts here. Negative like any other onset, for an answer that enters in a pickup.

    interval: IntervalLike

    Interval to imitate at, spelled: 'P5' for an answer a fifth above, '-P4' for one a fourth below.

    key: KeyLike

    The key the answer is measured in; what makes a tonal answer tonal. A key name such as 'C major' is read as that key.

    Whether the answer transposes literally or by scale degree.

    'real'
    
    invert?: boolean

    Turn the subject upside down before transposing it, mirroring it about its own first note: by semitone for a real answer, by scale degree for a tonal one.

    false
    
    from?: number

    First beat of the lead to imitate; defaults to the start of the line.

    to?: number

    Beat to imitate up to, exclusive; defaults to the end of the line.

    velocityScale?: number

    Factor applied to the copied velocities, for an answer that sits under the voice it follows.

    1