Product media placeholder
Replace this area with a screenshot or short walkthrough video during the media sweep.
Pulse-driven integer counter with optional wrap-around. Each rising edge of `pulse` advances `index` by `step`; rising edge of `reset` returns `index` to `start`. With `wrap` enabled, output is folded into `[start, start + max)` via positive modulo (negative steps wrap correctly too). The current `index` is published every frame; downstream consumers (`pulseRouter`, expressions, `parameterReadFloat`) read it like any other numeric source.
Inputs
| Port | Type | Description |
|---|---|---|
pulse | float | Rising-edge trigger. Each 0 → 1 transition advances `index` by `step`. Wire from a `thresholdPulse`, `clickPulse`, `scrollEvent`, or any pulse-emitting source. |
reset | float | Rising-edge trigger that resets `index` to `start`. While held high, pulses are absorbed (counter stays at `start`). |
Outputs
| Port | Type | Description |
|---|---|---|
index | float | The current counter value, post-wrap. Read this with `parameterReadFloat`, an expression `node('idx')`, or wire directly into `pulseRouter.index`. |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
start | int | 0 | Initial value of the counter. The reset input also returns to this value. Most use cases use `0`. |
step | int | 1 | How much each pulse advances the counter. Default `1`. Use `-1` for reverse counting; with `wrap: true`, this counts down with positive modulo wrap. |
wrap | bool | true | When ON, output is folded into `[start, start + max)` — so a counter with `max: 5` cycles through `0, 1, 2, 3, 4, 0, 1, ...`. When OFF, the counter grows unbounded. |
max | int | 10 | Number of distinct values when wrap is on. For an N-section navigation, set `max: N`. Ignored when wrap is off. min 1 |
Use cases
- Section-snap navigation — wire a wheel/touch threshold-pulse → counter (`max: 5`, `wrap: true`) → per-section gate expressions for full-screen `<section>` carousels (see `section-snap` demo).
- Round-robin spawn — pair with `pulseRouter` (matching `count`) to demultiplex one event into N output channels (cursor trail, ripple particles, click-spawned animations).
- Carousel / slider step — clicks on `next` / `prev` buttons feed `pulse` / `reset` to track the active slide index.
- Sample-and-cycle — bump a parameter that other nodes read as a state index without authoring a real state machine.
Envelope
Use pulseCounter as the node type inside a graph node envelope. Add id, optional params, optional connections, and optional activeWhen based on the guide context.
Generated source
Registry faster-motion-docs/node-registry.jsonCategory page /help/faster-motion/faster-motion-node-category-inputs/