@viji-dev/core 0.5.4 → 0.5.5
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/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +1 -1
- package/dist/artist-global.d.ts +1 -1
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-aU6UPupF.js → essentia-wasm.web-C58CPq4U.js} +2 -2
- package/dist/{essentia-wasm.web-aU6UPupF.js.map → essentia-wasm.web-C58CPq4U.js.map} +1 -1
- package/dist/{index-_PbbZgmh.js → index-DsJxKERc.js} +43 -22
- package/dist/{index-_PbbZgmh.js.map → index-DsJxKERc.js.map} +1 -1
- package/dist/index.d.ts +18 -11
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1897,7 +1897,7 @@ class EssentiaOnsetDetection {
|
|
|
1897
1897
|
this.initPromise = (async () => {
|
|
1898
1898
|
try {
|
|
1899
1899
|
const essentiaModule = await import("./essentia.js-core.es-DnrJE0uR.js");
|
|
1900
|
-
const wasmModule = await import("./essentia-wasm.web-
|
|
1900
|
+
const wasmModule = await import("./essentia-wasm.web-C58CPq4U.js").then((n) => n.e);
|
|
1901
1901
|
const EssentiaClass = essentiaModule.Essentia || essentiaModule.default?.Essentia || essentiaModule.default;
|
|
1902
1902
|
let WASMModule = wasmModule.default || wasmModule.EssentiaWASM || wasmModule.default?.EssentiaWASM;
|
|
1903
1903
|
if (!WASMModule) {
|
|
@@ -6181,15 +6181,24 @@ class OnsetTapManager {
|
|
|
6181
6181
|
muteChangeListeners = /* @__PURE__ */ new Set();
|
|
6182
6182
|
/**
|
|
6183
6183
|
* Record a tap on `instrument`. Drives the visual envelope, advances
|
|
6184
|
-
* `lastTapTime`, and (by default) feeds
|
|
6184
|
+
* `lastTapTime`, flips mode to reflect activity, and (by default) feeds
|
|
6185
|
+
* the pattern-recognition pipeline.
|
|
6185
6186
|
*
|
|
6186
|
-
* `options.skipRecognition: true`
|
|
6187
|
-
*
|
|
6188
|
-
*
|
|
6189
|
-
*
|
|
6190
|
-
*
|
|
6191
|
-
*
|
|
6192
|
-
*
|
|
6187
|
+
* `options.skipRecognition: true` opts the tap out of the **recognition
|
|
6188
|
+
* pipeline only** — `tapIOIs` accumulation, `tryRecognizePattern`,
|
|
6189
|
+
* `applyPattern`, and `handlePatternTap` are skipped. Mode still flips
|
|
6190
|
+
* `'auto' → 'tapping'` on the first tap of a session (already-`'tapping'`
|
|
6191
|
+
* stays; already-`'pattern'` stays). This is load-bearing: `processFrame`'s
|
|
6192
|
+
* drain of `pendingTapEvents` and its audio-event filter both gate on
|
|
6193
|
+
* mode being non-`'auto'`, and downstream consumers (`onModeChange`
|
|
6194
|
+
* listeners, `broadcastOnsetState`) read mode as the signal that a tap
|
|
6195
|
+
* session is in progress. Suppressing the mode flip would silently break
|
|
6196
|
+
* all of them.
|
|
6197
|
+
*
|
|
6198
|
+
* Used for host-side relay of forwarded tap messages where another
|
|
6199
|
+
* instance owns the authoritative recognition (e.g. host receiving
|
|
6200
|
+
* controller taps over WebRTC). The `MIN_TAP_INTERVAL_MS` debounce still
|
|
6201
|
+
* applies regardless of `skipRecognition`.
|
|
6193
6202
|
*/
|
|
6194
6203
|
tap(instrument, options) {
|
|
6195
6204
|
const s = this.state[instrument];
|
|
@@ -6218,7 +6227,12 @@ class OnsetTapManager {
|
|
|
6218
6227
|
s.pendingTapEvents.push(now);
|
|
6219
6228
|
s.sessionActive = true;
|
|
6220
6229
|
this.scheduleSessionTimers(instrument);
|
|
6221
|
-
if (skipRecognition)
|
|
6230
|
+
if (skipRecognition) {
|
|
6231
|
+
if (s.mode === "auto") {
|
|
6232
|
+
this.setMode(instrument, "tapping");
|
|
6233
|
+
}
|
|
6234
|
+
return;
|
|
6235
|
+
}
|
|
6222
6236
|
if (s.mode === "auto") {
|
|
6223
6237
|
this.setMode(instrument, "tapping");
|
|
6224
6238
|
if (ioi > 0) {
|
|
@@ -8525,9 +8539,12 @@ class AudioSystem {
|
|
|
8525
8539
|
// ═══════════════════════════════════════════════════════════
|
|
8526
8540
|
/**
|
|
8527
8541
|
* Record a tap for the specified instrument onset.
|
|
8528
|
-
* `options.skipRecognition`
|
|
8529
|
-
*
|
|
8530
|
-
*
|
|
8542
|
+
* `options.skipRecognition` opts the tap out of the recognition pipeline
|
|
8543
|
+
* only (no IOI accumulation, no `tryRecognizePattern`, no `applyPattern`).
|
|
8544
|
+
* Mode still flips `'auto' → 'tapping'` so the visual envelope and
|
|
8545
|
+
* audio-event filter run; only the pattern-detection pipeline is bypassed.
|
|
8546
|
+
* Used by host-side relay of forwarded tap messages where another core
|
|
8547
|
+
* owns the authoritative recognition.
|
|
8531
8548
|
*/
|
|
8532
8549
|
tapOnset(instrument, options) {
|
|
8533
8550
|
this.onsetTapManager.tap(instrument, options);
|
|
@@ -11139,13 +11156,17 @@ class VijiCore {
|
|
|
11139
11156
|
* First tap switches the instrument from auto to tapping mode.
|
|
11140
11157
|
* If a repeating pattern is recognized, it continues after tapping stops.
|
|
11141
11158
|
*
|
|
11142
|
-
* `options.skipRecognition: true`
|
|
11143
|
-
*
|
|
11144
|
-
* no
|
|
11145
|
-
*
|
|
11146
|
-
*
|
|
11147
|
-
*
|
|
11148
|
-
*
|
|
11159
|
+
* `options.skipRecognition: true` opts the tap out of the **recognition
|
|
11160
|
+
* pipeline only** — no `tapIOIs` accumulation, no `tryRecognizePattern`,
|
|
11161
|
+
* no `applyPattern`, no `handlePatternTap`. Mode still flips
|
|
11162
|
+
* `'auto' → 'tapping'` on the first tap of a session (and back to
|
|
11163
|
+
* `'auto'` on the 5s timeout). The mode flip is load-bearing for
|
|
11164
|
+
* `processFrame`'s drain of `pendingTapEvents`, the audio-event filter
|
|
11165
|
+
* that prevents music+tap doubling, and `onModeChange` consumers. Use
|
|
11166
|
+
* `skipRecognition` when relaying tap messages from another instance
|
|
11167
|
+
* that owns the authoritative recognition (e.g. host receiving
|
|
11168
|
+
* controller taps over WebRTC); the receiving core's pattern is then
|
|
11169
|
+
* driven only by `importSessionState` from the authoritative sender.
|
|
11149
11170
|
*
|
|
11150
11171
|
* The `MIN_TAP_INTERVAL_MS` debounce still applies regardless of the
|
|
11151
11172
|
* `skipRecognition` flag.
|
|
@@ -11702,7 +11723,7 @@ function validateCoreStatePayload(state) {
|
|
|
11702
11723
|
}
|
|
11703
11724
|
return null;
|
|
11704
11725
|
}
|
|
11705
|
-
const VERSION = "0.5.
|
|
11726
|
+
const VERSION = "0.5.5";
|
|
11706
11727
|
export {
|
|
11707
11728
|
AudioSystem as A,
|
|
11708
11729
|
VERSION as V,
|
|
@@ -11710,4 +11731,4 @@ export {
|
|
|
11710
11731
|
VijiCoreError as b,
|
|
11711
11732
|
getDefaultExportFromCjs as g
|
|
11712
11733
|
};
|
|
11713
|
-
//# sourceMappingURL=index-
|
|
11734
|
+
//# sourceMappingURL=index-DsJxKERc.js.map
|