@opendaw/studio-core 0.0.84 → 0.0.86

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 (89) hide show
  1. package/dist/EffectBox.d.ts +2 -2
  2. package/dist/EffectBox.d.ts.map +1 -1
  3. package/dist/EffectFactories.d.ts +3 -2
  4. package/dist/EffectFactories.d.ts.map +1 -1
  5. package/dist/EffectFactories.js +30 -3
  6. package/dist/EffectFactory.d.ts +2 -7
  7. package/dist/EffectFactory.d.ts.map +1 -1
  8. package/dist/Engine.d.ts +5 -6
  9. package/dist/Engine.d.ts.map +1 -1
  10. package/dist/EngineFacade.d.ts +5 -6
  11. package/dist/EngineFacade.d.ts.map +1 -1
  12. package/dist/EngineFacade.js +12 -9
  13. package/dist/EngineWorklet.d.ts +4 -5
  14. package/dist/EngineWorklet.d.ts.map +1 -1
  15. package/dist/EngineWorklet.js +11 -20
  16. package/dist/RecordingWorklet.d.ts.map +1 -1
  17. package/dist/RecordingWorklet.js +7 -10
  18. package/dist/Storage.d.ts.map +1 -1
  19. package/dist/Storage.js +14 -5
  20. package/dist/StudioPreferences.d.ts +21 -0
  21. package/dist/StudioPreferences.d.ts.map +1 -0
  22. package/dist/StudioPreferences.js +3 -0
  23. package/dist/StudioSettings.d.ts +24 -0
  24. package/dist/StudioSettings.d.ts.map +1 -0
  25. package/dist/StudioSettings.js +22 -0
  26. package/dist/WavFile.js +4 -3
  27. package/dist/capture/Capture.d.ts +4 -1
  28. package/dist/capture/Capture.d.ts.map +1 -1
  29. package/dist/capture/Capture.js +4 -0
  30. package/dist/capture/CaptureAudio.js +5 -5
  31. package/dist/capture/RecordAudio.d.ts.map +1 -1
  32. package/dist/capture/RecordAudio.js +4 -2
  33. package/dist/capture/RecordMidi.d.ts.map +1 -1
  34. package/dist/capture/RecordMidi.js +1 -0
  35. package/dist/capture/Recording.d.ts.map +1 -1
  36. package/dist/capture/Recording.js +1 -0
  37. package/dist/dawproject/DawProjectExporter.test.js +1 -0
  38. package/dist/index.d.ts +2 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +2 -1
  41. package/dist/midi/MIDILearning.d.ts.map +1 -1
  42. package/dist/midi/MIDILearning.js +0 -1
  43. package/dist/processors.js +35 -18
  44. package/dist/processors.js.map +4 -4
  45. package/dist/project/Project.d.ts +2 -2
  46. package/dist/project/Project.d.ts.map +1 -1
  47. package/dist/project/Project.js +54 -27
  48. package/dist/project/ProjectApi.js +2 -2
  49. package/dist/project/ProjectBundle.d.ts.map +1 -1
  50. package/dist/project/ProjectBundle.js +4 -3
  51. package/dist/project/ProjectMigration.d.ts.map +1 -1
  52. package/dist/project/ProjectMigration.js +57 -2
  53. package/dist/project/audio/AudioContentModifier.d.ts.map +1 -1
  54. package/dist/project/audio/AudioContentModifier.js +15 -2
  55. package/dist/samples/DefaultSampleLoader.d.ts +5 -3
  56. package/dist/samples/DefaultSampleLoader.d.ts.map +1 -1
  57. package/dist/samples/DefaultSampleLoader.js +21 -78
  58. package/dist/samples/{DefaultSampleLoaderManager.d.ts → GlobalSampleLoaderManager.d.ts} +4 -3
  59. package/dist/samples/GlobalSampleLoaderManager.d.ts.map +1 -0
  60. package/dist/samples/GlobalSampleLoaderManager.js +146 -0
  61. package/dist/samples/OpenSampleAPI.d.ts +1 -2
  62. package/dist/samples/OpenSampleAPI.d.ts.map +1 -1
  63. package/dist/samples/OpenSampleAPI.js +22 -26
  64. package/dist/samples/SampleAPI.d.ts +1 -1
  65. package/dist/samples/SampleAPI.d.ts.map +1 -1
  66. package/dist/samples/SampleService.d.ts.map +1 -1
  67. package/dist/samples/SampleService.js +5 -7
  68. package/dist/samples/SampleStorage.d.ts +0 -1
  69. package/dist/samples/SampleStorage.d.ts.map +1 -1
  70. package/dist/samples/SampleStorage.js +0 -1
  71. package/dist/samples/index.d.ts +1 -1
  72. package/dist/samples/index.d.ts.map +1 -1
  73. package/dist/samples/index.js +1 -1
  74. package/dist/soundfont/DefaultSoundfontLoader.d.ts.map +1 -1
  75. package/dist/soundfont/DefaultSoundfontLoader.js +8 -4
  76. package/dist/ui/RegionClipResolver.d.ts.map +1 -1
  77. package/dist/ui/RegionClipResolver.js +15 -6
  78. package/dist/ui/RegionModifyStrategies.js +3 -3
  79. package/dist/ui/TimeGrid.d.ts +2 -1
  80. package/dist/ui/TimeGrid.d.ts.map +1 -1
  81. package/dist/ui/TimeGrid.js +28 -14
  82. package/dist/workers-main.js +1 -1
  83. package/dist/workers-main.js.map +3 -3
  84. package/package.json +16 -16
  85. package/dist/Preferences.d.ts +0 -30
  86. package/dist/Preferences.d.ts.map +0 -1
  87. package/dist/Preferences.js +0 -51
  88. package/dist/samples/DefaultSampleLoaderManager.d.ts.map +0 -1
  89. package/dist/samples/DefaultSampleLoaderManager.js +0 -35
