@libraz/libsonare 1.8.1 → 1.8.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/README.md +5 -5
- package/dist/analysis.js +2 -0
- package/dist/analysis.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1927 -140
- package/dist/index.js.map +1 -1
- package/dist/instrument_types.d.ts +27 -3
- package/dist/instrument_types.d.ts.map +1 -1
- package/dist/mastering_core.d.ts +3 -2
- package/dist/mastering_core.d.ts.map +1 -1
- package/dist/mixer.d.ts +2 -2
- package/dist/project.d.ts +5 -4
- package/dist/project.d.ts.map +1 -1
- package/dist/project_class.d.ts +57 -3
- package/dist/project_class.d.ts.map +1 -1
- package/dist/project_internal.d.ts +35 -1
- package/dist/project_internal.d.ts.map +1 -1
- package/dist/project_types.d.ts +10 -1
- package/dist/project_types.d.ts.map +1 -1
- package/dist/public_types.d.ts +1 -0
- package/dist/public_types.d.ts.map +1 -1
- package/dist/public_types_mastering.d.ts +1 -1
- package/dist/public_types_mastering.d.ts.map +1 -1
- package/dist/public_types_vocal_edit.d.ts +250 -0
- package/dist/public_types_vocal_edit.d.ts.map +1 -0
- package/dist/public_types_vocal_project.d.ts +63 -0
- package/dist/public_types_vocal_project.d.ts.map +1 -0
- package/dist/realtime_engine.d.ts +57 -10
- package/dist/realtime_engine.d.ts.map +1 -1
- package/dist/repair_dereverb.d.ts +1 -0
- package/dist/repair_dereverb.d.ts.map +1 -1
- package/dist/repair_noise.d.ts +1 -0
- package/dist/repair_noise.d.ts.map +1 -1
- package/dist/sonare-analysis.wasm +0 -0
- package/dist/sonare.d.ts +53 -0
- package/dist/sonare.js +1 -1
- package/dist/sonare.wasm +0 -0
- package/dist/vocal_edit.d.ts +131 -0
- package/dist/vocal_edit.d.ts.map +1 -0
- package/dist/vocal_edit_worker.d.ts +51 -0
- package/dist/vocal_edit_worker.d.ts.map +1 -0
- package/dist/vocal_edit_worker.js +1462 -0
- package/dist/vocal_edit_worker.js.map +1 -0
- package/dist/vocal_edit_worker_client.d.ts +118 -0
- package/dist/vocal_edit_worker_client.d.ts.map +1 -0
- package/dist/vocal_edit_worker_protocol.d.ts +139 -0
- package/dist/vocal_edit_worker_protocol.d.ts.map +1 -0
- package/dist/vocal_project.d.ts +17 -0
- package/dist/vocal_project.d.ts.map +1 -0
- package/dist/web_midi.d.ts +4 -0
- package/dist/web_midi.d.ts.map +1 -1
- package/dist/worker.js.map +1 -1
- package/dist/worklet/engine-mixer-facade.d.ts +2 -1
- package/dist/worklet/engine-mixer-facade.d.ts.map +1 -1
- package/dist/worklet/engine-node.d.ts +8 -0
- package/dist/worklet/engine-node.d.ts.map +1 -1
- package/dist/worklet/engine-processor.d.ts +2 -1
- package/dist/worklet/engine-processor.d.ts.map +1 -1
- package/dist/worklet/engine-register.d.ts.map +1 -1
- package/dist/worklet/engine-strips.d.ts +4 -2
- package/dist/worklet/engine-strips.d.ts.map +1 -1
- package/dist/worklet/engine.d.ts +15 -3
- package/dist/worklet/engine.d.ts.map +1 -1
- package/dist/worklet/guards.d.ts +3 -1
- package/dist/worklet/guards.d.ts.map +1 -1
- package/dist/worklet/messages.d.ts +50 -5
- package/dist/worklet/messages.d.ts.map +1 -1
- package/dist/worklet/protocol.d.ts +10 -0
- package/dist/worklet/protocol.d.ts.map +1 -1
- package/dist/worklet.d.ts +1 -1
- package/dist/worklet.d.ts.map +1 -1
- package/dist/worklet.js +223 -16
- package/dist/worklet.js.map +1 -1
- package/package.json +6 -1
- package/src/index.ts +33 -0
- package/src/instrument_types.ts +29 -3
- package/src/mastering_core.ts +3 -2
- package/src/mixer.ts +2 -2
- package/src/project.ts +8 -1
- package/src/project_class.ts +136 -1
- package/src/project_internal.ts +90 -0
- package/src/project_types.ts +11 -1
- package/src/public_types.ts +1 -0
- package/src/public_types_mastering.ts +2 -0
- package/src/public_types_vocal_edit.ts +289 -0
- package/src/public_types_vocal_project.ts +69 -0
- package/src/realtime_engine.ts +86 -9
- package/src/repair_dereverb.ts +1 -0
- package/src/repair_noise.ts +1 -0
- package/src/sonare.js.d.ts +53 -0
- package/src/vocal_edit.ts +885 -0
- package/src/vocal_edit_worker.ts +832 -0
- package/src/vocal_edit_worker_client.ts +812 -0
- package/src/vocal_edit_worker_protocol.ts +206 -0
- package/src/vocal_project.ts +327 -0
- package/src/web_midi.ts +100 -5
- package/src/worklet/engine-mixer-facade.ts +2 -1
- package/src/worklet/engine-node.ts +47 -0
- package/src/worklet/engine-processor.ts +46 -1
- package/src/worklet/engine-register.ts +3 -0
- package/src/worklet/engine-strips.ts +31 -4
- package/src/worklet/engine.ts +27 -3
- package/src/worklet/guards.ts +26 -0
- package/src/worklet/messages.ts +59 -2
- package/src/worklet/protocol.ts +10 -0
- package/src/worklet.ts +2 -0
package/dist/worklet.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { SonareRealtimeEngineNode } from './worklet/engine-node';
|
|
|
8
8
|
export type { SonareEngineOptions } from './worklet/engine-options';
|
|
9
9
|
export { SonareRealtimeEngineWorkletProcessor } from './worklet/engine-processor';
|
|
10
10
|
export { registerSonareRealtimeEngineWorkletProcessor } from './worklet/engine-register';
|
|
11
|
-
export type { SonareEngineCaptureRequestMessage, SonareEngineCaptureResponseMessage, SonareEngineClipPageRequestMessage, SonareEngineSyncAutomationMessage, SonareEngineSyncBuiltinInstrumentMessage, SonareEngineSyncBusStripEqBandMessage, SonareEngineSyncCaptureMessage, SonareEngineSyncClipsDeltaMessage, SonareEngineSyncClipsMessage, SonareEngineSyncLoadSoundFontMessage, SonareEngineSyncMarkersMessage, SonareEngineSyncMasterStripEqBandMessage, SonareEngineSyncMasterStripInsertBypassedMessage, SonareEngineSyncMessage, SonareEngineSyncMetronomeMessage, SonareEngineSyncMidiCcMessage, SonareEngineSyncMidiClipsMessage, SonareEngineSyncMidiNoteMessage, SonareEngineSyncMidiPanicMessage, SonareEngineSyncMixerMessage, SonareEngineSyncSf2InstrumentMessage, SonareEngineSyncSynthInstrumentMessage, SonareEngineSyncTempoMessage, SonareEngineSyncTrackStripEqBandMessage, SonareEngineSyncTrackStripInsertBypassedMessage, SonareEngineTransportFacade, SonareEngineTransportRequestMessage, SonareEngineTransportResponseMessage, SonarePlaybackConfigMessage, SonarePlaybackDestroyMessage, SonarePlaybackDiagnosticsReplyMessage, SonarePlaybackDiagnosticsRequestMessage, SonarePlaybackErrorMessage, SonarePlaybackMessage, SonarePlaybackNodeOptions, SonarePlaybackOrientationMessage, SonarePlaybackResetMessage, SonarePlaybackWorkletDiagnostics, SonarePlaybackWorkletProcessorOptions, SonareRealtimeEngineNodeCapabilities, SonareRealtimeEngineNodeOptions, SonareRealtimeEngineWorkletProcessorOptions, SonareRealtimeVoiceChangerDestroyMessage, SonareRealtimeVoiceChangerMessage, SonareRealtimeVoiceChangerResetMessage, SonareRealtimeVoiceChangerSetConfigMessage, SonareRealtimeVoiceChangerWorkletProcessorOptions, SonareWorkletDestroyMessage, SonareWorkletMessage, SonareWorkletProcessorOptions, SonareWorkletScheduleInsertAutomationMessage, SonareWorkletSetMeterIntervalMessage, SonareWorkletTransportMessage, } from './worklet/messages';
|
|
11
|
+
export type { SonareEngineCaptureRequestMessage, SonareEngineCaptureResponseMessage, SonareEngineClipPageRequestMessage, SonareEngineInsertGainReductionRequestMessage, SonareEngineInsertGainReductionResponseMessage, SonareEngineSyncAutomationMessage, SonareEngineSyncBuiltinInstrumentMessage, SonareEngineSyncBusStripEqBandMessage, SonareEngineSyncCaptureMessage, SonareEngineSyncClipsDeltaMessage, SonareEngineSyncClipsMessage, SonareEngineSyncLoadSoundFontMessage, SonareEngineSyncMarkersMessage, SonareEngineSyncMasterStripEqBandMessage, SonareEngineSyncMasterStripInsertBypassedMessage, SonareEngineSyncMessage, SonareEngineSyncMetronomeMessage, SonareEngineSyncMidiCcMessage, SonareEngineSyncMidiClipsMessage, SonareEngineSyncMidiNoteMessage, SonareEngineSyncMidiPanicMessage, SonareEngineSyncMixerMessage, SonareEngineSyncSf2InstrumentMessage, SonareEngineSyncSynthInstrumentMessage, SonareEngineSyncTempoMessage, SonareEngineSyncTrackStripEqBandMessage, SonareEngineSyncTrackStripInsertBypassedMessage, SonareEngineTransportFacade, SonareEngineTransportRequestMessage, SonareEngineTransportResponseMessage, SonarePlaybackConfigMessage, SonarePlaybackDestroyMessage, SonarePlaybackDiagnosticsReplyMessage, SonarePlaybackDiagnosticsRequestMessage, SonarePlaybackErrorMessage, SonarePlaybackMessage, SonarePlaybackNodeOptions, SonarePlaybackOrientationMessage, SonarePlaybackResetMessage, SonarePlaybackWorkletDiagnostics, SonarePlaybackWorkletProcessorOptions, SonareRealtimeEngineNodeCapabilities, SonareRealtimeEngineNodeOptions, SonareRealtimeEngineWorkletProcessorOptions, SonareRealtimeVoiceChangerDestroyMessage, SonareRealtimeVoiceChangerMessage, SonareRealtimeVoiceChangerResetMessage, SonareRealtimeVoiceChangerSetConfigMessage, SonareRealtimeVoiceChangerWorkletProcessorOptions, SonareWorkletDestroyMessage, SonareWorkletMessage, SonareWorkletProcessorOptions, SonareWorkletScheduleInsertAutomationMessage, SonareWorkletSetMeterIntervalMessage, SonareWorkletTransportMessage, } from './worklet/messages';
|
|
12
12
|
export { registerSonareWorkletProcessor, SonareWorkletProcessor, } from './worklet/mixer-processor';
|
|
13
13
|
export { createSonarePlaybackNode, registerSonarePlaybackWorkletProcessor, SonarePlaybackWorkletProcessor, } from './worklet/playback-processor';
|
|
14
14
|
export { createSonareClipPageRequestRingBuffer, createSonareEngineCommandRingBuffer, createSonareEngineTelemetryRingBuffer, createSonareExternalMidiRingBuffer, createSonareMeterRingBuffer, createSonareScopeRingBuffer, createSonareSpectrumRingBuffer, decodeFrame, encodeFrameHi, encodeFrameLo, popSonareEngineCommandRingBuffer, pushSonareClipPageRequestRingBuffer, pushSonareEngineCommandRingBuffer, pushSonareExternalMidiRingBuffer, readSonareClipPageRequestRingBuffer, readSonareEngineTelemetryRingBuffer, readSonareExternalMidiRingBuffer, readSonareMeterRingBuffer, readSonareScopeRingBuffer, readSonareSpectrumRingBuffer, SONARE_CLIP_PAGE_REQUEST_RING_HEADER_INTS, SONARE_CLIP_PAGE_REQUEST_RING_RECORD_UINT32S, SONARE_ENGINE_COMMAND_RECORD_BYTES, SONARE_ENGINE_RING_HEADER_INTS, SONARE_ENGINE_TELEMETRY_RECORD_BYTES, SONARE_EXTERNAL_MIDI_RING_HEADER_INTS, SONARE_EXTERNAL_MIDI_RING_RECORD_UINT32S, SONARE_METER_RING_HEADER_INTS, SONARE_METER_RING_RECORD_FLOATS, SONARE_SCOPE_RING_HEADER_INTS, SONARE_SPECTRUM_RING_HEADER_INTS, type SonareClipPageRequest, type SonareClipPageRequestRingBuffer, type SonareClipPageRequestRingReadResult, type SonareEngineCommandRecord, type SonareEngineCommandRingBuffer, SonareEngineCommandType, SonareEngineTelemetryError, type SonareEngineTelemetryRecord, type SonareEngineTelemetryRingBuffer, type SonareEngineTelemetryRingReadResult, SonareEngineTelemetryType, type SonareExternalMidiRingBuffer, type SonareExternalMidiRingReadResult, type SonareMeterRingBuffer, type SonareMeterRingReadResult, type SonareScopeRingBuffer, type SonareScopeRingReadResult, type SonareSpectrumRingBuffer, type SonareSpectrumRingReadResult, type SonareWorkletMeterSnapshot, type SonareWorkletScopeSnapshot, type SonareWorkletSpectrumSnapshot, sonareClipPageRequestRingBufferByteLength, sonareEngineCommandRingBufferByteLength, sonareEngineTelemetryRingBufferByteLength, sonareExternalMidiRingBufferByteLength, sonareMeterRingBufferByteLength, sonareScopeRingBufferByteLength, sonareSpectrumRingBufferByteLength, writeSonareEngineTelemetryRingBuffer, } from './worklet/protocol';
|
package/dist/worklet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worklet.d.ts","sourceRoot":"","sources":["../src/worklet.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,E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,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,yCAAyC,EACzC,uCAAuC,EACvC,yCAAyC,EACzC,sCAAsC,EACtC,+BAA+B,EAC/B,+BAA+B,EAC/B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kDAAkD,EAClD,0CAA0C,GAC3C,MAAM,mCAAmC,CAAC"}
|
package/dist/worklet.js
CHANGED
|
@@ -720,6 +720,13 @@ var SampleBank = class {
|
|
|
720
720
|
};
|
|
721
721
|
|
|
722
722
|
// src/project_internal.ts
|
|
723
|
+
var projectTimelineHandles = /* @__PURE__ */ new WeakMap();
|
|
724
|
+
function projectTimelineNativeId(owner) {
|
|
725
|
+
if (owner === null || typeof owner !== "object" && typeof owner !== "function") {
|
|
726
|
+
return void 0;
|
|
727
|
+
}
|
|
728
|
+
return projectTimelineHandles.get(owner)?.id;
|
|
729
|
+
}
|
|
723
730
|
function normalizeSynthInstrument(patch) {
|
|
724
731
|
if (patch === null || typeof patch !== "object") {
|
|
725
732
|
return patch;
|
|
@@ -736,6 +743,20 @@ function normalizeSynthInstrument(patch) {
|
|
|
736
743
|
}
|
|
737
744
|
return { ...rest, sampleBankId: sampleBank.nativeId };
|
|
738
745
|
}
|
|
746
|
+
function partRigInsertsJson(inserts) {
|
|
747
|
+
if (inserts === void 0 || inserts === null) {
|
|
748
|
+
return void 0;
|
|
749
|
+
}
|
|
750
|
+
if (!Array.isArray(inserts)) {
|
|
751
|
+
throw new TypeError("inserts must be an array");
|
|
752
|
+
}
|
|
753
|
+
return JSON.stringify(
|
|
754
|
+
inserts.map((insert) => {
|
|
755
|
+
const { processor, params } = insert;
|
|
756
|
+
return params === void 0 ? { processor } : { processor, params: typeof params === "string" ? params : JSON.stringify(params) };
|
|
757
|
+
})
|
|
758
|
+
);
|
|
759
|
+
}
|
|
739
760
|
function projectModule() {
|
|
740
761
|
const candidate = getSonareModule();
|
|
741
762
|
if (typeof candidate.projectAbiVersion !== "function" || candidate.Project === void 0) {
|
|
@@ -1149,6 +1170,17 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
1149
1170
|
setArticulation(destinationId, channel, articulation) {
|
|
1150
1171
|
this.native.setArticulation(destinationId, channel, articulation);
|
|
1151
1172
|
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Set the rig of one part (0-15), or of the destination's default when `part`
|
|
1175
|
+
* is `PART_RIG_ALL_PARTS`, on the instrument bound to `destinationId`. A
|
|
1176
|
+
* direct call, not a stored edit: a destination with no instrument is an
|
|
1177
|
+
* invalid parameter, and an instrument without part rigs (a builtin, a
|
|
1178
|
+
* host-callback instrument) is refused as not implemented rather than
|
|
1179
|
+
* succeeding quietly. `'chain'` takes 1-8 `inserts`; no other mode does.
|
|
1180
|
+
*/
|
|
1181
|
+
setPartRig(destinationId, part, mode, inserts) {
|
|
1182
|
+
this.native.setPartRig(destinationId, part, mode, partRigInsertsJson(inserts));
|
|
1183
|
+
}
|
|
1152
1184
|
/**
|
|
1153
1185
|
* Read back {@link setArticulation} as the canonical name. An ordinal this
|
|
1154
1186
|
* build cannot spell is handed back as the number, the way every other enum
|
|
@@ -1559,10 +1591,40 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
1559
1591
|
/**
|
|
1560
1592
|
* Keys one insert of a lane strip from another lane's post-strip audio
|
|
1561
1593
|
* (ducking/sidechainRouter inserts). sourceTrackId 0 removes the binding.
|
|
1594
|
+
* Lanes are processed in key order and the key is delay-compensated to the
|
|
1595
|
+
* destination strip input, so the result depends on neither the lane order
|
|
1596
|
+
* nor the block size. Throws, leaving the bindings unchanged, for a lane
|
|
1597
|
+
* keying itself, a binding that would close a cycle over the lane bindings,
|
|
1598
|
+
* a full binding table and an alignment past the delay ceiling. Not callable
|
|
1599
|
+
* while a block is being processed.
|
|
1562
1600
|
*/
|
|
1563
1601
|
setLaneSidechain(trackId, insertIndex, sourceTrackId) {
|
|
1564
1602
|
this.native.setLaneSidechain(trackId, insertIndex, sourceTrackId);
|
|
1565
1603
|
}
|
|
1604
|
+
/**
|
|
1605
|
+
* Installs a compiled project timeline into this stopped engine, all or
|
|
1606
|
+
* nothing: tempo and time-signature segments, markers, track lanes, track
|
|
1607
|
+
* automation, audio and MIDI clips, and the per-track strips of the project's
|
|
1608
|
+
* mixer scene are replaced in full (a later low-level setter on those domains
|
|
1609
|
+
* is overwritten by the next apply). Instruments, buses, the master strip,
|
|
1610
|
+
* metronome, loop and capture are not touched; bind instruments separately.
|
|
1611
|
+
*
|
|
1612
|
+
* Throws while the transport is playing, for a timeline the engine cannot
|
|
1613
|
+
* hold, and for a scene strip routed from several tracks. A validation
|
|
1614
|
+
* failure leaves the engine unchanged. The engine keeps its own reference, so
|
|
1615
|
+
* {@link ProjectTimeline.dispose} may follow immediately.
|
|
1616
|
+
*
|
|
1617
|
+
* Also throws on an unprepared engine and on a timeline whose sample rate
|
|
1618
|
+
* differs from the engine's. Once a timeline is applied, a later prepare at
|
|
1619
|
+
* another rate is refused until the timeline's clips are cleared.
|
|
1620
|
+
*/
|
|
1621
|
+
applyProjectTimeline(timeline) {
|
|
1622
|
+
const timelineId = projectTimelineNativeId(timeline);
|
|
1623
|
+
if (timelineId === void 0) {
|
|
1624
|
+
throw new TypeError("timeline must be a ProjectTimeline instance");
|
|
1625
|
+
}
|
|
1626
|
+
this.native.applyProjectTimeline(timelineId);
|
|
1627
|
+
}
|
|
1566
1628
|
setTrackBuses(buses) {
|
|
1567
1629
|
this.native.setTrackBuses(
|
|
1568
1630
|
Array.isArray(buses) ? buses.map((bus) => ({
|
|
@@ -1764,12 +1826,9 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
1764
1826
|
* return `-1`: they resize voice pools or swap DSP topology, which is not
|
|
1765
1827
|
* audio-thread safe. Rebind the instrument with a new patch instead.
|
|
1766
1828
|
*
|
|
1767
|
-
*
|
|
1768
|
-
*
|
|
1769
|
-
*
|
|
1770
|
-
* note-on and take effect from the next note, so a lane that moves one of
|
|
1771
|
-
* them under a held note looks inert until the next one speaks — that is the
|
|
1772
|
-
* behaviour, not a dropped write.
|
|
1829
|
+
* All automatable parameters of a NativeSynth reach already-sounding voices
|
|
1830
|
+
* from the next processed block. Voices using GM program patches are
|
|
1831
|
+
* unaffected; parameters apply to NativeSynth's own patch only.
|
|
1773
1832
|
*
|
|
1774
1833
|
* The id survives an unbind/rebind of the same destination and applies
|
|
1775
1834
|
* nothing while that destination is unbound.
|
|
@@ -1793,6 +1852,16 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
1793
1852
|
setTrackStripDualPan(trackId, leftPan, rightPan) {
|
|
1794
1853
|
this.native.setTrackStripDualPan(trackId, leftPan, rightPan);
|
|
1795
1854
|
}
|
|
1855
|
+
/**
|
|
1856
|
+
* Sets a track lane strip's surround placement in realtime (glitch-free; a
|
|
1857
|
+
* constant-power 5 ms one-pole glide). Used when the destination has more than
|
|
1858
|
+
* two channels. Omitted fields default to a centered point source
|
|
1859
|
+
* (`distance` 1); a `distance` of 0 or less is treated as 1. Throws for an
|
|
1860
|
+
* unknown track, a track without a lane strip, or a non-finite field.
|
|
1861
|
+
*/
|
|
1862
|
+
setTrackStripSurroundPan(trackId, pan) {
|
|
1863
|
+
this.native.setTrackStripSurroundPan(trackId, pan);
|
|
1864
|
+
}
|
|
1796
1865
|
/**
|
|
1797
1866
|
* Sets a bus strip's output pan position in realtime (glitch-free). Throws
|
|
1798
1867
|
* for an unknown bus or one wider than stereo.
|
|
@@ -1813,8 +1882,9 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
1813
1882
|
this.native.setBusStripDualPan(busId, leftPan, rightPan);
|
|
1814
1883
|
}
|
|
1815
1884
|
/**
|
|
1816
|
-
* Sets a track lane strip's
|
|
1817
|
-
*
|
|
1885
|
+
* Sets a track lane strip's alignment delay (whole samples), moving this lane
|
|
1886
|
+
* later relative to every other lane. It is not latency: PDC does not
|
|
1887
|
+
* compensate it and the reported graph latency is unchanged.
|
|
1818
1888
|
*/
|
|
1819
1889
|
setTrackStripChannelDelaySamples(trackId, delaySamples) {
|
|
1820
1890
|
this.native.setTrackStripChannelDelaySamples(trackId, delaySamples);
|
|
@@ -2082,6 +2152,15 @@ var RealtimeEngine = class _RealtimeEngine {
|
|
|
2082
2152
|
drainMeterTelemetryWide(maxRecords = 1024) {
|
|
2083
2153
|
return this.native.drainMeterTelemetryWide(maxRecords);
|
|
2084
2154
|
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Per-insert gain reduction in dB (each <= 0) of a meter target's strip from the
|
|
2157
|
+
* last rendered block, in combined pre-to-post insert order. `targetId` uses the
|
|
2158
|
+
* meter-record encoding (0 master, 1..32 lanes, 33..40 buses; 0xFFFF monitor
|
|
2159
|
+
* yields an empty array). Throws for an id outside that range.
|
|
2160
|
+
*/
|
|
2161
|
+
meterTargetInsertGainReduction(targetId) {
|
|
2162
|
+
return this.native.meterTargetInsertGainReduction(targetId);
|
|
2163
|
+
}
|
|
2085
2164
|
/**
|
|
2086
2165
|
* Enables per-target spectrum + vectorscope capture. @param intervalFrames is
|
|
2087
2166
|
* the minimum render-frame gap between snapshots (0 disables). @param bandCount
|
|
@@ -2509,8 +2588,8 @@ var Mixer = class _Mixer {
|
|
|
2509
2588
|
this.mixer.setPanLaw(stripIndex, panLawCode(panLaw));
|
|
2510
2589
|
}
|
|
2511
2590
|
/**
|
|
2512
|
-
* Set a per-strip channel delay in samples
|
|
2513
|
-
*
|
|
2591
|
+
* Set a per-strip channel delay in samples, moving the strip later relative to
|
|
2592
|
+
* the others. It is not latency: latency compensation does not undo it.
|
|
2514
2593
|
*/
|
|
2515
2594
|
setChannelDelaySamples(stripIndex, delaySamples) {
|
|
2516
2595
|
this.mixer.setChannelDelaySamples(stripIndex, delaySamples);
|
|
@@ -3979,6 +4058,7 @@ var ENGINE_SYNC_MESSAGE_TYPES = {
|
|
|
3979
4058
|
syncMidiInputPitchBend: true,
|
|
3980
4059
|
syncMidiInputPolyPressure: true,
|
|
3981
4060
|
syncMidiInputSource: true,
|
|
4061
|
+
syncMidiInputUmp: true,
|
|
3982
4062
|
syncMidiNoteOff: true,
|
|
3983
4063
|
syncMidiNoteOn: true,
|
|
3984
4064
|
syncMidiPanic: true,
|
|
@@ -3999,6 +4079,7 @@ var ENGINE_SYNC_MESSAGE_TYPES = {
|
|
|
3999
4079
|
syncTrackStripPan: true,
|
|
4000
4080
|
syncTrackStripPanLaw: true,
|
|
4001
4081
|
syncTrackStripPanMode: true,
|
|
4082
|
+
syncTrackStripSurroundPan: true,
|
|
4002
4083
|
syncWarpVoiceCapacity: true
|
|
4003
4084
|
};
|
|
4004
4085
|
var engineSyncMessageTypes = new Set(Object.keys(ENGINE_SYNC_MESSAGE_TYPES));
|
|
@@ -4069,6 +4150,12 @@ function isEngineTransportRequestMessage(value) {
|
|
|
4069
4150
|
function isEngineTransportResponseMessage(value) {
|
|
4070
4151
|
return isRecord(value) && value.type === "transportResponse" && typeof value.requestId === "number" && typeof value.ok === "boolean";
|
|
4071
4152
|
}
|
|
4153
|
+
function isEngineInsertGainReductionRequestMessage(value) {
|
|
4154
|
+
return isRecord(value) && value.type === "insertGainReductionRequest" && typeof value.requestId === "number" && typeof value.targetId === "number";
|
|
4155
|
+
}
|
|
4156
|
+
function isEngineInsertGainReductionResponseMessage(value) {
|
|
4157
|
+
return isRecord(value) && value.type === "insertGainReductionResponse" && typeof value.requestId === "number" && typeof value.ok === "boolean";
|
|
4158
|
+
}
|
|
4072
4159
|
function isRealtimeVoiceChangerMessage(value) {
|
|
4073
4160
|
if (!isRecord(value) || typeof value.type !== "string") {
|
|
4074
4161
|
return false;
|
|
@@ -5106,6 +5193,8 @@ var SonareRealtimeEngineNode = class _SonareRealtimeEngineNode {
|
|
|
5106
5193
|
this.captureRequests = /* @__PURE__ */ new Map();
|
|
5107
5194
|
this.transportRequestId = 1;
|
|
5108
5195
|
this.transportRequests = /* @__PURE__ */ new Map();
|
|
5196
|
+
this.insertGainReductionRequestId = 1;
|
|
5197
|
+
this.insertGainReductionRequests = /* @__PURE__ */ new Map();
|
|
5109
5198
|
this.destroyed = false;
|
|
5110
5199
|
this.node = node;
|
|
5111
5200
|
this.capabilities = capabilities;
|
|
@@ -5151,6 +5240,16 @@ var SonareRealtimeEngineNode = class _SonareRealtimeEngineNode {
|
|
|
5151
5240
|
pending.reject(new Error(event.data.error ?? "Transport request failed"));
|
|
5152
5241
|
}
|
|
5153
5242
|
}
|
|
5243
|
+
} else if (isEngineInsertGainReductionResponseMessage(event.data)) {
|
|
5244
|
+
const pending = this.insertGainReductionRequests.get(event.data.requestId);
|
|
5245
|
+
if (pending) {
|
|
5246
|
+
this.insertGainReductionRequests.delete(event.data.requestId);
|
|
5247
|
+
if (event.data.ok && Array.isArray(event.data.values)) {
|
|
5248
|
+
pending.resolve(event.data.values);
|
|
5249
|
+
} else {
|
|
5250
|
+
pending.reject(new Error(event.data.error ?? "Insert gain reduction request failed"));
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5154
5253
|
} else if (isEngineTelemetryRecord(event.data)) {
|
|
5155
5254
|
this.emitTelemetry(event.data);
|
|
5156
5255
|
} else if (isMeterSnapshot(event.data)) {
|
|
@@ -5544,6 +5643,10 @@ var SonareRealtimeEngineNode = class _SonareRealtimeEngineNode {
|
|
|
5544
5643
|
pending.reject(new Error("Realtime engine node is destroyed."));
|
|
5545
5644
|
}
|
|
5546
5645
|
this.transportRequests.clear();
|
|
5646
|
+
for (const pending of this.insertGainReductionRequests.values()) {
|
|
5647
|
+
pending.reject(new Error("Realtime engine node is destroyed."));
|
|
5648
|
+
}
|
|
5649
|
+
this.insertGainReductionRequests.clear();
|
|
5547
5650
|
this.telemetryListeners.clear();
|
|
5548
5651
|
this.meterListeners.clear();
|
|
5549
5652
|
this.scopeListeners.clear();
|
|
@@ -5593,6 +5696,29 @@ var SonareRealtimeEngineNode = class _SonareRealtimeEngineNode {
|
|
|
5593
5696
|
listener(message);
|
|
5594
5697
|
}
|
|
5595
5698
|
}
|
|
5699
|
+
/**
|
|
5700
|
+
* Reads one target's per-insert gain reduction (dB, each <= 0, pre-to-post insert order)
|
|
5701
|
+
* from the worklet. Works in both ring and postMessage meter modes; rejects when the
|
|
5702
|
+
* target is invalid or mixing is not compiled in.
|
|
5703
|
+
*/
|
|
5704
|
+
pollInsertGainReduction(targetId) {
|
|
5705
|
+
if (this.destroyed) {
|
|
5706
|
+
return Promise.reject(new Error("Realtime engine node is destroyed."));
|
|
5707
|
+
}
|
|
5708
|
+
const requestId = this.insertGainReductionRequestId++;
|
|
5709
|
+
let rejectRequest;
|
|
5710
|
+
const promise = new Promise((resolve, reject) => {
|
|
5711
|
+
rejectRequest = reject;
|
|
5712
|
+
this.insertGainReductionRequests.set(requestId, { resolve, reject });
|
|
5713
|
+
});
|
|
5714
|
+
try {
|
|
5715
|
+
this.node.port.postMessage({ type: "insertGainReductionRequest", requestId, targetId });
|
|
5716
|
+
} catch (error) {
|
|
5717
|
+
this.insertGainReductionRequests.delete(requestId);
|
|
5718
|
+
rejectRequest(error);
|
|
5719
|
+
}
|
|
5720
|
+
return promise;
|
|
5721
|
+
}
|
|
5596
5722
|
emitScope(scope) {
|
|
5597
5723
|
for (const listener of this.scopeListeners) {
|
|
5598
5724
|
listener(scope);
|
|
@@ -5810,6 +5936,21 @@ function setTrackStripDualPan(ctx, target, leftPan, rightPan) {
|
|
|
5810
5936
|
});
|
|
5811
5937
|
ctx.postSync({ type: "syncTrackStripDualPan", trackId, leftPan, rightPan });
|
|
5812
5938
|
}
|
|
5939
|
+
function setTrackStripSurroundPan(ctx, target, pan) {
|
|
5940
|
+
const trackId = trackIdFor(ctx, target);
|
|
5941
|
+
ctx.offlineEngine.setTrackStripSurroundPan(trackId, pan);
|
|
5942
|
+
const resolved = {
|
|
5943
|
+
azimuth: pan.azimuth ?? 0,
|
|
5944
|
+
elevation: pan.elevation ?? 0,
|
|
5945
|
+
divergence: pan.divergence ?? 0,
|
|
5946
|
+
lfe: pan.lfe ?? 0,
|
|
5947
|
+
distance: pan.distance === void 0 || pan.distance <= 0 ? 1 : pan.distance
|
|
5948
|
+
};
|
|
5949
|
+
mergeStripJson(ctx, { kind: "track", trackId }, (entry) => {
|
|
5950
|
+
entry.surroundPan = resolved;
|
|
5951
|
+
});
|
|
5952
|
+
ctx.postSync({ type: "syncTrackStripSurroundPan", trackId, pan: resolved });
|
|
5953
|
+
}
|
|
5813
5954
|
function setTrackStripChannelDelaySamples(ctx, target, delaySamples) {
|
|
5814
5955
|
const trackId = trackIdFor(ctx, target);
|
|
5815
5956
|
ctx.offlineEngine.setTrackStripChannelDelaySamples(trackId, delaySamples);
|
|
@@ -5983,8 +6124,14 @@ function pushMidiPolyPressure(ctx, trackId, group, channel, note, pressure, rend
|
|
|
5983
6124
|
}
|
|
5984
6125
|
function pushMidiUmp(ctx, trackId, word0, renderFrame) {
|
|
5985
6126
|
const destinationId = ctx.resolveTargetId(trackId);
|
|
5986
|
-
|
|
5987
|
-
|
|
6127
|
+
if (typeof word0 === "number") {
|
|
6128
|
+
ctx.offlineEngine.pushMidiUmp(destinationId, word0, renderFrame);
|
|
6129
|
+
ctx.postSync({ type: "syncMidiUmp", destinationId, word0, renderFrame });
|
|
6130
|
+
return;
|
|
6131
|
+
}
|
|
6132
|
+
const words = word0 instanceof Uint32Array ? new Uint32Array(word0) : word0.slice();
|
|
6133
|
+
ctx.offlineEngine.pushMidiUmp(destinationId, words, renderFrame);
|
|
6134
|
+
ctx.postSync({ type: "syncMidiUmp", destinationId, words, renderFrame });
|
|
5988
6135
|
}
|
|
5989
6136
|
function setBuiltinInstrument(ctx, trackId, config) {
|
|
5990
6137
|
const destinationId = ctx.resolveTargetId(trackId);
|
|
@@ -6436,7 +6583,9 @@ var SonareEngine = class _SonareEngine {
|
|
|
6436
6583
|
/**
|
|
6437
6584
|
* Keys one insert of a lane strip from another lane's post-strip pre-fader
|
|
6438
6585
|
* audio (ducking/sidechainRouter inserts). sourceTarget null removes the
|
|
6439
|
-
* binding.
|
|
6586
|
+
* binding. Throws, leaving the existing bindings unchanged, for a lane keying
|
|
6587
|
+
* itself or a binding that would close a cycle over the lane bindings; a
|
|
6588
|
+
* refused binding is never recorded, so it is not replayed on resync.
|
|
6440
6589
|
*/
|
|
6441
6590
|
setLaneSidechain(target, insertIndex, sourceTarget) {
|
|
6442
6591
|
setLaneSidechain(this.mixerContext, target, insertIndex, sourceTarget);
|
|
@@ -6504,6 +6653,14 @@ var SonareEngine = class _SonareEngine {
|
|
|
6504
6653
|
setTrackStripDualPan(target, leftPan, rightPan) {
|
|
6505
6654
|
setTrackStripDualPan(this.stripContext, target, leftPan, rightPan);
|
|
6506
6655
|
}
|
|
6656
|
+
/**
|
|
6657
|
+
* Sets a track lane strip's surround placement (glitch-free, 5 ms placement
|
|
6658
|
+
* glide). Takes effect on a destination wider than stereo, so set `channelCount`
|
|
6659
|
+
* to the layout's plane count. Omitted fields default to a centered point source.
|
|
6660
|
+
*/
|
|
6661
|
+
setTrackStripSurroundPan(target, pan) {
|
|
6662
|
+
setTrackStripSurroundPan(this.stripContext, target, pan);
|
|
6663
|
+
}
|
|
6507
6664
|
setTrackStripChannelDelaySamples(target, delaySamples) {
|
|
6508
6665
|
setTrackStripChannelDelaySamples(this.stripContext, target, delaySamples);
|
|
6509
6666
|
}
|
|
@@ -6799,8 +6956,8 @@ var SonareEngine = class _SonareEngine {
|
|
|
6799
6956
|
renderFrame
|
|
6800
6957
|
);
|
|
6801
6958
|
}
|
|
6802
|
-
pushMidiUmp(trackId,
|
|
6803
|
-
pushMidiUmp(this.stripContext, trackId,
|
|
6959
|
+
pushMidiUmp(trackId, words, renderFrame = -1) {
|
|
6960
|
+
pushMidiUmp(this.stripContext, trackId, words, renderFrame);
|
|
6804
6961
|
}
|
|
6805
6962
|
pushMidiSysex(trackId, data, renderFrame = -1) {
|
|
6806
6963
|
pushMidiSysex(this.stripContext, trackId, data, renderFrame);
|
|
@@ -6885,6 +7042,11 @@ var SonareEngine = class _SonareEngine {
|
|
|
6885
7042
|
portTimeSamples
|
|
6886
7043
|
});
|
|
6887
7044
|
}
|
|
7045
|
+
pushMidiInputUmp(words, portTimeSamples = 0) {
|
|
7046
|
+
const copiedWords = words instanceof Uint32Array ? new Uint32Array(words) : words.slice();
|
|
7047
|
+
this.offlineEngine.pushMidiInputUmp(copiedWords, portTimeSamples);
|
|
7048
|
+
this.postSync({ type: "syncMidiInputUmp", words: copiedWords, portTimeSamples });
|
|
7049
|
+
}
|
|
6888
7050
|
pushMidiPanic(renderFrame = -1) {
|
|
6889
7051
|
this.offlineEngine.pushMidiPanic(renderFrame);
|
|
6890
7052
|
this.postSync({ type: "syncMidiPanic", renderFrame });
|
|
@@ -6980,6 +7142,10 @@ var SonareEngine = class _SonareEngine {
|
|
|
6980
7142
|
pollScope() {
|
|
6981
7143
|
return this.realtimeNode.pollScope();
|
|
6982
7144
|
}
|
|
7145
|
+
/** Per-insert gain reduction for a meter target; see {@link SonareRealtimeEngineNode.pollInsertGainReduction}. */
|
|
7146
|
+
pollInsertGainReduction(targetId) {
|
|
7147
|
+
return this.realtimeNode.pollInsertGainReduction(targetId);
|
|
7148
|
+
}
|
|
6983
7149
|
destroy() {
|
|
6984
7150
|
if (this.destroyed) {
|
|
6985
7151
|
return;
|
|
@@ -7918,6 +8084,9 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
7918
8084
|
case "syncTrackStripDualPan":
|
|
7919
8085
|
this.engine.setTrackStripDualPan(message.trackId, message.leftPan, message.rightPan);
|
|
7920
8086
|
break;
|
|
8087
|
+
case "syncTrackStripSurroundPan":
|
|
8088
|
+
this.engine.setTrackStripSurroundPan(message.trackId, message.pan);
|
|
8089
|
+
break;
|
|
7921
8090
|
case "syncBusStripPan":
|
|
7922
8091
|
this.engine.setBusStripPan(message.busId, message.pan);
|
|
7923
8092
|
break;
|
|
@@ -8010,7 +8179,11 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
8010
8179
|
);
|
|
8011
8180
|
break;
|
|
8012
8181
|
case "syncMidiUmp":
|
|
8013
|
-
this.engine.pushMidiUmp(
|
|
8182
|
+
this.engine.pushMidiUmp(
|
|
8183
|
+
message.destinationId,
|
|
8184
|
+
message.words ?? [message.word0],
|
|
8185
|
+
message.renderFrame
|
|
8186
|
+
);
|
|
8014
8187
|
break;
|
|
8015
8188
|
case "syncMidiSysex":
|
|
8016
8189
|
this.engine.pushMidiSysex(message.destinationId, message.data, message.renderFrame);
|
|
@@ -8088,6 +8261,9 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
8088
8261
|
message.portTimeSamples
|
|
8089
8262
|
);
|
|
8090
8263
|
break;
|
|
8264
|
+
case "syncMidiInputUmp":
|
|
8265
|
+
this.engine.pushMidiInputUmp(message.words, message.portTimeSamples);
|
|
8266
|
+
break;
|
|
8091
8267
|
}
|
|
8092
8268
|
}
|
|
8093
8269
|
receiveCaptureRequest(message) {
|
|
@@ -8161,6 +8337,26 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
8161
8337
|
});
|
|
8162
8338
|
}
|
|
8163
8339
|
}
|
|
8340
|
+
receiveInsertGainReductionRequest(message) {
|
|
8341
|
+
if (this.closed) {
|
|
8342
|
+
return;
|
|
8343
|
+
}
|
|
8344
|
+
try {
|
|
8345
|
+
this.transport?.postMessage?.({
|
|
8346
|
+
type: "insertGainReductionResponse",
|
|
8347
|
+
requestId: message.requestId,
|
|
8348
|
+
ok: true,
|
|
8349
|
+
values: this.engine.meterTargetInsertGainReduction(message.targetId)
|
|
8350
|
+
});
|
|
8351
|
+
} catch (error) {
|
|
8352
|
+
this.transport?.postMessage?.({
|
|
8353
|
+
type: "insertGainReductionResponse",
|
|
8354
|
+
requestId: message.requestId,
|
|
8355
|
+
ok: false,
|
|
8356
|
+
error: error instanceof Error ? error.message : String(error)
|
|
8357
|
+
});
|
|
8358
|
+
}
|
|
8359
|
+
}
|
|
8164
8360
|
destroy() {
|
|
8165
8361
|
if (!this.closed) {
|
|
8166
8362
|
this.clearPagedClipProviders();
|
|
@@ -8354,6 +8550,8 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
8354
8550
|
}
|
|
8355
8551
|
return;
|
|
8356
8552
|
}
|
|
8553
|
+
const delivered = [];
|
|
8554
|
+
const newestByTarget = /* @__PURE__ */ new Map();
|
|
8357
8555
|
for (const item of this.engine.drainMeterTelemetry(64)) {
|
|
8358
8556
|
const meter = meterFromEngine(item);
|
|
8359
8557
|
if (meter.frame !== this.lastMeterFrame && meter.frame - this.lastMeterFrame < this.meterIntervalFrames) {
|
|
@@ -8362,6 +8560,13 @@ var _SonareRealtimeEngineWorkletProcessor = class _SonareRealtimeEngineWorkletPr
|
|
|
8362
8560
|
if (meter.frame !== this.lastMeterFrame) {
|
|
8363
8561
|
this.lastMeterFrame = meter.frame;
|
|
8364
8562
|
}
|
|
8563
|
+
delivered.push(meter);
|
|
8564
|
+
newestByTarget.set(meter.targetId, meter);
|
|
8565
|
+
}
|
|
8566
|
+
for (const meter of delivered) {
|
|
8567
|
+
if (newestByTarget.get(meter.targetId) === meter) {
|
|
8568
|
+
meter.insertGainReductionDb = this.engine.meterTargetInsertGainReduction(meter.targetId);
|
|
8569
|
+
}
|
|
8365
8570
|
if (this.transport?.onMeter) {
|
|
8366
8571
|
this.transport.onMeter(meter);
|
|
8367
8572
|
} else {
|
|
@@ -8674,6 +8879,8 @@ function registerSonareRealtimeEngineWorkletProcessor(name = "sonare-realtime-en
|
|
|
8674
8879
|
bridge.receiveCaptureRequest(data);
|
|
8675
8880
|
} else if (isEngineTransportRequestMessage(data)) {
|
|
8676
8881
|
bridge.receiveTransportRequest(data);
|
|
8882
|
+
} else if (isEngineInsertGainReductionRequestMessage(data)) {
|
|
8883
|
+
bridge.receiveInsertGainReductionRequest(data);
|
|
8677
8884
|
} else if (isRecord(data) && typeof data.type === "string" && data.type.startsWith("sync")) {
|
|
8678
8885
|
this.port?.postMessage?.({
|
|
8679
8886
|
type: "syncError",
|