Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 01-08-2014, 05:48 AM   #1
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default IX/GlobalSliders: Parameter linker avoiding global memory

There are other JS available for use with REAPER's parameter modulation but they all rely on the use of JS global memory, which can potentially be a problem when one plugin unwittingly overwrites another's state. It's now possible to avoid this problem by using global namespaces so I made a simple plugin to take advantage of the newer features.

In the stash at https://stash.reaper.fm/v/19415/GlobalSliders.

Code:
desc:Globally synchronised sliders (for parameter linking)

/*************************************************************
version 1.4a

Four banks of eight sliders for use with parameter modulation,
using custom namespaces to avoid using global memory.

If you modify this, please replace references to the namespace
IX.GlobalSliders with a namespace of your own to avoid clashes.

Slider updates are performed in @block since REAPER parameter
modulation is also updated on a per block basis ie. there's no
accuracy to be gained by moving the updates into @sample
*************************************************************/

in_pin:none
out_pin:none

slider1:0<0,3,1>bank
slider2:0<0,100,0.001>a
slider3:0<0,100,0.001>b
slider4:0<0,100,0.001>c
slider5:0<0,100,0.001>d
slider6:0<0,100,0.001>e
slider7:0<0,100,0.001>f
slider8:0<0,100,0.001>g
slider9:0<0,100,0.001>h

@init
bankchange = 1; // Prevent new instances from clearing existing values

@serialize
function SerializeBank(bank*)
(
  file_var(0, bank.a);
  file_var(0, bank.b);
  file_var(0, bank.c);
  file_var(0, bank.d);
  file_var(0, bank.e);
  file_var(0, bank.f);
  file_var(0, bank.g);
  file_var(0, bank.h);
);

SerializeBank(_global.IX.GlobalSliders.A);
SerializeBank(_global.IX.GlobalSliders.B);
SerializeBank(_global.IX.GlobalSliders.C);
SerializeBank(_global.IX.GlobalSliders.D);

@slider
function Clamp(val, lower, upper) ( min(max(val, lower), upper); );

function UpdateGlobals(bank*)
(
  slider2 != bank.a ? bank.a = slider2;
  slider3 != bank.b ? bank.b = slider3;
  slider4 != bank.c ? bank.c = slider4;
  slider5 != bank.d ? bank.d = slider5;
  slider6 != bank.e ? bank.e = slider6;
  slider7 != bank.f ? bank.f = slider7;
  slider8 != bank.g ? bank.g = slider8;
  slider9 != bank.h ? bank.h = slider9;
);

slider1 != curBank ?
(
  slider1 = curBank = Clamp(slider1, 0, 3);
  bankchange = 1; // Prevent overwriting of new bank values with current values
);

slider2 = Clamp(slider2, 0, 100);
slider3 = Clamp(slider3, 0, 100);
slider4 = Clamp(slider4, 0, 100);
slider5 = Clamp(slider5, 0, 100);
slider6 = Clamp(slider6, 0, 100);
slider7 = Clamp(slider7, 0, 100);
slider8 = Clamp(slider8, 0, 100);
slider9 = Clamp(slider9, 0, 100);

!bankchange ? // Update globals only if bank hasn't changed
(
  slider1 == 0 ? UpdateGlobals(_global.IX.GlobalSliders.A) :
  slider1 == 1 ? UpdateGlobals(_global.IX.GlobalSliders.B) :
  slider1 == 2 ? UpdateGlobals(_global.IX.GlobalSliders.C) :
  slider1 == 3 ? UpdateGlobals(_global.IX.GlobalSliders.D) ;
);

bankchange = 0;

@block
function UpdateSliders(bank*)
(
  slider2 = bank.a; sliderchange(slider2);
  slider3 = bank.b; sliderchange(slider3);
  slider4 = bank.c; sliderchange(slider4);
  slider5 = bank.d; sliderchange(slider5);
  slider6 = bank.e; sliderchange(slider6);
  slider7 = bank.f; sliderchange(slider7);
  slider8 = bank.g; sliderchange(slider8);
  slider9 = bank.h; sliderchange(slider9);
);

