Step sequencer within LFO

Ismael del Río's icon

Hi,

I was working with the LFO that comes with Ableton Live 10 and the max for live bundle and I thought that would be interesting to modify the random option to get a step sequencer lfo option. I've been trying to get that idea out for more than two weeks I am getting a little annoying....so the firs question is if this is possible and the second if it is, is how can I do it?

The first I did was to copy the random patcher to introduce one more input in the selector -the new stepped lfo- and I copy a step-sequencer within. I upacked the information of the step and I use the pitch to get the frequency of a [cycle~] object that goes to a [s&h] that triggered with the signal coming from the ratio information outside the patcher. I got a wave that comes and goes and I don't want that...I would like to get the same form than in the step...

STEPPER.maxpat
Max Patch