Page 1 of 1

controlling LEDs with OSC from m4l?

Posted: 16 Dec 2013 20:55
by dbk
Hello,

recently i finished an OSC template for the ml-185 stage sequencer, an m4l implementation of the famous ryk sequencer for the roland system 100m.

So far everything works fine *applause* but i can´t figure out how to light a row of 8 LEDs through OSC.

As if this wasnt enough, there would have to be some timing becuase the stage sequencer can stay on a given stage for up to 8 ticks and there are various modes:
one example, on the "hold" mode, the LED would have to stay on as long as the stage is active, if mode would be "off" the LED wouldn´t lit at all.

i do get OSC messages from m4l to the lemur, please see screenshot attached.

any help greatly apprechiated, mind i´m no pro sp please bear with me :)

Thanks,
dbk

p.s.: i can take no credit for the sequencer itself, not my fantastic work.

Re: controlling LEDs with OSC from m4l?

Posted: 16 Dec 2013 23:09
by dbk
so i made some progress, when i use this script

Code: Select all

onOSC LED1/out/

Code: Select all

decl offset = OSC_ARGS;

if(offset == 1)
{
Leds.value={1,0,0,0,0,0,0,0};
}
else
{
Leds.value={0,0,0,0,0,0,0,0};
}
the first LED is on and the others are off, good thing is, that the stagelength works allready, no troubles here

so now i wonder what to do, because i got eight of those leds to take care off.

can one script handle more than one OSC argument, like can i work LED1 to LED8 in one script?

thanks a lot,
dbk

Re: controlling LEDs with OSC from m4l?

Posted: 21 Dec 2013 16:12
by dbk
sorry if this turns into some kind of diary here :)

i got it working but instead of the tiny LEDs i decided to use the sliders as indicators and use the setattribute to achieve this.:

Code: Select all

decl led_on = OSC_ARGS;

if(led_on == 1)
{
setattribute(Pitch,'color',RGB(0,1,1));
}
else
{
setattribute(Pitch,'color',RGB(255,10,12));
}
works great but at this poibnt i have 8 scripts in the project, each addressing it´s own slider to get step sequencer light going.

i´m sure there´s a more elegant way to do this, any help still apprechiated.

Re: controlling LEDs with OSC from m4l?

Posted: 30 Dec 2013 19:56
by dbk
ok, i got this working. The template sends and receive OSC-Data.#
first video, no musical statement :)

http://www.youtube.com/watch?v=-voEAWpyYZg

Re: controlling LEDs with OSC from m4l?

Posted: 30 Dec 2013 19:57
by Softcore
Niiiiiiiiiiceeeeeeeee!

Re: controlling LEDs with OSC from m4l?

Posted: 31 Dec 2013 00:28
by dbk
thanks, this is my first template with OSC and my first time with m4l, interesting experience so far :)

i think a lot of the scripting couldhave been made better but it works fine, i´m testing it a lot and had no problems so far.
sometimes it´s dropping a visual step on the lemur, i believe this is due to the fact, that my lemur runs through the internet router and not with a direct connection to the mac.

also, i didn´t write the sequencer itself, this fine work is by 3st:
http://www.maxforlive.com/profile/user/3st

anyway, intersting times, feels good and makes sense to sequence the modular with the mac, so much possibilities, best of both worlds

Re: controlling LEDs with OSC from m4l?

Posted: 31 Dec 2013 18:23
by wurlt01
Look great. I need something like this. very cool. sequncers are made for lemur.