I am working on this problem, where a parameter in my MPC is driven by a float value. I want my float value to go from 0 to 1 smoothly, with .1 increments when the “f” key is pressed.
For the sake of clarity, let 0 represent blue and 1 represent red. The idea is on keypress, we go .1 closer to red, smoothly and it would take 10 pressed of “f” to move from red to blue.
I have tried adding the current float value with the .1 increment but I ditched that because it looks jerky since it is instantly hopping up .1.
I have tried timelines, but I am only able to go from 0-1 with one keypress. I just want the .1 increments. Thank you in advance.
You can still use a timeline but make the timeline’s curve drive a lerp float instead.
just before playing the timeline, you need to save a new variable (it’s just a copy of your main float variable). Then with the timeline, lerp from your new saved float to the same float +0.1, then the lerp sets your main float variable.
I have tried something like this, but since it moves incrementally like .1,.2,.3 and so on it seems “snappy” I am trying to have it move through all the minor increments like .10001, .10002, .10003 but very quickly. The red to blue should fade smoothly.
What I mean in regards to the timeline not working is it would run from 0-1 instead of giving me the increments.
To elaborate on the second part about the .1 increment, it wouldn’t go up instantly .1, but instead like .0001, .0002, .0003 etc all the way to .1.
Your step by step is correct, so the first press would go from .0001,.0002,.0003 all the way to .01 but very quickly. Then the next press would go from .0101, .0102, .0103 to .02. The third click would go from .02 to .0201, .0202, 0203 etc all the way to .03. Ideally, 10 key presses would take us from 0-1. Thanks again.