diff options
author | bnewbold <bnewbold@robocracy.org> | 2012-12-19 18:40:20 +0100 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2012-12-19 18:40:20 +0100 |
commit | ff3a4e3ee0c27c38ca9a63a4fe6fe54221687e91 (patch) | |
tree | ef9d591646be4b0fb3ac4904686f2fad4b46b5a5 | |
parent | cd699af1e7d3e64556d2f9373db1d337cf14d2f5 (diff) | |
download | bytetunes-ff3a4e3ee0c27c38ca9a63a4fe6fe54221687e91.tar.gz bytetunes-ff3a4e3ee0c27c38ca9a63a4fe6fe54221687e91.zip |
restructure notes
-rw-r--r-- | NOTES | 49 | ||||
-rw-r--r-- | README (renamed from notes.txt) | 45 | ||||
-rw-r--r-- | TODO | 2 |
3 files changed, 66 insertions, 30 deletions
@@ -0,0 +1,49 @@ + +opcodes + note: no unary, increment, decrement + arthithmetic: + - * / % + bitwise: l r & | ^ ~ + "<<" is l, ">>" is r + all are atoms or binary operators, so recursive compilation to a forth-like? + order of ops: + ~ + * / % + + - + << >> + & + ^ + | + +final console interface: + #hashtag (exact) -> searches identica for tunes + @username (exact) -> parses identica feed for tunes + _1234... -> plays track from memory + expression -> compiles and plays expression + [else] -> searches greedily for a valid expression; if not found, ignores + +bytetros? + + + +void proc_token() + +int[32] itable +struct { node* car, nlist* cdr } nlist +tlist* tcons(token*, ) + +struct { } token +token[140] ttable +struct { char type, int* iptr, int * } node +ntable[140] +int h2i(char*) + + +s-exp method: +tokenize: glom numbers +preparse: match parens, return s-expr +parse: turn into prefix notation +validate: check against rules +compile: optionally remove trivial identities ("~~") and evaluate static expressions + +general method: +grammar parser, returns ast @@ -1,40 +1,24 @@ -opcodes - note: no unary, increment, decrement - arthithmetic: + - * / % - bitwise: l r & | ^ ~ - "<<" is l, ">>" is r - all are atoms or binary operators, so recursive compilation to a forth-like? - order of ops: - ~ - * / % - + - - << >> - & - ^ - | + _ _ _ + | |__ _ _| |_ ___| |_ _ _ _ __ ___ ___ + | '_ \| | | | __/ _ \ __| | | | '_ \ / _ \/ __| + | |_) | |_| | || __/ |_| |_| | | | | __/\__ \ + |_.__/ \__, |\__\___|\__|\__,_|_| |_|\___||___/ + |___/ -final console interface: - #hashtag (exact) -> searches identica for tunes - @username (exact) -> parses identica feed for tunes - _1234... -> plays track from memory - expression -> compiles and plays expression - [else] -> searches greedily for a valid expression; if not found, ignores -called "bytebeat". related to softsynths, demoscene. other buzzwords: Algostep, -googlecore, "shortcode compos", +players for bytebeat music. -bytetros? +### Example Tunes -original (to me): -echo "main(i){for(i=0;;i++)putchar((i*(i>>8|i>>9)&46&i>>8)^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay +the original (to me): -favorite: - (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1 + echo "main(i){for(i=0;;i++)putchar((i*(i>>8|i>>9)&46&i>>8)^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay -from http://countercomplex.blogspot.de/2011/10/algorithmic-symphonies-from-one-line-of.html +my favorite (thus far): + (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1 - main(t){for(t=0;;t++)putchar(t*(((t>>12)|(t>>8))&(63&(t>>4))));} +### References projects: http://wurstcaptures.untergrund.net/music/ @@ -42,7 +26,7 @@ projects: http://hackaday.com/2011/11/01/annoy-your-sound-guy-even-more/ (Noiseplug HaD) https://github.com/erlehmann/libglitch opcodes: http://paste.ubuntu.com/733764/ - http://0xa.kuri.mu/2011/10/09/bitop-videos/ + HTTP://0Xa.kuri.mu/2011/10/09/bitop-videos/ GlitchMachine: http://www.umlautllama.com/w2/?action=view&page=GlitchMachine listings: @@ -64,3 +48,4 @@ similar: http://yaxu.org/haskell-hack/ http://sunsite.univie.ac.at/Mozart/dice/ http://music.columbia.edu/~douglas/strange_things/?p=78 + @@ -0,0 +1,2 @@ +- handle negative numbers +- use libc tokenization? |