@adatechnology/game-audio 0.7.0 → 0.9.0
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/README.md +69 -1
- package/assets/sfx/CREDITOS.md +2 -2
- package/assets/sfx/manifest.json +48 -0
- package/dist/bank-Dsj1VAht.d.ts +391 -0
- package/dist/chunk-JV5XXCQE.js +180 -0
- package/dist/chunk-JV5XXCQE.js.map +1 -0
- package/dist/{chunk-BXUGSOPY.js → chunk-UUWKSG4J.js} +240 -167
- package/dist/chunk-UUWKSG4J.js.map +1 -0
- package/dist/fitted.d.ts +89 -0
- package/dist/fitted.js +139 -0
- package/dist/fitted.js.map +1 -0
- package/dist/index.d.ts +138 -3
- package/dist/index.global.js +642 -200
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +258 -20
- package/dist/index.js.map +1 -1
- package/dist/{locale-CJfDpWnI.d.ts → locale-YHyJwN2P.d.ts} +108 -440
- package/dist/testing.d.ts +5 -4
- package/dist/testing.js +2 -1
- package/package.json +6 -2
- package/dist/chunk-BXUGSOPY.js.map +0 -1
package/dist/fitted.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { B as BusId, F as Falloff, S as SoundRegistry, a as SoundBank, L as LoopRecipe, b as SoundRecipe } from './bank-Dsj1VAht.js';
|
|
2
|
+
|
|
3
|
+
/** One band layer (`band`) or one partial (`frequency` + `wave`) of a fitted take: peak gain and its curve, `[seconds, 0..1]` points. */
|
|
4
|
+
type FittedLayer = {
|
|
5
|
+
readonly band?: number;
|
|
6
|
+
readonly frequency?: number;
|
|
7
|
+
readonly wave?: 'sine';
|
|
8
|
+
readonly gain: number;
|
|
9
|
+
readonly env: readonly (readonly [number, number])[];
|
|
10
|
+
};
|
|
11
|
+
type FittedTake = {
|
|
12
|
+
readonly duration: number;
|
|
13
|
+
readonly layers: readonly FittedLayer[];
|
|
14
|
+
};
|
|
15
|
+
type FittedSound = {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly category: string;
|
|
18
|
+
readonly takes?: readonly FittedTake[];
|
|
19
|
+
readonly loop?: {
|
|
20
|
+
readonly bands: readonly {
|
|
21
|
+
readonly band: number;
|
|
22
|
+
readonly gain: number;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
readonly sources: readonly string[];
|
|
26
|
+
};
|
|
27
|
+
/** A band: its centre, its Q and how many bandpass biquads in series (2 makes the skirts fall 12 dB an octave instead of 6). */
|
|
28
|
+
type FittedBand = {
|
|
29
|
+
readonly frequency: number;
|
|
30
|
+
readonly q: number;
|
|
31
|
+
readonly stages?: number;
|
|
32
|
+
};
|
|
33
|
+
type FittedData = {
|
|
34
|
+
readonly rate: number;
|
|
35
|
+
readonly bands: readonly FittedBand[];
|
|
36
|
+
/** The bands of the loops (a parallel bank of single biquads); the take bands when left out. */
|
|
37
|
+
readonly loopBands?: readonly FittedBand[];
|
|
38
|
+
readonly sounds: readonly FittedSound[];
|
|
39
|
+
};
|
|
40
|
+
/** The fitted numbers of every recorded sound of the kit. */
|
|
41
|
+
declare const FITTED_SFX: FittedData;
|
|
42
|
+
/** Ids whose older recipe reads params (a hiss of `seconds`): the fitted copy does not replace it. */
|
|
43
|
+
declare const FITTED_KEEPS_RECIPE: ReadonlySet<string>;
|
|
44
|
+
/** How far each bus carries, the same curves the recordings play with. */
|
|
45
|
+
declare const FITTED_FALLOFF: Readonly<Record<BusId, Falloff>>;
|
|
46
|
+
/** The bus of a fitted sound. */
|
|
47
|
+
declare function fittedBus(sound: {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly category: string;
|
|
50
|
+
}): BusId;
|
|
51
|
+
/** The id of take `index` (from 1) of a sound: `door_wood_shut~2`. */
|
|
52
|
+
declare const fittedTakeId: (id: string, index: number) => string;
|
|
53
|
+
/** The recipe of one take. */
|
|
54
|
+
declare function fittedTakeRecipe(sound: FittedSound, take: FittedTake, index: number, data?: FittedData): SoundRecipe;
|
|
55
|
+
/** The loop of a loop or an ambience. */
|
|
56
|
+
declare function fittedLoopRecipe(sound: FittedSound, data?: FittedData): LoopRecipe | null;
|
|
57
|
+
type FittedBankOptions = {
|
|
58
|
+
readonly id?: string;
|
|
59
|
+
/** Leave out sounds (by id or by a test). */
|
|
60
|
+
readonly skip?: (sound: FittedSound) => boolean;
|
|
61
|
+
/** Playback rate range of each play of a set (default ±3 %). */
|
|
62
|
+
readonly rate?: readonly [number, number];
|
|
63
|
+
readonly data?: FittedData;
|
|
64
|
+
/**
|
|
65
|
+
* Recipe id → recorded id, answered by the recorded id's fitted takes as the files answer it once loaded (default `KIT_SAMPLE_ALIASES`, so
|
|
66
|
+
* `shut_wood` plays the fitted `door_wood_shut`). An alias whose target is not fitted is left alone.
|
|
67
|
+
*/
|
|
68
|
+
readonly aliases?: Readonly<Record<string, string>>;
|
|
69
|
+
};
|
|
70
|
+
/** The bank: one recipe per take, one set per id (its takes), one loop per loop sound. */
|
|
71
|
+
declare function fittedSoundBank(options?: FittedBankOptions): SoundBank;
|
|
72
|
+
/** Ids of the recorded sounds that have fitted numbers (takes or a loop). */
|
|
73
|
+
declare function fittedIds(data?: FittedData): string[];
|
|
74
|
+
type RegisterFittedOptions = FittedBankOptions & {
|
|
75
|
+
/** Let a fitted set or loop replace the older recipe of the same id (default true; `FITTED_KEEPS_RECIPE` always keeps theirs). */
|
|
76
|
+
readonly replace?: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** What `registerFittedSounds` needs of an engine: its registry and `register`. */
|
|
79
|
+
type FittedHost = {
|
|
80
|
+
readonly registry: SoundRegistry;
|
|
81
|
+
register(bank: SoundBank): void;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Registers the fitted bank. A set loses to a recipe of the same id, so with `replace` the older one-shot recipe of each fitted id is removed (its
|
|
85
|
+
* samples stay); a fitted loop simply replaces the older loop. Returns the ids now answered by a fitted sound.
|
|
86
|
+
*/
|
|
87
|
+
declare function registerFittedSounds(host: FittedHost, options?: RegisterFittedOptions): string[];
|
|
88
|
+
|
|
89
|
+
export { FITTED_FALLOFF, FITTED_KEEPS_RECIPE, FITTED_SFX, type FittedBand, type FittedBankOptions, type FittedData, type FittedHost, type FittedLayer, type FittedSound, type FittedTake, type RegisterFittedOptions, fittedBus, fittedIds, fittedLoopRecipe, fittedSoundBank, fittedTakeId, fittedTakeRecipe, registerFittedSounds };
|