Author |
Message |
chuckbeginner
Joined: May 26, 2008 Posts: 29 Location: Asheville NC
|
Posted: Fri Dec 26, 2008 3:19 pm Post subject:
evolutionary sequencers... Subject description: just a few silly programs I wrote. |
 |
|
Hi everyone.
One of the ideas that sparked my interest in audio programming was the idea of creating self-modifying patterns for drum machines. I have finally written a few programs which evolve patterns based on cellular automata and other ideas--one uses randomly selected Wolfram rules with an XOR gate (so that two instruments don't try to play at the same time), while the other applies Conway's Game of Life with a hierarchy selection method. I am always open to suggestions and feedback.
I'm going to try a genetic algorithm next, where the fitness is determined by user input (how many times the space bar is pressed determines the fitness level of the beat currently being played, and beats evolve as time goes on).
Description: |
|
 Download |
Filename: |
CA XOR sequencer.ck |
Filesize: |
1.52 KB |
Downloaded: |
438 Time(s) |
Description: |
|
 Download |
Filename: |
Game Of Life Sequencer.ck |
Filesize: |
1.75 KB |
Downloaded: |
450 Time(s) |
Description: |
|
 Download |
Filename: |
CA XOR sequencer.ck |
Filesize: |
1.52 KB |
Downloaded: |
395 Time(s) |
|
|
Back to top
|
|
 |
telstarmagikistferrari

Joined: Jun 16, 2008 Posts: 275 Location: Indianapolis, Indiana
Audio files: 43
|
Posted: Sun Dec 28, 2008 5:16 pm Post subject:
|
 |
|
wow, thanks a lot for posting these.. I, er, 'have' Mathematica, or 'access' to it shall we say..
have you messed with music within Mathematica? |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Dec 29, 2008 12:46 am Post subject:
|
 |
|
Great ideas! I really like the genetic algorithm concept. You can also look into my Boolean Sequencer if you feel like it. You could do something intelligent on top of the Boolean Sequencer's underlying playing ability perhaps, i dunno just a thought. Good work! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
chuckbeginner
Joined: May 26, 2008 Posts: 29 Location: Asheville NC
|
Posted: Thu Jan 01, 2009 9:50 pm Post subject:
|
 |
|
I have played with Mathematica, though I find it very difficult to program (even for pure math work I prefer MATLAB), but that could just be an issue of familarity. Have you done anything with it? It doesn't seem to have many built-in sound primitives, just a sine wave and a .wav loader--or am I mistaken?
Inventor, you need to point me to your Boolean sequencer, I have tried looking at but haven't found it. What kind of Boolean logic does it use?
I would love to continue to develop this idea. Audio automata don't have the immediate impact of visual automata, but I still think they have potential. |
|
Back to top
|
|
 |
Inventor
Stream Operator

Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Thu Jan 01, 2009 10:12 pm Post subject:
|
 |
|
chuckbeginner wrote: | Inventor, you need to point me to your Boolean sequencer, I have tried looking at but haven't found it. What kind of Boolean logic does it use? |
chuckbeginner, here's a quick explanation of how a Boolean Sequencer works. The core of it is a binary counter, just counts from 0 to 255 and rolls over, or however many bits you want it to have. Next you have a complex (or sometimes simple) logic expression that takes the counter bits as input and produces an output bit. Whenever that bit is true you play a note, whenever it is false you do not.
The most common logic expression that I use is a sum of products, so you just AND a handful of bits, AND another handful of bits, and another and so on, then OR all of the ANDed terms.
Then for frequency you can add the number of ANDed terms that are active and add that to a MIDI base note, for example.
This technique produces very nice songs because the underlying Boolean nature of the note sequences is kind of inherent in nature so to speak. I often get repeating sequences that change a little from one time to the next. Also there are often dramatic pauses while lots of zeros stream by and hard driving rhythms as many ones appear.
You could use one of your techniques such as a genetic algorithm to specify the bits that are getting ANDed, that's the gene code.
I hope that explanation is clear enough. Attached is an example code that I wrote like a year ago or so, and a corresponding mp3 file. The way that I coded it is very inefficient. Nowadays when I want a boolean sequencer I just encode the bits as an integer and use bitwise operators in ChucK, it can be very efficient and does not require nested loops. I can provide an example of that coding if you like.
Cheers!
Description: |
|
 Download |
Filename: |
Boolean_8bit.ck |
Filesize: |
4.15 KB |
Downloaded: |
430 Time(s) |
Description: |
|
 Download |
Filename: |
Boolean_8bit.mp3 |
Filesize: |
513.47 KB |
Downloaded: |
999 Time(s) |
_________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
 |
|