@opendaw/studio-core 0.0.17 → 0.0.19
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/Project.d.ts +3 -1
- package/dist/Project.d.ts.map +1 -1
- package/dist/Project.js +17 -2
- package/dist/dawproject/DawProjectExporter.d.ts +8 -0
- package/dist/dawproject/DawProjectExporter.d.ts.map +1 -0
- package/dist/dawproject/DawProjectExporter.js +29 -0
- package/dist/dawproject/DawProjectExporter.test.d.ts +2 -0
- package/dist/dawproject/DawProjectExporter.test.d.ts.map +1 -0
- package/dist/dawproject/DawProjectExporter.test.js +16 -0
- package/dist/dawproject/DawProjectIO.d.ts +20 -0
- package/dist/dawproject/DawProjectIO.d.ts.map +1 -0
- package/dist/dawproject/DawProjectIO.js +31 -0
- package/dist/dawproject/DawProjectImport.test.d.ts +2 -0
- package/dist/dawproject/DawProjectImport.test.d.ts.map +1 -0
- package/dist/dawproject/DawProjectImport.test.js +16 -0
- package/dist/dawproject/DawProjectImporter.d.ts +12 -0
- package/dist/dawproject/DawProjectImporter.d.ts.map +1 -0
- package/dist/dawproject/DawProjectImporter.js +273 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/processors.js +2 -2
- package/dist/processors.js.map +4 -4
- package/dist/workers.js +2 -2
- package/dist/workers.js.map +3 -3
- package/package.json +18 -18
- package/dist/DawProjectIO.d.ts +0 -5
- package/dist/DawProjectIO.d.ts.map +0 -1
- package/dist/DawProjectIO.js +0 -54
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opendaw/studio-core",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.19",
|
4
4
|
"license": "LGPL-3.0-or-later",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -23,26 +23,26 @@
|
|
23
23
|
"scripts": {
|
24
24
|
"build": "tsc",
|
25
25
|
"lint": "eslint \"**/*.ts\"",
|
26
|
-
"test": "
|
26
|
+
"test": "vitest run --config vitest.config.ts"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@opendaw/lib-box": "^0.0.
|
30
|
-
"@opendaw/lib-dawproject": "^0.0.
|
31
|
-
"@opendaw/lib-dom": "^0.0.
|
32
|
-
"@opendaw/lib-dsp": "^0.0.
|
33
|
-
"@opendaw/lib-fusion": "^0.0.
|
34
|
-
"@opendaw/lib-runtime": "^0.0.
|
35
|
-
"@opendaw/lib-std": "^0.0.
|
36
|
-
"@opendaw/studio-adapters": "^0.0.
|
37
|
-
"@opendaw/studio-boxes": "^0.0.
|
38
|
-
"@opendaw/studio-enums": "^0.0.
|
29
|
+
"@opendaw/lib-box": "^0.0.19",
|
30
|
+
"@opendaw/lib-dawproject": "^0.0.5",
|
31
|
+
"@opendaw/lib-dom": "^0.0.19",
|
32
|
+
"@opendaw/lib-dsp": "^0.0.19",
|
33
|
+
"@opendaw/lib-fusion": "^0.0.19",
|
34
|
+
"@opendaw/lib-runtime": "^0.0.19",
|
35
|
+
"@opendaw/lib-std": "^0.0.19",
|
36
|
+
"@opendaw/studio-adapters": "^0.0.19",
|
37
|
+
"@opendaw/studio-boxes": "^0.0.19",
|
38
|
+
"@opendaw/studio-enums": "^0.0.19"
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
|
-
"@opendaw/eslint-config": "^0.0.
|
42
|
-
"@opendaw/studio-core-processors": "^0.0.
|
43
|
-
"@opendaw/studio-core-workers": "^0.0.
|
44
|
-
"@opendaw/studio-forge-boxes": "^0.0.
|
45
|
-
"@opendaw/typescript-config": "^0.0.
|
41
|
+
"@opendaw/eslint-config": "^0.0.18",
|
42
|
+
"@opendaw/studio-core-processors": "^0.0.19",
|
43
|
+
"@opendaw/studio-core-workers": "^0.0.13",
|
44
|
+
"@opendaw/studio-forge-boxes": "^0.0.19",
|
45
|
+
"@opendaw/typescript-config": "^0.0.19"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "8d9e873aad633820cd26f76dc447674728401495"
|
48
48
|
}
|
package/dist/DawProjectIO.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DawProjectIO.d.ts","sourceRoot":"","sources":["../src/DawProjectIO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAgBjC,yBAAiB,YAAY,CAAC;IACnB,MAAM,MAAM,GAAI,0BAAwB,OAAO,KAAG,MAqCxD,CAAA;CAYJ"}
|
package/dist/DawProjectIO.js
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
import { IndexedBox } from "@opendaw/lib-box";
|
2
|
-
import { AudioUnitBox, TrackBox } from "@opendaw/studio-boxes";
|
3
|
-
import { Xml } from "@opendaw/lib-xml";
|
4
|
-
import { ApplicationSchema, BooleanParameterSchema, ChannelSchema, ProjectSchema, RealParameterSchema, TimeSignatureParameterSchema, TrackSchema, TransportSchema, Unit } from "@opendaw/lib-dawproject";
|
5
|
-
export var DawProjectIO;
|
6
|
-
(function (DawProjectIO) {
|
7
|
-
DawProjectIO.encode = ({ rootBox, timelineBox }) => {
|
8
|
-
const trackBoxes = IndexedBox.collectIndexedBoxes(rootBox.audioUnits, AudioUnitBox)
|
9
|
-
.flatMap(audioUnitBox => IndexedBox.collectIndexedBoxes(audioUnitBox.tracks, TrackBox));
|
10
|
-
const rootNode = Xml.element({
|
11
|
-
version: "1.0",
|
12
|
-
application: Xml.element({
|
13
|
-
name: "openDAW",
|
14
|
-
version: "0.1"
|
15
|
-
}, ApplicationSchema),
|
16
|
-
transport: createTransport(timelineBox),
|
17
|
-
structure: [
|
18
|
-
Xml.element({
|
19
|
-
id: "0",
|
20
|
-
contentType: "notes",
|
21
|
-
channel: Xml.element({
|
22
|
-
audioChannels: 2,
|
23
|
-
mute: Xml.element({ value: true }, BooleanParameterSchema)
|
24
|
-
}, ChannelSchema),
|
25
|
-
tracks: [
|
26
|
-
Xml.element({
|
27
|
-
id: "01",
|
28
|
-
contentType: "audio"
|
29
|
-
}, TrackSchema),
|
30
|
-
Xml.element({
|
31
|
-
id: "02",
|
32
|
-
contentType: "audio"
|
33
|
-
}, TrackSchema)
|
34
|
-
]
|
35
|
-
}, TrackSchema),
|
36
|
-
Xml.element({
|
37
|
-
id: "1",
|
38
|
-
contentType: "audio"
|
39
|
-
}, TrackSchema)
|
40
|
-
]
|
41
|
-
}, ProjectSchema);
|
42
|
-
return Xml.pretty(Xml.toElement("Project", rootNode));
|
43
|
-
};
|
44
|
-
const createTransport = (timelineBox) => Xml.element({
|
45
|
-
tempo: Xml.element({
|
46
|
-
unit: Unit.BPM,
|
47
|
-
value: timelineBox.bpm.getValue()
|
48
|
-
}, RealParameterSchema),
|
49
|
-
timeSignature: Xml.element({
|
50
|
-
nominator: timelineBox.signature.nominator.getValue(),
|
51
|
-
denominator: timelineBox.signature.denominator.getValue()
|
52
|
-
}, TimeSignatureParameterSchema)
|
53
|
-
}, TransportSchema);
|
54
|
-
})(DawProjectIO || (DawProjectIO = {}));
|