Nodes/ꘇ Genereti/ꘇ mod.analyze
ComfyUI Node

ꘇ mod.analyze

Turn whatever is playing into six numbers you can wire

By languel·Created about a month ago·Updated 3 days ago· 1
ꘇ mod.analyze
  • input
  • audio
  • channels
  • rms
  • peak
  • image
◄fft_size1024►
◄smoothing0.50►
◄display_gain2.00►
◄width512►
◄height256►

ꘇ mod.analyze is the tap you want when the goal isn't to watch the audio but to use it: RMS, peak, stereo correlation and three frequency bands, delivered as CHOP channels plus two plain FLOAT sockets. It's the node that turns sound into a parameter - opacity, displacement, brush size, anything you can convert to an input.

What it is

The Genereti pack is a realtime creative-coding layer for ComfyUI. Its mod.* family is a live Web Audio patching layer running in the browser tab, with chop.* control signals alongside it, all named in TouchDesigner's top/chop/dat vocabulary. mod.analyze belongs to the group of four inline analysis taps - mod.scope, mod.spectrum, mod.lissajous, mod.analyze - which all pass their incoming audio bus through unchanged and publish measurements on the side.

That pass-through design is why you can add one to a finished patch. It doesn't need to be at the end of the chain, doesn't consume the signal, and doesn't start anything.

How it works

Two AnalyserNodes read the split stereo signal. On each control update you get:

  • rms - root mean square of both channels, the "how loud on average" number.
  • peak - maximum absolute sample in the window.
  • correlation - stereo phase: +1 when both channels carry the same signal, −1 for inverted phase, 0 for silence. Mono sources are upmixed to stereo for analysis, so a mono patch reads a solid +1.
  • low, mid, high - RMS spectral amplitude over 20–250 Hz, 250–2000 Hz and 2000–20000 Hz (clipped at Nyquist).

Be honest about what those bands are: they're spectral amplitude, not calibrated loudness and not an onset detector. They won't tell you "a drum hit happened" reliably; peak is a better trigger for that.

Analysis reports one control sample at up to 40 Hz, so it's control-rate, not sample-accurate. fft_size and smoothing affect the spectral bins that feed the bands; smoothing doesn't touch waveform or RMS. display_gain scales the drawing only - never the sound, never the numbers.

The inputs and outputs that matter

Inputs: input (the bus, forwarded unchanged), fft_size (256–4096, default 1024), smoothing (0–0.99, default 0.5), display_gain (0.1–20, default 2).

Outputs: audio (pass the chain along), channels (CHOP: rms, peak, correlation, low, mid, high), rms (FLOAT), peak (FLOAT), image (the level/band bars as an IMAGE).

Two ways to use it, and pick deliberately:

  1. Simple - take the rms or peak FLOAT socket straight into a numeric widget you've converted to an input. No CHOP wrangling.
  2. Expressive - take channels and run it through chop.select to pull one band or correlation, then chop.math to scale it. The bundled ꘇ-Sound-Analysis demo does analyze → chop.select (rms) → chop.math (×12) → top.filter (amount) to animate opacity from sound. That ×12 matters: raw RMS is small, and a UI parameter usually wants something closer to 0–1. Use Alt+W / Alt+O for an overlay or output-only view.

Install

Manager → search Genereti, or:

git clone https://github.com/languel/genereti.git custom_nodes/genereti
./.venv/bin/python -m pip install -r custom_nodes/genereti/requirements.txt

Comfy ≥ 0.38.2, Python ≥ 3.11. The audio guide's own troubleshooting step for these nodes: restart Comfy once to register the new schemas, then reload the browser page - a cached tab won't show them. requirements.txt is one line (comfyui-frontend-package>=1.53.6); everything else is already in ComfyUI. No models, no server, no extra packs. Open Workflows → Genereti → ꘇ-Sound-Analysis for the six-step lesson and a working audio-driven control.

Common issues

Zeros everywhere and a placeholder image. You queued. Queued execution of these taps returns silent channels, rms/peak at 0 and a placeholder IMAGE - it never reads live sound. Press Start on mod.output and watch it live.

Flat response to drums. Raise smoothing down (lower it), lower fft_size, and check you're reading peak rather than rms for percussive hits. Also confirm there's actually signal at the tap - an upstream mod.filter or the instrument's own cutoff can remove it.

Everything snaps to zero after you hit Panic. Expected; stop/panic clears all measurements.

Correlation confuses you. One number, three meanings: +1 identical, −1 inverted phase, 0 silence. It's a phase readout, not quality.

The IMAGE output doesn't move. Drawings and CHOP snapshots update on the control timer, not per frame of audio; if you're queuing rather than running live, it's a still.

The usual caveat for this pack: solo MIT alpha by Liuboto, v0.1.4, README's own description "super alpha - early classroom testing", and an explicit "back up your workflows before updating".

CategoryGenereti / Modular audio

Inputs (6)

NameTypeDefaultDescription
inputGENERETI_AUDIO_BUS—
fft_sizeCOMBO10245 options: 256, 512, 1024, 2048, 4096
smoothingFLOAT0.500–0.99—
display_gainFLOAT2.000.1–20—
widthoptINT51264–2048—
heightoptINT25664–2048—

Outputs (5)

NameTypeDescription
audioGENERETI_AUDIO_BUS—
channelsGENERETI_CHOP—
rmsFLOAT—
peakFLOAT—
imageIMAGE—