Possible to send a patch change after every sysex message? (Yamaha PSS480)

Hi all, an odd one here.

Making a preset for the Yamaha PSS480, it behaves in quite an odd way. Every time you update a value it sends the entire sysex patch, which is thankfully very small, but you can’t HEAR the change til you send a programme change identical to the current patch as this “refreshes” it.

Now sending the entire patch for every adjustment is doable if a little fiddly using the sysex parameters and JSON, but sending a programme change every time as well I assume is gonna need the use of a virtual controls and Lua? Or is it just not possible? Lua is not something I’ve used before so I’m wondering if this is a dead end.

setting up all the sliders and variables and just sending all of them plus a prog change every time does sound like a code worthy thing.

I’m sure I could get all the sliders etc working just fine in the standard sysex controls, but having to constantly hit a patch button to “refresh” will get old fast, so without being able to send this automatically post every message it’ll be impractical…

Any and all thoughts are welcome

I have noticed this in the documentation:

-- Program change
midi.sendProgramChange(PORT_1, 1, 10)

So I guess I’m looking for pointers on tying the two parts together…