Controlling container Tabs with other controls- and messages

Post and discuss Lemur Modules.
Post Reply
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Controlling container Tabs with other controls- and messages

Post by Softcore »

Many people seem to be struggling with this or asking about how could someone control which tab of a container is visible via incoming midi or OSC messages. The logic is quite simple - by creating pads, buttons or any other objects with scripts to select a container's tab, you can then send your "messages" to those controls which in turn will control the tab.

For learning purposes, here's an example template with menu, pads, and switch objects controlling the tabs of containers. The menu and switches objects also have the advantage that you can see which tab is currently visible ;)
TabControl.jzml
(7.41 KiB) Downloaded 1070 times
steo0315
Newbie
Posts: 5
Joined: 10 Jul 2012 02:12

Re: Controlling container Tabs with other controls- and mess

Post by steo0315 »

WOW ! Thanks that was exactly what I was looking for !!
Can you explain how it works ?

((steo))
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Controlling container Tabs with other controls- and mess

Post by Softcore »

Yeah sure, read the lemur manual then check out the "selTab" scripts in the menu, Pad, and switch objects! ;)
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Controlling container Tabs with other controls- and mess

Post by oldgearguy »

He's not being mean -- I pulled up the .jzml in a text editor and could clearly see how it worked. I didn't even have to run it.

Run it in the Lemur editor, look at the selTab() scripts in the various objects and you'll see what's happening. One note - if you're not used to programming, most things start counting with 0. So the first tab internally is number 0, the first menu selection value is 0, the first button/switch in a matrix is 0, and so on.

This really is a 'follow the dots' to go from one thing to the next. What you learn by studying this will help you implement it the way you want in your own scripts. Lemur coding is definitely not simply 'cut and paste'; you really have to understand the bits and pieces you borrow.
Post Reply