@@ -1,3 +1,3 @@
1
- import { ArpeggioDeviceBox, CompressorDeviceBox, CrusherDeviceBox, DattorroReverbDeviceBox, DelayDeviceBox, FoldDeviceBox, ModularDeviceBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, TidalDeviceBox, UnknownAudioEffectDeviceBox, UnknownMidiEffectDeviceBox, VelocityDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
2
- export type EffectBox = ArpeggioDeviceBox | PitchDeviceBox | VelocityDeviceBox | ZeitgeistDeviceBox | UnknownMidiEffectDeviceBox | DelayDeviceBox | ReverbDeviceBox | RevampDeviceBox | StereoToolDeviceBox | TidalDeviceBox | ModularDeviceBox | UnknownAudioEffectDeviceBox | CompressorDeviceBox | CrusherDeviceBox | FoldDeviceBox | DattorroReverbDeviceBox;
1
+ import { ArpeggioDeviceBox, MaximizerDeviceBox, CompressorDeviceBox, CrusherDeviceBox, DattorroReverbDeviceBox, DelayDeviceBox, FoldDeviceBox, ModularDeviceBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, TidalDeviceBox, UnknownAudioEffectDeviceBox, UnknownMidiEffectDeviceBox, VelocityDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
2
+ export type EffectBox = ArpeggioDeviceBox | PitchDeviceBox | VelocityDeviceBox | ZeitgeistDeviceBox | UnknownMidiEffectDeviceBox | MaximizerDeviceBox | DelayDeviceBox | ReverbDeviceBox | RevampDeviceBox | StereoToolDeviceBox | TidalDeviceBox | ModularDeviceBox | UnknownAudioEffectDeviceBox | CompressorDeviceBox | CrusherDeviceBox | FoldDeviceBox | DattorroReverbDeviceBox;
3
3
  //# sourceMappingURL=EffectBox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EffectBox.d.ts","sourceRoot":"","sources":["../src/EffectBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,SAAS,GACf,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,0BAA0B,GACxG,cAAc,GAAG,eAAe,GAAG,eAAe,GAAG,mBAAmB,GAAG,cAAc,GACzF,gBAAgB,GAAG,2BAA2B,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,aAAa,GACvG,uBAAuB,CAAA"}
1
+ {"version":3,"file":"EffectBox.d.ts","sourceRoot":"","sources":["../src/EffectBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,SAAS,GACf,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,0BAA0B,GACxG,kBAAkB,GAAG,cAAc,GAAG,eAAe,GAAG,eAAe,GAAG,mBAAmB,GAAG,cAAc,GAC9G,gBAAgB,GAAG,2BAA2B,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,aAAa,GACvG,uBAAuB,CAAA"}
@@ -7,6 +7,7 @@ export declare namespace EffectFactories {
7
7
  const StereoTool: EffectFactory;
8
8
  const Delay: EffectFactory;
9
9
  const DattorroReverb: EffectFactory;
10
+ const Maximizer: EffectFactory;
10
11
  const Compressor: EffectFactory;
11
12
  const Reverb: EffectFactory;
12
13
  const Crusher: EffectFactory;
@@ -30,7 +31,7 @@ export declare namespace EffectFactories {
30
31
  Crusher: EffectFactory;
31
32
  Fold: EffectFactory;
32
33
  Tidal: EffectFactory;
33
- Modular: EffectFactory;
34
+ Maximizer: EffectFactory;
34
35
  };
35
36
  const MidiList: ReadonlyArray<Readonly<EffectFactory>>;
36
37
  const AudioList: ReadonlyArray<Readonly<EffectFactory>>;
@@ -44,7 +45,7 @@ export declare namespace EffectFactories {
44
45
  Crusher: EffectFactory;
45
46
  Fold: EffectFactory;
46
47
  Tidal: EffectFactory;
47
- Modular: EffectFactory;
48
+ Maximizer: EffectFactory;
48
49
  Arpeggio: EffectFactory;
49
50
  Pitch: EffectFactory;
50
51
  Velocity: EffectFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"EffectFactories.d.ts","sourceRoot":"","sources":["../src/EffectFactories.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAG7C,yBAAiB,eAAe,CAAC;IACtB,MAAM,QAAQ,EAAE,aAWtB,CAAA;IAEM,MAAM,KAAK,EAAE,aAWnB,CAAA;IAEM,MAAM,QAAQ,EAAE,aAYtB,CAAA;IAEM,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avB,CAAA;IAEM,MAAM,UAAU,EAAE,aAaxB,CAAA;IAEM,MAAM,MAAM,EAAE,aAcpB,CAAA;IAEM,MAAM,OAAO,EAAE,aAarB,CAAA;IAEM,MAAM,IAAI,EAAE,aAalB,CAAA;IAEM,MAAM,KAAK,EAAE,aAcnB,CAAA;IAEM,MAAM,MAAM,EAAE,aAapB,CAAA;IAEM,MAAM,OAAO,EAAE,aAqCrB,CAAA;IAEM,MAAM,SAAS;;;;;KAAyC,CAAA;IACxD,MAAM,UAAU;;;;;;;;;;;KAEtB,CAAA;IACM,MAAM,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAA4B,CAAA;IACjF,MAAM,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAA6B,CAAA;IACnF,MAAM,WAAW;;;;;;;;;;;;;;;KAAgC,CAAA;IACxD,KAAY,cAAc,GAAG,MAAM,OAAO,SAAS,CAAA;IACnD,KAAY,eAAe,GAAG,MAAM,OAAO,UAAU,CAAA;CACxD"}
@@ -1,6 +1,7 @@
1
1
  import { UUID } from "@opendaw/lib-std";
2
- import { ArpeggioDeviceBox, CompressorDeviceBox, CrusherDeviceBox, DattorroReverbDeviceBox, DelayDeviceBox, FoldDeviceBox, GrooveShuffleBox, ModularAudioInputBox, ModularAudioOutputBox, ModularBox, ModularDeviceBox, ModuleConnectionBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, TidalDeviceBox, VelocityDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
2
+ import { ArpeggioDeviceBox, CompressorDeviceBox, CrusherDeviceBox, DattorroReverbDeviceBox, DelayDeviceBox, FoldDeviceBox, GrooveShuffleBox, MaximizerDeviceBox, ModularAudioInputBox, ModularAudioOutputBox, ModularBox, ModularDeviceBox, ModuleConnectionBox, PitchDeviceBox, RevampDeviceBox, ReverbDeviceBox, StereoToolDeviceBox, TidalDeviceBox, VelocityDeviceBox, ZeitgeistDeviceBox } from "@opendaw/studio-boxes";
3
3
  import { IconSymbol } from "@opendaw/studio-enums";
4
+ import { DeviceManualUrls } from "@opendaw/studio-adapters";
4
5
  import { EffectParameterDefaults } from "./EffectParameterDefaults";
5
6
  export var EffectFactories;
6
7
  (function (EffectFactories) {
@@ -8,6 +9,7 @@ export var EffectFactories;
8
9
  defaultName: "Arpeggio",
9
10
  defaultIcon: IconSymbol.Stack,
10
11
  description: "Generates rhythmic note sequences from chords",
12
+ manualPage: DeviceManualUrls.Arpeggio,
11
13
  separatorBefore: false,
12
14
  type: "midi",
13
15
  create: ({ boxGraph }, hostField, index) => ArpeggioDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -20,6 +22,7 @@ export var EffectFactories;
20
22
  defaultName: "Pitch",
21
23
  defaultIcon: IconSymbol.Note,
22
24
  description: "Shifts the pitch of incoming notes",
25
+ manualPage: DeviceManualUrls.Pitch,
23
26
  separatorBefore: false,
24
27
  type: "midi",
25
28
  create: ({ boxGraph }, hostField, index) => PitchDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -32,7 +35,7 @@ export var EffectFactories;
32
35
  defaultName: "Velocity",
33
36
  defaultIcon: IconSymbol.Velocity,
34
37
  description: "Manipulates the velocity of incoming notes",
35
- manualPage: "manuals/devices/midi/velocity",
38
+ manualPage: DeviceManualUrls.Velocity,
36
39
  separatorBefore: false,
37
40
  type: "midi",
38
41
  create: ({ boxGraph }, hostField, index) => VelocityDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -45,6 +48,7 @@ export var EffectFactories;
45
48
  defaultName: "Zeitgeist",
46
49
  defaultIcon: IconSymbol.Zeitgeist,
47
50
  description: "Distorts space and time",
51
+ manualPage: DeviceManualUrls.Zeitgeist,
48
52
  separatorBefore: false,
49
53
  type: "midi",
50
54
  create: ({ boxGraph, rootBoxAdapter }, hostField, index) => {
@@ -67,6 +71,7 @@ export var EffectFactories;
67
71
  defaultName: "Stereo Tool",
68
72
  defaultIcon: IconSymbol.Stereo,
69
73
  description: "Computes a stereo transformation matrix with volume, panning, phase inversion and stereo width.",
74
+ manualPage: DeviceManualUrls.StereoTool,
70
75
  separatorBefore: false,
71
76
  type: "audio",
72
77
  create: ({ boxGraph }, hostField, index) => StereoToolDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -79,6 +84,7 @@ export var EffectFactories;
79
84
  defaultName: "Delay",
80
85
  defaultIcon: IconSymbol.Time,
81
86
  description: "Echoes the input signal with time-based repeats",
87
+ manualPage: DeviceManualUrls.Delay,
82
88
  separatorBefore: false,
83
89
  type: "audio",
84
90
  create: ({ boxGraph }, hostField, index) => DelayDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -91,6 +97,7 @@ export var EffectFactories;
91
97
  defaultName: "Dattorro Reverb",
92
98
  defaultIcon: IconSymbol.Dattorro,
93
99
  description: "Dense algorithmic reverb based on Dattorro's design, capable of infinite decay",
100
+ manualPage: DeviceManualUrls.DattorroReverb,
94
101
  separatorBefore: false,
95
102
  type: "audio",
96
103
  create: ({ boxGraph }, hostField, index) => DattorroReverbDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -99,10 +106,24 @@ export var EffectFactories;
99
106
  box.host.refer(hostField);
100
107
  })
101
108
  };
109
+ EffectFactories.Maximizer = {
110
+ defaultName: "Maximizer",
111
+ defaultIcon: IconSymbol.Volume,
112
+ description: "Brickwall limiter with automatic makeup gain",
113
+ manualPage: DeviceManualUrls.Maximizer,
114
+ separatorBefore: false,
115
+ type: "audio",
116
+ create: ({ boxGraph }, hostField, index) => MaximizerDeviceBox.create(boxGraph, UUID.generate(), box => {
117
+ box.label.setValue("Maximizer");
118
+ box.index.setValue(index);
119
+ box.host.refer(hostField);
120
+ })
121
+ };
102
122
  EffectFactories.Compressor = {
103
123
  defaultName: "Compressor",
104
124
  defaultIcon: IconSymbol.Compressor,
105
125
  description: "Reduces the dynamic range by attenuating signals above a threshold",
126
+ manualPage: DeviceManualUrls.Compressor,
106
127
  separatorBefore: false,
107
128
  type: "audio",
108
129
  create: ({ boxGraph }, hostField, index) => CompressorDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -115,6 +136,7 @@ export var EffectFactories;
115
136
  defaultName: "Cheap Reverb",
116
137
  defaultIcon: IconSymbol.Cube,
117
138
  description: "Simulates space and depth with reflections",
139
+ manualPage: DeviceManualUrls.Reverb,
118
140
  separatorBefore: false,
119
141
  type: "audio",
120
142
  create: ({ boxGraph }, hostField, index) => ReverbDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -128,6 +150,7 @@ export var EffectFactories;
128
150
  defaultName: "Crusher",
129
151
  defaultIcon: IconSymbol.Bug,
130
152
  description: "Degrates the audio signal",
153
+ manualPage: DeviceManualUrls.Crusher,
131
154
  separatorBefore: false,
132
155
  type: "audio",
133
156
  create: ({ boxGraph }, hostField, index) => CrusherDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -140,6 +163,7 @@ export var EffectFactories;
140
163
  defaultName: "Fold",
141
164
  defaultIcon: IconSymbol.Fold,
142
165
  description: "Folds the signal back into audio-range",
166
+ manualPage: DeviceManualUrls.Fold,
143
167
  separatorBefore: false,
144
168
  type: "audio",
145
169
  create: ({ boxGraph }, hostField, index) => FoldDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -152,6 +176,7 @@ export var EffectFactories;
152
176
  defaultName: "Tidal",
153
177
  defaultIcon: IconSymbol.Tidal,
154
178
  description: "Shape rhythm and space through volume and pan.",
179
+ manualPage: DeviceManualUrls.Tidal,
155
180
  separatorBefore: false,
156
181
  type: "audio",
157
182
  create: ({ boxGraph }, hostField, index) => TidalDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -165,6 +190,7 @@ export var EffectFactories;
165
190
  defaultName: "Revamp",
166
191
  defaultIcon: IconSymbol.EQ,
167
192
  description: "Shapes the frequency balance of the sound",
193
+ manualPage: DeviceManualUrls.Revamp,
168
194
  separatorBefore: false,
169
195
  type: "audio",
170
196
  create: ({ boxGraph }, hostField, index) => RevampDeviceBox.create(boxGraph, UUID.generate(), box => {
@@ -177,6 +203,7 @@ export var EffectFactories;
177
203
  defaultName: "🔇 Create New Modular Audio Effect (inaudible yet)",
178
204
  defaultIcon: IconSymbol.Box,
179
205
  description: "",
206
+ manualPage: DeviceManualUrls.Modular,
180
207
  separatorBefore: true,
181
208
  type: "audio",
182
209
  create: ({ boxGraph, rootBox, userEditingManager }, hostField, index) => {
@@ -212,7 +239,7 @@ export var EffectFactories;
212
239
  };
213
240
  EffectFactories.MidiNamed = { Arpeggio: EffectFactories.Arpeggio, Pitch: EffectFactories.Pitch, Velocity: EffectFactories.Velocity, Zeitgeist: EffectFactories.Zeitgeist };
214
241
  EffectFactories.AudioNamed = {
215
- StereoTool: EffectFactories.StereoTool, Compressor: EffectFactories.Compressor, Delay: EffectFactories.Delay, Reverb: EffectFactories.Reverb, DattorroReverb: EffectFactories.DattorroReverb, Revamp: EffectFactories.Revamp, Crusher: EffectFactories.Crusher, Fold: EffectFactories.Fold, Tidal: EffectFactories.Tidal, Modular: EffectFactories.Modular
242
+ StereoTool: EffectFactories.StereoTool, Compressor: EffectFactories.Compressor, Delay: EffectFactories.Delay, Reverb: EffectFactories.Reverb, DattorroReverb: EffectFactories.DattorroReverb, Revamp: EffectFactories.Revamp, Crusher: EffectFactories.Crusher, Fold: EffectFactories.Fold, Tidal: EffectFactories.Tidal, Maximizer: EffectFactories.Maximizer
216
243
  };
217
244
  EffectFactories.MidiList = Object.values(EffectFactories.MidiNamed);
218
245
  EffectFactories.AudioList = Object.values(EffectFactories.AudioNamed);
@@ -1,14 +1,9 @@
1
- import { EffectPointerType } from "@opendaw/studio-adapters";
2
- import { IconSymbol } from "@opendaw/studio-enums";
1
+ import { DeviceFactory, EffectPointerType } from "@opendaw/studio-adapters";
3
2
  import { Field } from "@opendaw/lib-box";
4
3
  import { int } from "@opendaw/lib-std";
5
4
  import { Project } from "./project";
6
5
  import { EffectBox } from "./EffectBox";
7
- export interface EffectFactory {
8
- readonly defaultName: string;
9
- readonly defaultIcon: IconSymbol;
10
- readonly description: string;
11
- readonly manualPage?: string;
6
+ export interface EffectFactory extends DeviceFactory {
12
7
  readonly separatorBefore: boolean;
13
8
  readonly type: "audio" | "midi";
14
9
  create(project: Project, host: Field<EffectPointerType>, index: int): EffectBox;
@@ -1 +1 @@
1
- {"version":3,"file":"EffectFactory.d.ts","sourceRoot":"","sources":["../src/EffectFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AACpC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAErC,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,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IAE/B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,CAAA;CAClF"}
1
+ {"version":3,"file":"EffectFactory.d.ts","sourceRoot":"","sources":["../src/EffectFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AACpC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAErC,MAAM,WAAW,aAAc,SAAQ,aAAa;IAChD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IAE/B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,CAAA;CAClF"}
package/dist/Engine.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { int, MutableObservableValue, Nullable, ObservableValue, Observer, Subscription, Terminable, UUID } from "@opendaw/lib-std";
2
- import { ppqn } from "@opendaw/lib-dsp";
3
- import { ClipNotification, NoteSignal } from "@opendaw/studio-adapters";
1
+ import { int, Nullable, ObservableValue, Observer, Subscription, Terminable, UUID } from "@opendaw/lib-std";
2
+ import { bpm, ppqn } from "@opendaw/lib-dsp";
3
+ import { ClipNotification, EnginePreferences, NoteSignal } from "@opendaw/studio-adapters";
4
4
  import { Project } from "./project";
5
5
  export interface Engine extends Terminable {
6
6
  play(): void;
@@ -21,15 +21,14 @@ export interface Engine extends Terminable {
21
21
  scheduleClipStop(trackIds: ReadonlyArray<UUID.Bytes>): void;
22
22
  subscribeClipNotification(observer: Observer<ClipNotification>): Subscription;
23
23
  get position(): ObservableValue<ppqn>;
24
+ get bpm(): ObservableValue<bpm>;
24
25
  get isPlaying(): ObservableValue<boolean>;
25
26
  get isRecording(): ObservableValue<boolean>;
26
27
  get isCountingIn(): ObservableValue<boolean>;
27
- get metronomeEnabled(): MutableObservableValue<boolean>;
28
28
  get playbackTimestamp(): ObservableValue<ppqn>;
29
- get playbackTimestampEnabled(): MutableObservableValue<boolean>;
30
- get countInBarsTotal(): ObservableValue<int>;
31
29
  get countInBeatsRemaining(): ObservableValue<number>;
32
30
  get markerState(): ObservableValue<Nullable<[UUID.Bytes, int]>>;
33
31
  get project(): Project;
32
+ get preferences(): EnginePreferences;
34
33
  }
35
34
  //# sourceMappingURL=Engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Engine.d.ts","sourceRoot":"","sources":["../src/Engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,GAAG,EACH,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,IAAI,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,MAAM,WAAW,MAAO,SAAQ,UAAU;IACtC,IAAI,IAAI,IAAI,CAAA;IACZ,IAAI,IAAI,IAAI,CAAA;IACZ,WAAW,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAA;IACjC,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IAC7C,aAAa,IAAI,IAAI,CAAA;IACrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IACxC,IAAI,IAAI,IAAI,CAAA;IACZ,KAAK,IAAI,IAAI,CAAA;IACb,KAAK,IAAI,IAAI,CAAA;IACb,IAAI,IAAI,IAAI,CAAA;IACZ,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;IACpC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY,CAAA;IAC5D,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACxC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAA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C,IAAI,CAAC,CAAA;IAC9C,IAAI,qBAAqB,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;IACpD,IAAI,WAAW,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/D,IAAI,OAAO,IAAI,OAAO,CAAA;IACtB,IAAI,WAAW,IAAI,iBAAiB,CAAA;CACvC"}
@@ -1,6 +1,6 @@
1
- import { DefaultObservableValue, int, MutableObservableValue, Nullable, ObservableValue, Observer, Subscription, UUID } from "@opendaw/lib-std";
2
- import { ppqn } from "@opendaw/lib-dsp";
3
- import { ClipNotification, NoteSignal } from "@opendaw/studio-adapters";
1
+ import { DefaultObservableValue, int, Nullable, ObservableValue, Observer, Subscription, UUID } from "@opendaw/lib-std";
2
+ import { bpm, ppqn } from "@opendaw/lib-dsp";
3
+ import { ClipNotification, EnginePreferences, NoteSignal } from "@opendaw/studio-adapters";
4
4
  import { Engine } from "./Engine";
5
5
  import { EngineWorklet } from "./EngineWorklet";
6
6
  import { Project } from "./project";
@@ -16,17 +16,16 @@ export declare class EngineFacade implements Engine {
16
16
  prepareRecordingState(countIn: boolean): void;
17
17
  stopRecording(): void;
18
18
  get position(): ObservableValue<ppqn>;
19
+ get bpm(): ObservableValue<bpm>;
19
20
  get isPlaying(): ObservableValue<boolean>;
20
21
  get isRecording(): ObservableValue<boolean>;
21
22
  get isCountingIn(): ObservableValue<boolean>;
22
- get metronomeEnabled(): MutableObservableValue<boolean>;
23
23
  get playbackTimestamp(): ObservableValue<ppqn>;
24
- get playbackTimestampEnabled(): MutableObservableValue<boolean>;
25
- get countInBarsTotal(): MutableObservableValue<int>;
26
24
  get countInBeatsRemaining(): ObservableValue<int>;
27
25
  get markerState(): DefaultObservableValue<Nullable<[UUID.Bytes, int]>>;
28
26
  get project(): Project;
29
27
  get sampleRate(): number;
28
+ get preferences(): EnginePreferences;
30
29
  isReady(): Promise<void>;
31
30
  queryLoad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AGxC,KAAK,IAAI,IAAI;IACb,KAAK,IAAI,IAAI;IACb,IAAI,IAAI,IAAI;IACZ,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,YAAY;IAG7E,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,YAAY;IAG5D,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI;IAGxC,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAGpC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI;IAG1D,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI;IAI3D,SAAS,IAAI,IAAI;CAIpB"}
@@ -1,28 +1,32 @@
1
1
  import { DefaultObservableValue, Option, Terminator } from "@opendaw/lib-std";
2
+ import { EngineSettingsSchema } from "@opendaw/studio-adapters";
3
+ import { Preferences } from "@opendaw/lib-fusion";
2
4
  export class EngineFacade {
3
5
  #terminator = new Terminator();
4
6
  #lifecycle = this.#terminator.own(new Terminator());
5
7
  #playbackTimestamp = new DefaultObservableValue(0.0);
6
- #playbackTimestampEnabled = new DefaultObservableValue(true);
7
- #countInBarsTotal = new DefaultObservableValue(1);
8
8
  #countInBeatsRemaining = new DefaultObservableValue(0);
9
9
  #position = new DefaultObservableValue(0.0);
10
+ #bpm = new DefaultObservableValue(12.0);
10
11
  #isPlaying = new DefaultObservableValue(false);
11
12
  #isRecording = new DefaultObservableValue(false);
12
13
  #isCountingIn = new DefaultObservableValue(false);
13
- #metronomeEnabled = new DefaultObservableValue(false);
14
14
  #markerState = new DefaultObservableValue(null);
15
+ #preferencesFacade;
15
16
  #worklet = Option.None;
16
- constructor() { }
17
+ constructor() {
18
+ this.#preferencesFacade = Preferences.facade("engine-preferences", EngineSettingsSchema);
19
+ }
17
20
  setWorklet(worklet) {
18
21
  this.#worklet = Option.wrap(worklet);
22
+ this.#preferencesFacade.setHost(worklet.preferences);
19
23
  this.#lifecycle.terminate();
20
- this.#lifecycle.ownAll(worklet.playbackTimestamp.catchupAndSubscribe(owner => this.#playbackTimestamp.setValue(owner.getValue())), worklet.playbackTimestampEnabled.catchupAndSubscribe(owner => this.#playbackTimestampEnabled.setValue(owner.getValue())), worklet.countInBarsTotal.catchupAndSubscribe(owner => this.#countInBarsTotal.setValue(owner.getValue())), worklet.countInBeatsRemaining.catchupAndSubscribe(owner => this.#countInBeatsRemaining.setValue(owner.getValue())), worklet.position.catchupAndSubscribe(owner => this.#position.setValue(owner.getValue())), worklet.isPlaying.catchupAndSubscribe(owner => this.#isPlaying.setValue(owner.getValue())), worklet.isRecording.catchupAndSubscribe(owner => this.#isRecording.setValue(owner.getValue())), worklet.isCountingIn.catchupAndSubscribe(owner => this.#isCountingIn.setValue(owner.getValue())), worklet.metronomeEnabled.catchupAndSubscribe(owner => this.#metronomeEnabled.setValue(owner.getValue())), worklet.markerState.catchupAndSubscribe(owner => this.#markerState.setValue(owner.getValue())), this.#metronomeEnabled.catchupAndSubscribe(owner => worklet.metronomeEnabled.setValue(owner.getValue())), this.#playbackTimestampEnabled.catchupAndSubscribe(owner => worklet.playbackTimestampEnabled.setValue(owner.getValue())), this.#countInBarsTotal.catchupAndSubscribe(owner => worklet.countInBarsTotal.setValue(owner.getValue())));
24
+ this.#lifecycle.ownAll(worklet.playbackTimestamp.catchupAndSubscribe(owner => this.#playbackTimestamp.setValue(owner.getValue())), worklet.countInBeatsRemaining.catchupAndSubscribe(owner => this.#countInBeatsRemaining.setValue(owner.getValue())), worklet.position.catchupAndSubscribe(owner => this.#position.setValue(owner.getValue())), worklet.bpm.catchupAndSubscribe(owner => this.#bpm.setValue(owner.getValue())), worklet.isPlaying.catchupAndSubscribe(owner => this.#isPlaying.setValue(owner.getValue())), worklet.isRecording.catchupAndSubscribe(owner => this.#isRecording.setValue(owner.getValue())), worklet.isCountingIn.catchupAndSubscribe(owner => this.#isCountingIn.setValue(owner.getValue())), worklet.markerState.catchupAndSubscribe(owner => this.#markerState.setValue(owner.getValue())));
21
25
  }
22
26
  assertWorklet() { this.#worklet.unwrap("No worklet available"); }
23
27
  releaseWorklet() {
28
+ this.#preferencesFacade.releaseHost();
24
29
  this.#lifecycle.terminate();
25
- this.#worklet.ifSome(worklet => worklet.terminate());
26
30
  this.#worklet = Option.None;
27
31
  }
28
32
  play() { this.#worklet.ifSome(worklet => worklet.play()); }
@@ -31,17 +35,16 @@ export class EngineFacade {
31
35
  prepareRecordingState(countIn) { this.#worklet.ifSome(worklet => worklet.prepareRecordingState(countIn)); }
32
36
  stopRecording() { this.#worklet.ifSome(worklet => worklet.stopRecording()); }
33
37
  get position() { return this.#position; }
38
+ get bpm() { return this.#bpm; }
34
39
  get isPlaying() { return this.#isPlaying; }
35
40
  get isRecording() { return this.#isRecording; }
36
41
  get isCountingIn() { return this.#isCountingIn; }
37
- get metronomeEnabled() { return this.#metronomeEnabled; }
38
42
  get playbackTimestamp() { return this.#playbackTimestamp; }
39
- get playbackTimestampEnabled() { return this.#playbackTimestampEnabled; }
40
- get countInBarsTotal() { return this.#countInBarsTotal; }
41
43
  get countInBeatsRemaining() { return this.#countInBeatsRemaining; }
42
44
  get markerState() { return this.#markerState; }
43
45
  get project() { return this.#worklet.unwrap("No worklet to get project").project; }
44
46
  get sampleRate() { return this.#worklet.isEmpty() ? 44_100 : this.#worklet.unwrap().context.sampleRate; }
47
+ get preferences() { return this.#preferencesFacade; }
45
48
  isReady() { return this.#worklet.mapOr(worklet => worklet.isReady(), Promise.resolve()); }
46
49
  queryLoadingComplete() {
47
50
  return this.#worklet.mapOr(worklet => worklet.queryLoadingComplete(), Promise.resolve(false));
@@ -1,6 +1,6 @@
1
1
  import { int, MutableObservableValue, Nullable, ObservableValue, Observer, Subscription, UUID } from "@opendaw/lib-std";
2
- import { ppqn } from "@opendaw/lib-dsp";
3
- import { ClipNotification, ExportStemsConfiguration, NoteSignal, ProcessorOptions } from "@opendaw/studio-adapters";
2
+ import { bpm, ppqn } from "@opendaw/lib-dsp";
3
+ import { ClipNotification, EngineSettings, ExportStemsConfiguration, NoteSignal, PreferencesHost, ProcessorOptions } from "@opendaw/studio-adapters";
4
4
  import { Engine } from "./Engine";
5
5
  import { Project } from "./project";
6
6
  export declare class EngineWorklet extends AudioWorkletNode implements Engine {
@@ -19,14 +19,13 @@ export declare class EngineWorklet extends AudioWorkletNode implements Engine {
19
19
  get isPlaying(): ObservableValue<boolean>;
20
20
  get isRecording(): ObservableValue<boolean>;
21
21
  get isCountingIn(): ObservableValue<boolean>;
22
- get countInBarsTotal(): MutableObservableValue<int>;
23
22
  get countInBeatsRemaining(): ObservableValue<number>;
24
23
  get position(): ObservableValue<ppqn>;
24
+ get bpm(): ObservableValue<bpm>;
25
25
  get playbackTimestamp(): MutableObservableValue<number>;
26
- get playbackTimestampEnabled(): MutableObservableValue<boolean>;
27
- get metronomeEnabled(): MutableObservableValue<boolean>;
28
26
  get markerState(): ObservableValue<Nullable<[UUID.Bytes, int]>>;
29
27
  get project(): Project;
28
+ get preferences(): PreferencesHost<EngineSettings>;
30
29
  isReady(): Promise<void>;
31
30
  queryLoadingComplete(): Promise<boolean>;
32
31
  noteSignal(signal: NoteSignal): void;
@@ -1 +1 @@
1
- {"version":3,"file":"EngineWorklet.d.ts","sourceRoot":"","sources":["../src/EngineWorklet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,GAAG,EACH,sBAAsB,EAEtB,QAAQ,EACR,eAAe,EACf,QAAQ,EAER,YAAY,EAGZ,IAAI,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAIhD,OAAO,EACH,gBAAgB,EAOhB,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EACnB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EA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,KAAK,CAAC,GAAG,IAAI;IAI1D,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI;IAG3D,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,YAAY;IAQ7E,SAAS,IAAI,IAAI;CAKpB"}
@@ -2,7 +2,7 @@ import { Arrays, DefaultObservableValue, Notifier, Option, SyncStream, Terminato
2
2
  import { SyncSource } from "@opendaw/lib-box";
3
3
  import { AnimationFrame } from "@opendaw/lib-dom";
4
4
  import { Communicator, Messenger } from "@opendaw/lib-runtime";
5
- import { EngineStateSchema, ExportStemsConfiguration } from "@opendaw/studio-adapters";
5
+ import { EngineSettingsSchema, EngineStateSchema, ExportStemsConfiguration, PreferencesHost } from "@opendaw/studio-adapters";
6
6
  import { MIDIReceiver } from "./midi/MIDIReceiver";
7
7
  export class EngineWorklet extends AudioWorkletNode {
8
8
  static ID = 0 | 0;
@@ -10,14 +10,13 @@ export class EngineWorklet extends AudioWorkletNode {
10
10
  #terminator = new Terminator();
11
11
  #project;
12
12
  #playbackTimestamp = new DefaultObservableValue(0.0);
13
- #playbackTimestampEnabled = new DefaultObservableValue(true);
14
13
  #position = new DefaultObservableValue(0.0);
14
+ #bpm = new DefaultObservableValue(120.0);
15
15
  #isPlaying = new DefaultObservableValue(false);
16
16
  #isRecording = new DefaultObservableValue(false);
17
17
  #isCountingIn = new DefaultObservableValue(false);
18
- #countInBarsTotal = new DefaultObservableValue(1);
19
18
  #countInBeatsRemaining = new DefaultObservableValue(0);
20
- #metronomeEnabled = new DefaultObservableValue(false);
19
+ #preferences;
21
20
  #markerState = new DefaultObservableValue(null);
22
21
  #controlFlags;
23
22
  #notifyClipNotification;
@@ -33,6 +32,7 @@ export class EngineWorklet extends AudioWorkletNode {
33
32
  this.#isCountingIn.setValue(state.isCountingIn);
34
33
  this.#countInBeatsRemaining.setValue(state.countInBeatsRemaining);
35
34
  this.#playbackTimestamp.setValue(state.playbackTimestamp);
35
+ this.#bpm.setValue(state.bpm);
36
36
  this.#position.setValue(state.position); // This must be the last to handle the state values before
37
37
  });
38
38
  const controlFlagsSAB = new SharedArrayBuffer(4); // 4 bytes minimum
@@ -64,15 +64,6 @@ export class EngineWorklet extends AudioWorkletNode {
64
64
  dispatcher.dispatchAndForget(this.prepareRecordingState, countIn);
65
65
  }
66
66
  stopRecording() { dispatcher.dispatchAndForget(this.stopRecording); }
67
- setMetronomeEnabled(enabled) {
68
- dispatcher.dispatchAndForget(this.setMetronomeEnabled, enabled);
69
- }
70
- setPlaybackTimestampEnabled(enabled) {
71
- dispatcher.dispatchAndForget(this.setPlaybackTimestampEnabled, enabled);
72
- }
73
- setCountInBarsTotal(value) {
74
- dispatcher.dispatchAndForget(this.setCountInBarsTotal, value);
75
- }
76
67
  queryLoadingComplete() {
77
68
  return dispatcher.dispatchAndReturn(this.queryLoadingComplete);
78
69
  }
@@ -105,7 +96,7 @@ export class EngineWorklet extends AudioWorkletNode {
105
96
  const handler = project.sampleManager.getOrCreate(uuid);
106
97
  const subscription = handler.subscribe(state => {
107
98
  if (state.type === "error") {
108
- reject(state.reason);
99
+ reject(new Error(state.reason));
109
100
  subscription.terminate();
110
101
  }
111
102
  else if (state.type === "loaded") {
@@ -120,7 +111,7 @@ export class EngineWorklet extends AudioWorkletNode {
120
111
  const handler = project.soundfontManager.getOrCreate(uuid);
121
112
  const subscription = handler.subscribe(state => {
122
113
  if (state.type === "error") {
123
- reject(state.reason);
114
+ reject(new Error(state.reason));
124
115
  subscription.terminate();
125
116
  }
126
117
  else if (state.type === "loaded") {
@@ -144,7 +135,8 @@ export class EngineWorklet extends AudioWorkletNode {
144
135
  },
145
136
  switchMarkerState: (state) => this.#markerState.setValue(state)
146
137
  });
147
- this.#terminator.ownAll(AnimationFrame.add(() => reader.tryRead()), project.liveStreamReceiver.connect(messenger.channel("engine-live-data")), new SyncSource(project.boxGraph, messenger.channel("engine-sync"), false), this.#metronomeEnabled.catchupAndSubscribe(owner => this.#commands.setMetronomeEnabled(owner.getValue())), this.#playbackTimestampEnabled.catchupAndSubscribe(owner => this.#commands.setPlaybackTimestampEnabled(owner.getValue())), this.#countInBarsTotal.catchupAndSubscribe(owner => this.#commands.setCountInBarsTotal(owner.getValue())));
138
+ this.#preferences = this.#terminator.own(new PreferencesHost(EngineSettingsSchema.parse({})));
139
+ this.#terminator.ownAll(AnimationFrame.add(() => reader.tryRead()), project.liveStreamReceiver.connect(messenger.channel("engine-live-data")), this.#preferences.syncWith(messenger.channel("engine-preferences")), new SyncSource(project.boxGraph, messenger.channel("engine-sync"), false));
148
140
  }
149
141
  play() { this.#commands.play(); }
150
142
  stop(reset = false) { this.#commands.stop(reset); }
@@ -160,14 +152,13 @@ export class EngineWorklet extends AudioWorkletNode {
160
152
  get isPlaying() { return this.#isPlaying; }
161
153
  get isRecording() { return this.#isRecording; }
162
154
  get isCountingIn() { return this.#isCountingIn; }
163
- get countInBarsTotal() { return this.#countInBarsTotal; }
164
155
  get countInBeatsRemaining() { return this.#countInBeatsRemaining; }
165
156
  get position() { return this.#position; }
157
+ get bpm() { return this.#bpm; }
166
158
  get playbackTimestamp() { return this.#playbackTimestamp; }
167
- get playbackTimestampEnabled() { return this.#playbackTimestampEnabled; }
168
- get metronomeEnabled() { return this.#metronomeEnabled; }
169
159
  get markerState() { return this.#markerState; }
170
160
  get project() { return this.#project; }
161
+ get preferences() { return this.#preferences; }
171
162
  isReady() { return this.#isReady; }
172
163
  queryLoadingComplete() { return this.#commands.queryLoadingComplete(); }
173
164
  noteSignal(signal) { this.#commands.noteSignal(signal); }
@@ -188,7 +179,7 @@ export class EngineWorklet extends AudioWorkletNode {
188
179
  return this.#notifyClipNotification.subscribe(observer);
189
180
  }
190
181
  terminate() {
191
- console.debug("WORKLET.terminate");
182
+ this.#commands.terminate();
192
183
  this.#terminator.terminate();
193
184
  this.disconnect();
194
185
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RecordingWorklet.d.ts","s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,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,SAAS,EAAW,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAC,KAAK,EAAc,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAEH,UAAU,EACV,YAAY,EACZ,iBAAiB,EAEpB,MAAM,0BAA0B,CAAA;AAMjC,qBAAa,gBAAiB,SAAQ,gBAAiB,YAAW,UAAU,EAAE,YAAY;;IAGtF,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAkB;gBAa/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM;IA2BvF,GAAG,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;IAE3C,KAAK,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAEvB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAE/B,IAAI,cAAc,IAAI,GAAG,CAA6C;IACtE,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,CAAoB;IACjD,IAAI,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAA6E;IACvG,IAAI,KAAK,IAAI,iBAAiB,CAAqB;IAEnD,UAAU,IAAI,IAAI;IAElB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,YAAY;IAQ9D,SAAS,IAAI,IAAI;IAOjB,QAAQ,IAAI,MAAM;CAqCrB"}
@@ -1,5 +1,5 @@
1
1
  import { ByteArrayInput, Notifier, Option, panic, Progress, Terminable, Terminator, UUID } from "@opendaw/lib-std";
2
- import { BPMTools } from "@opendaw/lib-dsp";
2
+ import { AudioData, BPMTools } from "@opendaw/lib-dsp";
3
3
  import { SamplePeaks } from "@opendaw/lib-fusion";
4
4
  import { mergeChunkPlanes, RingBuffer } from "@opendaw/studio-adapters";
5
5
  import { SampleStorage } from "./samples";
@@ -61,6 +61,7 @@ export class RecordingWorklet extends AudioWorkletNode {
61
61
  terminate() {
62
62
  this.#reader.stop();
63
63
  this.#isRecording = false;
64
+ this.#data = Option.None;
64
65
  this.#terminator.terminate();
65
66
  }
66
67
  toString() { return `{RecordingWorklet}`; }
@@ -73,20 +74,16 @@ export class RecordingWorklet extends AudioWorkletNode {
73
74
  const totalSamples = this.#limitSamples;
74
75
  const sample_rate = this.context.sampleRate;
75
76
  const numberOfChannels = this.channelCount;
76
- const frames = mergeChunkPlanes(this.#output, RenderQuantum, this.#output.length * RenderQuantum)
77
+ const mergedFrames = mergeChunkPlanes(this.#output, RenderQuantum, this.#output.length * RenderQuantum)
77
78
  .map(frame => frame.slice(-totalSamples));
78
- const audioData = {
79
- sampleRate: sample_rate,
80
- numberOfChannels,
81
- numberOfFrames: totalSamples,
82
- frames
83
- };
79
+ const audioData = AudioData.create(sample_rate, totalSamples, numberOfChannels);
80
+ mergedFrames.forEach((frame, i) => audioData.frames[i].set(frame));
84
81
  this.#data = Option.wrap(audioData);
85
82
  const shifts = SamplePeaks.findBestFit(totalSamples);
86
83
  const peaks = await Workers
87
- .Peak.generateAsync(Progress.Empty, shifts, frames, totalSamples, numberOfChannels);
84
+ .Peak.generateAsync(Progress.Empty, shifts, audioData.frames, totalSamples, numberOfChannels);
88
85
  this.#peaks = Option.wrap(SamplePeaks.from(new ByteArrayInput(peaks)));
89
- const bpm = BPMTools.detect(frames[0], sample_rate);
86
+ const bpm = BPMTools.detect(audioData.frames[0], sample_rate);
90
87
  const duration = totalSamples / sample_rate;
91
88
  const meta = { name: "Recording", bpm, sample_rate, duration, origin: "recording" };
92
89
  const sample = {
@@ -1 +1 @@
1
- {"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../src/Storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAIrC,8BAAsB,OAAO,CAAC,IAAI,SAAS;IAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE,G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AAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAK7C,cAAc,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;CAgB7C"}
package/dist/Storage.js CHANGED
@@ -23,10 +23,19 @@ export class Storage {
23
23
  }
24
24
  async list() {
25
25
  return Workers.Opfs.list(this.folder)
26
- .then(files => Promise.all(files.filter(file => file.kind === "directory")
27
- .map(async ({ name }) => {
28
- const array = await Workers.Opfs.read(`${this.folder}/${name}/meta.json`);
29
- return { uuid: name, ...JSON.parse(new TextDecoder().decode(array)) };
30
- })), () => []);
26
+ .then(async (files) => {
27
+ const results = await Promise.all(files.filter(file => file.kind === "directory")
28
+ .map(async ({ name }) => {
29
+ try {
30
+ const array = await Workers.Opfs.read(`${this.folder}/${name}/meta.json`);
31
+ return { uuid: name, ...JSON.parse(new TextDecoder().decode(array)) };
32
+ }
33
+ catch (e) {
34
+ console.warn(`Skipping corrupted entry: ${this.folder}/${name}`, e);
35
+ return null;
36
+ }
37
+ }));
38
+ return results.filter((item) => item !== null);
39
+ }, () => []);
31
40
  }
32
41
  }
@@ -0,0 +1,21 @@
1
+ export declare const StudioPreferences: import("@opendaw/lib-fusion").PreferencesHost<{
2
+ "visible-help-hints": boolean;
3
+ "enable-history-buttons": boolean;
4
+ "note-audition-while-editing": boolean;
5
+ "modifying-controls-wheel": boolean;
6
+ "auto-open-clips": boolean;
7
+ "auto-create-output-compressor": boolean;
8
+ "footer-show-fps-meter": boolean;
9
+ "footer-show-samples-memory": boolean;
10
+ "footer-show-build-infos": boolean;
11
+ "normalize-mouse-wheel": boolean;
12
+ "time-display": {
13
+ musical: boolean;
14
+ absolute: boolean;
15
+ details: boolean;
16
+ fps: 30 | 24 | 25 | 29.97;
17
+ };
18
+ "dragging-use-pointer-lock": boolean;
19
+ "enable-beta-features": boolean;
20
+ }>;
21
+ //# sourceMappingURL=StudioPreferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StudioPreferences.d.ts","sourceRoot":"","sources":["../src/StudioPreferences.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;EAAwD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { Preferences } from "@opendaw/lib-fusion";
2
+ import { StudioSettingsSchema } from "./StudioSettings";
3
+ export const StudioPreferences = Preferences.host("preferences", StudioSettingsSchema);