Skip to content

Instantly share code, notes, and snippets.

@octatone
Last active December 18, 2015 20:29
Show Gist options
  • Save octatone/5840817 to your computer and use it in GitHub Desktop.
Save octatone/5840817 to your computer and use it in GitHub Desktop.
bytebeats
// http://wurstcaptures.untergrund.net/music/
t * ((t>>8 | t >>2) &t>>>1 >> 12);
l: t * ((t>>32 | t >>12) &12 &t>>>0 >> 7) + t
r: t * ((t>>32 | t >>12) &12 &t>>>1 >> 7) + t
l: t * ((t>>32 | t >>12 | t >> 3) &3 &t>>>0 >> 9) >> (t/8000 * 30)
r: t * ((t>>32 | t >>12 | t >> 3) &6 &t>>>1 >> 9) >> (t/8000 * 30)
// 44100
l: t * ((t>>32 | t >>12 | t >>3) &12 &t>>>0 >> 9) >> (t/44100 * 120)
r: t * ((t>>32 | t >>12 | t >>3) &13 &t>>>1 >> 7) >> (t/441000 * 120)
//8000
t * ((t>>32 | t >>12 | t >>4 | t << 3) &9 &t>>>0 >> 12) >> (t/8000 * 160)
t * ((t>>32 | t >>12 | t >>3 | t << 4) &7 &t>>>1 >> 12) >> (t/8000 * 160)
//8000
t * ((t>>32 | t >>12 | t >>4 | t << 3) &63 &t>>>0 >> 1) >> (t/441000 * 30)
t * ((t>>32 | t >>12 | t >>3 | t << 4) &63 &t>>>1 >> 1) >> (t/441000 * 30)
// 22500
t * ((t>>32 | t >>12 | t >> 3) &3 &t>>>0 >> 9) >> (t/8000 * 15) ^ t * ((t>>32 | t >>12 | t >>3) &12 &t>>>0 >> 9) >> (t/8000 * 60)
t * ((t>>32 | t >>12 | t >> 3) &3 &t>>>1 >> 9) >> (t/8000 * 15) ^ t * ((t>>32 | t >>12 | t >>3) &12 &t>>>1 >> 9) >> (t/8000 * 60)
t * ((t>>32 | t >>12 | t >> 3) &63 &t>>>0 >> 9) >> (t/8000 * 15) ^ t * ((t>>32 | t >>12 | t >>3) &12 &t>>>0 >> 9) >> (t/8000 * 60)
t * ((t>>32 | t >>12 | t >> 3) &63 &t>>>1 >> 9) >> (t/8000 * 15) ^ t * ((t>>32 | t >>12 | t >>3) &12 &t>>>1 >> 9) >> (t/8000 * 60)
t << ((t>>32 | t >>12 | t >> 3) &63 &t>>>0 >> 9)
t << ((t>>32 | t >>12 | t >> 3) &63 &t>>>1 >> 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment