The 6581 SID chip lets you create more complex harmonic structures through synchronization or ring modulation of two voices.
The process of synchronization is basically a logical ANDing of two wave forms. When either is zero, the output is zero. The following example uses this process to create an imitation of a mosquito:
EXAMPLE PROGRAM 9:
10 S=54272 20 FORL=0TO24:POKES+L,0:NEXT 30 POKES+1,100 40 POKES+5,219 50 POKES+15,28 60 POKES+24,15 70 POKES+4,19 80 FORT=1TO5000:NEXT 90 POKES+4,18 100 FORT=1TO1000:NEXT:POKES+24,0
LINE-BY-LINE EXPLANATION OF EXAMPLE PROGRAM 9:
| Line(s) | Description |
|---|---|
| 10 | Set S to start of sound chip. |
| 20 | Clear sound chip registers. |
| 30 | Set high frequency voice 1. |
| 40 | Set Attack/Decay for voice 1 (A=13, D=11). |
| 50 | Set high frequency voice 3. |
| 60 | Set volume 15. |
| 70 | Set start triangle, sync waveform control for voice 1. |
| 80 | Timing loop. |
| 90 | Set stop triangle, sync waveform control for voice 1. |
| 100 | Wait, then turn off volume. |
The synchronization feature is enabled (turned on) in line 70, where bits 0, 1, and 4 of register 4 are set. Bit 1 enables the syncing function between voice 1 and voice 3. Bits 0 and 4 have their usual functions of gating voice 1 and setting the triangular waveform.
| This page has been created by Sami Rautiainen. | |
| Read the small print. | Last updated February 10, 2002. |