electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
evolutionary sequencers...
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
chuckbeginner



Joined: May 26, 2008
Posts: 29
Location: Asheville NC

PostPosted: Fri Dec 26, 2008 3:19 pm    Post subject: evolutionary sequencers...
Subject description: just a few silly programs I wrote.
Reply with quote  Mark this post and the followings unread

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).


CA XOR sequencer.ck
 Description:

Download
 Filename:  CA XOR sequencer.ck
 Filesize:  1.52 KB
 Downloaded:  215 Time(s)


Game Of Life Sequencer.ck
 Description:

Download
 Filename:  Game Of Life Sequencer.ck
 Filesize:  1.75 KB
 Downloaded:  220 Time(s)


CA XOR sequencer.ck
 Description:

Download
 Filename:  CA XOR sequencer.ck
 Filesize:  1.52 KB
 Downloaded:  169 Time(s)

Back to top
View user's profile Send private message
telstarmagikistferrari



Joined: Jun 16, 2008
Posts: 276
Location: Indianapolis, Indiana
Audio files: 43

PostPosted: Sun Dec 28, 2008 5:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Mon Dec 29, 2008 12:46 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Send e-mail
chuckbeginner



Joined: May 26, 2008
Posts: 29
Location: Asheville NC

PostPosted: Thu Jan 01, 2009 9:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Thu Jan 01, 2009 10:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

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!


Boolean_8bit.ck
 Description:

Download
 Filename:  Boolean_8bit.ck
 Filesize:  4.15 KB
 Downloaded:  202 Time(s)


Boolean_8bit.mp3
 Description:

Download
 Filename:  Boolean_8bit.mp3
 Filesize:  513.47 KB
 Downloaded:  356 Time(s)


_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
emSynth

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use