Assigning touchbar buttons to in-app buttons

I've just downloaded the software for the first time, and am wondering how I would setup my touchbar in Musescore (music scoring app) to show the note values on the touchbar. this would simply involve assigning touchbar buttons to buttons in-app, but i cant seem to find any setting or way to do this. Thanks

This depends on how Musescore works. Are the buttons maybe triggerable through keyboard shortcuts or through the menubar? (In that case you can either just assign a keyboard shortcut to a Touch Bar button or use the predefined action "Trigger Menu Bar Menu Item")

If not there might be ways to trigger the buttons via Apple Script. if that is also not an option you might need to use something like BetterTouchTool's predefined action "Find Image On Screen & Move Mouse" or maybe even just the "Move Mouse" action - combined with a left-click action. These would allow to move the mouse to a button and click it.