Functional Harmonization -- Combining Musical Constraints with Markov Transition