@opendaw/studio-adapters 0.0.98 → 0.0.100
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.d.ts +5 -0
- package/dist/AutomatableParameterFieldAdapter.d.ts.map +1 -1
- package/dist/AutomatableParameterFieldAdapter.js +20 -4
- package/dist/BoxAdapters.d.ts.map +1 -1
- package/dist/BoxAdapters.js +6 -0
- package/dist/DeviceManualUrls.d.ts +3 -0
- package/dist/DeviceManualUrls.d.ts.map +1 -1
- package/dist/DeviceManualUrls.js +3 -0
- package/dist/ParameterFieldAdapters.d.ts +10 -0
- package/dist/ParameterFieldAdapters.d.ts.map +1 -1
- package/dist/ParameterFieldAdapters.js +30 -3
- package/dist/ScriptCompiler.d.ts +25 -0
- package/dist/ScriptCompiler.d.ts.map +1 -0
- package/dist/ScriptCompiler.js +188 -0
- package/dist/ScriptParamDeclaration.d.ts +36 -0
- package/dist/ScriptParamDeclaration.d.ts.map +1 -0
- package/dist/ScriptParamDeclaration.js +197 -0
- package/dist/audio-unit/AudioUnitTracks.d.ts +1 -0
- package/dist/audio-unit/AudioUnitTracks.d.ts.map +1 -1
- package/dist/audio-unit/AudioUnitTracks.js +1 -0
- package/dist/devices/audio-effects/WerkstattDeviceBoxAdapter.d.ts +31 -0
- package/dist/devices/audio-effects/WerkstattDeviceBoxAdapter.d.ts.map +1 -0
- package/dist/devices/audio-effects/WerkstattDeviceBoxAdapter.js +55 -0
- package/dist/devices/instruments/ApparatDeviceBoxAdapter.d.ts +32 -0
- package/dist/devices/instruments/ApparatDeviceBoxAdapter.d.ts.map +1 -0
- package/dist/devices/instruments/ApparatDeviceBoxAdapter.js +57 -0
- package/dist/devices/midi-effects/SpielwerkDeviceBoxAdapter.d.ts +29 -0
- package/dist/devices/midi-effects/SpielwerkDeviceBoxAdapter.d.ts.map +1 -0
- package/dist/devices/midi-effects/SpielwerkDeviceBoxAdapter.js +52 -0
- package/dist/factories/DeviceFactory.d.ts +1 -0
- package/dist/factories/DeviceFactory.d.ts.map +1 -1
- package/dist/factories/InstrumentBox.d.ts +2 -2
- package/dist/factories/InstrumentBox.d.ts.map +1 -1
- package/dist/factories/InstrumentFactories.d.ts +7 -5
- package/dist/factories/InstrumentFactories.d.ts.map +1 -1
- package/dist/factories/InstrumentFactories.js +21 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/offline-renderer.d.ts +1 -0
- package/dist/offline-renderer.d.ts.map +1 -1
- package/dist/protocols.d.ts +1 -0
- package/dist/protocols.d.ts.map +1 -1
- package/dist/selection/VertexSelection.d.ts.map +1 -1
- package/dist/selection/VertexSelection.js +2 -1
- package/dist/timeline/TrackBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/TrackBoxAdapter.js +31 -1
- package/dist/timeline/collection/NoteEventCollectionBoxAdapter.d.ts +1 -0
- package/dist/timeline/collection/NoteEventCollectionBoxAdapter.d.ts.map +1 -1
- package/dist/timeline/collection/NoteEventCollectionBoxAdapter.js +9 -0
- package/package.json +9 -9
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { asInstanceOf, isDefined, Notifier, StringMapping, Terminable, ValueMapping } from "@opendaw/lib-std";
|
|
2
|
+
import { WerkstattParameterBox } from "@opendaw/studio-boxes";
|
|
3
|
+
const PARAM_LINE = /^\/\/ @param .+$/gm;
|
|
4
|
+
const SAMPLE_LINE = /^\/\/ @sample .+$/gm;
|
|
5
|
+
const DECLARATION_LINE = /^\/\/ @(?:param|sample) \S+/gm;
|
|
6
|
+
const FLOAT_TOLERANCE = 1e-6;
|
|
7
|
+
const VALID_MAPPINGS = ["linear", "exp", "int", "bool"];
|
|
8
|
+
const BoolStringMapping = new class {
|
|
9
|
+
x(y) {
|
|
10
|
+
return { value: y >= 0.5 ? "On" : "Off", unit: "" };
|
|
11
|
+
}
|
|
12
|
+
y(x) {
|
|
13
|
+
const lower = x.trim().toLowerCase();
|
|
14
|
+
return { type: "explicit", value: (lower === "on" || lower === "true" || lower === "yes") ? 1 : 0 };
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const parseSingleParam = (line) => {
|
|
18
|
+
const tokens = line.replace(/^\/\/ @param\s+/, "").replace(/\s+\/\/.*$/, "").trim().split(/\s+/);
|
|
19
|
+
if (tokens.length === 0) {
|
|
20
|
+
throw new Error(`Malformed @param: '${line}'`);
|
|
21
|
+
}
|
|
22
|
+
const label = tokens[0];
|
|
23
|
+
if (tokens.length === 1) {
|
|
24
|
+
return { label, defaultValue: 0, min: 0, max: 1, mapping: "unipolar", unit: "" };
|
|
25
|
+
}
|
|
26
|
+
const second = tokens[1];
|
|
27
|
+
if (second === "true" || second === "false") {
|
|
28
|
+
return { label, defaultValue: second === "true" ? 1 : 0, min: 0, max: 1, mapping: "bool", unit: "" };
|
|
29
|
+
}
|
|
30
|
+
if (second === "bool") {
|
|
31
|
+
return { label, defaultValue: 0, min: 0, max: 1, mapping: "bool", unit: "" };
|
|
32
|
+
}
|
|
33
|
+
const defaultValue = parseFloat(second);
|
|
34
|
+
if (isNaN(defaultValue)) {
|
|
35
|
+
throw new Error(`Malformed @param: '${line}' — '${second}' is not a valid number`);
|
|
36
|
+
}
|
|
37
|
+
if (tokens.length === 2) {
|
|
38
|
+
return { label, defaultValue, min: 0, max: 1, mapping: "unipolar", unit: "" };
|
|
39
|
+
}
|
|
40
|
+
if (tokens.length === 3 && tokens[2] === "bool") {
|
|
41
|
+
return { label, defaultValue: defaultValue >= 0.5 ? 1 : 0, min: 0, max: 1, mapping: "bool", unit: "" };
|
|
42
|
+
}
|
|
43
|
+
if (tokens.length === 4) {
|
|
44
|
+
const min = parseFloat(tokens[2]);
|
|
45
|
+
const max = parseFloat(tokens[3]);
|
|
46
|
+
if (isNaN(min) || isNaN(max)) {
|
|
47
|
+
throw new Error(`Malformed @param: '${line}' — min/max must be numbers`);
|
|
48
|
+
}
|
|
49
|
+
if (max - min < FLOAT_TOLERANCE) {
|
|
50
|
+
throw new Error(`Malformed @param: '${line}' — min (${min}) must be less than max (${max})`);
|
|
51
|
+
}
|
|
52
|
+
if (defaultValue < min - FLOAT_TOLERANCE || defaultValue > max + FLOAT_TOLERANCE) {
|
|
53
|
+
throw new Error(`Malformed @param: '${line}' — default (${defaultValue}) must be within [${min}, ${max}]`);
|
|
54
|
+
}
|
|
55
|
+
return { label, defaultValue, min, max, mapping: "linear", unit: "" };
|
|
56
|
+
}
|
|
57
|
+
if (tokens.length < 5) {
|
|
58
|
+
throw new Error(`Malformed @param: '${line}' — expected: // @param <name> <default> <min> <max> [type] [unit]`);
|
|
59
|
+
}
|
|
60
|
+
const min = parseFloat(tokens[2]);
|
|
61
|
+
const max = parseFloat(tokens[3]);
|
|
62
|
+
const mapping = tokens[4];
|
|
63
|
+
const unit = tokens.length >= 6 ? tokens[5] : "";
|
|
64
|
+
if (isNaN(min) || isNaN(max)) {
|
|
65
|
+
throw new Error(`Malformed @param: '${line}' — min/max must be numbers`);
|
|
66
|
+
}
|
|
67
|
+
if (!VALID_MAPPINGS.includes(mapping)) {
|
|
68
|
+
throw new Error(`Malformed @param: '${line}' — unknown mapping '${mapping}' (expected: linear, exp, int, bool)`);
|
|
69
|
+
}
|
|
70
|
+
if (mapping !== "bool" && max - min < FLOAT_TOLERANCE) {
|
|
71
|
+
throw new Error(`Malformed @param: '${line}' — min (${min}) must be less than max (${max})`);
|
|
72
|
+
}
|
|
73
|
+
if (defaultValue < min - FLOAT_TOLERANCE || defaultValue > max + FLOAT_TOLERANCE) {
|
|
74
|
+
throw new Error(`Malformed @param: '${line}' — default (${defaultValue}) must be within [${min}, ${max}]`);
|
|
75
|
+
}
|
|
76
|
+
return { label, defaultValue, min, max, mapping, unit };
|
|
77
|
+
};
|
|
78
|
+
const declarationEquals = (a, b) => a.mapping === b.mapping && a.min === b.min && a.max === b.max && a.unit === b.unit;
|
|
79
|
+
const declarationFullEquals = (a, b) => declarationEquals(a, b) && Math.abs(a.defaultValue - b.defaultValue) < 1e-6;
|
|
80
|
+
export var ScriptParamDeclaration;
|
|
81
|
+
(function (ScriptParamDeclaration) {
|
|
82
|
+
ScriptParamDeclaration.isEqual = declarationFullEquals;
|
|
83
|
+
ScriptParamDeclaration.parseParams = (code) => {
|
|
84
|
+
const params = [];
|
|
85
|
+
let match;
|
|
86
|
+
PARAM_LINE.lastIndex = 0;
|
|
87
|
+
while ((match = PARAM_LINE.exec(code)) !== null) {
|
|
88
|
+
params.push(parseSingleParam(match[0]));
|
|
89
|
+
}
|
|
90
|
+
return params;
|
|
91
|
+
};
|
|
92
|
+
ScriptParamDeclaration.parseSamples = (code) => {
|
|
93
|
+
const samples = [];
|
|
94
|
+
let match;
|
|
95
|
+
SAMPLE_LINE.lastIndex = 0;
|
|
96
|
+
while ((match = SAMPLE_LINE.exec(code)) !== null) {
|
|
97
|
+
const tokens = match[0].replace(/^\/\/ @sample\s+/, "").replace(/\s+\/\/.*$/, "").trim().split(/\s+/);
|
|
98
|
+
if (tokens.length === 0 || tokens[0].length === 0) {
|
|
99
|
+
throw new Error(`Malformed @sample: '${match[0]}' — expected: // @sample <name>`);
|
|
100
|
+
}
|
|
101
|
+
if (tokens.length > 1) {
|
|
102
|
+
throw new Error(`Malformed @sample: '${match[0]}' — expected: // @sample <name>`);
|
|
103
|
+
}
|
|
104
|
+
samples.push({ label: tokens[0] });
|
|
105
|
+
}
|
|
106
|
+
return samples;
|
|
107
|
+
};
|
|
108
|
+
ScriptParamDeclaration.parseDeclarationOrder = (code) => {
|
|
109
|
+
const order = new Map();
|
|
110
|
+
let match;
|
|
111
|
+
DECLARATION_LINE.lastIndex = 0;
|
|
112
|
+
let index = 0;
|
|
113
|
+
while ((match = DECLARATION_LINE.exec(code)) !== null) {
|
|
114
|
+
const label = match[0].replace(/^\/\/ @(?:param|sample)\s+/, "").split(/\s+/)[0];
|
|
115
|
+
if (!order.has(label)) {
|
|
116
|
+
order.set(label, index++);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return order;
|
|
120
|
+
};
|
|
121
|
+
ScriptParamDeclaration.resolveValueMapping = (declaration) => {
|
|
122
|
+
switch (declaration.mapping) {
|
|
123
|
+
case "unipolar":
|
|
124
|
+
return ValueMapping.unipolar();
|
|
125
|
+
case "linear":
|
|
126
|
+
return ValueMapping.linear(declaration.min, declaration.max);
|
|
127
|
+
case "exp":
|
|
128
|
+
return ValueMapping.exponential(declaration.min, declaration.max);
|
|
129
|
+
case "int":
|
|
130
|
+
return ValueMapping.linearInteger(declaration.min, declaration.max);
|
|
131
|
+
case "bool":
|
|
132
|
+
return ValueMapping.linearInteger(0, 1);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
ScriptParamDeclaration.resolveStringMapping = (declaration) => {
|
|
136
|
+
switch (declaration.mapping) {
|
|
137
|
+
case "unipolar":
|
|
138
|
+
return StringMapping.percent();
|
|
139
|
+
case "linear":
|
|
140
|
+
return StringMapping.numeric({ unit: declaration.unit, fractionDigits: 2 });
|
|
141
|
+
case "exp":
|
|
142
|
+
return StringMapping.numeric({ unit: declaration.unit, fractionDigits: 2 });
|
|
143
|
+
case "int":
|
|
144
|
+
return StringMapping.numeric({ unit: declaration.unit, fractionDigits: 0 });
|
|
145
|
+
case "bool":
|
|
146
|
+
return BoolStringMapping;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
ScriptParamDeclaration.resolveParamMappings = (declaration) => ({
|
|
150
|
+
valueMapping: ScriptParamDeclaration.resolveValueMapping(declaration),
|
|
151
|
+
stringMapping: ScriptParamDeclaration.resolveStringMapping(declaration)
|
|
152
|
+
});
|
|
153
|
+
ScriptParamDeclaration.subscribeScriptParams = (parametric, codeField, parametersField) => {
|
|
154
|
+
const cachedDeclarations = new Map();
|
|
155
|
+
const codeChangedNotifier = new Notifier();
|
|
156
|
+
const terminable = Terminable.many(parametersField.pointerHub.catchupAndSubscribe({
|
|
157
|
+
onAdded: (({ box: parameterBox }) => {
|
|
158
|
+
const paramBox = asInstanceOf(parameterBox, WerkstattParameterBox);
|
|
159
|
+
const label = paramBox.label.getValue();
|
|
160
|
+
const declarations = ScriptParamDeclaration.parseParams(codeField.getValue());
|
|
161
|
+
const declaration = declarations.find(decl => decl.label === label);
|
|
162
|
+
const { valueMapping, stringMapping } = isDefined(declaration)
|
|
163
|
+
? ScriptParamDeclaration.resolveParamMappings(declaration)
|
|
164
|
+
: {
|
|
165
|
+
valueMapping: ValueMapping.unipolar(),
|
|
166
|
+
stringMapping: StringMapping.percent({ fractionDigits: 1 })
|
|
167
|
+
};
|
|
168
|
+
parametric.createParameter(paramBox.value, valueMapping, stringMapping, label);
|
|
169
|
+
if (isDefined(declaration)) {
|
|
170
|
+
cachedDeclarations.set(label, declaration);
|
|
171
|
+
}
|
|
172
|
+
}),
|
|
173
|
+
onRemoved: (({ box }) => {
|
|
174
|
+
const paramBox = asInstanceOf(box, WerkstattParameterBox);
|
|
175
|
+
cachedDeclarations.delete(paramBox.label.getValue());
|
|
176
|
+
parametric.removeParameter(paramBox.value.address);
|
|
177
|
+
})
|
|
178
|
+
}), codeField.subscribe(() => {
|
|
179
|
+
const declarations = ScriptParamDeclaration.parseParams(codeField.getValue());
|
|
180
|
+
for (const adapter of parametric.parameters()) {
|
|
181
|
+
const newDeclaration = declarations.find(decl => decl.label === adapter.name);
|
|
182
|
+
if (!isDefined(newDeclaration)) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
const oldDeclaration = cachedDeclarations.get(adapter.name);
|
|
186
|
+
if (isDefined(oldDeclaration) && declarationEquals(oldDeclaration, newDeclaration)) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const { valueMapping, stringMapping } = ScriptParamDeclaration.resolveParamMappings(newDeclaration);
|
|
190
|
+
adapter.updateMappings(valueMapping, stringMapping);
|
|
191
|
+
cachedDeclarations.set(adapter.name, newDeclaration);
|
|
192
|
+
}
|
|
193
|
+
codeChangedNotifier.notify();
|
|
194
|
+
}), codeChangedNotifier);
|
|
195
|
+
return { terminable, codeChanged: codeChangedNotifier };
|
|
196
|
+
};
|
|
197
|
+
})(ScriptParamDeclaration || (ScriptParamDeclaration = {}));
|
|
@@ -12,6 +12,7 @@ export declare class AudioUnitTracks implements Terminable {
|
|
|
12
12
|
create(type: TrackType, target: Vertex<Pointers.Automation | Pointers>, index?: int): void;
|
|
13
13
|
controls(target: Vertex<Pointers.Automation | Pointers>): Option<TrackBoxAdapter>;
|
|
14
14
|
delete(adapter: TrackBoxAdapter): void;
|
|
15
|
+
get audioUnitBox(): AudioUnitBoxAdapter["box"];
|
|
15
16
|
get collection(): IndexedBoxAdapterCollection<TrackBoxAdapter, Pointers.TrackCollection>;
|
|
16
17
|
values(): ReadonlyArray<TrackBoxAdapter>;
|
|
17
18
|
catchupAndSubscribe(listener: IndexedAdapterCollectionListener<TrackBoxAdapter>): Subscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioUnitTracks.d.ts","sourceRoot":"","sources":["../../src/audio-unit/AudioUnitTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAY,QAAQ,EAAE,MAAM,EAAoB,YAAY,EAAE,UAAU,EAAO,MAAM,kBAAkB,CAAA;AAClH,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAC,gCAAgC,EAAE,2BAA2B,EAAC,MAAM,gCAAgC,CAAA;AAC5G,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAA;AAE/C,qBAAa,eAAgB,YAAW,UAAU;;gBAQlC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW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BAQlC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW;IAelE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI;IAW1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC;IAKjF,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAUtC,IAAI,YAAY,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAA2B;IACzE,IAAI,UAAU,IAAI,2BAA2B,CAAC,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,CAA0B;IAElH,MAAM,IAAI,aAAa,CAAC,eAAe,CAAC;IAExC,mBAAmB,CAAC,QAAQ,EAAE,gCAAgC,CAAC,eAAe,CAAC,GAAG,YAAY;IAI9F,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,YAAY;IAE1D,SAAS,IAAI,IAAI;CAMpB"}
|
|
@@ -59,6 +59,7 @@ export class AudioUnitTracks {
|
|
|
59
59
|
}
|
|
60
60
|
adapter.box.delete();
|
|
61
61
|
}
|
|
62
|
+
get audioUnitBox() { return __classPrivateFieldGet(this, _AudioUnitTracks_adapter, "f").box; }
|
|
62
63
|
get collection() { return __classPrivateFieldGet(this, _AudioUnitTracks_collection, "f"); }
|
|
63
64
|
values() { return __classPrivateFieldGet(this, _AudioUnitTracks_collection, "f").adapters(); }
|
|
64
65
|
catchupAndSubscribe(listener) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Observable, UUID } from "@opendaw/lib-std";
|
|
2
|
+
import { Address, BooleanField, Int32Field, PointerField, StringField } from "@opendaw/lib-box";
|
|
3
|
+
import { WerkstattDeviceBox } from "@opendaw/studio-boxes";
|
|
4
|
+
import { Pointers } from "@opendaw/studio-enums";
|
|
5
|
+
import { AudioEffectDeviceAdapter, DeviceHost } from "../../DeviceAdapter";
|
|
6
|
+
import { LabeledAudioOutput } from "../../LabeledAudioOutputsOwner";
|
|
7
|
+
import { BoxAdaptersContext } from "../../BoxAdaptersContext";
|
|
8
|
+
import { AudioUnitBoxAdapter } from "../../audio-unit/AudioUnitBoxAdapter";
|
|
9
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
10
|
+
export declare class WerkstattDeviceBoxAdapter implements AudioEffectDeviceAdapter {
|
|
11
|
+
#private;
|
|
12
|
+
readonly type = "audio-effect";
|
|
13
|
+
readonly accepts = "audio";
|
|
14
|
+
readonly manualUrl = "manuals/devices/audio/werkstatt";
|
|
15
|
+
constructor(context: BoxAdaptersContext, box: WerkstattDeviceBox);
|
|
16
|
+
get box(): WerkstattDeviceBox;
|
|
17
|
+
get uuid(): UUID.Bytes;
|
|
18
|
+
get address(): Address;
|
|
19
|
+
get indexField(): Int32Field;
|
|
20
|
+
get labelField(): StringField;
|
|
21
|
+
get enabledField(): BooleanField;
|
|
22
|
+
get minimizedField(): BooleanField;
|
|
23
|
+
get host(): PointerField<Pointers.AudioEffectHost>;
|
|
24
|
+
get parameters(): ParameterAdapterSet;
|
|
25
|
+
get codeChanged(): Observable<void>;
|
|
26
|
+
deviceHost(): DeviceHost;
|
|
27
|
+
audioUnitBoxAdapter(): AudioUnitBoxAdapter;
|
|
28
|
+
labeledAudioOutputs(): Iterable<LabeledAudioOutput>;
|
|
29
|
+
terminate(): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=WerkstattDeviceBoxAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WerkstattDeviceBoxAdapter.d.ts","sourceRoot":"","sources":["../../../src/devices/audio-effects/WerkstattDeviceBoxAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAsB,IAAI,EAAC,MAAM,kBAA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CAAC;IAIpD,SAAS,IAAI,IAAI;CACpB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 _WerkstattDeviceBoxAdapter_terminator, _WerkstattDeviceBoxAdapter_context, _WerkstattDeviceBoxAdapter_box, _WerkstattDeviceBoxAdapter_parametric, _WerkstattDeviceBoxAdapter_codeChanged;
|
|
13
|
+
import { Option, Terminator } from "@opendaw/lib-std";
|
|
14
|
+
import { Devices } from "../../DeviceAdapter";
|
|
15
|
+
import { DeviceManualUrls } from "../../DeviceManualUrls";
|
|
16
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
17
|
+
import { ScriptParamDeclaration } from "../../ScriptParamDeclaration";
|
|
18
|
+
export class WerkstattDeviceBoxAdapter {
|
|
19
|
+
constructor(context, box) {
|
|
20
|
+
_WerkstattDeviceBoxAdapter_terminator.set(this, new Terminator());
|
|
21
|
+
this.type = "audio-effect";
|
|
22
|
+
this.accepts = "audio";
|
|
23
|
+
this.manualUrl = DeviceManualUrls.Werkstatt;
|
|
24
|
+
_WerkstattDeviceBoxAdapter_context.set(this, void 0);
|
|
25
|
+
_WerkstattDeviceBoxAdapter_box.set(this, void 0);
|
|
26
|
+
_WerkstattDeviceBoxAdapter_parametric.set(this, void 0);
|
|
27
|
+
_WerkstattDeviceBoxAdapter_codeChanged.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _WerkstattDeviceBoxAdapter_context, context, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _WerkstattDeviceBoxAdapter_box, box, "f");
|
|
30
|
+
__classPrivateFieldSet(this, _WerkstattDeviceBoxAdapter_parametric, __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_terminator, "f").own(new ParameterAdapterSet(__classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_context, "f"))), "f");
|
|
31
|
+
const { terminable, codeChanged } = ScriptParamDeclaration.subscribeScriptParams(__classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_parametric, "f"), box.code, box.parameters);
|
|
32
|
+
__classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_terminator, "f").own(terminable);
|
|
33
|
+
__classPrivateFieldSet(this, _WerkstattDeviceBoxAdapter_codeChanged, codeChanged, "f");
|
|
34
|
+
}
|
|
35
|
+
get box() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f"); }
|
|
36
|
+
get uuid() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").address.uuid; }
|
|
37
|
+
get address() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").address; }
|
|
38
|
+
get indexField() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").index; }
|
|
39
|
+
get labelField() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").label; }
|
|
40
|
+
get enabledField() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").enabled; }
|
|
41
|
+
get minimizedField() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").minimized; }
|
|
42
|
+
get host() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").host; }
|
|
43
|
+
get parameters() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_parametric, "f"); }
|
|
44
|
+
get codeChanged() { return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_codeChanged, "f"); }
|
|
45
|
+
deviceHost() {
|
|
46
|
+
return __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_context, "f").boxAdapters
|
|
47
|
+
.adapterFor(__classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_box, "f").host.targetVertex.unwrap("no device-host").box, Devices.isHost);
|
|
48
|
+
}
|
|
49
|
+
audioUnitBoxAdapter() { return this.deviceHost().audioUnitBoxAdapter(); }
|
|
50
|
+
*labeledAudioOutputs() {
|
|
51
|
+
yield { address: this.address, label: this.labelField.getValue(), children: () => Option.None };
|
|
52
|
+
}
|
|
53
|
+
terminate() { __classPrivateFieldGet(this, _WerkstattDeviceBoxAdapter_terminator, "f").terminate(); }
|
|
54
|
+
}
|
|
55
|
+
_WerkstattDeviceBoxAdapter_terminator = new WeakMap(), _WerkstattDeviceBoxAdapter_context = new WeakMap(), _WerkstattDeviceBoxAdapter_box = new WeakMap(), _WerkstattDeviceBoxAdapter_parametric = new WeakMap(), _WerkstattDeviceBoxAdapter_codeChanged = new WeakMap();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Observable, UUID } from "@opendaw/lib-std";
|
|
2
|
+
import { Address, BooleanField, StringField } from "@opendaw/lib-box";
|
|
3
|
+
import { ApparatDeviceBox } from "@opendaw/studio-boxes";
|
|
4
|
+
import { DeviceHost, InstrumentDeviceBoxAdapter } from "../../DeviceAdapter";
|
|
5
|
+
import { LabeledAudioOutput } from "../../LabeledAudioOutputsOwner";
|
|
6
|
+
import { BoxAdaptersContext } from "../../BoxAdaptersContext";
|
|
7
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
8
|
+
import { TrackType } from "../../timeline/TrackType";
|
|
9
|
+
import { AudioUnitBoxAdapter } from "../../audio-unit/AudioUnitBoxAdapter";
|
|
10
|
+
export declare class ApparatDeviceBoxAdapter implements InstrumentDeviceBoxAdapter {
|
|
11
|
+
#private;
|
|
12
|
+
readonly type = "instrument";
|
|
13
|
+
readonly accepts = "midi";
|
|
14
|
+
readonly manualUrl = "manuals/devices/instruments/apparat";
|
|
15
|
+
constructor(context: BoxAdaptersContext, box: ApparatDeviceBox);
|
|
16
|
+
get box(): ApparatDeviceBox;
|
|
17
|
+
get uuid(): UUID.Bytes;
|
|
18
|
+
get address(): Address;
|
|
19
|
+
get labelField(): StringField;
|
|
20
|
+
get iconField(): StringField;
|
|
21
|
+
get defaultTrackType(): TrackType;
|
|
22
|
+
get enabledField(): BooleanField;
|
|
23
|
+
get minimizedField(): BooleanField;
|
|
24
|
+
get acceptsMidiEvents(): boolean;
|
|
25
|
+
get parameters(): ParameterAdapterSet;
|
|
26
|
+
get codeChanged(): Observable<void>;
|
|
27
|
+
deviceHost(): DeviceHost;
|
|
28
|
+
audioUnitBoxAdapter(): AudioUnitBoxAdapter;
|
|
29
|
+
labeledAudioOutputs(): Iterable<LabeledAudioOutput>;
|
|
30
|
+
terminate(): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ApparatDeviceBoxAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApparatDeviceBoxAdapter.d.ts","sourceRoot":"","sources":["../../../src/devices/instruments/ApparatDeviceBoxAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAsB,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAC,UAAU,EAAW,0BAA0B,EAAC,MAAM,qBAAqB,CAAA;AACnF,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAA;AAGxE,qBAAa,uBAAwB,YAAW,0BAA0B;;IAGtE,QAAQ,CAAC,IAAI,gBAAe;IAC5B,QAAQ,CAAC,OAAO,UAAS;IACzB,QAAQ,CAAC,SAAS,yCAA2B;gBAOjC,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,gBAAgB;IAS9D,IAAI,GAAG,IAAI,gBAAgB,CAAmB;IAC9C,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,CAAgC;IACtD,IAAI,OAAO,IAAI,OAAO,CAA2B;IACjD,IAAI,UAAU,IAAI,WAAW,CAAyB;IACtD,IAAI,SAAS,IAAI,WAAW,CAAwB;IACpD,IAAI,gBAAgB,IAAI,SAAS,CAAyB;IAC1D,IAAI,YAAY,IAAI,YAAY,CAA2B;IAC3D,IAAI,cAAc,IAAI,YAAY,CAA6B;IAC/D,IAAI,iBAAiB,IAAI,OAAO,CAAc;IAC9C,IAAI,UAAU,IAAI,mBAAmB,CAA0B;IAC/D,IAAI,WAAW,IAAI,UAAU,CAAC,IAAI,CAAC,CAA2B;IAE9D,UAAU,IAAI,UAAU;IAKxB,mBAAmB,IAAI,mBAAmB;IAExC,mBAAmB,IAAI,QAAQ,CAAC,kBAAkB,CAAC;IAIrD,SAAS,IAAI,IAAI;CACpB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 _ApparatDeviceBoxAdapter_terminator, _ApparatDeviceBoxAdapter_context, _ApparatDeviceBoxAdapter_box, _ApparatDeviceBoxAdapter_parametric, _ApparatDeviceBoxAdapter_codeChanged;
|
|
13
|
+
import { Option, Terminator } from "@opendaw/lib-std";
|
|
14
|
+
import { Devices } from "../../DeviceAdapter";
|
|
15
|
+
import { DeviceManualUrls } from "../../DeviceManualUrls";
|
|
16
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
17
|
+
import { TrackType } from "../../timeline/TrackType";
|
|
18
|
+
import { ScriptParamDeclaration } from "../../ScriptParamDeclaration";
|
|
19
|
+
export class ApparatDeviceBoxAdapter {
|
|
20
|
+
constructor(context, box) {
|
|
21
|
+
_ApparatDeviceBoxAdapter_terminator.set(this, new Terminator());
|
|
22
|
+
this.type = "instrument";
|
|
23
|
+
this.accepts = "midi";
|
|
24
|
+
this.manualUrl = DeviceManualUrls.Apparat;
|
|
25
|
+
_ApparatDeviceBoxAdapter_context.set(this, void 0);
|
|
26
|
+
_ApparatDeviceBoxAdapter_box.set(this, void 0);
|
|
27
|
+
_ApparatDeviceBoxAdapter_parametric.set(this, void 0);
|
|
28
|
+
_ApparatDeviceBoxAdapter_codeChanged.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _ApparatDeviceBoxAdapter_context, context, "f");
|
|
30
|
+
__classPrivateFieldSet(this, _ApparatDeviceBoxAdapter_box, box, "f");
|
|
31
|
+
__classPrivateFieldSet(this, _ApparatDeviceBoxAdapter_parametric, __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_terminator, "f").own(new ParameterAdapterSet(__classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_context, "f"))), "f");
|
|
32
|
+
const { terminable, codeChanged } = ScriptParamDeclaration.subscribeScriptParams(__classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_parametric, "f"), box.code, box.parameters);
|
|
33
|
+
__classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_terminator, "f").own(terminable);
|
|
34
|
+
__classPrivateFieldSet(this, _ApparatDeviceBoxAdapter_codeChanged, codeChanged, "f");
|
|
35
|
+
}
|
|
36
|
+
get box() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f"); }
|
|
37
|
+
get uuid() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").address.uuid; }
|
|
38
|
+
get address() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").address; }
|
|
39
|
+
get labelField() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").label; }
|
|
40
|
+
get iconField() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").icon; }
|
|
41
|
+
get defaultTrackType() { return TrackType.Notes; }
|
|
42
|
+
get enabledField() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").enabled; }
|
|
43
|
+
get minimizedField() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").minimized; }
|
|
44
|
+
get acceptsMidiEvents() { return true; }
|
|
45
|
+
get parameters() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_parametric, "f"); }
|
|
46
|
+
get codeChanged() { return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_codeChanged, "f"); }
|
|
47
|
+
deviceHost() {
|
|
48
|
+
return __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_context, "f").boxAdapters
|
|
49
|
+
.adapterFor(__classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_box, "f").host.targetVertex.unwrap("no device-host").box, Devices.isHost);
|
|
50
|
+
}
|
|
51
|
+
audioUnitBoxAdapter() { return this.deviceHost().audioUnitBoxAdapter(); }
|
|
52
|
+
*labeledAudioOutputs() {
|
|
53
|
+
yield { address: this.address, label: this.labelField.getValue(), children: () => Option.None };
|
|
54
|
+
}
|
|
55
|
+
terminate() { __classPrivateFieldGet(this, _ApparatDeviceBoxAdapter_terminator, "f").terminate(); }
|
|
56
|
+
}
|
|
57
|
+
_ApparatDeviceBoxAdapter_terminator = new WeakMap(), _ApparatDeviceBoxAdapter_context = new WeakMap(), _ApparatDeviceBoxAdapter_box = new WeakMap(), _ApparatDeviceBoxAdapter_parametric = new WeakMap(), _ApparatDeviceBoxAdapter_codeChanged = new WeakMap();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Observable, UUID } from "@opendaw/lib-std";
|
|
2
|
+
import { Address, BooleanField, Int32Field, PointerField, StringField } from "@opendaw/lib-box";
|
|
3
|
+
import { SpielwerkDeviceBox } from "@opendaw/studio-boxes";
|
|
4
|
+
import { Pointers } from "@opendaw/studio-enums";
|
|
5
|
+
import { DeviceHost, MidiEffectDeviceAdapter } from "../../DeviceAdapter";
|
|
6
|
+
import { BoxAdaptersContext } from "../../BoxAdaptersContext";
|
|
7
|
+
import { AudioUnitBoxAdapter } from "../../audio-unit/AudioUnitBoxAdapter";
|
|
8
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
9
|
+
export declare class SpielwerkDeviceBoxAdapter implements MidiEffectDeviceAdapter {
|
|
10
|
+
#private;
|
|
11
|
+
readonly type = "midi-effect";
|
|
12
|
+
readonly accepts = "midi";
|
|
13
|
+
readonly manualUrl = "manuals/devices/midi/spielwerk";
|
|
14
|
+
constructor(context: BoxAdaptersContext, box: SpielwerkDeviceBox);
|
|
15
|
+
get box(): SpielwerkDeviceBox;
|
|
16
|
+
get uuid(): UUID.Bytes;
|
|
17
|
+
get address(): Address;
|
|
18
|
+
get indexField(): Int32Field;
|
|
19
|
+
get labelField(): StringField;
|
|
20
|
+
get enabledField(): BooleanField;
|
|
21
|
+
get minimizedField(): BooleanField;
|
|
22
|
+
get host(): PointerField<Pointers.MIDIEffectHost>;
|
|
23
|
+
get parameters(): ParameterAdapterSet;
|
|
24
|
+
get codeChanged(): Observable<void>;
|
|
25
|
+
deviceHost(): DeviceHost;
|
|
26
|
+
audioUnitBoxAdapter(): AudioUnitBoxAdapter;
|
|
27
|
+
terminate(): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=SpielwerkDeviceBoxAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpielwerkDeviceBoxAdapter.d.ts","sourceRoot":"","sources":["../../../src/devices/midi-effects/SpielwerkDeviceBoxAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAsB,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAC7F,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAC,UAAU,EAAW,uBAAuB,EAAC,MAAM,qBAAqB,CAAA;AAChF,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAA;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAA;AAG7D,qBAAa,yBAA0B,YAAW,uBAAuB;;IAGrE,QAAQ,CAAC,IAAI,iBAAgB;IAC7B,QAAQ,CAAC,OAAO,UAAS;IACzB,QAAQ,CAAC,SAAS,oCAA6B;gBAOnC,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,kBAAkB;IAShE,IAAI,GAAG,IAAI,kBAAkB,CAAmB;IAChD,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,CAAgC;IACtD,IAAI,OAAO,IAAI,OAAO,CAA2B;IACjD,IAAI,UAAU,IAAI,UAAU,CAAyB;IACrD,IAAI,UAAU,IAAI,WAAW,CAAyB;IACtD,IAAI,YAAY,IAAI,YAAY,CAA2B;IAC3D,IAAI,cAAc,IAAI,YAAY,CAA6B;IAC/D,IAAI,IAAI,IAAI,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAwB;IACzE,IAAI,UAAU,IAAI,mBAAmB,CAA0B;IAC/D,IAAI,WAAW,IAAI,UAAU,CAAC,IAAI,CAAC,CAA2B;IAE9D,UAAU,IAAI,UAAU;IAKxB,mBAAmB,IAAI,mBAAmB;IAE1C,SAAS,IAAI,IAAI;CACpB"}
|
|
@@ -0,0 +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 _SpielwerkDeviceBoxAdapter_terminator, _SpielwerkDeviceBoxAdapter_context, _SpielwerkDeviceBoxAdapter_box, _SpielwerkDeviceBoxAdapter_parametric, _SpielwerkDeviceBoxAdapter_codeChanged;
|
|
13
|
+
import { Terminator } from "@opendaw/lib-std";
|
|
14
|
+
import { Devices } from "../../DeviceAdapter";
|
|
15
|
+
import { DeviceManualUrls } from "../../DeviceManualUrls";
|
|
16
|
+
import { ParameterAdapterSet } from "../../ParameterAdapterSet";
|
|
17
|
+
import { ScriptParamDeclaration } from "../../ScriptParamDeclaration";
|
|
18
|
+
export class SpielwerkDeviceBoxAdapter {
|
|
19
|
+
constructor(context, box) {
|
|
20
|
+
_SpielwerkDeviceBoxAdapter_terminator.set(this, new Terminator());
|
|
21
|
+
this.type = "midi-effect";
|
|
22
|
+
this.accepts = "midi";
|
|
23
|
+
this.manualUrl = DeviceManualUrls.Spielwerk;
|
|
24
|
+
_SpielwerkDeviceBoxAdapter_context.set(this, void 0);
|
|
25
|
+
_SpielwerkDeviceBoxAdapter_box.set(this, void 0);
|
|
26
|
+
_SpielwerkDeviceBoxAdapter_parametric.set(this, void 0);
|
|
27
|
+
_SpielwerkDeviceBoxAdapter_codeChanged.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _SpielwerkDeviceBoxAdapter_context, context, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _SpielwerkDeviceBoxAdapter_box, box, "f");
|
|
30
|
+
__classPrivateFieldSet(this, _SpielwerkDeviceBoxAdapter_parametric, __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_terminator, "f").own(new ParameterAdapterSet(__classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_context, "f"))), "f");
|
|
31
|
+
const { terminable, codeChanged } = ScriptParamDeclaration.subscribeScriptParams(__classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_parametric, "f"), box.code, box.parameters);
|
|
32
|
+
__classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_terminator, "f").own(terminable);
|
|
33
|
+
__classPrivateFieldSet(this, _SpielwerkDeviceBoxAdapter_codeChanged, codeChanged, "f");
|
|
34
|
+
}
|
|
35
|
+
get box() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f"); }
|
|
36
|
+
get uuid() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").address.uuid; }
|
|
37
|
+
get address() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").address; }
|
|
38
|
+
get indexField() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").index; }
|
|
39
|
+
get labelField() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").label; }
|
|
40
|
+
get enabledField() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").enabled; }
|
|
41
|
+
get minimizedField() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").minimized; }
|
|
42
|
+
get host() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").host; }
|
|
43
|
+
get parameters() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_parametric, "f"); }
|
|
44
|
+
get codeChanged() { return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_codeChanged, "f"); }
|
|
45
|
+
deviceHost() {
|
|
46
|
+
return __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_context, "f").boxAdapters
|
|
47
|
+
.adapterFor(__classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_box, "f").host.targetVertex.unwrap("no device-host").box, Devices.isHost);
|
|
48
|
+
}
|
|
49
|
+
audioUnitBoxAdapter() { return this.deviceHost().audioUnitBoxAdapter(); }
|
|
50
|
+
terminate() { __classPrivateFieldGet(this, _SpielwerkDeviceBoxAdapter_terminator, "f").terminate(); }
|
|
51
|
+
}
|
|
52
|
+
_SpielwerkDeviceBoxAdapter_terminator = new WeakMap(), _SpielwerkDeviceBoxAdapter_context = new WeakMap(), _SpielwerkDeviceBoxAdapter_box = new WeakMap(), _SpielwerkDeviceBoxAdapter_parametric = new WeakMap(), _SpielwerkDeviceBoxAdapter_codeChanged = new WeakMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceFactory.d.ts","sourceRoot":"","sources":["../../src/factories/DeviceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAEhD,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC9B"}
|
|
1
|
+
{"version":3,"file":"DeviceFactory.d.ts","sourceRoot":"","sources":["../../src/factories/DeviceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAEhD,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAA;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC9B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
2
|
-
export type InstrumentBox = TapeDeviceBox | VaporisateurDeviceBox | NanoDeviceBox | PlayfieldDeviceBox | SoundfontDeviceBox | MIDIOutputDeviceBox;
|
|
1
|
+
import { ApparatDeviceBox, MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
2
|
+
export type InstrumentBox = ApparatDeviceBox | TapeDeviceBox | VaporisateurDeviceBox | NanoDeviceBox | PlayfieldDeviceBox | SoundfontDeviceBox | MIDIOutputDeviceBox;
|
|
3
3
|
//# sourceMappingURL=InstrumentBox.d.ts.map
|
|
@@ -1 +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,GACnB,aAAa,GACb,qBAAqB,GACrB,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"InstrumentBox.d.ts","sourceRoot":"","sources":["../../src/factories/InstrumentBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACxB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,aAAa,GACnB,gBAAgB,GAChB,aAAa,GACb,qBAAqB,GACrB,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AudioFileBox, MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
1
|
+
import { ApparatDeviceBox, AudioFileBox, MIDIOutputDeviceBox, NanoDeviceBox, PlayfieldDeviceBox, SoundfontDeviceBox, TapeDeviceBox, VaporisateurDeviceBox } from "@opendaw/studio-boxes";
|
|
2
2
|
import { byte, UUID } from "@opendaw/lib-std";
|
|
3
3
|
import { InstrumentFactory } from "./InstrumentFactory";
|
|
4
4
|
export declare namespace InstrumentFactories {
|
|
@@ -18,16 +18,18 @@ export declare namespace InstrumentFactories {
|
|
|
18
18
|
uuid: UUID.String;
|
|
19
19
|
name: string;
|
|
20
20
|
}, SoundfontDeviceBox>;
|
|
21
|
+
const Apparat: InstrumentFactory<void, ApparatDeviceBox>;
|
|
21
22
|
const Named: {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
Apparat: InstrumentFactory<void, ApparatDeviceBox>;
|
|
24
|
+
MIDIOutput: InstrumentFactory<void, MIDIOutputDeviceBox>;
|
|
24
25
|
Nano: InstrumentFactory<AudioFileBox, NanoDeviceBox>;
|
|
25
|
-
|
|
26
|
+
Playfield: InstrumentFactory<PlayfieldAttachment, PlayfieldDeviceBox>;
|
|
26
27
|
Soundfont: InstrumentFactory<{
|
|
27
28
|
uuid: UUID.String;
|
|
28
29
|
name: string;
|
|
29
30
|
}, SoundfontDeviceBox>;
|
|
30
|
-
|
|
31
|
+
Tape: InstrumentFactory<void, TapeDeviceBox>;
|
|
32
|
+
Vaporisateur: InstrumentFactory<void, VaporisateurDeviceBox>;
|
|
31
33
|
};
|
|
32
34
|
type Keys = keyof typeof Named;
|
|
33
35
|
}
|
|
@@ -1 +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,EAA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