More Fun Than a Barrel of Bettongs ...... : )

Author Message
vegipete

Guru

Joined: 29/01/2013
Posts: 1082
 Posted: 05:41pm 25 Aug 2020

Cool tunes!

Here is the same with some visualizations:
''' The Ghost in the Machine '''

cls

dim c(23),n(5), v(7), p(7), u(5)
for i=0 to 23: read c(i): next i
for i= 0 to 7: read p(i): next i
for i= 0 to 7: read v(i): next i
for i= 0 to 5: read n(i): next i
for i= 0 to 5: read u(i): next i
data 36,36,34,32,30,30,30,30
data 30,30,30,30,30,30,30,30
data 27,27,27,27,30,30,30,30
data 4,0,2,2,8,0,2,2
data 9,0,7,0,7,0,7,0
data 24,27,32,36,40,48
data 0,0,0,0,20,15

dim clr(4) = (0,rgb(red),rgb(green),rgb(blue),rgb(yellow))
for i = 1 to 4
circle 4+10*i,5,4,4,1,clr(i)
circle 410-10*i,5,4,4,1,clr(i)
next i

print @(62,0) "Ghost in the Machine  - by hitsware2"

do
for x=0 to 23
play sound 1,l,w,4*c(x),7
blit 10*1,0,700,550-4*c(x),10,10

play sound 1,r,w,6*c(x),7
blit 10*1,0,700,550-6*c(x),10,10

for y=0 to 7

play sound 2,b,s,1024,2*p(y)
blit 10*2,0,700,300,10,10
pause 10
play sound 2,b,s,1024,0

play sound 3,l,q,((1.99*c(x))),v(y)
blit 10*3,0,700,550-((1.99*c(x))),10,10
play sound 3,r,q,((2.01*c(x))),v(y)
blit 10*3,0,700,560-((2.01*c(x))),10,10

ni = int(rnd*5) : ui = int(rnd*5)
play sound 4,b,w,12*n(ni),u(ui)
if u(ui) then blit 10*4,0,700,550-12*n(ni),10,10

blit 10,20,0,20,MM.HRES,MM.VRES-20
pause 115 ' slightly faster to compensate for blitting

next y
next x
loop