Making fader spring loaded?

Discuss Lemur and share techniques.
Post Reply
AdamD
Newbie
Posts: 14
Joined: 16 Jan 2013 13:59

Making fader spring loaded?

Post by AdamD »

I can't seem to figure out how to make a standard fader spring loaded. What I want to do is put my finger on the fader and the push it up, but then have it snap back to zero when I let go. I KNOW I have done this in the past, but for some reason I can't seem to figure out how. I want it so that I actually have to be touching the fader knob (so I don't accidentally slide it up) and I want it to track with my finger movement up or down, smoothly, but quickly. Can somebody remind me how to do that?

Thanks!
brianc
Regular
Posts: 87
Joined: 10 Jan 2012 02:16

Re: Making fader spring loaded?

Post by brianc »

Not sure about the fader, but if you use a multislider, go to "Behavior" and turn on Physics, set the height to 0 (or whatever you want your non-touched value to be), and you're set. You can tweak the tension and friction to get it snapping back as quickly or slowly as you'd like.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Making fader spring loaded?

Post by Macciza »

Set Fader Cursor Mode to 'Cap Only', Physics to 'None' . .
And add a script under the Fader :Execution on z , any - if (z==0) x=0);

Fader will only move when the Cap is touched and will reset to O when released . . .
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
AdamD
Newbie
Posts: 14
Joined: 16 Jan 2013 13:59

Re: Making fader spring loaded?

Post by AdamD »

Thanks. brianc, I got it to work using multislider. Macciza, I am fascinated with your suggestion, but I wasn't able to make it work. Any suggestions? I coped your script into the the script box, and set the behavior as you suggested. But I must be missing something. But still, if you'd be willing to teach me, I'd love to get into this side of Lemur! Have been too timid to try thus far.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Making fader spring loaded?

Post by Macciza »

Something like this . .
^^autoresetFader.jzlib
Auto resetting Fader
(2.15 KiB) Downloaded 155 times
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
AdamD
Newbie
Posts: 14
Joined: 16 Jan 2013 13:59

Re: Making fader spring loaded?

Post by AdamD »

Macciza,
that is so AWESOME!!!! Thank you so much. And by looking at what you did, I now understand what to do in the future. I guess I could go into a bunch of Lemur templates now and start reverse engineering scripts that I like?!

Thanks for taking the time to help me out.
Post Reply