Limit [kslider] polyphony

Jason Charney's icon

Is there a way to limit the polyphony of a [kslider] in polyphonic mode? In essence, a way to incorporate a kind of cycling function, so that only n number of notes can be held at a time.

I'm using a [kslider] as a UI object to set a range. I would like the [kslider] to display the last two notes clicked and no more, while outputting them into a list.

Max Patch
Copy patch and select New From Clipboard in Max.

Here's what I have so far, but it's pretty clunky. And the output is a cycle behind...Is there a better way to do this?

Jason Charney's icon
Max Patch
Copy patch and select New From Clipboard in Max.

An improvement....

Christopher Dobrian's icon

Take a look at the poly object (not poly~).