From ff3a4e3ee0c27c38ca9a63a4fe6fe54221687e91 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 19 Dec 2012 18:40:20 +0100 Subject: restructure notes --- NOTES | 49 +++++++++++++++++++++++++++++++++++++++++++++++ README | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ TODO | 2 ++ notes.txt | 66 --------------------------------------------------------------- 4 files changed, 102 insertions(+), 66 deletions(-) create mode 100644 NOTES create mode 100644 README create mode 100644 TODO delete mode 100644 notes.txt diff --git a/NOTES b/NOTES new file mode 100644 index 0000000..f49dfe5 --- /dev/null +++ b/NOTES @@ -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 diff --git a/README b/README new file mode 100644 index 0000000..fa407af --- /dev/null +++ b/README @@ -0,0 +1,51 @@ + + _ _ _ + | |__ _ _| |_ ___| |_ _ _ _ __ ___ ___ + | '_ \| | | | __/ _ \ __| | | | '_ \ / _ \/ __| + | |_) | |_| | || __/ |_| |_| | | | | __/\__ \ + |_.__/ \__, |\__\___|\__|\__,_|_| |_|\___||___/ + |___/ + + +players for bytebeat music. + +### Example Tunes + +the 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 + +my favorite (thus far): + (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1 + +### References + +projects: + http://wurstcaptures.untergrund.net/music/ + http://shackspace.de/?p=2509 (The Noiseplug) + 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/ + GlitchMachine: http://www.umlautllama.com/w2/?action=view&page=GlitchMachine + +listings: + http://shackspace.de/wiki/doku.php?id=project:algorithmicsoundscapes + http://pelulamu.net/countercomplex/music_formula_collection.txt + +commentary, other: + http://countercomplex.blogspot.de/2011/10/algorithmic-symphonies-from-one-line-of.html + http://countercomplex.blogspot.de/2011/10/some-deep-analysis-of-one-line-music.html + http://countercomplex.blogspot.de/2011/06/16-byte-frontier-extreme-results-from.html + http://canonical.org/~kragen/bytebeat/ + http://pouet.net/topic.php?which=8357 + "Discovering novel computer music techniques by exploring the space of short computer programs" + http://arxiv.org/abs/1112.1368 + http://royal-paw.com/2012/01/bytebeats-in-c-and-python-generative-symphonies-from-extremely-small-programs/ + http://www.metafilter.com/111959/Todays-formulaic-music + +similar: + http://yaxu.org/haskell-hack/ + http://sunsite.univie.ac.at/Mozart/dice/ + http://music.columbia.edu/~douglas/strange_things/?p=78 + diff --git a/TODO b/TODO new file mode 100644 index 0000000..f9c12bf --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +- handle negative numbers +- use libc tokenization? diff --git a/notes.txt b/notes.txt deleted file mode 100644 index 102da5a..0000000 --- a/notes.txt +++ /dev/null @@ -1,66 +0,0 @@ - -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", - -bytetros? - -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 - -favorite: - (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1 - -from http://countercomplex.blogspot.de/2011/10/algorithmic-symphonies-from-one-line-of.html - - main(t){for(t=0;;t++)putchar(t*(((t>>12)|(t>>8))&(63&(t>>4))));} - -projects: - http://wurstcaptures.untergrund.net/music/ - http://shackspace.de/?p=2509 (The Noiseplug) - 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/ - GlitchMachine: http://www.umlautllama.com/w2/?action=view&page=GlitchMachine - -listings: - http://shackspace.de/wiki/doku.php?id=project:algorithmicsoundscapes - http://pelulamu.net/countercomplex/music_formula_collection.txt - -commentary, other: - http://countercomplex.blogspot.de/2011/10/algorithmic-symphonies-from-one-line-of.html - http://countercomplex.blogspot.de/2011/10/some-deep-analysis-of-one-line-music.html - http://countercomplex.blogspot.de/2011/06/16-byte-frontier-extreme-results-from.html - http://canonical.org/~kragen/bytebeat/ - http://pouet.net/topic.php?which=8357 - "Discovering novel computer music techniques by exploring the space of short computer programs" - http://arxiv.org/abs/1112.1368 - http://royal-paw.com/2012/01/bytebeats-in-c-and-python-generative-symphonies-from-extremely-small-programs/ - http://www.metafilter.com/111959/Todays-formulaic-music - -similar: - http://yaxu.org/haskell-hack/ - http://sunsite.univie.ac.at/Mozart/dice/ - http://music.columbia.edu/~douglas/strange_things/?p=78 -- cgit v1.2.3