Page 1 of 1

multipad with blinking last pressed button?? [solved]

Posted: 05 Apr 2017 19:06
by dburns
OK, I'm just obsessed, and feeling dumb. Super thankful to Antonio for the script on the blinking singular pad- But now I'm hoping to do the same thing to a pad that has 1 column and say 4 rows where the last pressed is the one that is "blinking"

expressions declared-
flash=0
flashMaxLight=.75
lastTime=0
router=0

my flash script became- (flashprocess)

on frame-
if (!router) return;
flash = sin(time*4)*+.3+.3; // which gives more of a sine wave ramp up and down light brightness then a blink

the script (rstart) I kept the same as

on pad pressed-
lastTime = time;
router = !router;
flash = 0;

I know the script to light up the last pressed button is as follows-
expression declared-
s=

script (act)
on expression x rising
decl i, size = sizeof(x);
for (i=0;i<size;i++){
if (!x) s=0;
else s=1;
}

Where light= s

This lights up the last pressed but it's a static on. How in heck do I combine these two????

thanks in advance for any insight.

Re: multipad with blinking last pressed button??

Posted: 09 Apr 2017 18:26
by dburns
OK, so with the following I can make any pressed pad blink while I am holding it down, but it stops upon release of the pad.I created the expression "s" at the pad level outside the script and made the "light=" value = s

on frame-
decl i, size = sizeof(x);
decl flash=(tan(time*5))/3+.3+.3;

for (i=0;i<size;i++)
{
if (!x) s=0;
else s=flash;
}

I guess I need to somehow separate the flashing script and have it run on frame, but somehow make the value for s on an expression "x" script while rising.

So close

Re: multipad with blinking last pressed button??

Posted: 13 Apr 2017 15:27
by dburns
So downloaded 120 odd times and no one willing to step forward with a solution?

Willing to pay someone for a proper script, pm me if you are interested.

Re: multipad with blinking last pressed button??

Posted: 14 Apr 2017 10:03
by lABl
Hi dburns,

I've made a quick example, is something like this what you're looking for?
AB Flash Pad Multi.jzlib
(5.75KiB)Downloaded 271 times
Hope that helps,
Cheers!

Re: multipad with blinking last pressed button??

Posted: 14 Apr 2017 18:10
by dburns
Once again, thanks Antonio, and thnx for the pm as well. You're the best!