[prob] from an arbitrary value

Nil Hartman's icon

Hi!

Markov chains are fun, and so is using [prob] (with [matrixctrl] or [anal], depending on the task). I'm experimenting quite a bit with it, and am amazed by how a deliberate transition table can lead to musically useful / tasteful results.

Inspired by recent glimpses of Autechre's system and nouserid super fun sequencer as seen in https://cycling74.com/articles/collaborative-drum-kit-in-max-part-2, I tried to patch the simplest, most reduced version of it, and came with the attached patch. Beware, it's really a dumbed-down version of these clever patches eh.

Here, both the [phasor]+[subdiv] and [matrixctrl]+[prob] counts linearly to 7. Good. I can easily set a transition table with weighted probabilities with [matrixctrl]'s Dial Mode set to Gain+[prob] to occasionally skip a step / deviate from the 0 to 7 count. Easy (and super fun).

But how can I ask [prob] to work its magic from an arbitrary value ? Here, for instance it'd allow the [prob] driven counter to be re-synced to the [phasor], by forcing [prob] to output a 0. In a different scenario / different patch, I could input a MIDI note and have [prob] react to it (following a given transition table).

While I can think of several tedious, inelegant, probably inefficient (and not so effective) ways to approximate such "reset", do you guys have suggestions / solutions ?

Thanks !

example.maxpat
Max Patch

Nil Hartman's icon

Guess what ? I found a solution. An obvious one, but it seems I misunderstood a core [prob] parameter, the "state" one.
An easy fix I'll refine later, in the attached patch. Hopefully it'll be useful to someone someday :)

fix.maxpat
Max Patch