slider1 == 0 ? UpdateSliders(_global.IX.GlobalSliders.A) :
slider1 == 1 ? UpdateSliders(_global.IX.GlobalSliders.B) :
slider1 == 2 ? UpdateSliders(_global.IX.GlobalSliders.C) :
slider1 == 3 ? UpdateSliders(_global.IX.GlobalSliders.D) ;

Last edited by IXix; 07-07-2015 at 02:48 AM. Reason: Forgotten clamping
IXix is offline   Reply With Quote
Old 01-08-2014, 06:16 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

Good thinking on the naming convention.

Mine are (will be) named, for example:
_global.DSADIR_n00
'DS' c'est moi,
'ADIR' some acronym for the particular JS FX
_n00 the variable name
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-08-2014, 06:24 AM   #3
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by DarkStar View Post
Good thinking on the naming convention.

Mine are (will be) named, for example:
_global.DSADIR_n00
'DS' c'est moi,
'ADIR' some acronym for the particular JS FX
_n00 the variable name
Why not use namespaces like I have? _global.DS.ADIR.n00? Seems neater to me. Possibly easier to debug.
IXix is offline   Reply With Quote
Old 01-08-2014, 07:27 AM   #4
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

^^^^
Because I do not know what they are
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-08-2014, 09:41 AM   #5
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by DarkStar View Post
^^^^
Because I do not know what they are
Sorry, I thought you knew about the namespace/pseudo-object stuff. It's in the docs now but in a nutshell, it's a way of grouping/encapsulating variables and functions together. So in this plugin, I use a global namespace IX and then under that there's the plugin namespace GlobalSliders and that's where I keep the global data for the plugin, which in this case is four more namespaces A, B, C and D for the banks which contain the slider states.

I don't think there's a ton of practical difference doing it that way but all the stuff in each namespace is grouped nicely in the watch list and it might be easier to filter the list so only things in certain namespaces are shown.
IXix is offline   Reply With Quote
Old 01-08-2014, 10:28 AM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

No problem, thank you for the explanation. I'll have another read.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-09-2014, 02:05 PM   #7
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

Thank you so much very useful and seems easy to multiple with a few simple tweaks (even for me i modified to 26 sliders ) !
one thing i have to ask.

it seems doesn't work with SWS snapshot
well actually sometimes works sometimes don't...

might be relevant :
(all this tests using original version not the modified one)
as i tried so far i cannot activate "Show in Track Controls"
for slider from the GUI,
if i do from GUI... after one slider activated all sliders shows as activated
(from gui,move the slider , click to Parameter ...)
also no matter which slider i activated "a,b,..." but the track control shows always "h"
i can do this from track envelope automation window but after activating track controls Snapshot doesn't work anymore.

(probably i over detailed, if so excuse my English)

is this is normal?
am i pushing too hard?

Thanks again
timbralzoom is offline   Reply With Quote
Old 01-10-2014, 03:04 AM   #8
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Sorry, I don't really understand what you mean about the track controls. Can you give me steps to reproduce the problem and descibe the expected and actual behaviour.

Snapshot compatibility might be fixed by adding ext_noinit to @init, like this...
Code:
@init
ext_noinit = 1;
bankchange = 1; // Prevent new instances from clearing existing values
If that doesn't fix it, I might need to do something in @serialize.

I didn't do extensive testing with this, just made sure the sliders worked properly. I suppose I should have tested how it behaves when save/loading projects.
IXix is offline   Reply With Quote
Old 01-10-2014, 11:33 AM   #9
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

Quote:
Originally Posted by IXix View Post
Sorry, I don't really understand what you mean about the track controls. Can you give me steps to reproduce the problem and descibe the expected and actual behaviour.
Hi,

on the plugin GUI move a slider for example "a"
then click to "Param" then select the "Show in track controls"
you'll see the knob in the track panel but not the "a" its "h"

