ComfyUI lab 2: Build loopable music beds
Separate musical role, tempo, instrumentation, density, and ending behavior instead of prompting by genre alone.
Listen to this article
On-device voiceUses the voice built into your browser; no article text leaves this page.
Audio narration is not supported by this browser.
Music generation becomes controllable when you describe function before genre. A “lo-fi track” could be foreground listening, a dialogue bed, a menu loop, or a transition sting. Those jobs require different density, dynamics, and endings.
Specify the musical contract
Start with role, duration, tempo, meter, instrumentation, density, arc, vocals, ending. “Dialogue bed, 30 seconds, 92 BPM, 4/4, warm bass and restrained drums, sparse midrange, no vocals, clean loop ending” is an actual brief. Genre can come afterward as a texture hint.
Tempo connects sound to every reactive or editorial graph downstream. At 120 BPM, one beat is 0.5 seconds. At 24 fps that is twelve frames per beat. Declaring both numbers lets animation, cuts, and transitions land deliberately.
Test the seam
Do not trust a “loop” prompt by sight. Duplicate the audio end-to-end and listen across the join. Inspect waveform offset, reverb tails, and rhythmic phase. A short equal-power crossfade can hide small texture discontinuities but cannot fix a chord progression that resolves at the end. Ask for a sustained, cyclic harmonic motion when the asset must loop indefinitely.
Keep stems in mind even when the generator returns stereo. Sparse arrangements are easier to duck under dialogue and easier to drive reactive visuals without every frequency band moving at once.
Run the lab
- Open this graph in Comfy Studio
- Download the exact API-format workflow
- CLI:
app comfy download appnz-music-bed
Record the graph JSON, input assets, seed where relevant, model or service version, custom-node commit, and final artifact together. That bundle—not a screenshot—is the reproducible creative unit.
Open-source map
- Open app.nz audio nodes — MIT hosted-audio bridge
- AudioCraft — Open research code for MusicGen and AudioGen
Creative Systems Labs: 2 of 12. Previous: Design sound effects from first principles Next: Create clean narration and reusable voices