Drum Pad
A drum machine that lives inside your ComfyUI graph
- audio
- filename
ComfyUI makes pictures, and lately video - but the soundtracks have always been the awkward bit. The audio layer is bolted on, not designed in, and for a long time "add audio to your clip" meant hunting through bespoke node packs for a TTS model or a music generator. Drum Pad (from the SKBv0/ComfyUI_DrumPad pack) is the opposite direction: it doesn't generate audio, it lets you play it - a 16-pad or 64-pad drum machine, sequencer and all, that sits right on the canvas and spits out a standard AUDIO tensor for whatever's downstream.
If you make AI video and want a beat, foley, or an ambient bed for a silent clip, this is the node you reach for. It's also just fun. The default kit is a free "90s MPC" sample pack that ships with the node, so it works the moment it's installed - no model downloads, no API keys.
How it works
Drum Pad is a UI-driven node, which is the first thing to understand. The visible pad grid, the BPM and swing controls, the sequencer steps - all of that lives in a JavaScript frontend (js/DrumPad.js). The Python backend sees exactly one input: pad_state, a JSON string the UI writes for you. You'll never type it by hand; it's just the transport channel between the pretty frontend and the code that makes sound.
When you hit play, the node decodes that JSON and does one of three things, depending on the mode: plays a single selected pad, sums several pads at once ("simultaneous"), or renders a full sequence at your BPM. Sequence rendering is the real deal - it places each note on a step grid at 44.1 kHz, applies swing (0.5 is straight, 0 or 1 is max swing), respects per-pad and master volume, and soft-clips with tanh if things get hot. The sequencer supports up to 64 steps.
Every sound is loaded through ffmpeg - the node shells out to it, decodes to a float tensor, and hands you the ComfyUI audio format: {"waveform": tensor, "sample_rate": 44100}. The node is also an output node whose IS_CHANGED always returns NaN, so it re-runs every time you trigger it instead of getting eaten by ComfyUI's cache.
The outputs are simple: audio (the AUDIO tensor) and filename (a string for naming your export, minus the extension). Wire audio into ComfyUI's Save Audio or Preview Audio nodes to hear it. One stale detail: the README still talks about a file_path output, but the shipped code only returns audio and filename.
Install
Install it the normal way - in ComfyUI Manager, search "ComfyUI_DrumPad", or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SKBv0/ComfyUI_DrumPad
Then restart ComfyUI; the node shows up under the audio category. Dependencies are genuinely light - the only pip requirement is aiohttp, which ComfyUI ships anyway. The catch is ffmpeg: the pack doesn't install it, it just calls it. The ComfyUI portable build includes ffmpeg for the video nodes, so most people never notice; if you run a lean standalone install and get "FFmpeg error loading..." in the console, that's why. Put ffmpeg on your PATH.
Getting custom sounds in
The bundled 90s MPC kit is fine for sketching, but you'll want your own samples. Two ways: hit LOAD SOUND on a pad and upload a file (stored in user_sounds/), or drop files directly into the sounds/ library - subfolders for Kick, Snare, Hats, Perc, Bass, and "Accents & FX" - then restart or reload the kit. Supported formats: .wav, .mp3, .ogg, .flac, .m4a, .aac. Your kit, BPM, and pad assignments persist to a pad_config.json inside the pack folder - machine-local, so a shared workflow won't carry your drum setup with it.
The one thing that will bite you
On ComfyUI's Nodes 2.0 frontend, Drum Pad doesn't render - instead of the pad grid you get a plain multi-line text box stuffed with JSON key/value pairs. This is the #1 complaint in the community, and the author is upfront about it: he's deliberately not targeting Nodes 2.0 until the new UI settles. If you're on Nodes 2.0, switch that workflow (or its nodes) to the legacy UI to use it. The node itself works fine there.
Keyboard shortcuts (Q W E R / A S D F / Z X C V / 1 2 3 4 for pads 1–16) only fire when your mouse is over the node - easy to forget when you're leaning in to record. And a quick reality check: this is a beat sketchpad, not a DAW. No velocity layers, no song arrangement, no per-note timing beyond the swing dial. For dropping a driving four-on-the-floor under a clip it's perfect; for composing, keep your DAW.
It's a young pack, one author, no installed-base drama - just a clever little jam box for an ecosystem that needs more audio.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| pad_state | STRING | {} | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| filename | STRING | — |