@jags111/raganotate
v0.6.8
Published
Full-Stack Carnatic Music Notation Engine — TypeScript/JS Library
Maintainers
Readme
@jags111/raganotate
TypeScript/JavaScript library for RagaNotate — parse, render, and play Carnatic music notation with Just Intonation tuning, gamaka contours, and tala awareness.
Part of the RagaNotate ecosystem (Electron desktop app · Python library · this JS library — one canonical notation format).
Install
npm install @jags111/raganotateUsage
import { tokenize, parse, renderSVG, swaraToHz, CHAPU_TALAS } from "@jags111/raganotate";
const nodes = parse("| S R G M | P D N S' |");
const svg = renderSVG(nodes); // notation → SVG markup
const hz = swaraToHz("G", 240); // JI frequency for Sadharana Ga @ Sa=240 HzModules
| Module | Exports |
|--------|---------|
| lexer | tokenize, printTokens, token types |
| parser | parse — ASCII notation → AST nodes |
| renderer | renderSVG, renderHTML |
| gamaka | Gamaka types + pitch-contour functions |
| tala | Suladi Sapta + Chapu talas, beat patterns |
| audio | AudioEngine, swaraToHz (Web Audio playback, JI ratios) |
| unicode | Unicode ↔ ASCII notation conversion |
Notation format
See SPEC.md for the full
standard: 16 swarasthanas, octave markers (.s / S / S'), duration markers
(; : ::), gamaka symbols (~ ^ v *), and tala angas.
License
AGPL-3.0-or-later — see LICENSE.
