@opendaw/studio-core 0.0.70 → 0.0.71
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.
|
@@ -11,6 +11,7 @@ export declare namespace AudioContentFactory {
|
|
|
11
11
|
targetTrack: TrackBox;
|
|
12
12
|
audioFileBox: AudioFileBox;
|
|
13
13
|
sample: Sample;
|
|
14
|
+
duration?: ppqn | number;
|
|
14
15
|
warpMarkers?: ReadonlyArray<WarpMarkerTemplate>;
|
|
15
16
|
waveformOffset?: number;
|
|
16
17
|
gainInDb?: number;
|
|
@@ -20,7 +21,6 @@ export declare namespace AudioContentFactory {
|
|
|
20
21
|
};
|
|
21
22
|
type Region = Props & {
|
|
22
23
|
position: ppqn;
|
|
23
|
-
duration?: ppqn;
|
|
24
24
|
name?: string;
|
|
25
25
|
};
|
|
26
26
|
type TimeStretchedProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioContentFactory.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioContentFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAiB,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAa,MAAM,EAAY,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAC,GAAG,EAAwC,MAAM,kBAAkB,CAAA;AAC3E,OAAO,EACH,YAAY,EACZ,YAAY,EAEZ,cAAc,EAEd,QAAQ,EAEX,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AAEvD,yBAAiB,mBAAmB,CAAC;IACjC,KAAY,KAAK,GAAG;QAChB,QAAQ,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"AudioContentFactory.d.ts","sourceRoot":"","sources":["../../../src/project/audio/AudioContentF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M,yBAAyB,GAAI,OAAO,kBAAkB,GAAG,MAAM,KAAG,cAM9E,CAAA;IAEM,MAAM,0BAA0B,GAAI,OAAO,mBAAmB,GAAG,MAAM,KAAG,cAEhF,CAAA;IAEM,MAAM,wBAAwB,GAAI,OAAO,iBAAiB,GAAG,MAAM,KAAG,cAgB5E,CAAA;IAIM,MAAM,uBAAuB,GAAI,OAAO,kBAAkB,GAAG,IAAI,KAAG,YAM1E,CAAA;IAEM,MAAM,wBAAwB,GAAI,OAAO,mBAAmB,GAAG,IAAI,KAAG,YAG5E,CAAA;IAEM,MAAM,sBAAsB,GAAI,OAAO,iBAAiB,GAAG,IAAI,KAAG,YAcxE,CAAA;CA6DJ"}
|
|
@@ -68,7 +68,7 @@ export var AudioContentFactory;
|
|
|
68
68
|
return panic("Cannot create audio-region on non-audio track");
|
|
69
69
|
}
|
|
70
70
|
const { name, duration: durationInSeconds, bpm } = sample;
|
|
71
|
-
const durationInPPQN = quantizeRound(PPQN.secondsToPulses(durationInSeconds, bpm), PPQN.SemiQuaver);
|
|
71
|
+
const durationInPPQN = props.duration ?? quantizeRound(PPQN.secondsToPulses(durationInSeconds, bpm), PPQN.SemiQuaver);
|
|
72
72
|
if (isDefined(props.warpMarkers)) {
|
|
73
73
|
AudioContentHelpers.addWarpMarkers(boxGraph, playMode, props.warpMarkers);
|
|
74
74
|
}
|
|
@@ -78,7 +78,7 @@ export var AudioContentFactory;
|
|
|
78
78
|
const collectionBox = ValueEventCollectionBox.create(boxGraph, UUID.generate());
|
|
79
79
|
return AudioRegionBox.create(boxGraph, UUID.generate(), box => {
|
|
80
80
|
box.position.setValue(position);
|
|
81
|
-
box.duration.setValue(
|
|
81
|
+
box.duration.setValue(durationInPPQN);
|
|
82
82
|
box.loopDuration.setValue(durationInPPQN);
|
|
83
83
|
box.regions.refer(targetTrack.regions);
|
|
84
84
|
box.waveformOffset.setValue(props.waveformOffset ?? 0.0);
|
|
@@ -97,7 +97,7 @@ export var AudioContentFactory;
|
|
|
97
97
|
return panic("Cannot create audio-region on non-audio track");
|
|
98
98
|
}
|
|
99
99
|
const { name, duration: durationInSeconds, bpm } = sample;
|
|
100
|
-
const durationInPPQN = quantizeRound(PPQN.secondsToPulses(durationInSeconds, bpm), PPQN.SemiQuaver);
|
|
100
|
+
const durationInPPQN = props.duration ?? quantizeRound(PPQN.secondsToPulses(durationInSeconds, bpm), PPQN.SemiQuaver);
|
|
101
101
|
if (isDefined(props.warpMarkers)) {
|
|
102
102
|
AudioContentHelpers.addWarpMarkers(boxGraph, playMode, props.warpMarkers);
|
|
103
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/studio-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"@opendaw/studio-forge-boxes": "^0.0.56",
|
|
60
60
|
"@opendaw/typescript-config": "^0.0.22"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a0b81560a705608a348e969dcc5c1a13a90d888b"
|
|
63
63
|
}
|