@driftengine/audio 4.7.0 → 4.7.2
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/dist/mix/console.d.ts
CHANGED
|
@@ -91,6 +91,9 @@ export declare class MixConsole {
|
|
|
91
91
|
random(): number;
|
|
92
92
|
/** Capture every level, mute and send, under a name. */
|
|
93
93
|
snapshot(name: string): MixSnapshot;
|
|
94
|
-
/**
|
|
95
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Crossfade back to a captured snapshot over `seconds`. False, and nothing moves, when no
|
|
96
|
+
* snapshot was taken under that name.
|
|
97
|
+
*/
|
|
98
|
+
recall(name: string, seconds?: number): boolean;
|
|
96
99
|
}
|
package/dist/mix/console.js
CHANGED
|
@@ -113,12 +113,16 @@ export class MixConsole {
|
|
|
113
113
|
this.snapshots.set(name, captured);
|
|
114
114
|
return captured;
|
|
115
115
|
}
|
|
116
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Crossfade back to a captured snapshot over `seconds`. False, and nothing moves, when no
|
|
118
|
+
* snapshot was taken under that name.
|
|
119
|
+
*/
|
|
117
120
|
recall(name, seconds = 0) {
|
|
118
121
|
const captured = this.snapshots.get(name);
|
|
119
122
|
if (captured === undefined)
|
|
120
|
-
return;
|
|
123
|
+
return false;
|
|
121
124
|
recallSnapshot(this, captured, seconds);
|
|
125
|
+
return true;
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
/** Whether `bus` is anywhere below `maybeAncestor` in the tree. */
|
|
@@ -32,7 +32,7 @@ export declare class KickDetector {
|
|
|
32
32
|
* **The one to drive a visual from, and `energy` is usually not.** `energy` is the raw sum of
|
|
33
33
|
* the two lowest bands with a gain on it, which is honest about what it says and useless on
|
|
34
34
|
* anything mastered loud: on a bass-heavy master it reaches its own ceiling and stays there,
|
|
35
|
-
* so a consumer reading it draws a constant. Measured on a
|
|
35
|
+
* so a consumer reading it draws a constant. Measured on a bass-heavy track through this detector:
|
|
36
36
|
* `energy` sat at 1.000 in every frame of a two-minute sample.
|
|
37
37
|
*
|
|
38
38
|
* This is the whitened signal the detector already computes for its own gating — the level
|
|
@@ -82,7 +82,7 @@ export class KickDetector {
|
|
|
82
82
|
* **The one to drive a visual from, and `energy` is usually not.** `energy` is the raw sum of
|
|
83
83
|
* the two lowest bands with a gain on it, which is honest about what it says and useless on
|
|
84
84
|
* anything mastered loud: on a bass-heavy master it reaches its own ceiling and stays there,
|
|
85
|
-
* so a consumer reading it draws a constant. Measured on a
|
|
85
|
+
* so a consumer reading it draws a constant. Measured on a bass-heavy track through this detector:
|
|
86
86
|
* `energy` sat at 1.000 in every frame of a two-minute sample.
|
|
87
87
|
*
|
|
88
88
|
* This is the whitened signal the detector already computes for its own gating — the level
|
package/package.json
CHANGED
package/src/mix/console.ts
CHANGED
|
@@ -164,11 +164,15 @@ export class MixConsole {
|
|
|
164
164
|
return captured;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
/**
|
|
168
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Crossfade back to a captured snapshot over `seconds`. False, and nothing moves, when no
|
|
169
|
+
* snapshot was taken under that name.
|
|
170
|
+
*/
|
|
171
|
+
recall(name: string, seconds = 0): boolean {
|
|
169
172
|
const captured = this.snapshots.get(name);
|
|
170
|
-
if (captured === undefined) return;
|
|
173
|
+
if (captured === undefined) return false;
|
|
171
174
|
recallSnapshot(this, captured, seconds);
|
|
175
|
+
return true;
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
|
|
@@ -98,7 +98,7 @@ export class KickDetector {
|
|
|
98
98
|
* **The one to drive a visual from, and `energy` is usually not.** `energy` is the raw sum of
|
|
99
99
|
* the two lowest bands with a gain on it, which is honest about what it says and useless on
|
|
100
100
|
* anything mastered loud: on a bass-heavy master it reaches its own ceiling and stays there,
|
|
101
|
-
* so a consumer reading it draws a constant. Measured on a
|
|
101
|
+
* so a consumer reading it draws a constant. Measured on a bass-heavy track through this detector:
|
|
102
102
|
* `energy` sat at 1.000 in every frame of a two-minute sample.
|
|
103
103
|
*
|
|
104
104
|
* This is the whitened signal the detector already computes for its own gating — the level
|