I play BGM with "on interval = 120 gosub 9000" in BASIC. (see below sample code)
But, I realized I cannot play simultaneously, in other words, asynchronously the sound effect with BGM together.
When I push space, I want to play simultaneously the sound effect - play "cde", not synchronously! How can I do it?
50 clear 500
60 dim mu$(19)
70 open"b:musidata.txt" for input as #1
90 for i=0 to 19
91 input #1,mu$(i)
92 next i
94 close #1
290 'initialize
291 on interval=120 gosub 9000
292 interval on
293 on strig gosub 1000
294 strig(0) on
295 play"S0M10000"
300 'main loop
400 goto 300
1000 'on strig
1020 play"cde"
1030 return
9000 'bgm
9010 play mu$(nn):nn=(nn+1)mod 20
9020 return
Login or register to post comments