Files
Vance Ingalls 2e70999948 fix(core): make the character presets sound like different things
"Megaphone sounds just like AM Radio" — correct, and the measurement
found a bigger problem behind it. A log sweep through each preset showed
BOTH flattened to a dead -19 dB line across the whole midband: the
saturation thresholds were low enough that hard clipping erased the
resonances underneath. The same chain with its clipper removed showed the
horn peaks standing +12 dB proud, so the shaping had always been there
and was being destroyed on the way out.

Every character preset's clipper is backed off to where its shaping
survives — telephone -18→-9, tannoy -16→-10, radio -15→-8, megaphone
-14→-5. That alone is most of the fix.

Then the ones that remained alike, by what physically distinguishes them:

- **AM Radio** was a second telephone: same band, same mid honk. A
  receiver DIPS where a phone honks (the IF droop) and is boxy where a
  phone is thin, so it gets a -5 dB scoop at 1.2 kHz and a low shelf, and
  its band moves down and darker. The telephone keeps its band unchanged
  — 300-3400 IS the G.712 passband, and it is the one preset whose
  identity is the band itself.
- **Megaphone** sat inside the telephone's band. A bullhorn has no low end
  at all: the band moves up to 700 Hz and the honk gets narrower and
  louder at 1.9 kHz.
- **Tannoy** was a telephone with reverb. A concourse horn is bigger in
  every direction — band out to 5 kHz, honk higher and harder at 2.4 kHz.

Measured every character preset against every other, before and after. No
pair now sounds more alike than the signal itself; the worst were
telephone/AM at -5.9 dB and AM/tannoy at -4.8 dB, and telephone/megaphone
reached -3.2 mid-fix. Now every pair is positive — telephone/megaphone
-3.2 → +5.6, AM/megaphone -0.2 → +11.3.

Also sets Tannoy's Concourse reverb to the requested size 0.54, damping
0.48 (was 0.5 / 0.7).

Worth recording for whoever tunes these next: measuring on narration is
almost useless here. Speech has little energy above 3 kHz, so a spectrum
probe on it reported the two presets as near-identical whatever I changed.
A log sweep is what showed the flattening, and an A-vs-B difference on
speech is what confirms it.

core 1770 passing.
2026-08-10 15:39:08 -07:00
..

@hyperframes/core

Types, parsers, generators, compiler, linter, runtime, and frame adapters for the Hyperframes video framework.

Install

npm install @hyperframes/core

Most users don't need to install core directly — the CLI, producer, and studio packages depend on it internally.

What's inside

Module Description
Types TimelineElement, CompositionSpec, Asset, canvas dimensions, defaults
Parsers parseHtml — extract timeline elements from HTML; parseGsapScript — parse GSAP animations
Generators generateHyperframesHtml — produce valid Hyperframes HTML from a composition spec
Compiler compileTimingAttrs — resolve data-start / data-duration into absolute times
Linter lintHyperframeHtml — validate Hyperframes HTML (missing attributes, overlapping tracks, etc.)
Runtime IIFE script injected into the browser — manages seek, media playback, and the window.__hf protocol
Frame Adapters Pluggable animation drivers (GSAP, Lottie, CSS, or custom)

Frame Adapters

A frame adapter tells the engine how to seek your animation to a specific frame:

import { createGSAPFrameAdapter } from "@hyperframes/core";

const adapter = createGSAPFrameAdapter({
  getTimeline: () => gsap.timeline(),
  compositionId: "my-video",
});

Implement FrameAdapter for custom animation runtimes:

import type { FrameAdapter } from "@hyperframes/core";

const myAdapter: FrameAdapter = {
  id: "my-adapter",
  getDurationFrames: () => 300,
  seekFrame: (frame) => {
    /* seek your animation */
  },
};

Parsing and generating HTML

import { parseHtml, generateHyperframesHtml } from "@hyperframes/core";

const { elements, metadata } = parseHtml(htmlString);
const html = generateHyperframesHtml(spec);

Linting

import { lintHyperframeHtml } from "@hyperframes/core/lint";

const result = lintHyperframeHtml(htmlString);
// result.findings: { severity, message, elementId }[]

Documentation

Full documentation: hyperframes.heygen.com/packages/core