Hello,
I have two objects, one fader and one knob, that both send MIDI messages to the same target but are located on different pages. When I adjust one, I'd like to have it update the other, but I'm running into a problem.
If I set knob.x to update fader.x when the knob is adjusted, it works, but if I also set fader.x to update knob.x when the fader is moved, they lock up in a loop of trying to update each other. Does anyone have any suggestions?
Thanks
-L05
Can I have 2 different objects update each other?
Re: Can I have 2 different objects update each other?
Hey,
it should work if you do it in 2 seperate scripts. The script that updates the fader is executed on Knob.x and the script for knob is executed on Fader.x. that should break the feedback loop. (Making both execute on frame or putting both into same script can cause trouble)
Hope that helps
mat
it should work if you do it in 2 seperate scripts. The script that updates the fader is executed on Knob.x and the script for knob is executed on Fader.x. that should break the feedback loop. (Making both execute on frame or putting both into same script can cause trouble)
Hope that helps
mat
Lemur modules and sequencer: http://music-interface.com
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Re: Can I have 2 different objects update each other?
You might consider creating a variable that gets set when one object is updating the other. Then query the variable in the other object so suppress the adjustement of the first object. And vice versa.
More elegant would be to create only one object and then create the second object as an alias. But this works only with the same type of object.
Hope that makes sense,
B.
More elegant would be to create only one object and then create the second object as an alias. But this works only with the same type of object.
Hope that makes sense,
B.
Win7 64, Ipad Lemur, Cubase6 and a bunch of Roland Synths and Samplers
Re: Can I have 2 different objects update each other?
Mat: I tried that route and set each of the scripts to execute on expression, but they still freeze in a feedback loop because simply changing the x variables cause the scripts to execute.
BXSJ: I'll try that right now and post the results.
Thank you both of you for responding.
BXSJ: I'll try that right now and post the results.
Thank you both of you for responding.
Re: Can I have 2 different objects update each other?
Hm, I'm not sure how to get that to work. Is there a way to query whether or not an object is being touched? Can you post an example if possible? Thanks in advance.
Re: Can I have 2 different objects update each other?
Here is an example of Mat's solution.
B.
B.
- Attachments
-
- test2.jzml
- (4.65 KiB) Downloaded 104 times
Win7 64, Ipad Lemur, Cubase6 and a bunch of Roland Synths and Samplers
Re: Can I have 2 different objects update each other?
Thanks for the response BXSJ. Unfortunately it doesn't work as desired.
The attached patch updates the knob successfully when the fader is adjusted, but when you move the knob it still up freezes in an update loop.
I feel for this to work, I'd need to be able register which object is being actively touched... thoughts?
If there was an additional variable on all of the objects that indicated whether or not an object is being touched, it'd be extremely useful for addressing a seemingly simple problem such as this. It'd also provide a gamut of options for interesting interface design.
The attached patch updates the knob successfully when the fader is adjusted, but when you move the knob it still up freezes in an update loop.
I feel for this to work, I'd need to be able register which object is being actively touched... thoughts?
If there was an additional variable on all of the objects that indicated whether or not an object is being touched, it'd be extremely useful for addressing a seemingly simple problem such as this. It'd also provide a gamut of options for interesting interface design.
Re: Can I have 2 different objects update each other?
Confirmed, this doesn't work as planned. It seems that this is a feature or a bug (?!) of the Knob object. Using faders or ranges to control each other works fine, but not with knobs. Can somebody confirm and explain this behavior? Attached are a couple of examples.
The fader object has the "z" variable which set to 1 whenever the fader is touched, otherwise z = 0. The same applies to pads where the x value is set 1 when you press/touch the pad.
Cheers,
BxSj
The fader object has the "z" variable which set to 1 whenever the fader is touched, otherwise z = 0. The same applies to pads where the x value is set 1 when you press/touch the pad.
That would be a good enhancement.If there was an additional variable on all of the objects that indicated whether or not an object is being touched, it'd be extremely useful for addressing a seemingly simple problem such as this
Cheers,
BxSj
- Attachments
-
- test3.jzml
- (20.57 KiB) Downloaded 92 times
Win7 64, Ipad Lemur, Cubase6 and a bunch of Roland Synths and Samplers
Re: Can I have 2 different objects update each other?
I found that I could work around the feedback loop by checking of the variable is different:
and on the other side:
This prior check prevents x from being updated when it's not needed, hence breaking the feedback loop.
Code: Select all
if(OSC_Tune2DualVCO.x!=x) OSC_Tune2DualVCO.x=x;
Code: Select all
if(OSC_Tune2.x!=x) OSC_Tune2.x=x;
iMac Core i7 2.93 GHz 8GB SSD 10.7.x, Liine Lemur iPad1/iPad 3, Eigenharp Alpha, Metric Halo, Plogue Bidule, PianoTeq, Omnisphere, u-he Diva, NI Komplete 8, Moog Slim Phatty