Creates a new Pattern instance.
Unique identifier for this pattern
Human-readable name for this pattern
Array of PatternNote objects that define the melodic sequence
Gets the unique identifier of this pattern.
The pattern's ID
Gets the human-readable name of this pattern.
The pattern's name
Gets the array of notes that make up this pattern.
Array of PatternNote objects
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.
A plain object representation of the pattern
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.
Example