I'm trying to delay a gate.
I have one gate that marks the beginning of a bar. I have another gate which I call "angle" that can vary when it occurs from the beginning to the end of the bar. A value of 0 would be the beginning of the bar. A value of 1 would be the end and a value of 0.5 would be in the middle.
I was using turnOnAfter: for: to create the angle gate from the bar gate.
I'm using a STGC to generate the angle gate and this is the expression in the value field:
!BarGate turnOnAfter: !Angle * ((!BPM / 4) bpm s) for: 0.1s
But as I increase !Angle the duration of the angle gate increases. I thought it would always be 0.1s. Why does it increase?
Also as the angle gate approaches the end of the bar it gets closer and closer to the next occurance of the bar gate. The subsequent triggering of the bar gate cuts short the duration of the angle gate that is triggering at the time. So it's not really acting like a delay line for a repeating gate. Is there a better way of doing this?
Here's a simple example showing this behaviour: