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) General AKG Inquiries Certifications (AKG) Video Manual Series (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™ 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 Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown) Video Manual Series (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 P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (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
  • BSS
  • Video Manual Series (BSS)

Python - Events, Descriptors, & Dictionaries | MUSE

Video Manual Series


Written by Felipe Guerrero

Updated at August 20th, 2026

In this video, you’ll be introduced to the core concepts of event-driven programming in AMX MUSE using Python.  We’ll break down how watches, listeners, and device descriptors work together to drive responsive control logic.  You’ll learn how to identify whether an attribute is a parameter or an event by exploring descriptor files in both JSON and text formats.  The tutorial also demonstrates how to set up event triggers, write callback functions, and inspect event data using Python dictionaries—giving you deeper insight into the information available for building robust automation.

What You’ll Learn:
• Fundamentals of event-driven programming in MUSE
• Understanding watches, listeners, and device descriptors
• Identifying parameters vs.  events using descriptor files
• Working with JSON and text-based descriptor formats
• Setting up event triggers and callback functions
• Inspecting event data using Python dictionaries
• Building responsive logic based on real-time interactions

Transcript
Hello, and welcome to this video on events in your MUSE Python code.   Many aspects of A/V programming are event based.   Whether that is someone pressing a button on a touch panel or waiting on a response from a device, it’s these events that we trigger our code on to perform any number of actions.
In MUSE programming, there are two different kinds of events, watches and listeners.   Whether it is a watch or a listen depends on the object attribute being referenced.   Watches are based on changes to parameters, while listeners are triggered by events.
So, the next question is how do we know if a given attribute is a parameter or an event?
There are two ways to determine whether an attribute is a parameter or an event.   One way is to reference the documentation of the object you are communicating with or controlling.   The second, and probably more functional method is looking at a device’s Descriptor file.   

A Descriptor file is created at runtime when a device is created or connected to a MUSE controller.   It contains all the attributes associated with the device.   This means everything that can be done to or heard from the device is contained in that file.
To access a Descriptor file, connect to a MUSE controller with VSCode.   Under your controller, expand out the Devices section by clicking the arrow beside Devices.   Now, right-click on the device you want to look at, in this example we will use idevice, and select Descriptor.
At the top of the screen, you will see a dialogue box that asks if you want to view the descriptor as a json file or a specially formatted text file.   Let’s select json to begin with.   For this example, let’s look at the receive attribute of a serial port.   
You can see the beginning of the attribute on line 18.   What we are looking for is the .kind metadata attribute for receive.   In this case it is an event and would be listened to.   Any .kind metadata attribute listed as param is a parameter and would be watched.
Selecting text as the Descriptor type will show you a specially formatted text document that shows the same information as the json file.   In this case, the text is a hierarchical representation of the information where each tabbed in section is a subset of the previous level.   If we search for the same ‘receive’ attribute, you can see that receive is shown to be an Event.   Also, unlike the json file, parameters are labeled as parameters and not param.

Now that we know the kind of attribute we are dealing with, how does this translate into code?  Whether it is a watch or listen method we need to use, the syntax is the same.   We create the event trigger and pass the method a callback function.
For this example, we will use a button for our event.   Our touch panel contains a button with channel number 1 on port 1.   If you look at the Descriptor file for a touch panel, you will see that all buttons are parameters.   So, for this example we will be using a watch.   
Both watch and listen are methods that are run on an object, in this case our device.   Type in the device object, the attributes related to that object, and add the watch method.   In this case we will type in 
*** Enter code ***
dvTP.port[1].button[1].watch()
*****************
The watch must be passed a callback function, let’s call the function buttonEvent.
*** Enter code ***
dvTP.port[1].button[1].watch(buttonEvent)
*****************
Now we need to create the function and program in what we want it to do.   For this example we are going to printout the dictionary for the event.   The attribute dictionary, designated by the method __dict__ is a fantastic Python tool that will show you the instance namespace or attributes related to an object.   You can printout the dictionary of any event to see all the information that is provided by the event
*** Enter code ***
def buttonEvent(event):
	context.log.info(f”Dictionary printout: {event.__dict__})
Notice that this one line of code shows us that the event provided by a button contains the ID, path, device, value, new value, old value, and normalized value of the parameter that was being watched.   Using all of this information, you should be able to program anything else necessary to react to the event triggered by the button[R.

Related Videos

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Varia - Touch Panel Popup Page Channel Code Push Event Issue
  • System Configuration - Firmware Upgrades | MUSE

Related Articles

  • Varia - Touch Panel Popup Page Channel Code Push Event Issue
  • System Configuration - Firmware Upgrades | MUSE
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand