'fading out' physics engine

Discuss Lemur and share techniques.
Post Reply
samvoltek
Newbie
Posts: 5
Joined: 22 Feb 2012 13:51

'fading out' physics engine

Post by samvoltek »

Hello,

Wonder if anyone can help me... I'm working on this template for sending MIDI CC values, and using mass-spring to create an LFO.
MultiLFO4.jzlib
Multiball Midi CC LFO
(24.83 KiB) Downloaded 75 times
I am struggling with the multiball physics.

What I am trying to achieve is this: When the 'Physic' button is switched off, rather than the multiball immediately jumping to a static value, I want it to slowly come to a stop, before switching to interpolate mode.

As I have it now, it comes to a stop, and then jumps to another value. I have no idea where it gets this value from either, doesn't seem to be related to Physics on or off messages.

Any tips would be hugely appreciated!

Thanks
Sam
samvoltek
Newbie
Posts: 5
Joined: 22 Feb 2012 13:51

Re: 'fading out' physics engine

Post by samvoltek »

Ah.. seems the value it jumps to is Multiball.x at the time Multiball.z goes to 0.

Think its solved now, added a 'bangvalue' expression to happen before the Multiball physics switches off, and this in the OnFrame timer script:

Code: Select all

delay = (time - starttime)<=2;
bangvalue = (time - starttime)<=1.8;

if ((bangvalue==0)&&(stage==2)) MultiLFO.x[0] = MultiLFO.x[0];

if ((delay==0)&&(stage==2)) 
{stage = 0;
FRICTION.x = 1;
physic = 1;
setattribute(MultiLFO, 'physic', physic);}
else return;
Will fix a few other things and upload to the user library soon i guess.
the end goal is to make this a multi channel LFO with cross modulation..but quite a way to go with that.. ;)
Post Reply