Play button that supports Logic Pro X on touchbar

Hi, I have a play button on my touchbar that plays music on Spotify (currently just a simple Play/Pause button). But can I make the same button play the currently open Logic track, if it was the last played thing? So if I'm listening to a song I made on Logic, can I pause and play it from my touchbar without having to bring the app to the front?