Tutorial 01: Basics
Learn the fundamentals of the Notations DSL
This tutorial covers the fundamental concepts of the Notations DSL. By the end, you'll understand how to write basic Carnatic music notation.
Notes (Swaras)
Swaras are written as text tokens without spaces:
Common swaras:
- S - Shadja (sa)
- R - Rishabha (ri)
- G - Gandhara (ga)
- M - Madhyama (ma)
- P - Panchama (pa)
- D - Dhaivata (dha)
- N - Nishada (ni)
You can use any text as literals. The notation system doesn't assign meaning - only durations and layout matter.
Octaves
Add dots before or after a note (without spaces) to indicate octaves:
- ...sa - Three octaves below
- .ga - One octave below
- ma - Middle octave (default)
- da. - One octave above
- sa.. - Two octaves above
Spaces (Karvais)
Spaces indicate empty durations where the previous note continues. Use commas:
In this example:
- S has one beat
- One beat gap (comma) - S continues
- R has one beat
- Two beats gap (two commas) - R continues
- G has one beat
Use semicolon for double space:
Groups
Square brackets group multiple notes into a single beat:
Here, R and G share one beat, and P, D, and N share one beat.
Multiple Lines (Roles)
Each role represents different content. Use role selectors with a colon (no space before colon):
The Sw (swara) and Sh (sahitya) roles are aligned automatically.
Practice Exercise
Try writing a simple arohanam and avarohanam:
Next Steps
- Tutorial 02: Commands - Learn about beatDuration, cycle, and layout commands
- Syntax Reference - Complete DSL specification