Created
January 7, 2026 15:44
-
-
Save onyx-and-iris/8e57c1099a4aaac97de38283e163a8a6 to your computer and use it in GitHub Desktop.
Example script creating keybinds for an xr18 mixer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import keyboard | |
| import xair_api | |
| def toggle_strip0_mute(mixer): | |
| mixer.strip[0].mute = not mixer.strip[0].mute | |
| status = "muted" if mixer.strip[0].mute else "unmuted" | |
| print(f"Strip 0 is now {status}.") | |
| def toggle_bus0_mute(mixer): | |
| mixer.bus[0].mute = not mixer.bus[0].mute | |
| status = "muted" if mixer.bus[0].mute else "unmuted" | |
| print(f"Bus 0 is now {status}.") | |
| def main(): | |
| with xair_api.connect("XR18", ip="mixer.local") as mixer: | |
| keyboard.add_hotkey("ctrl+f9", toggle_strip0_mute, args=(mixer,)) | |
| keyboard.add_hotkey("ctrl+f10", toggle_bus0_mute, args=(mixer,)) | |
| print("Press ctrl+enter to exit.") | |
| keyboard.wait("ctrl+enter") | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment