Virtual controls sending unexpected MIDI from Lua function

I’m working on a preset for Strymon BigSky. I have two functions in Lua called setType and sendControlChange. When I turn the first controller, setType is called. There is no code in that function that sends MIDI. The sendControlChange function sends MIDI and works as it should. Yet MIDI is sent when I call the setType function. All controllers are virtual. What is happening? Is it even possible to get a virtual control to send MIDI on its own?

One possibility: Duplicate Parameters. Make sure you are not duplicating parameters between controls. This bites me all the time. If you have two controls with the same parameter, one might be firing when you think the other one is being used. This is why I wish there was a simple debug option to show all controls with their parameters to try and find duplicates you set without realizing it. Of course this could be something else.

1 Like

I talked to @Electrolove about it on the private chat. The messages were sent by the control lua function that called midi.sendControlChange. An alternative approach using the parameterMap.onChange() was suggested.