Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) Video Manual Series (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) Video Manual Series (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ Omni AVoIP Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) Video Manual Series (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Software (Crown) Discontinued Products (Crown) Video Manual Series (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • FLUX::
    Immersive Processing Analysis Subscriptions General FLUX: Inquiries
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC Macula P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin) Video Manual Series (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Control Processing
  • Central Controllers
  • MU-Series Controller

Controlling MUSE IR Ports with Python Code

Coding Example


Written by Mariana Ramirez

Updated at September 29th, 2026

Table of Contents

Brand: Models/Languages: Overview: Usage: Downloads: ​Code Example:

Brand:

  • AMX

Models/Languages:

  • MUSE
  • Python

Overview:

The below Python code controls IR ports on a MUSE controller.  It contains code that configures the ports, sends IR commands, and also uses one IR port as a one-way serial device.


Usage: 

  • [High level list of what is necessary to implement this code.]

Downloads: 

MUSE IR Example


​Code Example:

The below Python code controls IR ports on a MUSE controller.  It contains code that configures the ports, sends IR commands, and also uses one IR port as a one-way serial device.

from mojo import context
context.log.info('*** Python Script Start ***')
############ Create devices and organize them ###################
idevice = context.devices.get('idevice')
ir1 = idevice.ir[0]
ir2 = idevice.ir[1]
ir3 = idevice.ir[2]
ir4 = idevice.ir[3]
dvTP = context.devices.get('AMX-12345')
irPorts = [ir1, ir2, ir3, ir4]
#################################################################

#################### Configuring IR ports #######################
### Enable Fault Detection on all IR ports
for port in irPorts:
   port.enableFaultDetection()
### Creates function to handle IR fault errors
def handle_ir_faults(event):
   print(f"Received fault from {event.path['data']}: {event.arguments['data']}")
for port in irPorts:
   port.fault.listen(handle_ir_faults)
### Set Port 1 on/off times to 500 milliseconds
ir1.setOnTime(500)
ir1.setOffTime(500)
### Set carrier mode on for Port 2
ir2.carrier.value = True
### Set keypadMode 1 for Pot 3
ir3.keypadMode(1)
### Set IR Port 4 for Serial mode and set communication parameters
ir4.mode.value = "SERIAL"
ir4.setCommParams("9600", 8, 1, "NONE", "232") 
#################################################################

######################### IR Functions ##########################
### Pulsing an IR port via channel number
def channelPulse(event):
   ir1.bufferedSendIr(1)
### Pulsing an IR port via function Name
def namePulse(event):
   ir2.bufferedSendNamedIr("PLAY")
### Sending a channel input using the keypad macro
def keypadMacro(event):
   ir3.keypadMacro(325)
### Sending a one-way serial string
def oneWaySerial(event):
   ir4.send("POWR ON")
### Clear and send via channel
def clearSendChannel(event):
   ir1.clearAndSendIr(2)
### Clear and send via name
def clearSendName(event):
   ir2.clearAndSendNamedIr("STOP")
### Continuous via channel (remember to turn this off)
def onIr(event):
   ir1.onIr(16)
### Continuous via name (remember to turn this off)
def onNamedIr(event):
   ir1.onNamedIr(27)
### Turn off IR on the port
def offIr(event):
   ir1.offIr()
### Load IR file via code
def loadIrFile(event):
   ir1.loadIrFile("SamsungE750.irl")
################################################################

################ Creating Button Watch Events ##################
dvTP.port[1].button[1].watch(channelPulse)
dvTP.port[1].button[2].watch(namePulse)
dvTP.port[1].button[3].watch(keypadMacro)
dvTP.port[1].button[4].watch(oneWaySerial)
dvTP.port[1].button[5].watch(clearSendChannel)
dvTP.port[1].button[6].watch(clearSendName)
dvTP.port[1].button[7].watch(onIr)
dvTP.port[1].button[8].watch(onNamedIr)
dvTP.port[1].button[9].watch(offIr)
dvTP.port[1].button[10].watch(loadIrFile)
################################################################
# leave this as the last line in the Python script
context.run(globals())

Related Videos

ir control muse

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Brand: Models/Languages: Overview: Usage: Downloads: ​Code Example:

Related Articles

  • Emulating Events in MUSE Code
  • Automator - Installation | MUSE

Related Articles

  • Emulating Events in MUSE Code
  • Automator - Installation | MUSE
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand