I thought about that option, but it is a clumsy way of doing things.
A script part for handling this could be:
DEVICE_JACKD='deviceType="JACK" audioOutputDeviceName="Auto-connect ON" audioDeviceRate="44100"'
DEVICE_ALSA='deviceType=\"ALSA\" audioOutputDeviceName=\"HD-Audio Generic (1)\" audioInputDeviceName=\"HD-Audio Generic (1)\" audioDeviceRate=\"44100\" audioDeviceBufferSize=\"1024\"'
MYDEVICE="$DEVICE_ALSA"
AWK_SET_AUDIO="sub(/[[:space:]]*DEVICESETUP.*/,\"$MYDEVICE/>\n \")"
AWK_CLEAR_CRASH="sub(/VALUE name=\"crash_detect\" val=.+\/>/,\"VALUE name=\\\"crash_detect\\\" val=\\\"0\\\"/>\")"
awk "BEGIN {RS = \"<\"; FS=\"\n\";OFS=FS} {$AWK_SET_AUDIO; $AWK_CLEAR_CRASH; ORS=RT; print } " ~/.config/Modartt/Pianoteq36.prefs
After every Pianoteq update the script has to be checked. A version change will lead to a different the config name. Maybe device naming has changes or other an other DEVICESETUP part is introduced. There is more stuff which could breaks like the scanning for the xml entries (an improvement would be using a regex excluding escaped (\<) symbols).
There can be done a lot with scripting but it would be nice if the controlling part is separated from the gui and the burden of keeping it working would be shifted to the developers.