Open App

Pattern Generator

Use the Pattern Generator in ScriptCompiler to draw sine, triangle, square, sawtooth, teeth and ramp shapes over a time range with full control.

On this page

Overview

Pattern Generator tool

The Pattern Generator draws a shape over a time range. Pick a shape, set where it starts and how long it runs, and tune the rest. It replaces the old Wave Generator and Ramp Generator.

Fap Generator or Pattern Generator?
Fap Generator is the quick one. You set a stroke time and a stroke count and it is done. Pattern Generator is the full control one. It adds sine and ramp shapes, plus amplitude, frequency, center and phase.

Shapes

Shape What it draws
Sine Smooth curve. The most natural feel.
Triangle Straight up, straight down. Constant speed.
Square Instant jumps. Holds high, then holds low.
Sawtooth Slow climb, instant drop.
Teeth A triangle with small peaks on top. Textured feel.
Ramp One slope from a start position to an end position, with easing.

Parameters

Each field shows only for the shapes that use it.

Parameter Range Description
Shape Sine, Triangle, Square, Sawtooth, Teeth, Ramp Shape to draw
Start Time Any time in the script Where the pattern begins
Duration 100 ms and up How long the pattern runs
Amplitude 0 to 50 How far the wave moves above and below the center
Frequency 0.1 to 100 Full cycles across the duration
Center 0 to 100 Middle line of the wave
Phase 0 to 360 Where in the cycle the wave starts
Teeth Count 2 to 20 Small peaks per cycle. Teeth only.
Teeth Amplitude 5 to 50 Height of each small peak. Teeth only.
Start Position 0 to 100 Where the ramp starts. Ramp only.
End Position 0 to 100 Where the ramp ends. Ramp only.
Easing Linear, Ease In, Ease Out, Ease In Out, Exponential In, Exponential Out How the ramp speeds up or slows down. Ramp only.
Point Density 1 to 20 Points per second. A ramp needs only 2 to 5.
Frequency and Speed
A higher frequency makes a faster pattern. Check the Script Overview to keep the speed inside what your device can do.

Use Cases

Rhythmic Sections

Use a sine or triangle to match a beat or a steady rhythm in the video.

Build Up and Cool Down

Use a ramp with Ease In to build up slowly, or Ease Out to cool down.

Texture

Use Teeth to add small peaks to a slow stroke so it feels less flat.

Testing Devices

A plain wave is a good way to test how a device handles different speeds and ranges.