@tspro/web-music-score
    Preparing search index...

    Class DocumentBuilder

    Index

    Constructors

    Methods

    • Parameters

      • voiceId: number
      • notes: (string | Note)[]
      • noteLength:
            | "1n"
            | "1t"
            | "1."
            | "1.."
            | "1..."
            | "1...."
            | "1....."
            | "1......"
            | "2n"
            | "2t"
            | "2."
            | "2.."
            | "2..."
            | "2...."
            | "2....."
            | "4n"
            | "4t"
            | "4."
            | "4.."
            | "4..."
            | "4...."
            | "8n"
            | "8t"
            | "8."
            | "8.."
            | "8..."
            | "16n"
            | "16t"
            | "16."
            | "16.."
            | "32n"
            | "32t"
            | "32."
            | "64n"
            | "64t"
            | NoteLength
      • Optionaloptions: NoteOptions

      Returns DocumentBuilder

    • Parameters

      • connective: "tie" | Tie
      • OptionaltieSpan: number | "stub" | "toMeasureEnd" | TieType
      • OptionalnotAnchor: "auto" | "above" | "center" | "below" | "stemTip" | NoteAnchor

      Returns DocumentBuilder

    • Parameters

      • connective: "slur" | Slur
      • OptionalslurSpan: number
      • OptionalnotAnchor: "auto" | "above" | "center" | "below" | "stemTip" | NoteAnchor

      Returns DocumentBuilder

    • Parameters

      • connective: "slide" | Slide
      • OptionalnotAnchor: "auto" | "above" | "center" | "below" | "stemTip" | NoteAnchor

      Returns DocumentBuilder

    • Extension length example:

          addExtension(ext => ext.notes("1n", 2))          // length is 2 whole notes
          addExtension(ext => ext.measures(3).hide())      // length is 3 measures, hidden
          addExtension(ext => ext.measures(1).notes("8n")) // length is 1 measure + 1 eigth note
          addExtension(ext => ext.infinity())              // length is as long as possible
      

      Parameters

      Returns DocumentBuilder

    • Parameters

      • navigation:
            | "D.C. al Fine"
            | "D.C. al Coda"
            | "D.S. al Fine"
            | "D.S. al Coda"
            | "Coda"
            | "toCoda"
            | "Segno"
            | "Fine"
            | "startRepeat"
            | "endRepeat"
            | "ending"
            | Navigation

      Returns DocumentBuilder

    • Parameters

      • navigation: "endRepeat" | EndRepeat
      • playCount: number

      Returns DocumentBuilder

    • Parameters

      • navigation: "ending" | Ending
      • ...passages: number[]

      Returns DocumentBuilder

    • Parameters

      • staffTabOrGroups: StaffTabOrGroups

        staff/tab index (0=top), staff/tab name, or staff group name.

      • navigation:
            | "D.C. al Fine"
            | "D.C. al Coda"
            | "D.S. al Fine"
            | "D.S. al Coda"
            | "Coda"
            | "toCoda"
            | "Segno"
            | "Fine"
            | "startRepeat"
            | "endRepeat"
            | "ending"
            | Navigation

      Returns DocumentBuilder

    • Parameters

      • staffTabOrGroups: StaffTabOrGroups

        staff/tab index (0=top), staff/tab name, or staff group name.

      • navigation: "endRepeat" | EndRepeat
      • playCount: number

      Returns DocumentBuilder

    • Parameters

      • staffTabOrGroups: StaffTabOrGroups

        staff/tab index (0=top), staff/tab name, or staff group name.

      • navigation: "ending" | Ending
      • ...passages: number[]

      Returns DocumentBuilder

    • Parameters

      • voiceId: number
      • note: string | Note
      • noteLength:
            | "1n"
            | "1t"
            | "1."
            | "1.."
            | "1..."
            | "1...."
            | "1....."
            | "1......"
            | "2n"
            | "2t"
            | "2."
            | "2.."
            | "2..."
            | "2...."
            | "2....."
            | "4n"
            | "4t"
            | "4."
            | "4.."
            | "4..."
            | "4...."
            | "8n"
            | "8t"
            | "8."
            | "8.."
            | "8..."
            | "16n"
            | "16t"
            | "16."
            | "16.."
            | "32n"
            | "32t"
            | "32."
            | "64n"
            | "64t"
            | NoteLength
      • Optionaloptions: NoteOptions

      Returns DocumentBuilder

    • Parameters

      • voiceId: number
      • restLength:
            | "1n"
            | "1t"
            | "1."
            | "1.."
            | "1..."
            | "1...."
            | "1....."
            | "1......"
            | "2n"
            | "2t"
            | "2."
            | "2.."
            | "2..."
            | "2...."
            | "2....."
            | "4n"
            | "4t"
            | "4."
            | "4.."
            | "4..."
            | "4...."
            | "8n"
            | "8t"
            | "8."
            | "8.."
            | "8..."
            | "16n"
            | "16t"
            | "16."
            | "16.."
            | "32n"
            | "32t"
            | "32."
            | "64n"
            | "64t"
            | NoteLength
      • Optionaloptions: RestOptions

      Returns DocumentBuilder

    • Parameters

      • groupName: string

        Name of staff group.

      • staffsTabsAndGroups: string | number | (string | number)[]

        staff/tab index (0=top), staff/tab name, or staff group name. Single value or array.

      • verticalPosition: "auto" | "above" | "below" | "both" | VerticalPosition = VerticalPosition.Auto

        Vertical position, are elements added above, below or both.

      Returns DocumentBuilder

    • Parameters

      • Optionaltitle: string
      • Optionalcomposer: string
      • Optionalarranger: string

      Returns DocumentBuilder

    • Parameters

      • tonic: string
      • scaleType:
            | ScaleType
            | "Major"
            | "Natural Minor"
            | "Harmonic Minor"
            | "Ionian"
            | "Dorian"
            | "Phrygian"
            | "Lydian"
            | "Mixolydian"
            | "Aeolian"
            | "Locrian"
            | "Major Pentatonic"
            | "Minor Pentatonic"
            | "Major Hexatonic Blues"
            | "Minor Hexatonic Blues"
            | "Heptatonic Blues"

      Returns DocumentBuilder

    • Parameters

      Returns DocumentBuilder

    • Parameters

      • keySignature: string

      Returns DocumentBuilder

    • Parameters

      Returns DocumentBuilder

    • Parameters

      • beatsPerMinute: number

      Returns DocumentBuilder

    • Parameters

      • beatsPerMinute: number
      • beatLength:
            | "1n"
            | "1t"
            | "1."
            | "1.."
            | "1..."
            | "1...."
            | "1....."
            | "1......"
            | "2n"
            | "2t"
            | "2."
            | "2.."
            | "2..."
            | "2...."
            | "2....."
            | "4n"
            | "4t"
            | "4."
            | "4.."
            | "4..."
            | "4...."
            | "8n"
            | "8t"
            | "8."
            | "8.."
            | "8..."
            | "16n"
            | "16t"
            | "16."
            | "16.."
            | "32n"
            | "32t"
            | "32."
            | "64n"
            | "64t"
            | NoteLength

      Returns DocumentBuilder

    • Parameters

      • beatsPerMinute: number
      • beatLength:
            | "1n"
            | "1t"
            | "1."
            | "1.."
            | "1..."
            | "1...."
            | "1....."
            | "1......"
            | "2n"
            | "2t"
            | "2."
            | "2.."
            | "2..."
            | "2...."
            | "2....."
            | "4n"
            | "4t"
            | "4."
            | "4.."
            | "4..."
            | "4...."
            | "8n"
            | "8t"
            | "8."
            | "8.."
            | "8..."
            | "16n"
            | "16t"
            | "16."
            | "16.."
            | "32n"
            | "32t"
            | "32."
            | "64n"
            | "64t"
            | NoteLength
      • dotted: number | boolean

      Returns DocumentBuilder

      • Use dotted beatLength instead (e.g. "4..")