Radio Button Help

Discuss Lemur and share techniques.
Post Reply
JES
Newbie
Posts: 12
Joined: 02 Feb 2014 14:31

Radio Button Help

Post 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
lABl
Lemur Guru
Posts: 269
Joined: 09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post 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,
Attachments
CC Radio.jzlib
(2.26 KiB) Downloaded 120 times
JES
Newbie
Posts: 12
Joined: 02 Feb 2014 14:31

Re: Radio Button Help

Post 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
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Radio Button Help

Post by oldgearguy »

click on the little triangle next to Switches in the lower right hand pane.
JES
Newbie
Posts: 12
Joined: 02 Feb 2014 14:31

Re: Radio Button Help

Post 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.
lABl
Lemur Guru
Posts: 269
Joined: 09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post 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,
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Radio Button Help

Post 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)
JES
Newbie
Posts: 12
Joined: 02 Feb 2014 14:31

Re: Radio Button Help

Post 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
lABl
Lemur Guru
Posts: 269
Joined: 09 Dec 2011 15:56
Contact:

Re: Radio Button Help

Post 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 2218 times
Cheers.
Attachments
CC Radio.jzlib
(7.04 KiB) Downloaded 87 times
Post Reply