Completely off the terrific solution proposed here, but @gpfan : why send signals from GP to the XS to go from voice to performance mode, while you can switch presets in master mode which are either in voice, performance, pattern, etc. mode?
I was just curious for your use case.
I used to send program change message from GP to my old ES8 (ie. increase to next preset or decrease to the previous) and in the motif I had everything setup in master mode, where every mode is available.