Nodes/ComfyUI-Keyframed/KfSinusoidalGetWavelength
ComfyUI Node

KfSinusoidalGetWavelength

How many frames does one loop of this wave take?

By dmarx·Created 3 years ago·Updated 2 years ago· 92
KfSinusoidalGetWavelength
  • curve
  • FLOAT

KfSinusoidalGetWavelength is the read-back companion to the constructor nodes. You hand it a sinusoidal curve and it returns a FLOAT: the curve's wavelength, measured in time steps - frames, in animation terms. It's the inverse of KfSinusoidalGetFrequency (that one gives you cycles per frame; this one gives you frames per cycle), and it's the number most people actually care about.

There's a small but real reason this node feels more "native" than its frequency sibling: the keyframed library stores wavelength as the canonical parameter on a SinusoidalCurve. So GetWavelength is a straight property read, whereas GetFrequency has to compute 1/wavelength. Either way you get the truth about the curve; this one just skips the division.

When you'd actually use it

  • Understand a curve you inherited. Entangled Curves nodes and the Adjust nodes pass sinusoidal curves around without shouting their parameters at you. This node tells you the loop length at a glance.
  • Match loop lengths across curves. If two curves should pulse in lockstep, wire both in and confirm the wavelengths agree.
  • Send the number somewhere. The FLOAT output drives any numeric input, so you can echo the wavelength into a plot label, a math node, or a parameter that should scale with it.

Default context: a KfSinusoidalWithWavelength curve at its default returns 12 - one loop every 12 frames. A KfSinusoidalWithFrequency curve at its default (1/12) returns exactly the same 12, because the two constructors describe the same wave.

Inputs and outputs

  • curve - a SINUSOIDAL_CURVE, forceInput (wire-only; there's no manual value field, and that's deliberate).
  • FLOAT output - wavelength in frames per full cycle.

Installing it

It's part of the pack, so the install is the pack install: no model downloads, pure Python, with the keyframed dependency auto-installed on first load. ComfyUI Manager → search "ComfyUI-Keyframed", or:

cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-Keyframed

restart, and it's under keyframed → sinusoidal.

Like the other getter nodes, this is a verification tool rather than a headline feature - you reach for it when a workflow hands you a curve and you need its numbers. When that happens, it's exactly the node you want, and it pairs naturally with the curve-drawing utilities for a look and a number.

Categorykeyframed/sinusoidal

Inputs (1)

NameTypeDefaultDescription
curveSINUSOIDAL_CURVE

Outputs (1)

NameTypeDescription
FLOATFLOAT