Hey guys! So i've been trying to build a patch that will allow a performer to play along to a click track, inputting their own rhythms by pressing the "h" key on a computer keyboard in time with a sequence. I'm trying to get the computer to then interpret the rhythms and put them on a sequencer. This rhythm will be kept on the sequencer until the performer taps out a new rhythm which will replace the previous one.
I've attached a patch with my efforts so far, any suggestions welcome even if they're a complete divergence!


Another idea I had was for pd to interpret how long in ms between each tap of a key and make quantised rhythms. Can anyone suggest how to use a real-time markov model to determine the likelihood of a step in the sequence being triggered?

steps x of 16: -- percentages change based on performer's previous 100 hits
A -- 1/16 ---- 10%
B -- 2/16 -- -- 5%
C -- 3/16 -- -- 2%
D -- 4/16 ---- 7%
E -- 5/16 ---- 26%

Thanks guys!