Welcome to %s forums

BrainModular Users Forum

Login Register

inertia scrolling

I need help on a Patch
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 06 Aug 2010, 02:53

well i ve got several inertia scrolling systems that work ok, but based on a relative delta with some smooth, however I fail
to see the wiring / patch / algo for the case im after:

(it's to scroll the matrix) but to make it simpler wordz i would like to make exactly the iphone contact scrolling system.

that mean when mouse down , the item scroll being sticky locked to finger in an absolute position, on release it continue to scroll then stop based on velocity/inertia. I can get the two, but not perfect when booth yet, wonder if some would have a better tech.
ideally id like as well to stop the scoll when re pressing a second time, like the iphone or comboboxes.

any ideas of the schem?

wonder if need to use smooth, delta, compare absolute positions, or some lines that plays on mouse relase ect...,
it's more the "math" or inertia that is a bit unclear

if some has an ideas (test on an xY) i could reuse, would be cool.

Or Olivier if ya read, could you enlight me a bit on process ya used in IB or comboboxes?

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 06 Aug 2010, 08:23

ambitious project,
I'm sure you're gone kill, as usual!

nothing really revolutionary into the inertia concept and I'm not sure I can help you.
If the Usine code, I use a inertiaSpeed variable,

Code: Select all

InertiaSpeed := InertiaFactor/(LastMouseUpTime-LastMouseDownTime);
then I calculate the speed in a loop:

Code: Select all

speed = speed *InertiaSpeed

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 06 Aug 2010, 11:37

thanks a lot olivier, that's exactly what i needed, will try that tonight. i was getting to much complex systems, that's what i thought.

cool.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 06 Aug 2010, 11:39

of course the InertiaSpeed must be <1 !

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 08 Aug 2010, 10:10

ok cool,

ive manage to get pretty what i wanted. cool inertia XY matrix scrolling. work like a charm. maybe my tek is not the most cpu
efficient but very happy with results, quasi iphone like scrolling my liveset, no terrible spikes.. kind of juicy.

however i didn't used exactly this formula, cause i failed to understand, for me inertia was more related to velocity/acceleration
than time, so that even if long time between mouse events but a quick shift acceleration before mouse relase it can still have a
big move/inertia. that lead me to have to know the velocity, by sampling moves over a time clock and analyse variations just before mouse release, a bit more complex, maybe there is a simpler technique based on delta but i failed..
what do ya mean by "speed" in your process, how is it computed, relating to a time clock and position moves, (if so, what
kind of time clock equivalent at patch level?), or something else..?

here is the patch in case some are interested or find better/optimized way to achieve similar results.
basically i need that when moving the mouse in the item along XorY size, it "scrolls" of one unit, to keep an absolute scrolling
in the window, but inertia make it can scroll of more and has a relative in/decrement, for a biger than 0..1 range.

XY_inerta_test

Floego
Member
Posts: 319
Location: Venezuela
Contact:

Unread post by Floego » 08 Aug 2010, 21:49

I tested your patch, very useful! :cool:
I'm working on a patch that needs this kind of control (x-axis only) for a lenghty fader.
I just saved it in my usine library :)

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 12 Aug 2010, 12:44

Hello 23 FX,

I'm late...

I just have tested your Inertia patch. And they are realy great and helpfull.

For me your buttons and your inertia module are a very good candidate for User modules.

In 2074 when i script very well and i have discover the C++ language i convert your patch in User module ;-)).
HB

Lines / Points / Squares

http://www.hervebirolini.com/

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 12 Aug 2010, 13:27

thanks multiphone, glad it's helpful for you.

i found a more precise/lower cpu technique, will see if i can script it and post later...

Post Reply

Who is online

Users browsing this forum: No registered users and 62 guests