now try to add another slider to track panel
no matter which slider touched/clicked last,
in the "Param" list you will always see only "h" .

i thought this might be relevant to weird snapshot behavior.

i hope i explained this time a little bit more clear,
thanks for your patience




edit:


Quote:
Originally Posted by IXix View Post
Snapshot compatibility might be fixed by adding ext_noinit to @init, like this...
Code:
@init
ext_noinit = 1;
bankchange = 1; // Prevent new instances from clearing existing values
If that doesn't fix it, I might need to do something in @serialize.

I didn't do extensive testing with this, just made sure the sliders worked properly. I suppose I should have tested how it behaves when save/loading projects.
i tried to reproduce snapshot oddity again
(before adding this extra line)
interestingly snapshots works without problem now.

Last edited by timbralzoom; 01-10-2014 at 01:13 PM.
timbralzoom is offline   Reply With Quote
Old 01-11-2014, 02:28 AM   #10
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by timbralzoom View Post
on the plugin GUI move a slider for example "a"
then click to "Param" then select the "Show in track controls"
you'll see the knob in the track panel but not the "a" its "h"

now try to add another slider to track panel
no matter which slider touched/clicked last,
in the "Param" list you will always see only "h" .
Okay I see what's happening. When you change a slider, the plugin updates the values of all the sliders in all the plugins that are in that bank, including the instance you actually touched. Because I've used slider_automate() to update the slider values, REAPER sees the updates as 'touches' and so always sees the last slider as the last touched. This is probably why the snapshots aren't working too.

The quick solution is to replace the slider_automate() calls with sliderchange() instead. Thinking about it a bit more, I think that might be better anyway.
Code:
function UpdateSliders(bank*)
(
  slider2 = bank.a; sliderchange(slider2);
  slider3 = bank.b; sliderchange(slider3);
  slider4 = bank.c; sliderchange(slider4);
  slider5 = bank.d; sliderchange(slider5);
  slider6 = bank.e; sliderchange(slider6);
  slider7 = bank.f; sliderchange(slider7);
  slider8 = bank.g; sliderchange(slider8);
  slider9 = bank.h; sliderchange(slider9);
);
Thanks for spotting this and reporting it. I'll update the plugin code above and the version in the stash.

I think I need to do some more testing to see how it behaves with save/load of projects/presets...

Last edited by IXix; 01-11-2014 at 02:35 AM.
IXix is offline   Reply With Quote
Old 01-11-2014, 02:53 AM   #11
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Save/load seems to work properly so sanpshots should be fine too.

I was worried that previous settings from another project might interfere with the newly loaded instances because the global variables will outlive the plugin but fortunately that doesn't happen.

One potentially annoying thing that does happen is that if you use the plugin in one project then create a new project, new instances of the plugin will sync to the old project values.

I think the persistence of global data after a project has been closed is probably undesirable so perhaps Justin can cause it to be cleared on load/new project.
IXix is offline   Reply With Quote
Old 01-11-2014, 08:00 AM   #12
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

Every things seems ok now!
Thank you so much!

i was preparing to report one more
(bank3 resets the bank4 values ) but i think i found the solution via
adding this two lines

@slider
slider1 == 4 ? UpdateGlobals(_global.IX.GlobalSliders.E) ;

and

@block
slider1 == 4 ? UpdateSliders(_global.IX.GlobalSliders.E) ;


also i am adding this line too

@slider
slider9 = Clamp(slider9, 0, 100);

i hope they are correct


edit
i saw that sync with old project values,
tried to reset all sliders save a preset then load when necessary
but works for only bank1(A) sliders..
only way to fix it seems restart reaper for now.

