I knew it is not possible, since once you change the note, you don’t know what was the length of the original note. Because LE does not offer user memory allocation.
If Steinberg add had allowed users to declare and initialize their own variables in LE editor, ( holding the length of the original note, or the actual note object as in object-oriented programming), this would be possible. I posted this as a feature request to LE editor, but seems like no one like it.
Adding this even a single memory/variable to LE would be like advancing from arithmetic to algebra.