Prevent recording Midi CC from external synth.

    Jul 21 2021 | 10:33 pm
    I'm making a max4live device to control an external synth. I got bi-directional editing working (midi from the external synth controls the device parameters and vice versa). I ran into a little problem. When recording a clip and recording automation via the external synth knobs records 2 automation lanes. 1 for the max4live device (which i want) and 1 for the midi CC messages (which i don't want). Playing back the midiclip then directly disables the automation for the max4live parameter (because it's being externally controlled).
    2 Questions: - Is there a way for a max4live device to prevent the MIDI CC data from being recorded in the midi clip? - Is there a way to create a button to delete all midi cc data from a clip? I tried using clear_all_envelopes on the playing clip. This did delete all the automation lanes for the max device, but the Midi CC lanes were still there.
    If the answer to both of the questions is a no, does anybody have a good workaround? What is best practice in a situation like this?