oggy22 / MusicTools

Various musical tools including music hearing, machine composer and Chomsky music analyzer.
4 stars 2 forks source link

Melody analysis inspired by Forest Gump main theme #100

Open oggy22 opened 2 years ago

oggy22 commented 2 years ago

Given the sentence lenght, e.g. 4 bars, analyze melody by cutting it into sentences and creating a tree out of them based on how long they match.

Start with the first sentence and make this the main branch of the tree. The second sentence is based on the first but with a different ending. The third one can be based on either first or second, etc.

To create a new sentence, find the sentence which matches the longest with it, highest number of identical notes starting from the beginning. Once they differ the new sentence should have its ending defined.