Weighted choices in random melody

Jan 8, 2011 at 12:20am

Weighted choices in random melody

Hi all,

I’m wanting to generate a random melodic line, that clusters around specific degrees of the scale.
Each bang that the system receives creates a number between 0 & 11, but with the choice weighted towards 0, 2, 5, 7 for example. (transposition, forcing to a scale, and rhythm are handled seperately).

So – a continuous stream of single numbers, between 0 & 11, with variable amounts of weighting towards specific numbers.
(I have both Litter Pro & RTC-lib, but I can’t figure out how to use them for this – if indeed this is what I should do!)

I don’t have the math experience to make sense of this, so I’d be gratefu lfor any help offered!

Thanks

David

#54288
Jan 8, 2011 at 1:29am

I think you might find this article helpful.

http://algocomp.blogspot.com/2008/10/probability-distribution.html

#195354
Jan 8, 2011 at 1:39am

Litter or RTC is probably best, but there’s always this kinda simple thingamaging with itable:

– Pasted Max Patch, click to expand. –
#195355
Jan 8, 2011 at 2:47am

one way oif many would be to use random and then map the output to the notenumbers stored in a coll.

#195356
Jan 8, 2011 at 2:50am

fill the first 12 slots of a table with your weights and bang it to generate a weighted random.

#195357
Jan 8, 2011 at 11:24am

Thanks everybody.

Christopher – thanks for the reminder about algocomp – that article made a lot clear to me, as well as introducing a use of itable that I didn’t know!

I had a quick look through the following posts, but couldn’t see the one about using Markov chains to “melodify” the results. Have you written that? Or is there maybe a draft version I could look at? And the one about synchronous decision making?

Thanks

David

#195358
Jan 8, 2011 at 11:29am

A forum search also turned up a lnk to Markov chains on Algorithmic Composer -

http://algorithmiccomposer.blogspot.com/2010/05/algorithmic-composition-markov-chains.html

#195359

You must be logged in to reply to this topic.