Page 1 of 1

Radio Button Help

Posted: 13 Jul 2014 04:16
by JES
Hi All,

I've just had my first day programming with Lemur and wow. It's so nice to be able to make exactly the custom interface I want. It goes perfectly with my Push.

But there's one thing I can't figure out.

I've got a row of six radio buttons. I want them to send 4 discrete values, MIDI channel 3, cc#9, and the values are 1, 47, 93, 101, 117, 127. I can't figure out from the manual, which speaks of a mysterious "X" and the Lemur editor interface, how I'm supposed to assign those different values to each button.

Many thanks.

--JES

Re: Radio Button Help

Posted: 13 Jul 2014 08:01
by lABl
Hi JES,

Yes, there are different ways to do this in lemur.

I've attached an example, you can make the ccout script global in your project to centralize all cc messages and re-use it for any object if you wish.

Hope this helps,
Cheers,

Re: Radio Button Help

Posted: 13 Jul 2014 14:34
by JES
Hi Iabi,

Thanks for sharing that with me, but I fear I am still confused. I've done stuff like html before but this is my first foray into Lemur so please treat me like I'm a n00b. I opened the object in the Lemur editor but I don't see the script anywhere to imitate. You can see my screen below. I know I am missing something obvious here.

Thanks.

--JES

Image

Re: Radio Button Help

Posted: 13 Jul 2014 15:27
by oldgearguy
click on the little triangle next to Switches in the lower right hand pane.

Re: Radio Button Help

Posted: 13 Jul 2014 23:42
by JES
Outstanding, thanks. I found the script and added it to my project and sort of got it sort of working. But when I hit any button other than the leftmost, it sends the value, then the leftmost button blinks and it sends a "1". Any idea what I'm getting that behaviour? I just need a 6-position switch.

Re: Radio Button Help

Posted: 14 Jul 2014 05:59
by lABl
Hi JES,

Sorry not sure if I follow, I have checked that one right now and seems to work here, the selected button sends the value pre-configured by myValues array.

It should works in a different way maybe ?

Cheers,

Re: Radio Button Help

Posted: 14 Jul 2014 18:54
by Softcore
Hello Jes....make sure you copied ALL the stuff found inside the switches (scripts AND arrays)

Also make sure, that 'x' is not mapped natively to anything (untick it in the same window)

BTW, in order to comprehend what you saw in the manual, you could use the native 'x' mapping, IF the CC numbers were consecutive for the six buttons and you needed all of them to send on - off values (0-127)

Re: Radio Button Help

Posted: 14 Jul 2014 19:48
by JES
Thanks for all the help! So here was my mistake: I changed the MIDI from note send to CC send, and that somehow messed it all up. Now it's behaving just fine with note send.

Also thanks Softcore for the link in your sig for newbie scripts. I'd be grateful for suggestions of other basic tutorials. I think I will tackle the accelerometer next.

--JES

Re: Radio Button Help

Posted: 16 Jul 2014 06:25
by lABl
Hi JES,

Good to know you have this sorted.

Just a thing though, if you going to use this for more objects, I would recommed to keep ccout() script and TARGET variable globals, otherwise would be a bit redudant.

I've attached an example, you will see now that ccout() script and TARGET variable is at top by clicking on "myContainer" triangle and they are not inside of each switches object.
Global ccout() and target.png
Global ccout() and target.png (11.48 KiB) Viewed 2220 times
Cheers.