Best way to start playlist

You have a question or need an advice about how to do something? Ask it here!
Post Reply
Thijmen
Posts: 150
Joined: 16 Jul 2019 20:19
Best way to start playlist

Post by Thijmen »

Hi Bernd,

I open a PFP file via TCP via these commands:

PLS_CURRENT_NEW
PLS_CURRENT_LOAD_PLAYLIST LOCATION.pfp
PLS_CURRENT_AUTOPLAY_ON

But how can I properly load the tracks in the players + start, and stop the previous playlist with fading?
User avatar
radio42
Site Admin
Posts: 9127
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Best way to start playlist

Post by radio42 »

The TCP commands can be used to remote control ProppFrexx.
However, they might not be used without any additional coding logic to synchronize all desired tasks.
The reason is, that ProppFrexx is highly asynchronously.

For example, stopping and closing a previous playlist and after/with a smooth transition load and start a new playlist can not simply be achieved as you might think. Hence, those transitions can not be done via a few commands, as the timing also depends on your machine, speed and other factors.

Here is a simple list of commands, which might work for you:

Code: Select all

ASYNC
PLS_CURRENT_PAUSE_CURRENT
SLEEP 3000
PLS_CURRENT_CLOSE
SLEEP 300
PLS_CURRENT_NEW
SLEEP 1000
PLS_CURRENT_LOAD_PLAYLIST C:\Music\Convert\Andre.pfp
SLEEP 2500
PLS_CURRENT_AUTOPLAY_ON
But the timing might be different on your machine. For example, creating a new playlist via PLS_CURRENT_NEW might sometimes only take a few milliseconds, but it might sometimes take one or even two seconds. I.e. the subsequent PLS_CURRENT_LOAD_PLAYLIST command should wait until the previous command fully finishes.
But this can only be achieved, by waiting some time. How long however can not be predicted, as ProppFrexx executes each individual command independently and asynchronously. I.e. only a single command is atomic, but not a sequence of multiple comamnds.
As such, you must experience with the SLEEP commands and its time, so that it fits for you.

Alternatively you can take a look to the command PROGRAM_STARTSCRIPT - this offers a smooth transition - but is not exactly what you are looking for, as it does't start an independent playlist.
Thijmen
Posts: 150
Joined: 16 Jul 2019 20:19
Re: Best way to start playlist

Post by Thijmen »

Does the PROGRAM_STARTSCRIPT require a script in the scripts directory or does it support a full path too? I am trying the full path but no success yet.
Thijmen
Posts: 150
Joined: 16 Jul 2019 20:19
Re: Best way to start playlist

Post by Thijmen »

OK - I added my custom directory to "Automatic script library path", I've rescanned it but can't seem to start a script from that directory. I just use the regular name with PROGRAM_STARTSCRIPT, no pfs added
Thijmen
Posts: 150
Joined: 16 Jul 2019 20:19
Re: Best way to start playlist

Post by Thijmen »

My bad - I thought it would need to be the filename, but it should be the name inside the script. Thanks Bernd! Great software

Post Reply