Getting overlay current track data in macros

You have a question or need an advice about how to do something? Ask it here!
Post Reply
fred48fm
Posts: 73
Joined: 28 Aug 2019 09:52
Getting overlay current track data in macros

Post by fred48fm »

Hi,

I'm trying to recover the track title value for tracks played using an overlay.
I tryed every macros relating to track data, but I only get the data from the main playlist, not the overlay playlist.

Is there already a macro for that ? :-)

Thanks and best regards,

Fred
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Getting overlay current track data in macros

Post by radio42 »

What do you mean by recover?!
You can access the related Overlay macros (see user manual appendix) only in the related overlay events. And yes, there are non dedicated overlay macros to access the overlay entries individually, like for a regular playlist.
What is used for the song title updates within an overlay is defined win the overlay settings.
fred48fm
Posts: 73
Joined: 28 Aug 2019 09:52
Re: Getting overlay current track data in macros

Post by fred48fm »

Hi,

What i need to achieve is :

1- Playing a specific file using overlay scheduler
The file is played in the dedicated player
--> That part is OK

2- When that file start playing (in the event "OnOverlayPlayed"), I need to use the value of that playing track's title metadata in a command.
--> The macros I already tried just gave me the title metadata of the current loaded decks (A-B or C) not the overlay player.

Best regards,

Fred
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Getting overlay current track data in macros

Post by radio42 »

When you play stuff via the Overlay Player, you don't have macros to access all the details (all meta data) of all the tracks playing as an overlay.

As said, the song title update for streaming can already be triggered for each track played in the overlay, see the Streaming.OnSongTitleChanged event.

Maybe you can explain, what meta data you exactly need, as I do not plan to add macros for all possible track data in the overlay playlist (like I did for the playlist), as I don't understand your use case. Note, that the Overlay Player is intended to play e.g. short adverts or jingles etc.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Getting overlay current track data in macros

Post by radio42 »

Just another question:
Have you tried to use the general event "Scheduler.OnOverlayTrackPlay" (see general settings).
That event is triggered with each track played within the overlay and allows you to use all track macros, e.g. ${trackname}, ${title}, ${durationsec} etc.

Isn't that actually something you are looking for?
fred48fm
Posts: 73
Joined: 28 Aug 2019 09:52
Re: Getting overlay current track data in macros

Post by fred48fm »

Yeah that work, thank you.

Actually, the most part of the code was in Scheduler.OnOverlayPlayed. There the ${title} macro doesn't resolve.
Just moved to Scheduler.OnOverlayTrackPlay and it does exacltly what I need.

Thanks and best regards,

Fred

Post Reply