In Commodore Basic 7, music is made using the PLAY command. PLAY takes one string, and that string contains the notations that you want the Commodore 128 to play. The string “CDE” will play the note C, and then the note D and finally then note E.
Possible notes are C, D, E, F, G, A and B. R is for Rest. Rests take up time, but does not make any sound. Spaces are ignored, so you can add spaces to make your string more readable. When you add a note control character to your note, this might be of interest. There are three note control characters that you can use. Control characters operates only on the note immediately to the right, spaces ignored.
Sharp (#) will play the note a half tone higher, flat ($) will play the note a half tone lower and period (.) will increase note duration by 50%. Since note control chars only apply to the next note, this will play 4 C notes, but only the third note will be longer.
The synthesizer control characters and the duration control characters do not just apply to the next note to the right, but to all preceding notes. All synthesizer control characters take numeric arguments, but none of the duration control characters take any arguments. I will get back to the synthesizer control characters, but these are the duration control characters:
W for whole note, H for half note, Q for quarter note (default), I for eight note and S for sixteenth note. This will play two bars. The first bar will consist of two quarter notes and one half note. The next bar will consist of one half note and two quarter notes.
With this much knowledge, you can do Smoke on the water by Deep Purple. Something like this: