Page 1 of 1

Controlling container Tabs with other controls- and messages

Posted: 27 Mar 2013 22:34
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

Re: Controlling container Tabs with other controls- and mess

Posted: 22 Apr 2014 13:45
by steo0315
WOW ! Thanks that was exactly what I was looking for !!
Can you explain how it works ?

((steo))

Re: Controlling container Tabs with other controls- and mess

Posted: 22 Apr 2014 18:59
by Softcore
Yeah sure, read the lemur manual then check out the "selTab" scripts in the menu, Pad, and switch objects! ;)

Re: Controlling container Tabs with other controls- and mess

Posted: 22 Apr 2014 21:08
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.