reframe-video 0.6.30 → 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.
- package/assets/sfx/LICENSE.md +10 -4
- package/assets/sfx/bgm-battle.mp3 +0 -0
- package/assets/sfx/bgm-piano.mp3 +0 -0
- package/assets/sfx/bgm-synthwave.mp3 +0 -0
- package/dist/bin.js +6 -1
- package/dist/cli.js +5 -0
- package/guides/edsl-guide.md +7 -4
- package/package.json +1 -1
package/assets/sfx/LICENSE.md
CHANGED
|
@@ -14,9 +14,15 @@ Verified against each asset page's license field on 2026-06-11.
|
|
|
14
14
|
| thud.wav (trimmed) | [Muffled Distant Explosion](https://opengameart.org/content/muffled-distant-explosion) | NenadSimic | CC0 |
|
|
15
15
|
| footstep_001/002/003.ogg (footstep00/03/06) | [RPG Audio](https://kenney.nl/assets/rpg-audio) | Kenney (kenney.nl) | CC0 |
|
|
16
16
|
| bgm-song21.mp3 | [Mysterious Ambience (song21)](https://opengameart.org/content/mysterious-ambience-song21) | cynicmusic (pixelsphere.org) | multi-licensed; used under its CC0 option |
|
|
17
|
+
| bgm-synthwave.mp3 | [Calm Ambient 1 (Synthwave)](https://opengameart.org/content/calm-ambient-1-synthwave-4k) | cynicmusic (pixelsphere.org) | multi-licensed; used under its CC0 option |
|
|
18
|
+
| bgm-piano.mp3 | [Calm Piano 1 (Vaporware)](https://opengameart.org/content/calm-piano-1-vaporware) | cynicmusic (pixelsphere.org) | multi-licensed; used under its CC0 option |
|
|
19
|
+
| bgm-battle.mp3 | [Battle Theme B for RPG](https://opengameart.org/content/battle-theme-b-for-rpg) | cynicmusic (pixelsphere.org) | multi-licensed; used under its CC0 option |
|
|
20
|
+
|
|
21
|
+
(The three `bgm-{synthwave,piano,battle}.mp3` are re-encoded to mono 96 kbps to keep the package small.)
|
|
17
22
|
|
|
18
23
|
CC0 requires no attribution; this file records provenance anyway.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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) {
|
package/guides/edsl-guide.md
CHANGED
|
@@ -578,16 +578,19 @@ explicitly with `params`: `{ sfx: "blip", params: { seed: 4 } }` (pick the varia
|
|
|
578
578
|
`{ sfx: "tick", params: { pitch: 1.5 } }` (an explicit frequency multiplier; `2` = octave
|
|
579
579
|
up). `params.gainDb` trims a single hit.
|
|
580
580
|
|
|
581
|
-
**bgm beds
|
|
582
|
-
`
|
|
581
|
+
**bgm beds**: synthesized via `bgm.synth` (`ambient-pad` `lofi` `pulse` `tension`
|
|
582
|
+
`uplift`), or a file via `bgm.file` — bundled CC0 music: `bgm-song21.mp3` (ambient),
|
|
583
|
+
`bgm-synthwave.mp3` (chill), `bgm-piano.mp3` (elegant), `bgm-battle.mp3` (energetic),
|
|
584
|
+
or your own path. **Mixing**: any cue takes `fadeIn`/`fadeOut` (seconds) and `pan`
|
|
583
585
|
(-1 left … 0 centre … +1 right). A `video` clip's audio takes `fadeIn` and `pan` too
|
|
584
586
|
(clip fade-out isn't supported yet). The bed auto-ducks under cues (`bgm.duck`).
|
|
585
587
|
|
|
586
588
|
**Recorded samples** are a separate layer from the synth palette: use a `file:` cue to
|
|
587
589
|
play a CC0 file from `assets/sfx/` — keyboard typing (`keypress-*.wav`, also driven by
|
|
588
590
|
`textTypeCues`), `footstep_*`, and the Kenney UI pack (`click_*`/`confirmation_*`/
|
|
589
|
-
`select_*`/…).
|
|
590
|
-
|
|
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
|
|
591
594
|
with `examples/scenes/sfx-showcase.ts` and the samples with `sample-showcase.ts`.
|
|
592
595
|
|
|
593
596
|
## Rules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reframe-video",
|
|
3
|
-
"version": "0.6.
|
|
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",
|