@opendaw/studio-core 0.0.7 → 0.0.9

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.
Files changed (42) hide show
  1. package/dist/ColorCodes.d.ts +7 -0
  2. package/dist/ColorCodes.d.ts.map +1 -0
  3. package/dist/ColorCodes.js +32 -0
  4. package/dist/Colors.d.ts +15 -0
  5. package/dist/Colors.d.ts.map +1 -0
  6. package/dist/Colors.js +15 -0
  7. package/dist/Effects.d.ts +154 -0
  8. package/dist/Effects.d.ts.map +1 -0
  9. package/dist/Effects.js +166 -0
  10. package/dist/EngineWorklet.d.ts +0 -2
  11. package/dist/EngineWorklet.d.ts.map +1 -1
  12. package/dist/EngineWorklet.js +0 -4
  13. package/dist/MeterWorklet.d.ts +1 -4
  14. package/dist/MeterWorklet.d.ts.map +1 -1
  15. package/dist/MeterWorklet.js +1 -8
  16. package/dist/Modifier.d.ts +21 -0
  17. package/dist/Modifier.d.ts.map +1 -0
  18. package/dist/Modifier.js +168 -0
  19. package/dist/RecordingWorklet.d.ts +2 -5
  20. package/dist/RecordingWorklet.d.ts.map +1 -1
  21. package/dist/RecordingWorklet.js +2 -13
  22. package/dist/RenderQuantum.d.ts +2 -0
  23. package/dist/RenderQuantum.d.ts.map +1 -0
  24. package/dist/RenderQuantum.js +1 -0
  25. package/dist/Worklets.d.ts +3 -9
  26. package/dist/Worklets.d.ts.map +1 -1
  27. package/dist/Worklets.js +13 -18
  28. package/dist/index.d.ts +4 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +4 -1
  31. package/dist/processors.js +6 -0
  32. package/dist/processors.js.map +7 -0
  33. package/package.json +20 -24
  34. package/dist/WorkletFactory.d.ts +0 -8
  35. package/dist/WorkletFactory.d.ts.map +0 -1
  36. package/dist/WorkletFactory.js +0 -9
  37. package/dist/engine-processor.js +0 -6
  38. package/dist/engine-processor.js.map +0 -7
  39. package/dist/meter-processor.js +0 -2
  40. package/dist/meter-processor.js.map +0 -7
  41. package/dist/recording-processor.js +0 -4
  42. package/dist/recording-processor.js.map +0 -7
