mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 04:58:27 +00:00
build
This commit is contained in:
parent
c71be675aa
commit
c0bd0966a8
@ -444,6 +444,9 @@ class Pattern {
|
|||||||
_slow(factor) {
|
_slow(factor) {
|
||||||
return this._fast(Fraction(1).div(factor));
|
return this._fast(Fraction(1).div(factor));
|
||||||
}
|
}
|
||||||
|
_cpm(cpm) {
|
||||||
|
return this._fast(cpm / 60);
|
||||||
|
}
|
||||||
_early(offset) {
|
_early(offset) {
|
||||||
offset = Fraction(offset);
|
offset = Fraction(offset);
|
||||||
return this.withQueryTime((t) => t.add(offset)).withEventTime((t) => t.sub(offset));
|
return this.withQueryTime((t) => t.add(offset)).withEventTime((t) => t.sub(offset));
|
||||||
@ -559,7 +562,7 @@ class Pattern {
|
|||||||
return this._withContext((context) => ({...context, velocity: (context.velocity || 1) * velocity}));
|
return this._withContext((context) => ({...context, velocity: (context.velocity || 1) * velocity}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pattern.prototype.patternified = ["apply", "fast", "slow", "early", "late", "duration", "legato", "velocity", "segment"];
|
Pattern.prototype.patternified = ["apply", "fast", "slow", "cpm", "early", "late", "duration", "legato", "velocity", "segment"];
|
||||||
Pattern.prototype.factories = {pure, stack, slowcat, fastcat, cat, timeCat, sequence, polymeter, pm, polyrhythm, pr};
|
Pattern.prototype.factories = {pure, stack, slowcat, fastcat, cat, timeCat, sequence, polymeter, pm, polyrhythm, pr};
|
||||||
const silence = new Pattern((_) => []);
|
const silence = new Pattern((_) => []);
|
||||||
function pure(value) {
|
function pure(value) {
|
||||||
|
|||||||
1
docs/dist/pianoroll.js
vendored
1
docs/dist/pianoroll.js
vendored
@ -18,6 +18,7 @@ Pattern.prototype.pianoroll = function({
|
|||||||
events.forEach((event) => {
|
events.forEach((event) => {
|
||||||
const isActive = event.whole.begin <= t && event.whole.end >= t;
|
const isActive = event.whole.begin <= t && event.whole.end >= t;
|
||||||
ctx.fillStyle = isActive ? active : inactive;
|
ctx.fillStyle = isActive ? active : inactive;
|
||||||
|
ctx.globalAlpha = event.context.velocity ?? 1;
|
||||||
const x = Math.round(event.whole.begin / timeframe * w);
|
const x = Math.round(event.whole.begin / timeframe * w);
|
||||||
const width = Math.round((event.whole.end - 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);
|
const y = Math.round(h - (Number(event.value) - minMidi) / midiRange * h);
|
||||||
|
|||||||
@ -42715,6 +42715,10 @@ class Pattern {
|
|||||||
_slow(factor) {
|
_slow(factor) {
|
||||||
return this._fast(_fractionMjsDefault.default(1).div(factor));
|
return this._fast(_fractionMjsDefault.default(1).div(factor));
|
||||||
}
|
}
|
||||||
|
// cpm = cycles per minute
|
||||||
|
_cpm(cpm) {
|
||||||
|
return this._fast(cpm / 60);
|
||||||
|
}
|
||||||
_early(offset) {
|
_early(offset) {
|
||||||
// Equivalent of Tidal's <~ operator
|
// Equivalent of Tidal's <~ operator
|
||||||
offset = _fractionMjsDefault.default(offset);
|
offset = _fractionMjsDefault.default(offset);
|
||||||
@ -42876,6 +42880,7 @@ Pattern.prototype.patternified = [
|
|||||||
'apply',
|
'apply',
|
||||||
'fast',
|
'fast',
|
||||||
'slow',
|
'slow',
|
||||||
|
'cpm',
|
||||||
'early',
|
'early',
|
||||||
'late',
|
'late',
|
||||||
'duration',
|
'duration',
|
||||||
@ -136422,6 +136427,7 @@ _strudelMjs.Pattern.prototype.pianoroll = function({ timeframe =10 , inactive ='
|
|||||||
events.forEach((event)=>{
|
events.forEach((event)=>{
|
||||||
const isActive = event.whole.begin <= t && event.whole.end >= t;
|
const isActive = event.whole.begin <= t && event.whole.end >= t;
|
||||||
ctx.fillStyle = isActive ? active : inactive;
|
ctx.fillStyle = isActive ? active : inactive;
|
||||||
|
ctx.globalAlpha = event.context.velocity ?? 1;
|
||||||
const x = Math.round(event.whole.begin / timeframe * w);
|
const x = Math.round(event.whole.begin / timeframe * w);
|
||||||
const width = Math.round((event.whole.end - 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);
|
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")
|
},{"@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
@ -11,6 +11,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user