Last edited by timbralzoom; 01-11-2014 at 08:06 AM.
timbralzoom is offline   Reply With Quote
Old 01-12-2014, 09:35 AM   #13
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by timbralzoom View Post
bank3 resets the bank4 values
Ha, there is no bank 4! I stupidly set the range of slider1 to be 0-4 instead of 0-3 as it should be. Updated with the correct code.
Quote:
Originally Posted by timbralzoom View Post
i saw that sync with old project values,
tried to reset all sliders save a preset then load when necessary
but works for only bank1(A) sliders..
only way to fix it seems restart reaper for now.
Justin is probably going to fix it so global data is cleared on project close but presets are different. I think I need to do some stuff in @serialize...
IXix is offline   Reply With Quote
Old 01-12-2014, 10:10 AM   #14
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Okay, I added code to @serialize so that the state of all four banks is saved with the project or presets. If you load a preset now, it will overwrite the state of all the banks which will cause all instances of the plugin to update their values.
Code:
@serialize
function SerializeBank(bank*)
(
  file_var(0, bank.a);
  file_var(0, bank.b);
  file_var(0, bank.c);
  file_var(0, bank.d);
  file_var(0, bank.e);
  file_var(0, bank.f);
  file_var(0, bank.g);
  file_var(0, bank.h);
);

SerializeBank(_global.IX.GlobalSliders.A);
SerializeBank(_global.IX.GlobalSliders.B);
SerializeBank(_global.IX.GlobalSliders.C);
SerializeBank(_global.IX.GlobalSliders.D);
IXix is offline   Reply With Quote
Old 01-12-2014, 04:58 PM   #15
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

preset works
Thank you !
timbralzoom is offline   Reply With Quote
Old 07-05-2015, 04:53 PM   #16
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,226
Default

hi, IXix.

moving over from the bradleyfilms linker thread. obviously, i know little of how any of this works but i can copy and paste so i've been playing with this terrific plug.

i was interested in having more sliders for more parameters. i, basically, tried tro double the number to 16 from the original 8. i have not altered the number of banks.

somebody should probably check that what i did is actually legal as my limited abilities might prove dangerous. here's the code:
Code:
desc:Globally synchronised sliders (for parameter linking)

/*************************************************************
version 1.4

Four banks of sixteen sliders for use with parameter modulation,
using custom namespaces to avoid using global memory.

If you modify this, please replace references to the namespace
IX.GlobalSliders with a namespace of your own to avoid clashes.

Slider updates are performed in @block since REAPER parameter
modulation is also updated on a per block basis ie. there's no
accuracy to be gained by moving the updates into @sample

This is a BabaG mod of the IX version.
It doubles the number of sliders to 16 and has an additional 
point of precision (0.0001 instead of 0.001). It also changes 
the namespace as advised above by IX. The version number has 
not been altered or amended.
*************************************************************/

in_pin:none
out_pin:none

// original IX values below were slider2:0<0,100,0.001>a etc.

slider1:0<0,3,1>bank
slider2:0<0,100,0.0001>a
slider3:0<0,100,0.0001>b
slider4:0<0,100,0.0001>c
slider5:0<0,100,0.0001>d
slider6:0<0,100,0.0001>e
slider7:0<0,100,0.0001>f
slider8:0<0,100,0.0001>g
slider9:0<0,100,0.0001>h
slider10:0<0,100,0.0001>i
slider11:0<0,100,0.0001>j
slider12:0<0,100,0.0001>k
slider13:0<0,100,0.0001>l
slider14:0<0,1,1>m
slider15:0<0,1,1>n
slider16:0<0,1,1>o
slider17:0<0,1,1>p

@init
bankchange = 1; // Prevent new instances from clearing existing values

@serialize
function SerializeBank(bank*)
(
  file_var(0, bank.a);
  file_var(0, bank.b);
  file_var(0, bank.c);
  file_var(0, bank.d);
  file_var(0, bank.e);
  file_var(0, bank.f);
  file_var(0, bank.g);
  file_var(0, bank.h);
  file_var(0, bank.i);
  file_var(0, bank.j);
  file_var(0, bank.k);
  file_var(0, bank.l);
  file_var(0, bank.m);
  file_var(0, bank.n);
  file_var(0, bank.o);
  file_var(0, bank.p);
);

// original values below were SerializeBank(_global.IX.GlobalSliders.A);