@@ -0,0 +1,7 @@
1
+ import { AudioUnitType } from "@opendaw/studio-enums";
2
+ import { TrackType } from "@opendaw/studio-adapters";
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/ColorCodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAGlD,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 { TrackType } from "@opendaw/studio-adapters";
3
+ import { Colors } from "./Colors";
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/Colors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAA"}
package/dist/Colors.js ADDED
@@ -0,0 +1,15 @@
1
+ const computedStyle = getComputedStyle(document.documentElement);
2
+ export const Colors = {
3
+ blue: computedStyle.getPropertyValue("--color-blue"),
4
+ green: computedStyle.getPropertyValue("--color-green"),
5
+ yellow: computedStyle.getPropertyValue("--color-yellow"),
6
+ cream: computedStyle.getPropertyValue("--color-cream"),
7
+ orange: computedStyle.getPropertyValue("--color-orange"),
8
+ red: computedStyle.getPropertyValue("--color-red"),
9
+ purple: computedStyle.getPropertyValue("--color-purple"),
10
+ bright: computedStyle.getPropertyValue("--color-bright"),
11
+ gray: computedStyle.getPropertyValue("--color-gray"),
12
+ dark: computedStyle.getPropertyValue("--color-dark"),
13
+ shadow: computedStyle.getPropertyValue("--color-shadow"),
14
+ black: computedStyle.getPropertyValue("--color-black")
15
+ };
@@ -0,0 +1,154 @@
1
+ import { int } from "@opendaw/lib-std";
2
+ import { Box, Field } from "@opendaw/lib-box";
3
+ import { ArpeggioDeviceBox, DelayDeviceBox, ModularDeviceBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
4
+ import { EffectPointerType, IconSymbol } from "@opendaw/studio-adapters";
5
+ import { Project } from "./Project";
6
+ export declare namespace Effects {
7
+ interface Entry {
8
+ get name(): string;
9
+ get description(): string;
10
+ get icon(): IconSymbol;
11
+ get separatorBefore(): boolean;
12
+ get type(): "audio" | "midi";
13
+ create(project: Project, unit: Field<EffectPointerType>, index: int): Box;
14
+ }
15
+ const MidiNamed: {
16
+ arpeggio: {
17
+ name: string;
18
+ description: string;
19
+ icon: IconSymbol.Stack;
20
+ separatorBefore: false;
21
+ type: "midi";
22
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ArpeggioDeviceBox;
23
+ };
24
+ pitch: {
25
+ name: string;
26
+ description: string;
27
+ icon: IconSymbol.Note;
28
+ separatorBefore: false;
29
+ type: "midi";
30
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => PitchDeviceBox;
31
+ };
32
+ Zeitgeist: {
33
+ name: string;
34
+ description: string;
35
+ icon: IconSymbol.Zeitgeist;
36
+ separatorBefore: false;
37
+ type: "midi";
38
+ create: ({ boxGraph, rootBoxAdapter }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ZeitgeistDeviceBox;
39
+ };
40
+ };
41
+ const AudioNamed: {
42
+ StereoTool: {
43
+ name: string;
44
+ description: string;
45
+ icon: IconSymbol.Stereo;
46
+ separatorBefore: false;
47
+ type: "audio";
48
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => StereoToolDeviceBox;
49
+ };
50
+ Delay: {
51
+ name: string;
52
+ description: string;
53
+ icon: IconSymbol.Time;
54
+ separatorBefore: false;
55
+ type: "audio";
56
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => DelayDeviceBox;
57
+ };
58
+ Reverb: {
59
+ name: string;
60
+ description: string;
61
+ icon: IconSymbol.Cube;
62
+ separatorBefore: false;
63
+ type: "audio";
64
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ReverbDeviceBox;
65
+ };
66
+ Revamp: {
67
+ name: string;
68
+ description: string;
69
+ icon: IconSymbol.EQ;
70
+ separatorBefore: false;
71
+ type: "audio";
72
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => RevampDeviceBox;
73
+ };
74
+ Modular: {
75
+ name: string;
76
+ description: string;
77
+ icon: IconSymbol.Box;
78
+ separatorBefore: true;
79
+ type: "audio";
80
+ create: (project: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ModularDeviceBox;
81
+ };
82
+ };
83
+ const MidiList: ReadonlyArray<Readonly<Entry>>;
84
+ const AudioList: ReadonlyArray<Readonly<Entry>>;
85
+ const MergedNamed: {
86
+ StereoTool: {
87
+ name: string;
88
+ description: string;
89
+ icon: IconSymbol.Stereo;
90
+ separatorBefore: false;
91
+ type: "audio";
92
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => StereoToolDeviceBox;
93
+ };
94
+ Delay: {
95
+ name: string;
96
+ description: string;
97
+ icon: IconSymbol.Time;
98
+ separatorBefore: false;
99
+ type: "audio";
100
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => DelayDeviceBox;
101
+ };
102
+ Reverb: {
103
+ name: string;
104
+ description: string;
105
+ icon: IconSymbol.Cube;
106
+ separatorBefore: false;
107
+ type: "audio";
108
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ReverbDeviceBox;
109
+ };
110
+ Revamp: {
111
+ name: string;
112
+ description: string;
113
+ icon: IconSymbol.EQ;
114
+ separatorBefore: false;
115
+ type: "audio";
116
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => RevampDeviceBox;
117
+ };
118
+ Modular: {
119
+ name: string;
120
+ description: string;
121
+ icon: IconSymbol.Box;
122
+ separatorBefore: true;
123
+ type: "audio";
124
+ create: (project: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ModularDeviceBox;
125
+ };
126
+ arpeggio: {
127
+ name: string;
128
+ description: string;
129
+ icon: IconSymbol.Stack;
130
+ separatorBefore: false;
131
+ type: "midi";
132
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ArpeggioDeviceBox;
133
+ };
134
+ pitch: {
135
+ name: string;
136
+ description: string;
137
+ icon: IconSymbol.Note;
138
+ separatorBefore: false;
139
+ type: "midi";
140
+ create: ({ boxGraph }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => PitchDeviceBox;
141
+ };
142
+ Zeitgeist: {
143
+ name: string;
144
+ description: string;
145
+ icon: IconSymbol.Zeitgeist;
146
+ separatorBefore: false;
147
+ type: "midi";
148
+ create: ({ boxGraph, rootBoxAdapter }: Project, unit: Field<EffectPointerType, import("@opendaw/lib-box").Fields>, index: number) => ZeitgeistDeviceBox;
149
+ };
150
+ };
151
+ type MidiEffectKeys = keyof typeof MidiNamed;
152
+ type AudioEffectKeys = keyof typeof AudioNamed;
153
+ }
154
+ //# sourceMappingURL=Effects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Effects.d.ts","sourceRoot":"","sources":["../src/Effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAuB,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAC,GAAG,EAAE,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EACH,iBAAiB,EACjB,cAAc,EAKd,gBAAgB,EAEhB,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,iBAAiB,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,yBAAiB,OAAO,CAAC;IACrB,UAAiB,KAAK;QAClB,IAAI,IAAI,IAAI,MAAM,CAAA;QAClB,IAAI,WAAW,IAAI,MAAM,CAAA;QACzB,IAAI,IAAI,IAAI,UAAU,CAAA;QACtB,IAAI,eAAe,IAAI,OAAO,CAAA;QAC9B,IAAI,IAAI,IAAI,OAAO,GAAG,MAAM,CAAA;QAE5B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAAA;KAC5E;IAEM,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;KA+CrB,CAAA;IAEM,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4GtB,CAAA;IAEM,MAAM,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA4B,CAAA;IACzE,MAAM,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA6B,CAAA;IAC3E,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAgC,CAAA;IAExD,KAAY,cAAc,GAAG,MAAM,OAAO,SAAS,CAAA;IACnD,KAAY,eAAe,GAAG,MAAM,OAAO,UAAU,CAAA;CACxD"}
@@ -0,0 +1,166 @@
1
+ import { INVERSE_SQRT_2, UUID } from "@opendaw/lib-std";
2
+ import { ArpeggioDeviceBox, DelayDeviceBox, GrooveShuffleBox, ModularAudioInputBox, ModularAudioOutputBox, ModularBox, ModularDeviceBox, ModuleConnectionBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
3
+ import { IconSymbol } from "@opendaw/studio-adapters";
4
+ export var Effects;
5
+ (function (Effects) {
6
+ Effects.MidiNamed = {
7
+ arpeggio: {
8
+ name: "Arpeggio",
9
+ description: "Generates rhythmic note sequences from chords",
10
+ icon: IconSymbol.Stack,
11
+ separatorBefore: false,
12
+ type: "midi",
13
+ create: ({ boxGraph }, unit, index) => ArpeggioDeviceBox.create(boxGraph, UUID.generate(), box => {
14
+ box.label.setValue("Arpeggio");
15
+ box.index.setValue(index);
16
+ box.host.refer(unit);
17
+ })
18
+ },
19
+ pitch: {
20
+ name: "Pitch",
21
+ description: "Shifts the pitch of incoming notes",
22
+ icon: IconSymbol.Note,
23
+ separatorBefore: false,
24
+ type: "midi",
25
+ create: ({ boxGraph }, unit, index) => PitchDeviceBox.create(boxGraph, UUID.generate(), box => {
26
+ box.label.setValue("Pitch");
27
+ box.index.setValue(index);
28
+ box.host.refer(unit);
29
+ })
30
+ },
31
+ Zeitgeist: {
32
+ name: "Zeitgeist",
33
+ description: "Distorts space and time",
34
+ icon: IconSymbol.Zeitgeist,
35
+ separatorBefore: false,
36
+ type: "midi",
37
+ create: ({ boxGraph, rootBoxAdapter }, unit, index) => {
38
+ const useGlobal = false; // TODO First Zeitgeist should be true
39
+ const shuffleBox = useGlobal
40
+ ? rootBoxAdapter.groove.box
41
+ : GrooveShuffleBox.create(boxGraph, UUID.generate(), box => {
42
+ box.label.setValue("Shuffle");
43
+ box.duration.setValue(480);
44
+ });
45
+ return ZeitgeistDeviceBox.create(boxGraph, UUID.generate(), box => {
46
+ box.label.setValue("Zeitgeist");
47
+ box.groove.refer(shuffleBox);
48
+ box.index.setValue(index);
49
+ box.host.refer(unit);
50
+ });
51
+ }
52
+ }
53
+ };
54
+ Effects.AudioNamed = {
55
+ StereoTool: {
56
+ name: "Stereo Tool",
57
+ description: "Computes a stereo transformation matrix with volume, panning, phase inversion and stereo width.",
58
+ icon: IconSymbol.Stereo,
59
+ separatorBefore: false,
60
+ type: "audio",
61
+ create: ({ boxGraph }, unit, index) => StereoToolDeviceBox.create(boxGraph, UUID.generate(), box => {
62
+ box.label.setValue("Stereo Tool");
63
+ box.index.setValue(index);
64
+ box.host.refer(unit);
65
+ })
66
+ },
67
+ Delay: {
68
+ name: "Delay",
69
+ description: "Echoes the input signal with time-based repeats",
70
+ icon: IconSymbol.Time,
71
+ separatorBefore: false,
72
+ type: "audio",
73
+ create: ({ boxGraph }, unit, index) => DelayDeviceBox.create(boxGraph, UUID.generate(), box => {
74
+ box.label.setValue("Delay");
75
+ box.index.setValue(index);
76
+ box.host.refer(unit);
77
+ })
78
+ },
79
+ Reverb: {
80
+ name: "Reverb",
81
+ description: "Simulates space and depth with reflections",
82
+ icon: IconSymbol.Cube,
83
+ separatorBefore: false,
84
+ type: "audio",
85
+ create: ({ boxGraph }, unit, index) => ReverbDeviceBox.create(boxGraph, UUID.generate(), box => {
86
+ box.label.setValue("Reverb");
87
+ box.preDelay.setInitValue(0.001);
88
+ box.index.setValue(index);
89
+ box.host.refer(unit);
90
+ })
91
+ },
92
+ Revamp: {
93
+ name: "Revamp",
94
+ description: "Shapes the frequency balance of the sound",
95
+ icon: IconSymbol.EQ,
96
+ separatorBefore: false,
97
+ type: "audio",
98
+ create: ({ boxGraph }, unit, index) => RevampDeviceBox.create(boxGraph, UUID.generate(), box => {
99
+ box.label.setValue("Revamp");
100
+ box.highPass.frequency.setInitValue(40.0);
101
+ box.highPass.order.setInitValue(2);
102
+ box.highPass.q.setInitValue(INVERSE_SQRT_2);
103
+ box.highPass.enabled.setInitValue(true);
104
+ box.lowShelf.frequency.setInitValue(80.0);
105
+ box.lowShelf.gain.setInitValue(6);
106
+ box.lowBell.frequency.setInitValue(120.0);
107
+ box.lowBell.gain.setInitValue(6);
108
+ box.lowBell.q.setInitValue(INVERSE_SQRT_2);
109
+ box.midBell.frequency.setInitValue(640.0);
110
+ box.midBell.q.setInitValue(INVERSE_SQRT_2);
111
+ box.midBell.gain.setInitValue(6);
112
+ box.highBell.frequency.setInitValue(3600.0);
113
+ box.highBell.q.setInitValue(INVERSE_SQRT_2);
114
+ box.highBell.gain.setInitValue(6);
115
+ box.highShelf.frequency.setInitValue(10000.0);
116
+ box.highShelf.gain.setInitValue(6);
117
+ box.lowPass.frequency.setInitValue(15000.0);
118
+ box.lowPass.order.setInitValue(2);
119
+ box.lowPass.q.setInitValue(INVERSE_SQRT_2);
120
+ box.index.setValue(index);
121
+ box.host.refer(unit);
122
+ })
123
+ },
124
+ Modular: {
125
+ name: "🔇 Create New Modular Audio Effect (inaudible yet)",
126
+ description: "",
127
+ icon: IconSymbol.Box,
128
+ separatorBefore: true,
129
+ type: "audio",
130
+ create: (project, unit, index) => {
131
+ const graph = project.boxGraph;
132
+ const moduleSetupBox = ModularBox.create(graph, UUID.generate(), box => {
133
+ box.collection.refer(project.rootBox.modularSetups);
134
+ box.label.setValue("Modular");
135
+ });
136
+ const modularInput = ModularAudioInputBox.create(graph, UUID.generate(), box => {
137
+ box.attributes.collection.refer(moduleSetupBox.modules);
138
+ box.attributes.label.setValue("Modular Input");
139
+ box.attributes.x.setValue(-256);
140
+ box.attributes.y.setValue(32);
141
+ });
142
+ const modularOutput = ModularAudioOutputBox.create(graph, UUID.generate(), box => {
143
+ box.attributes.collection.refer(moduleSetupBox.modules);
144
+ box.attributes.label.setValue("Modular Output");
145
+ box.attributes.x.setValue(256);
146
+ box.attributes.y.setValue(32);
147
+ });
148
+ ModuleConnectionBox.create(graph, UUID.generate(), box => {
149
+ box.collection.refer(moduleSetupBox.connections);
150
+ box.source.refer(modularInput.output);
151
+ box.target.refer(modularOutput.input);
152
+ });
153
+ project.userEditingManager.modularSystem.edit(moduleSetupBox.editing);
154
+ return ModularDeviceBox.create(graph, UUID.generate(), box => {
155
+ box.label.setValue("Modular");
156
+ box.modularSetup.refer(moduleSetupBox.device);
157
+ box.index.setValue(index);
158
+ box.host.refer(unit);
159
+ });
160
+ }
161
+ }
162
+ };
163
+ Effects.MidiList = Object.values(Effects.MidiNamed);
164
+ Effects.AudioList = Object.values(Effects.AudioNamed);
165
+ Effects.MergedNamed = { ...Effects.MidiNamed, ...Effects.AudioNamed };
166
+ })(Effects || (Effects = {}));
@@ -2,10 +2,8 @@ import { byte, DefaultObservableValue, int, MutableObservableValue, Nullable, Ob
2
2
  import { ppqn } from "@opendaw/lib-dsp";
3
3
  import { ClipNotification, ExportStemsConfiguration } from "@opendaw/studio-adapters";
4
4
  import { Project } from "./Project";
5
- import { WorkletFactory } from "./WorkletFactory";
6
5
  export declare class EngineWorklet extends AudioWorkletNode {
7
6
  #private;
8
- static bootFactory(context: BaseAudioContext, url: string): Promise<WorkletFactory<EngineWorklet>>;
9
7
  static ID: int;
10
8
  readonly id: number;
11
9
  constructor(context: BaseAudioContext, project: Readonly<Project>, exportConfiguration?: ExportStemsConfiguration);
@@ -1 +1 @@
1
- {"version":3,"file":"EngineWorklet.d.ts","sourceRoot":"","sources":["../src/EngineWorklet.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,IAAI,EACJ,sBAAsB,EACtB,GAAG,EACH,sBAAsB,EAEtB,QAAQ,EACR,QAAQ,EAER,YAAY,EAGZ,SAAS,EACT,IAAI,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAEH,gBAAgB,EAOhB,wBAAwB,EAC3B,MAAM,0BAA0B,CAAA;AAKjC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAE/C,qBAAa,aAAc,SAAQ,gBAAgB;;IAC/C,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAIlG,MAAM,CAAC,EAAE,EAAE,GAAG,CAAQ;IAEtB,QAAQ,CAAC,EAAE,SAAqB;gBAgBpB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,EAC1B,mBAAmB,CAAC,EAAE,wBAAwB;IA2G1D,IAAI,IAAI,IAAI;IASZ,KAAK,IAAI,IAAI;IACb,SAAS,IAAI,sBAAsB,CAAC,OAAO,CAAC;IAC5C,WAAW,IAAI,sBAAsB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AC;IAInE,SAAS,IAAI,IAAI;CAKpB"}
@@ -3,11 +3,7 @@ import { EngineStateSchema, ExportStemsConfiguration } from "@opendaw/studio-ada
3
3
  import { SyncSource } from "@opendaw/lib-box";
4
4
  import { AnimationFrame } from "@opendaw/lib-dom";
5
5
  import { Communicator, Messenger } from "@opendaw/lib-runtime";
6
- import { WorkletFactory } from "./WorkletFactory";
7
6
  export class EngineWorklet extends AudioWorkletNode {
8
- static bootFactory(context, url) {
9
- return WorkletFactory.boot(context, url);
10
- }
11
7
  static ID = 0 | 0;
12
8
  id = EngineWorklet.ID++;
13
9
  #terminator = new Terminator();
@@ -1,14 +1,11 @@
1
1
  import { int, Observer, Subscription, Terminable } from "@opendaw/lib-std";
2
- import { WorkletFactory } from "./WorkletFactory";
3
2
  export type PeakSchema = {
4
3
  peak: Float32Array;
5
4
  rms: Float32Array;
6
5
  };
7
6
  export declare class MeterWorklet extends AudioWorkletNode implements Terminable {
8
7
  #private;
9
- static bootFactory(context: BaseAudioContext, url: string): Promise<WorkletFactory<MeterWorklet>>;
10
- static create(factory: WorkletFactory<MeterWorklet>, numChannels: int): MeterWorklet;
11
- private constructor();
8
+ constructor(context: BaseAudioContext, numberOfChannels: int);
12
9
  subscribe(observer: Observer<PeakSchema>): Subscription;
13
10
  terminate(): void;
14
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MeterWorklet.d.ts","sourceRoot":"","sources":["../src/MeterWorklet.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAY,QAAQ,EAAU,YAAY,EAAc,UAAU,EAAa,MAAM,kBAAkB,CAAA;AAElH,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAE/C,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,YAAY,CAAA;CAAE,CAAA;AAElE,qBAAa,YAAa,SAAQ,gBAAiB,YAAW,UAAU;;WACvD,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAIvG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,GAAG,GAAG,YAAY;IAOpF,OAAO;IAmBP,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY;IAEvD,SAAS,IAAI,IAAI;CACpB"}
1
+ {"version":3,"file":"MeterWorklet.d.ts","sourceRoot":"","sources":["../src/MeterWorklet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAY,QAAQ,EAAU,YAAY,EAAc,UAAU,EAAa,MAAM,kBAAkB,CAAA;AAIlH,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,YAAY,CAAA;CAAE,CAAA;AAElE,qBAAa,YAAa,SAAQ,gBAAiB,YAAW,UAAU;;gBAIxD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG;IAmB5D,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY;IAEvD,SAAS,IAAI,IAAI;CACpB"}
@@ -1,13 +1,6 @@
1
1
  import { Notifier, Schema, SyncStream, Terminator } from "@opendaw/lib-std";
2
2
  import { AnimationFrame } from "@opendaw/lib-dom";
3
- import { WorkletFactory } from "./WorkletFactory";
4
3
  export class MeterWorklet extends AudioWorkletNode {
5
- static async bootFactory(context, url) {
6
- return WorkletFactory.boot(context, url);
7
- }
8
- static create(factory, numChannels) {
9
- return factory.create(context => new MeterWorklet(context, numChannels));
10
- }
11
4
  #terminator = new Terminator();
12
5
  #notifier = new Notifier();
13
6
  constructor(context, numberOfChannels) {
@@ -15,7 +8,7 @@ export class MeterWorklet extends AudioWorkletNode {
15
8
  peak: Schema.floats(numberOfChannels),
16
9
  rms: Schema.floats(numberOfChannels)
17
10
  })(), (data) => this.#notifier.notify(data));
18
- super(context, "peak-meter-processor", {
11
+ super(context, "meter-processor", {
19
12
  numberOfInputs: 1,
20
13
  channelCount: numberOfChannels,
21
14
  channelCountMode: "explicit",
@@ -0,0 +1,21 @@
1
+ import { int, Option } from "@opendaw/lib-std";
2
+ import { ppqn } from "@opendaw/lib-dsp";
3
+ import { AudioUnitType } from "@opendaw/studio-enums";
4
+ import { AudioBusBox, AudioUnitBox, NoteRegionBox, ValueRegionBox } from "@opendaw/studio-boxes";
5
+ import { AnyClipBox, AudioUnitBoxAdapter, DeviceHost, IconSymbol, RootBoxAdapter, TrackClips, TrackRegions } from "@opendaw/studio-adapters";
6
+ import { Project } from "./Project";
7
+ import { Effects } from "./Effects";
8
+ export declare namespace Modifier {
9
+ const createAudioUnit: ({ boxGraph, rootBox, rootBoxAdapter, masterBusBox }: Project, type: AudioUnitType, index?: int) => AudioUnitBox;
10
+ const pushAudioUnitsIndices: (rootBoxAdapter: RootBoxAdapter, type: AudioUnitType, count?: int) => int;
11
+ const deleteAudioUnit: ({ rootBoxAdapter }: Project, adapter: AudioUnitBoxAdapter) => void;
12
+ const createAudioBus: (project: Project, name: string, icon: IconSymbol, type: AudioUnitType, color: string) => AudioBusBox;
13
+ const createEffect: (project: Project, host: DeviceHost, entry: Effects.Entry, newIndex: int) => Option<import("@opendaw/lib-box").Box<import("@opendaw/lib-box").PointerTypes, any>>;
14
+ const createClip: (clips: TrackClips, clipIndex: int, { name }?: {
15
+ name?: string;
16
+ }) => Option<AnyClipBox>;
17
+ const createRegion: (regions: TrackRegions, position: ppqn, duration: ppqn, { name }?: {
18
+ name?: string;
19
+ }) => Option<NoteRegionBox> | Option<ValueRegionBox>;
20
+ }
21
+ //# sourceMappingURL=Modifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modifier.d.ts","sourceRoot":"","sources":["../src/Modifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAE,MAAM,EAAc,MAAM,kBAAkB,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