@opendaw/studio-core 0.0.96 → 0.0.98
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordAudio.d.ts","sourceRoot":"","sources":["../../src/capture/RecordAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,UAAU,
|
|
1
|
+
{"version":3,"file":"RecordAudio.d.ts","sourceRoot":"","sources":["../../src/capture/RecordAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,UAAU,EAA6B,MAAM,kBAAkB,CAAA;AAGjH,OAAO,EAAa,mBAAmB,EAA2B,MAAM,0BAA0B,CAAA;AAClG,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAGjC,yBAAiB,WAAW,CAAC;IACzB,KAAK,kBAAkB,GAAG;QACtB,gBAAgB,EAAE,gBAAgB,CAAA;QAClC,UAAU,EAAE,SAAS,CAAA;QACrB,aAAa,EAAE,mBAAmB,CAAA;QAClC,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,OAAO,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;KACxB,CAAA;IAOD,MAAM,CAAC,MAAM,KAAK,GACd,kFAAgF,kBAAkB,KAChG,UAkJL,CAAA;;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { asInstanceOf, Option, quantizeFloor, Terminable, Terminator, UUID } from "@opendaw/lib-std";
|
|
1
|
+
import { asInstanceOf, Option, quantizeFloor, Terminable, Terminator, tryCatch, UUID } from "@opendaw/lib-std";
|
|
2
2
|
import { PPQN, TimeBase } from "@opendaw/lib-dsp";
|
|
3
|
-
import { AudioFileBox,
|
|
3
|
+
import { AudioFileBox, AudioRegionBox, TrackBox, ValueEventCollectionBox } from "@opendaw/studio-boxes";
|
|
4
4
|
import { ColorCodes, TrackType, UnionBoxTypes } from "@opendaw/studio-adapters";
|
|
5
5
|
import { RecordTrack } from "./RecordTrack";
|
|
6
6
|
export var RecordAudio;
|
|
@@ -16,7 +16,7 @@ export var RecordAudio;
|
|
|
16
16
|
let lastPosition = 0;
|
|
17
17
|
let currentWaveformOffset = outputLatency;
|
|
18
18
|
let takeNumber = 0;
|
|
19
|
-
const {
|
|
19
|
+
const { env: { audioContext: { sampleRate } }, engine: { preferences: { settings: { recording } } } } = project;
|
|
20
20
|
const { loopArea } = timelineBox;
|
|
21
21
|
const createFileBox = () => {
|
|
22
22
|
const fileDateString = new Date()
|
|
@@ -32,32 +32,25 @@ export var RecordAudio;
|
|
|
32
32
|
takeNumber++;
|
|
33
33
|
const trackBox = RecordTrack.findOrCreate(editing, capture.audioUnitBox, TrackType.Audio, forceNewTrack);
|
|
34
34
|
const collectionBox = ValueEventCollectionBox.create(boxGraph, UUID.generate());
|
|
35
|
-
const stretchBox = AudioPitchStretchBox.create(boxGraph, UUID.generate());
|
|
36
|
-
WarpMarkerBox.create(boxGraph, UUID.generate(), box => box.owner.refer(stretchBox.warpMarkers));
|
|
37
|
-
const warpMarkerBox = WarpMarkerBox.create(boxGraph, UUID.generate(), box => box.owner.refer(stretchBox.warpMarkers));
|
|
38
35
|
const regionBox = AudioRegionBox.create(boxGraph, UUID.generate(), box => {
|
|
39
36
|
box.file.refer(fileBox.unwrap());
|
|
40
37
|
box.events.refer(collectionBox.owners);
|
|
41
38
|
box.regions.refer(trackBox.regions);
|
|
42
39
|
box.position.setValue(position);
|
|
43
40
|
box.hue.setValue(ColorCodes.forTrackType(TrackType.Audio));
|
|
44
|
-
box.timeBase.setValue(TimeBase.
|
|
41
|
+
box.timeBase.setValue(TimeBase.Seconds);
|
|
45
42
|
box.label.setValue(`Take ${takeNumber}`);
|
|
46
|
-
box.playMode.refer(stretchBox);
|
|
47
43
|
box.waveformOffset.setValue(waveformOffset);
|
|
48
44
|
});
|
|
49
45
|
capture.addRecordedRegion(regionBox);
|
|
50
46
|
project.selection.select(regionBox);
|
|
51
|
-
return { trackBox, regionBox
|
|
47
|
+
return { trackBox, regionBox };
|
|
52
48
|
};
|
|
53
|
-
const finalizeTake = (take,
|
|
54
|
-
const { trackBox, regionBox
|
|
49
|
+
const finalizeTake = (take, durationInSeconds) => {
|
|
50
|
+
const { trackBox, regionBox } = take;
|
|
55
51
|
if (regionBox.isAttached()) {
|
|
56
|
-
regionBox.duration.setValue(
|
|
57
|
-
regionBox.loopDuration.setValue(
|
|
58
|
-
const seconds = tempoMap.intervalToSeconds(0, loopDurationPPQN);
|
|
59
|
-
warpMarkerBox.position.setValue(loopDurationPPQN);
|
|
60
|
-
warpMarkerBox.seconds.setValue(seconds);
|
|
52
|
+
regionBox.duration.setValue(durationInSeconds);
|
|
53
|
+
regionBox.loopDuration.setValue(durationInSeconds);
|
|
61
54
|
}
|
|
62
55
|
const { olderTakeAction, olderTakeScope } = recording;
|
|
63
56
|
if (olderTakeScope === "all") {
|
|
@@ -102,7 +95,7 @@ export var RecordAudio;
|
|
|
102
95
|
currentTake = Option.wrap(createTakeRegion(position, currentWaveformOffset, true));
|
|
103
96
|
};
|
|
104
97
|
terminator.ownAll(Terminable.create(() => {
|
|
105
|
-
sourceNode.disconnect(recordingWorklet);
|
|
98
|
+
tryCatch(() => sourceNode.disconnect(recordingWorklet));
|
|
106
99
|
if (recordingWorklet.numberOfFrames === 0 || fileBox.isEmpty()) {
|
|
107
100
|
console.debug("Abort recording audio.");
|
|
108
101
|
sampleManager.remove(originalUuid);
|
|
@@ -110,7 +103,7 @@ export var RecordAudio;
|
|
|
110
103
|
}
|
|
111
104
|
else {
|
|
112
105
|
currentTake.ifSome(({ regionBox: { duration } }) => {
|
|
113
|
-
recordingWorklet.limit(Math.ceil((currentWaveformOffset +
|
|
106
|
+
recordingWorklet.limit(Math.ceil((currentWaveformOffset + duration.getValue()) * sampleRate));
|
|
114
107
|
});
|
|
115
108
|
fileBox.ifSome(fb => fb.endInSeconds.setValue(recordingWorklet.numberOfFrames / sampleRate));
|
|
116
109
|
}
|
|
@@ -121,14 +114,13 @@ export var RecordAudio;
|
|
|
121
114
|
const currentPosition = owner.getValue();
|
|
122
115
|
const loopEnabled = loopArea.enabled.getValue();
|
|
123
116
|
const loopFrom = loopArea.from.getValue();
|
|
124
|
-
const loopTo = loopArea.to.getValue();
|
|
125
117
|
const allowTakes = project.engine.preferences.settings.recording.allowTakes;
|
|
126
118
|
if (loopEnabled && allowTakes && currentTake.nonEmpty() && currentPosition < lastPosition) {
|
|
127
119
|
editing.modify(() => {
|
|
128
120
|
currentTake.ifSome(take => {
|
|
129
|
-
const
|
|
130
|
-
finalizeTake(take,
|
|
131
|
-
currentWaveformOffset +=
|
|
121
|
+
const actualDurationInSeconds = take.regionBox.duration.getValue();
|
|
122
|
+
finalizeTake(take, actualDurationInSeconds);
|
|
123
|
+
currentWaveformOffset += actualDurationInSeconds;
|
|
132
124
|
});
|
|
133
125
|
startNewTake(loopFrom);
|
|
134
126
|
}, false);
|
|
@@ -142,20 +134,16 @@ export var RecordAudio;
|
|
|
142
134
|
currentTake = Option.wrap(createTakeRegion(position, currentWaveformOffset, false));
|
|
143
135
|
}, false);
|
|
144
136
|
}
|
|
145
|
-
currentTake.ifSome(({ regionBox
|
|
137
|
+
currentTake.ifSome(({ regionBox }) => {
|
|
146
138
|
editing.modify(() => {
|
|
147
139
|
if (regionBox.isAttached()) {
|
|
148
140
|
const { duration, loopDuration } = regionBox;
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
duration.setValue(
|
|
152
|
-
loopDuration.setValue(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const totalSamples = Math.ceil((currentWaveformOffset + seconds) * sampleRate);
|
|
156
|
-
recordingWorklet.setFillLength(totalSamples);
|
|
157
|
-
fileBox.ifSome(fb => fb.endInSeconds.setValue(totalSamples / sampleRate));
|
|
158
|
-
warpMarkerBox.seconds.setValue(seconds);
|
|
141
|
+
const totalSeconds = recordingWorklet.numberOfFrames / sampleRate;
|
|
142
|
+
const takeSeconds = totalSeconds - currentWaveformOffset;
|
|
143
|
+
duration.setValue(takeSeconds);
|
|
144
|
+
loopDuration.setValue(takeSeconds);
|
|
145
|
+
recordingWorklet.setFillLength(recordingWorklet.numberOfFrames);
|
|
146
|
+
fileBox.ifSome(fb => fb.endInSeconds.setValue(totalSeconds));
|
|
159
147
|
}
|
|
160
148
|
else {
|
|
161
149
|
terminator.terminate();
|
|
@@ -3,7 +3,7 @@ import { ppqn } from "@opendaw/lib-dsp";
|
|
|
3
3
|
import { Field, PointerField } from "@opendaw/lib-box";
|
|
4
4
|
import { Pointers } from "@opendaw/studio-enums";
|
|
5
5
|
import { AudioClipBox, AudioRegionBox, AudioUnitBox, NoteClipBox, NoteEventBox, NoteEventCollectionBox, NoteRegionBox, TrackBox, ValueClipBox, ValueRegionBox } from "@opendaw/studio-boxes";
|
|
6
|
-
import { AudioUnitBoxAdapter, EffectPointerType, IndexedAdapterCollectionListener, InstrumentBox, InstrumentFactory, InstrumentOptions, InstrumentProduct } from "@opendaw/studio-adapters";
|
|
6
|
+
import { AnyRegionBoxAdapter, AudioUnitBoxAdapter, EffectPointerType, IndexedAdapterCollectionListener, InstrumentBox, InstrumentFactory, InstrumentOptions, InstrumentProduct } from "@opendaw/studio-adapters";
|
|
7
7
|
import { Project } from "./Project";
|
|
8
8
|
import { EffectFactory } from "../EffectFactory";
|
|
9
9
|
import { EffectBox } from "../EffectBox";
|
|
@@ -59,6 +59,7 @@ export declare class ProjectApi {
|
|
|
59
59
|
createNotStretchedClip(props: AudioContentFactory.NotStretchedProps & AudioContentFactory.Clip): AudioClipBox;
|
|
60
60
|
createNotStretchedRegion(props: AudioContentFactory.NotStretchedProps & AudioContentFactory.Region): AudioRegionBox;
|
|
61
61
|
createNoteClip(trackBox: TrackBox, clipIndex: int, { name, hue }?: ClipRegionOptions): NoteClipBox;
|
|
62
|
+
duplicateRegion<R extends AnyRegionBoxAdapter>(region: R): R;
|
|
62
63
|
quantiseNotes(collection: NoteEventCollectionBox, { positionQuantisation, durationQuantisation }: QuantiseNotesOptions): void;
|
|
63
64
|
createValueClip(trackBox: TrackBox, clipIndex: int, { name, hue }?: ClipRegionOptions): ValueClipBox;
|
|
64
65
|
createNoteRegion({ trackBox, position, duration, loopOffset, loopDuration, eventOffset, eventCollection, mute, name, hue }: NoteRegionParams): NoteRegionBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectApi.d.ts","sourceRoot":"","sources":["../../src/project/ProjectApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,OAAO,EAGP,KAAK,EACL,GAAG,EAIH,QAAQ,EACR,MAAM,EAIN,YAAY,EAEf,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,IAAI,EAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAW,KAAK,EAAc,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAgB,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EACH,YAAY,EACZ,cAAc,EACd,YAAY,EAGZ,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,QAAQ,EACR,YAAY,EAEZ,cAAc,EACjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,mBAAmB,EAInB,iBAAiB,EACjB,gCAAgC,EAChC,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAGpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"ProjectApi.d.ts","sourceRoot":"","sources":["../../src/project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C,GAAG,CAAC;IAO5D,aAAa,CAAC,UAAU,EAAE,sBAAsB,EAClC,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,EAAE,oBAAoB,GAAG,IAAI;IAoBvF,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,GAAE,iBAAsB,GAAG,YAAY;IAgBtG,gBAAgB,CAAC,EACI,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EACtD,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAChD,EAAE,gBAAgB,GAAG,aAAa;IAoBpD,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,GAAE,iBAAsB;IAkCzG,eAAe,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAC,EAAE,eAAe,GAAG,YAAY;IAe1G,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;CA+BpD"}
|
|
@@ -5,6 +5,7 @@ import { AudioUnitType } from "@opendaw/studio-enums";
|
|
|
5
5
|
import { AudioUnitBox, CaptureAudioBox, CaptureMidiBox, NoteClipBox, NoteEventBox, NoteEventCollectionBox, NoteRegionBox, TrackBox, ValueClipBox, ValueEventCollectionBox, ValueRegionBox } from "@opendaw/studio-boxes";
|
|
6
6
|
import { AudioUnitFactory, ColorCodes, ProjectQueries, TrackType } from "@opendaw/studio-adapters";
|
|
7
7
|
import { AudioContentFactory } from "./audio";
|
|
8
|
+
import { RegionClipResolver } from "../ui";
|
|
8
9
|
// noinspection JSUnusedGlobalSymbols
|
|
9
10
|
export class ProjectApi {
|
|
10
11
|
#project;
|
|
@@ -109,6 +110,12 @@ export class ProjectApi {
|
|
|
109
110
|
box.events.refer(events.owners);
|
|
110
111
|
});
|
|
111
112
|
}
|
|
113
|
+
duplicateRegion(region) {
|
|
114
|
+
const clearFrom = region.position + region.duration;
|
|
115
|
+
const clearTo = region.complete + region.duration;
|
|
116
|
+
RegionClipResolver.fromRange(region.trackBoxAdapter.unwrap("Region is invalid"), clearFrom, clearTo)();
|
|
117
|
+
return region.copyTo({ position: region.complete, consolidate: true });
|
|
118
|
+
}
|
|
112
119
|
quantiseNotes(collection, { positionQuantisation, durationQuantisation }) {
|
|
113
120
|
if (isAbsent(positionQuantisation) && isAbsent(durationQuantisation)) {
|
|
114
121
|
console.warn("Nothing to quantise: both quantisation parameters are absent");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/studio-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.98",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"@opendaw/studio-forge-boxes": "^0.0.70",
|
|
62
62
|
"@opendaw/typescript-config": "^0.0.28"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e4f70170c5947610932306da94e7f0bb817e43b3"
|
|
65
65
|
}
|