Member Steve Farris Posted November 10, 2016 Member Report Share Posted November 10, 2016 I'm trying to wrap my head around expressions and how to use them. I have a situation that seems ready made for a properly written expression. I have a midi controller with a fader that is set up as an input (let's call it "Hue"). I have a cue with a Hue tween track. I set the expression to be "TweenValue + Hue" and I can control the Hue. It will rotate through the spectrum with the input going from 0 to 1 and the resulting Hue going between 0 and 360. So far so good. What I want to do is limit the values that Hue rotates through. For instance, say my Hue starts at 20. As I move the fader, I want it to move between 20 and 50, so as I scroll up the fader the Hue will never go past 50. This is where I'm stuck. It seems that somehow using a "<" or ">" function would do this. I have tried multiple interactions but can't seem to get the desired result. Any expressions experts out there? Steve 0 Quote Link to comment Share on other sites More sharing options...
Moderator jfk Posted November 11, 2016 Moderator Report Share Posted November 11, 2016 I'm trying to wrap my head around expressions and how to use them. I have a situation that seems ready made for a properly written expression. I have a midi controller with a fader that is set up as an input (let's call it "Hue"). I have a cue with a Hue tween track. I set the expression to be "TweenValue + Hue" and I can control the Hue. It will rotate through the spectrum with the input going from 0 to 1 and the resulting Hue going between 0 and 360. So far so good. What I want to do is limit the values that Hue rotates through. For instance, say my Hue starts at 20. As I move the fader, I want it to move between 20 and 50, so as I scroll up the fader the Hue will never go past 50. This is where I'm stuck. It seems that somehow using a "" function would do this. I have tried multiple interactions but can't seem to get the desired result. Any expressions experts out there? Steve For an input named Hue, you want a range of 30, starting at 20, expressed as a percentage of 360 ... try ((Hue*30)+20)/360 BTW the parenthesis are critical in that formula (at least the outer set is critical, the inner set is for clarity) Also, your original expression worked as it did because the TweenValue was 0. Had it been set to something else in the tween track, the results would have been different. Simply putting in Hue without the TweenValue would have yielded the same result. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.