Automator - Control Panel & UI Control Node | MUSE
In this video, you’ll learn how to integrate touch panels into your MUSE Automator projects using the Control Panel and UI Control nodes. We’ll walk through configuring panel files, accessing buttons and levels, and generating events based on user interactions. You’ll also explore how feedback is handled, including different trigger types and how message data is structured when working with UI elements. Finally, we’ll cover techniques for managing high-frequency inputs—like level changes—to optimize performance and ensure smooth system behavior.
What You’ll Learn:
• Integrating touch panels using the Control Panel node
• Creating user interactions with the UI Control node
• Configuring panel files and accessing buttons and levels
• Generating and handling UI-driven events
• Understanding feedback options and trigger types
• Working with message data from UI interactions
• Managing high-frequency inputs for better performance
• Optimizing system responsiveness and behavior
Hello, and welcome to this video on using the Control Panel node and UI Control node in Muse Automator.
The Control Panel node is used to add touch panel context to your project. Before using any of the UI nodes in your project—such as UI Control, UI Feedback, and UI Navigate—you must include a Control Panel node.
We will begin with a flow that already includes a Controller node that is configured to connect to our Muse controller, along with a touch panel connected to the Muse controller with the device name AMX-10001. This touch panel is loaded with a touch panel file that includes a button named Button 1 and a level named Level 1.
Drag and drop a Control Panel node onto the canvas and double-click it to open the node settings. Give this node a friendly name of dvTP, and use the Type drop-down menu to select Touch Panel. We will cover Panel Groups in another video. In the Device drop-down menu, select the touch panel device.
Next, press the Browse button to locate the touch panel file that is loaded on this touch panel. Select the file and click Open to upload it into the project. This will generate a read-only tree of the touch panel file’s pages and buttons. Use this list to verify the file contents. Please note that only buttons assigned channel and/or address codes will be shown. Click Done, then deploy the project.
With the Control Panel node configured, we are now able to use other UI nodes in this project. Please note that if any changes are made to the touch panel file, you must return to the Control Panel node settings and upload the modified file to the project.
Next, we will use the UI Control node to create a button event in our flow. Drag and drop a UI Control node onto the canvas and double-click it to open the node settings. Give the node a friendly name of Button 1, then use the Panel drop-down menu to select the Control Panel node we previously configured named dvTP. Using the Type drop-down menu, select Button, and then select Button 1 from the tree.
Next is the Feedback drop-down menu, which allows you to program basic button feedback directly within this node. The available options are:
• None, commonly used if feedback is being driven elsewhere in the project
• Momentary, which turns the button feedback on when the button is pressed and off when it is released
• On, which turns the button feedback on
• Off, which turns the button feedback off
For this example, we will choose Momentary.
Finally, we have the Trigger drop-down menu. For this example, we will choose Any, which generates an event on both the button press and release. The other options are Push and Release, which generates a single event on only the push or release of the button.
Click Done to complete the configuration of this node. Next, wire a Debug node to the UI Control node and set the debug node’s output to Complete message object. Deploy the project, and we can test the button.
In the debug sidebar, you will see that when the button is pressed on the touch panel, two messages are generated. Each message contains a msg object with multiple properties. The first message is generated when the button is pressed, and the second when it is released. The payload will be true on press and false on release.
Each message also includes a topic property, which is the friendly name of the UI Control node that generated the message.
The final property is _msgid, which is an internal property automatically added to every message when it enters a flow. It is used to track the message as it moves through nodes and is especially helpful for debugging, logging, and tracing message paths.
Finally, we will use a UI Control node to add a Level. Drag and drop a new UI Control node onto the canvas and open the node settings. Give it a friendly name of Level 1, select the panel dvTP, choose the Type of Level, and select Level 1 in the tree. The Min and Max settings can be left blank for now, but they may be used to limit the minimum and maximum level values sent from this node.
Click Done to complete the node setup, then wire a Debug node to the output of this UI Control node. Deploy the project and test by adjusting the bar graph on the touch panel. As you slide the bar graph up and down, you will see a debug message sent for each change in the level value.
Depending on the device you are working with, sending every level change could overwhelm the device with unnecessary updates, so it may be necessary to limit the output. We will cover two ways to do this.
The first option is to use a Delay node to rate-limit the messages. This node can be configured to allow a specific number of messages per second and drop intermediate messages. As you adjust the bar graph, you will see that the number of messages in the debug sidebar is drastically reduced compared to when no rate limit is used.
Another option is to use a Trigger node to hold messages until a configured delay is reached, extend the delay as new messages arrive, and then send only the last received message. When observing this in the debug sidebar, you will see that no messages pass through the Trigger node while the bar graph is being moved, and only the final value is sent once movement stops.