reframe-video 0.6.31 → 0.6.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ Verified against each asset page's license field on 2026-06-11.
21
21
  (The three `bgm-{synthwave,piano,battle}.mp3` are re-encoded to mono 96 kbps to keep the package small.)
22
22
 
23
23
  CC0 requires no attribution; this file records provenance anyway.
24
- These files are loaded only by an explicit `file:` cue (e.g.
25
- `{ sfx: undefined, file: "whoosh.wav" }`). A bare `sfx:` name always uses the
26
- procedural synthesizer (so its pitch/auto-variation applies) it is no longer
27
- auto-overridden by a same-named `.wav` here.
24
+ Six names (`whoosh`/`rise`/`shimmer`/`thud`/`pop`/`tick`) ship a curated `.wav`
25
+ that sounds better than the synth, so a bare `sfx:` uses that sample by default
26
+ (fixed it doesn't pitch-vary); pass `params: { synth: 1 }` to force the varying
27
+ synth. Every other name synthesizes. Any `.wav`/`.ogg` here is also playable
28
+ directly via an explicit `file:` cue.
package/dist/bin.js CHANGED
@@ -2453,6 +2453,10 @@ async function resolveCueFile(cue, sceneDir) {
2453
2453
  );
2454
2454
  }
2455
2455
  const { name, params } = cue.source;
2456
+ if (SAMPLE_DEFAULT.has(name) && !params.synth) {
2457
+ const vendored = join(VENDORED, `${name}.wav`);
2458
+ if (existsSync2(vendored)) return vendored;
2459
+ }
2456
2460
  return writeCached(`${name}-${fnv1a(JSON.stringify(params))}`, () => synthSfx(name, params));
2457
2461
  }
2458
2462
  async function resolveBgmFile(source, duration, sceneDir) {
@@ -2465,7 +2469,7 @@ async function resolveBgmFile(source, duration, sceneDir) {
2465
2469
  }
2466
2470
  return writeCached(`${source.name}-${duration.toFixed(2)}`, () => synthBgm(source.name, duration));
2467
2471
  }
2468
- var ROOT, VENDORED, CACHE;
2472
+ var ROOT, VENDORED, CACHE, SAMPLE_DEFAULT;
2469
2473
  var init_sfx = __esm({
2470
2474
  "../render-cli/src/audio/sfx.ts"() {
2471
2475
  "use strict";
@@ -2474,6 +2478,7 @@ var init_sfx = __esm({
2474
2478
  ROOT = true ? resolve(dirname(fileURLToPath(import.meta.url)), "..") : resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "..");
2475
2479
  VENDORED = join(ROOT, "assets", "sfx");
2476
2480
  CACHE = join(tmpdir(), "reframe-sfx-cache");
2481
+ SAMPLE_DEFAULT = /* @__PURE__ */ new Set(["whoosh", "rise", "shimmer", "thud", "pop", "tick"]);
2477
2482
  }
2478
2483
  });
2479
2484
 
package/dist/cli.js CHANGED
@@ -1913,6 +1913,7 @@ function synthBgm(name, duration, seed = 0) {
1913
1913
  var ROOT = true ? resolve(dirname(fileURLToPath(import.meta.url)), "..") : resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "..");
1914
1914
  var VENDORED = join(ROOT, "assets", "sfx");
1915
1915
  var CACHE = join(tmpdir(), "reframe-sfx-cache");
1916
+ var SAMPLE_DEFAULT = /* @__PURE__ */ new Set(["whoosh", "rise", "shimmer", "thud", "pop", "tick"]);
1916
1917
  function fnv1a(text2) {
1917
1918
  let h = 2166136261;
1918
1919
  for (let i = 0; i < text2.length; i++) {
@@ -1945,6 +1946,10 @@ async function resolveCueFile(cue, sceneDir) {
1945
1946
  );
1946
1947
  }
1947
1948
  const { name, params } = cue.source;
1949
+ if (SAMPLE_DEFAULT.has(name) && !params.synth) {
1950
+ const vendored = join(VENDORED, `${name}.wav`);
1951
+ if (existsSync(vendored)) return vendored;
1952
+ }
1948
1953
  return writeCached(`${name}-${fnv1a(JSON.stringify(params))}`, () => synthSfx(name, params));
1949
1954
  }
1950
1955
  async function resolveBgmFile(source, duration, sceneDir) {
@@ -588,8 +588,9 @@ or your own path. **Mixing**: any cue takes `fadeIn`/`fadeOut` (seconds) and `pa
588
588
  **Recorded samples** are a separate layer from the synth palette: use a `file:` cue to
589
589
  play a CC0 file from `assets/sfx/` — keyboard typing (`keypress-*.wav`, also driven by
590
590
  `textTypeCues`), `footstep_*`, and the Kenney UI pack (`click_*`/`confirmation_*`/
591
- `select_*`/…). A bare `sfx:` name always synthesizes (so it pitch-varies); pass
592
- `file: "whoosh.wav"` to play the recorded version instead. Audition the procedural set
591
+ `select_*`/…). Six "hero" names (`whoosh`/`rise`/`shimmer`/`thud`/`pop`/`tick`) default to a
592
+ curated CC0 sample (better fidelity, fixed no pitch-vary); add `params: { synth: 1 }`
593
+ to use the varying synth instead. Every other `sfx:` name synthesizes. Audition the procedural set
593
594
  with `examples/scenes/sfx-showcase.ts` and the samples with `sample-showcase.ts`.
594
595
 
595
596
  ## Rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reframe-video",
3
- "version": "0.6.31",
3
+ "version": "0.6.32",
4
4
  "description": "Declarative motion graphics that AI can write and humans can tweak — human edits survive AI regeneration. Deterministic mp4 renders from a plain-data scene format.",
5
5
  "keywords": [
6
6
  "motion-graphics",