terça-feira, 11 de novembro de 2014

Music Script: Death Note - Light's Theme


1:  loop=true -- set loop=false for playing once  
2:  outlets_count=7  
3:  function s(n)return("r16"):rep(n)end  
4:  t={"t128 r1",s(128),0,"o6","d16",s(129),"o7","d8","d1","r8","r1","r2","r4","d2",s(192),"c16#",s(193),"c8#","c1#","r16",s(34),s(35),"d4","e8","f16","e16","c16","g16","o4","a16",s(301),"o3","a1","o5","e1","c2","a2","g2",s(58),"g4","g8","o2","a4",s(79),s(382),"e2",s(576),"a8","c4","e4","c8",s(590),s(608),s(200),s(201),"f2",s(190),"a4#",s(392),s(400),1,"a2#","a8#","f8","f4","c1",s(60),s(66),s(80),s(767),s(256),s(266)}  
5:  tg={"t128 r1","o4",0,"d8","o5","e8","a8","f8","g8","o3","c8","c8#","a8#","r1",s(66),s(256),"r8"}  
6:  function d(a)k=""a:gsub(".",function(c)k=k..t[c:byte()-31]end)return k end  
7:  function dg(a)k=""a:gsub(".",function(c)k=k..tg[c:byte()-31]end)return k end  
8:  r={}  
9:  function play()  
10:  repeat  
11:  for c=0,7 do H.PlaySound(c,r[c]) end  
12:  if(loop)then coroutine.yield() end  
13:  until(not loop)  
14:  end  
15:  co = coroutine.create(play)  
16:  function OnInit()  
17:  if(loop)then H.EnableSoundCallback(1) end  
18:  H.SetOutletCount(outlets_count)  
19:  setup()  
20:  coroutine.resume(co)  
21:  end  
22:  z=0  
23:  note_to_num={["c"]=1,["d"]=2,["e"]=3,["f"]=4,["g"]=5,["a"]=6,["b"]=7}  
24:  function OnSoundPlay(channel, note, len, label)  
25:  if(note ~= nil and note_to_num[note] ~= nil)  
26:  then   
27:   n = note_to_num[note]  
28:   rc = math.random(0, 255)  
29:   gc = math.random(0, 255)  
30:   bc = math.random(0, 255)  
31:   H.GlowNow(n, 1.8/len, rc, gc, bc)  
32:  end    
33:  if(label==9)then z=z+1 if(z>7)then  
34:  z=0 coroutine.resume(co) end end  
35:  end  
36:  function setup()  
37:  H.SetInstrument(0, H.Instrument.aguitar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#!&$()&$%*!&$'*!&$&)&$%*!&$'*!&$()&$%*!&$'*!&$&)&$%*!&$'%*!&-0")  
39:  r[1]=d(" !#$$$$$$$$$$$$&'#(*+,-///////////3&24#$$$$$$$$$$$$$3&(*+#66'/////////////3&2*+,#6788888888888888888888888888888888999999::::::::::::::::::::$$$$$988888888888888888888888888;;;;;;999999999999999<=?@&-C#DED&C#@IJ?O<7O7?OIJ<O7?O<O7?J=,3AR<O7?JI@!#$$$$$$$$$$$$$3&(*+,#-///////////3&24#$$$$$$$$$$$$$3&(*+#66'/////////////3&2*+,#67WA6'66'-IJ?O<7?O<7?OIJ?O<7?O<O7?J#WA6'66'6#GIJ?O<7?O<7?OIJ?O<7?O<O7?J#WA6'66'-IJ?O<7?O<7?OIJ?O<7?O<O7?J#WA6'66'6#GIJ?O<7?O<7?OI@)&-C#DED&C#@IJ?O<7O7?OIJ<O7?O<O7?J=,3AR<O7?JI@f<(")..s(2)  
40:  r[2]=d(" %&$$$$$$$$$$$)(*+,-//////////1#25&$$$$$$$$$$$'#(*+&66'3///////////1#2*+,&67388888888888888888888888888888888999999::::::::::::::::::::$$$$9988888888888888888888888888;;;;;;99999999999999#9A:K#CPAR?JAPRPRR?JO<7ACC)&'''%$$$$$$$$$$$'#(*+,&-//////////1#25&$$$$$$$$$$$'#(*+&66'3///////////1#2*+,&67-A`?^A``?^AW?J)#C?J<O+,#]A`?^A``?^A`&G?J,#PAR?J<O+,#]A`?^A``?^AW?J)#C?J<O+,#]A`?^A``?^A`&G?J)AR<O,#abGH?J,&PAR?JAPRPRR?JO<7ACC)&'''f<=A$9")..s(15)  
41:  r[3]=d(" .#//>&9ABF#GH?J,&P)APQ)Q7)?=e#CAMMg@")  
42:  r[4]=d(" 0&/L#MQ)AQJ)JO)CMMU#//X&W#6)66)-Q)MAPPRR#67&-#6)66)6?Y#M<O,#PAPRR#67&-#6)66)-Q)MAPPRR#67&-#6)66)6?Y#MAPR?@c#CP)APQ)Q7)?=")..s(305)  
43:  r[5]=d(" N#DJ)AJ#P)PR)AMDDV&/XIY?^<_?^<_)IY?^<_)^_?Y#J)DAQQ)7&67W?^<_)IY?^<_)^_,#DAP)PQ)7&67W?^<_)IY?^<_)^_?Y#J)DAQQ)7&67W?^<_)IY?^<_)^_,#DAQ)ac#MQ)AQJ)JO)CDD")..s(282)  
44:  r[6]=d(" S#P+,)AD#CCZ?Y,AY)?Y<^+,&Q)CAJJ)O,)IY?^<_^,AY<^+,&MAQ)QJ)O,)IY?^<_^,AY<^+,&Q)CAJJ)O,)IY?^<_^,AY<^+,&MAJ)Bc#DJ)AJ#P)PR)AM#CC")..s(282)  
45:  r[7]=d(" T#C,)AR[#]<^,AYY)]&P,<O)AR#PP)R,)?Y,AY)?YAY)Y,&CAJ)J#P)R,)?Y,AY)?YAY)]&P,<O)AR#PP)R,)?Y,AY)?YAY)Y,&C#P)A@d#P+,)AD,)R")..s(290)  
46:  if(loop)then for c=0,7 do r[c]=r[c].."r2r4r8[9]"end end  
47:  end  

0 comentários: