Line / Ramp

Envelopes & ModlineLight CPU

One-shot linear ramp Start→End over a set time, fired on a trigger.

What it does

One-shot linear ramp between two values.

Wraps daisysp::Line. A file-scope prev_trig snapshot detects rising edges at Trig; each edge calls Start(start, end, dur) to (re)launch the ramp. Process writes a finished flag → the End output emits a one-sample pulse on completion (only when wired). Start / End / Duration are baked at init.

Parameters

  • Start

    start
    Default 0Range -10 … 10

    The value the ramp begins from each time Trig fires. It does not have to be below End — setting Start above End gives a falling ramp, which is how you get a decay shape out of this tile. ⚠ Baked at build time, so it cannot be changed while the patch runs.

  • End

    end
    Default 1Range -10 … 10

    The value the ramp finishes at and then holds until the next trigger. Together with Start it sets both the direction and the depth of the sweep; the range reaches well past 0..1 so this can drive things expecting volts or Hz directly. ⚠ Baked at build time, so it cannot be changed while the patch runs.

  • Duration (s)

    dur
    Default 0.5Range 0.001 … 10

    Seconds the ramp takes to travel from Start to End. Once it arrives the output holds at End rather than resetting, and the End port fires a one-sample pulse — chaining that into another Line trigger is how multi-segment envelopes are built. ⚠ Baked at build time, so it cannot be changed while the patch runs.

Each rising edge at Trig restarts a linear ramp from Start to End over Duration seconds, then holds at End. Wire a button, pad, gate, or Metro into Trig. The End output fires a one-sample pulse when the ramp completes — chain it into another Line for multi-segment envelopes. Start / End / Duration are baked at build time.

Ports

In

  • Trig trigger

Out

  • Mod Out value
  • End end

Audio Control

Inputs

Trig
Rising edge (re)starts the ramp — button, pad, gate, or clock.

Outputs

Mod Out
The ramping value; holds at End after completion.
End
One-sample pulse when the ramp reaches End (chain segments).

Rules and gotchas

  • Start / End / Duration are baked at build time.