ilai's ambient soundware

for the commodore 64

and c64 emulators

2019

instructions—commodore 64:

these programs are written in BASIC and utilize the SID chip of the commodore 64 computer to generate sounds and music

the 1982 commodore 64 computer can be emulated on contemporary computers: use the Versatile Commodore Emulator, or VICE, to load the provided program files rather than typing them in as you would normally do if you are using a hardware C64

the windows version of VICE can load snapshots of code. the mac version works fine but you will have to type in the code.

instructions—emulator:

download WinVICE and run the x64.exe

if you are on mac, either download the mac version and type in the code, or use WINE to run VICE's x64.exe ((make sure to install XQuartz for WINE to run))

waves

type in this code:

10 SID = 54272
20 FOR I= 0 TO 28 POKE SID+I,0:NEXT
30 POKE SID+23,1:POKE SID+22,0
40 POKE SID+21,128
50 A%=INT(RND(1)*2)+13:D%=0
60 S%=INT(RND(1)*2)+13:R%=15
70 DR%=(A%+D%)*200
80 DE%=DR%+(R%*500)
90 P%=255
100 POKE SID+24,70
110 POKE SID+1,P%
120 POKE SID+5,A%*16+D%
130 POKE SID+6,S%*16+R%
140 POKE SID+4,1+128
150 FOR I=0 TO DR%:NEXT
160 POKE SID+4,128
170 FOR I=0 TO DE%:NEXT
180 GOTO 30

type RUN to start the program!

if you don't want to type in the code, open this file and load it as a snapshot in VICE

melodies

type in this code:

10 SID = 54272
20 FOR I=0 TO 24:POKE SID+I,0:NEXT
30 POKE SID+23,1:POKE SID+22,0
40 POKE SID+21,70
50 A%=INT(RND(1)*15):D%=INT(RND(1)*15)
60 S%=INT(RND(1)*15):R%=INT(RND(1)*15)
70 DR%=(A%+D%)*20
80 DE%=DR%+(R%*200)
90 P%=INT(RND(1)*40)*3
100 POKE SID+24,70
110 POKE SID+1,P%
120 POKE SID+5,A%*16+D%
130 POKE SID+6,S%*16+R%
140 POKE SID+4,1+16
150 FOR I=0 TO DR%:NEXT
160 POKE SID+4,16
170 FOR I=0 TO DE%:NEXT
180 GOTO 30

type RUN to start the program!

if you don't want to type in the code, open this file and load it as a snapshot in VICE

events

type in this code:

10 SID = 54272
20 FOR I=0 TO 24:POKE SID+I,0:NEXT
30 POKE SID+23
40 POKE SID+21,128:POKE SID+22,128
50 A%=INT(RND(1)*15):D%=INT(RND(1)*15)
60 S%=INT(RND(1)*15):R%=INT(RND(1)*15)
70 DR%=(A%+D%)*20
80 DE%=DR%+(R%*200)
90 P%=INT(RND(1)*40)*3
100 POKE SID+24,70
110 POKE SID+1,P%
120 POKE SID+5,A%*16+D%
130 POKE SID+6,S%*16+R%
140 POKE SID+4,1+128
150 FOR I=0 TO DR%:NEXT
160 POKE SID+4,128
170 FOR I=0 TO DE%:NEXT
180 GOTO 30

type RUN to start the program!

if you don't want to type in the code, open this file and load it as a snapshot in VICE