Editing Bytebeat

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 97: Line 97:
 
  python -c'import sys;[sys.stdout.write(chr(( t|(((t>>1)%(8+(t>>14)%4))+(t>>6))              )%256)) for t in xrange(2**18)]'|aplay
 
  python -c'import sys;[sys.stdout.write(chr(( t|(((t>>1)%(8+(t>>14)%4))+(t>>6))              )%256)) for t in xrange(2**18)]'|aplay
 
  python -c'import sys;[sys.stdout.write(chr(( t*(3+(t>>10)%(4+(t>>11)%8))|(t>>5)            )%256)) for t in xrange(2**20)]'|aplay
 
  python -c'import sys;[sys.stdout.write(chr(( t*(3+(t>>10)%(4+(t>>11)%8))|(t>>5)            )%256)) for t in xrange(2**20)]'|aplay
python -c'import sys;[sys.stdout.write(chr(( t^(t+(t>>7))|t*((t>>(16-((t>>19)*4)))%8)      )%256)) for t in xrange(2**21)]'|aplay
 
python -c'import sys;[sys.stdout.write(chr(( t*(((t>>10)*(1+(t>>13)%7)*((t>>11)+(t>>12)+(t>>13)))%8) )%256)) for t in xrange(2**21)]'|aplay
 
python -c'import sys;[sys.stdout.write(chr(( (1+(t>>10)%7)*((t*(1+(t>>13)%4))%(24+(t>>14)*9%8)&16)*10 )%256))for t in xrange(2**20)]'|aplay
 
python -c'import sys;[sys.stdout.write(chr(( (((t>>((t>>16)%4))+t)&(t>>8))&(t>>6) )%256)) for t in xrange(2**19+2**18+2**16+2**12)]'|aplay
 
  
 
From @isislovecruft (#FYB):
 
From @isislovecruft (#FYB):
Line 107: Line 103:
 
  python -c'import sys;[sys.stdout.write(chr((((t*(t>>13|t>>8))|(t>>16)^t)-64)%256)) for t in xrange(2**18)]'|aplay
 
  python -c'import sys;[sys.stdout.write(chr((((t*(t>>13|t>>8))|(t>>16)^t)-64)%256)) for t in xrange(2**18)]'|aplay
  
=== in >140-character command lines, by @wiretapped ===
 
python -c'import sys;[sys.stdout.write(chr(( t*(1+((t>>10)*(43+(2*(t>>(15-((t>>16)%13)))%8)))%8)*(1+(t>>14)%4) )%256))for t in xrange(2**21)]'|aplay
 
python -c'import sys;[sys.stdout.write(chr( ((t*(1|(t>>10-((t>>17)%4))%8))&(8<<((t>>13)%4))*((1|(t>>15)%8))) *11*(t>>10) %256))for t in xrange(2**22)]'|aplay
 
python -c'import sys;[sys.stdout.write(chr(( (((t>>((t>>12)%4))+t*(1+(1+(t>>16)%6)*((t>>10))*(t>>11)%8))^(t>>13))^((t>>6))  )%256)) for t in xrange(2**21)]'|aplay
 
 
for OSX
 
for OSX
  
Line 117: Line 109:
 
   sox -r 8000 -c 1 -t u8 out.raw out.wav;
 
   sox -r 8000 -c 1 -t u8 out.raw out.wav;
 
   open out.wav
 
   open out.wav
 
OSX one-liner
 
 
  python -c'import sys; [sys.stdout.write(chr(((t*5&t>>7|t*9&t>>4|t*18&t/1024)|((t|7)>>5|(t|4)>>9))%256))for t in xrange(2**18)]' | sox -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio
 
  
 
=== an attempt with luajit ===
 
=== an attempt with luajit ===
Line 147: Line 135:
  
 
=== busybox awk ===
 
=== busybox awk ===
gawk might also work.
+
might work with gawk, dunno.   
other awks lack bitshift operations.
 
please add below if you test it.   
 
  
put this into your /dev/dsp pipe and smoke it.
+
throw it to /dev/dsp  
  
 
     #!/bin/busybox awk -f  
 
     #!/bin/busybox awk -f  
Line 160: Line 146:
 
     }
 
     }
  
or @ your shell prompt
+
of course awk will eat your processor alive.
 +
 
 +
alternately from your shell  
  
 
     seq 11111111 | busybox awk '{printf("%c",and($1,rshift($1,8)))}' > /dev/dsp
 
     seq 11111111 | busybox awk '{printf("%c",and($1,rshift($1,8)))}' > /dev/dsp
 +
 +
should also summon cthulhu
  
 
=== With Haskell! ===  
 
=== With Haskell! ===  
Line 172: Line 162:
 
* https://github.com/kragen/pytebeat - Python Bytebeat livecoding software in SDL
 
* https://github.com/kragen/pytebeat - Python Bytebeat livecoding software in SDL
 
* http://music.columbia.edu/~douglas/strange_things/?p=78 - Algorithmic beat rotation with the EchoNest API
 
* http://music.columbia.edu/~douglas/strange_things/?p=78 - Algorithmic beat rotation with the EchoNest API
 +
 +
[[Category:Python]]
 +
[[Category:Lua]]
 +
[[Category:Assembler]]

Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Noisebridge:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)