|
|
|
01-30-2008, 07:35 PM
|
#1
|
Human being with feelings
Join Date: Mar 2007
Location: Surrey, BC
Posts: 745
|
sliderchange() - does it work?
I've been trying to use the sliderchange function for a GUI I'm working on, but it doesn't seem to have any effect.
If I display the sliders for testing, when I interact with the GUI using the mouse, I see the sliders move but there is no parameter change for the sound. I've tried it with this function in or out with no success.
Has anyone else used it successfully?
Here's some sample code where I want to use it :
mouse_cap > 0 ? (
mouse_x >= 104 && mouse_x <= 272 && mouse_y >= 23 && mouse_y <= 40 ? (
count=0;
while (
(mouse_x >= 104+count*30 && mouse_x <= 124+count*30) ? (
value=count+1;
done == 0 ? (
slider1 < value ? slider1=value : slider1=value-1;
done=1;
);
);
count += 1;
count < 6;
);
mouse_cap==2 ? slider1 = 2;
sliderchange(slider1);
);
);
The only way I can get things to work is to repeat the applicable '@slider' code in the mouse handling event.
|
|
|
01-31-2008, 05:05 AM
|
#2
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
I noticed that yesterday. It seems that sliderchange() updates the display but doesn't actually execute the @slider code. Not sure if it's always been that way or if it's a bug that's crept in recently.
|
|
|
01-31-2008, 10:46 AM
|
#3
|
Human being with feelings
Join Date: Jan 2008
Location: Paris (FR)
Posts: 78
|
That can be problematic.
As I plan to use @gfx and trigger a @slider call when something changed...
Maybe, I have to work my updates in @block and have a trigger-boolean set by the gfx and/or slider section.
|
|
|
01-31-2008, 11:19 AM
|
#4
|
Human being with feelings
Join Date: Mar 2007
Location: Surrey, BC
Posts: 745
|
For now, I've moved all the code in the @slider section to the various mouse-handling code sections within the @gfx section and am using the sliders just to store the values set by the mouse actions - this seems to work OK.
cheers
|
|
|
02-01-2008, 04:14 AM
|
#5
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
Quote:
Originally Posted by ph69
Maybe, I have to work my updates in @block and have a trigger-boolean set by the gfx and/or slider section.
|
Yeah, that's how I've been getting around it.
|
|
|
10-16-2019, 01:26 PM
|
#6
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
This seems to still be the case!
Calling
Code:
sliderchange(slider1)
doesn't do anything to me. Assigning slider1 new values in my gfx code, updates the GUI but does not effect the sliderchange.
Luckily, now we can define functions, so I defined one function with all the slider changes, and call that from both the gfx code and @slider.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
10-18-2019, 11:17 AM
|
#7
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
|
Ha, would be nice to know if this is a bug or not!
|
|
|
05-27-2020, 10:28 AM
|
#8
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Anyone get this to work ?
@fabian
any chance of a demo snippet ?
Ta.
|
|
|
05-27-2020, 03:14 PM
|
#9
|
Human being with feelings
Join Date: Oct 2018
Posts: 26
|
Quote:
Originally Posted by J Reverb
Anyone get this to work ?
Ta.
|
Perhaps I misunderstand your problem - have you tried the function slider_automate()?
|
|
|
05-28-2020, 10:44 AM
|
#10
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by J Reverb
Anyone get this to work ?
@fabian
any chance of a demo snippet ?
Ta.
|
Snippet:
Code:
//...
@init
function effect_sliderchange()
(
solo_mute = slider2;
ch12 = abs((slider1 == 1) - solo_mute); // Some fancy pseudo-boolean stuff...
ch34 = abs((slider1 == 2) - solo_mute); // ... going on here
ch56 = abs((slider1 == 3) - solo_mute);
//...
);
//..
@slider
effect_sliderchange();
//...
@gfx 200 50
//...
effect_sliderchange();
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
05-30-2020, 05:04 AM
|
#11
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Thanks Fabian,
I am looking to set a slider to a value so it moves the slider cap to that value but doesn't send an actual output value until it is moved.
Is this possible ?
Sort of like a recall position thing.
|
|
|
05-30-2020, 10:56 AM
|
#12
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by J Reverb
Thanks Fabian,
I am looking to set a slider to a value so it moves the slider cap to that value but doesn't send an actual output value until it is moved.
Is this possible ?
Sort of like a recall position thing.
|
I think I understand: "set a slider to a value so it moves the slider cap to that value", and this is doable, just set "slider1 = 42;".
But I don't understand: "doesn't send an actual output value until it is moved". Do you mean that you want @slider not to be called when you set the value?
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
05-30-2020, 11:12 AM
|
#13
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
the only useful usage of sliderchange() in modern JSFX is to pass -1 to trigger a "configuration state changed for undo purposes" notification...
|
|
|
05-30-2020, 11:31 AM
|
#14
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
@Fabian
Quote:
Do you mean that you want @slider not to be called when you set the value?
|
Thanks,
Yes this is essentially what I am trying to do.
@Justin
Quote:
the only useful usage of sliderchange() in modern JSFX is to pass -1 to trigger a "configuration state changed for undo purposes" notification...
|
How would this be implemented ?
Thanks all.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:56 AM.
|