Radio Button Help

Discuss Lemur and share techniques.
Post Reply
JES
Newbie
Posts:13
Joined:02 Feb 2014 14:31
Radio Button Help

Post by JES » 13 Jul 2014 04:16

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

lABl
Lemur Guru
Posts:269
Joined:09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post by lABl » 13 Jul 2014 08:01

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,
Attachments
CC Radio.jzlib
(2.26KiB)Downloaded 131 times

JES
Newbie
Posts:13
Joined:02 Feb 2014 14:31

Re: Radio Button Help

Post by JES » 13 Jul 2014 14:34

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

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: Radio Button Help

Post by oldgearguy » 13 Jul 2014 15:27

click on the little triangle next to Switches in the lower right hand pane.

JES
Newbie
Posts:13
Joined:02 Feb 2014 14:31

Re: Radio Button Help

Post by JES » 13 Jul 2014 23:42

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.

lABl
Lemur Guru
Posts:269
Joined:09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post by lABl » 14 Jul 2014 05:59

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,

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: Radio Button Help

Post by Softcore » 14 Jul 2014 18:54

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)

JES
Newbie
Posts:13
Joined:02 Feb 2014 14:31

Re: Radio Button Help

Post by JES » 14 Jul 2014 19:48

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

lABl
Lemur Guru
Posts:269
Joined:09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post by lABl » 16 Jul 2014 06:25

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.48KiB)Viewed 2411 times
Cheers.
Attachments
CC Radio.jzlib
(7.04KiB)Downloaded 99 times

Post Reply