Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
PLAY Statement QuickSCREEN
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
PLAY - a device I/O statement that plays music
Syntax
PLAY commandstring
■ commandstring is a stringexpression that contains music commands:
──────────────────────────Set Octaves and Play Tones──────────────────────────
On Sets current octave (n = 0-6) │ < or > Up or down one octave
Nn Plays note n (n = 0-84, 0 is a │ A-G Plays A, B, ..., G in current
rest) │ octave (+ = sharp, - = flat)
──────────────────────────Set Tone Duration and Tempo─────────────────────────
Ln Sets length of a note (L1 is │ MS Each note plays 3/4 of length
whole note, L4 is quarter note, │ MN Each note plays 7/8 of length
etc.) n = 1-64 │ ML Each note plays full length
Tn Sets number of quarter notes per │ Pn Pause for the duration of
minute (n = 32-255, 120 default │ n quarternotes (n = 1-64)
────────────────────────────────Set Operation─────────────────────────────────
MF Plays music in foreground │ MB Plays music in background
───────────────────────────────Execute Substrings─────────────────────────────
X + VARPTR$(string-expression) Executes another command string
See Also ◄SOUND► ◄BEEP► ◄ON PLAY(n)►
Other Uses of the PLAY Keyword
◄PLAY ON, PLAY OFF, and PLAY STOP► - to enable, disable, or suspend play
event trapping
◄PLAY function► - to return the number of notes in the background music
queue