|CDEFGAB||Letters A through G cause the corresponding note to be played in the current octave. A note letter may optionally be followed by an "accidental sign", one of # + or -; the first two of these cause it to be sharped one half-tone, the last causes it to be flatted one half-tone. It may also be followed by a time value number and by sustain dots (see below). Time values are interpreted as for the L command below.|
|O n||If n is numeric, this sets the current octave. n may also be one of L or N to enable or disable octave-tracking (it is disabled by default). When octave-tracking is on, interpretation of a pair of letter notes will change octaves if necessary in order to make the smallest possible jump between notes. Thus olbc will be played as olb>c, and olcb as olc<b. Octave locking is disabled for one letter note following >, < and O. (The octave-locking feature is not supported in IBM BASIC.)|
|>||Bump the current octave up one.|
|<||Drop the current octave down one.|
|N n||Play note n, n being 1 to 84 or 0 for a rest of current time value. May be followed by sustain dots.|
|L n||Sets the current time value for notes. The default is L4, quarter or crotchet notes. The lowest possible value is 1; values up to 64 are accepted. L1 sets whole notes, L2 sets half notes, L4 sets quarter notes, etc.|
|P n||Pause (rest), with n interpreted as for L n. May be followed by sustain dots. May also be written ~.|
Sets the number of quarter notes per minute; default is 120.
names for common tempi are:
Tempo Beats Per Minute very slow Larghissimo Largo 40-60 Larghetto 60-66 Grave Lento Adagio 66-76 slow Adagietto Andante 76-108 medium Andantino Moderato 108-120 fast Allegretto Allegro 120-168 Vivace Veloce Presto 168-208 very fast Prestissimo
|M[LNS]||Set articulation. MN ( N for normal) is the default; the last 1/8th of the notes value is rest time. You can set ML for legato (no rest space) or MS for staccato (1/4 rest space).|
Notes (that is, CDEFGAB or N command character groups) may be followed by sustain dots. Each dot causes the notes value to be lengthened by one-half for each one. Thus, a note dotted once is held for 3/2 of its undotted value; dotted twice, it is held 9/4, and three times would give 27/8.
A note and its sustain dots may also be followed by a slur mark (underscore). This causes the normal micro-rest after the note to be filled in, slurring it to the next one. (The slur feature is not supported in IBM BASIC.)
Whitespace in play strings is simply skipped and may be used to separate melody sections.
/dev/speaker speaker device file
The speaker device appeared in
.Fx 1.0 .
.An Eric S. Raymond Aq email@example.com June 1990
.An Andrew A. Chernov Aq firstname.lastname@example.org
Due to roundoff in the pitch tables and slop in the tone-generation and timer hardware (neither of which was designed for precision), neither pitch accuracy nor timings will be mathematically exact. There is no volume control.
The action of two or more sustain dots does not reflect standard musical notation, in which each dot adds half the value of the previous dot modifier, not half the value of the note as modified. Thus, a note dotted once is held for 3/2 of its undotted value; dotted twice, it is held 7/4, and three times would give 15/8. The multiply-by-3/2 interpretation, however, is specified in the IBM BASIC manual and has been retained for compatibility.
In play strings which are very long (longer than your systems physical I/O blocks) note suffixes or numbers may occasionally be parsed incorrectly due to crossing a block boundary.