Hiyve Components - v1.0.0
    Preparing search index...

    Interface InteractiveStaffProps

    Props for InteractiveStaff.

    interface InteractiveStaffProps {
        clef: Clef;
        colors?: Partial<GameColors>;
        columnWidth?: number;
        count?: StaffCount;
        highestPosition?: number;
        keySignature?: number;
        keySignatureMarks?: readonly number[];
        labels?: Partial<InteractiveStaffLabels>;
        lowestPosition?: number;
        markPosition?: number;
        maxHeight?: string | number;
        minColumns?: number;
        onNotePlaced?: (midi: number) => void;
        onSlotPlaced?: (slotIndex: number, position: number) => void;
        readOnly?: boolean;
        showLabels?: boolean;
        slots: readonly StaffSlot[];
        slurs?: readonly (readonly [number, number])[];
        spacing?: number;
        sx?: SxProps<Theme>;
        ties?: readonly number[];
    }
    Index

    Properties

    clef: Clef
    colors?: Partial<GameColors>
    columnWidth?: number

    How wide a column of notes is, in staff spaces (default: 3.4): narrower for a long run of notes, such as a scale, so it is drawn larger where the line is short

    count?: StaffCount

    A count written up (or down) the staff in a column after the notes: one small label at every line and space from one position to another — the letters there unless labels are given — the last in the right colour, to count from a landmark to a note

    highestPosition?: number

    The highest position a note can be put (default: 10, the first ledger line above)

    keySignature?: number

    A key signature after the clef: sharps (positive) or flats (negative), up to seven

    keySignatureMarks?: readonly number[]

    Sharps or flats of the key signature to pick out, counted from the first written (0)

    labels?: Partial<InteractiveStaffLabels>
    lowestPosition?: number

    The lowest position a note can be put (default: −2, the first ledger line below)

    markPosition?: number

    The line a position sits on, or the space it sits in, picked out in the right colour

    maxHeight?: string | number

    The most height the staff takes, as CSS; it shrinks to fit, keeping its shape

    minColumns?: number

    Room for at least this many columns of notes, so a staff with one note is no wider than one with three (default: 1)

    onNotePlaced?: (midi: number) => void

    Called when a note is put somewhere, with the note's MIDI number — to sound it

    onSlotPlaced?: (slotIndex: number, position: number) => void

    A note was put somewhere: tapped into place, dragged there, or moved with the arrow keys. Without this the staff only shows its notes.

    readOnly?: boolean

    Nothing can be moved

    showLabels?: boolean

    Write each slot's label under it (default: true); a column with a long label, or with a sharp or flat, is drawn wider so nothing touches

    slots: readonly StaffSlot[]

    The slots, left to right; one note each

    slurs?: readonly (readonly [number, number])[]

    Slurs, each the columns of its first and last note: a curve over (or under) the notes between, on the side away from their stems

    spacing?: number

    Pixels per staff space (default: 14)

    sx?: SxProps<Theme>
    ties?: readonly number[]

    Columns whose note is tied to the same note in the next column, counted from 0