pico-8 cartridge // http://www.pico-8.com version 7 __lua__ mouse = { init = function() poke(0x5f2d, 1) end, -- return int:x, int:y, onscreen:bool pos = function() local x,y = stat(32)-1,stat(33)-1 return stat(32)-1,stat(33)-1 end, -- return int:button [0..4] -- 0 .. no button -- 1 .. left -- 2 .. right -- 4 .. middle button = function() return stat(34) end, } function _init() frame=0 time=0 mouse.init() handx,handy=mouse.pos() handdown=false pattern = 0 step = 0 endcursor = nil octave = 1 playing = true instrument = 0 recording = false load_pattern(0) playstep=0 sfx(0,0) end function split_byte(b) local hi = band(shr(b,4),0x0f) local lo = band(b,0x0f) return hi,lo end function combine_byte(hi,lo) return shl(hi,4)+lo end function split_nibble(n) local hi = band(shr(b,2),0x08) local lo = band(b,0x08) return hi,lo end function combine_nibble(hi,lo) return shl(hi,2)+lo end function savecart() local s = 0x3200 poke(s+64,0x01) -- set editor mode poke(s+65,0x10) -- set speed poke(s+66,0x00) -- loop start poke(s+67,0x10) -- loop end for i=0,63,2 do local step = flr(i/2) -- octave,instrument,note local octave = 4 local instrument = 4 local note = rnd(12) local ne = combine_byte(combine_nibble(instrument,octave),note) --poke(s+i,ne) -- note+inst --poke(s+i+1,combine_byte(0,4)) -- vol+effect end end note_to_xy = { [0]={1,4}, -- c {2,3}, -- c# {2,4}, -- d {3,3}, -- d# {3,4}, -- e {4,4}, -- f {5,3}, -- f# {5,4}, -- g {6,3}, -- g# {6,4}, -- a {7,3}, -- a# {7,4}, -- b {1,2}, -- c {2,1}, -- c# {2,2}, -- d {3,1}, -- d# {3,2}, -- e {4,2}, -- f {5,1}, -- f# {5,2}, -- g {6,1}, -- g# {6,2}, -- a {7,1}, -- a# {7,2}, -- b {8,2}, -- c } note_to_name = { [0]="c-", "c#", "d-", "d#", "e-", "f-", "f#", "g-", "g#", "a-", "a#", "b-" } function set_instrument(newinst) -- update all the notes to use this instrument for i=0,pattern_len do local note,inst,vol,fx = get_step(i) write_step(i,note,newinst,vol,fx) end end function load_pattern(p) pattern = p local s = 0x3200+68*p speed = peek(s+65) pattern_len = peek(s+67) if pattern_len == 0 then set_length(16) end if speed == 0 then set_speed(16) end local note,inst,vol,fx = get_step(0) instrument = inst mset(14,3,96+instrument) set_instrument(inst) step = 0 endcursor = nil playstep = 0 sfx(p,0) end function clear_pattern() for i=0,31 do write_step(i,0,0,0,0) end end function set_speed(speed) poke(0x3200+68*pattern+65,speed) end function set_length(length) poke(0x3200+68*pattern+67,length) end function transpose(amount) for i=step,(endcursor and endcursor-1 or step) do local note,inst,vol,fx = get_step(i) note = mid(0,63,note+amount) write_step(i,note,inst,vol,fx) end end function set_note(note,vol,fx) if note != nil then note = mid(0,note,63) write_step(step,note,instrument,vol > 0 and vol or 5,fx) else write_step(step,0,0,0,0) end if recording then step=(step+1)%pattern_len end end function set_fx(fx) for i=step,(endcursor and endcursor-1 or step) do local note,inst,vol,_fx = get_step(i) write_step(i,note,inst,vol,fx) end end function set_vol(vol) for i=step,(endcursor and endcursor-1 or step) do local note,inst,_vol,fx = get_step(i) write_step(i,note,inst,vol,fx) end end clipboard = nil function copy() clipboard = {} for i=step,(endcursor and endcursor-1 or step) do note,inst,vol,fx = get_step(i) add(clipboard,{note,inst,vol,fx}) end end function paste() local i = step if clipboard then for v in all(clipboard) do if i >= pattern_len then break end write_step(i,v[1],v[2],v[3],v[4]) i+=1 end end end function lerp(a,b,t) return a + (b - a)*t end function _update() newpress = false frame+=1 time+=1/30 local fast = btn(5) handx,handy = mouse.pos() if not handdown and btn(4) then handdown = true newpress = true elseif not btn(4) then handdown = false startdrag = nil end if handdown then local note,inst,vol,fx = get_step(step) local tx,ty = flr(handx/8),flr(handy/8) if ty >= 8 then -- select step by music position if newpress then step = tx + flr(cx/8) startdrag = handx endcursor = nil elseif handx != startdrag then endcursor = tx + flr(cx/8) if endcursor == step then endcursor = nil end end end if newpress then if tx == 15 and ty == 0 then pattern += 1 pattern = pattern%65 load_pattern(pattern) elseif tx == 13 and ty == 0 then pattern -= 1 if pattern < 0 then pattern = 64 end load_pattern(pattern) end if tx == 11 and ty == 6 then -- clear clear_pattern() end if tx == 13 and ty == 5 then copy() elseif tx == 14 and ty == 5 then paste() end if tx == 1 and ty == 5 then -- toggle recording recording = not recording mset(1,5,recording and 30 or 14) end if tx == 12 and ty == 6 then -- stop sfx(-1,0) playing = false playstep = 0 elseif tx == 13 and ty == 6 then -- play sfx(pattern,0) playstep = 0 playing = true end if ty == 6 and tx == 3 then pattern_len = max(pattern_len-1,1) set_length(pattern_len) step = mid(0,step,pattern_len-1) elseif ty == 6 and tx == 4 then pattern_len = min(pattern_len+1,32) set_length(pattern_len) step = mid(0,step,pattern_len-1) end if ty == 6 and tx == 1 then step -= 1 step=step%pattern_len elseif ty == 6 and tx == 2 then step += 1 step=step%pattern_len end -- note attributes if ty == 2 then if tx == 9 then set_vol(0) elseif tx == 10 then set_vol(vol==7 and 5 or 7) elseif tx == 11 then set_fx(fx==1 and 0 or 1) elseif tx == 12 then set_fx(fx==5 and 0 or 5) elseif tx == 13 then set_fx(fx==2 and 0 or 2) end elseif ty == 4 then if tx == 9 then set_vol(vol==3 and 5 or 3) elseif tx == 10 then set_fx(fx==7 and 0 or 7) elseif tx == 11 then set_fx(fx==6 and 0 or 6) elseif tx == 12 then set_fx(fx==4 and 0 or 4) elseif tx == 13 then set_fx(fx==3 and 0 or 3) end end if ty == 4 and tx == 14 then instrument+=1 if instrument > 7 then instrument = 0 end set_instrument(instrument) mset(14,3,96+instrument) end if tx==9 and ty==6 then speed = max(0,speed-1) set_speed(speed) elseif tx==8 and ty==6 then speed = min(64,speed+1) set_speed(speed) end if tx == 14 and ty == 6 then cstore(0x3200,0x3200,0x4300-0x3200) save("test") end -- notes if ty == 2 then -- top white keys local octave = octave+1 if tx == 1 then set_note(0+octave*12, vol,fx) elseif tx == 2 then set_note(2+octave*12, vol,fx) elseif tx == 3 then set_note(4+octave*12, vol,fx) elseif tx == 4 then set_note(5+octave*12, vol,fx) elseif tx == 5 then set_note(7+octave*12, vol,fx) elseif tx == 6 then set_note(9+octave*12, vol,fx) elseif tx == 7 then set_note(11+octave*12,vol,fx) elseif tx == 8 then set_note(12+octave*12,vol,fx) end elseif ty == 1 then -- top black keys local octave = octave+1 if tx == 2 then set_note(1+octave*12, vol,fx) elseif tx == 3 then set_note(3+octave*12, vol,fx) elseif tx == 5 then set_note(6+octave*12, vol,fx) elseif tx == 6 then set_note(8+octave*12, vol,fx) elseif tx == 7 then set_note(10+octave*12,vol,fx) end elseif ty == 4 then -- bottom white keys if tx == 1 then set_note(0+octave*12, vol,fx) elseif tx == 2 then set_note(2+octave*12, vol,fx) elseif tx == 3 then set_note(4+octave*12, vol,fx) elseif tx == 4 then set_note(5+octave*12, vol,fx) elseif tx == 5 then set_note(7+octave*12, vol,fx) elseif tx == 6 then set_note(9+octave*12, vol,fx) elseif tx == 7 then set_note(11+octave*12,vol,fx) end elseif ty == 3 then -- bottom black keys if tx == 2 then set_note(1+octave*12, vol,fx) elseif tx == 3 then set_note(3+octave*12, vol,fx) elseif tx == 5 then set_note(6+octave*12, vol,fx) elseif tx == 6 then set_note(8+octave*12, vol,fx) elseif tx == 7 then set_note(10+octave*12,vol,fx) end end if tx == 8 and ty == 3 then if endcursor then -- transpose up an octave transpose(12) else octave+=1 end elseif tx == 8 and ty == 4 then if endcursor then -- transpose down an octave transpose(-12) else octave-=1 end end end octave = mid(0,octave,4) -- update leds for a=0,24 do local n = vol != 0 and note-12*octave or nil local p=note_to_xy[a] if p[2] == 2 or p[2] == 4 then mset(p[1],p[2],a==n and 7 or 23) else mset(p[1],p[2],a==n and 6 or 22) end end -- led for off mset(9,2,vol==0 and 38 or 37) mset(10,2,vol==7 and 38 or 37) mset(11,2,fx==1 and 38 or 37) mset(12,2,fx==5 and 38 or 37) mset(13,2,fx==2 and 38 or 37) mset(9,4,vol==3 and 38 or 37) mset(10,4,fx==7 and 38 or 37) mset(11,4,fx==6 and 38 or 37) mset(12,4,fx==4 and 38 or 37) mset(13,4,fx==3 and 38 or 37) end if playing then playstep += 1/(speed/4) if playstep >= pattern_len then playstep = 0 end mset(14,1,flr(playstep)%4==0 and 5 or 21) end end function get_step(step) local offset = 0x3200 + 68*pattern + step*2 local high = peek(offset+1) local low = peek(offset) local v = bor(shl(high,8),low) return get_bits(v,0,6), get_bits(v,6,9), get_bits(v,9,12), get_bits(v,12,15) end function write_step(step,note,inst,vol,fx) local offset = 0x3200 + 68*pattern + step*2 local word = note + shl(inst,6) + shl(vol,9) + shl(fx,12) -- split word into bytes local low = band(word,0x00ff) local high = shr(band(word,0xff00),8) poke(offset,low) poke(offset+1,high) end function get_bits(v,s,e) -- return a value from v taking the bits from s (start) to e (end) v = shr(v,s) v = band(v,shl(1,e-s)-1) return v end function tobin(n) outstr = "" for i=15,1,-1 do if i == 5 or i == 8 or i == 11 then outstr = outstr.." " end outstr = outstr..((band(n,shl(2,i-1)) != 0) and "1" or "0") end outstr = outstr..((band(n,1) != 0) and "1" or "0") return outstr end function pad(input,pad,char) local len = input > 99 and 3 or (input > 9 and 2 or 1) local output = ""..input for i=len,pad do output = char..output end return output end note_to_staffy = { [0] = 12, 10, 10 } function _draw() cls() map(0,0,0,0,16,16) print((step+1).."/"..pattern_len,44,50,7) print(octave,66,10,7) print(speed,80,50,7) print(pattern,113,1,7) -- draw a pianoroll type thing clip(0,64,128,64) rectfill(0,64,128,128,7) -- staff lines for i=1,24 do if i%6 != 0 then line(0,64+i*3,128,64+i*3,6) end end cx = (endcursor or step)*8-64 if cx < 0 then cx = 0 elseif cx+64 > pattern_len*8-64 then cx = max(pattern_len*8-64-64,0) end if lastcx then cx = lerp(lastcx,cx,0.1) end camera(cx,0) lastcx = cx -- vertical for i=0,pattern_len,4 do line(i*8,64,i*8,128,6) end -- cursor if endcursor then rectfill(step*8,64,endcursor*8,128,13) else line(step*8,64,step*8,128,13) end -- play line line(playstep*8,64,playstep*8,128,3) -- end of loop line(pattern_len*8,64,pattern_len*8,128,5) line(pattern_len*8-2,64,pattern_len*8-2,128,5) -- draw notes for i=0,pattern_len-1 do local note,inst,vol,fx = get_step(i) if vol > 0 then spr(12,i*8,122-note) if vol > 5 then spr(28,i*8,116-note) elseif vol < 5 then spr(46,i*8,116-note) end if fx == 1 then spr(60,i*8,120-note) elseif fx == 5 then spr(13,i*8,120-note) elseif fx == 2 then spr(61,i*8,120-note) elseif fx == 3 then spr(73,i*8,120-note) elseif fx == 4 then spr(62,i*8,120-note) elseif fx == 7 then spr(15,i*8,120-note) elseif fx == 6 then spr(31,i*8,120-note) end end end camera() clip() pal() palt(0,false) palt(8,true) spr(handdown and 47 or 63,handx-6,handy) palt() end __gfx__ 55555555555555555555555555555555555555556666666600000000577777755555555566666666666666667777777600000000000550007777777655005500 5555555555555555555555555555555555555555660000660108801057000075577777756666666666655d667666666500000000000005007666666500000000 5577777755777777777777777777777777777755600220060102201057088075577777756666666666d666d67666666500005500000550007662266500000000 55777777557777777777777777777777777777556027820601022010570220755777777566655566666666667655556500005000000000007622226500000000 557666665576666666666666666666666666675560288206010220105702207557777775666ddd66666666667655556500005000000000007622226500000000 55766666557666666666666666655766666667556002200601000010570220755777777566666666666666667666666500055000000000007662266500000000 55766666557666666666666666655766666667556600006601111110570000755777777566666666666666667666666500055000000000007666666500000000 55766666557666666666666666677666666667556666666600000000555555555777777566666666666666666555555500000000000000006555555500000000 55555555557666666666666666666666666667556666666600000000577777755555555577777777666666667777777600050000050000001111111650505050 5555555755766666666666666666666666666755660000660107701057000075577777757665666566d566667666666500505000555000001555555700000000 777777775576666666666666666666666666675560022006010660105707707557777775766d5665666d5d667665566500000000050000001558855700000000 7777777655766666666666666666666666666755602222060106601057066075577777757dddd56566d566667655556500000000000000001587885700000000 666666665576666666666666666666666666675560222206010660105706607557777775766d5665666666667655556500000000000000001588885700000000 66666666557666666666666666666666666667556002200601000010570660755777777576656665666666667665566500000000000000001558855700000000 66666666557666666666666666666666666667556600006601111110570000755777777576666665666666667666666500000000000000001555555700000000 66666666557666666666666666666666666667556666666600000000555555555777777565555555666666666555555500000000000000006777777700000000 55766666557666666666666666666666666667556555555665555556666666666666666677777776777777766666666600000000500000000550000088888888 557666665576666666666666666666666666675565000056650000566656656666665d6676665665765566656665656600000000550000000550000088885058 557666665576666666666666666666666666675565077056650880566665566666d5d6667665d665765556656656566600000000550000005000000088005708 557665575576655766666666666666666557675565066056650220566665566666665d66765dddd5765555656666666600000000000000000000000080776770 5576655755766557666666666666666665576755650660566502205666566566666666667665d665765556656666666600000000000000000000000080777770 55766776557667766666666666666666677667556506605665022056666666666666666676665665765566656666666600055000000000000000000080677760 55766666557666666666666666666666666667556500005665000056666666666666666676666665766666656666666600000000000000000000000088067608 55766666557666666666666666666666666667556555555665555556666666666666666665555555655555556666666600000000000000000000000088000008 55766666557666666666666666666666666667556666666666666666666666667777777666666666777777767777777605550000005050000005500088888088 55766666557666666666666666655766666667556665566666666666666666667226622566656666766666657c1111c550005000050500000050000088885708 557666665576666666666666666557666666675566655666666666666666666672222225665d5666765555657c7777c500000000000000000005500088005708 55766666557666666666666666677666666667556656666665566556656565657622226566d6d666765555657c7777c500000000000000000000000080776770 55766666557666666666666666666666666667556666666665566556656565657622226566666666765555657cccccc500000000000000000000000080777770 55777777557777777777777777777777777777556666666666666666666666667222222566666666765555657cddddc500000000000000000000000080677760 55555555555555555555555555555555555555556666666666666666666666667226622566666666766666657cddcdc500000000000000000000000088067608 55555555555555555555555555555555555555556666666666666666666666666555555566666666655555556555555500000000000000000000000088000008 77777776777777766666666666666666666666666666666666666666666666660000000050500000000000000000000000000000000000000000000000000000 76655565766996656666666666666666666666666666666666666666666666660000000005000000000000000000000000000000000000000000000000000000 7ddd7565764444656666666666666666666666666666666666666666666666660000000050500000000000000000000000000000000000000000000000000000 7d7d7565764774656666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 7d7d5565764777656666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 7ddd6665764777656666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 76666665764777656666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 65555555655555556666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000c00000c00c0c00000000000000000000000000000000000000000000000000000000000000000000000000 000cc0000000cc00000000cc00cccc0000ccc0000c0c0000cc0c0c0c000cc0000000000000000000000000000000000000000000000000000000000000000000 00c00c00000c00c00000cc0c00c00c0000c0c0000c0c0c00cccccccc00cccc000000000000000000000000000000000000000000000000000000000000000000 0c0000c000c000c000cc000c00c00c0000c0c000c000c0c0cccccccc0cc00cc00000000000000000000000000000000000000000000000000000000000000000 c000000ccc00000ccc00000cccc00cccccc0ccccc000000cc0c0cccccc0000cc0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000c0c0c0c0000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 66666666666666666666666666666666666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __gff__ 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __map__ 0103020202020202020202021029481900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 21081616081616164809390a1a2b152400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1117171717171717172525252625121400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 11081616081616161b3536372827671400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 11171717171717170b2525252525251400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 110e121212121212121212121240411400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2129190b1b4848480b1b48383a2a3b2400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3133323232323232323232323232333400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0102020202020202020202020202020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2112121212121212121212121212122400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1012122525252512121212121212121400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1025121212121212121212121212121400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1012121212121212121212121212121400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1515151515151515151515151515151500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2525252525252525252525252525252500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3032323232323232323232323232323400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __sfx__ 011000102e3552d355273552635522355213551b3551a3552e3552d3552b3552d35526355273552b3552635500300000000000000000000000000000000000000000000000000000000000000000000000000000 00100010001550113500135011350015501135021350413506155091350a155091350615505135031350213500100000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __music__ 02 00014344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344 00 41424344