Easy math issue for newbie

Discuss problems and solutions.
Post Reply
nizer
Newbie
Posts: 14
Joined: 03 May 2015 16:40

Easy math issue for newbie

Post by nizer »

Just want to have a number count down by minutes.

Say 90 appears in a field and subtracts 1 from it every minute.

Thanks for any help.
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Easy math issue for newbie

Post by MrCorba »

I've added a working example below. I've added comments to hopefully let you understand what's going on, so you can use the logic in other scripting;)
Attachments
Counter.jzml
(1.62 KiB) Downloaded 69 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
nizer
Newbie
Posts: 14
Joined: 03 May 2015 16:40

Re: Easy math issue for newbie

Post by nizer »

Amazing thank you.

I have a couple more tweaks that I can't figure out cuz I'm not a programmer.

Can it turn red when it is below zero, have a minus sign by it and continue to count down?

I assume I can remotely via OSC from QLab send a "time" variable to change the 90 to some other time.

So much appreciate the work you did.
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Easy math issue for newbie

Post by MrCorba »

If you remove the if statement and everything in it, it will get passed zero with a negative.

For the color you can just use a same like if statement but use "setattribute(Object, 'color', ####)'. If you check the lemur user guide I'm sure you can figure it out. Let me know if you succeed.
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Post Reply