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

AbsSinWave πŸ“…πŸ…•πŸ…

The rectified sine β€” a pulse that dips and snaps back to a ceiling

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

    AbsSinWave is the absolute-value sine in FizzNodes' wave family: take a sine wave, fold the negative half up, and you get a series of pulses that dip from a ceiling and bounce back. Where plain SinWave swings smoothly below and above center, this one stays positive and "throbs." It's the shape for pulsing intensities, rhythmic effects, anything that needs a repeated peak-and-settle motion.

    The formula:

    max_value - (|sin(current_frame / phase)| * amplitude)
    

    Inputs are phase (frames per pulse), amplitude (how far the value drops), max_value (the ceiling the peaks rest at), and current_frame. Note that x_translation also appears in the schema, but in the current shipped code it's a no-op - accepted, not applied. Don't fiddle with it expecting a phase shift. Outputs are FLOAT and INT (truncated), single values per frame.

    AbsSinWave vs AbsCosWave vs the plain waves

    Honestly, the FizzNodes wave menu is a small zoo of near-identical oscillators, and AbsSinWave and AbsCosWave produce practically the same pulsing shape - a half-cycle difference at most. Pick one and don't overthink the distinction; the real choice is between the plain waves (smooth oscillation through zero) and the abs waves (positive-only pulses). If your value going negative would break something downstream - a strength, a zoom amount - the abs family is the safer bet. If you want an actual oscillation, use the non-abs ones. All the wave nodes share the quirk of printing each output to the console as it runs.

    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 models, no heavy deps - a single numpy expression doing all the work.

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

    Inputs (5)

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

    Outputs (2)

    NameTypeDescription
    FLOATFLOATβ€”
    INTINTβ€”