Baron Knoxburry
Level 30 Mixist
 
Commodore 64
6th/8

 
cool breeze 
167th Σ4.533

 
sweaty glasses 
188th Σ4.408

 
longer days 
138th Σ4.703

 
brighter mornings 
201st Σ4.259

 
sun in pants 
173rd Σ4.512

 
BASIC Ambiance in Aminor
 
  177th/259   Σ22.415   Sep 8th 2025 10:13pm
 
 
This program rotates through the 3 channels set to saw waves with a slow ADSR envelope. Each note is chosen from the scale of A minor at random and sometimes repeat. Time between each note is also random.

It will play indefinitely. The randomness is limited to whatever Bill Gates and Paul Allen did to conjure the RND(0) command. Skullduggery be damned.

I came up with this concept over a year ago. I still don't feel like I have a comfortably efficient dev pipeline for micros. But I decided to write a BASIC program for my VIC20 where it drew color graphic character blocks in a sinusoidal fashion. Then I ported that to the C64, Atari 800XL, MSX, MSX2, Commodore PLUS/4, and the TI 99/4a. Y'know, stuff I have lying around the pantry. It's funny because BASIC is so insanely slow. And then I remembered this concept for generative ambient music on the C64 and how the SID chip can do all that ADSR heavy lifting. I have the resonance on the filter maxed out and when frequencies get beating I can hear that sweet feedback ringing, but otherwise it definitely does not self-oscillate. Did I mention BASIC is slow? It makes for a great Low Frequency Oscillator used to subtly agitate the filter's cutoff frequency.

My unit had an insane amount of hum in the signal so I rendered using emulation (and I have no idea how accurate it is but it sounds nice). I used x64.exe from the WinVICE collection. Drag and drop my submission file into the emulator window.
Here are the appropriate settings:
Settings -> C64 Model -> C64 NTSC
Settings -> SID Settings -> 6581 (Fast SID)


100 POKE 53280,0:POKE 53281,0
110 PRINT "{CLEAR}{PURPLE}"
120 DIM FH(7):FL(7):CN=0:CC=0
130 WC=0:WM=100:FD=7:FV=128
150 FORA=54272TO54296:POKEA,0:NEXTA
160 POKE 54296,15+16
200 FOR I=0 TO 14 STEP 7
210 POKE 54277+I,(11*16)+14
220 POKE 54278+I,14
230 NEXT I
250 FOR I=0TO6:READH:FH(I)=H:NEXTI
260 FOR I=0TO6:READL:FL(I)=L:NEXTI
280 POKE 54295,240+7:REM FILTER Q
300 POKE 54272+CC,FL(CN)
310 POKE 54273+CC,FH(CN)
320 POKE 54276+CC,33
350 W=11+INT(RND(0)*159)
400 POKE 54293,FV AND7
405 POKE 54294,INT(FV/8)+99
410 FV=FV+FD
420 IF FV>250 THEN FD=-7
430 IF FV<9 THEN FD=7
440 W=W-1:IF W>0 THEN GOTO 400
500 POKE 54276+CC,32
510 CN=INT(RND(0)*7)
520 CC=CC+7:IF CC>14 THEN CC=0
590 GOTO 300
900 DATA 3,3,4,4,5,5,6
905 DATA 134,244,48,180,71,152,71
93
8
3
2
24
 


previous entry
Go256 - Globule


nextious entry
RevvoBolt - All Your Ataris Are Belong to Us
 
223918
Level 19 Chipist
glebogryzarka
 
 
 
post #223918 :: 2025.09.10 5:31am :: edit 2025.09.10 5:32am
  
  RevvoBolt, Baron Knoxburry and damifortune liēkd this
this higher frequency resonance! it sounds like a compression artifact, but i assume it's not and it amazes me, i thought i've heard everything on C64 :o
it's random too! and done in a few lines of its shitty BASIC, the mind boggles
 
 
224040
Level 12 Pixelist
treasurehead
 
 
post #224040 :: 2025.09.12 6:36pm
  
  RevvoBolt and Baron Knoxburry liēkd this
neat :O
 
 

LOGIN or REGISTER to add your own comments!