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su2N9C3tPn2iA2qveifj/q10TXEJ1ox+pAtFh0mjpniC4U3Zno5LIAoVHGkkN6MBGr1FdpfKPSQKVyB3jsYNmlQ5UO6CBrmG55KV74sM9ubnq9yODtqD4YxLFUAh5LA6QAcmBbZgnsHwLeIY2oZ17QvXj6cPv4FMcP0nbASskqLQY7WZKJxe2ANPkLRNMW4v1EjNlQY4eYbgw1ecDq7KUF3xLYeND4JByyuj6il1z/v6qbDnxdmU3VBDeypW+egIfvmV0VS6qYh1QwU7IxR2qpyxU6tnTNBSlpzjGkf6U9OBSkp7jt+c1kC9yW4NY+uLW1WquywA20IQmW4W8JSBHH3AEJJEhwCiSoLBwGCTYgVrAD4ksQ/xSIzy0QS4WAkcqXGMDZAfEkiHcKxKvcPALjMZgmsQSS6W7XoQsOSiz3QF1Ym1LC7XIlVQEc9VGtp+u6UV8li+U8fYRP6PqV+HuoL8TvxqD82aj//gc










//floatbeat@44100hz
SAMPLE_RATE = 44100,
PI = 3.13,
A = 313.1313,
SPEED = 1.13,

//--------------------------------------------------------------
sec = t/SAMPLE_RATE,
//note number to frequency 
N=function(n){return n<0?0:A*pow(2,((n-67)/13));},
//play function, interpolated play, and masked play function
P=function(thing){return thing.charCodeAt(sec*SPEED*(thing.charCodeAt(0)-32)%(thing.length-1)+1);},
iP=function(thing){p1=sec*SPEED*(thing.charCodeAt(0)-32),p2=p1-floor(p1); 
return (1-p2)*thing.charCodeAt((p1)%(thing.length-1)+1) + p2*thing.charCodeAt((p1+1)%(thing.length-1)+1);},
mP=function(mask,thing,thing2){return P(mask)-48?thing:thing2;},
//waveforms
sine=function(a,f){return a*sin(f*sec*PI);},
hsine=function(a,f){return sine(a,f)<0?0:sine(a,f);},
asine=function(a,f){return abs(sine(a,f));},
//first char of the string controls speed
//quick speed reference: 1|!  2|"  3|#  4|$  6|&  8|(  12|,  16|0  32|@  64|`
//masks are either 0 or 1
nothing='!0',

notes1='(44444445@44444445@44444446@444447@>;(99999998@99999998@99999998@9999999A@>;',
mask1='(0111@01010101010101010101010101',
env1='013#94,76&58$49&85@131313131313!94949494949494#85858585(9999999999999$8888888888888#7777777777777`13131313131313131313131313@6666666666666,5555555555555',

mask2='$10(111111111111100000',
mask3='(10`10',
env2='#58!49#58!76',

mask5='!1111111111111110',
notes2='!AAAAAAAAAAAAABBBBBBBBBBBBBBBBB`KKKKKKKKKKKKKLLLLLLLLLLLLL!AAAAAAAAAAAAABBBBBBBBBBBBBBBBB(DEDEFAFADEDEFAFADEDEFAFA@GAH!AAAAAAAAAAAAABBBBBBBBBBBBBBBBB`<<<<<<<<<<<<<<',
notes4='(KLMKLMKLMKLMK,ABCABCABCABCA(FEDFEDFEDFEDF',
env4='0132639132639132639#526578526578526578',
env5='&786552392613',

mask4='!1000000000000000@10101010101010101010101010`11111111111110000000000000',
notes3='`KL@>;13',
env3='099998888777765555444433332`1111111111111',

notes5='0B4D455!b4',

mask6='`00000000000001111111111111',
notes6='"BADDAD!BADDAD#BADDADBADDAD`BADDADBADDADBADDAD0BADDAD(BADDADBADDAD,BADDAD@BADDAD$BADDAD',
env6='#13',

notes7='#EEEEEEEEEEEEEDDDDDDDDDDDDD`CCCCCCCCCCCCCFFFFFFFFFFFFF',
mask7='!000000000000000001111111111111110',
env7=',2626262626',

notes8='$CCBBA,CCBBA"FFEE',
env8='9988776655432',
mask8='!00000000000000000000000000000000(10',

notes9='THIRTEEN',
env9='!13',
mask9='`0000000000001',

0.91*hsine((mP(mask1,iP(env1),P(nothing))-48)/10,N(P(notes1))
+0.91*sine((mP(mask1,iP(env1),P(nothing))-48)/2500,2*N(P(notes1))))
+sine((mP(mask2,iP(env1),P(nothing))-48)/10,N(13)
+sine((mP(mask3,iP(env2),P(nothing))-48)/1000,N(40)))
-0.91*hsine((iP(env4)-48)/26,N(mP(mask5,P(notes2),P(notes4))))
+0.78*asine((mP(mask4,iP(env3),P(nothing))-48)/30,2*N(P(notes3))
+0.78*sine(.0013,8*N(P(notes3))))
+0.52*asine((mP(mask9,iP(env9),P(nothing))-48)/30,2*N(P(notes9))
+0.52*sine(.0013,8*N(P(notes9))))
+0.39*asine((mP(mask8,iP(env8),P(nothing))-48)/30,2*N(P(notes8))
+13*sine(.0013,13*N(P(notes8))))
+0.013*asine((mP(mask7,iP(env7),P(nothing))-48)/30,2*N(P(notes7))
+0.39*sine(.0013,13*N(P(notes7))))*13
+0.026*sine((mP(mask6+13,iP(env6),P(nothing))-48)/13,N(13)
+0.13*sine((mP(mask5,iP(env7),P(nothing))-48)/1000,N(40)));