SerializeBank(_global.BABAG.GlobalSliders.A);
SerializeBank(_global.BABAG.GlobalSliders.B);
SerializeBank(_global.BABAG.GlobalSliders.C);
SerializeBank(_global.BABAG.GlobalSliders.D);

@slider
function Clamp(val, lower, upper) ( min(max(val, lower), upper); );

function UpdateGlobals(bank*)
(
  slider2 != bank.a ? bank.a = slider2;
  slider3 != bank.b ? bank.b = slider3;
  slider4 != bank.c ? bank.c = slider4;
  slider5 != bank.d ? bank.d = slider5;
  slider6 != bank.e ? bank.e = slider6;
  slider7 != bank.f ? bank.f = slider7;
  slider8 != bank.g ? bank.g = slider8;
  slider9 != bank.h ? bank.h = slider9;
  slider10 != bank.i ? bank.i = slider10;
  slider11 != bank.j ? bank.j = slider11;
  slider12 != bank.k ? bank.k = slider12;
  slider13 != bank.l ? bank.l = slider13;
  slider14 != bank.m ? bank.m = slider14;
  slider15 != bank.n ? bank.n = slider15;
  slider16 != bank.o ? bank.o = slider16;
  slider17 != bank.p ? bank.p = slider17;
);

slider1 != curBank ?
(
  slider1 = curBank = Clamp(slider1, 0, 3);
  bankchange = 1; // Prevent overwriting of new bank values with current values
);

slider2 = Clamp(slider2, 0, 100);
slider3 = Clamp(slider3, 0, 100);
slider4 = Clamp(slider4, 0, 100);
slider5 = Clamp(slider5, 0, 100);
slider6 = Clamp(slider6, 0, 100);
slider7 = Clamp(slider7, 0, 100);
slider8 = Clamp(slider8, 0, 100);
slider9 = Clamp(slider9, 0, 100);
slider10 = Clamp(slider10, 0, 100);
slider11 = Clamp(slider11, 0, 100);
slider12 = Clamp(slider12, 0, 100);
slider13 = Clamp(slider13, 0, 100);
slider14 = Clamp(slider14, 0, 100);
slider15 = Clamp(slider15, 0, 100);
slider16 = Clamp(slider16, 0, 100);

!bankchange ? // Update globals only if bank hasn't changed
(
  slider1 == 0 ? UpdateGlobals(_global.BABAG.GlobalSliders.A) :	// original values for these lines were slider1 == 0 ? UpdateGlobals(_global.IX.GlobalSliders.A) :
  slider1 == 1 ? UpdateGlobals(_global.BABAG.GlobalSliders.B) :
  slider1 == 2 ? UpdateGlobals(_global.BABAG.GlobalSliders.C) :
  slider1 == 3 ? UpdateGlobals(_global.BABAG.GlobalSliders.D) ;
);

bankchange = 0;

@block
function UpdateSliders(bank*)
(
  slider2 = bank.a; sliderchange(slider2);
  slider3 = bank.b; sliderchange(slider3);
  slider4 = bank.c; sliderchange(slider4);
  slider5 = bank.d; sliderchange(slider5);
  slider6 = bank.e; sliderchange(slider6);
  slider7 = bank.f; sliderchange(slider7);
  slider8 = bank.g; sliderchange(slider8);
  slider9 = bank.h; sliderchange(slider9);
  slider10 = bank.i; sliderchange(slider10);
  slider11 = bank.j; sliderchange(slider11);
  slider12 = bank.k; sliderchange(slider12);
  slider13 = bank.l; sliderchange(slider13);
  slider14 = bank.m; sliderchange(slider14);
  slider15 = bank.n; sliderchange(slider15);
  slider16 = bank.o; sliderchange(slider16);
  slider17 = bank.p; sliderchange(slider17);
);

