Having trouble scheduling a set of grids each with different running times

44 views
Skip to first unread message

anne breene

unread,
May 2, 2019, 11:43:53 PM5/2/19
to Lightjams
 
Hi Mathieu (or anyone who can help),

I am sure this is easy, but I have found it very hard and have tried a bunch of things that did not work. I have filled up 125 lines of possibilities and strategies and formulas and none have worked. I have a couple of questions first:

The if statement - when you say complex formulas, do you mean boolean expressions? or can you have for example xtopercent(x+1)? Or gmem(0,0)?  Do either of these have a truth value? Rereading the if doc carefully I see that the outcomes have to be numbers. Not functions. Is that right?
I tried the following strategy: save a 0 for each grid that I had to run in gmem(grid#,0) - and then let the activated sub(?)grid change that to 100 when it was done (at lastx). That caused some kind of racing condition and did not work.  Where would I initialize the gmem or mem storage in order to use it?

So, since my boss is yanking my chain to finish, I consolidated all of the grids into three, each of which ran in the same delta. lt is not as nice (well actually it is pretty nice) and can you give me a hint on how to go about this when it comes up again?

I am attaching a picture of our building lighting - just to let you know we are making progress.

Thanks for all your help Mathieu
Anne
B101 Lighting.jpg

Jürgen

unread,
May 3, 2019, 3:40:36 AM5/3/19
to Lightjams
maybe different running times you can set when you combine the grid activation slider with a timer function?

Jürgen

unread,
May 3, 2019, 3:42:08 AM5/3/19
to Lightjams
......and maybe the timer source could be a variable

cheers Jürgen

Jürgen

unread,
May 3, 2019, 3:43:18 AM5/3/19
to Lightjams
....or you combine the timer with a sequencer grid...

Mathieu

unread,
May 3, 2019, 6:39:25 AM5/3/19
to Lightjams
The if function takes as its 1st parameter a boolean value. It can be a number or any function returning a number. 0 is considered to mean false and any other value is considered to be true.

For the global memory function (gmem), if multiple grids are trying to set a new value based on the current value at the same time, then yes, you'll get a race condition.

Mathieu

unread,
May 3, 2019, 6:41:15 AM5/3/19
to Lightjams
For the different running times, maybe this sample project could be a starting point: https://groups.google.com/d/msg/lightjams/uuezYiZqipE/TbV_ba5ZD1AJ

anne breene

unread,
May 4, 2019, 6:39:58 PM5/4/19
to Lightjams


On Friday, May 3, 2019 at 6:39:25 AM UTC-4, Mathieu wrote:
The if function takes as its 1st parameter a boolean value. It can be a number or any function returning a number. 0 is considered to mean false and any other value is considered to be true.

For the global memory function (gmem), if multiple grids are trying to set a new value based on the current value at the same time, then yes, you'll get a race condition.

I am still mulling over the examples and suggestions, thank you for those!! 
Now, I have a question about gmem and what functions return values.
Ok, What about functions that do not return values, or where it is not clear that they do. For example, what does the gmem( , ) function return? I set 6 global memory slots to 0 to indicate that the grid referring to them has not been run yet, grecall should work just fine, but where do you initialize the gmem? I am missing something here. I put some timing functions in the sliders, but they seemed to immediately execute them. 

Thanks in advance.  Anne

Jürgen

unread,
May 5, 2019, 2:54:58 AM5/5/19
to Lightjams
Hi Anne

G MEM   ----   global Memory is a Variable and not a Function

mem is initialized with the Grid and GMem with the Projekt

.....so if you not close your Projekt you must reset the variable  with an program statement:

that could be every possible way to put a value into a variable....clock,timer,a specific grid activation and thousand other ways

Jürgen

Jürgen

unread,
May 5, 2019, 3:03:38 AM5/5/19
to Lightjams

....same way than you can use a slider

Jürgen

unread,
May 5, 2019, 3:15:31 AM5/5/19
to Lightjams

Reference.PNG

When I open this Reset-Grid  Gmem78 automaticaly gets the value of source 2 .....if source two is on 50%>>now Gmem(78) is on 50

so you can set many variables with opening a grid.

Give it an ID...and with calling the ID you have your reset.

You can use timer to close the grid then automaticaly after e.g. 0.5s



Mathieu

unread,
May 5, 2019, 12:01:41 PM5/5/19
to Lightjams
All functions return a number. The gmem function returns the value you've set.

For example, gmem(0, 100) returns 100. This allows chaining function calls.

anne breene

unread,
May 14, 2019, 2:24:28 PM5/14/19
to Lightjams
Jurgen, thank you! I am starting to get it. I am studying your and Mathieu's discussion of fading between two colors without defining a gradient. this is very cool. 

anne breene

unread,
May 14, 2019, 2:26:50 PM5/14/19
to Lightjams
Mathieu - I now have implemented the step times. This was a perfect starting point. Thank you. Now I just have to get the fades working.

Jürgen

unread,
May 14, 2019, 3:18:39 PM5/14/19
to Lightjams

Hi Anne....With Lightjams there are no limits.... thats great but sometimes it's like you are in a forest and can't see the trees :-)

Mathieu's support is the best I ever had with a software .....Thanks!!!

Since I am working with this program he added so many cool features that I dont know if there is something he could make better??


Reply all
Reply to author
Forward
0 new messages