@opendaw/studio-core 0.0.111 → 0.0.113
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/AssetService.d.ts.map +1 -1
- package/dist/AssetService.js +15 -4
- package/dist/AudioUnitFreeze.d.ts +15 -0
- package/dist/AudioUnitFreeze.d.ts.map +1 -0
- package/dist/AudioUnitFreeze.js +129 -0
- package/dist/Engine.d.ts +1 -0
- package/dist/Engine.d.ts.map +1 -1
- package/dist/EngineFacade.d.ts +1 -0
- package/dist/EngineFacade.d.ts.map +1 -1
- package/dist/EngineFacade.js +3 -0
- package/dist/EngineWorklet.d.ts +1 -0
- package/dist/EngineWorklet.d.ts.map +1 -1
- package/dist/EngineWorklet.js +4 -0
- package/dist/FilePickerAcceptTypes.d.ts +1 -0
- package/dist/FilePickerAcceptTypes.d.ts.map +1 -1
- package/dist/FilePickerAcceptTypes.js +4 -0
- package/dist/OfflineEngineRenderer.d.ts.map +1 -1
- package/dist/OfflineEngineRenderer.js +1 -0
- package/dist/StudioPreferences.d.ts +1 -0
- package/dist/StudioPreferences.d.ts.map +1 -1
- package/dist/StudioSettings.d.ts +1 -0
- package/dist/StudioSettings.d.ts.map +1 -1
- package/dist/StudioSettings.js +4 -2
- package/dist/capture/CaptureDevices.d.ts.map +1 -1
- package/dist/capture/CaptureDevices.js +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/offline-engine.js.map +1 -1
- package/dist/processors.js +8 -8
- package/dist/processors.js.map +4 -4
- package/dist/project/Project.d.ts +2 -0
- package/dist/project/Project.d.ts.map +1 -1
- package/dist/project/Project.js +3 -0
- package/dist/project/ProjectApi.d.ts +3 -3
- package/dist/project/ProjectApi.d.ts.map +1 -1
- package/dist/project/ProjectApi.js +3 -0
- package/dist/project/audio/AudioContentHelpers.d.ts +2 -2
- package/dist/project/audio/AudioContentHelpers.d.ts.map +1 -1
- package/dist/project/audio/AudioContentHelpers.js +1 -1
- package/dist/project/audio/AudioContentModifier.d.ts.map +1 -1
- package/dist/project/audio/AudioContentModifier.js +8 -7
- package/dist/samples/SampleService.d.ts +1 -0
- package/dist/samples/SampleService.d.ts.map +1 -1
- package/dist/samples/SampleService.js +24 -19
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/renderer/audio.d.ts +9 -0
- package/dist/ui/renderer/audio.d.ts.map +1 -0
- package/dist/ui/renderer/audio.js +277 -0
- package/dist/ui/renderer/env.d.ts +5 -0
- package/dist/ui/renderer/env.d.ts.map +1 -0
- package/dist/ui/renderer/env.js +1 -0
- package/dist/ui/renderer/fading.d.ts +7 -0
- package/dist/ui/renderer/fading.d.ts.map +1 -0
- package/dist/ui/renderer/fading.js +55 -0
- package/dist/ui/renderer/index.d.ts +6 -0
- package/dist/ui/renderer/index.d.ts.map +1 -0
- package/dist/ui/renderer/index.js +5 -0
- package/dist/ui/renderer/notes.d.ts +7 -0
- package/dist/ui/renderer/notes.d.ts.map +1 -0
- package/dist/ui/renderer/notes.js +23 -0
- package/dist/ui/renderer/value.d.ts +7 -0
- package/dist/ui/renderer/value.d.ts.map +1 -0
- package/dist/ui/renderer/value.js +101 -0
- package/dist/ui/timeline/RegionClipResolver.d.ts.map +1 -1
- package/dist/ui/timeline/RegionClipResolver.js +19 -23
- package/package.json +15 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fading.d.ts","sourceRoot":"","sources":["../../../src/ui/renderer/fading.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,OAAO,CAAA;AAEjC,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,MAAM,GAAI,SAAS,wBAAwB,EACjC,OAAO,aAAa,EACpB,QAAQ,cAAc,CAAC,MAAM,EAC7B,iBAAe,WAAW,EAC1B,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,OAAO,MAAM,KAAG,IAkDtC,CAAA;CACJ"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Curve, TAU } from "@opendaw/lib-std";
|
|
2
|
+
export var AudioFadingRenderer;
|
|
3
|
+
(function (AudioFadingRenderer) {
|
|
4
|
+
AudioFadingRenderer.render = (context, range, fading, { top, bottom }, startPPQN, endPPQN, color) => {
|
|
5
|
+
const { inSlope: fadeInSlope, outSlope: fadeOutSlope } = fading;
|
|
6
|
+
const duration = endPPQN - startPPQN;
|
|
7
|
+
const totalFading = fading.in + fading.out;
|
|
8
|
+
const scale = totalFading > duration ? duration / totalFading : 1.0;
|
|
9
|
+
const fadeIn = fading.in * scale;
|
|
10
|
+
const fadeOut = fading.out * scale;
|
|
11
|
+
context.strokeStyle = color;
|
|
12
|
+
context.fillStyle = "rgba(0,0,0,0.25)";
|
|
13
|
+
context.lineWidth = devicePixelRatio;
|
|
14
|
+
if (fadeIn > 0) {
|
|
15
|
+
const fadeInEndPPQN = startPPQN + fadeIn;
|
|
16
|
+
const x0 = range.unitToX(startPPQN) * devicePixelRatio;
|
|
17
|
+
const x1 = range.unitToX(fadeInEndPPQN) * devicePixelRatio;
|
|
18
|
+
const xn = x1 - x0;
|
|
19
|
+
const path = new Path2D();
|
|
20
|
+
path.moveTo(x0, bottom);
|
|
21
|
+
let x = x0;
|
|
22
|
+
Curve.run(fadeInSlope, xn, bottom, top, y => path.lineTo(++x, y));
|
|
23
|
+
path.lineTo(x1, top);
|
|
24
|
+
context.stroke(path);
|
|
25
|
+
path.lineTo(x0, top);
|
|
26
|
+
path.lineTo(x0, bottom);
|
|
27
|
+
context.fill(path);
|
|
28
|
+
}
|
|
29
|
+
if (fadeOut > 0) {
|
|
30
|
+
const x0 = range.unitToX(endPPQN - fadeOut) * devicePixelRatio;
|
|
31
|
+
const x1 = range.unitToX(endPPQN) * devicePixelRatio;
|
|
32
|
+
const xn = x1 - x0;
|
|
33
|
+
const path = new Path2D();
|
|
34
|
+
path.moveTo(x0, top);
|
|
35
|
+
let x = x0;
|
|
36
|
+
Curve.run(fadeOutSlope, xn, top, bottom, y => path.lineTo(++x, y));
|
|
37
|
+
path.lineTo(x1, bottom);
|
|
38
|
+
context.strokeStyle = color;
|
|
39
|
+
context.stroke(path);
|
|
40
|
+
path.lineTo(x1, top);
|
|
41
|
+
path.lineTo(x0, top);
|
|
42
|
+
context.fill(path);
|
|
43
|
+
}
|
|
44
|
+
const handleRadius = 1.5 * devicePixelRatio;
|
|
45
|
+
const x0 = Math.max(range.unitToX(startPPQN + fadeIn), range.unitToX(startPPQN)) * devicePixelRatio;
|
|
46
|
+
const x1 = Math.min(range.unitToX(endPPQN - fadeOut), range.unitToX(endPPQN)) * devicePixelRatio;
|
|
47
|
+
context.fillStyle = color;
|
|
48
|
+
context.beginPath();
|
|
49
|
+
context.arc(x0, top, handleRadius, 0, TAU);
|
|
50
|
+
context.fill();
|
|
51
|
+
context.beginPath();
|
|
52
|
+
context.arc(x1, top, handleRadius, 0, TAU);
|
|
53
|
+
context.fill();
|
|
54
|
+
};
|
|
55
|
+
})(AudioFadingRenderer || (AudioFadingRenderer = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/renderer/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NoteRegionBoxAdapter } from "@opendaw/studio-adapters";
|
|
2
|
+
import { LoopableRegion } from "@opendaw/lib-dsp";
|
|
3
|
+
import { RegionBound, TimelineRange } from "../../index";
|
|
4
|
+
export declare namespace NotesRenderer {
|
|
5
|
+
const render: (context: CanvasRenderingContext2D, range: TimelineRange, region: NoteRegionBoxAdapter, { top, bottom }: RegionBound, contentColor: string, { rawStart, regionStart, resultStart, resultEnd }: LoopableRegion.LoopCycle) => void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../../src/ui/renderer/notes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,aAAa,CAAA;AAEtD,yBAAiB,aAAa,CAAC;IACpB,MAAM,MAAM,GAAI,SAAS,wBAAwB,EACjC,OAAO,aAAa,EACpB,QAAQ,oBAAoB,EAC5B,iBAAe,WAAW,EAC1B,cAAc,MAAM,EACpB,mDAAiD,cAAc,CAAC,SAAS,SAiB/F,CAAA;CACJ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export var NotesRenderer;
|
|
2
|
+
(function (NotesRenderer) {
|
|
3
|
+
NotesRenderer.render = (context, range, region, { top, bottom }, contentColor, { rawStart, regionStart, resultStart, resultEnd }) => {
|
|
4
|
+
const collection = region.optCollection.unwrap();
|
|
5
|
+
const height = bottom - top;
|
|
6
|
+
context.fillStyle = contentColor;
|
|
7
|
+
const padding = 8;
|
|
8
|
+
const noteHeight = 5;
|
|
9
|
+
const searchStart = Math.floor(resultStart - rawStart);
|
|
10
|
+
const searchEnd = Math.floor(resultEnd - rawStart);
|
|
11
|
+
for (const note of collection.events.iterateRange(searchStart - collection.maxDuration, searchEnd)) {
|
|
12
|
+
const position = rawStart + note.position;
|
|
13
|
+
if (position < regionStart) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const complete = Math.min(rawStart + note.complete, resultEnd);
|
|
17
|
+
const x0 = Math.floor(range.unitToX(position) * devicePixelRatio);
|
|
18
|
+
const x1 = Math.floor(range.unitToX(complete) * devicePixelRatio);
|
|
19
|
+
const y = top + padding + Math.floor(note.normalizedPitch() * (height - (padding * 2 + noteHeight)));
|
|
20
|
+
context.fillRect(x0, y, Math.max(1, x1 - x0), noteHeight);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
})(NotesRenderer || (NotesRenderer = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LoopableRegion, ValueEvent } from "@opendaw/lib-dsp";
|
|
2
|
+
import { Func, unitValue } from "@opendaw/lib-std";
|
|
3
|
+
import { TimelineRange } from "../../index";
|
|
4
|
+
export declare namespace ValueStreamRenderer {
|
|
5
|
+
const render: (context: CanvasRenderingContext2D, range: TimelineRange, generator: IterableIterator<ValueEvent>, valueToY: Func<unitValue, number>, contentColor: string, alphaFill: unitValue, anchor: unitValue, { resultStart, resultEnd, rawStart: delta }: LoopableRegion.LoopCycle) => void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../src/ui/renderer/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAA2B,IAAI,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AAEzC,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,MAAM,GAAI,SAAS,wBAAwB,EACjC,OAAO,aAAa,EACpB,WAAW,gBAAgB,CAAC,UAAU,CAAC,EACvC,UAAU,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EACjC,cAAc,MAAM,EACpB,WAAW,SAAS,EACpB,QAAQ,SAAS,EACjB,6CAA2C,cAAc,CAAC,SAAS,SAuFzF,CAAA;CACJ"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { asDefined, assert, Curve } from "@opendaw/lib-std";
|
|
2
|
+
export var ValueStreamRenderer;
|
|
3
|
+
(function (ValueStreamRenderer) {
|
|
4
|
+
ValueStreamRenderer.render = (context, range, generator, valueToY, contentColor, alphaFill, anchor, { resultStart, resultEnd, rawStart: delta }) => {
|
|
5
|
+
const { done, value } = generator.next();
|
|
6
|
+
if (done) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const unitToX = (unit) => range.unitToX(unit + delta) * devicePixelRatio;
|
|
10
|
+
const path = new Path2D();
|
|
11
|
+
const windowMin = resultStart - delta;
|
|
12
|
+
const windowMax = resultEnd - delta;
|
|
13
|
+
const xMin = unitToX(windowMin);
|
|
14
|
+
const xMax = unitToX(windowMax);
|
|
15
|
+
let notMoved = true; // makes sure we start with a moveTo command
|
|
16
|
+
let prev = asDefined(value);
|
|
17
|
+
for (const next of generator) {
|
|
18
|
+
assert(prev !== next, "iterator error");
|
|
19
|
+
const { position: p0, value: v0, interpolation } = prev;
|
|
20
|
+
const { position: p1, value: v1 } = next;
|
|
21
|
+
const type = interpolation.type;
|
|
22
|
+
const x0 = unitToX(p0);
|
|
23
|
+
const x1 = unitToX(p1);
|
|
24
|
+
const y0 = valueToY(v0);
|
|
25
|
+
const y1 = valueToY(v1);
|
|
26
|
+
if (type === "none" || p1 - p0 === 0) { // hold and jumps to the next event's value
|
|
27
|
+
if (notMoved) {
|
|
28
|
+
if (p1 > windowMax) {
|
|
29
|
+
break;
|
|
30
|
+
} // leave the rest for after the loop
|
|
31
|
+
path.moveTo(xMin, y0); // move pen to window min
|
|
32
|
+
path.lineTo(x1, y0); // line to next event
|
|
33
|
+
notMoved = false;
|
|
34
|
+
}
|
|
35
|
+
if (x1 > xMax) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
path.lineTo(x1, y0); // hold value to the next event
|
|
39
|
+
path.lineTo(x1, y1); // jump to the next event value
|
|
40
|
+
}
|
|
41
|
+
else if (type === "linear") {
|
|
42
|
+
const ratio = (v1 - v0) / (p1 - p0);
|
|
43
|
+
if (notMoved) {
|
|
44
|
+
path.moveTo(xMin, valueToY(p0 < windowMin ? v0 + ratio * (windowMin - p0) : v0)); // move pen to window min
|
|
45
|
+
if (p0 > windowMin) {
|
|
46
|
+
path.lineTo(x0, y0);
|
|
47
|
+
} // line to first event
|
|
48
|
+
notMoved = false;
|
|
49
|
+
}
|
|
50
|
+
if (p1 > windowMax) {
|
|
51
|
+
path.lineTo(xMax, valueToY(v0 + ratio * (windowMax - p0))); // line to window max
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
path.lineTo(x1, y1); // line to next event
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (type === "curve") {
|
|
58
|
+
const cx0 = Math.max(x0, xMin);
|
|
59
|
+
const cx1 = Math.min(x1, xMax);
|
|
60
|
+
const definition = { slope: interpolation.slope, steps: x1 - x0, y0, y1 };
|
|
61
|
+
if (notMoved) {
|
|
62
|
+
if (p0 > windowMin) {
|
|
63
|
+
path.moveTo(xMin, y0); // move to window edge
|
|
64
|
+
path.lineTo(x0, y0); // draw the line to the first event
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
path.moveTo(cx0, Curve.valueAt(definition, cx0 - x0));
|
|
68
|
+
}
|
|
69
|
+
notMoved = false;
|
|
70
|
+
}
|
|
71
|
+
// TODO We can optimise this by walking the Curve.coefficients
|
|
72
|
+
for (let x = cx0; x <= cx1; x += 4) {
|
|
73
|
+
path.lineTo(x, Curve.valueAt(definition, x - x0));
|
|
74
|
+
}
|
|
75
|
+
path.lineTo(cx1, Curve.valueAt(definition, cx1 - x0));
|
|
76
|
+
}
|
|
77
|
+
prev = next;
|
|
78
|
+
}
|
|
79
|
+
if (notMoved) {
|
|
80
|
+
// we have not moved, so let's draw a straight line from min to max to respect the sole event
|
|
81
|
+
path.moveTo(xMin, valueToY(prev.value));
|
|
82
|
+
path.lineTo(xMax, valueToY(prev.value));
|
|
83
|
+
}
|
|
84
|
+
else if (prev.position < windowMax) {
|
|
85
|
+
// hold value to the window max
|
|
86
|
+
path.lineTo(xMax, valueToY(prev.value));
|
|
87
|
+
}
|
|
88
|
+
const yMin = valueToY(anchor) + devicePixelRatio;
|
|
89
|
+
const style = contentColor;
|
|
90
|
+
context.fillStyle = style;
|
|
91
|
+
context.strokeStyle = style;
|
|
92
|
+
context.beginPath();
|
|
93
|
+
context.stroke(path);
|
|
94
|
+
path.lineTo(xMax, yMin);
|
|
95
|
+
path.lineTo(xMin, yMin);
|
|
96
|
+
path.closePath();
|
|
97
|
+
context.globalAlpha = alphaFill;
|
|
98
|
+
context.fill(path);
|
|
99
|
+
context.globalAlpha = 1.00;
|
|
100
|
+
};
|
|
101
|
+
})(ValueStreamRenderer || (ValueStreamRenderer = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionClipResolver.d.ts","sourceRoot":"","sources":["../../../src/ui/timeline/RegionClipResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,IAAI,EAAE,GAAG,EAAa,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAC,KAAK,EAAmB,IAAI,EAAW,MAAM,kBAAkB,CAAA;AACvE,OAAO,EACH,mBAAmB,EAGnB,eAAe,EAGlB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAE7C,MAAM,MAAM,QAAQ,GAAG;IACnB,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,mBAAmB,CAAA;CAC9B,GAAG;IACA,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;CACZ,GAAG;IACA,IAAI,EAAE,OAAO,CAAA;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AC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC;gBA+B5D,QAAQ,EAAE,sBAAsB,EAAE,MAAM,EAAE,eAAe;IAMrE,OAAO,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAK1C,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI;CA+ErD"}
|
|
@@ -41,30 +41,26 @@ export class RegionClipResolver {
|
|
|
41
41
|
if (array.length === 0) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
let prev = array[0];
|
|
45
|
+
assert(prev.duration > 0, `duration(${prev.duration}) must be positive`);
|
|
46
|
+
for (let i = 1; i < array.length; i++) {
|
|
47
|
+
const next = array[i];
|
|
48
|
+
assert(next.duration > 0, `duration(${next.duration}) must be positive`);
|
|
49
|
+
if (!allowOverlap(prev) && prev.complete > next.position) {
|
|
50
|
+
console.error("[validateTrack] OVERLAP", JSON.stringify({
|
|
51
|
+
track: TrackType[track.type],
|
|
52
|
+
regions: array.map(region => ({
|
|
53
|
+
p: region.position,
|
|
54
|
+
d: region.duration,
|
|
55
|
+
c: region.complete,
|
|
56
|
+
sel: region.isSelected,
|
|
57
|
+
type: region.toString()
|
|
58
|
+
})),
|
|
59
|
+
stack: new Error().stack
|
|
60
|
+
}));
|
|
61
|
+
return;
|
|
54
62
|
}
|
|
55
|
-
|
|
56
|
-
catch (error) {
|
|
57
|
-
console.error("[validateTrack] OVERLAP", JSON.stringify({
|
|
58
|
-
track: TrackType[track.type],
|
|
59
|
-
regions: array.map(region => ({
|
|
60
|
-
p: region.position,
|
|
61
|
-
d: region.duration,
|
|
62
|
-
c: region.complete,
|
|
63
|
-
sel: region.isSelected,
|
|
64
|
-
type: region.toString()
|
|
65
|
-
}))
|
|
66
|
-
}));
|
|
67
|
-
throw error;
|
|
63
|
+
prev = next;
|
|
68
64
|
}
|
|
69
65
|
}
|
|
70
66
|
static createTasksFromMasks(regionIterator, maxComplete, masks, showOrigin) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/studio-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.113",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"test": "vitest run --config vitest.config.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@opendaw/lib-box": "^0.0.
|
|
37
|
-
"@opendaw/lib-dawproject": "^0.0.
|
|
38
|
-
"@opendaw/lib-dom": "^0.0.
|
|
39
|
-
"@opendaw/lib-dsp": "^0.0.
|
|
40
|
-
"@opendaw/lib-fusion": "^0.0.
|
|
41
|
-
"@opendaw/lib-runtime": "^0.0.
|
|
42
|
-
"@opendaw/lib-std": "^0.0.
|
|
36
|
+
"@opendaw/lib-box": "^0.0.75",
|
|
37
|
+
"@opendaw/lib-dawproject": "^0.0.60",
|
|
38
|
+
"@opendaw/lib-dom": "^0.0.75",
|
|
39
|
+
"@opendaw/lib-dsp": "^0.0.74",
|
|
40
|
+
"@opendaw/lib-fusion": "^0.0.80",
|
|
41
|
+
"@opendaw/lib-runtime": "^0.0.71",
|
|
42
|
+
"@opendaw/lib-std": "^0.0.70",
|
|
43
43
|
"@opendaw/nam-wasm": "^1.0.3",
|
|
44
|
-
"@opendaw/studio-adapters": "^0.0.
|
|
45
|
-
"@opendaw/studio-boxes": "^0.0.
|
|
46
|
-
"@opendaw/studio-enums": "^0.0.
|
|
44
|
+
"@opendaw/studio-adapters": "^0.0.91",
|
|
45
|
+
"@opendaw/studio-boxes": "^0.0.78",
|
|
46
|
+
"@opendaw/studio-enums": "^0.0.66",
|
|
47
47
|
"dropbox": "^10.34.0",
|
|
48
48
|
"y-websocket": "^1.4.5",
|
|
49
49
|
"yjs": "^13.6.27",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@ffmpeg/ffmpeg": "^0.12.15",
|
|
58
58
|
"@ffmpeg/util": "^0.12.2",
|
|
59
59
|
"@opendaw/eslint-config": "^0.0.27",
|
|
60
|
-
"@opendaw/studio-core-processors": "^0.0.
|
|
61
|
-
"@opendaw/studio-core-workers": "^0.0.
|
|
62
|
-
"@opendaw/studio-forge-boxes": "^0.0.
|
|
60
|
+
"@opendaw/studio-core-processors": "^0.0.94",
|
|
61
|
+
"@opendaw/studio-core-workers": "^0.0.86",
|
|
62
|
+
"@opendaw/studio-forge-boxes": "^0.0.78",
|
|
63
63
|
"@opendaw/typescript-config": "^0.0.29"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "db95b5ad62412ee3f079fc8cc0767d24e6426320"
|
|
66
66
|
}
|