Arabic Maqām Network - TypeScript Library Documentation - v0.1.0
    Preparing search index...

    Represents a musical pattern in the Arabic maqam system.

    A Pattern is a sequence of musical notes with specific durations and scale degrees that can be used to demonstrate or practice melodic phrases within a maqam. Each pattern contains notes with scale degrees, rhythmic durations, and target emphasis information for educational and performance purposes.

    const pattern = new Pattern(
    "ascending-basic",
    "Basic Ascending Pattern",
    [
    { scaleDegree: "I", noteDuration: "4n", isTarget: true },
    { scaleDegree: "II", noteDuration: "4n", isTarget: false },
    { scaleDegree: "III", noteDuration: "4n", isTarget: true }
    ]
    );
    Index

    Constructors

    • Creates a new Pattern instance.

      Parameters

      • id: string

        Unique identifier for this pattern

      • name: string

        Human-readable name for this pattern

      • notes: PatternNote[]

        Array of PatternNote objects that define the melodic sequence

      Returns default

    Methods

    • Gets the unique identifier of this pattern.

      Returns string

      The pattern's ID

    • Gets the human-readable name of this pattern.

      Returns string

      The pattern's name

    • Converts the pattern to a JSON-serializable object.

      This method is useful for saving patterns to files, sending them over network requests, or storing them in databases.

      Returns { id: string; name: string; notes: PatternNote[] }

      A plain object representation of the pattern