SquareWave π π π
An on/off switch that follows the beat of your animation
- FLOAT
- INT
SquareWave is the bluntest instrument in the FizzNodes wave family, and that's a compliment. Where SinWave and TriangleWave glide between values, this one snaps: the output is either at the top of its range or the bottom, with no easing and no in-between. Feed its FLOAT output into a numeric input and that parameter flips on and off, frame after frame, at a rate you control. Perfect for strobing effects, blink patterns, on-beat cuts, or anything that wants a hard binary state rather than a smooth ramp.
It shares its five inputs with the sine family - phase, amplitude, x_translation, y_translation, and current_frame - and the meaning carries over: phase is the cycle length in frames, amplitude the swing, y_translation the center, x_translation the horizontal shift. In a 24fps animation, phase of 12 gives you a flip every half second. The INT output is the float truncated, which works nicely when the thing you're toggling wants a whole number.
What it's for
Because the square wave's only two states map so cleanly onto booleans, it's the wave you reach for when you want a parameter to switch on a schedule rather than oscillate. The classic use is audio-reactivity: if you sync the phase to the beat of a track (the README points at framesync.xyz for exactly this), you get a light that snaps on every hit. It's also handy as a poor-man's gate - drive a blend weight or a controlnet strength with it and the effect pops in and out instead of fading.
Install and gotchas
Same pack, same install. ComfyUI Manager β search FizzNodes β install β restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes
cd ComfyUI_FizzNodes && pip install -r requirements.txt
Dependencies are just numpy, pandas, numexpr. The node sits under FizzNodes π
π
π
β WaveNodes.
The trap is expecting smoothness that the node never promised. A square wave spends its whole cycle at the extremes, so if your parameter visibly jumps, that's the design - if you wanted the fade between states, use SinWave or TriangleWave instead. And the usual family caveat: current_frame must actually advance, or you'll stare at one frozen state wondering why nothing blinks.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| phase | FLOAT | 10β9999 | β |
| amplitude | FLOAT | 0.50β9999 | β |
| x_translation | FLOAT | 00β9999 | β |
| y_translation | FLOAT | 0.500β9999 | β |
| current_frame | INT | 10β9999 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | β |
| INT | INT | β |