Just started working with this so sorry if this is a dumb question, but can you prevent Ableton from getting notes from your APC40 that you've modified in MT?
I'm trying to make custom mappings for most of the controls on the APC, but still want some of the functionality of the script for selecting audio racks and sends. When I make the custom mapping, I get the new note but it also changes whatever the APC40 was originally supposed to change too.
What you need to do is to tell Ableton Live script to use Bome MIDI Translator Ports for input and output instead the default APC40. Then pass through all MIDI messages back and forth between the controller and Ableton Live using the MT Pro router. For messages you do not want to pass through to Ableton Live, you define translators with the "swallow" option so that the original defined message does not pass through.
I suspect the way you have it now are you are reading the APC40 directly with Ableton Live and also reading the Virtual Port, so both the original MIDI message and the manually mapped message are coming through on different MIDI ports.
Bome Customer Care
Also available for paid consulting services: firstname.lastname@example.org