slider1 == 0 ? UpdateSliders(_global.BABAG.GlobalSliders.A) :	// original values for these lines were slider1 == 0 ? UpdateSliders(_global.IX.GlobalSliders.A) :
slider1 == 1 ? UpdateSliders(_global.BABAG.GlobalSliders.B) :
slider1 == 2 ? UpdateSliders(_global.BABAG.GlobalSliders.C) :
slider1 == 3 ? UpdateSliders(_global.BABAG.GlobalSliders.D) ;
the little testing i did seems to work but i know nothing of what doing what i did might create in the way of problems. i'm thinking memory and performance, maybe? i just don't know about any of this.

thanks,
BabaG
babag is offline   Reply With Quote
Old 07-06-2015, 02:48 AM   #17
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by babag View Post
i was interested in having more sliders for more parameters. i, basically, tried tro double the number to 16 from the original 8. i have not altered the number of banks.
That's fine, hack away.

Because of the global linking, instances assigned to a given bank can be thought of as a single plugin with multiple interfaces. With four banks you effectively have up to four independent linker plugins each with 16 sliders, which means you can link up to 64 parameters in total but only 16 from a given instance.

If you want more sliders, JS lets you define up to slider64, so you could have a maximum of 63 sliders per bank. If you should want more banks you should have no trouble working out the necessary changes.

Quote:
Originally Posted by babag View Post
somebody should probably check that what i did is actually legal as my limited abilities might prove dangerous...
I haven't tested but it looks okay. It's a pretty simple plugin, very copy/pastable.

