Page 2 of 2

Re: More events

Posted: 25 Mar 2018 16:03
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.

Re: More events

Posted: 25 Mar 2018 17:20
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...

Re: More events

Posted: 25 Mar 2018 18:06
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.

Re: More events

Posted: 25 Mar 2018 18:35
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

Re: More events

Posted: 25 Mar 2018 19:28
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?

Re: More events

Posted: 25 Mar 2018 21:22
by radio42
No, as cartwall tracks are typically jingles/sweepers which are anyhow short.