TypeScript Library Documentation
The DiArMaqAr TypeScript library provides a comprehensive, type-safe interface for working with maqām data programmatically.
Overview
The library is organized into several key modules:
- Models: Core data structures (Maqam, Jins, TuningSystem, PitchClass, NoteName)
- Functions: Utility functions for processing, transposition, modulation, and export
- Interfaces: Type definitions for data structures
Installation
Import directly from the source code in your project.
Basic Usage
typescript
import { Maqam } from '@/models/Maqam'
import { TuningSystem } from '@/models/TuningSystem'
import { getTuningSystemPitchClasses } from '@/functions/getTuningSystemPitchClasses'
// Load data
const tuningSystem = new TuningSystem(tuningSystemData)
const maqam = new Maqam(maqamData)
// Work with pitch classes
const pitchClasses = getTuningSystemPitchClasses(tuningSystem, 'ushayran')Library Reference
The complete TypeScript library reference documentation is generated from JSDoc comments in the source code. The documentation is organized by modules:
- Complete Reference - Overview and index of all documentation
- Modules Index - All available modules
Models
- Maqam - Maqām data structure and methods
- Jins - Jins (tri/tetra/penta-chord) data structure
- TuningSystem - Tuning system definitions
- PitchClass - Individual pitch class data
- NoteName - Note name handling and transliteration
- Pattern - Pattern data structures
Functions
Browse all functions in the modules documentation. Key function modules include:
- Export Functions - Data export utilities
- Transpose Functions - Transposition calculations
- Modulation Functions - Modulation analysis
- Import Functions - Data loading utilities
The documentation is automatically generated from TypeScript source files with JSDoc comments. Run npm run docs:ts to regenerate after code changes.