@opendaw/studio-core 0.0.91 → 0.0.92
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/AudioDevices.d.ts +2 -0
- package/dist/AudioDevices.d.ts.map +1 -1
- package/dist/AudioDevices.js +3 -0
- package/dist/capture/CaptureAudio.js +4 -4
- package/dist/capture/RecordAudio.d.ts.map +1 -1
- package/dist/capture/RecordAudio.js +8 -6
- package/dist/capture/RecordMidi.d.ts.map +1 -1
- package/dist/capture/RecordMidi.js +3 -2
- package/dist/processors.js +6 -6
- package/dist/processors.js.map +3 -3
- package/dist/ui/RegionClipResolver.d.ts +37 -0
- package/dist/ui/RegionClipResolver.d.ts.map +1 -0
- package/dist/ui/RegionClipResolver.js +188 -0
- package/dist/ui/RegionClipResolver.test.d.ts +2 -0
- package/dist/ui/RegionClipResolver.test.d.ts.map +1 -0
- package/dist/ui/RegionClipResolver.test.js +166 -0
- package/dist/ui/RegionModifyStrategies.d.ts +25 -0
- package/dist/ui/RegionModifyStrategies.d.ts.map +1 -0
- package/dist/ui/RegionModifyStrategies.js +25 -0
- package/dist/ui/TimeGrid.d.ts +20 -0
- package/dist/ui/TimeGrid.d.ts.map +1 -0
- package/dist/ui/TimeGrid.js +88 -0
- package/dist/ui/TimelineRange.d.ts +51 -0
- package/dist/ui/TimelineRange.d.ts.map +1 -0
- package/dist/ui/TimelineRange.js +85 -0
- package/dist/ysync/YMapper.d.ts.map +1 -1
- package/dist/ysync/YMapper.js +7 -3
- package/package.json +6 -6
package/dist/AudioDevices.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Optional } from "@opendaw/lib-std";
|
|
1
2
|
export declare class AudioDevices {
|
|
2
3
|
#private;
|
|
3
4
|
static requestPermission(): Promise<undefined>;
|
|
4
5
|
static requestStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
5
6
|
static updateInputList(): Promise<undefined>;
|
|
6
7
|
static get inputs(): ReadonlyArray<MediaDeviceInfo>;
|
|
8
|
+
static get defaultInput(): Optional<MediaDeviceInfo>;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=AudioDevices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioDevices.d.ts","sourceRoot":"","sources":["../src/AudioDevices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AudioDevices.d.ts","sourceRoot":"","sources":["../src/AudioDevices.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGzD,qBAAa,YAAY;;WACR,iBAAiB;WAQjB,aAAa,CAAC,WAAW,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;WAcvE,eAAe;IAY5B,MAAM,KAAK,MAAM,IAAI,aAAa,CAAC,eAAe,CAAC,CAAsB;IAEzE,MAAM,KAAK,YAAY,IAAI,QAAQ,CAAC,eAAe,CAAC,CAEnD;CACJ"}
|
package/dist/AudioDevices.js
CHANGED
|
@@ -90,10 +90,10 @@ export class CaptureAudio extends Capture {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
this.#stopStream();
|
|
93
|
-
const deviceId = this.deviceId.getValue().
|
|
93
|
+
const deviceId = this.deviceId.getValue().unwrapOrUndefined() ?? AudioDevices.defaultInput?.deviceId;
|
|
94
94
|
const channelCount = this.#requestChannels.unwrapOrElse(1);
|
|
95
95
|
return AudioDevices.requestStream({
|
|
96
|
-
deviceId: { exact: deviceId },
|
|
96
|
+
deviceId: isDefined(deviceId) ? { exact: deviceId } : undefined,
|
|
97
97
|
echoCancellation: false,
|
|
98
98
|
noiseSuppression: false,
|
|
99
99
|
autoGainControl: false,
|
|
@@ -103,8 +103,8 @@ export class CaptureAudio extends Capture {
|
|
|
103
103
|
const track = tracks.at(0);
|
|
104
104
|
const settings = track?.getSettings();
|
|
105
105
|
const gotDeviceId = settings?.deviceId;
|
|
106
|
-
console.debug(`new stream. device requested: ${deviceId}, got: ${gotDeviceId ?? "unknown"}. channelCount requested: ${channelCount}, got: ${settings?.channelCount}`);
|
|
107
|
-
if (deviceId
|
|
106
|
+
console.debug(`new stream. device requested: ${deviceId ?? "default"}, got: ${gotDeviceId ?? "unknown"}. channelCount requested: ${channelCount}, got: ${settings?.channelCount}`);
|
|
107
|
+
if (isUndefined(deviceId) || deviceId === gotDeviceId) {
|
|
108
108
|
this.#stream.wrap(stream);
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordAudio.d.ts","sourceRoot":"","sources":["../../src/capture/RecordAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,UAAU,EAAmB,MAAM,kBAAkB,CAAA;AAUzF,OAAO,EAAa,mBAAmB,EAAY,MAAM,0BAA0B,CAAA;AACnF,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAGjC,yBAAiB,WAAW,CAAC;IACzB,KAAK,kBAAkB,GAAG;QACtB,gBAAgB,EAAE,gBAAgB,CAAA;QAClC,WAAW,EAAE,WAAW,CAAA;QACxB,aAAa,EAAE,mBAAmB,CAAA;QAClC,YAAY,EAAE,YAAY,CAAA;QAC1B,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;KACxB,CAAA;IAQD,MAAM,CAAC,MAAM,KAAK,GACd,yGASG,kBAAkB,KACnB,
|
|
1
|
+
{"version":3,"file":"RecordAudio.d.ts","sourceRoot":"","sources":["../../src/capture/RecordAudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,UAAU,EAAmB,MAAM,kBAAkB,CAAA;AAUzF,OAAO,EAAa,mBAAmB,EAAY,MAAM,0BAA0B,CAAA;AACnF,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAGjC,yBAAiB,WAAW,CAAC;IACzB,KAAK,kBAAkB,GAAG;QACtB,gBAAgB,EAAE,gBAAgB,CAAA;QAClC,WAAW,EAAE,WAAW,CAAA;QACxB,aAAa,EAAE,mBAAmB,CAAA;QAClC,YAAY,EAAE,YAAY,CAAA;QAC1B,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;KACxB,CAAA;IAQD,MAAM,CAAC,MAAM,KAAK,GACd,yGASG,kBAAkB,KACnB,UA6IL,CAAA;;CACJ"}
|
|
@@ -94,12 +94,14 @@ export var RecordAudio;
|
|
|
94
94
|
const loopEnabled = loopArea.enabled.getValue();
|
|
95
95
|
const loopFrom = loopArea.from.getValue();
|
|
96
96
|
const loopTo = loopArea.to.getValue();
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
if (loopEnabled && currentTake.nonEmpty() && currentPosition < lastPosition) {
|
|
97
|
+
const allowTakes = project.engine.preferences.settings.recording.allowTakes;
|
|
98
|
+
if (loopEnabled && allowTakes && currentTake.nonEmpty() && currentPosition < lastPosition) {
|
|
100
99
|
editing.modify(() => {
|
|
101
|
-
currentTake.ifSome(take =>
|
|
102
|
-
|
|
100
|
+
currentTake.ifSome(take => {
|
|
101
|
+
const actualDurationPPQN = take.regionBox.duration.getValue();
|
|
102
|
+
finalizeTake(take, actualDurationPPQN);
|
|
103
|
+
currentWaveformOffset += tempoMap.intervalToSeconds(0, actualDurationPPQN);
|
|
104
|
+
});
|
|
103
105
|
startNewTake(loopFrom);
|
|
104
106
|
}, false);
|
|
105
107
|
}
|
|
@@ -116,7 +118,7 @@ export var RecordAudio;
|
|
|
116
118
|
editing.modify(() => {
|
|
117
119
|
if (regionBox.isAttached()) {
|
|
118
120
|
const { duration, loopDuration } = regionBox;
|
|
119
|
-
const maxDuration = loopEnabled ? loopTo - regionBox.position.getValue() : Infinity;
|
|
121
|
+
const maxDuration = loopEnabled && allowTakes ? loopTo - regionBox.position.getValue() : Infinity;
|
|
120
122
|
const distanceInPPQN = Math.min(maxDuration, Math.floor(currentPosition - regionBox.position.getValue()));
|
|
121
123
|
duration.setValue(distanceInPPQN);
|
|
122
124
|
loopDuration.setValue(distanceInPPQN);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordMidi.d.ts","sourceRoot":"","sources":["../../src/capture/RecordMidi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAuC,UAAU,EAAmB,MAAM,kBAAkB,CAAA;AAGvH,OAAO,EAAa,UAAU,EAAY,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAGjC,yBAAiB,UAAU,CAAC;IACxB,KAAK,iBAAiB,GAAG;QACrB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAA;KACnB,CAAA;IAgBD,MAAM,CAAC,MAAM,KAAK,GAAI,gCAA8B,iBAAiB,KAAG,
|
|
1
|
+
{"version":3,"file":"RecordMidi.d.ts","sourceRoot":"","sources":["../../src/capture/RecordMidi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAuC,UAAU,EAAmB,MAAM,kBAAkB,CAAA;AAGvH,OAAO,EAAa,UAAU,EAAY,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAGjC,yBAAiB,UAAU,CAAC;IACxB,KAAK,iBAAiB,GAAG;QACrB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAA;KACnB,CAAA;IAgBD,MAAM,CAAC,MAAM,KAAK,GAAI,gCAA8B,iBAAiB,KAAG,UAoHvE,CAAA;;CACJ"}
|
|
@@ -57,7 +57,8 @@ export var RecordMidi;
|
|
|
57
57
|
const loopFrom = loopArea.from.getValue();
|
|
58
58
|
const loopTo = loopArea.to.getValue();
|
|
59
59
|
const loopDurationPPQN = loopTo - loopFrom;
|
|
60
|
-
|
|
60
|
+
const allowTakes = project.engine.preferences.settings.recording.allowTakes;
|
|
61
|
+
if (loopEnabled && allowTakes && currentTake.nonEmpty() && currentPosition < lastPosition) {
|
|
61
62
|
positionOffset += loopDurationPPQN;
|
|
62
63
|
editing.modify(() => {
|
|
63
64
|
currentTake.ifSome(take => finalizeTake(take, loopDurationPPQN));
|
|
@@ -75,7 +76,7 @@ export var RecordMidi;
|
|
|
75
76
|
editing.modify(() => {
|
|
76
77
|
if (regionBox.isAttached() && collection.isAttached()) {
|
|
77
78
|
const { position: regionPosition, duration, loopDuration } = regionBox;
|
|
78
|
-
const maxDuration = loopEnabled ? loopTo - regionPosition.getValue() : Infinity;
|
|
79
|
+
const maxDuration = loopEnabled && allowTakes ? loopTo - regionPosition.getValue() : Infinity;
|
|
79
80
|
const newDuration = Math.min(maxDuration, quantizeCeil(writePosition, beats) - regionPosition.getValue());
|
|
80
81
|
duration.setValue(newDuration);
|
|
81
82
|
loopDuration.setValue(newDuration);
|