General

Switching on/off a single LED in an array of 64 Leds

Started by dbk on .

Sign in or create an account to join the conversation.

12 posts

Topic starter
Hello,

i´m creating a pattern changer for a Machinedrum, i have 64 Leds in front of 64 switches, so far everything works fine.

the plan is, that the switch (not visible) turns on the Led above it. like you´ve seen it in teh fantastic Scapes Template for the lemur. I tried to find out how he did it, but i didn´t get through his code, way above my head :/

i imagine the code could be something like this:
setattribute(Leds.x[firstof(Switch.x)], 'Value', 1);
however, i have a hard time finding a way to switch on a given Led of the 64.

A little hint in the right direction would be very much apprechiated.

thanks in advance,
Martin
Hello Antonio,


thanks a lot for providing an example. This helped a lot and i learned the usage of stretch.

i really like your scapes template, the gui is fantastic too.

thanks again and cheers,
Martin
And what if I would like using LEDs like level meters? So, a row of 16 LEDs, for example, all of them green all the time (on and off) except last three, that turns red when they turn ON. Is it possible?

Thanks and best regards.
Hey, Antonio, thank you very much :-)

Your english hasn´t any problem, it´s mine wich has it ;)

I´m trying to adapt your example to "value" from "ledMain" (to get externals values from OSC), but I can´t... How could I do it?

(In spanish):

Hola Antonio, muchas gracias! :-)

Mi intención es que funcione como tu ejemplo, pero en vez de hacerlo con el fader, lo haga con valores provenientes via OSC. Lo he intentado con tu ejemplo, pero no lo consigo. Abusando de tu amabilidad, ¿cómo podría hacerlo?

Ah, y perdona mi inglés, lo tengo muy oxidado :-)

Gracias y un saludo!
Mil gracias, Antonio, va de miedo y es lo único que me faltaba para terminar una plantilla que tengo sobre mi patch Max/MSP para mis conciertos, así que me viene de miedo. He comprobado que puedo poner el script del container en cualquiera de los LEDs y sigue funcionando (me interesa sin container), así que me has hecho un favor inmenso, muchísimas gracias. Y además he aprendido sobre Lemur mirando tu código, porque dedicándome a Max tengo muy abandonada la programación de Lemur hace tiempo, que uno no tiene tiempo para todo ya...

Un abrazo!
Hey,

Denada compañero, me alegra saber que te funciona, lo del contenedor simplemente puedes hacerlo transparente como ya sabrás, lo hice más que nada por mantener todo el código dentro y fuera más simple, también es un poco mi forma de programar la de dejar los scripts importantes más visibles. Pero ya has visto que puedes moverlo como quieras.

Un saludo!
Hello,
i'm trying to do the same for the reaper template i'm working on, but my scripting level is too limited.
I want 3 led colors for audio level using osc variable from Reaper.
Can someone help me to sort this out.
Thanks

Edit: i did not post the right file with change in code, i will try to find the solution ....
Hi
Well it's not 'all' broken, but you can't just check boxes and add some stuff and expect it to work . . .

You need to edit the ledmeter script to deal with the 24 values and 3 separate led segments . . .
Should not be too hard . . .

Cheers
MM