The PLAY
allows you to generate music directly from your computer,
turning it into a real musical instrument. The PLAY
command uses
a specific syntax to describe notes, duration, volume, and other
musical parameters.
Musical notes can be specified using the letters A through G, with numbers
to indicate the octave, or a number from 1 to 9. The duration of a note can be specified
with the letter L. To insert a rest, use the letter P. The octave can be
specified with the letter O followed by a number. The tempo of the song can be
changed with the T command, while the volume can be changed using the V letter.
PLAY string
PLAY "O1V31T2L4GGL8GGL4B-AAGGF+G"
Used in:
Join BASIC 10Liner Contest with ugBASIC!
An interesting competition is held at the beginning of each year: the
BASIC 10Liner Contest.
It is possible to use ugBASIC to participate in the next
"BASIC10Liner" competition, in the following categories:
PLAY (program) ↔ Py
If you have found a problem with this keyword, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO KEYWORDS