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 
Live streaming at radio.electro-music.com

  host / artist show at your time
<on air> Jez Adventures in Sound
Please visit the chat
 Forum index » DIY Hardware and Software » Developers' Corner
Random Rhythm Generator - Probabilities
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [15 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
w minor



Joined: Sep 28, 2006
Posts: 12
Location: Reading, UK

PostPosted: Fri Sep 29, 2006 7:31 pm    Post subject: Random Rhythm Generator - Probabilities Reply with quote  Mark this post and the followings unread

Hi,

I'm in the process of programming an algorithmic composer that will generate rhythms as midi signals.

A random number generator feeds into each patch and some sort of probability determins weather or not that number triggers a note or not.

I would like to give these probabilities some sort of mathematical significance rather than just random values.

Something to do with the golden ration perhaps or the fibbonachi sequence? i haven't studied maths for years so my memory is a bit rusty and i'm having trouble figuring out which way to go with this particular aspect of my project...

i know this isn't really the place to ask but i wasn't sure where else to look... so anyone with any ideas or who could direct me to some starting points it would be very much appreciated.

Thanks

w minor
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Sep 30, 2006 11:17 am    Post subject: Reply with quote  Mark this post and the followings unread

You might want to have a look at breakage for inspiration:
http://www.blackholeprojector.com/

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Sat Sep 30, 2006 11:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow, breakage looks really cool.

BTW, 2 of the people listed in the "thanks" section are avid SuperCollider users (Nick Collins and Thor Magnusson), both of whom I had the pleasure to meet at the sc symposium in Birmingham this year. Nice chaps.

I'm also doing algorithmic rhythm programming in sc, will share some thoughts later. Right now I've a small project to try to finish today, so not much time for chitchat...

hjh

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Sep 30, 2006 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Cool!

I'm not so much into litteral algorithmic rithem creation but lately I've been quite deeply into using algorthems to modify hand-programed rithems (X0X style) based on live input (think breakdowns/ fill-in, etc). this is in ChucK.

Anyway, no time for me either tonight (I have to spin some records) so let's share notes later!

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kruhft



Joined: Oct 20, 2006
Posts: 50
Location: Canada
Audio files: 5

PostPosted: Sat Oct 21, 2006 3:30 pm    Post subject: Re: Random Rhythm Generator - Probabilities Reply with quote  Mark this post and the followings unread

w minor wrote:
Hi,

I'm in the process of programming an algorithmic composer that will generate rhythms as midi signals.

A random number generator feeds into each patch and some sort of probability determins weather or not that number triggers a note or not.

I would like to give these probabilities some sort of mathematical significance rather than just random values.


I base a lot of my songs on random numbers, or 'filtered' random numbers as I like to say. There's a chance that if you based your input sources on something more structured it might create something interesting, but I've found that just plain old random numbers and some range tweaking (min/max values, trigger frequencies, etc) give really decent results.

I find that random numbers give a good overall 'average' effect, rather than always totally rising like the fibbonacci sequence (in that case you'd have to do some modifications to the input values, thus losing the fibbonacci sequence anyways).

Don't get stuck in the idea of using Pi (&pi;) though; it may have a whole lot of mathematical significance, but it's just another random number generator in the end...

I'd say stick with random numbers and tweak them; randomness contains the most information out of any transmission and filtering it allows you to find the best part for your purposes, whether you know it's there at the start or not . It's not easy sometimes, but like anything, it gets easier with practice, and sometimes, I hear, it can almost be a substitute for creativity...

Good luck.

_________________
http://www.myspace.com/kruhft
http://kruhft.info
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
w minor



Joined: Sep 28, 2006
Posts: 12
Location: Reading, UK

PostPosted: Sat Oct 21, 2006 5:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

funny you should say all that, but that's exactly what i've been doing anyway. I decided to get my head round just building the thing before i worried about stuff like that. No time to fully explain now but will be backs soon to explain and post the patch

laters
Back to top
View user's profile Send private message
kruhft



Joined: Oct 20, 2006
Posts: 50
Location: Canada
Audio files: 5

PostPosted: Sat Oct 21, 2006 7:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

"Make everything as simple as possible, but no simpler" -- some guy that said that Very Happy
_________________
http://www.myspace.com/kruhft
http://kruhft.info
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
dobart



Joined: Feb 20, 2007
Posts: 10
Location: SEATTLE

PostPosted: Thu Oct 25, 2007 10:11 am    Post subject: Reply with quote  Mark this post and the followings unread

There are some interesting 'candle flicker' circuits that generate nonrepeating random signals; IE a 2mhz oscillator being sampled by a ~100hz oscillator through a flip-flop. I breadboard these to control vactrols to provide 'random' variation, and the samplng oscillator can be clocked to give discrete pulses or higher frequency noise. So far I've used 3 stages of this circuit in a 3-color LED lamp, which drives my LDR controlled instruments in cool ways. Another source of randomness can be feedback, where the output of the instrument feeds back into it in complex ways. I played a bit with that on this LDR controlled 556 (APC) +741 wsg VCF thingy, breaking the CD4040 and LFO driven LED feedback up through LDR gated oscillators:

http://www.youtube.com/watch?v=VGsdvYE9W4E

here's the 'flicker' circuit

http://members.shaw.ca/novotill/FireLightFlicker/
Back to top
View user's profile Send private message Visit poster's website
williamsharkey



Joined: Jul 31, 2005
Posts: 61
Location: usa

PostPosted: Tue Dec 18, 2007 9:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Markov chains are a good way to organize random jumps.

Even though they are called "chains", I think you should forget about the word "chain" for now. Try to visualize frogs jumping from lillypad to lillypad, that's what markov chains are all about.

Lets say there are two states: Snare, and Kick. Now, we program the machine with example probabilities:

After a kick, there is a 100% chance of a snare.
After a snare there is a 50% chance of a snare, and a 50% chance of a kick.

Here is what the Probability matrix would look like:

Code:
                c u r r e n t

                kick   snare
            +-----------------+
n   kick    |   0    |  0.5   |
e           +--------+--------+
x   snare   |   1    |  0.5   |
t           +--------+--------+


Is this not an elegant way to describe what is happening? It can be expanded for more states, perhaps a state for a woodblock, or a rest.

Math stuff:
1. Each column must add up to 1. That means there is a 100% chance that there is a "next time".

2. "Whats the probability that 100 beats from now, it will play a snare?!" Well, just take the matrix to the 100th power. Then add up the column called snare. That's the answer! This assumes a 50/50 chance of starting on snare/kick.

Last edited by williamsharkey on Tue Dec 18, 2007 9:43 am; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
williamsharkey



Joined: Jul 31, 2005
Posts: 61
Location: usa

PostPosted: Tue Dec 18, 2007 9:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I would like to give these probabilities some sort of mathematical significance rather than just random values.


I think that you should use probabilities that make interesting/compelling music. I think that the beauty of mathematical ratios would not be expressed when it is translated to trigger probabilities. Have you ever listened to an image mapped to a frequency-time plot? It does not matter if the image is of car or a ladybug, basically it sounds the same because the native meaning is lost in that translation.
Back to top
View user's profile Send private message AIM Address
jksuperstar



Joined: Aug 20, 2004
Posts: 2491
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Tue Dec 18, 2007 11:51 am    Post subject: Reply with quote  Mark this post and the followings unread

The markov chains could also be note lengths, or multiple things triggered by an event...after a whole note bass drum (or bass on 1 beat), you can have probabilities that intertwine the probabilities of other instruments. 50% chance of snare, 75% chance of hi-hat 16th notes, etc. Or have 2 markov chains triggering the same sound, so you get the complexity of 2 patterns mingling (and since the sound triggers, one pattern effects the other!).
Back to top
View user's profile Send private message Visit poster's website
frijitz



Joined: May 04, 2007
Posts: 1712
Location: NM USA
Audio files: 54

PostPosted: Wed Dec 19, 2007 7:42 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm exploring the use of chaos generators. Chaos in the correct mathematical sense, not the common sense of "random". Chaotic signals are deterministic but irregular. The amount of irreguarity depends on the mathematical system and its parameters. I have some simple demos of results from some hardware I have made over the past few years on my website:

http://home.comcast.net/~ijfritz/ch_over.htm
http://home.comcast.net/~ijfritz/ch_close.htm
http://home.comcast.net/~ijfritz/ch_circ.htm

Very Happy

Ian
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 17, 2008 10:33 am    Post subject: Re: Random Rhythm Generator - Probabilities Reply with quote  Mark this post and the followings unread

w minor wrote:
Hi,

I'm in the process of programming an algorithmic composer that will generate rhythms as midi signals.

A random number generator feeds into each patch and some sort of probability determins weather or not that number triggers a note or not.

I would like to give these probabilities some sort of mathematical significance rather than just random values.


Consider trying my Boolean Sequencer if your implementation supports logic input. You make a binary counter, then create logic expressions off the counter that say when the drums beat. Can sound really good without much logic. I say "my" because I rediscovered it, but it really originates back to the early days of synthesizers, I think. If you're interested I can explain more and there are posts about it. Good luck.

Oh, wait, you said MIDI, not transistors, sorry - then you could use ChucK to implement the sequencer, and I already have several files for that done, just add midi commands i guess.

Inventor
Back to top
View user's profile Send private message Send e-mail
plagal



Joined: Dec 28, 2007
Posts: 18
Location: South Carolina

PostPosted: Wed Jan 23, 2008 6:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just to add my 2 cents -


Maybe have a chain of a few arpeggiators that do switching in various ways such as a tempo change every-other time an arp plays. Same for delayed notes, overlaping, rests, muting, and number of notes each arp plays in turn, and so on...

There's nothing random about this, but its cool to get accurate results from playing with the controls.

BTW this has already been done, but perhaps someone can do it better -
but then, since it was me who already did it, I doubt it Very Happy
Back to top
View user's profile Send private message
Undergrind



Joined: Jan 19, 2008
Posts: 32
Location: Berlin by night
Audio files: 1

PostPosted: Mon Jan 28, 2008 12:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Haha

i just posted somthing about that here: http://electro-music.com/forum/topic-23494.html

without knowing this thread..

maybe melt them together??

_________________
www.myspace.com/undergrinder
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [15 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 » Developers' Corner
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
e-m mkii

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