Profile image

Some cool funks in the trees

456 AlrightQuail  3.7 years ago

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.

  • Log in to leave a comment
  • Profile image
    161k spefyjerbf

    Not sure. This code looks pretty compact to me!

    3.7 years ago
  • Profile image

    @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?

    3.7 years ago