markov applied to music? (was Re: markov.py)

Terry Hancock hancock at earthlink.net
Tue Jan 23 13:46:40 EST 2001


python-list-request at python.org wrote:
> "Carel Fellinger" <cfelling at iae.nl> wrote in message
> news:94ides$6t2$1 at animus.fel.iae.nl...
>     [snip]
> > well I don't, so please enlighten me: what's a markov chain?
> 
> A somewhat complex (but complete, correct, concise) definition
> can be found at http://pespmc1.vub.ac.be/ASC/MARKOV_CHAIN.html.
> 
> A more readable (and equally concise, but a bit less rigorous)
> definition is at http://rkb.home.cern.ch/rkb/AN16pp/node162.html.
> 
> If you really want to look into this, you may start at
> http://www.math.nyu.edu/phd_students/campbelm/stuff/random/markov.html
> which is a collection of (a few) bibliographical references and
> (a lot of) web links on Markov chains and Hidden Markov Models.

Hi,
I know almost nothing about Markov chains (though I've seen the
output before), but they were recommended to me as a possible
way to generate more complex game music based on a static score:
i.e. write and sequence the score, and then apply the Markov
chains to the sequencer file (or almost equivalently the notes
of the score).  The "loss of sense" problem is somewhat eleviated
since music doesn't usually have much linear sense to start with.
(Also the artist will know about this in advance).

It does however, have different moods, and it seems that it might
make sense to take a score with a gradually changing mood and use
a sliding window to determine what portion of the score is used,
thus allowing a "mood" parameter to control the output.  Whenever
the mood changes, the markov chain generator would have to 
re-analyze the new window and start generating output.

I presume the Markov algorithm would take care of the transition
problem, so that it doesn't just sound like random clips all
hashed together.

Would it be feasible to use the markov.py module to do this sort
of thing?

-- 
Terry Hancock
hancock at earthlink.net




More information about the Python-list mailing list