Ring modulation (accomplished for voice 1 by setting bit 3 of register 4 in line 70 of the program below) replaces the triangular output of oscillator I with a "ring modulated" combination of oscillators 1 and 3. This produces non-harmonic overtone structures for use in mimicking bell or gong sounds. This program produces a clock chime imitation:
EXAMPLE PROGRAM 10:
10 S=54272 20 FORL=0TO24:POKES+L,0:NEXT 30 POKES+1,130 40 POKES+5,9 50 POKES+15,30 60 POKES+24,15 70 FORL=1TO12:POKES+4,21 80 FORT=1TO1000:NEXT:POKES+4,20 90 FORT=1TO1000:NEXT:NEXT
LINE-BY-LINE EXPLANATION OF EXAMPLE PROGRAM 10:
Line(s) | Description |
---|---|
10 | Set S to start of sound chip. |
20 | Clear sound chip registers. |
30 | Set high frequency for voice 1. |
40 | Set Attack/Decay for voice 1 (A=0, D=9). |
50 | Set high frequency for voice 3. |
60 | Set volume 15. |
70 | Count number of clings, set start triangle, ring mod waveform control voice 1. |
80 | Timing loop, set stop triangle, ring mod. |
90 | Timing loop, next ding. |
The effects available through the use of the parameters of your Commodore 64's SID chip are numerous and varied. Only through ex- perimentation on your own will you fully appreciate the capabilities of your machine. The examples in this section of the Programmer's Reference Guide merely scratch the surface.
Watch for the book MAKING MUSIC ON YOUR COMMODORE COMPUTER for everything from simple fun and games to professional-type musical instruction.
This page has been created by Sami Rautiainen. | |
Read the small print. | Last updated February 10, 2002. |