Code: Select all
app_init
new_song: notes set n1$,n2$,n3$ ! notes play
n1$=notes_gen$ ! n2$=notes_gen$ ! n3$=notes_gen$
go_on: if notes_time()<notes_length() then go_on else new_song
end
def app_init
randomize
for i=1 to 7 ! for j=1 to 7 ! .t$&=chr$(96+j) ! next j ! next i
.note=23 ! .speed$="WHHQQQQIIISST" ! .tempo$="I"
end def
def notes_gen$
a$="Ic4"
for i=1 to 200
if rnd(1)<.5 then a$&=mid$(.speed$,rnd(13),1)
if rnd(1)<.1 then a$&="V"&(28+rnd(100))
if rnd(1)<.05 then a$&=rnd(119)&":"
dn=rnd(7)-3 ! a$&=tone_mut$(dn)
next i
return a$
end def
def tone_mut$(dt)
.note+=dt ! .note=max(0,.note) ! .note=min(48,.note)
n$=mid$(.t$,.note,1) & str$(floor(.note/7)+1)
return n$
end def