0,]']±>Sï}WÿÍu§ðp8·d%qy)6o;]ÉA¦ösï÷ôôô”°ÂVl†3=pat[curPat].len do curPat=curPat+1 patTmr=time() pat[curPat].func(scale, hScale) end cls(0) rect(0, h-11, w, 11, 14) for i=-2, 12*9 do drawNote(i, false) end local curSum = pat[curPat].len for i=curPat, curPat-50, -1 do if pat[i] ~= nil then curSum = curSum - pat[i].len local posX = (-time()+patTmr+curSum)/20+w/2 local col = 14 if posX+pat[i].endT/20-1 > w/2 then col = 2 drawNote(pat[i].vis, true) end line(posX, h-(pat[i].vis+10), posX+pat[i].endT/20-1, h-(pat[i].vis+10), col) end end local curSum = pat[curPat].len for i=curPat+1, curPat+50 do if pat[i] ~= nil then local posX = (-time()+patTmr+curSum)/20+w/2 line(posX, h-(pat[i].vis+10), posX+pat[i].endT/20-1, h-(pat[i].vis+10), 12) curSum = curSum + pat[i].len end end line(w/2, 0, w/2, h-11, 13) end function drawNote(note, playing) local blackN, posX = false, note*2+note//12*2*2+4 for i=1, #black do if note%12 == black[i] then blackN = true; break end end if note%12 >= 5 then posX=posX+2 end if blackN then rect(posX, h-10, 3, 5, playing and 2 or 0) else rect(posX+1, h-10, 1, 10, playing and 2 or 12) rect(posX, h-5, 3, 5, playing and 2 or 12) if note%12 == 11 or note%12 == 4 then rect(posX+2, h-10, 1, 5, playing and 2 or 12) end if note%12 == 0 or note%12 == 5 then rect(posX, h-10, 1, 5, playing and 2 or 12) end end end