I notice that you've changed the range of sliders 14-17, I assume to make them into more of a switch. That's fine but it's probably not necessary, especially if you're not actually manipulating them by hand. You might want to change the clamping code for those sliders (and you've forgotten to clamp slider17) but again, it's probably not necessary.

Quote:
Originally Posted by babag View Post
...the little testing i did seems to work but i know nothing of what doing what i did might create in the way of problems. i'm thinking memory and performance, maybe? i just don't know about any of this.
Each added slider means more processing so by doubling the sliders you'll more or less double the CPU but there's no complex code so I doubt it will make a big difference.

I sent you a message but I don't know if you got it. I tested linking ReaComp threshold to see what level of precision was needed to get precise linking all the way down. I found that I had to set the step value to 0.0000001 to get it perfect.

I also noticed that linking breaks above +6dB, which is strange. I haven't tried but removing the clamping code might solve it. I think that can probably probably only happen on certain parameters of Cockos plugins though (something to do with their VST extensions I guess).
IXix is offline   Reply With Quote
Old 07-06-2015, 10:11 AM   #18
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,226
Default

Quote:
Originally Posted by IXix View Post
...It's a pretty simple plugin, very copy/pastable.
which is good as that's about the limit of my capabilities.

Quote:
...I notice that you've changed the range of sliders 14-17, I assume to make them into more of a switch.
yeah. i looked at the bangzero version you also linked to. it had a column of switches. i thought that would be good to have but wasn't able to get anything to display as boxes or buttons. they were always sliders. i think i accidentally posted one of those experiments instead of the 'all sliders' version i'm really using.

i like (and need) the simplicity of this version. the bang version gets into graphics to do the boxes, i think, which got to be a bit too much for me.

Quote:
...(and you've forgotten to clamp slider17) but again, it's probably not necessary.
will look at this. thanks. i think i did that on purpose as the clamping in the original ends with 8 and not 9.

Quote:
...I tested linking ReaComp threshold to see what level of precision was needed to get precise linking all the way down. I found that I had to set the step value to 0.0000001 to get it perfect.

I also noticed that linking breaks above +6dB, which is strange. I haven't tried but removing the clamping code might solve it.
thanks for the added resolution on the step value. will change that. wasn't sure the precision level it could accept.

i also noticed the issue above +6db. will look at the clamping.

thanks again for all this,
BabaG

Last edited by babag; 07-06-2015 at 10:24 AM.
babag is offline   Reply With Quote
Old 07-07-2015, 02:41 AM   #19
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by babag View Post
i think i did that on purpose as the clamping in the original ends with 8 and not 9.
Ooops! My bad.
IXix is offline   Reply With Quote
Old 07-11-2016, 01:45 PM   #20
DruMunkey
Human being with feelings
 
Join Date: Feb 2016
Posts: 232
Default

Necro-Bumping this...

Let me see if i have this right...

  1. I insert this in an FX chain
  2. I do a midi-learn or some other modulation on one of this plug-in's
  3. sliders
  4. I use ParameterLinking in reaper to "attach" one of these sliders to an FX's parameter (i.e. filter cutoff)
  5. I THEN add another instance of this plugin into another track
  6. That instance should update when the first one changes
  7. I Parameter Link the second instance's slider to another VST/FX in the new track (reverb depth for example)

Thus, when I move a knob on my midi controller, it will modify the filter cutoff in Track #1 and at the same time, move the slider, thus the reverb time, in Track #2.

Is that the use-case for this?
DruMunkey is offline   Reply With Quote
Old 07-12-2016, 05:36 AM   #21
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by DruMunkey View Post
Let me see if i have this right...

  1. I insert this in an FX chain
  2. I do a midi-learn or some other modulation on one of this plug-in's
  3. sliders
  4. I use ParameterLinking in reaper to "attach" one of these sliders to an FX's parameter (i.e. filter cutoff)
  5. I THEN add another instance of this plugin into another track
  6. That instance should update when the first one changes
  7. I Parameter Link the second instance's slider to another VST/FX in the new track (reverb depth for example)

Thus, when I move a knob on my midi controller, it will modify the filter cutoff in Track #1 and at the same time, move the slider, thus the reverb time, in Track #2.

Is that the use-case for this?
Yes. The global sliders are all linked so you change one, you change them all. Use them to enable parameter linking across tracks. How you do the linking is up to you. Don't expect to get sample accurate automation with them though.
IXix is offline   Reply With Quote
Old 04-18-2018, 11:27 AM   #22
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by doppelganger View Post
Is it possible to know, to which parameters slider is tied ?
Not in JSFX. A ReaScript could probably find that out but there's no way to communicate any details to the JSFX.
IXix is offline   Reply With Quote
Old 05-28-2020, 01:12 PM   #23
Infrabass
Human being with feelings
 
Join Date: Apr 2014
Posts: 398
Default

I LOVE Global Sliders.
It basically fix the limitation of linking parameters on the same track only.

Today I had the idea of using it to link track FX parameters with take FX parameters but it doesn't seem to work with take FX.

Is this a JS limitation?

Thanks!
Infrabass is offline   Reply With Quote
Old 05-28-2020, 02:17 PM   #24
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by Infrabass View Post
Today I had the idea of using it to link track FX parameters with take FX parameters but it doesn't seem to work with take FX.

Is this a JS limitation?
Hmm, not sure. I've never tried it on Take FX. I think it was made before Take FX existed!


I'd have expected it to work though. I'll have a look.
IXix is offline   Reply With Quote
Old 05-28-2020, 02:26 PM   #25
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Hmmm, it works from Take FX to track FX but not the other way around and it doesn't work Take FX to Take FX. I'd guess it's a bug or limitation in REAPER, probably something to do with the order in which things are processed.
IXix is offline   Reply With Quote
Old 01-27-2021, 04:28 PM   #26
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

I used to link several plugin parameters across tracks with this and I now realize that it's no longer working. Can anyone confirm that there's an issue with this plugin (or not)?

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-27-2021, 05:12 PM   #27
Infrabass
Human being with feelings
 
Join Date: Apr 2014
Posts: 398
Default

Working fine for me with the last dev release.
Infrabass is offline   Reply With Quote
Old 01-27-2021, 05:27 PM   #28
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

thanks for your feedback. It's definitely not working with my current portable install though it had worked for probably several years. It does work with another portable install I just tested. Oh my! How can I get functionality back into my production install? What could have caused it to stop working?

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-28-2021, 02:06 AM   #29
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Can't think of any reason why it should stop working on any install, portable or otherwise. It's self contained, doesn't even use gmem. Could the file be corrupted?
IXix is offline   Reply With Quote
Old 01-28-2021, 04:34 AM   #30
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
Default

Quote:
Originally Posted by IXix View Post
there's no way to communicate any details to the JSFX.
Nowadays there is: via gmem.

-Michael
mschnell is online now   Reply With Quote
Old 01-28-2021, 06:31 AM   #31
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

The JS file is 100% intact. It's definitely an issue with my particular portable Reaper install as it works well in other portable installs with the same JSFX file.

If I load the plugin into two tracks and move one of the sliders (a,b,c,etc.) the other instance's sliders don't move at all. They do move in other Reaper installs.

What mechanism could prevent communication between instances in my Reaper install?

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-28-2021, 07:21 AM   #32
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by SonicAxiom View Post
What mechanism could prevent communication between instances in my Reaper install?
.
Nothing that I know of. Are you loading it into a completely empty project or is there other stuff already in place?
IXix is offline   Reply With Quote
Old 01-28-2021, 07:50 AM   #33
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

doesn't work either way regardless if I'm trying it in an empty project with two newly created tracks or as part of my templates where I'm using it for inter-track-parameter-linking.

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-28-2021, 09:08 AM   #34
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

@SonicAxiom
This might sound obvious but if you enable monitor input (rec enable) on one or both of the tracks where the plugin exists does that work? (for moving faders with the mouse)
Also if you use param modulation then the transport must playing for the sliders to be actively updating.
And there's CC.
Just a few things to check.
J Reverb is offline   Reply With Quote
Old 01-28-2021, 10:44 AM   #35
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

Quote:
Originally Posted by J Reverb View Post
@SonicAxiom
This might sound obvious but if you enable monitor input (rec enable) on one or both of the tracks where the plugin exists does that work? (for moving faders with the mouse)
Also if you use param modulation then the transport must playing for the sliders to be actively updating.
And there's CC.
Just a few things to check.
thanks for the hints! If I enable rec arm on one or both tracks, the other track's instance of "GlobalSliders" does follow. I never had to rec enable tracks before to make it work, though. Maybe this info helps in resolving the issue.

I just created a fresh portable Reaper install. Global Sliders (file copied from my regular install) works in this fresh portable install. When I save program settings of my production Reaper install and import those in the fresh install the issue starts happening there, too.

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.

Last edited by SonicAxiom; 01-28-2021 at 04:46 PM.
SonicAxiom is offline   Reply With Quote
Old 01-28-2021, 12:22 PM   #36
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

It must be a REAPER setting. The plugin doesn't know anything about parameter modulation so it should't be any of those. I'd guess it's something related to audio as the plugin doesn't work if the audio device is inactive. Perhaps some setting is causing one/both tracks to not be processed? The fact it works when you arm a track seems to support that idea.
IXix is offline   Reply With Quote
Old 01-28-2021, 05:08 PM   #37
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

just found out that linking between "GlobalSliders" instances works correctly during playback, just not when playback is stopped or paused. I'm pretty sure that it has worked during STOP before but at least my parameter linking across tracks continues working.

Thank you, folks, for taking your time to help!

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-29-2021, 03:56 AM   #38
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

Quote:
Originally Posted by SonicAxiom View Post
just found out that linking between "GlobalSliders" instances works correctly during playback, just not when playback is stopped or paused..
Sounds like Settings->Audio->"Close audio device when stopped and active (less responsive)" is checked.
IXix is offline   Reply With Quote
Old 01-29-2021, 04:31 AM   #39
SonicAxiom
Human being with feelings
 
SonicAxiom's Avatar
 
Join Date: Dec 2012
Location: Germany
Posts: 3,005
Default

no, I have all options to stop the audio device unchecked.

.
__________________
Check out AVConvert (free, super-fast media file manipulation via the right-click context-menu in Windows Explorer) and my free VST plugins.
My Reaper tutorials and studio related videos on youtube.
SonicAxiom is offline   Reply With Quote
Old 01-29-2021, 06:42 AM   #40
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,887
Default

How about "Playback->Run FX when stopped"?
IXix 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 01:33 AM.


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