Music · token-sampler-prompt
Token sampler prompt (LLM typing)
A thin prompt field in a dark void types a phrase token by token on the beat (or on sung-word starts): just before each token a tiny next-token distribution flickers above the caret and the sampled candidate lights orange, the camera re-frames between caret, text and field with a hair of kick per token, and ⏎ fires a flash-zoom on the closing downbeat.
A free, MIT-licensed music visualizer from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Token sampler prompt (LLM typing) is for
AI-product videos, “how an LLM picks the next word” explainers, prompt demos; feed `lyrics` to type exactly on the vocal.
Details
- Category
- Music visualisers & audio graphics
- Length
- 7.0 s (210 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- yes
- Seamless loop
- no
- Text props
text- Colour props
backgroundinkdimaccent- Mood
- nature, night
- Roles
- subject
Use Token sampler prompt (LLM typing) in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add token-sampler-prompt --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render token-sampler-prompt --props '{"text":"turn the city lights up one more time","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-sampler-prompt --as webm-alpha --props '{"text":"turn the city lights up one more time","background":"#0A0A0B","ink":"#EEE9DF","dim":"#5E5B57","accent":"#FF4D12"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="token-sampler-prompt"
props={{
text: 'turn the city lights up one more time',
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-sampler-prompt"
props='{"text":"turn the city lights up one more time","background":"#0A0A0B","ink":"#EEE9DF","dim":"#5E5B57","accent":"#FF4D12"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "token-sampler-prompt",
"props": {
"text": "turn the city lights up one more time",
"background": "#0A0A0B",
"ink": "#EEE9DF",
"dim": "#5E5B57",
"accent": "#FF4D12"
}
}
]
}Token sampler prompt (LLM typing) props
17 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
text | "turn the city lights up one more time" | the phrase to type (split on spaces, timed to the beat) when `tokens`/`lyrics` are empty |
tokens | [] | explicit stream [{text, at?: seconds, dist?: [[candidate, p]], pick?}] — give real distributions (and jokes) here |
lyrics | [] | timed lyrics: [{text, start, end, words?: [{text, start, end, syl?:[[a,b]]}]}] in seconds; words without times are estimated |
bpm | 120 | tempo used when `beats` has no beat list |
offsetSec | 0.4 | 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]]}} |
tokensPerBeat | 1 | typing speed when timing from the grid |
background | "#0A0A0B" | frame colour or 'transparent' |
ink | "#EEE9DF" | typed-text colour |
dim | "#5E5B57" | field / idle-candidate colour |
accent | "#FF4D12" | sampled token + caret colour |
backdrop | "rings" | 'void' (plain) or 'rings' (tunnel rings pulling in behind) |
camera | true | beat-cut camera reframes between caret, text and field |
enterKey | true | show ⏎ and fire the flash-zoom exit on the downbeat after the last token |
seed | 3 | placeholder-distribution and shot variety |
promptLabel | "PROMPT" | small caps label above the prompt field |
nextTokenLabel | "NEXT TOKEN" | heading of the candidate-token panel (" · id N" follows) |
Related motions

Token tree (what the model could have said)
LLM explainers (“what the model could have said”), decision trees, branching-story or A/B moments; pairs with token-sampler-prompt.
token-tree
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/prompt.ts + prompt-data.ts (MIT): candidate flicker ~0.16 s ahead, camera zoom 1.25–2.7 with ±0.03 rad roll