dim musicPointer=a dim musicTimer=b dim beatPointer=c dim beatTimer=d dim tempaudv=t rem VOLUME DOWN AND SET CHANNELS AUDV0=0 AUDC0=10 AUDV1=0 AUDC1=8 rem INITIALIZE POINTERS AND TIMERS musicPointer=$FF musicTimer=0 beatPointer=$FF beatTimer=0 startLoop rem TIME TO UPDATE NOTE? if musicTimer = 0 then gosub changeMusicNote musicTimer = musicTimer - 1 if beatTimer = 0 then gosub changeBeatNote beatTimer = beatTimer - 1 drawscreen goto startLoop changeMusicNote musicPointer = musicPointer + 1 AUDF0 = musicData[musicPointer] tempaudv = 8 if musicData[musicPointer] = $FF then tempaudv = 0 AUDV0 = tempaudv musicPointer = musicPointer + 1 musicTimer = musicData[musicPointer] rem value is (2 * #_OF_NOTES) - 1 if musicPointer > 31 then musicPointer = #-1 return changeBeatNote beatPointer = beatPointer + 1 AUDF1 = beatData[beatPointer] tempaudv = 8 if beatData[beatPointer] = $FF then tempaudv = 0 AUDV1 = tempaudv beatPointer = beatPointer + 1 beatTimer = beatData[beatPointer] rem value is (2 * #_OF_NOTES) - 1 if beatPointer > 23 then beatPointer = #-1 return data musicData 18,26,-1,10,18,20,-1,40,15,26,-1,10,15,20,-1,40 16,26,-1,10,16,20,-1,40,17,26,-1,10,17,20,-1,40 end data beatData 120,2,-1,22,40,2,-1,10,120,2,-1,22,120,2,-1,10,40,2,-1,4,120,2,-1,16 end