Is There More Efficient Way to Toggle Dolby Atmos/Stereo Menu in Apple Music?

I often flip between Dolby Atmos & general stereo audio.

This is the macro I've created with keyboard Maestro and AppleScript:

If Then Else.kmactions (4.2 KB)

Keyboard Maestro Export

It works well but as you can notice, it's not intuitive. I think there must be a simpler method to do it,
but I don't know how to figure out the element name or operators in AS.

Can someone help me figure it out?

I’m a novice with AppleScript but the Music app has very poor integration with it. Without being at a computer and able to look at the AppleScript dictionary for the Music app, I imagine your solution is probably one of the best, if not only solutions.

Hi. Your script works fine on my Apple Intel (thanks) but it doesn't work on my Silicon. I've tried several scripts with Chat GPT but I can't succeed. Any idea for me ?