Setting the pitch
As you saw above, you set the pitch of any note by giving its musical name - eg, C E G. Sharp notes are prefixed by # (eg #C) and flat notes by $. Your 'instrument' covers two octaves in the key of C, and uses letters c to b for the notes in the lower octave, C to B in capitals for the higher one.
Any number of notes within these two octaves can be played one after another, eg
10 LET a$="cfedafgCFEDAFGCC"
If you want to span more than just two octaves, you can change the overall pitch of your 'instrument' by using the octave command 0 followed by a number from 0 to 8. if you do not specify an octave (as in the example above) it is automatically set to 5 (the range containing middle C). The octave command remains in force for all notes which follow it until a new octave command is given.
This program lets you hear the same tune played in a higher octave (just add the O7 to your earlier program)
10 LET a$="O7cfedafgCFEDAFGCC"
Try changing the octave number progressively to hear the full pitch range which your Spectrum 128 can produce. Notice that some of the very lowest notes in octaves 0 and 1 will not be reproduced at the right pitch except through the MIDI output. The Spectrum 128 will simply play them at the lowest pitch possible.
Since each pitch range covers two octaves, two adjacent ranges overlap. For example, the high part of 04 contains the low part of 05 (see the diagram below). Note that you can extend any range slightly by using a series of sharps (####) or flats ($$$$) to raise the pitch of individual high notes or lower the pitch of low ones.
If you do not specify the length of each note, they will all be played at the same length (as crotchets) as in the examples above. You can fix the length of any note or series of notes by prefixing it with a number from 1 to 12. This program lets you hear the different note duration with numbers from 1 to 9.
10 LET a$="1C2C3C4C5C6C7C8C9C"