In my project are 2 interfaces, Faders and Sequencer.
In Faders is a fader named XFade
In Sequencer is a fader named XFadeGhost
I would like these faders to have the same value. If I move XFade I want the x value to be the same in XFadeGhost. If I move XFadeGhost I want XFade x value to be the same.
WITHOUT using an OnFrame construct how do I get these 2 faders to see each other? I have triede multiple combinations of findobject, setattribute, etc. and I just can't get the value from one into the other without using a global variable and an OnFrame construct.
TIA for any help!!
Thanks,
joeb
Referencing revisited
Re: Referencing revisited
One approach is to use execution as a 'listener' ...
Under XFade set up a script called setval executing on expression XFadeGhost.x - x = XFadeGhost;
Mirror the script with alternate names in the other object
Essentially the script listens to the expression and sets the local x to that value when it changes.....
MM
Under XFade set up a script called setval executing on expression XFadeGhost.x - x = XFadeGhost;
Mirror the script with alternate names in the other object
Essentially the script listens to the expression and sets the local x to that value when it changes.....
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Referencing revisited
Change both faders physics from the default "interpolate" to "none"
Add script in XFade, on expression x, any
if (z) XFadeGhost.x=x;
add script in XFadeGhost, on expression x, any
if (z) XFade.x = x;
Add script in XFade, on expression x, any
if (z) XFadeGhost.x=x;
add script in XFadeGhost, on expression x, any
if (z) XFade.x = x;
Re: Referencing revisited
Also this might work with any physics desired
Add script in XFade, on expression x, any
if (!XFadeGhost.z) XFadeGhost.x=x;
add script in XFadeGhost, on expression x, any
if (!XFade.z) XFade.x = x;
Add script in XFade, on expression x, any
if (!XFadeGhost.z) XFadeGhost.x=x;
add script in XFadeGhost, on expression x, any
if (!XFade.z) XFade.x = x;
Re: Referencing revisited
I find the opposite way a more objecty way of doing things....
Ie the Fader that is changing has the code to change itself based on the execution expression
This way looking at the object itself shows what it does, rather then another object controlling it which you need to find...
It keeps all the objects actions encapsulated in itself making moving or duplicating much simpler as well....
MM
Ie the Fader that is changing has the code to change itself based on the execution expression
This way looking at the object itself shows what it does, rather then another object controlling it which you need to find...
It keeps all the objects actions encapsulated in itself making moving or duplicating much simpler as well....
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Referencing revisited
Indeed, I cant argue with that!
Re: Referencing revisited
Youse guys!!!
That's why I love this forum, multiple answers. But I found the easy one;
LEARN HOW TO SPELL!!!
(Smack! the sound of a well placed smack to my forehead)
Thanks folks! Maybe I shouldn't have taken 3 engineering classes at the same time and get sleep instead...
Best to all,
Joe B
That's why I love this forum, multiple answers. But I found the easy one;
LEARN HOW TO SPELL!!!
(Smack! the sound of a well placed smack to my forehead)
Thanks folks! Maybe I shouldn't have taken 3 engineering classes at the same time and get sleep instead...
Best to all,
Joe B
Re: Referencing revisited
For anyone as literal minded as me, and as clueless about obvious scripting stuff . . . Play with it instead of wondering what assigning "XFadeGhost" to "XFadeGhost.x - x" might mean. Doh! I thought maybe that actually worked in Lemur.Macciza wrote: Under XFade set up a script called setval executing on expression XFadeGhost.x - x = XFadeGhost;
Mirror the script with alternate names in the other object
"on expression XFadeGhost.x any" -- listen for any change to that x
"set local x to XFadeGhost.x" -- and take its value
So any reason not to use an alias if this is all you need? I can see how you'd want to start from this to get fancier than simply syncing x value.
-- vav -- MIDIbox CV v2 =<< AIN >>> . . . .