Old 06-29-2015, 03:14 AM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default Q: Rename slider?

Did I read somewhere that sliders could be renamed, that is, the slider description changed?

If so, please post a link.

Or was that just a dream?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-29-2015, 04:05 AM   #2
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

+ JSFX: support for naming sliderXY variables via @sliderx:varname=defval<... syntax
EvilDragon is offline   Reply With Quote
Old 06-29-2015, 05:49 AM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Thank you for the text (part of v4.77 Change Log).

I've tried various things but cannot get it to do anything. Does anyone have a working example of its use?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-29-2015, 11:26 PM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by EvilDragon View Post
+ JSFX: support for naming sliderXY variables via @sliderx:varname=defval<... syntax
This does not add support for changing slider descriptions, but rather automatically links a JSFX variable to a slider. Consider this:

Code:
slider1:0.5<0,1>Gain

@slider
gain = slider1;

@sample
spl0 *= gain;
spl1 *= gain;
Using the new syntax this could simply be:

Code:
slider1:gain=0.5<0,1>Gain

@sample
spl0 *= gain;
spl1 *= gain;
AFAIK there is no way to rename sliders on the fly.
Tale is offline   Reply With Quote
Old 06-30-2015, 12:59 AM   #5
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

Quote:
AFAIK there is no way to rename sliders on the fly.
damn! I didn't even know flys had sliders! but now that I dbl check, mine says "LEVIS"
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-30-2015, 01:16 AM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

OK, thank you.

From Tale's example, can I then use, for example, gain = 0; to set the slider value or do I still need sliderchange() too?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-30-2015, 01:32 AM   #7
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by DarkStar View Post
From Tale's example, can I then use, for example, gain = 0; to set the slider value or do I still need sliderchange() too?
Well, you can do gain=x, and this will update the slider (i.e. in my example gain is simply an alias for slider1).

According to the JSFX documentation you should call sliderchange() if you change a slider from outside @slider. However, if you don't do this it still updates just fine, so I guess sliderchange() is no longer needed (but maybe we should ask the developers about this). You might still want to call sliderchange() though, if you want your scripts to run older REAPER/ReaJS vesions.

EDIT: I have asked Justin about sliderchange().

Quote:
Originally Posted by hopi View Post
damn! I didn't even know flys had sliders! but now that I dbl check, mine says "LEVIS"
Actually there are no sliders on flies, which is why you can't rename them. Duh!

Last edited by Tale; 06-30-2015 at 01:36 AM. Reason: Asked Justin about sliderchange()
Tale is offline   Reply With Quote
Old 06-30-2015, 01:36 AM   #8
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

^^^^
If it helps, you can have a spider on a fly:


[Disclaimer: self-derail post]
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 06-30-2015, 01:37 AM   #9
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

So, can I rename them?
Tale is offline   Reply With Quote
Old 06-30-2015, 11:38 AM   #10
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Quote:
Originally Posted by Tale View Post
I have asked Justin about sliderchange().
I have an answer: "Hmm probably not, but maybe?"

If you use the new sliderN= syntax, then you obviously need a recent REAPER version anyway, so I guess you can leave out sliderchange(). However, because I try to keep my JSFX pack compatible with REAPER v4.25+, I wouldn't use sliderN=, and likewise I would add sliderchange() just to be sure.
Tale 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 02:08 PM.


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