Simple example of a VST plugin sending a MIDI CC

Well, if you define your ccTempVal inside the processBlock and furthermore don’t initialize it, it is pure luck, if the comparism returns true or false :wink:
Make it a member variable of your AudioProcessor, and initialize it in the constructor