non-random use of random numbers?
Author: cartesia on May 06 2008
Viewed 782 times. 10 people liked this blog. You can rate it below if you haven't already.
People who enjoyed reading this: delete, yghartsyrt, sAMsKi, bla, Roshi, EsromCole, mlbot, jp, SenorFrio, eyesnine
--> That's probably not a good description,

I'm wondering if anyone can point me to research/articles which describe use of random numbers in pattern-generation. . like

Well OK so, say I am sequencing the notes of a synth (so in a way it is not random), but that synth contains an element of randomness ...

Current specific example of mine - I have sequenced chords, and set the synth up so that one osc is one octave below the other, and the LFO is set to modulate filter on random (the filter and lfo amount being setup so that it filters various notes in the chords - producing the appearance of a melody)

The melody sounds remarkably good no longer how long I leave it running, even though it is apparently random when you stop and think about it. . is my random number generator not random? or is there some kind of explanation of all this apparent order/progression that is emerging based on the base sequence (which is only 3 chords held over 4 bars total - 1, 1, 2)

I guess something along the lines of the theory behind livecut - which is somewhat random (probabilities) but somewhat algorithmic - and due to this combination seems to give off a very 'real' feeling (when settings are set rright)

Or is it perhaps some phenomenon of human perception, that the brain can be tricked without using any actual logical progression? which I would be equally keen reading on.

Basically I want to further investigate this area (yes ... id much rather program sections of randomness than actual notes) , and want to know what has been done before me to save reinventing the wheel.
Read cartesia's other blogs.cartesia's Recent Blogs
Comments

1 | 2
yghartsyrt said: "that's because he's a recursive function of himself."


link

flies said: "
yghartsyrt said: "that's because he's a recursive function of himself."


link"


That makes my brain hurt

wow for a second the whole universe stood still

another good book on these sort of things is "the computational beauty of nature" which is raelly good

Thanks for the infos people...

Although I never connected it with music, I used to be incredibly interesting in programming AI/'life' etc. . . That was long before I had even heard electronic music really... I guess maybe this interest harks back to then,

I agree that a purposefully arranged complex composition can be more interesting .. . But this kind of emerging melody from randomness I find pretty amazing. .. And at the very least it gave me the idea for the melody of a non-random track, (noramlly I suck at melody writing, even though I *love* complex melodies, so having something that shoots ideas at me so i can grab bits i like, write them down, etc. . is great)

Will look into some of the books etc,

emergence is probably the best word to describe what I'm thinking of here.

For those that were wondering, I was using:
Imposcar - 2 saw oscillators, one an octave below the other, 'random' LFO with +ive filter modulation (set to 8 cycles per beat on a 85bpm track.. so it is synchronized in a way), low cutoff, highish resonance. The relatively high filter envelope depth - Long sustained envelopes, little to no decay (filters balanced to cut the point where the notes started to 'emerge'.

One seemingly important parameter is the 'filter separation' - I have no idea what it is, but it has a definite impact on the emergence of the notes, and is measured in semitones which leads me to think its linked. Can anyone explain what exactly this is?

Admittedly when I stop and analyse it, there is really no structure beyond the limit of notes that are played, but I'm not really bothered about the specifics - as far as I'm concerned, if it achieves the right feeling in the mind (which it wont always do at a guess), it serves its purpose.

I cant name the chords but they were each 4 notes, with just one note varying in each chord.

Heres an mp3... kinda reminds me of ochre - esign
link

btw theres no arpeggiator on .. i just realised it sounds very like it does.

heres another for people that dont like sparkly happy sounds...

the drums are just running through livecut to try and fit the randomness of it all. .. Sometimes the lfo isnt in sync with the rhythm beacuse its set to do triplets (6 cycles per beat) , I think automating the LFO rate youd be able to fix this up though, switch between say 8 or 6 etc depending on the rest of the track.

This one is 2 PWM waves and about 1/3 noise with a bandpass filter random LFO mod..no envelope work on amp or filter.
link

you can do a lot with a couple of dice, a piece of paper and a pencil
fakeBlooper said: "you can do a lot with a couple of dice, a piece of paper and a pencil"


my wizard uses his +1 supersaw oscillator on his filter of screeching doom to summon a level 40 fat beat

^lol

lematt said: "i tend to love Markov chains because it gives ever changing states/behaviours.
bla's solution is allright too, 'cause you can decide of the rythm and/or the melody, but apply modulations on chosen aspects of the sound character."


question: what exactly does a markov chain look like, musically? is it just a recursive function with particular constants or what? i don't get it.

a first order markov chain would be like this:

you play a c major chord, and then there's a probability that it will go to any other specific chord. maybe 25% to f major, 25% to g major, 10% to d minor, etc.

an "n-order" markov chain reads the last "n" states and adjusts the probability of the next chord it goes to. in a second order markov, for instance, if a chord has just gone c major to f major, there's a probability that it will go to g major that is different from the probability if the last two chords had been b flat major to f major.

oh okay. i understand what you're getting at. cool. so it is a form of recursion.

lets say there are 4 states in the markov chain : C, D, E, F (chord names) the markov chain for this system is a 4 x 4 matrix that looks like this:

C D E F
C 00 25 75 00
D 01 00 99 00
E 01 99 00 00
F 25 25 25 25

so if you are playing C there is a 25% chance you will switch to D, 75% chance you will switch to E. in statistics one would generally use normal numbers (0..1) instead of percentages, but thats pretty much all there is to it from what i remember. you can have variables instead of percentages to spice things up.

its neat because it can describe discrete cyclic functions well. notice how this chain 'bounces' between D and E, every now and again resetting back to C. (it never goes to F unless it starts there). problem is if you want something like 8 chords with say 4 different phrasings you're looking at a 32 x 32 matrix. thats a lot of programming. melodies get even more complex. yes, people have written markov chains that simulate bach, but i'd say this particular area of algorithmic composition is an artistic dead end. they're good for basic parameters with a small set of possible states.

as for recursive algorithms... some of my tracks have some stuff like that happening. i don't know. i kind of came to the realization that looking for a magic formula was pointless... we had a thread like this before, i thought ricemutt started it but i guess not. i would try to spend as much time as possible honing your musical instincts and as little as possible punching in numbers. still, i'm probably as guilty of that as anyone...

i'd try writing themes/hooks and finding interesting ways of mashing them together algorithmically without losing the feel of the original. shuffle/transpose/reverse, you get the idea. computers are not very creative, but they can do some of the dirty work for you.

1 | 2

Register / login
You must be a member to reply or post. signup or login