NRPN Electronic Drums

Ale Reggiani's icon

I have an old medeli 506 electronic kit (release 10 years ago). When I use my drum with Ableton I can map all the drum except Choke cymbals. I understand that the choke program it's on NRPN command. I'm trying to make with Max for live a plugin that solve that problem but I don't understand where I need to put the parameters.
I want make 2 rules in one plugin:
Rule 1) NRPN go to MIDI (1-127).
Rule 2) When MIDI note it's activated (rule 1), mute cymbal MIDI sound (because mute have another sound assignation).
Checking my drums I watch that NRPN commands of my cymbals are:
2967 23 23
3354 26 26

If anyone have a clue I will thanks so much. Kind regards