Code: Select all
MidiRemoteScript n [Control Surface="None" Input="None" Output="None"]
I "need" to compare the input and output port names a custom script is "currently" using and branch some code depending on whether the names match. (Port names will match when the script is running by itself "independently" and won't match when the script is running in tandem with a Max patch and using a midi loopback port for the remote script output instead of the matching output port which is being used by the Max patch instead.)
I can access self.application.control_surfaces and identify "self" like this:
Code: Select all
control_surfaces = self.application().control_surfaces
for script in control_surfaces:
if script is not None and script == self:
# do something useful