How to Write Music
This guide explains the simple text-based language used to create music in this tool.
Song Structure
A song is made up of a title, a tempo, and one or more tracks.
title MyFirstSong
tempo 120
begin instrument_name
... notes ...
end
begin another_instrument
... notes ...
end
Notes
Notes are written using Indian Sargam notation. The standard notes are s, r, g, m, p, d, n.
- Vikrit (Altered) Swars: Use uppercase for Komal (flat) and Teevra (sharp) notes:
R, G, M, D, N. - Octaves:
- Prefix a number for lower octaves (e.g.,
1sis Sa in the lower octave). - Suffix a number for higher octaves (e.g.,
s1is Sa in the higher octave).
- Prefix a number for lower octaves (e.g.,
Example: 1n s R g m p d N s1
Duration
The duration of a note is based on beats. The default duration is 1 beat.
+(sustain): Each plus sign adds one beat to the duration.s+is 2 beats,s++is 3 beats.-(halve): Each minus sign halves the duration.s-is a half beat,s--is a quarter beat.
You can combine them: s+-- is a 2-beat note, halved twice, resulting in a half beat duration (2 / 2 / 2 = 0.5).
Chords and Groups
To play multiple notes at the same time (a chord), enclose them in square brackets [].
Example: [s g p] plays Sa, Ga, and Pa simultaneously.
Repetition
To repeat a section of music, enclose it in curly braces {} followed by a number.
Example: {s r g}4 plays the phrase "s r g" four times in a row.
Putting It All Together
title MyHappySong
tempo 140
begin IndianNotesPiano
{ [s g p]+ [r m d]+ }2
s+ g+ m-- p-- d+
end