This commit is contained in:
Felix Roos
2022-03-23 20:12:35 +01:00
parent c71be675aa
commit c0bd0966a8
5 changed files with 14 additions and 4 deletions
@@ -42715,6 +42715,10 @@ class Pattern {
_slow(factor) {
return this._fast(_fractionMjsDefault.default(1).div(factor));
}
// cpm = cycles per minute
_cpm(cpm) {
return this._fast(cpm / 60);
}
_early(offset) {
// Equivalent of Tidal's <~ operator
offset = _fractionMjsDefault.default(offset);
@@ -42876,6 +42880,7 @@ Pattern.prototype.patternified = [
'apply',
'fast',
'slow',
'cpm',
'early',
'late',
'duration',
@@ -136422,6 +136427,7 @@ _strudelMjs.Pattern.prototype.pianoroll = function({ timeframe =10 , inactive ='
events.forEach((event)=>{
const isActive = event.whole.begin <= t && event.whole.end >= t;
ctx.fillStyle = isActive ? active : inactive;
ctx.globalAlpha = event.context.velocity ?? 1;
const x = Math.round(event.whole.begin / timeframe * w);
const width = Math.round((event.whole.end - event.whole.begin) / timeframe * w);
const y = Math.round(h - (Number(event.value) - minMidi) / midiRange * h);
@@ -183327,4 +183333,4 @@ exports.default = cx;
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["3uVTb"], "3uVTb", "parcelRequire94c2")
//# sourceMappingURL=index.95a69858.js.map
//# sourceMappingURL=index.74a36131.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,6 +11,6 @@
<body>
<div id="root"></div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/tutorial/index.95a69858.js" defer=""></script>
<script src="/tutorial/index.74a36131.js" defer=""></script>
</body>
</html>