Sequences
Compose timed, procedural ambient events.
Generated from the reviewed SDK 0.1.0 contract snapshot. Unreviewed workspace changes are not included.
Public exports
Import from @scape/sdk.
GizmoAudioBus, GizmoSequence, GizmoSequenceContext, GizmoSequenceStep, gizmoBusError, gizmoSequenceError.
Type declarations
These declarations preserve source comments and related types. Import only the public exports listed above; module-relative paths below describe how the package is organized.
ts
import { type GizmoSynth } from './synthesis.js';
/** A shared, listener-local bus. All strikes feed these persistent effects. */
export interface GizmoAudioBus {
gain: number;
delay?: {
time: number;
feedback: number;
wet: number;
modulation?: {
frequency: number;
depth: number;
};
};
reverb?: {
duration: number;
decay: number;
seed: number;
wet: number;
};
compressor?: {
threshold: number;
knee: number;
ratio: number;
attack: number;
release: number;
};
}
export interface GizmoSequenceContext {
/** Monotonic opportunity counter, including steps that produce no sound. */
step: number;
/** Nearest-first source order; positions in world cells, with host-derived attenuation and pan. */
sources: readonly {
x: number;
y: number;
gain: number;
pan: number;
}[];
}
export interface GizmoSequenceStep {
afterSeconds: number;
strikes: {
source: number;
delaySeconds: number;
sound: GizmoSynth;
}[];
}
export type GizmoSequence = (context: GizmoSequenceContext) => GizmoSequenceStep;
export declare function gizmoBusError(value: unknown): string | null;
export declare function gizmoSequenceError(value: unknown, sources: number): string | null;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and host behavior.
