Versatile micro reviewed
Gary Herman POKEs around Commodore's new 64K micro and comes up with some interesting noises.
Sound is enabled for all three channels by POKEing a volume setting (0 to 15) into location 54296. The seven parameters for each channel are (in order of memory location) a low and a high byte to set note frequency (these two are read together and are the single most confusing figures in the whole operation); a low and a high byte to set pulse width (only necessary when a pulse or square waveform is specified); a byte to set the waveform (17 for triangular, 33 for sawtooth, 65 for pulse and 129 for white noise); a byte to set the attack/decay characteristics of the note and a byte to set the sustain/release characteristics. These latter envelope parameters (ADSR) must be entered into a program first, followed by waveform and any other required settings. Default values are zero.
A note continues playing until it is turned off (by resetting the volume or by setting the waveform to zero), so FOR...NEXT loops or other delaying techniques can be used to create crotchets, quavers, dotted notes and so on.
The combination of delays and the ADSR envelope settings can create interesting decay and sustain effects. All this can also be put inside a FOR...NEXT loop to create complex envelopes for experimental music and sound effects. Try this (on channel one only):
Since all the values are POKEd in this way, there is scope for fascinating experiment. Unfortunately, the Commodore manual has hardly anything to say about the machine's memory map (and most of that is about graphics). I ran a simple program to POKE different values into each of the locations between 54272 and 54296 and discovered some interesting, if unpredictable effects (beware of POKEing anything but zero into 542951). POKEing different values into the waveform locations (54276, 54283 and 54290) gives a wider range of sounds than the manual mentions (try 85, 21 or 141). it also seems that POKEing some locations in an otherwise unused channel can filter sound being produced in another channel — very valuable for the computer musician.
Finally, using GET AS to scan the keyboard in order to play in real time enables you to control the sustain to some extent by varying the amount of time for which you depress a key. Rapid key strokes are also 'memorised' by the computer to make a form of primitive sequencer.
The 64 is obviously a machine that will repay intelligent investigation. A hi-fi outlet and ports which are clearly identified in the manual help its reputation as a serious machine (a reputation enhanced by the pleasantly professional keyboard). There is some ready-written software for composers but, unfortunately and typically, I'm afraid, it seemed impossible to get hold of. Perhaps a few queries from musicians will help suppliers buck up their ideas.
Feature by Gary Herman
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!