More events

You are missing a feature or need an enhancement? Post your suggestion here!
Laurens
Posts: 6
Joined: 15 Aug 2017 23:57
Re: More events

Post by Laurens »

I want proppfrexx to send an osc command when one of the players is near its end.
Under the Playlist.onTimecode i placed the following command:
EXEC_COMMAND2 ${cplplayerisendinga}|Equals(1)|EXEC_SEND_OSC /player/a/end|f:1.0

But when i do this, the OSC command is sent when i click the play/pause button on a player, and not when a player is playing and the remaining timecode goes under 12 seconds.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: More events

Post by radio42 »

In the above post the following solution was proposed:

Blink at the end of a track:
The trick is to constantly check the remaining time of your player and if they are playing and the remaining time is less than X seconds you might fire your command to blink the LED.

You might use one of the following general events (see general settings, section 'Events/Commands'):
a) "Application.OnTimer" : Note, that you must set a time interval by clicking on the 'TI' button! E.g. set the time interval to 500 ms!
or
b) "Playlist.OnTimecode" : which is called every few milliseconds

The macro(s) to use to get if the respective player is currently ending (blinking) are: ${cplplayerisendinga}, ${cplplayerisendingb}, ${cplplayerisendingc} or ${cplplayerisendingd}.
You can then use the conditional command EXEC_COMMAND2 resp. the macro function *[IF] to evaluate these macros (which resolve to 0 or 1).
E.g.
EXEC_COMMAND2 ${cplplayerisendinga}|Equals(1)|Your effective command goes in here...
EXEC_COMMAND2 ${cplplayerisendinga}|Equals(0)|Your effective command goes in here...
...

Have you tried this?
If yes, please post your exact solution! And describe what exactly is not working...
Laurens
Posts: 6
Joined: 15 Aug 2017 23:57
Re: More events

Post by Laurens »

Hello,

I exactly tried that solution.
Under the Playlist.onTimecode i placed the following command:
EXEC_COMMAND2 ${cplplayerisendinga}|Equals(1)|EXEC_SEND_OSC /player/a/end|f:1.0
Also see the attached screen shot.

A message is not send when a player is playing and gets to the end of the track.
Attachments
Event_setting_playerendinga.PNG
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: More events

Post by radio42 »

Oh yes, I just see, that the macro currently returns "0" in case it is at the end, so it must be:
EXEC_COMMAND2 ${cplplayerisendinga}|Equals(0)|EXEC_SEND_OSC /player/a/end|f:1.0
Laurens
Posts: 6
Joined: 15 Aug 2017 23:57
Re: More events

Post by Laurens »

Just tested it and that is the solution. Thanks for your help.
Is there also a macro to determine if the cartwall is ending?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: More events

Post by radio42 »

No, as cartwall tracks are typically jingles/sweepers which are anyhow short.
franksiegers
Posts: 122
Joined: 15 Nov 2019 14:24
Re: More events

Post by franksiegers »

Hi Bernd,

I've used Playlist.OnTimecode to alter the LED trackstate of my Airlite if a track is almost finished:
EXEC_COMMAND2 with parameters:
${cplplayerisendinga}|Equals(0)|EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|2

This works great, the LED is blinking fast.

Now I would like to return the LED to normal blinking, once the track is finished (the LED currently keeps blinking fast in non-stop mode).

I've tried Playlist.OnDJALoad, Playlist.OnDJAEject and Playlist.OnDJAStop with the command:
sleep 100 (not sure why)
EXEC_SEND_DRAIRLITE_SETTRACKSTATE with parameters 4|0

Unfortunately the LED seems to go to 0 (steady on) for a fraction of a second and then returns to 2 (blinking fast).

What would be the correct way to return the led to 0 once the song is ejected?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: More events

Post by radio42 »

I am wondering, why the command:
"${cplplayerisendinga}|Equals(0)|EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|2"
actually works or you?
The "EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|2" comamnd set the LED to blinking mode.
But the condition "${cplplayerisendinga}|Equals(0)" actually evaluates to TRUE, when the "${cplplayerisendinga}" returns 0=FALSE!
This means you enable the blinking, when the DJPlayerA is NOT in ending-state.

Thus I assume you should do the following:
a) Playlist.OnTimecode -> EXEC_COMMAND2 ${cplplayerisendinga}|Equals(1)|EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|2
b) Playlist.OnDJAStop -> EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|0
c) Playlist.OnDJAPlay -> EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|1
d) Playlist.OnDJAPause -> EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|0
franksiegers
Posts: 122
Joined: 15 Nov 2019 14:24
Re: More events

Post by franksiegers »

Hi Bernd,

Thanks! You're right, I mixed up the 1 and 0 in the first command...

Setting Playlist.OnDJAPause -> EXEC_SEND_DRAIRLITE_SETTRACKSTATE 4|0 solved it!

So that's working great now. Could I also use this to highlight which player to start next on the Airlite? So, if player A is almost finished and player B is up next in the playlist, could I send a command to the Airlite to have Player B blinking fast?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: More events

Post by radio42 »

Yes, you could use the ${cplplayernext} macro to retrieve the next player name (A,B,C,D). And than transform/map that to your mixer channel value (in the EXEC_SEND_DRAIRLITE_SETTRACKSTATE command; which is a bit tricky)...
I am just wondering what state you might want to use?
As the Airlite only has Stopped, Playing and Ending for an LED state!

Post Reply