A way to analyze melodies and harmony with Max

_opal ✧₊⁺'s icon

Hi there, this is my first post here. I hope I am explaining thing right.


So,

I am looking for a way to analyze the evolution of melody and harmony in musical corpora.

I was thinking about using the [anal] object to measure how many times a note go to another and extract some probabilities out of that. I believe this can then be used to generate variations or mimic the style of the analyzed melodies. It might be too simplistic tho. I don't know. I think it can work nicely for a single song analysis but the probs extracted wouldn't be rich enough to produce interesting variations.

I think there is another problem with this way of analyzing. It doesn't catch the harmonic context of the melodies. And if I were to analyze a big collection of songs with each its own root note and modulations, my probability model would be completely unusable.

This project is not very mature rn. This post is more a call for references or examples from the community. If you have any idea of a method I could use or anything, I'll take it.

Take care,

✧₊⁺

Roman Thilenius's icon

statistics about how often a note event appears go in the right direction, but what you seem to be looking for is statistics about what kind of event follows what kind of event with a certain probability.

search terms: -> markov chain, -> state/transition table

for this kind of stuff the complexity of the analysis can be extended in various ways.

_opal ✧₊⁺'s icon

Yeah, I began to work with Markov chains but I don't know exactly how to build a strong statistics model.

I'll start working with basic C major melodies to try some stuff and then we'll see where all that goes.

Thanks for your help.

Roman Thilenius's icon

second and third order for notes (or for intervals) already gives nice results. if you still do not like what you hear, quantize the lenghts of the input file and include lenghts in the markov chain.

try to do it either for each instrument (or hands), or combine simultaneously notes to chords.

use "medium complicated" test music, not happy birthday or shostakovic symphonies.