controlling LEDs with OSC from m4l?

Discuss problems and solutions.
Post Reply
dbk
Regular
Posts:98
Joined:14 Dec 2011 11:35
controlling LEDs with OSC from m4l?

Post by dbk » 16 Dec 2013 20:55

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.
Attachments
Bildschirmfoto 2013-12-16 um 21.59.07.png
Bildschirmfoto 2013-12-16 um 21.59.07.png (49.62KiB)Viewed 2167 times
Bildschirmfoto 2013-12-16 um 21.49.20.png
The Editor
Bildschirmfoto 2013-12-16 um 21.49.20.png (118.26KiB)Viewed 2168 times

dbk
Regular
Posts:98
Joined:14 Dec 2011 11:35

Re: controlling LEDs with OSC from m4l?

Post by dbk » 16 Dec 2013 23:09

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

dbk
Regular
Posts:98
Joined:14 Dec 2011 11:35

Re: controlling LEDs with OSC from m4l?

Post by dbk » 21 Dec 2013 16:12

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.

dbk
Regular
Posts:98
Joined:14 Dec 2011 11:35

Re: controlling LEDs with OSC from m4l?

Post by dbk » 30 Dec 2013 19:56

ok, i got this working. The template sends and receive OSC-Data.#
first video, no musical statement :)

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


dbk
Regular
Posts:98
Joined:14 Dec 2011 11:35

Re: controlling LEDs with OSC from m4l?

Post by dbk » 31 Dec 2013 00:28

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

wurlt01
Regular
Posts:118
Joined:25 Feb 2012 15:21

Re: controlling LEDs with OSC from m4l?

Post by wurlt01 » 31 Dec 2013 18:23

Look great. I need something like this. very cool. sequncers are made for lemur.

Post Reply