Sound commands include:
PLAY string
Plays music, using these commands:
| A-G [# | + | -] [n] [.]: plays a note, optionally sharp (# or +) or flat (-), with an optional length n (eg, 4 for a quarter note), and with optional dots (each dot increases the length by half) |
The octave, length, tempo, and mode persist from one PLAY to the next. MF and MB are ignored, since music always plays in the foreground (PLAY returns when the music ends).
PLAY "T160 O3 L8 C D E F G4 G4 A A A A G2"
SOUND frequency,duration
Plays a tone of the specified frequency (37-32767 Hz) for duration clock ticks (18.2 per second).
The program continues while the tone plays, but the next SOUND waits for it to finish, unless its duration is 0, which stops the tone.
FOR F = 200 TO 1000 STEP 100:SOUND F,2:NEXT
Copyright (c) 2020-2026 Jeff Parsons Released under MIT License