Opus Motion ★ Star on GitHub

Music · lyric-anchored-timeline

Lyric-anchored cuts (edit by lyric text)

A lyric video whose scenes are placed by lyric text, not timestamps: each scene names a fragment of its line and cuts on the last beat (or downbeat) before that line’s first word, then integrates the words its own way (orange field, outline fill, rubber-stamped, stacked); an edit strip shows beats, word blocks and the snapped cut markers.

A free, MIT-licensed music visualizer from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Lyric-anchored cuts (edit by lyric text): three frames of the music visualizer, start, middle and end
Lyric-anchored cuts (edit by lyric text) — start, middle and end of the 17.0-second motion.

What Lyric-anchored cuts (edit by lyric text) is for

Author a whole lyric video or captioned promo by lyric text — re-time the song and every cut still lands on the beat; teach “cut on the beat” editing.

  • lyric video
  • edit
  • cut on the beat
  • lyrics
  • karaoke
  • music video
  • timeline
  • beat sync
  • scenes
  • downbeat
  • treatise
  • kinetic typography

Details

Category
Music visualisers & audio graphics
Length
17.0 s (510 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
lines
Colour props
accent
Mood
—
Roles
subject

Use Lyric-anchored cuts (edit by lyric text) in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add lyric-anchored-timeline --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render lyric-anchored-timeline --props '{"lines":["Turn the city lights up one more time","Every heartbeat lands right on the line","Hold the signal, never let it fade","We are louder than the noise we made"],"accent":"#FF4D12"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export lyric-anchored-timeline --as mp4 --props '{"lines":["Turn the city lights up one more time","Every heartbeat lands right on the line","Hold the signal, never let it fade","We are louder than the noise we made"],"accent":"#FF4D12"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="lyric-anchored-timeline"
  props={{
    lines: [
      'Turn the city lights up one more time',
      'Every heartbeat lands right on the line',
      'Hold the signal, never let it fade',
      'We are louder than the noise we made',
    ],
    accent: '#FF4D12',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="lyric-anchored-timeline"
  props='{"lines":["Turn the city lights up one more time","Every heartbeat lands right on the line","Hold the signal, never let it fade","We are louder than the noise we made"],"accent":"#FF4D12"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "lyric-anchored-timeline",
      "props": {
        "lines": [
          "Turn the city lights up one more time",
          "Every heartbeat lands right on the line",
          "Hold the signal, never let it fade",
          "We are louder than the noise we made"
        ],
        "accent": "#FF4D12"
      }
    }
  ]
}

Lyric-anchored cuts (edit by lyric text) props

9 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
scenes[{"lyric":"city lights","snap":"beat","look":"outline"},{"lyric":"heartbeat","snap":"do…[{lyric: 'words from the line', snap: 'beat'|'downbeat'|'none', nth?, look: 'field'|'outline'|'stamp'|'stack', background?, ink?}] — each scene starts at its line's snapped cut
lines["Turn the city lights up one more time","Every heartbeat lands right on the line","Hol…plain lyric lines (used when `lyrics` is empty): timed onto the beat grid, words on eighth notes
lyrics[]timed lyrics: [{text, start, end, words?: [{text, start, end, syl?:[[a,b]]}]}] in seconds; words without times are estimated
bpm120tempo used when `beats` has no beat list
offsetSec0.5time 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]]}}
accent"#FF4D12"signal colour (current word, cut markers)
editStriptrueshow the edit strip (beats, words, cut markers, playhead) — turn off for the clean video
cutFlashtruetwo-frame invert flash on every cut

Notes & credits

Technique sources:

  • pdoom-video app/src/timeline.ts cut(q) = last beat ≤ first word (+20 ms), engine/lyrics.ts get(text) (MIT)