---
name: music-visualizer
description: Make an audio-reactive music video from a song. Mirrored frequency bars, waveform, constant-Q spectrum or circular scope, rendered with ffmpeg over cover art, a gradient or a looping Kenerate clip, with title and artist text. Pairs with Kenerate generate_music for the track and generate_image / generate_video for the art. Use when the user wants a music visualizer, audio visualizer, lyric-free music video, Spotify Canvas-style loop, YouTube upload for a song, or a waveform / spectrum video.
compatibility: Needs Python 3.9+ with Pillow and ffmpeg; uses the Kenerate MCP to make the song and the background.
metadata:
  author: kenerate
  version: "1.0"
  kenerate-tools: "generate_music generate_image generate_video estimate_cost wait_for_generation"
---

# Music visualizer

Rules: [references/KENERATE.md](references/KENERATE.md) (models and voices: [references/MODELS.md](references/MODELS.md), or the free `pick_model` / `pick_voice` tools).

## Ask the user
The song (theirs or new), style (bars, wave, spectrum, circle), background (cover art, colour / gradient, or a looping
clip), title / artist, format (16:9 YouTube, 9:16 Shorts / Reels, 1:1), and length (whole song or a 15-30 s teaser).

## 1. Assets (Kenerate)
- Song (the user asked for one): `generate_music(prompt="<genre, mood, instruments, BPM>", engine="elevenlabs-music-v2.5", lyrics=... or instrumental=true, seconds=<length>)`
  (`ken-music-1.5` for full ~3 min songs with vocals)
  → kind `"music"`. The default engine `ken-music-1.5` treats seconds as a target; use `elevenlabs-music-v2.5` for an exact length.
- Cover art: `generate_image(prompt="album cover for <song>, <style>, no text", aspect_ratio="1:1", model="kenerate/seedream-v5.0-pro")` (illustrated) or `kenerate/gpt-image-2.5-sunburst` (photo / lettering).
- Looping clip (optional, per second): `generate_video(prompt="<slow abstract motion>, seamless loop", duration=5, resolution="720p", audio=false, aspect_ratio=<format>)`
  after `estimate_cost`. It loops under the whole song.

## 2. Render (local)
```
python <skill-dir>/scripts/visualizer.py --audio "<song url>" --style bars \
  --bg "<cover url | loop clip url | gradient:#0B1020,#3B1D6E>" --title "City Nights" --artist "<artist>" \
  --color "#22D3EE" --aspect 16:9 [--start 30 --seconds 20] \
  --out kenerate-out/music-visualizer/<project>_16x9.mp4
```
- A cover image is shown as a centred art card over a blurred copy of itself; a clip loops, slightly dimmed.
- `bars` = mirrored log-frequency bars, `wave` = centre-line waveform, `spectrum` = constant-Q bars and sonogram,
  `circle` = polar vector scope (best with stereo, wide mixes).

## Output
One MP4 with the song as audio. Make teasers by changing `--start / --seconds` and `--aspect 9:16`.

## Limits
Rendering runs at about real-time or faster at 1080p. A 3-minute song takes a few minutes.
