An opinionated language environment for ABC notation.
Fast, partial-safe language toolkit for writing, checking, and refining ABC notation. Inspired by tools like Biome.
Never crashes on unfinished input. Editing always comes first.
30+ diagnostic codes with rich context and precise location info.
Catch bar length mismatches, unusual octaves, suspicious durations.
13 configurable options for consistent, readable notation.
Tokenizer for editor integration. Notes, rests, bars, decorations.
Use in browser with npm. Zero dependencies, instant load.
import init, { parse, analyze, format_default } from 'chamber-abc'; await init(); const source = `X:1 T:My Tune M:4/4 L:1/8 K:C CDEF GABc|`; // Parse const result = parse(source); console.log(result.tune); // AST console.log(result.diagnostics); // Parse errors // Analyze (lint) const analysis = analyze(result.tune); console.log(analysis.diagnostics); // Warnings // Format const formatted = format_default(source);
Precise error messages with context, just like modern compilers.
error[H002]: missing key field (K:) --> tune.abc:1:1 | 1 | X:1 | ^^^ tune must have a K: field warning[W003]: bar length mismatch --> tune.abc:5:1 | 5 | CDEFG| | ^^^^^ bar has 5/8, expected 4/4
Modular design with clear separation of concerns.
source text
↓
lexer → tokens (for highlighting)
↓
parser (partial-safe)
↓
AST
↓
┌──┴──┐
│ │
analyzer formatter
│
diagnostics
chamber_lexer
Tokenizer
chamber_parser
Partial-safe parser
chamber_analyzer
Lint rules
chamber_formatter
Code formatter
- Not a score renderer
- Not a playback engine
- Not a full ABC specification reference
Chamber focuses on language tooling, not visualization.
"Chamber is the environment where ABC notation is written, examined, and refined — like chamber music itself."