Class MML

This class manages instance of Part for playing MML (Music Macro Language).

Constructors

Properties

parts: Part[] = []

Methods

  • This method clears instance of Part.

    Returns MML

    Return value is for method chain.

  • This method gets or sets current sequence index. This method is overloaded for type interface and type check.

    Parameters

    • partNumber: number

      This argument is part of MML.

    Returns number

    Return value is for current sequence index. Otherwise, Return value is for method chain.

  • Parameters

    • partNumber: number
    • sequenceIndex: number

    Returns MML

  • This method gets array that contains instance of Sequence from the all of MML parts.

    Returns Sequence[][]

  • This method gets MML string.

    Parameters

    • index: number

      This argument selects MML part.

    Returns string

  • This method gets array that contains MML string.

    Returns string[]

  • This method gets array that contains instance of Sequence.

    Parameters

    • index: number

      This argument selects MML part.

    Returns Sequence[]

  • This method gets string that represents MML syntax tree.

    Parameters

    • index: number

      This argument selects MML part.

    Returns string

  • This method determines whether sequences exist.

    Returns boolean

    If sequences exist, this value is true. Otherwise, this value is false.

  • This method determines whether MMLs are paused.

    Returns boolean

    If MMLs are paused, this value is true. Otherwise, this value is false.

  • Parameters

    • Optional callbacks: {
          endedCallback?(): void;
          errorCallback?(error): void;
          startCallback?(sequence, offset?): void;
          stopCallback?(sequence, offset?): void;
      }
      • endedCallback?:function
      • errorCallback?:function
      • startCallback?:function
        • Parameters

          • sequence: Sequence
          • Optional offset: number

          Returns void

      • stopCallback?:function
        • Parameters

          • sequence: Sequence
          • Optional offset: number

          Returns void

    Returns MML

  • This method starts designated MML part. Moreover, this method schedules next sequence.

    Parameters

    • partNumber: number

      This argument is part of MML.

    • Optional highlight: boolean

      This argument is true in case of surrounding by span.x-highlight HTML. The default value is false.

    Returns MML

    Return value is for method chain.

  • Parameters

    • sequence: Sequence
    • Optional offset: number

    Returns void

  • This method stops the all of MML parts.

    Returns MML

    Return value is for method chain.

  • Parameters

    • sequence: Sequence
    • Optional offset: number

    Returns void

  • This method converts MML to ABC Notation.

    Parameters

    • mml: string

      This argument is MML string.

    • Optional X: number

      This argument is file number in ABC Notation.

    • Optional T: string

      This argument is title in ABC Notation.

    • Optional M: string

      This argument is beat in ABC Notation.

    • Optional L: string

      This argument is note duration in ABC Notation.

    • Optional K: string

      This argument is tone in ABC Notation.

    Returns string

    This is returned as ABC Notation.

Generated using TypeDoc