justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Hi, this formula creates a sine wave in JSFX, lfo = sin(phase * 2 * PI), where PI = 3.14159265359. Can you tell me what formula would create the "Parametric" waveform in REAPER's automation item? I'm trying to create that waveform in a modulation plugin. Thanks.
Asked by parametric (102.176.65.x) on October 22 2025, 6:55am
Reply on October 22 2025, 12:16pm:
    It would be a pain to do in JSFX, each section is a 'fast start'/'fast end' curve, which is a cubic curve... so you'd need to do something like (untested):
    
    function lfo(phase) (
      phase = (phase - floor(phase)) * 4; // phase is 0..4
      phase < 1 ?  1 - (1 - phase)*(1 - phase)*(1 - phase) : // 0..1
      phase < 2 ?  1 - (phase - 1)*(phase - 1)*(phase - 1) : // 1..0
      phase < 3 ? -1 + (3 - phase)*(3 - phase)*(3 - phase) : // 0..-1
                  -1 + (phase - 3)*(phase - 3)*(phase - 3) ; // -1..0
    );
    
    
    (hope it works!)


Comments:

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS