Yes there is!
There's a new-ish addition to the C++ Patch class:
void sendMidi(MidiMessage msg);
In addition the MidiMessage class has some handy helper functions, so for a program change (PC) you can do:
You can also use the
pgmout object in Pure data.