@viji-dev/core 0.5.3 → 0.5.4
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-CPrFAj59.js → essentia-wasm.web-aU6UPupF.js} +2 -2
- package/dist/{essentia-wasm.web-CPrFAj59.js.map → essentia-wasm.web-aU6UPupF.js.map} +1 -1
- package/dist/{index-Bhq4eJe_.js → index-_PbbZgmh.js} +78 -25
- package/dist/{index-Bhq4eJe_.js.map → index-_PbbZgmh.js.map} +1 -1
- package/dist/index.d.ts +40 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -441,9 +441,14 @@ export declare class AudioSystem {
|
|
|
441
441
|
*/
|
|
442
442
|
getChannelCount(): number;
|
|
443
443
|
/**
|
|
444
|
-
* Record a tap for the specified instrument onset
|
|
444
|
+
* Record a tap for the specified instrument onset.
|
|
445
|
+
* `options.skipRecognition` retains visual envelope + session timing but
|
|
446
|
+
* bypasses the recognition pipeline — used by host-side relay of forwarded
|
|
447
|
+
* tap messages where another core is doing the authoritative recognition.
|
|
445
448
|
*/
|
|
446
|
-
tapOnset(instrument: InstrumentType
|
|
449
|
+
tapOnset(instrument: InstrumentType, options?: {
|
|
450
|
+
skipRecognition?: boolean;
|
|
451
|
+
}): void;
|
|
447
452
|
/**
|
|
448
453
|
* Clear tap pattern for an instrument, restoring auto-detection
|
|
449
454
|
*/
|
|
@@ -467,7 +472,9 @@ export declare class AudioSystem {
|
|
|
467
472
|
onOnsetModeChange(listener: (ev: OnsetModeChangeEvent) => void): Unsubscribe;
|
|
468
473
|
onOnsetSessionEnd(listener: (ev: OnsetSessionEndEvent) => void): Unsubscribe;
|
|
469
474
|
onOnsetMuteChange(listener: (ev: OnsetMuteChangeEvent) => void): Unsubscribe;
|
|
470
|
-
exportOnsetSessionState(
|
|
475
|
+
exportOnsetSessionState(options?: {
|
|
476
|
+
instruments?: ReadonlyArray<InstrumentType>;
|
|
477
|
+
}): SerializedOnsetState;
|
|
471
478
|
importOnsetSessionState(state: SerializedOnsetState, clockOffset: number): void;
|
|
472
479
|
exportAudioAnalysisState(): SerializedAudioAnalysisState;
|
|
473
480
|
importAudioAnalysisState(state: SerializedAudioAnalysisState, clockOffset: number): void;
|
|
@@ -2244,7 +2251,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
|
|
|
2244
2251
|
/** Returned by `on*` listener registration calls; invoke to unsubscribe. */
|
|
2245
2252
|
export declare type Unsubscribe = () => void;
|
|
2246
2253
|
|
|
2247
|
-
export declare const VERSION = "0.5.
|
|
2254
|
+
export declare const VERSION = "0.5.4";
|
|
2248
2255
|
|
|
2249
2256
|
/**
|
|
2250
2257
|
* Real-time video API: drawable frame, dimensions, and the source-side
|
|
@@ -3015,8 +3022,21 @@ export declare class VijiCore {
|
|
|
3015
3022
|
* Tap an onset for a specific instrument.
|
|
3016
3023
|
* First tap switches the instrument from auto to tapping mode.
|
|
3017
3024
|
* If a repeating pattern is recognized, it continues after tapping stops.
|
|
3025
|
+
*
|
|
3026
|
+
* `options.skipRecognition: true` keeps the visual envelope and session
|
|
3027
|
+
* timing but bypasses pattern recognition entirely (no IOI accumulation,
|
|
3028
|
+
* no mode transition, no `applyPattern`, no `handlePatternTap`). Use
|
|
3029
|
+
* this when relaying tap messages from another instance that owns the
|
|
3030
|
+
* authoritative recognition (e.g. host receiving forwarded controller
|
|
3031
|
+
* taps over WebRTC). The receiving core's mode is then driven only by
|
|
3032
|
+
* `importSessionState` from the authoritative sender.
|
|
3033
|
+
*
|
|
3034
|
+
* The `MIN_TAP_INTERVAL_MS` debounce still applies regardless of the
|
|
3035
|
+
* `skipRecognition` flag.
|
|
3018
3036
|
*/
|
|
3019
|
-
tap: (instrument: "kick" | "snare" | "hat"
|
|
3037
|
+
tap: (instrument: "kick" | "snare" | "hat", options?: {
|
|
3038
|
+
skipRecognition?: boolean;
|
|
3039
|
+
}) => void;
|
|
3020
3040
|
/**
|
|
3021
3041
|
* Clear the tap pattern for an instrument, restoring auto-detection
|
|
3022
3042
|
*/
|
|
@@ -3095,8 +3115,22 @@ export declare class VijiCore {
|
|
|
3095
3115
|
* Cross-device-safe (no audio analysis state included). Pair with
|
|
3096
3116
|
* `importSessionState` on a receiver. Wall-clock fields are in this
|
|
3097
3117
|
* instance's `performance.now()` clock space.
|
|
3118
|
+
*
|
|
3119
|
+
* `options.instruments` scopes the snapshot to the listed instruments
|
|
3120
|
+
* only; omitted instruments are absent from the payload. The receiver
|
|
3121
|
+
* leaves its existing state for those instruments untouched (the
|
|
3122
|
+
* receiver's `applyInstrumentPayload` skips missing keys). Default =
|
|
3123
|
+
* all three.
|
|
3124
|
+
*
|
|
3125
|
+
* Cross-device commits should typically scope to the just-completed
|
|
3126
|
+
* instrument (e.g. `exportSessionState({ instruments: [ev.instrument] })`
|
|
3127
|
+
* inside an `onSessionEnd` handler) so the receiver's unrelated
|
|
3128
|
+
* instrument state isn't inadvertently overwritten by the sender's
|
|
3129
|
+
* default values.
|
|
3098
3130
|
*/
|
|
3099
|
-
exportSessionState: (
|
|
3131
|
+
exportSessionState: (options?: {
|
|
3132
|
+
instruments?: ReadonlyArray<"kick" | "snare" | "hat">;
|
|
3133
|
+
}) => SerializedOnsetState;
|
|
3100
3134
|
/**
|
|
3101
3135
|
* Replace per-instrument onset state from a serialized payload.
|
|
3102
3136
|
* `clockOffset` is added to all sender-clocked fields during import
|
package/dist/index.js
CHANGED