YouTube Music Desktop App
Included with Macro DeckControl YouTube Music Desktop App from your deck: playback, volume, ratings and what is playing.
Two Music Player widgets playing a track, one in the Full cover style and one in the Small cover style, both with the YouTube Music Desktop App name and logo in the header
- Play, pause, skip, seek, shuffle, repeat and volume
- Like, dislike or clear the rating of the current track
- Start a video or playlist from a link or an id
- Live updates through the app's Companion Server
- Music Player widget and variables for track, artist and progress
The YouTube Music Desktop App integration connects Macro Deck to YouTube Music Desktop App (YTMDesktop), the desktop app for YouTube Music. It uses the app's Companion Server, which is built into version 2.0.6 and newer. You allow Macro Deck once in the app, and from then on it connects by itself whenever the app runs.
What you can do
- Play, pause, skip, seek, turn shuffle on or off, set the repeat mode and change the volume.
- Mute or unmute the app.
- Like or dislike the current track, clear its rating, or switch a like or dislike on and off.
- Start a track from the current queue or one of your playlists, or pick one when you press the button.
- Start a specific video or playlist from a YouTube Music link, a youtu.be link, a video id or a playlist id.
- Show what is playing in the Music Player widget, with the cover, progress and play and skip buttons.
- React with a flow when a track is liked, disliked or its rating is cleared.
Some example setups:
- A Toggle Play/Pause button that shows whether music is playing or paused.
- A like button with Rate Track in Toggle Like mode, with the label bound to
ytmdesktop_like_status. - A button with Play Video or URL that starts your focus playlist from its YouTube Music link.
- A slider bound to
ytmdesktop_volumethat follows the app's volume and changes it while you drag.
How it behaves
Macro Deck keeps a live connection to the Companion Server, so changes you make in the app show up on your deck right away. When the app closes, Macro Deck tries again after 5 seconds and waits longer after each failed attempt, up to one minute. The ytmdesktop_is_connected variable shows whether the app is reachable. If the access is removed in the app, the issue YouTube Music Desktop App rejected the authorization on the integration's page asks you to run the setup again. By default Macro Deck looks for the app on the same computer. Under Advanced configuration in the setup, you can enter the address of another computer. You can set up one YouTube Music Desktop App.
What you need
- YouTube Music Desktop App 2.0.6 or newer. Version 1 has no Companion Server.
- Companion Server switched on in the app under Settings > Integrations.
- Companion Authorization switched on while you set up Macro Deck.
Set it up
Step 1: Install YouTube Music Desktop App
Install YouTube Music Desktop App 2.0.6 or newer and start it. The setup dialog in Macro Deck links to the app's releases page.
Step 2: Turn on the Companion Server
In YouTube Music Desktop App, go to Settings > Integrations. Switch on Companion Server and Companion Authorization. The app switches authorization off again by itself once you have allowed Macro Deck.
Step 3: Start the setup in Macro Deck
In Macro Deck, click Integrations in the sidebar and click YouTube Music Desktop App. On the Overview tab, click Set up in the Configuration section. Turning on the switch at the top right opens the same dialog, and the integration is turned on once the setup is done. The dialog Enable the Companion Server has no fields to fill. If the app runs on another computer, turn on Advanced configuration and enter its Address. Leave the Port at
9863. Click Continue.Step 4: Allow Macro Deck in the app
The dialog now shows Allow Macro Deck with an Authorization code. Click Continue: an approval window opens in YouTube Music Desktop App with Macro Deck and a code. Check that the codes match and click Allow within 30 seconds. When the dialog in Macro Deck shows Setup complete., click Done.
Step 5: Add an action to a button
On the Deck page, click the button you want to use. The deck must be unlocked: when the button at the top right reads Lock, it is unlocked. The editor opens with Short Press selected. Click + Add action, select YouTube Music Desktop App on the left of the Add action dialog and pick an action such as Toggle Play/Pause or Rate Track. Then click Save.
Step 6: Press the button
Start a song in YouTube Music Desktop App and press the button on your deck. Playback pauses or resumes.
Actions17
Put these on a button or run them from a flow.
- Play
- Resumes playback.
- Pause
- Pauses playback.
- Toggle Play/Pause
- Switches between play and pause, and shows the playback state on the button.
- Next Track
- Skips to the next track.
- Previous Track
- Skips to the previous track.
- Refresh State
- Reads the current playback state right away.
- Set Volume
- Sets the app's volume, from 0 to 100%.
- Volume Up
- Raises the volume by 10%.
- Volume Down
- Lowers the volume by 10%.
- Seek
- Jumps to a position in the current track, in seconds.
- Toggle Shuffle
- Turns shuffle on, off, or switches it, and shows whether it is on.
- Set Repeat Mode
- Sets repeat to Off, Repeat Track or Repeat Album/Playlist.
- Play Track
- Plays a track from the current queue, or asks you to pick one when the action runs.
- Play Playlist
- Plays one of your playlists, or asks you to pick one when the action runs.
- Rate Track
- Likes, dislikes or clears the rating of the current track, or switches a like or dislike on and off.
- Mute
- Mutes, unmutes or toggles mute of the app.
- Play Video or URL
- Starts a video or playlist from a YouTube Music link, a youtu.be link, a video id or a playlist id.
Triggers8
A button or flow can react to these events.
- Rating Changed
- The current track was liked, disliked or had its rating cleared, optionally only for one rating.
- Track Changed
- A different track started playing, with its title, artist and album (under Music Player).
- Playback Started
- Playback started or resumed (under Music Player).
- Playback Paused
- Playback was paused (under Music Player).
- Playback Stopped
- Playback stopped (under Music Player).
- Volume Changed
- The volume changed, with the new and the previous value (under Music Player).
- Player Connected
- The app became reachable (under Music Player).
- Player Disconnected
- The app is no longer reachable (under Music Player).
Variables21
Show these values on buttons and widgets, or use them in conditions.
ytmdesktop_is_connected- Whether Macro Deck is connected to the app.
ytmdesktop_current_track_name- The title of the current track.
ytmdesktop_current_artist- The artist of the current track.
ytmdesktop_current_album- The album of the current track.
ytmdesktop_album_art_url- The address of the current cover in Macro Deck.
ytmdesktop_playback_state- The playback state:
playing,pausedorstopped. ytmdesktop_is_playing- Whether music plays right now.
ytmdesktop_current_position- How far the track has played in seconds. You can also set it to seek.
ytmdesktop_track_duration- The length of the current track in seconds.
ytmdesktop_progress_percentage- How far the track has played in percent.
ytmdesktop_volume- The app's volume in percent. You can also set it, for example with a slider.
ytmdesktop_is_muted- Whether the app is muted.
ytmdesktop_like_status- The rating of the current track:
like,dislikeorindifferent. ytmdesktop_is_liked- Whether the current track is liked.
ytmdesktop_shuffle_enabled- Whether shuffle is on.
ytmdesktop_repeat_mode- The repeat mode:
off,trackorcontext. ytmdesktop_is_live- Whether the current item is a live stream.
ytmdesktop_media_type- The kind of the current item:
audio,video,uploadedorpodcast. ytmdesktop_ad_playing- Whether an ad plays right now.
ytmdesktop_video_id- The YouTube id of the current track.
ytmdesktop_device_name- The name shown as the source of playback.
Widgets1
Add these to your deck from the widget picker.
- Music Player
- Shows the track, artist and cover that YouTube Music Desktop App plays, with progress and play, pause and skip buttons.
Frequently asked questions
Does it work with YouTube Music in a browser?
No. This integration only talks to YouTube Music Desktop App. For YouTube Music in a browser tab, use the WebNowPlaying integration with its browser extension.
Can Macro Deck control the app on another computer?
Yes. During setup, turn on Advanced configuration and enter the Address of the computer that runs YouTube Music Desktop App.
The setup says it could not reach the app. What can I do?
Check that YouTube Music Desktop App runs, that it is version 2.0.6 or newer, and that Companion Server is switched on under Settings > Integrations. Then press Continue again.
Why does the setup ask me to turn on Companion Authorization again?
The app only accepts new authorization requests while Companion Authorization is on, and switches it off by itself after you allowed an app. Turn it on, press Continue and click Allow within 30 seconds.
What happens when I close the app?
The ytmdesktop_is_connected variable reads false, the Music Player widget shows that YouTube Music is not running, and actions fail with the message that the app is not connected. When you start the app again, Macro Deck reconnects by itself within a minute.
More in Music and audio
Spotify
Included with Macro DeckControl Spotify playback, like songs, manage playlists and show what is playing on your deck.
WebNowPlaying
Included with Macro DeckControl music and videos playing in your browser and show what is playing, through the WebNowPlaying extension.
Jellyfin
Included with Macro DeckControl Jellyfin apps and TVs from your deck, show what plays and react when playback starts or stops.
SoundPad
Included with Macro DeckPlay sounds from your SoundPad list, control recordings and show the playing sound on your deck.
Voicemeeter
Included with Macro DeckControl the gain, mute, routing and macro buttons of Voicemeeter, Banana or Potato from your deck.