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

InvSinWave πŸ“…πŸ…•πŸ…

The inverse sine oscillator β€” your value starts low, rises, and falls like a swell

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

    InvSinWave is the inverted member of FizzNodes' sine pair. Same wave family, opposite starting direction: where plain SinWave begins its cycle mid-swing, InvSinWave starts low, rises to its peak, and settles back - a swell shape that's useful for anything that should "grow in" rather than hit the ground running. Think a zoom that starts gentle, a brightness that builds, or an effect that fades in and out on a loop.

    The formula is a negated sine:

    y_translation + amplitude * -(sin(-(2Ο€ * current_frame / phase - x_translation)))
    

    which, negatives canceling, reads as a sine shifted by half a phase. With the defaults (y_translation 0.5, amplitude 0.5) the output starts near 0, climbs to 1, drops through 0, and repeats - the mirror of SinWave's start.

    Inputs are the standard wave set: phase (frames per full cycle), amplitude (how far the value swings), x_translation (horizontal phase shift), y_translation (the center the wave oscillates around), and current_frame (your frame counter, typically wired from your animation loop). Outputs are FLOAT and INT - the same value, with INT being the truncated float. These are single values per frame, so you'd drive a per-frame parameter directly.

    The honest take

    The FizzNodes wave nodes are all variations on one theme, and honestly the difference between SinWave and InvSinWave is a phase shift you could do yourself with an offset. Where they shine is convenience and clarity: grabbing "start low" from the menu instead of reasoning about offsets mid-graph, and pairing them so two values peak at opposite times without math nodes. If that's your situation, this is a fine pick. If you need the standard sine phase, that's SinWave; if you want a sharper pulse, AbsSinWave gives you the rectified shape. Same console-printing quirk as the rest of the family - each run prints its output, so expect some terminal noise.

    Install

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

    Or install "FizzNodes" via ComfyUI Manager and restart. No model downloads - it's a single numpy expression.

    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β€”