Forum
    • Categories
    • Register
    • Login
    1. Home
    2. xm4ddy
    3. Posts
    X
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: XY Pad with Optional Motion + Speed Control (HISE Script)

      I think something like this should do about the same.

      /// ===============================
      /// LFO ENGINE
      /// ===============================
      
      const LFO_RATE = 0.3;
      const LFO_DEPTH = 0.25;
      const TIME_SCALE = 0.03;
      
      reg phase = 0.0;
      
      xypad.startTimer(30);
      
      xypad.setTimerCallback(function()
      {
      	phase = (phase + LFO_RATE * motionSpeed * TIME_SCALE) % 1.0;
      
      	const angle = phase * Math.PI * 2;
      
      	lfoX = Math.sin(angle) * LFO_DEPTH * 0.5;
      	lfoY = Math.cos(angle) * LFO_DEPTH * 0.5;
      
      	updateXY();
      });
      
      posted in Scripting
      X
      xm4ddy
    • RE: XY Pad with Optional Motion + Speed Control (HISE Script)

      any reason you used sin twice with extra logic rather than cos?

      posted in Scripting
      X
      xm4ddy