Expression Help (Using Variable) / Syncing Timing of Modules
Posted: Thu May 28, 2020 3:46 am
I am having trouble writing the correct expression and would appreciate any guidance.
Context:
I need Event1 and Event2 to happen at the same exact time (each on a separate module). To achieve this, I am using a Sine Osc modifier on both, making the timing in sync.
Goal:
Each time the sine osc hits 1, I want the output value to increase by 2.
Osc hits 1 first time, output is 2. Output remains at 2 until Osc hits 1 again, then output is 4. And so on. That output number steadily keeps increasing by 2, in rhythm with the Osc.
Current Strategy:
I am trying to use a variable "y" to achieve this. The following is what I have written out now, but I am new to creating expressions like this and am obviously messing something up because it's not working.
My thought is "y" is increasing by 2 each time the [input] x is 1. And so the [output] x just has to match whatever y is. But again, my logic is clearly faulty because this is not working.
Anyone able to offer any suggestions / point out my stupid flaws?
Context:
I need Event1 and Event2 to happen at the same exact time (each on a separate module). To achieve this, I am using a Sine Osc modifier on both, making the timing in sync.
Goal:
Each time the sine osc hits 1, I want the output value to increase by 2.
Osc hits 1 first time, output is 2. Output remains at 2 until Osc hits 1 again, then output is 4. And so on. That output number steadily keeps increasing by 2, in rhythm with the Osc.
Current Strategy:
I am trying to use a variable "y" to achieve this. The following is what I have written out now, but I am new to creating expressions like this and am obviously messing something up because it's not working.
Code: Select all
var y:= if(x=1, +2,+0)
x=y
Anyone able to offer any suggestions / point out my stupid flaws?