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:

S R G M P D N

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 ..ri .ga ma pa da. ni. sa.. ri..
  • ...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:

S , R , , G

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:

S ; R , , G

Groups

Square brackets group multiple notes into a single beat:

S [R G] M [P D N] S.

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):

Sw: S R G M P D N S. Sh: sa ri ga ma pa dha ni sa

The Sw (swara) and Sh (sahitya) roles are aligned automatically.

Practice Exercise

Try writing a simple arohanam and avarohanam:

Sw: S R G M P D N S. , S. N D P M G R S Sh: sa ri ga ma pa dha ni sa , sa ni dha pa ma ga ri sa

Next Steps