viterbi plugin (Composition by dust)

Author: dust
License: Public Domain
Date: 2011.05.03
Compatibility: 10.5, 10.6
Required plugins:

this is a viterbi plugin. its basis is the hidden markov model. my intention for this patch is to create phrasal stochastic music based on an observed sequence, in a second order markov chain.

you can see the weighting i'm using in the trelis diagram when you load the example. first you have your hidden states. you set those to most likely known order. lets just use abcd for now.

i put minimal weighting on the state returning back to itself. meaning if i play note A more than likely i'm not going to play note A right after i all ready played it. seeing this is for phrasal music.

a flow chart or trelis diagram of the graph traversal is helpful when deciding on how much probabilities to weight.

next you have your observed sequence. lets call that 1234. if i play in a sequence of 1234 the plugin will output the vertbi predicted path. this is the most probable traversed path. in the case of states abcd with observations 1234 with my weighting the next predicted note will be be the first index of the predicted v path which is c. a sequence of 1143 will produce a different path resulting in a a new predicted state.

at leaste those are my intentions for the viterbi plugin. viterbi is used heavily in convolution codes and is in every cell phone made. you can read about it here.

hopefully someone may have some interesting use for this. i'm putting together the music part now. here is a basic example with source.

dust's picture
Re: viterbi plugin (Composition by dust)

here is the plugin and source to build... its required to run the above patch.

viterbi.zip194.93 KB