multislider and adsr~ help

GustavoRhomas's icon

I’m a beginner and looking for any advice on this patch that I’m working on.

With an Arduino I’m controlling a few lights through MAX. I like the idea of controlling the on/off timing of the lights with a sequencer (using a multislider - seen attached).

I also just added an adsr~ so I can control the shape of the light turning on and off.

That’s introduced an issue though - the toggle that I’m using to send a “1” and then a “0” to the adsr~ only triggers half as many times as I’d like. I tried using a “delay” after the button and into the toggle, so it turns off the toggle shortly after it’s turned on, but it makes the signal out of the ADSR feel cut-off, it also hinders it from adjusting to tempo changes.

Is there a better way for a multi slider to send a 1 -> 0 to an adsr~ ?
Is there a better way for me to be attempting this all together?

Any input would be greatly appreciated, thanks!