Page 1 of 1

Best way to do running lights

Posted: 11 Nov 2012 19:57
by electrofux
I want to implement a running light with either an Led object, or a pad object (1 row of 16).

Now, i get a Note On signal that delivers me the step to be light in a variable.

But just cant figure out how to lit unlit a single led i though i can do it like this:

setattribute(Leds[step],'value',1);

or

setattribute(Pads[step],'color',{1111111,2222222);

But it doesn't work. How can i lit/unlit single Leds/Pads in a row?

Re: Best way to do running lights

Posted: 17 Nov 2012 23:17
by m127
I was wondering about the same thing.
It looks like pads' light/color attribute cannot be set individually within an array of pads, like:

Code: Select all

    setattibute(pads[5], 'light', -2);
Hope a mod/support rep chimes in to explain!

Re: Best way to do running lights

Posted: 21 Nov 2012 16:00
by electrofux
The way i solved it was resending the whole array with the changed single value. But i assume this is not very efficient though i am not really sure about this. Maybe this is just how it is done.

There is also the "set(a,value,position)" function but i haven't had any luck with this too.

Re: Best way to do running lights

Posted: 22 Nov 2012 04:32
by Macciza
Hi
Set the BarGraph option to off . . .
Then you can use Leds.value[n]= 1 to turn on individual bits
or Leds.value= n to toggle them all

Cheers
MM