@opendaw/studio-adapters 0.0.48 → 0.0.49
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/AutomatableParameterFieldAdapter.js +86 -73
- package/dist/BoxAdapterCollection.js +30 -17
- package/dist/BoxAdapters.d.ts.map +1 -1
- package/dist/BoxAdapters.js +87 -72
- package/dist/BoxAdaptersContext.d.ts +2 -2
- package/dist/BoxAdaptersContext.d.ts.map +1 -1
- package/dist/EngineProcessorAttachment.d.ts +2 -1
- package/dist/EngineProcessorAttachment.d.ts.map +1 -1
- package/dist/FieldAdapter.js +45 -32
- package/dist/IndexedBoxAdapterCollection.js +45 -32
- package/dist/NoteBroadcaster.js +25 -12
- package/dist/NoteStreamReceiver.js +29 -16
- package/dist/ParameterAdapterSet.js +24 -11
- package/dist/ParameterFieldAdapters.js +19 -6
- package/dist/Parsing.d.ts +5 -0
- package/dist/Parsing.d.ts.map +1 -0
- package/dist/Parsing.js +10 -0
- package/dist/PianoModeAdapter.js +32 -19
- package/dist/RootBoxAdapter.js +37 -24
- package/dist/Validator.d.ts +10 -0
- package/dist/Validator.d.ts.map +1 -0
- package/dist/Validator.js +35 -0
- package/dist/audio/AudioFileBoxAdapter.js +23 -10
- package/dist/audio-unit/AudioBusBoxAdapter.d.ts +1 -1
- package/dist/audio-unit/AudioBusBoxAdapter.d.ts.map +1 -1
- package/dist/audio-unit/AudioBusBoxAdapter.js +31 -18
- package/dist/audio-unit/AudioUnitBoxAdapter.js +74 -63
- package/dist/audio-unit/AudioUnitInput.d.ts +1 -1
- package/dist/audio-unit/AudioUnitInput.d.ts.map +1 -1
- package/dist/audio-unit/AudioUnitInput.js +43 -30
- package/dist/audio-unit/AudioUnitOutput.js +33 -20
- package/dist/audio-unit/AudioUnitTracks.js +39 -26
- package/dist/audio-unit/AuxSendBoxAdapter.js +47 -34
- package/dist/devices/audio-effects/CompressorDeviceBoxAdapter.js +49 -37
- package/dist/devices/audio-effects/CrusherDeviceBoxAdapter.js +41 -29
- package/dist/devices/audio-effects/DelayDeviceBoxAdapter.js +51 -39
- package/dist/devices/audio-effects/FoldDeviceBoxAdapter.js +39 -27
- package/dist/devices/audio-effects/ModularDeviceBoxAdapter.js +33 -20
- package/dist/devices/audio-effects/RevampDeviceBoxAdapter.js +46 -34
- package/dist/devices/audio-effects/ReverbDeviceBoxAdapter.js +45 -33
- package/dist/devices/audio-effects/StereoToolDeviceBoxAdapter.js +43 -31
- package/dist/devices/audio-effects/TidalDeviceBoxAdapter.d.ts +36 -0
- package/dist/devices/audio-effects/TidalDeviceBoxAdapter.d.ts.map +1 -0
- package/dist/devices/audio-effects/TidalDeviceBoxAdapter.js +63 -0
- package/dist/devices/audio-effects/UnknownAudioEffectDeviceBoxAdapter.js +30 -17
- package/dist/devices/instruments/MIDIOutputDeviceBoxAdapter.js +42 -29
- package/dist/devices/instruments/NanoDeviceBoxAdapter.js +38 -26
- package/dist/devices/instruments/Playfield/PlayfieldSampleBoxAdapter.js +101 -89
- package/dist/devices/instruments/PlayfieldDeviceBoxAdapter.d.ts +0 -1
- package/dist/devices/instruments/PlayfieldDeviceBoxAdapter.d.ts.map +1 -1
- package/dist/devices/instruments/PlayfieldDeviceBoxAdapter.js +36 -24
- package/dist/devices/instruments/SoundfontDeviceBoxAdapter.js +84 -72
- package/dist/devices/instruments/TapeDeviceBoxAdapter.js +40 -28
- package/dist/devices/instruments/VaporisateurDeviceBoxAdapter.d.ts +26 -4
- package/dist/devices/instruments/VaporisateurDeviceBoxAdapter.d.ts.map +1 -1
- package/dist/devices/instruments/VaporisateurDeviceBoxAdapter.js +70 -33
- package/dist/devices/instruments/VaporisateurSettings.d.ts +17 -0
- package/dist/devices/instruments/VaporisateurSettings.d.ts.map +1 -0
- package/dist/devices/instruments/VaporisateurSettings.js +24 -0
- package/dist/devices/midi-effects/ArpeggioDeviceBoxAdapter.js +51 -39
- package/dist/devices/midi-effects/PitchDeviceBoxAdapter.js +40 -28
- package/dist/devices/midi-effects/UnknownMidiEffectDeviceBoxAdapter.js +30 -17
- package/dist/devices/midi-effects/VelocityDeviceBoxAdapter.js +47 -35
- package/dist/devices/midi-effects/ZeitgeistDeviceBoxAdapter.js +32 -19
- package/dist/editing/UserEditing.js +33 -20
- package/dist/editing/UserEditingManager.js +28 -15
- package/dist/factories/AudioBusFactory.d.ts +7 -0
- package/dist/factories/AudioBusFactory.d.ts.map +1 -0
- package/dist/factories/AudioBusFactory.js +29 -0
- package/dist/factories/AudioUnitFactory.d.ts +13 -0
- package/dist/factories/AudioUnitFactory.d.ts.map +1 -0
- package/dist/factories/AudioUnitFactory.js +44 -0
- package/dist/factories/AudioUnitOrdering.d.ts +3 -0
- package/dist/factories/AudioUnitOrdering.d.ts.map +1 -0
- package/dist/factories/AudioUnitOrdering.js +7 -0
- package/dist/factories/ColorCodes.d.ts +7 -0
- package/dist/factories/ColorCodes.d.ts.map +1 -0
- package/dist/factories/ColorCodes.js +32 -0
- package/dist/factories/Colors.d.ts +15 -0
- package/dist/factories/Colors.d.ts.map +1 -0
- package/dist/factories/Colors.js +23 -0
- package/dist/factories/InstrumentBox.d.ts +3 -0
- package/dist/factories/InstrumentBox.d.ts.map +1 -0
- package/dist/factories/InstrumentBox.js +1 -0
- package/dist/factories/InstrumentFactories.d.ts +34 -0
- package/dist/factories/InstrumentFactories.d.ts.map +1 -0
- package/dist/factories/InstrumentFactories.js +137 -0
- package/dist/factories/InstrumentFactory.d.ts +13 -0
- package/dist/factories/InstrumentFactory.d.ts.map +1 -0
- package/dist/factories/InstrumentFactory.js +1 -0
- package/dist/factories/InstrumentOptions.d.ts +9 -0
- package/dist/factories/InstrumentOptions.d.ts.map +1 -0
- package/dist/factories/InstrumentOptions.js +1 -0
- package/dist/factories/InstrumentProduct.d.ts +8 -0
- package/dist/factories/InstrumentProduct.d.ts.map +1 -0
- package/dist/factories/InstrumentProduct.js +1 -0
- package/dist/grooves/GrooveShuffleBoxAdapter.js +47 -35
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -3
- package/dist/modular/abstract.js +37 -24
- package/dist/modular/connection.js +20 -7
- package/dist/modular/connector.js +29 -16
- package/dist/modular/modular.js +49 -36
- package/dist/modular/modules/audio-input.js +17 -4
- package/dist/modular/modules/audio-output.js +17 -4
- package/dist/modular/modules/delay.js +24 -11
- package/dist/modular/modules/gain.js +24 -11
- package/dist/modular/modules/multiplier.js +21 -8
- package/dist/modular/user-interface.js +25 -12
- package/dist/preset/PresetDecoder.d.ts +11 -0
- package/dist/preset/PresetDecoder.d.ts.map +1 -0
- package/dist/preset/PresetDecoder.js +154 -0
- package/dist/preset/PresetEncoder.d.ts +5 -0
- package/dist/preset/PresetEncoder.d.ts.map +1 -0
- package/dist/preset/PresetEncoder.js +19 -0
- package/dist/preset/PresetHeader.d.ts +5 -0
- package/dist/preset/PresetHeader.d.ts.map +1 -0
- package/dist/preset/PresetHeader.js +5 -0
- package/dist/project/ProjectQueries.d.ts +5 -0
- package/dist/project/ProjectQueries.d.ts.map +1 -0
- package/dist/project/ProjectQueries.js +10 -0
- package/dist/project/ProjectSkeleton.d.ts +10 -1
- package/dist/project/ProjectSkeleton.d.ts.map +1 -1
- package/dist/project/ProjectSkeleton.js +100 -1
- package/dist/project/ProjectUtils.d.ts +13 -0
- package/dist/project/ProjectUtils.d.ts.map +1 -0
- package/dist/project/ProjectUtils.js +142 -0
- package/dist/protocols.d.ts.map +1 -1
- package/dist/selection/FilteredSelection.js +47 -34
- package/dist/selection/VertexSelection.js +66 -55
- package/dist/soundfont/SoundfontFileBoxAdapter.js +21 -8
- package/dist/timeline/MarkerBoxAdapter.js +33 -20
- package/dist/timeline/MarkerTrackAdapter.js +34 -22
- package/dist/timeline/TimelineBoxAdapter.js +24 -11
- package/dist/timeline/TrackBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/TrackBoxAdapter.js +97 -85
- package/dist/timeline/TrackClips.js +27 -14
- package/dist/timeline/TrackRegions.js +40 -27
- package/dist/timeline/TrackType.d.ts +1 -1
- package/dist/timeline/TrackType.d.ts.map +1 -1
- package/dist/timeline/TrackType.js +1 -1
- package/dist/timeline/clip/AudioClipBoxAdapter.js +66 -53
- package/dist/timeline/clip/NoteClipBoxAdapter.js +66 -53
- package/dist/timeline/clip/ValueClipBoxAdapter.js +67 -54
- package/dist/timeline/collection/NoteEventCollectionBoxAdapter.js +85 -73
- package/dist/timeline/collection/ValueEventCollectionBoxAdapter.js +53 -40
- package/dist/timeline/event/NoteEventBoxAdapter.js +43 -30
- package/dist/timeline/event/ValueEventBoxAdapter.js +67 -54
- package/dist/timeline/region/AudioRegionBoxAdapter.d.ts +17 -9
- package/dist/timeline/region/AudioRegionBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/region/AudioRegionBoxAdapter.js +149 -83
- package/dist/timeline/region/MutableRegion.d.ts +8 -0
- package/dist/timeline/region/MutableRegion.d.ts.map +1 -0
- package/dist/timeline/region/MutableRegion.js +1 -0
- package/dist/timeline/region/NoteRegionBoxAdapter.d.ts +6 -1
- package/dist/timeline/region/NoteRegionBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/region/NoteRegionBoxAdapter.js +78 -61
- package/dist/timeline/region/ValueRegionBoxAdapter.d.ts +6 -1
- package/dist/timeline/region/ValueRegionBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/region/ValueRegionBoxAdapter.js +79 -62
- package/package.json +8 -8
- package/dist/IconSymbol.d.ts +0 -126
- package/dist/IconSymbol.d.ts.map +0 -1
- package/dist/IconSymbol.js +0 -126
- package/dist/UpdateClockRate.d.ts +0 -2
- package/dist/UpdateClockRate.d.ts.map +0 -1
- package/dist/UpdateClockRate.js +0 -2
- package/dist/project/ProjectDecoder.d.ts +0 -10
- package/dist/project/ProjectDecoder.d.ts.map +0 -1
- package/dist/project/ProjectDecoder.js +0 -36
|
@@ -1,52 +1,64 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _VelocityDeviceBoxAdapter_instances, _VelocityDeviceBoxAdapter_context, _VelocityDeviceBoxAdapter_box, _VelocityDeviceBoxAdapter_parametric, _VelocityDeviceBoxAdapter_random, _VelocityDeviceBoxAdapter_wrapParameters;
|
|
1
13
|
import { clampUnit, Random, StringMapping, ValueMapping } from "@opendaw/lib-std";
|
|
2
14
|
import { Devices } from "../../DeviceAdapter";
|
|
3
15
|
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
4
16
|
export class VelocityDeviceBoxAdapter {
|
|
5
|
-
type = "midi-effect";
|
|
6
|
-
accepts = "midi";
|
|
7
|
-
#context;
|
|
8
|
-
#box;
|
|
9
|
-
#parametric;
|
|
10
|
-
#random;
|
|
11
|
-
namedParameter; // let typescript infer the type
|
|
12
17
|
constructor(context, box) {
|
|
13
|
-
this
|
|
14
|
-
this
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
-
this
|
|
18
|
+
_VelocityDeviceBoxAdapter_instances.add(this);
|
|
19
|
+
this.type = "midi-effect";
|
|
20
|
+
this.accepts = "midi";
|
|
21
|
+
_VelocityDeviceBoxAdapter_context.set(this, void 0);
|
|
22
|
+
_VelocityDeviceBoxAdapter_box.set(this, void 0);
|
|
23
|
+
_VelocityDeviceBoxAdapter_parametric.set(this, void 0);
|
|
24
|
+
_VelocityDeviceBoxAdapter_random.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _VelocityDeviceBoxAdapter_context, context, "f");
|
|
26
|
+
__classPrivateFieldSet(this, _VelocityDeviceBoxAdapter_box, box, "f");
|
|
27
|
+
__classPrivateFieldSet(this, _VelocityDeviceBoxAdapter_parametric, new ParameterAdapterSet(__classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_context, "f")), "f");
|
|
28
|
+
__classPrivateFieldSet(this, _VelocityDeviceBoxAdapter_random, Random.create(), "f");
|
|
29
|
+
this.namedParameter = __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_instances, "m", _VelocityDeviceBoxAdapter_wrapParameters).call(this, box);
|
|
18
30
|
}
|
|
19
31
|
computeVelocity(position, original) {
|
|
20
32
|
const { magnetPosition, magnetStrength, randomSeed, randomAmount, offset, mix } = this.namedParameter;
|
|
21
|
-
this
|
|
33
|
+
__classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_random, "f").setSeed(randomSeed.valueAt(position) + position);
|
|
22
34
|
const magnet = original + (magnetPosition.valueAt(position) - original) * magnetStrength.valueAt(position);
|
|
23
|
-
const random = (this
|
|
35
|
+
const random = (__classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_random, "f").uniform() * 2.0 - 1.0) * randomAmount.valueAt(position);
|
|
24
36
|
const delta = offset.valueAt(position);
|
|
25
37
|
const wet = mix.valueAt(position);
|
|
26
38
|
return original * (1.0 - wet) + (clampUnit(magnet + random + delta)) * wet;
|
|
27
39
|
}
|
|
28
|
-
get box() { return this
|
|
29
|
-
get uuid() { return this
|
|
30
|
-
get address() { return this
|
|
31
|
-
get indexField() { return this
|
|
32
|
-
get labelField() { return this
|
|
33
|
-
get enabledField() { return this
|
|
34
|
-
get minimizedField() { return this
|
|
35
|
-
get host() { return this
|
|
40
|
+
get box() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f"); }
|
|
41
|
+
get uuid() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").address.uuid; }
|
|
42
|
+
get address() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").address; }
|
|
43
|
+
get indexField() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").index; }
|
|
44
|
+
get labelField() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").label; }
|
|
45
|
+
get enabledField() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").enabled; }
|
|
46
|
+
get minimizedField() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").minimized; }
|
|
47
|
+
get host() { return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").host; }
|
|
36
48
|
deviceHost() {
|
|
37
|
-
return this
|
|
38
|
-
.adapterFor(this
|
|
49
|
+
return __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_context, "f").boxAdapters
|
|
50
|
+
.adapterFor(__classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_box, "f").host.targetVertex.unwrap("no device-host").box, Devices.isHost);
|
|
39
51
|
}
|
|
40
52
|
audioUnitBoxAdapter() { return this.deviceHost().audioUnitBoxAdapter(); }
|
|
41
|
-
terminate() { this
|
|
42
|
-
#wrapParameters(box) {
|
|
43
|
-
return {
|
|
44
|
-
magnetPosition: this.#parametric.createParameter(box.magnetPosition, ValueMapping.unipolar(), StringMapping.percent(), "Position"),
|
|
45
|
-
magnetStrength: this.#parametric.createParameter(box.magnetStrength, ValueMapping.unipolar(), StringMapping.percent(), "Strength"),
|
|
46
|
-
randomSeed: this.#parametric.createParameter(box.randomSeed, ValueMapping.linearInteger(0, 0xFFFF), StringMapping.numeric({ unit: "", fractionDigits: 0 }), "Seed"),
|
|
47
|
-
randomAmount: this.#parametric.createParameter(box.randomAmount, ValueMapping.unipolar(), StringMapping.percent(), "Amount"),
|
|
48
|
-
offset: this.#parametric.createParameter(box.offset, ValueMapping.bipolar(), StringMapping.percent(), "Offset"),
|
|
49
|
-
mix: this.#parametric.createParameter(box.mix, ValueMapping.unipolar(), StringMapping.percent(), "Mix")
|
|
50
|
-
};
|
|
51
|
-
}
|
|
53
|
+
terminate() { __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").terminate(); }
|
|
52
54
|
}
|
|
55
|
+
_VelocityDeviceBoxAdapter_context = new WeakMap(), _VelocityDeviceBoxAdapter_box = new WeakMap(), _VelocityDeviceBoxAdapter_parametric = new WeakMap(), _VelocityDeviceBoxAdapter_random = new WeakMap(), _VelocityDeviceBoxAdapter_instances = new WeakSet(), _VelocityDeviceBoxAdapter_wrapParameters = function _VelocityDeviceBoxAdapter_wrapParameters(box) {
|
|
56
|
+
return {
|
|
57
|
+
magnetPosition: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.magnetPosition, ValueMapping.unipolar(), StringMapping.percent(), "Position"),
|
|
58
|
+
magnetStrength: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.magnetStrength, ValueMapping.unipolar(), StringMapping.percent(), "Strength"),
|
|
59
|
+
randomSeed: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.randomSeed, ValueMapping.linearInteger(0, 0xFFFF), StringMapping.numeric({ unit: "", fractionDigits: 0 }), "Seed"),
|
|
60
|
+
randomAmount: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.randomAmount, ValueMapping.unipolar(), StringMapping.percent(), "Amount"),
|
|
61
|
+
offset: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.offset, ValueMapping.bipolar(), StringMapping.percent(), "Offset"),
|
|
62
|
+
mix: __classPrivateFieldGet(this, _VelocityDeviceBoxAdapter_parametric, "f").createParameter(box.mix, ValueMapping.unipolar(), StringMapping.percent(), "Mix")
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -1,35 +1,48 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _ZeitgeistDeviceBoxAdapter_context, _ZeitgeistDeviceBoxAdapter_box;
|
|
1
13
|
import { Devices } from "../../DeviceAdapter";
|
|
2
14
|
import { GrooveAdapter } from "../../grooves/GrooveBoxAdapter";
|
|
3
15
|
export class ZeitgeistDeviceBoxAdapter {
|
|
4
|
-
type = "midi-effect";
|
|
5
|
-
accepts = "midi";
|
|
6
|
-
#context;
|
|
7
|
-
#box;
|
|
8
16
|
constructor(context, box) {
|
|
9
|
-
this
|
|
10
|
-
this
|
|
17
|
+
this.type = "midi-effect";
|
|
18
|
+
this.accepts = "midi";
|
|
19
|
+
_ZeitgeistDeviceBoxAdapter_context.set(this, void 0);
|
|
20
|
+
_ZeitgeistDeviceBoxAdapter_box.set(this, void 0);
|
|
21
|
+
__classPrivateFieldSet(this, _ZeitgeistDeviceBoxAdapter_context, context, "f");
|
|
22
|
+
__classPrivateFieldSet(this, _ZeitgeistDeviceBoxAdapter_box, box, "f");
|
|
11
23
|
this.groove(); // force creation of GrooveAdapter
|
|
12
24
|
}
|
|
13
|
-
get box() { return this
|
|
14
|
-
get uuid() { return this
|
|
15
|
-
get address() { return this
|
|
16
|
-
get indexField() { return this
|
|
17
|
-
get labelField() { return this
|
|
18
|
-
get enabledField() { return this
|
|
19
|
-
get minimizedField() { return this
|
|
20
|
-
get host() { return this
|
|
25
|
+
get box() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f"); }
|
|
26
|
+
get uuid() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").address.uuid; }
|
|
27
|
+
get address() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").address; }
|
|
28
|
+
get indexField() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").index; }
|
|
29
|
+
get labelField() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").label; }
|
|
30
|
+
get enabledField() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").enabled; }
|
|
31
|
+
get minimizedField() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").minimized; }
|
|
32
|
+
get host() { return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").host; }
|
|
21
33
|
deviceHost() {
|
|
22
|
-
return this
|
|
23
|
-
.adapterFor(this
|
|
34
|
+
return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_context, "f").boxAdapters
|
|
35
|
+
.adapterFor(__classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").host.targetVertex.unwrap("no device-host").box, Devices.isHost);
|
|
24
36
|
}
|
|
25
37
|
groove() {
|
|
26
|
-
return this
|
|
27
|
-
.adapterFor(this
|
|
38
|
+
return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_context, "f").boxAdapters
|
|
39
|
+
.adapterFor(__classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").groove.targetVertex.unwrap("no groove").box, GrooveAdapter.checkType);
|
|
28
40
|
}
|
|
29
41
|
catchupAndSubscribeGroove(observer) {
|
|
30
|
-
return this
|
|
42
|
+
return __classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_box, "f").groove.catchupAndSubscribe(pointer => observer(__classPrivateFieldGet(this, _ZeitgeistDeviceBoxAdapter_context, "f").boxAdapters
|
|
31
43
|
.adapterFor(pointer.targetVertex.unwrap("No groove found").box, GrooveAdapter.checkType)));
|
|
32
44
|
}
|
|
33
45
|
audioUnitBoxAdapter() { return this.deviceHost().audioUnitBoxAdapter(); }
|
|
34
46
|
terminate() { }
|
|
35
47
|
}
|
|
48
|
+
_ZeitgeistDeviceBoxAdapter_context = new WeakMap(), _ZeitgeistDeviceBoxAdapter_box = new WeakMap();
|
|
@@ -1,39 +1,52 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UserEditing_editing, _UserEditing_notifier, _UserEditing_subscription, _UserEditing_pointer;
|
|
1
13
|
import { Notifier, Option } from "@opendaw/lib-std";
|
|
2
14
|
export class UserEditing {
|
|
3
|
-
#editing;
|
|
4
|
-
#notifier;
|
|
5
|
-
#subscription = Option.None;
|
|
6
|
-
#pointer = Option.None;
|
|
7
15
|
constructor(editing) {
|
|
8
|
-
this
|
|
9
|
-
this
|
|
16
|
+
_UserEditing_editing.set(this, void 0);
|
|
17
|
+
_UserEditing_notifier.set(this, void 0);
|
|
18
|
+
_UserEditing_subscription.set(this, Option.None);
|
|
19
|
+
_UserEditing_pointer.set(this, Option.None);
|
|
20
|
+
__classPrivateFieldSet(this, _UserEditing_editing, editing, "f");
|
|
21
|
+
__classPrivateFieldSet(this, _UserEditing_notifier, new Notifier(), "f");
|
|
10
22
|
}
|
|
11
23
|
catchupAndSubscribe(observer) {
|
|
12
24
|
observer(this.get());
|
|
13
|
-
return this
|
|
25
|
+
return __classPrivateFieldGet(this, _UserEditing_notifier, "f").subscribe(observer);
|
|
14
26
|
}
|
|
15
27
|
follow(pointer) {
|
|
16
|
-
this
|
|
17
|
-
this
|
|
18
|
-
this
|
|
19
|
-
.catchupAndSubscribe(pointer => this
|
|
28
|
+
__classPrivateFieldSet(this, _UserEditing_pointer, Option.wrap(pointer), "f");
|
|
29
|
+
__classPrivateFieldGet(this, _UserEditing_subscription, "f").ifSome(subscription => subscription.terminate());
|
|
30
|
+
__classPrivateFieldSet(this, _UserEditing_subscription, Option.wrap(pointer
|
|
31
|
+
.catchupAndSubscribe(pointer => __classPrivateFieldGet(this, _UserEditing_notifier, "f").notify(pointer.targetVertex))), "f");
|
|
20
32
|
}
|
|
21
33
|
edit(target) {
|
|
22
|
-
this
|
|
34
|
+
__classPrivateFieldGet(this, _UserEditing_pointer, "f").ifSome(pointer => __classPrivateFieldGet(this, _UserEditing_editing, "f").modify(() => pointer.refer(target)));
|
|
23
35
|
}
|
|
24
36
|
isEditing(vertex) {
|
|
25
|
-
return this
|
|
37
|
+
return __classPrivateFieldGet(this, _UserEditing_pointer, "f").match({
|
|
26
38
|
none: () => false,
|
|
27
39
|
some: pointer => pointer.targetVertex.contains(vertex)
|
|
28
40
|
});
|
|
29
41
|
}
|
|
30
|
-
get() { return this
|
|
31
|
-
clear() { this
|
|
42
|
+
get() { return __classPrivateFieldGet(this, _UserEditing_pointer, "f").flatMap(pointer => pointer.targetVertex); }
|
|
43
|
+
clear() { __classPrivateFieldGet(this, _UserEditing_pointer, "f").ifSome(pointer => __classPrivateFieldGet(this, _UserEditing_editing, "f").modify(() => pointer.defer())); }
|
|
32
44
|
terminate() {
|
|
33
|
-
this
|
|
34
|
-
this
|
|
35
|
-
this
|
|
36
|
-
this
|
|
37
|
-
this
|
|
45
|
+
__classPrivateFieldSet(this, _UserEditing_pointer, Option.None, "f");
|
|
46
|
+
__classPrivateFieldGet(this, _UserEditing_subscription, "f").ifSome(subscription => subscription.terminate());
|
|
47
|
+
__classPrivateFieldSet(this, _UserEditing_subscription, Option.None, "f");
|
|
48
|
+
__classPrivateFieldGet(this, _UserEditing_notifier, "f").notify(Option.None);
|
|
49
|
+
__classPrivateFieldGet(this, _UserEditing_notifier, "f").terminate();
|
|
38
50
|
}
|
|
39
51
|
}
|
|
52
|
+
_UserEditing_editing = new WeakMap(), _UserEditing_notifier = new WeakMap(), _UserEditing_subscription = new WeakMap(), _UserEditing_pointer = new WeakMap();
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UserEditingManager_terminator, _UserEditingManager_modularSystem, _UserEditingManager_timeline, _UserEditingManager_audioUnit;
|
|
1
13
|
import { Terminator } from "@opendaw/lib-std";
|
|
2
14
|
import { UserEditing } from "./UserEditing";
|
|
3
15
|
export class UserEditingManager {
|
|
4
|
-
#terminator;
|
|
5
|
-
#modularSystem;
|
|
6
|
-
#timeline;
|
|
7
|
-
#audioUnit;
|
|
8
16
|
constructor(editing) {
|
|
9
|
-
this
|
|
10
|
-
this
|
|
11
|
-
this
|
|
12
|
-
this
|
|
17
|
+
_UserEditingManager_terminator.set(this, void 0);
|
|
18
|
+
_UserEditingManager_modularSystem.set(this, void 0);
|
|
19
|
+
_UserEditingManager_timeline.set(this, void 0);
|
|
20
|
+
_UserEditingManager_audioUnit.set(this, void 0);
|
|
21
|
+
__classPrivateFieldSet(this, _UserEditingManager_terminator, new Terminator(), "f");
|
|
22
|
+
__classPrivateFieldSet(this, _UserEditingManager_modularSystem, __classPrivateFieldGet(this, _UserEditingManager_terminator, "f").own(new UserEditing(editing)), "f");
|
|
23
|
+
__classPrivateFieldSet(this, _UserEditingManager_timeline, __classPrivateFieldGet(this, _UserEditingManager_terminator, "f").own(new UserEditing(editing)), "f");
|
|
24
|
+
__classPrivateFieldSet(this, _UserEditingManager_audioUnit, __classPrivateFieldGet(this, _UserEditingManager_terminator, "f").own(new UserEditing(editing)), "f");
|
|
13
25
|
}
|
|
14
26
|
follow(userInterfaceBox) {
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
-
this
|
|
27
|
+
__classPrivateFieldGet(this, _UserEditingManager_modularSystem, "f").follow(userInterfaceBox.editingModularSystem);
|
|
28
|
+
__classPrivateFieldGet(this, _UserEditingManager_timeline, "f").follow(userInterfaceBox.editingTimelineRegion);
|
|
29
|
+
__classPrivateFieldGet(this, _UserEditingManager_audioUnit, "f").follow(userInterfaceBox.editingDeviceChain);
|
|
18
30
|
}
|
|
19
|
-
get modularSystem() { return this
|
|
20
|
-
get timeline() { return this
|
|
21
|
-
get audioUnit() { return this
|
|
22
|
-
terminate() { this
|
|
31
|
+
get modularSystem() { return __classPrivateFieldGet(this, _UserEditingManager_modularSystem, "f"); }
|
|
32
|
+
get timeline() { return __classPrivateFieldGet(this, _UserEditingManager_timeline, "f"); }
|
|
33
|
+
get audioUnit() { return __classPrivateFieldGet(this, _UserEditingManager_audioUnit, "f"); }
|
|
34
|
+
terminate() { __classPrivateFieldGet(this, _UserEditingManager_terminator, "f").terminate(); }
|
|
23
35
|
}
|
|
36
|
+
_UserEditingManager_terminator = new WeakMap(), _UserEditingManager_modularSystem = new WeakMap(), _UserEditingManager_timeline = new WeakMap(), _UserEditingManager_audioUnit = new WeakMap();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AudioUnitType, IconSymbol } from "@opendaw/studio-enums";
|
|
2
|
+
import { AudioBusBox } from "@opendaw/studio-boxes";
|
|
3
|
+
import { ProjectSkeleton } from "../project/ProjectSkeleton";
|
|
4
|
+
export declare namespace AudioBusFactory {
|
|
5
|
+
const create: (skeleton: ProjectSkeleton, name: string, icon: IconSymbol, type: AudioUnitType, color: string) => AudioBusBox;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=AudioBusFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioBusFactory.d.ts","sourceRoot":"","sources":["../../src/factories/AudioBusFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAC,WAAW,EAAW,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAA;AAE1D,yBAAiB,eAAe,CAAC;IACtB,MAAM,MAAM,GAAI,UAAU,eAAe,EACzB,MAAM,MAAM,EACZ,MAAM,UAAU,EAChB,MAAM,aAAa,EACnB,OAAO,MAAM,KAAG,WAoBtC,CAAA;CACJ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IconSymbol } from "@opendaw/studio-enums";
|
|
2
|
+
import { AudioBusBox, TrackBox } from "@opendaw/studio-boxes";
|
|
3
|
+
import { assert, Option, UUID } from "@opendaw/lib-std";
|
|
4
|
+
import { AudioUnitFactory } from "./AudioUnitFactory";
|
|
5
|
+
import { TrackType } from "../timeline/TrackType";
|
|
6
|
+
export var AudioBusFactory;
|
|
7
|
+
(function (AudioBusFactory) {
|
|
8
|
+
AudioBusFactory.create = (skeleton, name, icon, type, color) => {
|
|
9
|
+
console.debug(`createAudioBus '${name}', type: ${type}, color: ${color}`);
|
|
10
|
+
const { boxGraph, mandatoryBoxes: { rootBox } } = skeleton;
|
|
11
|
+
assert(rootBox.isAttached(), "rootBox not attached");
|
|
12
|
+
const uuid = UUID.generate();
|
|
13
|
+
const audioBusBox = AudioBusBox.create(boxGraph, uuid, box => {
|
|
14
|
+
box.collection.refer(rootBox.audioBusses);
|
|
15
|
+
box.label.setValue(name);
|
|
16
|
+
box.icon.setValue(IconSymbol.toName(icon));
|
|
17
|
+
box.color.setValue(color);
|
|
18
|
+
});
|
|
19
|
+
const audioUnitBox = AudioUnitFactory.create(skeleton, type, Option.None);
|
|
20
|
+
TrackBox.create(boxGraph, UUID.generate(), box => {
|
|
21
|
+
box.tracks.refer(audioUnitBox.tracks);
|
|
22
|
+
box.target.refer(audioUnitBox);
|
|
23
|
+
box.index.setValue(0);
|
|
24
|
+
box.type.setValue(TrackType.Undefined);
|
|
25
|
+
});
|
|
26
|
+
audioBusBox.output.refer(audioUnitBox.input);
|
|
27
|
+
return audioBusBox;
|
|
28
|
+
};
|
|
29
|
+
})(AudioBusFactory || (AudioBusFactory = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AudioUnitType } from "@opendaw/studio-enums";
|
|
2
|
+
import { int, Option } from "@opendaw/lib-std";
|
|
3
|
+
import { BoxGraph } from "@opendaw/lib-box";
|
|
4
|
+
import { AudioUnitBox, RootBox } from "@opendaw/studio-boxes";
|
|
5
|
+
import { CaptureBox } from "../CaptureBox";
|
|
6
|
+
import { ProjectSkeleton } from "../project/ProjectSkeleton";
|
|
7
|
+
import { TrackType } from "../timeline/TrackType";
|
|
8
|
+
export declare namespace AudioUnitFactory {
|
|
9
|
+
const create: ({ boxGraph, mandatoryBoxes: { rootBox, primaryAudioBus } }: ProjectSkeleton, type: AudioUnitType, capture: Option<CaptureBox>, index?: int) => AudioUnitBox;
|
|
10
|
+
const orderAndGetIndex: (rootBox: RootBox, type: AudioUnitType) => int;
|
|
11
|
+
const trackTypeToCapture: (boxGraph: BoxGraph, trackType: TrackType) => Option<CaptureBox>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=AudioUnitFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioUnitFactory.d.ts","sourceRoot":"","sources":["../../src/factories/AudioUnitFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAC,GAAG,EAAE,MAAM,EAAO,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAC,QAAQ,EAAa,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAC,YAAY,EAAmC,OAAO,EAAC,MAAM,uBAAuB,CAAA;AAE5F,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAE/C,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,MAAM,GAAI,4DAAwD,eAAe,EACvE,MAAM,aAAa,EACnB,SAAS,MAAM,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,KAAG,YAUjE,CAAA;IAEM,MAAM,gBAAgB,GAAI,SAAS,OAAO,EAAE,MAAM,aAAa,KAAG,GAYxE,CAAA;IAEM,MAAM,kBAAkB,GAAI,UAAU,QAAQ,EAAE,WAAW,SAAS,KAAG,MAAM,CAAC,UAAU,CAS9F,CAAA;CACJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Option, UUID } from "@opendaw/lib-std";
|
|
2
|
+
import { IndexedBox } from "@opendaw/lib-box";
|
|
3
|
+
import { AudioUnitBox, CaptureAudioBox, CaptureMidiBox } from "@opendaw/studio-boxes";
|
|
4
|
+
import { AudioUnitOrdering } from "./AudioUnitOrdering";
|
|
5
|
+
import { TrackType } from "../timeline/TrackType";
|
|
6
|
+
export var AudioUnitFactory;
|
|
7
|
+
(function (AudioUnitFactory) {
|
|
8
|
+
AudioUnitFactory.create = ({ boxGraph, mandatoryBoxes: { rootBox, primaryAudioBus } }, type, capture, index) => {
|
|
9
|
+
const insertIndex = index ?? AudioUnitFactory.orderAndGetIndex(rootBox, type);
|
|
10
|
+
console.debug(`createAudioUnit type: ${type}, insertIndex: ${insertIndex}`);
|
|
11
|
+
return AudioUnitBox.create(boxGraph, UUID.generate(), box => {
|
|
12
|
+
box.collection.refer(rootBox.audioUnits);
|
|
13
|
+
box.output.refer(primaryAudioBus.input);
|
|
14
|
+
box.index.setValue(insertIndex);
|
|
15
|
+
box.type.setValue(type);
|
|
16
|
+
capture.ifSome(capture => box.capture.refer(capture));
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
AudioUnitFactory.orderAndGetIndex = (rootBox, type) => {
|
|
20
|
+
const boxes = IndexedBox.collectIndexedBoxes(rootBox.audioUnits, AudioUnitBox);
|
|
21
|
+
const order = AudioUnitOrdering[type];
|
|
22
|
+
let index = 0 | 0;
|
|
23
|
+
for (; index < boxes.length; index++) {
|
|
24
|
+
if (AudioUnitOrdering[boxes[index].type.getValue()] > order) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const insertIndex = index;
|
|
29
|
+
while (index < boxes.length) {
|
|
30
|
+
boxes[index].index.setValue(++index);
|
|
31
|
+
}
|
|
32
|
+
return insertIndex;
|
|
33
|
+
};
|
|
34
|
+
AudioUnitFactory.trackTypeToCapture = (boxGraph, trackType) => {
|
|
35
|
+
switch (trackType) {
|
|
36
|
+
case TrackType.Audio:
|
|
37
|
+
return Option.wrap(CaptureAudioBox.create(boxGraph, UUID.generate()));
|
|
38
|
+
case TrackType.Notes:
|
|
39
|
+
return Option.wrap(CaptureMidiBox.create(boxGraph, UUID.generate()));
|
|
40
|
+
default:
|
|
41
|
+
return Option.None;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
})(AudioUnitFactory || (AudioUnitFactory = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioUnitOrdering.d.ts","sourceRoot":"","sources":["../../src/factories/AudioUnitOrdering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAGpC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAKxC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AudioUnitType } from "@opendaw/studio-enums";
|
|
2
|
+
import { TrackType } from "../timeline/TrackType";
|
|
3
|
+
export declare namespace ColorCodes {
|
|
4
|
+
const forAudioType: (type?: AudioUnitType) => string;
|
|
5
|
+
const forTrackType: (type?: TrackType) => number;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ColorCodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorCodes.d.ts","sourceRoot":"","sources":["../../src/factories/ColorCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAE/C,yBAAiB,UAAU,CAAC;IACjB,MAAM,YAAY,GAAI,OAAO,aAAa,KAAG,MAanD,CAAA;IAEM,MAAM,YAAY,GAAI,OAAO,SAAS,KAAG,MAW/C,CAAA;CACJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AudioUnitType } from "@opendaw/studio-enums";
|
|
2
|
+
import { Colors } from "./Colors";
|
|
3
|
+
import { TrackType } from "../timeline/TrackType";
|
|
4
|
+
export var ColorCodes;
|
|
5
|
+
(function (ColorCodes) {
|
|
6
|
+
ColorCodes.forAudioType = (type) => {
|
|
7
|
+
switch (type) {
|
|
8
|
+
case AudioUnitType.Output:
|
|
9
|
+
return Colors.blue;
|
|
10
|
+
case AudioUnitType.Aux:
|
|
11
|
+
return Colors.purple;
|
|
12
|
+
case AudioUnitType.Bus:
|
|
13
|
+
return Colors.orange;
|
|
14
|
+
case AudioUnitType.Instrument:
|
|
15
|
+
return Colors.green;
|
|
16
|
+
default:
|
|
17
|
+
return Colors.dark;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
ColorCodes.forTrackType = (type) => {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case TrackType.Audio:
|
|
23
|
+
return 200;
|
|
24
|
+
case TrackType.Notes:
|
|
25
|
+
return 45;
|
|
26
|
+
case TrackType.Value:
|
|
27
|
+
return 156;
|
|
28
|
+
default:
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
})(ColorCodes || (ColorCodes = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Colors: {
|
|
2
|
+
blue: string;
|
|
3
|
+
green: string;
|
|
4
|
+
yellow: string;
|
|
5
|
+
cream: string;
|
|
6
|
+
orange: string;
|
|
7
|
+
red: string;
|
|
8
|
+
purple: string;
|
|
9
|
+
bright: string;
|
|
10
|
+
gray: string;
|
|
11
|
+
dark: string;
|
|
12
|
+
shadow: string;
|
|
13
|
+
black: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Colors.d.ts","sourceRoot":"","sources":["../../src/factories/Colors.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InaccessibleProperty } from "@opendaw/lib-std";
|
|
2
|
+
const getPropertyValue = (() => {
|
|
3
|
+
if (typeof document === "undefined") {
|
|
4
|
+
// This will compile in React but fails at runtime when no document is available
|
|
5
|
+
return (_property) => InaccessibleProperty;
|
|
6
|
+
}
|
|
7
|
+
const computedStyle = getComputedStyle(document.documentElement);
|
|
8
|
+
return (property) => computedStyle.getPropertyValue(property);
|
|
9
|
+
})();
|
|
10
|
+
export const Colors = {
|
|
11
|
+
blue: getPropertyValue("--color-blue"),
|
|
12
|
+
green: getPropertyValue("--color-green"),
|
|
13
|
+
yellow: getPropertyValue("--color-yellow"),
|
|
14
|
+
cream: getPropertyValue("--color-cream"),
|
|
15
|
+
orange: getPropertyValue("--color-orange"),
|
|
16
|
+
red: getPropertyValue("--color-red"),
|
|
17
|
+
purple: getPropertyValue("--color-purple"),
|
|
18
|
+
bright: getPropertyValue("--color-bright"),
|
|
19
|
+
gray: getPropertyValue("--color-gray"),
|
|
20
|
+
dark: getPropertyValue("--color-dark"),
|
|
21
|
+
shadow: getPropertyValue("--color-shadow"),
|
|
22
|
+
black: getPropertyValue("--color-black")
|
|
23
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
2
|
+
export type InstrumentBox = TapeDeviceBox | VaporisateurDeviceBox | NanoDeviceBox | PlayfieldDeviceBox | SoundfontDeviceBox | MIDIOutputDeviceBox;
|
|
3
|
+
//# sourceMappingURL=InstrumentBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstrumentBox.d.ts","sourceRoot":"","sources":["../../src/factories/InstrumentBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACxB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,aAAa,GACrB,aAAa,GACX,qBAAqB,GACrB,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AudioFileBox, MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
2
|
+
import { byte, UUID } from "@opendaw/lib-std";
|
|
3
|
+
import { InstrumentFactory } from "./InstrumentFactory";
|
|
4
|
+
export declare namespace InstrumentFactories {
|
|
5
|
+
const Tape: InstrumentFactory<void, TapeDeviceBox>;
|
|
6
|
+
const Nano: InstrumentFactory<AudioFileBox, NanoDeviceBox>;
|
|
7
|
+
type PlayfieldAttachment = ReadonlyArray<{
|
|
8
|
+
note: byte;
|
|
9
|
+
uuid: UUID.Bytes;
|
|
10
|
+
name: string;
|
|
11
|
+
durationInSeconds: number;
|
|
12
|
+
exclude: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
const Playfield: InstrumentFactory<PlayfieldAttachment, PlayfieldDeviceBox>;
|
|
15
|
+
const Vaporisateur: InstrumentFactory<void, VaporisateurDeviceBox>;
|
|
16
|
+
const MIDIOutput: InstrumentFactory<void, MIDIOutputDeviceBox>;
|
|
17
|
+
const Soundfont: InstrumentFactory<{
|
|
18
|
+
uuid: UUID.String;
|
|
19
|
+
name: string;
|
|
20
|
+
}, SoundfontDeviceBox>;
|
|
21
|
+
const Named: {
|
|
22
|
+
Vaporisateur: InstrumentFactory<void, VaporisateurDeviceBox>;
|
|
23
|
+
Playfield: InstrumentFactory<PlayfieldAttachment, PlayfieldDeviceBox>;
|
|
24
|
+
Nano: InstrumentFactory<AudioFileBox, NanoDeviceBox>;
|
|
25
|
+
Tape: InstrumentFactory<void, TapeDeviceBox>;
|
|
26
|
+
Soundfont: InstrumentFactory<{
|
|
27
|
+
uuid: UUID.String;
|
|
28
|
+
name: string;
|
|
29
|
+
}, SoundfontDeviceBox>;
|
|
30
|
+
MIDIOutput: InstrumentFactory<void, MIDIOutputDeviceBox>;
|
|
31
|
+
};
|
|
32
|
+
type Keys = keyof typeof Named;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=InstrumentFactories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstrumentFactories.d.ts","sourceRoot":"","sources":["../../src/factories/InstrumentFactories.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAEZ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAElB,kBAAkB,EAElB,aAAa,EACb,qBAAqB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAa,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAItD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AAGrD,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAmBvD,CAAA;IAEM,MAAM,IAAI,EAAE,iBAAiB,CAAC,YAAY,EAAE,aAAa,CA6B/D,CAAA;IAED,KAAY,mBAAmB,GAAG,aAAa,CAAC;QAC5C,IAAI,EAAE,IAAI,CAAA;QACV,IAAI,EAAE,IAAI,CAAC,KAAK,CAAA;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,iBAAiB,EAAE,MAAM,CAAA;QACzB,OAAO,EAAE,OAAO,CAAA;KACnB,CAAC,CAAA;IAEK,MAAM,SAAS,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,kBAAkB,CA4BhF,CAAA;IAEM,MAAM,YAAY,EAAE,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CA6BvE,CAAA;IAEM,MAAM,UAAU,EAAE,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,CAenE,CAAA;IAEM,MAAM,SAAS,EAAE,iBAAiB,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,kBAAkB,CAqBhG,CAAA;IAEM,MAAM,KAAK;;;;;;kBAvBgC,IAAI,CAAC,MAAM;kBAAQ,MAAM;;;KAuBM,CAAA;IACjF,KAAY,IAAI,GAAG,MAAM,OAAO,KAAK,CAAA;CAYxC"}
|