← PluginsTypography
text-timed-cuesOfficial · by ShadereraTimed cues
Lyrics, subtitles and word timings read from LRC (with word times), SRT, WebVTT and JSON (rows, cues or Whisper segments with words): the line and the word at t, times only.
Add it to a filmOr ask your agent
“Use the shaderera-plugins skill to add text-timed-cues to this film and wire it in, then run check and show me a still.”
- Type
- component · Typography
- Version
- 0.1.0 · published
- Licence
- MIT
- Built on
- No other plugins
- npm
- No packages
- Copies
- Tags
- lyrics, subtitles, captions, lrc, srt, vtt, webvtt, whisper, word timing, karaoke, timed text
READMEtext-timed-cues
How to
use it.
Lyrics and subtitles by time: read LRC, SRT, WebVTT or Whisper JSON once, then ask for the line and the word at t.
import { cueAt, loadTimedText, wordAt } from './type/timed-text.ts'// in openconst lyrics = await loadTimedText(host, 'lyrics/song.lrc') // .lrc, .srt, .vtt or .json; { trim } if the film starts later// in render(t)const line = cueAt(lyrics, t) // { start, end, text, words? }, or undefined between cuesconst word = wordAt(lyrics, t) // { start, end, text }: the word being sung, when the file has wordsIt gives times only: how a line looks and moves is the film's code.
- LRC:
[mm:ss.xx] line, several stamps on a line for a repeated line, enhanced LRC's<mm:ss.xx>before each word, and[offset:+250](ms). A line ends where the next starts. - SRT and WebVTT:
start --> endblocks; tags such as<i>are stripped. No styling or positions are read. - JSON: rows of
[start, end, "line"], cues like the onescueAtreturns, or Whisper'ssegmentswithwords(an aligner's output, for word times). parseLrc,parseSrt,parseTimedJsonandparseTimedText(path, source)read text you already have;trimCues(cues, s)shifts every time by-s.
More in Typography05 plugins
More in Typography
text-code-wallOfficial · by ShadereraCode wallThe project's own source as a wall of text that scrolls and jumps on the beat, glitched and scrambled, with a claim cut out of the middle.text-feature-captionsOfficial · by ShadereraFeature captionsHuge titles with a small note, several to a scene, swapping on the beat through ASCII noise, each placed anew in one of four layouts inside the safe area.text-glyph-morphOfficial · by ShadereraGlyph morphOne glyph outline or word morphing into another: contours resampled by arc length, paired outer to outer and hole to hole, a contour with no partner grown from a point, the in-between a pure function of k.text-glyph-outlinesOfficial · by ShadereraGlyph outlinesText from a font file as geometry: contours flattened to polylines with the original curves kept, fill triangles with holes cut correctly, and a closed extruded mesh with normals, each with per-glyph ranges so letters can move apart.text-kineticOfficial · by ShadereraKinetic typeCanvas2D text primitives: ASCII scramble, decode in and scramble out, horizontal band glitch, fit to width, hollow outlines, timecode.