Nodes/FizzNodes/SinWave πŸ“…πŸ…•πŸ…
ComfyUI Node Runs on cloud

SinWave πŸ“…πŸ…•πŸ…

A smooth oscillator for any number input, so your motion breathes

By FizzleDorfΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 479
SinWave πŸ“…πŸ…•πŸ…
    • FLOAT
    • INT
    β—„phase1β–Ί
    β—„amplitude0.5β–Ί
    β—„x_translation0β–Ί
    β—„y_translation0.50β–Ί
    β—„current_frame1β–Ί

    The wave nodes are FizzNodes' answer to a specific question: what if a parameter didn't need a keyframe schedule at all, because a formula would do? SinWave is the smoothest of them - a pure sine oscillator that takes current_frame and returns a FLOAT (plus an INT twin) you can plug into anything numeric. Feed it into denoise, CFG, an IPAdapter weight, a position input, and that parameter drifts up and down like it's alive instead of sitting still.

    It's the wave you reach for when you want oscillation - motion that repeats and eases at the extremes. A camera that gently rocks, a glow that breathes, a strength that swells and fades. If the movement you want is smooth and looping, this is the tool.

    The formula, in plain terms

    The node computes:

    value = y_translation + amplitude * sin(2Ο€ Γ— current_frame / phase βˆ’ x_translation)
    

    Which reads, in human: it starts at y_translation, swings up by amplitude, and comes back. The four knobs are all there is:

    • phase - the length of one full cycle in frames. Phase 24 with a 24fps animation is a one-second oscillation.
    • amplitude - how far it swings above and below the center.
    • y_translation - the center value (where the wave sits).
    • x_translation - a horizontal shift; use it to start the wave at a different point in its cycle, or feed it another node to slide the whole wave sideways over time.

    current_frame is the input you advance. Because the output lands anywhere between y_translation βˆ’ amplitude and y_translation + amplitude, keep the range sane for whatever it's driving - a denoise of 1.0 doesn't want to be told to go to 1.5.

    Install and gotchas

    It ships in the FizzNodes pack: ComfyUI Manager β†’ search FizzNodes β†’ install β†’ restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes
    cd ComfyUI_FizzNodes && pip install -r requirements.txt
    

    Just numpy, pandas, numexpr - no models. It lives under FizzNodes πŸ“…πŸ…•πŸ… β†’ WaveNodes.

    Where people get tripped up: the defaults assume you're hooking it into a per-frame counter, so in a single-image render (where current_frame never changes) it just outputs one constant number - that's not a bug. And INT output truncates, which is fine for integer inputs but useless if you needed the fractional part. One more genuinely useful thing: the pack has CosWave, InvSinWave, InvCosWave, AbsSinWave and friends built on the same five inputs, so if you need the motion offset by 90Β° or always positive, you don't need to hack it - there's a sibling wave for that.

    CategoryFizzNodes πŸ“…πŸ…•πŸ…/WaveNodes

    Inputs (5)

    NameTypeDefaultDescription
    phaseFLOAT10–9999β€”
    amplitudeFLOAT0.50–9999β€”
    x_translationFLOAT00–9999β€”
    y_translationFLOAT0.500–9999β€”
    current_frameINT10–9999β€”

    Outputs (2)

    NameTypeDescription
    FLOATFLOATβ€”
    INTINTβ€”