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 - Button Event | MUSE

Video Manual Series


Written by Felipe Guerrero

Updated at August 20th, 2026

In this video, you’ll learn how to create and handle basic button events using Python on an AMX MUSE controller.  We’ll walk through setting up a watch on a touch panel button, defining a callback function, and inspecting the event object generated during user interaction.  You’ll also see how to distinguish between button press and release events using event values.  By the end, you’ll know how to trigger logic only when a button is pressed, making your control workflows more precise and efficient.

What You’ll Learn:
• Setting up button event watches in MUSE Python
• Creating and using callback functions
• Understanding the event object and its attributes
• Distinguishing between button press and release events
• Triggering logic based on specific event values
• Building more precise and efficient control workflows
 

Transcript
Hello, and welcome to this video on creating a basic button event in your Python code.   For this example, we are using code that already has a touch panel defined as dvTP.   We will be using a button on port number 1 with a channel code of 1.
When you look at the descriptor file of any touch panel, all buttons are parameters.   Because of this, all button events are triggered using watches[RJ1.1][MW1.2].   To create the watch, we will reference the device object, the requisite attributes, and then the watch method.   
Syntactically this looks like:
*** Enter Code ***
dvTP.port[1].button[1].watch()
******************
So far, this line is only partially correct, the watch method must be passed a callback function.   In this example, we will create a callback function named buttonEvent above the watch method.   Type in the buttonEvent name into the watch method.
*** Enter Code ***
dvTP.port[1].button[1].watch(buttonEvent)
******************

 
Now define your callback function.
*** Enter Code ***
def buttonEvent(event):
*****************
The event object, created when the watch is triggered, is passed to the callback function[RJ2.1][MW2.2].
The first thing we should do is see what information is obtained when a button is pressed.   Let’s create an info log that prints out the dictionary for the event.   To do this, type in: context.log.info(f”Dictionary print: {event.__dict__})
*** Enter Code ***
context.log.info(f”Dictionary print: {event.__dict__})
*****************
Save your code and upload it to the controller.   Once it has finished, attach to the program, and press your button.   Notice when you press the button, you get two separate messages in your output bar.   Let’s look at all the information we received.

 
The first piece of information is the source object of the event.   The second is the id, in this case, the id is the channel number of the button.   Next is the path of the button that was pressed, notice it matches the port and button number of the button you pressed.   After that we have the device that triggered the watch event, in this case dvTP.
The next few pieces of information we receive are the reason we have two separate events.   When it comes to button presses, pushing a button is one event, and releasing the button is a different event.   These events produce Boolean values of true for a push and false for a release.   
Now that we know what triggers a watch event on a button, and the values produced by these events, we need to write the body of our callback function to utilize that information.   Usually, we would only want to trigger our button event off of either the push or the release, in this example we will use the push.

 
Creating a conditional that only triggers on the True value turns this button event into a “push” event.   Using if(event.value == True):
*** Enter Code ***
if(event.value == True):
******************
Conversely, if your conditional were set to False, it would only trigger on the release of the button.
From there, we can enter the rest of our code.   For this example, we are just going to write a simple info log of “button pushed”.
*** Enter Code ***
Context.log.info(“Button Pushed”)
******************
Save your code and upload it to the controller.   Once it is uploaded, press your button.   Notice that now you only receive one event per button press, and it is only triggered when you push the button.

Related Videos

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Connecting - First Connection | MUSE

Related Articles

  • Connecting - First Connection | MUSE
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand