this is really cool. I’ve wondered about making mother.pd more ‘hookable’ so system commands could alter the routing a bit, and this is a great proof of concept…
the states do become an issue like you have discovered, and could be handled like midi channel where mother.pd reads / writes a file containing the current channel.
I’m not sure this an underlying alsa pass thru in software that would be any quicker (?). sometimes hardware supports pass thru which can be a true pass through before all the ADC/DAC…it would be a setting in alsamixer, can’t remember if SGTL5000 (the audio chip on Organelle) has this.