ml.markov sequences without a provided "build"

Benjamin Neale's icon

Hello all,

I've built a markov midi sequence quite similar to the one in this video:

This model, however, reads a loaded midi file into the ml.markov object, which then uses that input to create the midi sequence (time stamp from 4:35). I'm curious if anyone has any ideas as to how I could possibly eliminate the midi file step so that the chain instead uses last played notes it has generated to determine future notes.

I assume I would have to

a) manually give the machine an initial starting note

b) find a replacement for the "build" object or find a way to constantly update it.

The build I'm currently working on creates segments by using two-digit pairings from the decimal series of pi (i.e., 3.14159... = 1,4; 4,1; 1.5; 5,9; etc.) to determine number of notes played, and number of times each segment is played (i.e., 1,4 = 1 note, 4 times). So as you go along the decimal series, I want the information from prior segments to influence the notes chosen for current segments (and on and on).

Any pointers would be great! Thanks!

Roman Thilenius's icon

the initial note belongs outside the markov chain, because it does not have a last state i.e. the probability to it is zero. in other words, use [i ]

modulating the content in realtime (including recursive methods) is a pretty neat approach, but i do not think it will change much about how you have to build the "database".
objects like coll or dict are generally thread-safe and will allow "insert a, read a" style of consecutive message input in overdrive.