[Adsr~] within [poly~] - toggle notes on/off?

Jason Charney's icon

I'm trying to build a patch which will allow a MIDI controller to play two voices of a poly at a time (simply controlling the amplitude of a cycle~)...however I want to use [adsr~] in the poly to play a note of indefinite length - when receiving the MIDI note for the first time, [adsr~] should receive a 1 to begin the attack, and then the second press of that note sends a 0 to [adsr~] to begin the release in that voice. I turned on "steal" so that only 2 notes can play at a time. All examples I'm finding only allow for set envelope times with one trigger.

Can anyone help? I'm pretty new to [poly~].