A tune is an optional tempo followed by a series of notes. The tempo, if present, is an integer specifying the number of beats per minute. The default tempo is 150. A note is a rest or a pitch, followed by an optional time modifier. A rest is indicated by a space character. A pitch is a capital A, B, C, D, E, F, or G, followed by an optional sharp (#) or flat (b), followed by an optional series of octave adjustments. An octave adjustment is a circumflex (^) or a lower-case v. A ^ raises the pitch one octave; a v lowers it one octave. The default (unadjusted) pitches span middle C.
Each note gets one beat, unless it is followed by a time modifier. A time modifier is zero or more dashes (-), followed by zero or more slashes (/), followed by zero or more dots (.). Each dash adds one beat to the length of the note. After accounting for dashes (if any), each slash cuts the length of the note in half. Two slashes cut it to one quarter of its original (dashed) value, etc. After accounting for slashes (if any), a dot (.) increases the length of the note by 50%. Two dots increase it by 75%, etc.
Commas, vertical bars, and newlines are ignored between notes.
SST_PLAY - playback gain, from 0 to 99, default 75 SST_EARPHONES - if set, send output to the earphone jack
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.