|
loadsound(0, "1.wav") loadsound(10, "2#.wav") loadsound(9, "3.wav") loadsound(11, "4.wav") loadsound(1, "5#.wav") loadsound(3, "6#.wav") loadsound(2, "7.wav") loadsound(4, "8.wav") loadsound(6, "9#.wav") loadsound(5, "10.wav") loadsound(8, "11#.wav") loadsound(7, "12.wav") loadsound(12, "13.wav")
loadsound(22, "1.wav") loadsound(23, "2.wav") loadsound(24, "3.wav") loadsound(25, "4.wav") loadsound(26, "5.wav") loadsound(27, "6.wav")
loadsound(13, "1.wav") loadsound(14, "2.wav") loadsound(15, "3.wav") loadsound(16, "5.wav") loadsound(17, "4.wav") loadsound(18, "6.wav") loadsound(19, "7.wav")
loadsound(20, "claps001.wav") -- Drumloop -- loadsound(21, "breakbeat025.wav") -- Now for background image -- loadimage(0,"background.jpg" )
local last_key = 0
function onmainloop()
clear(0,0,0)
drawimage(0,0,0)
if numkeypress( 81 ) > 0 then playsound(0, true) end if numkeypress( 81 ) < 1 then stopsound(0) playing = false end if numkeypress( 87 ) > 0 then playsound(1, true) end if numkeypress( 87 ) == 0 then stopsound(1) end if numkeypress( 69 ) > 0 then playsound(2, true) end if numkeypress( 69 ) == 0 then stopsound(2) end if numkeypress( 82 ) > 0 then playsound(3, true) end if numkeypress( 82 ) == 0 then stopsound(3) end if numkeypress( 84 ) > 0 then playsound(4, true) end if numkeypress( 84 ) == 0 then stopsound(4) end if numkeypress( 89 ) > 0 then playsound(5, true) end if numkeypress( 89 ) == 0 then stopsound(5) end if numkeypress( 85 ) > 0 then playsound(6, true) end if numkeypress( 85 ) == 0 then stopsound(6) end if numkeypress( 73 ) > 0 then playsound(7, true) end if numkeypress( 73 ) == 0 then stopsound(7) end if numkeypress( 79 ) > 0 then playsound(8, true) end if numkeypress( 79 ) == 0 then stopsound(8) end if numkeypress( 80 ) > 0 then playsound(9, true) end if numkeypress( 80 ) == 0 then stopsound(9) end if numkeypress( 65 ) > 0 then playsound(10, true) end if numkeypress( 65 ) == 0 then stopsound(10) end if numkeypress( 83 ) > 0 then playsound(11, true) end if numkeypress( 83 ) == 0 then stopsound(11) end if numkeypress( 68 ) > 0 then playsound(12, true) end if numkeypress( 68 ) == 0 then stopsound(12) end
if numkeypress( 90 ) == 1 then playsound(13) end if numkeypress( 88 ) == 1 then playsound(14) end if numkeypress( 67 ) == 1 then playsound(15) end if numkeypress( 86 ) == 1 then playsound(16) end if numkeypress( 66 ) == 1 then playsound(17) end if numkeypress( 78 ) == 1 then playsound(18) end if numkeypress( 77 ) == 1 then playsound(19) end
if numkeypress( 32 ) == 1 then playsound(20) end
if numkeypress( 38 ) == 1 then playsound(21) end
if numkeypress( 70 ) == 1 then playsound(22) end if numkeypress( 71 ) == 1 then playsound(23) end if numkeypress( 72 ) == 1 then playsound(24) end if numkeypress( 74 ) == 1 then playsound(25) end if numkeypress( 75 ) == 1 then playsound(26) end if numkeypress( 76 ) == 1 then playsound(27) end if numkeypress( 13 ) == 1 then playsound(28) end
if numkeypress( 40 ) == 1 then quit() end
function onbuttondown(key) last_key = key end end
|