great! I have done something like this for SC, it doesn't run on the
current version though. Anyway, if you are interested, check this:
http://swiki.hfbk-hamburg.de:8888/MusicTechnology/284
there is also a Prewrite in sc that does lindenmeyer systems.
I'll see if I can try your note scheme in this..
Prewrite
(
5.do { arg i;
a = Prewrite($1,
( $1: "o+1-1" ), i+1);
x = a.asStream;
100.do({ x.next.post });
Char.nl.post;
}
)
o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1o+1-1
o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o+1-1o+o+1-1-o
o+o+o+1-1-o+1-1-o+o+1-1-o+1-1o+o+o+1-1-o+1-1-o+o+1-1-o+1-1o+o+o+1-1-o+1-1-o+o+1-1-o+1-1o+o+o+1-1-o+1
o+o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+o+1-1-o+1-1-o+o+1-1-o+1-1o+o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+o+1
o+o+o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+
>A little report on livecoding lsystem descriptions of melodies.
>
>I'm not sure this is manefesto compliant or even counts as code, but I've
>recently got a simple livecoding thing going on in some of my music software.
>You basically enter the axiom and rules of an lsystem which are then expanded
>as the melody is playing.
>
>There is a simple score language the lsystem produces where:
>o = note on
>+ = up one note (the exact frequency change is configured elsewhere)
>- = down one note
>! = reset to root note
>. = rest one beat
>
>and numeric tokens are used as rule replacements for the lsystem.
>
>so:
>
>axiom = 1
>rule '1' = o+1-1
>
>expands to:
>
>generation 1: o+o+1-1-o+1-1
>generation 2: o+o+o+1-1-o+1-1-o+o+1-1-o+1-1
>generation 3: o+o+o+o+1-1-o+1-1-o+o+1-1-o+1-1-o+o+o+1-1-o+1-1-o+o+1-1-o+1-1
>
>well, you get the idea (just basic lsystem search/replace) :)
>
>the results are actually quite nice, and playing it live feels pretty much
>like programming to me. simple rules expand into quite complex melodies
>quickly. I've used this lsystem score idea before, but in a genetic
>programming environment where you had a choice of lsystem rules to breed from
>- but doing it by hand is more satisfying (if a little slower)
>
>cheers,
>
>dave
--
.
Received on Tue Jun 01 2004 - 20:46:15 BST