easy and effective ways of creating random/generative melodies
Hey
what are the easy and effective ways of creating random/generative melodies?
It really depends what you consider as a 'melody'.
Something like this melody
this is only a minor key tonic-subdominant-dominat progression but I want something similar with nice options to go out of 4-4 and out of key, but keep the flow
If you have M4L there are a good few examples of probability and randomly generated pitch, velocity and gate devices. There is also NWDLBOTS and if you only Max maybe look at the RTC Library.
Given the melody you provide:
Generate a row of numbers in the midi range you want the melody (between 0-127), save them as a list, output the numbers in the list sequentially, then rhythmically, ever bar, change the base number to change the key, send them to a scaler and then convert them to midi or frequency. The reason to save the numbers as a list is because the melody repeats. If you want a whole new melody generate another row of numbers. If you want a variation of the same melody look into Markov chains to mutate based on rules.
A good blog is the algorithmic composer.
Here's a commercial Max app I created (for a client) that generates random, but parameter-controlled, melodies for ear-training. Free full time-limited demo available. Windows only.
For your own tinkering, [zl] with your melodies is a good start, lots of things you can do with an otherwise straight-ahead list of pitches and rhythms.
Also some great stuff here
I spent quite a long time with a system which used a step sequencer and and an LFOs to trigger notes through VJ Manzo's modal triad object, this worked pretty well.
i think if "effective", "random" and "keeping the flow" is the whole concept, the concept should be extended a bit _before trying to patch that.
"The reason to save the numbers as a list is because the melody repeats."
Is there a non signal chucker like object?
These are hardly "high art" :), but might be instructive...
Yep. Chucker basically rearranges which slice of audio is played. Instead of playing the loop straight - slice 12345678 you get slice 34251768. Zl.scramble will do the same thing for lists. Like Seejayjames said if you want to mess with lists the the zl family of objects and vexpr are your friends.