@opendaw/studio-core 0.0.133 → 0.0.134
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordMidi.d.ts","sourceRoot":"","sources":["../../src/capture/RecordMidi.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,QAAQ,EAKR,UAAU,EAGb,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAa,UAAU,EAA2B,MAAM,0BAA0B,CAAA;AACzF,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,EAIH,QAAQ,EAKR,UAAU,EAGb,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAa,UAAU,EAA2B,MAAM,0BAA0B,CAAA;AACzF,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,UA0LvE,CAAA;;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { asInstanceOf, Option, quantizeCeil, quantizeFloor, Terminator, UUID } from "@opendaw/lib-std";
|
|
1
|
+
import { asInstanceOf, Option, quantizeCeil, quantizeFloor, Terminable, Terminator, UUID } from "@opendaw/lib-std";
|
|
2
2
|
import { PPQN } from "@opendaw/lib-dsp";
|
|
3
3
|
import { NoteEventBox, NoteEventCollectionBox, NoteRegionBox, TrackBox } from "@opendaw/studio-boxes";
|
|
4
4
|
import { ColorCodes, NoteSignal, TrackType, UnionBoxTypes } from "@opendaw/studio-adapters";
|
|
@@ -111,10 +111,17 @@ export var RecordMidi;
|
|
|
111
111
|
editing.modify(() => {
|
|
112
112
|
currentTake.ifSome(take => {
|
|
113
113
|
const actualDurationPPQN = take.regionBox.duration.getValue();
|
|
114
|
+
if (actualDurationPPQN <= 0) {
|
|
115
|
+
take.regionBox.delete();
|
|
116
|
+
currentTake = Option.None;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
114
119
|
finalizeTake(take, actualDurationPPQN);
|
|
115
120
|
positionOffset += actualDurationPPQN;
|
|
116
121
|
});
|
|
117
|
-
|
|
122
|
+
if (currentTake.nonEmpty()) {
|
|
123
|
+
startNewTake(loopFrom);
|
|
124
|
+
}
|
|
118
125
|
}, false);
|
|
119
126
|
}
|
|
120
127
|
lastPosition = currentPosition;
|
|
@@ -185,6 +192,13 @@ export var RecordMidi;
|
|
|
185
192
|
}
|
|
186
193
|
}
|
|
187
194
|
}));
|
|
195
|
+
terminator.own(Terminable.create(() => {
|
|
196
|
+
currentTake.ifSome(({ regionBox }) => {
|
|
197
|
+
if (regionBox.isAttached() && regionBox.duration.getValue() <= 0) {
|
|
198
|
+
editing.modify(() => regionBox.delete(), false);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}));
|
|
188
202
|
return terminator;
|
|
189
203
|
};
|
|
190
204
|
})(RecordMidi || (RecordMidi = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/studio-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.134",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"@opendaw/studio-forge-boxes": "^0.0.87",
|
|
64
64
|
"@opendaw/typescript-config": "^0.0.29"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "182f552c67bba34800cf3ca216c509b11266b8fc"
|
|
67
67
|
}
|