Skip to content

Instantly share code, notes, and snippets.

@Eiyeron
Last active December 24, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eiyeron/6881977 to your computer and use it in GitHub Desktop.
Save Eiyeron/6881977 to your computer and use it in GitHub Desktop.
Long Line Theory, made readable for humans. Original : http://www.pouet.net/topic.php?which=8357&page=13 Render (original, but the result is the same) : http://bit.ly/ny4Ds3
intro= ((sb=t>0xffff)&0),
background=
(((y=Math.pow(2,[15,15,23,8][t>>14&3]/12))&0)
+(
((y*t*0.241)&127-64)
+((y*t*0.25)&127-64)
)*1.2),
drum=
(
((a=1-(t&0x7ff)/0x7ff)&0)
+(((5*t&0x7ff)*a)&255-127)
*((0x53232323>>(t>>11&31))&1)*a*1.0
+(((d=(14*t*t^t)&0x7ff)*a)&255-128)
*((0xa444c444>>(t>>11&31))&1)*a*1.5
+((a*a*d*(t>>9&1)&0xff-0x80)*0.1337)
)*sb,
instrument=
+((g=(t&0x7ff)/0x7ff)&0)
+((g=1-(g*g))&0)
+((h=Math.pow(2,([[15,18,17,17,17,17,999,999,22,22,999,18,999,15,20,22],[20,18,17,17,10,10,999,999,20,22,20,18,17,18,17,10]][((t>>14&3)>2)&1][t>>10&15])/12))&0)
+(
((h*t&31)+(h*t*1.992&31)+(h*t*.497&31)+(h*t*0.977&31)-64)
)*g*2.0*sb,
intro+
Math.max(
Math.min(
instrument+background+drum
,127),-128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment