"Envelope" device: how to add a "note-selector"

Maximilian Oepen's icon

I'm trying to add a selector to Live's "Envelope" device that will only process the selected note and discard any others. The device would have a chooser like this:

But I haven't been able to figure out how to patch it, since it uses "midiin", not "notein". Here's what I tried (objects in the red circle are my addition), but I'm obviously going about it the wrong way:

Any help is appreciated.
Here's the original device:

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

Maximilian Oepen's icon

It may be a redundant effort, since input can be isolated via a key-zone in a midi-rack in Live.

But I'm still curious how it would be patched into the device itself.

Source Audio's icon

1- you broke midiin to midiout by inserting that stuff in between.
2- read help file for both midiin and notein to understand the difference.
3- to add a filter for the note, digg into MIDILogic patch
where midiparse outputs note-velocity list, where you can insert your
note selector.

and while being there remove that + 0.
what does it do ?
receiver bangs next when note is released.
You also don't need stripnote etc etc
At the end, best would be to trash all that midi stuff
and insert this

I removed s --noteoff because I see no need to send that arround,
but maybe it gets received in some subpatches which seem to be missing.
I am on max 6 here.

Maximilian Oepen's icon

Thank you, much appreciated!