Log in
TechniqueBy HypernaturalVersion 1, updated

Audio waveform

hn/hn4a-compositor-audio-waveform

Draw a sound's real waveform with hn4a-compositor, from the audio file itself: bars from its peak envelope as a path layer, drawn on, revealed left to right, or scrolling past a fixed playhead as an audiogram for an audio-only podcast clip. Use for audiograms, waveform graphics, a sound effect or ambience shown on screen, and a running waveform band under a sound-themed piece.

SKILL.md

Give it a WAV and where the waveform goes; get compositor layers that draw that file's own waveform, so what the viewer sees is what they hear. The spec format and the commands are hn4a-compositor's.

Inputs

  • The sound as a 16-bit WAV (ffmpeg -i x.m4a -c:a pcm_s16le x.wav), the same span the spec plays in its audio.
  • Where it sits: a box for still bars, or a row (y, h) and a playhead x for an audiogram.

Run it

Write references/waveform.md's module into the job's scripts/ as waveform.py and call it from the build script beside it:

UseCallThen
A sound shown on screenbars(envelope(wav, n), w, h) as a path layer's paths"in": {"fx": "draw"}, and a marker at the first bar over 0.5 (its peak)
Ambiencethe same barsrevealed left to right (revealFrom: "left", an anim.reveal over 2.5 s)
An audiogram, or a running bandaudiogram(id, wav, start, dur, y, h, x=)the bite in the spec's audio from start
exec python scripts/build_audiogram.py
exec hn4a-compositor still clips/audiogram.json clips/a_1.0.png --at 1.0
exec hn4a-compositor render clips/audiogram.json

(cwd the job folder; references/waveform.md has the build script.)

What you get

  • envelope: n peak levels between two times, scaled so the loudest is 1.
  • bars: one stroke per level, centred on the box's middle, at least 3 px each way so silence still reads as a line.
  • audiogram: the waveform laid out at px_per_s (400) and moved left at that speed, so the bar under the playhead is the moment playing; and the playhead. On a test bite, the bar beside the playhead was 234 of 240 px while the voice peaked and 12 px in the silences, matching the file's level at each moment.

Tips and traps

  • The band enters from the playhead: at the clip's start the left half is empty. Start the waveform a little earlier in a longer file (t0) if it should be full.
  • A running band under every scene (a sound-themed piece): one long audiogram at low opacity, e.g. 9600 px wide at 0.22, a fixed 4 px playhead.
  • A draw entrance on a waveform showed it fully drawn by 0.2 s; judge the timing on a still.

Check it

  • Stills at a loud and a silent moment: the bar by the playhead tall, then a line.
  • The live spec, then the render (hn4a-compositor, Live spec, then render); watch it with sound.

Workflows that use this skill

FAQs

Draw a sound's real waveform with hn4a-compositor, from the audio file itself: bars from its peak envelope as a path layer, drawn on, revealed left to right, or scrolling past a fixed playhead as an audiogram for an audio-only podcast clip. Use for audiograms, waveform graphics, a sound effect or ambience shown on screen, and a running waveform band under a sound-themed piece.

Install Hypernatural Desktop, a free Mac app, and connect it to Claude Code, Codex or Claude Desktop. Then describe the video you want and your agent finds the skill itself, or paste this page's link (https://hypernatural.ai/skill/hn/hn4a-compositor-audio-waveform) and it installs hn/hn4a-compositor-audio-waveform and follows it.

Nothing. The skill is free and runs with tools on your own Mac, like hn4a-compositor, python and ffmpeg.

Yes. Ask your agent to adjust it for your job, or to save its own version. You can publish your version under your own handle so anyone can install it.

Go make something cool.

Install the app, open your agent, describe the video. That's the whole onboarding.

Sticker HypernaturalSticker BannerSticker TVBoy