@opendaw/studio-core 0.0.108 → 0.0.110
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/processors.js +8 -8
- package/dist/processors.js.map +3 -3
- package/dist/project/audio/AudioContentModifier.d.ts.map +1 -1
- package/dist/project/audio/AudioContentModifier.js +4 -2
- package/dist/project/audio/AudioFileBoxFactory.d.ts.map +1 -1
- package/dist/project/audio/AudioFileBoxFactory.js +11 -3
- package/dist/ui/timeline/RegionClipResolver.js +1 -1
- package/dist/ui/timeline/RegionOverlapResolver.d.ts +1 -9
- package/dist/ui/timeline/RegionOverlapResolver.d.ts.map +1 -1
- package/dist/ui/timeline/RegionOverlapResolver.js +21 -9
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioContentModifier.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioContentModifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,
|
|
1
|
+
{"version":3,"file":"AudioContentModifier.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioContentModifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAiD,MAAM,kBAAkB,CAAA;AAShG,OAAO,EAAC,sBAAsB,EAAwB,MAAM,0BAA0B,CAAA;AAKtF,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,cAAc,GAAU,UAAU,aAAa,CAAC,sBAAsB,CAAC,KAAG,OAAO,CAAC,IAAI,CAalG,CAAA;IAEM,MAAM,cAAc,GAAU,UAAU,aAAa,CAAC,sBAAsB,CAAC,KAAG,OAAO,CAAC,IAAI,CA4BlG,CAAA;IAEM,MAAM,aAAa,GAAU,UAAU,aAAa,CAAC,sBAAsB,CAAC,KAAG,OAAO,CAAC,IAAI,CA8CjG,CAAA;CA2BJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmptyExec, isDefined, isInstanceOf, UUID } from "@opendaw/lib-std";
|
|
1
|
+
import { EmptyExec, isDefined, isInstanceOf, RuntimeNotifier, UUID } from "@opendaw/lib-std";
|
|
2
2
|
import { TimeBase } from "@opendaw/lib-dsp";
|
|
3
3
|
import { AudioPitchStretchBox, AudioTimeStretchBox, TransientMarkerBox, WarpMarkerBox } from "@opendaw/studio-boxes";
|
|
4
4
|
import { AudioRegionBoxAdapter } from "@opendaw/studio-adapters";
|
|
@@ -65,6 +65,7 @@ export var AudioContentModifier;
|
|
|
65
65
|
if (audioAdapters.length === 0) {
|
|
66
66
|
return EmptyExec;
|
|
67
67
|
}
|
|
68
|
+
const handler = RuntimeNotifier.progress({ headline: "Detecting Transients..." });
|
|
68
69
|
const tasks = await Promise.all(audioAdapters.map(async (adapter) => {
|
|
69
70
|
if (adapter.file.transients.length() === 0) {
|
|
70
71
|
return {
|
|
@@ -74,6 +75,7 @@ export var AudioContentModifier;
|
|
|
74
75
|
}
|
|
75
76
|
return { adapter };
|
|
76
77
|
}));
|
|
78
|
+
handler.terminate();
|
|
77
79
|
return () => tasks.forEach(({ adapter, transients }) => {
|
|
78
80
|
const optPitchStretch = adapter.asPlayModePitchStretch;
|
|
79
81
|
const boxGraph = adapter.box.graph;
|
|
@@ -99,7 +101,7 @@ export var AudioContentModifier;
|
|
|
99
101
|
else {
|
|
100
102
|
AudioContentHelpers.addDefaultWarpMarkers(boxGraph, timeStretch, adapter.duration, adapter.file.endInSeconds);
|
|
101
103
|
}
|
|
102
|
-
if (isDefined(transients)) {
|
|
104
|
+
if (isDefined(transients) && adapter.file.transients.length() === 0) {
|
|
103
105
|
const markersField = adapter.file.box.transientMarkers;
|
|
104
106
|
transients.forEach(position => TransientMarkerBox.create(boxGraph, UUID.generate(), box => {
|
|
105
107
|
box.owner.refer(markersField);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioFileBoxFactory.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioFileBoxFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAqB,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAS,QAAQ,
|
|
1
|
+
{"version":3,"file":"AudioFileBoxFactory.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioFileBoxFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAqB,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAS,QAAQ,EAAmB,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAA;AAC7D,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEzC,yBAAiB,mBAAmB,CAAC;IAO1B,MAAM,cAAc,GAAU,mBAAmB,iBAAiB,EACpC,UAAU,QAAQ,EAClB,WAAW,SAAS,EACpB,MAAM,IAAI,CAAC,KAAK,EAChB,MAAM,MAAM,KAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAsCjF,CAAA;CACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AudioFileBox, TransientMarkerBox } from "@opendaw/studio-boxes";
|
|
2
|
-
import { UUID } from "@opendaw/lib-std";
|
|
2
|
+
import { RuntimeNotifier, UUID } from "@opendaw/lib-std";
|
|
3
3
|
export var AudioFileBoxFactory;
|
|
4
4
|
(function (AudioFileBoxFactory) {
|
|
5
5
|
const applyTransients = (audioFileBox, transients) => transients.forEach(position => TransientMarkerBox.create(audioFileBox.graph, UUID.generate(), box => {
|
|
@@ -11,9 +11,13 @@ export var AudioFileBoxFactory;
|
|
|
11
11
|
if (optAudioFileBox.nonEmpty()) {
|
|
12
12
|
const audioFileBox = optAudioFileBox.unwrap();
|
|
13
13
|
if (audioFileBox.transientMarkers.pointerHub.isEmpty()) {
|
|
14
|
+
const handler = RuntimeNotifier.progress({ headline: "Detecting Transients..." });
|
|
14
15
|
const transients = await transientProtocol.detect(audioData);
|
|
16
|
+
handler.terminate();
|
|
15
17
|
return () => {
|
|
16
|
-
|
|
18
|
+
if (audioFileBox.transientMarkers.pointerHub.isEmpty()) {
|
|
19
|
+
applyTransients(audioFileBox, transients);
|
|
20
|
+
}
|
|
17
21
|
return audioFileBox;
|
|
18
22
|
};
|
|
19
23
|
}
|
|
@@ -26,7 +30,11 @@ export var AudioFileBoxFactory;
|
|
|
26
30
|
// Re-check in case another drop created it between createModifier and now
|
|
27
31
|
const existingBox = boxGraph.findBox(uuid);
|
|
28
32
|
if (existingBox.nonEmpty()) {
|
|
29
|
-
|
|
33
|
+
const box = existingBox.unwrap();
|
|
34
|
+
if (box.transientMarkers.pointerHub.isEmpty()) {
|
|
35
|
+
applyTransients(box, transients);
|
|
36
|
+
}
|
|
37
|
+
return box;
|
|
30
38
|
}
|
|
31
39
|
const audioFileBox = AudioFileBox.create(boxGraph, uuid, box => {
|
|
32
40
|
box.fileName.setValue(name);
|
|
@@ -8,15 +8,7 @@ import { TrackResolver } from "./TrackResolver";
|
|
|
8
8
|
export declare class RegionOverlapResolver {
|
|
9
9
|
#private;
|
|
10
10
|
constructor(editing: BoxEditing, projectApi: ProjectApi, boxAdapters: BoxAdapters);
|
|
11
|
-
|
|
12
|
-
* For selection-based operations (move, resize, copy).
|
|
13
|
-
* @param tracks - The tracks involved in the operation
|
|
14
|
-
* @param adapters - The region adapters being modified
|
|
15
|
-
* @param strategy - The modify strategy (determines if it's a copy, etc.)
|
|
16
|
-
* @param deltaIndex - Track index delta (for cross-track moves)
|
|
17
|
-
* @param changes - Callback that performs the actual changes. Receives a TrackResolver
|
|
18
|
-
* that should be used to determine target tracks for copies.
|
|
19
|
-
*/
|
|
11
|
+
static warnOverlaps(label: string, tracks: ReadonlyArray<TrackBoxAdapter>): void;
|
|
20
12
|
apply(tracks: ReadonlyArray<TrackBoxAdapter>, adapters: ReadonlyArray<AnyRegionBoxAdapter>, strategy: RegionModifyStrategies, deltaIndex: int, changes: (trackResolver: TrackResolver) => void): void;
|
|
21
13
|
/**
|
|
22
14
|
* For range-based operations (drop, duplicate).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionOverlapResolver.d.ts","sourceRoot":"","sources":["../../../src/ui/timeline/RegionOverlapResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAC,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAA;AAC1F,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAK/D,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAE7C,qBAAa,qBAAqB;;gBAKlB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW;IAMjF
|
|
1
|
+
{"version":3,"file":"RegionOverlapResolver.d.ts","sourceRoot":"","sources":["../../../src/ui/timeline/RegionOverlapResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAC,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAA;AAC1F,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAK/D,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAE7C,qBAAa,qBAAqB;;gBAKlB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW;IAMjF,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,IAAI;IAmBhF,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,EACtC,QAAQ,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC5C,QAAQ,EAAE,sBAAsB,EAChC,UAAU,EAAE,GAAG,EACf,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI;IA8B5D;;;OAGG;IACH,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,eAAe;IAS3F;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI;CAe1E"}
|
|
@@ -11,16 +11,26 @@ export class RegionOverlapResolver {
|
|
|
11
11
|
this.#projectApi = projectApi;
|
|
12
12
|
this.#boxAdapters = boxAdapters;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
static warnOverlaps(label, tracks) {
|
|
15
|
+
for (const track of tracks) {
|
|
16
|
+
const regions = track.regions.collection.asArray();
|
|
17
|
+
for (let i = 1; i < regions.length; i++) {
|
|
18
|
+
const prev = regions[i - 1];
|
|
19
|
+
const next = regions[i];
|
|
20
|
+
if (prev.complete > next.position) {
|
|
21
|
+
console.warn(`[RegionOverlapResolver] ${label}`, {
|
|
22
|
+
track: track.listIndex,
|
|
23
|
+
prev: { p: prev.position, d: prev.duration, c: prev.complete, sel: prev.isSelected, type: prev.toString() },
|
|
24
|
+
next: { p: next.position, d: next.duration, c: next.complete, sel: next.isSelected, type: next.toString() },
|
|
25
|
+
allRegions: regions.map(region => ({ p: region.position, d: region.duration, c: region.complete, sel: region.isSelected })),
|
|
26
|
+
stack: new Error().stack
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
23
32
|
apply(tracks, adapters, strategy, deltaIndex, changes) {
|
|
33
|
+
RegionOverlapResolver.warnOverlaps("Overlap BEFORE apply", tracks);
|
|
24
34
|
const behaviour = StudioPreferences.settings.editing["overlapping-regions-behaviour"];
|
|
25
35
|
if (behaviour === "clip") {
|
|
26
36
|
const { postProcess, trackResolver } = RegionClipResolver.fromSelection(tracks, adapters, strategy, deltaIndex);
|
|
@@ -36,6 +46,7 @@ export class RegionOverlapResolver {
|
|
|
36
46
|
changes(trackResolver);
|
|
37
47
|
postProcess();
|
|
38
48
|
});
|
|
49
|
+
RegionOverlapResolver.warnOverlaps("Overlap AFTER apply (push-existing)", tracks);
|
|
39
50
|
}
|
|
40
51
|
else {
|
|
41
52
|
// keep-existing
|
|
@@ -44,6 +55,7 @@ export class RegionOverlapResolver {
|
|
|
44
55
|
changes(trackResolver);
|
|
45
56
|
postProcess();
|
|
46
57
|
});
|
|
58
|
+
RegionOverlapResolver.warnOverlaps("Overlap AFTER apply (keep-existing)", tracks);
|
|
47
59
|
}
|
|
48
60
|
}
|
|
49
61
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/studio-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.110",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@opendaw/lib-runtime": "^0.0.70",
|
|
42
42
|
"@opendaw/lib-std": "^0.0.69",
|
|
43
43
|
"@opendaw/nam-wasm": "^1.0.3",
|
|
44
|
-
"@opendaw/studio-adapters": "^0.0.
|
|
44
|
+
"@opendaw/studio-adapters": "^0.0.88",
|
|
45
45
|
"@opendaw/studio-boxes": "^0.0.76",
|
|
46
46
|
"@opendaw/studio-enums": "^0.0.64",
|
|
47
47
|
"dropbox": "^10.34.0",
|
|
@@ -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.
|
|
60
|
+
"@opendaw/studio-core-processors": "^0.0.91",
|
|
61
|
+
"@opendaw/studio-core-workers": "^0.0.83",
|
|
62
62
|
"@opendaw/studio-forge-boxes": "^0.0.76",
|
|
63
63
|
"@opendaw/typescript-config": "^0.0.29"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "d57cb3527c3cc9f4b17867cd214454a7349496a7"
|
|
66
66
|
}
|