@opendaw/studio-core 0.0.63 → 0.0.65
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/dawproject/DawProjectImporter.d.ts.map +1 -1
- package/dist/dawproject/DawProjectImporter.js +12 -6
- package/dist/processors.js +14 -14
- package/dist/processors.js.map +4 -4
- package/dist/project/Project.d.ts +2 -1
- package/dist/project/Project.d.ts.map +1 -1
- package/dist/project/Project.js +8 -3
- package/dist/project/ProjectMigration.d.ts +2 -1
- package/dist/project/ProjectMigration.d.ts.map +1 -1
- package/dist/project/ProjectMigration.js +36 -16
- package/dist/project/audio/AudioContentFactory.d.ts +2 -0
- package/dist/project/audio/AudioContentFactory.d.ts.map +1 -1
- package/dist/project/audio/AudioContentFactory.js +4 -4
- package/dist/project/audio/AudioContentHelpers.d.ts +2 -2
- package/dist/project/audio/AudioContentHelpers.d.ts.map +1 -1
- package/dist/project/audio/AudioContentModifier.d.ts +4 -6
- package/dist/project/audio/AudioContentModifier.d.ts.map +1 -1
- package/dist/project/audio/AudioContentModifier.js +6 -6
- package/dist/workers-main.js.map +2 -2
- package/dist/ysync/YService.d.ts.map +1 -1
- package/dist/ysync/YService.js +4 -4
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DawProjectImporter.d.ts","sourceRoot":"","sources":["../../src/dawproject/DawProjectImporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAiBH,IAAI,EAEP,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAcH,aAAa,EAOhB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"DawProjectImporter.d.ts","sourceRoot":"","sources":["../../src/dawproject/DawProjectImporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAiBH,IAAI,EAEP,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAcH,aAAa,EAOhB,MAAM,yBAAyB,CAAA;AAyBhC,OAAO,EAOH,eAAe,EAElB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AAKvC,yBAAiB,gBAAgB,CAAC;IAW9B,KAAY,MAAM,GAAG;QACjB,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,QAAQ,EAAE,eAAe,CAAA;KAC5B,CAAA;IAOM,MAAM,IAAI,GAAU,QAAQ,aAAa,EAAE,WAAW,UAAU,CAAC,gBAAgB,KAAG,OAAO,CAAC,MAAM,CAqYxG,CAAA;CAaJ"}
|
|
@@ -3,10 +3,11 @@ import { BoxGraph } from "@opendaw/lib-box";
|
|
|
3
3
|
import { gainToDb, PPQN } from "@opendaw/lib-dsp";
|
|
4
4
|
import { ChannelRole, ClipsSchema, DeviceRole, EqualizerSchema, LanesSchema, NotesSchema, PointsSchema, SendType, TrackSchema, WarpsSchema } from "@opendaw/lib-dawproject";
|
|
5
5
|
import { AudioSendRouting, AudioUnitType, IconSymbol } from "@opendaw/studio-enums";
|
|
6
|
-
import { AudioBusBox, AudioFileBox, AudioRegionBox, AudioUnitBox, AuxSendBox, BoxIO, CaptureAudioBox, CaptureMidiBox, GrooveShuffleBox, NoteEventBox, NoteEventCollectionBox, NoteRegionBox, RootBox, TimelineBox, TrackBox, UnknownAudioEffectDeviceBox, UnknownMidiEffectDeviceBox, UserInterfaceBox, ValueEventCollectionBox } from "@opendaw/studio-boxes";
|
|
6
|
+
import { AudioBusBox, AudioFileBox, AudioPitchStretchBox, AudioRegionBox, AudioUnitBox, AuxSendBox, BoxIO, CaptureAudioBox, CaptureMidiBox, GrooveShuffleBox, NoteEventBox, NoteEventCollectionBox, NoteRegionBox, RootBox, TimelineBox, TrackBox, UnknownAudioEffectDeviceBox, UnknownMidiEffectDeviceBox, UserInterfaceBox, ValueEventCollectionBox } from "@opendaw/studio-boxes";
|
|
7
7
|
import { AudioUnitOrdering, ColorCodes, DeviceBoxUtils, InstrumentFactories, TrackType } from "@opendaw/studio-adapters";
|
|
8
8
|
import { DeviceIO } from "./DeviceIO";
|
|
9
9
|
import { BuiltinDevices } from "./BuiltinDevices";
|
|
10
|
+
import { AudioContentHelpers } from "../project/audio/AudioContentHelpers";
|
|
10
11
|
export var DawProjectImport;
|
|
11
12
|
(function (DawProjectImport) {
|
|
12
13
|
const readTransport = ({ tempo, timeSignature }, { bpm, signature: { nominator, denominator } }) => {
|
|
@@ -319,20 +320,25 @@ export var DawProjectImport;
|
|
|
319
320
|
box.endInSeconds.setValue(asDefined(audio.duration, "Duration not defined"));
|
|
320
321
|
}));
|
|
321
322
|
audioIdSet.add(uuid, true);
|
|
323
|
+
const position = asDefined(clip.time, "Time not defined");
|
|
324
|
+
const duration = asDefined(clip.duration, "Duration not defined");
|
|
325
|
+
const loopDuration = clip.loopEnd ?? warpDistance;
|
|
326
|
+
const durationInPulses = duration * PPQN.Quarter;
|
|
327
|
+
const loopDurationInPulses = loopDuration * PPQN.Quarter;
|
|
322
328
|
const collectionBox = ValueEventCollectionBox.create(boxGraph, UUID.generate());
|
|
329
|
+
const pitchStretch = AudioPitchStretchBox.create(boxGraph, UUID.generate());
|
|
330
|
+
AudioContentHelpers.addDefaultWarpMarkers(boxGraph, pitchStretch, loopDurationInPulses, audioFileBox.endInSeconds.getValue());
|
|
323
331
|
AudioRegionBox.create(boxGraph, UUID.generate(), box => {
|
|
324
|
-
const position = asDefined(clip.time, "Time not defined");
|
|
325
|
-
const duration = asDefined(clip.duration, "Duration not defined");
|
|
326
|
-
const loopDuration = clip.loopEnd ?? warpDistance;
|
|
327
332
|
box.position.setValue(position * PPQN.Quarter);
|
|
328
|
-
box.duration.setValue(
|
|
333
|
+
box.duration.setValue(durationInPulses);
|
|
329
334
|
box.label.setValue(clip.name ?? "");
|
|
330
335
|
box.loopOffset.setValue(0.0);
|
|
331
|
-
box.loopDuration.setValue(
|
|
336
|
+
box.loopDuration.setValue(loopDurationInPulses);
|
|
332
337
|
box.mute.setValue(clip.enable === false);
|
|
333
338
|
box.regions.refer(trackBox.regions);
|
|
334
339
|
box.file.refer(audioFileBox);
|
|
335
340
|
box.events.refer(collectionBox.owners);
|
|
341
|
+
box.playMode.refer(pitchStretch);
|
|
336
342
|
});
|
|
337
343
|
};
|
|
338
344
|
return Promise.all(arrangement?.lanes?.lanes?.filter(timeline => isInstanceOf(timeline, LanesSchema))
|