ration with numbers from 1 to 9 (there is a reason for the maximum number being 9 in this example as you will see in the table below).
10 a$="1C2C3C4C5C6C7C8C9C"
20 PLAY a$
The PLAY command supports 9 standard musical durations: from a semiquaver (sixteenth note) to a semibreve (whole note) of the time signature. There are three extra duration values which denote triplet notes (three notes played in the time normally used for two): from a triplet semiquaver (triplet sixteenth) to a triplet crotchet (triplet quarter). While the first 9 values are set and apply to all the notes that follow, a triplet duration value (10-12) only applies to the next 3 notes that will follow it in the string. For example:
10 PLAY "11ACE"
plays a triplet quaver of A, C and E. The following table lists the note duration values and their musical term equivalent.
| Value | Note name (Standard) | Note name (British) | Musical notation |
|---|---|---|---|
| 1 | Sixteenth | Semiquaver | 𝅘𝅥𝅯 |
| 2 | Dotted sixteenth | Dotted semiquaver | 𝅘𝅥𝅯𝅭 |
| 3 | Eighth | Quaver | 𝅘𝅥𝅮 |
| 4 | Dotted eighth | Dotted Quaver | 𝅘𝅥𝅮𝅭 |
| 5 | Quarter | Crochet | 𝅘𝅥 |
| 6 | Dotted Quarter | Dotted Crochet | 𝅘𝅥𝅭 |
| 7 | Half | Minim | 𝅗𝅥 |
| 8 | Dotted Half | Dotted Minim | 𝅗𝅥𝅭 |
| 9 | Whole | Semibreve | 𝅝 |
| colour: pale yellow 10 | colour: pale yellow Triplet sixteenth | colour: pale yellow Triplet semiquaver | colour: pale yellow ![]() |
| colour: pale yellow 11 | colour: pale yellow Triplet eighth | colour: pale yellow Triplet quaver | colour: pale yellow ![]() |
| colour: pale yellow 12 | colour: pale yellow Triplet quarter | colour: pale yellow Triplet crotchet | colour: pale yellow ![]() |
Table 11 – Note duration values
Additionally there is also the ability to insert moments of silence (or rests as they're called in music terminology) denoted by the ampersand symbol (&). Rests, last as long as the current note playing. For example:
10 PLAY "7A&B&C&D&E"
is five minims with equal (minim-length) silence durations between them.
Tied notes can be indicated by giving the two note durations connected by an underscore character (_) and the note name, eg.:
10 PLAY "3_5A"
The second note duration you give will also apply to any following codes until you give another duration code.
ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.