Nodes/More Math/mrmth_AudioMathNode
ComfyUI Node

mrmth_AudioMathNode

The legacy audio mixer you'll still find in old workflows

By mcDandy·Created about a year ago·Updated 3 days ago· 5
mrmth_AudioMathNode
  • a
  • b
  • c
  • d
  • AUDIO
Audioa*(1-w)+b*w
length_mismatcherror
w0.00
x0.00
y0.00
z0.00

mrmth_AudioMathNode is the original, pre-autogrow version of More Math's audio math node. If you're hunting this specific class name, it's probably because a workflow you downloaded references it - and the honest advice is: it still works, it's marked deprecated in the pack's source, and you should use the newer mrmth_ag_AudioMathNode for anything new. But since these old workflows are floating around, here's what this one does.

What it is

Same idea as the new node - evaluate a math expression over audio waveforms - but with the old fixed-input style. Instead of autogrow lists you get a, b, c, d as audio inputs (b, c, d are optional and default to silence) and w, x, y, z as float variables. The expression field is called Audio and defaults to a*(1-w)+b*w, the classic crossfade: blend audio a and b by weight w. That's the pattern you'll see in most old workflows - a two-input mixer with a single blend knob.

Inputs and outputs

Required: a (audio), Audio (the expression). Optional: b, c, d (audio), w, x, y, z (floats, default 0), plus length_mismatch (error default, tile, pad) for handling different sample counts - the tooltip's version says "tile: repeat shorter inputs; error: raise error on mismatch; pad: treat missing samples as zero." One output: AUDIO.

It uses lazy evaluation, so unconnected inputs are skipped rather than computed - a small nicety that means you can leave c and d dangling.

Installing it

Same as the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/mcDandy/more_math
cd more_math
pip install -r requirements.txt

Restart ComfyUI, or install "More math" from ComfyUI Manager. Dependency is antlr4-python3-runtime on top of torch. No model downloads.

Why it's deprecated

The _ag_ rewrite replaced the fixed a/b/c/d + w/x/y/z inputs with autogrow V0..Vn/F0..Fn lists and exposed the audio-specific variables (S for sample position, R for sample rate, T for sample count) that make per-sample math actually useful. This legacy node has those too internally - the expression engine is shared - but the old input surface is clunkier and the pack is actively developing the autogrow family. If an old workflow depends on this node, it'll keep running; if you're starting fresh, use mrmth_ag_AudioMathNode. And keep the pack's broader caveat in mind: it's new and solo-maintained, so pin the version once you have a working setup.

Categorysd

Inputs (10)

NameTypeDefaultDescription
aAUDIO
AudioSTRINGa*(1-w)+b*wExpression to apply on input audio waveforms
length_mismatchCOMBOerrorHow to handle mismatched audio sample counts. tile: repeat shorter inputs; error: raise error on mismatch; pad: treat missing samples as zero.
boptAUDIO
coptAUDIO
doptAUDIO
woptFLOAT0.00
xoptFLOAT0.00
yoptFLOAT0.00
zoptFLOAT0.00

Outputs (1)

NameTypeDescription
AUDIOAUDIO