looking for way to latch Midi note to toggle mapped parameter on/off
Basically I am looking for help for a slight modification to THIS device, which is free DL in the UL:
https://maxforlive.com/library/device/8074/note-toggle-map
What it does right now: toggle a parameter on off by holding down a Midi note (as long as you hold it)
I am looking to make it behave as latch so I can map it to on/off elements and have them activated/deactiated by simply pressing Midi notes
What would make this perfect would be an option to invert the mapped parameter, beacuse this would save me from using another M4L device.
I*d be grateful for some lines of help.
................

thank you! I have replicated it with the exception of 2 things.
1. I can*t get my live.text to show *Invert*. Instead it always shows A and B
2. the object below *loadbang* says *set 0*, right?
I can*t find an object like this with two inlets and one outlet.
if I type in, it wants to create something named *setclock* or if I force it and write *set 0* it appears in a different brown-ish colour and has no in and outlets.
thanks again for noobie help!
S.
EDIT: nontheless, it works as expected already. I don*t need the *Invert* option in this scenario because the Note in - information always toggles between the two states as desired.
set 0 is text entered into message object.
it sets toggle state to 0 without triggering output.
live.text - open inspector and change shown text
from A & B to your likes.
If you don't need to invert toggle, this is all it needs.

line~ 1. 10 makes no sense.
line~ (signal variant) does not have 2nd time grain argument,
it switches hard 0 - 1 with no ramp at all, same as if you used sig~ object.
and then initialising it with 1 , but sending loadbang 0 is a joke.
If you need a ramp, then either use such message to line, like 0, 1 100 or some other ramping object...

in the screenshot above ramp time is set to 10 ms, which probably is what maker of that that device wanted....
thank you so much!
yes, I deleted the unneccessary parts. All I need is a toggle without ramp. just On/Off
now one last thing you might help me with please? ;)
Let*s say I do not want every Midi note to trigger the action but I want to define it in the device itself.
I then plan to copy the parts so I have 8 mappable destinations and the Midi notes to be chosen for each...
EDIT another thing that bugs me is, that mapped controls do not write automation to the sequencer.
for example if I map the standard LFO to a channel on/off it writes that automation.
if I trigger the on/off with this device, it does not do so.
Am I missing something within the mapping part of the device ?
I can help you with max stuff, but Live and it's problem, sorry no.
I am not using Live at all.
You can define midi notes as you wish and then listen to their > 0 velocities to trigger signal On Off.
if you need hard switch, then sig~ will do.
that part of pach that maps - i did not have look at it,
I know nothing about mapping suff in Live.
here is patch with 8 midi notes

adjust note numbers you want to listen to.
I took a short look in that mapping bpatcher.
it uses live.remote~
https://docs.cycling74.com/max8/refpages/live.remote~

means - not usable if you want to include resulted parameter state into automation.
You will have to use something else.
maybe simply trash live.remote~ and signal based control,
and replace it with live.object ?
