Music · token-tree
Token tree (what the model could have said)
A sentence is generated token by token on the beat along a bright chosen path while every node sprouts dim alternative branches with their tokens and probabilities that keep branching into the dark; the camera rides the tip, then pulls back in beat steps until the whole tree is in frame, the last token set in italic serif.
A free, MIT-licensed music visualizer from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Token tree (what the model could have said) is for
LLM explainers (“what the model could have said”), decision trees, branching-story or A/B moments; pairs with token-sampler-prompt.
Details
- Category
- Music visualisers & audio graphics
- Length
- 10.0 s (300 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- yes
- Seamless loop
- no
- Text props
- —
- Colour props
backgroundinkdimaccent- Mood
- editorial, night
- Roles
- subject
Use Token tree (what the model could have said) in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add token-tree --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render token-tree --props '{"background":"#0A0A0B","ink":"#EEE9DF","dim":"#5E5B57","accent":"#FF4D12"}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export token-tree --as webm-alpha --props '{"background":"#0A0A0B","ink":"#EEE9DF","dim":"#5E5B57","accent":"#FF4D12"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="token-tree"
props={{
background: '#0A0A0B',
ink: '#EEE9DF',
dim: '#5E5B57',
accent: '#FF4D12',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="token-tree"
props='{"background":"#0A0A0B","ink":"#EEE9DF","dim":"#5E5B57","accent":"#FF4D12"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "token-tree",
"props": {
"background": "#0A0A0B",
"ink": "#EEE9DF",
"dim": "#5E5B57",
"accent": "#FF4D12"
}
}
]
}Token tree (what the model could have said) props
12 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
path | [{"token":"The","p":0.62,"alts":[["A",0.21],["Our",0.07],["This",0.05]]},{"token":"nigh… | the chosen tokens in order [{token, p, alts: [[alternative, p], …]}] |
bpm | 120 | tempo used when `beats` has no beat list |
offsetSec | 0.3 | time of the first beat in seconds (aligns the grid to your song) |
beats | {} | beat data: {bpm, offsetSec, beatsPerBar} or a list of beat times (s), or a full analysis {beats, downbeats, sections, onsets:{kick,snare,hat:[[t,strength]]}} |
beatsPerToken | 1 | beats between tokens |
depth | 3 | how deep the dim alternatives keep branching (1–3) |
background | "#0A0A0B" | frame colour or 'transparent' |
ink | "#EEE9DF" | token text colour |
dim | "#5E5B57" | branch / probability colour |
accent | "#FF4D12" | chosen path colour |
serifToken | true | set the final token in italic serif |
seed | 4 | sub-branch variety |
Related motions

Token sampler prompt (LLM typing)
AI-product videos, “how an LLM picks the next word” explainers, prompt demos; feed `lyrics` to type exactly on the vocal.
token-sampler-prompt
Lyric video (karaoke + beat)
Lyric videos, word-synced song captions, music promos: pass `lyrics` (word timings) or just `lines` + `bpm`/`offsetSec`.
lyric-video
Beat camera (snap reframes)
Makes any static motion feel edited to music — wrap a scene in a `mix` with this on top, or use it as the demo explains; promos, recaps,…
beat-camera
Beat grid (music clock HUD)
Music-production / DJ / metronome visuals, “how the edit is cut to the beat” explainers, a beat HUD overlay; feed it your song’s `beats`…
beat-grid
Width pressure type (condensing slab)
“Pressure / scale / too much” beats in explainers, launch videos and hype reels; a typographic crescendo synced to the music.
width-pressure-type
Word slam hook (one word per beat)
Chorus hooks, promo taglines, sports and hype edits — the “one word per beat” staple; set `variant` 1→4 to escalate each repeat.
word-slam-hook
Notes & credits
Technique sources:
- pdoom-video app/src/scenes/loom-tree.ts (MIT); original sentence and alternatives