Markov chain and midi notes


#1

hi !
first post here, long time reader..
i wanted to share a patch :smiley: it's a midi note processor,
notes are recorded in a markov chain array, then, on demand, the incoming notes are replaced by some probable ones.
you can trigger the note replacement with CC or axocontrol buttons. More details in the patch itself.
here it is :
markov13b.axp (169.9 KB)
it may be useful after a loop based sequencer, to add variation and surprises.
cheers !


#2

Thank you, that sounds very ueful, will download and take a peak, cheers for sharing


#3

I like the idea so I do not understand the patch. How to do for a sequence (16 step loop) received by midi din in and the result to midi din out? Thanks.


#4

hi,
so it work like that :
for every midi channel, a poly patch handle incoming notes, with a call to the root patch (gtab object), the note is computed.
in gtab object (edit and go to localdata) , the processNote function store the transition : for a pair of notes n-2, n-1, the current note is stored.
Later, if a note transformation is required, the function return a note randomly chosen in the relative transition stored (if any).
For only a 16 step loop, it may not give good results as it's unlikely that a least two different transitions will be found.
It will work better with more notes (longer sequence or more than one channel).

Anyway, here is a better version of the patch, that handle chords in a better way : only one note of a chord may be changed, that give better musical results ( the transformations are triggered only once in a time slot of 40 ms).
markov14.axp (170.4 KB)


#5

the operation seems simple but I can not make it work for my digitakt. I do not have axocontrol, is that a problem?


#6

hi, i use a digitakt as well, and i usually use the axocontrol buttons so i tried with CC tonight : i introduced a bug on CC 110 handling (process current channel), sorry for that, please check this new version attached ..
anyway, with with CC 111 (process all channels), it work as expected (send a value > 64 to activate)
markov15.axp (170.3 KB)


#7

I can't make it work neither. I tried by simply sending midi notes to the patch, receiving midi from the Axoloti to a synth and sending a value>64 to CC 111 to the Axo. Nothing is happening. Could you make a very simple tutorial to make the magic happen? Thanks a lot.


#8

hi,
i probably doesn't work because there is not enough usable midi notes to use in a 2nd order markov chain context,
here is a 1st order version:
markov_order1.axp (170.1 KB)

cc111>64 should light up led 2 on the axocontrol