Old 01-21-2017, 02:56 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default JSFX reinitialize or keep variable values

In my JSFX project I have parameters that need to be recalculated when moving a slider.

Not the @slider event is also called when repositioning the play cursor and starting the playback. I would like to keep those values and have them changed only when starting the project and when moving a slider.

How can I tell which action called the @slider event ?

-Michael
mschnell is offline   Reply With Quote
Old 01-21-2017, 08:46 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Probably the easiest way is to just check to see if the values changed from the last time you called them... There is also ext_noinit=1, which you can set in @init, which will prevent the state from being reset on playback start/play head move, which might help, but also has other consequences (not clearing out state)...
Justin is offline   Reply With Quote
Old 01-21-2017, 01:22 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by Justin View Post
Probably the easiest way is to just check to see if the values changed from the last time you called them...
In fact hen starting the playback the variables are reset to zero;

Quote:
Originally Posted by Justin View Post
There is also ext_noinit=1, which you can set in @init, which will prevent the state from being reset on playback start/play head move, which might help, but also has other consequences (not clearing out state)...
This seems like solving the problem.

Thanks,
-Michael

Last edited by mschnell; 01-21-2017 at 03:12 PM.
mschnell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.