Friends, Lemans, Forum-men, lend me your rack ears

Discuss Lemur and share techniques.
Glennzone
Newbie
Posts: 23
Joined: 18 Jan 2013 22:16

Friends, Lemans, Forum-men, lend me your rack ears

Post by Glennzone »

Hello all,

I'm building a Max standalone application, and have a particular request regarding what's possible with the Lemur for iPad :

My particular application aims to make "racks of gear" where 3 or 4 devices are always in view, and you navigate between racks with a swipe to the left, a swipe to the right, . . . I haven't figured that one out yet.

Is there already a way to swipe like this within Lemur ?

If so, is it possible to swipe right or left at the lowest position in the rack (or middle or upper) to another rack module to the left or right while the others remain the same ? I don't see any mention of swipes anywhere in the Lemur manual, or community.

Looking forward to some replies on this one.

Thanks,
Glennzone
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Traxus »

No, but you can use faders as scroll bars, and write scripts to change the X and Y positions of containers and other objects so that they are moved off of the screen. So, a container that is 200px tall, that has its x set to -200 will not be visible on the screen.
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Joe Soap »

"Gesture" object.
Glennzone
Newbie
Posts: 23
Joined: 18 Jan 2013 22:16

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Glennzone »

Thank you, folks. That points me in a couple different directions, but can I get more specifics ? Are there any usages currently available for me to "decompile?"

I've only just begun with Lemur, and I need more to on. At least it gives me hope.

I really need to beat this one, please.

Glennzone
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Softcore »

Here's a complete example.....just drag left-right on the Racks' names - acceleration feature provided too ;)

That said, even if impressive, its counterintuitive to work in Lemur with scrolls.....What if you wanted Rack1 combined with Rack6 on the screen? I believe buttons to hide-show desired racks is more practical.....

Aaaanyways......
Scrollable_racks.jzml
(56.98 KiB) Downloaded 121 times
A vector "R_loc" is storing the current location and size of the Racks Container which keeps all the racks enclosed. A script in Gesture object, placed "above" the Racks container, changes the "x" of R_loc according to the x of Gesture and keeps the rest of the values intact. Keep in mind the gesture object is not part of the official librayr of objects of Lemur so you better export it from the example above to your library to re-use it.

Its x max min values in its attributes are 0 (the maximum x location of our Racks container, while its minimum is calculated by subtracting the width of iPad screen 1020 from the total width of our Racks, (in this case 3000) so its set to -1980. If you desire larger Rack encloser (more Racks iside).....you need to also re-calculate the minimum value for Gesture x. If for example your Racks container is going to be 6000 wide, you need to set Gesture's x minimum to - 4.980 (6000-1020 = 4.980).

You can also set acceleration to your liking by adjusting the Gesture's object acceleration.....you could even add a knob in the non scrollable area to set it real time if for example you want to quickly jump from first rack to last rack (high acceleration value).

Now, to achieve something like "we have 4 racks always visible, and we scroll in each one of them to select which one is currently visible", you 'd have to decrease the Racks container width to 1/4 of the screen and repeat the process to create 4 Rack containers, with scrollable content inside. In this case you'd also need 4 Gesture objects, one for each Rack container placed on top or at the bottom of the Rack Containers but "outside" of them (we dont want our scrollbar to scroll too if you get me). On the middle wouldnt be possible as, even if "transparent" it "blocks" the "cursors" (your fingers) from touching the controls below it. For example if placed in middle, the Gesture object wont allow you to interact with the content of the container such as Knobs, buttons, etc etc.

A cunning way however would be to create a "blank space" in each rack, right around where you want the scroll area to be and then rely on a gesture object with small height, your good finger targeting and the "capture" property on all controls and the gesture object.

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

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Softcore »

Actually it was stupid to have a global expression for the rect of the Racks container....on init its set to 0 and the Racks container is shrunk in the corner.....and there really is no need to....

heres the correct-fixed one.......
Scrollable_racks.jzml
(56.72 KiB) Downloaded 124 times
In this one, the location and size of the Racks container is declared as a variable inside the script of gesture object.... ;)
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Joe Soap »

You could use a modifier to temporarily overlay the Gesture on top of the full rack either, though I do like your idea of using a very small Gesture obj with capture too.
Glennzone
Newbie
Posts: 23
Joined: 18 Jan 2013 22:16

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Glennzone »

Wow, Softcore ! What a reply !! You guys really stepped up ! :-D

I was sure this could not be something I alone was after, but of course using the swipe for lateral navigation is going to multiply the accessibility and functionality, and keep it all within two motions : 1) the swipe, and 2) the tabs, . . . and you're there !

I do have the "patch" (?) loaded now, but of course it doesn't really do anything right out of the box. I'm so new at Lemur, I will definitely have to sit down with this one. :-)

I have to get back to making some music now before I re-insert myself into the Max standalone development, but I will explore this as soon as I have a nice cozy block of time.

Thanks again,
Glennzone
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Softcore »

No prob! Sent the message above while not having the iPad with me - just tested the last example and works as intended.....gotta say it looks impressive to have stuff scrolled in Lemur.......hmmmmmmmm......lol
Joe Soap
Regular
Posts: 462
Joined: 07 Jul 2012 15:04

Re: Friends, Lemans, Forum-men, lend me your rack ears

Post by Joe Soap »

Version with the scroller embedded in the Container to be scrolled. ;)

Yeah - the template's really not supposed to do anything in particular except demonstrate a little bit of scroller code / technique, unless you map the "racks" to something.
Attachments
Swipe2Scroll_SoAPMoD.jzml
(57.42 KiB) Downloaded 108 times
Post Reply