The JControl iMelody Format (IMY)
---------------------------------

The JControl iMelody format is compatible with the iMelody format specified by Infrared Data Association (IrDA).

<melody>             := {<silence>|<note>|<repeat>}+

<silence>            := <rest><duration>[<duration-specifier>]
<rest>               := "r"

<repeat>             := "("{<silence>|<note>}+"@"<repeat-count>")"
<repeat-count>       := "0"|"1"|"2"|... (0 is repeat forever)

<note>               := [<octave-prefix>]<basic-ess-iss-note><duration>[<duration-specifier>]
<octave-prefix>      := "*0"|"*1"|"*2"...
<basic-ess-iss-note> := <basic-note>|<ess-note>|<iss-note>
<basic-note>         := "c"|"d"|"e"|"f"|"g"|"a"|"b"
<ess-note>           := "&d"|"&e"|"&g"|"&a"|"&b" (flat notes)
<iss-note>           := "#c"|"#d"|"#f"|"#g"|"#a" (sharp notes)

<duration>           := "0"|"1"|"2"|"3"|"4"|"5"
<duration-specifier> := "."|":"|";"


Note: No <repeat> block within <repeat> block!

Duration:
0 - Full-note
1 - 1/2-note
2 - 1/4-note
3 - 1/8-note
4 - 1/16-note
5 - 1/32-note

Duration Specifier:

none - No special duration
. - Dotted note
: - Double dotted note
; - 2/3 length                                                                                          