[Haskell-beginners] How to find a "best alternative"

Martin Drautzburg Martin.Drautzburg at web.de
Sun Aug 14 21:11:21 CEST 2011


Hello all,

I want to write transformations on musical motives and I came upon the 
following algorithmic question:

For every note of the original motiv I can compute a sequence of transformend 
notes which are ordered by their "fitness" with respect of a certain 
criterion. If might for example compute the "fitness with respect to harmonic 
function". I have a whole set of such criteria. So in the end the questions 
are:

what should the first transformend note be? Harmonic function tells me it 
should be a G, but could also be a C or a D ..., some other function tells me 
it should be a C, but could also be a C# or a Cb. 

It kind of reminds me of the Levenshtein Disance, but this gives me a 
"distance" from two samples. I need a function which returns a new sample when 
one sample is given, i.e. the one with the smallest distance.

Any idea in which direction is shall focus my thoughts?


-- 
Martin



More information about the Beginners mailing list