Here is just a simple code that I developed with the help of @WNP78 to alternate an inputs value between -1 and 1.
Trim=0 ? 0 : (pingpong(Time*2, 1)<0.5)
Trim is your input to set whether it’s running or not.
The multiplier after time controls how often it switches, higher multiplication means faster alternating.
The number after the less than sign at the end controls how fast the output gets to the value, kind of like a smooth effect. Lower value=higher speed.
Not sure. This code looks pretty compact to me!
@spefyjerbf
sorry to bother you, do you know if there is any way to compact this code? or is it pretty much at its most basic form with all these values still adjustable?