IX/GlobalSliders: Parameter linker avoiding global memory
Message
Author
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 . Code:
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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
RE: IX/GlobalSliders: Parameter linker avoiding global memory
^^^^ Because I do not know what they are :)
--------------------------------- '99 323i clarion dvd player with touch screen two 10' jl w7 subs with 500 watt jl audio amp 18' spinner wheels. alarm with remote start more too come
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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
--------------------------------- Man, it's a good thing nobody has invented "Scratch 'n Sniff" for the Internet, ain't it?
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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:
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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.
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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.
--------------------------------- 95 318is POS Bosal exhaust * CAI * Sumitomo HTR Z II * Clears front and side * Aluminum Guage Faces (thx seed) * Illuminated shift knob * ///M3 mirrors * Infinty Kappas front (MTX 302) & rear * 2 JLAudio 12's (MTX 302)
RE: IX/GlobalSliders: Parameter linker avoiding global memory
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: