starting a playlist at lightjams start

50 views
Skip to first unread message

Nick

unread,
Dec 8, 2019, 2:41:35 AM12/8/19
to Lightjams
Hi,
trying to start the only playlist in lightjams music player as lightjams starts...

First try:
music.player.playlist(0) & music.player.playing(1) & music.player.playing
didn´t work out.

somehow
music.player.song(0) & music.player.restart() & music.player.playlist(0)
and
music.player.playing(1) & music.player.playing
does the job, but only when sent in two different formulars one after the other,

Question, how can it be done in one line and where to place this formula?

Thanks,
Nick

Mathieu

unread,
Dec 8, 2019, 7:19:56 PM12/8/19
to Lightjams
You can try:

if(grid.onactivated, music.player.song(0) & music.player.playlist(0) & music.player.restart() & music.player.playing(1), 0)

Use this formula for the power slider of  source. Any other source's slider would also work.

Nick

unread,
Dec 9, 2019, 2:44:43 AM12/9/19
to Lightjams
Hi Mathieu,

thank you for your answer, but that didn´t work out.

I pasted your formular into the constant 100% Power-Source of my DIMMER grid and added "& 100" to achive the powerlevel.
The player didn´t start and the power was 0. 
To check, which part of the IF evaluates, I replaced your ",0)" with ",100)" and now the power ist 100 after autoloading my .ljp-file.

at the end, I tried 
if(grid.onactivated, music.player.song(0) & music.player.playlist(0) & music.player.restart() & music.player.playing(1) & 100, music.player.song(0) & music.player.playlist(0) & music.player.restart() & music.player.playing(1) & 100)

wich should evaluate to TRUE in any case. But nothing happens. The powerlevel is 0 and the playlist didn´t start. 

Interestingly, when closing lightjams, the playlist starts! The same if manually entering a  music.player.playing(1) in another grids powersource after executing the above formula a startup.

Is one of the music.player.-funkctions blocking at startup? Somehow the 100% in the above formula isn´t reached.

Where are the playlists stored? Is it possible to alter the list an do a music.player.restart() ?

Thank you for your answers and the wonderful Lightjams!
Nick

Mathieu

unread,
Dec 9, 2019, 3:32:51 AM12/9/19
to Lightjams
Does the music player is running when you start Lightjams?

The formula I sent you runs only when the grid just has been activated. And it's normal that the result is not 100. & is the and operator so if one function doesn't return above 0 you won't get 100.

Mathieu

unread,
Dec 9, 2019, 4:08:41 AM12/9/19
to Lightjams
Ok I see the problem. The grid.onActivated variable isn't true when loading a project and the grid is already activated. I'll fix this so that it works as expected.

Meanwhile, you can activate this grid from another grid and the grid.onActivated variable will be true and the music player will start playing.

isaac

unread,
Dec 9, 2019, 7:57:27 AM12/9/19
to Lightjams
Ah! I had this problem also a few weeks back and had to do a work around thinking it was my code :)

Nick

unread,
Dec 10, 2019, 11:59:48 AM12/10/19
to Lightjams
Hi Issac,

would you be so kind and give me a detailed hint :-)
How did you implement your work arround?

Greetings,
Nick

isaac

unread,
Dec 10, 2019, 12:29:30 PM12/10/19
to Lightjams
Hi Nick,

To play a track on startup I used:

if(music.player.playing == 0, music.player.playlist(0) & music.player.song(0) & music.player.restart(), 0)

Nick

unread,
Dec 13, 2019, 7:02:58 AM12/13/19
to Lightjams
Hi Isaac,
I can confirm that your line of code starts the player as expected.
But it keeps on playing the first song of the playlist only :-(

One can see, that the gap between songs triggers the (Play/Pause) button of the player.
Therefore I guess that music.player.playing evaluates to 0 for a short time after each song.

Nick

Nick

unread,
Dec 13, 2019, 8:31:40 AM12/13/19
to Lightjams

finally my "working workaround":
if(music.player.playing == 0 & recall(0) != 1, music.player.playlist(0) & music.player.song(0) & music.player.restart() & mem(0, 1) & 100, 100)

Mathieu

unread,
Dec 18, 2019, 4:29:26 PM12/18/19
to ligh...@googlegroups.com
The new beta v576 (https://www.lightjams.com/history.html) should fix the onActivated problem when loading a project.  There's also a new Lightjams music player version (2.10.0.24) that simplifies what's needed to start playing.

The formula should now just be:

if(grid.onactivated, music.player.playlist(0) & music.player.playing(1) , 0)

Nick

unread,
Dec 25, 2019, 2:45:45 AM12/25/19
to Lightjams
Bonjour Mathieu et joyeux noel,

thank you for all the support! I installed the latest Beta of Lightjams and the new music player,
Now it works as expected. Great!

Thanks again,
Nick
Reply all
Reply to author
Forward
0 new messages