home/ atoms/ cinecer0-ramp-function

CineCer0's ramp function linearly interpolates a style parameter over a given number of cycles

In CineCer0, (ramp dur start end) creates a value that smoothly moves from start to end over dur cycles — it can be used as the argument to any style function (width, opacity, position, etc.) to animate it. fadeIn n and fadeOut n are convenience wrappers that ramp opacity from 0 to 1 or 1 to 0 over n cycles. The quant cycleMultiplier offset function aligns the anchor point of ramps to multiples of the cycle grid, so visuals snap to musical timing. Together these enable tempo-synced video transitions.

Examples

setOpacity (ramp 4 0 1) $ video "url"   -- fade in over 4 cycles
fadeOut 2 $ image "url"                 -- fade out over 2 cycles

Assessment

Write a CineCer0 expression that makes a video move from x=-1 to x=1 over 8 cycles, synced to the tempo.

“ramp can be use in style functions. Example width (ramp x y z)”
corpus · estuary-collaborative-browser-live-coding-platform-networked · chunk 18