build
This commit is contained in:
parent
e694475556
commit
1182d0e45d
5 changed files with 27 additions and 15 deletions
8
docs/dist/euclid.js
vendored
8
docs/dist/euclid.js
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
import {Pattern} from "../_snowpack/link/strudel.js";
|
import {Pattern, timeCat} from "../_snowpack/link/strudel.js";
|
||||||
import bjork from "../_snowpack/pkg/bjork.js";
|
import bjork from "../_snowpack/pkg/bjork.js";
|
||||||
import {rotate} from "../_snowpack/link/util.js";
|
import {rotate} from "../_snowpack/link/util.js";
|
||||||
const euclid = (pulses, steps, rotation = 0) => {
|
const euclid = (pulses, steps, rotation = 0) => {
|
||||||
|
|
@ -11,4 +11,10 @@ const euclid = (pulses, steps, rotation = 0) => {
|
||||||
Pattern.prototype.euclid = function(pulses, steps, rotation = 0) {
|
Pattern.prototype.euclid = function(pulses, steps, rotation = 0) {
|
||||||
return this.struct(euclid(pulses, steps, rotation));
|
return this.struct(euclid(pulses, steps, rotation));
|
||||||
};
|
};
|
||||||
|
Pattern.prototype.euclidLegato = function(pulses, steps, rotation = 0) {
|
||||||
|
const bin_pat = euclid(pulses, steps, rotation);
|
||||||
|
const firstOne = bin_pat.indexOf(1);
|
||||||
|
const gapless = rotate(bin_pat, firstOne).join("").split("1").slice(1).map((s) => [s.length + 1, true]);
|
||||||
|
return this.struct(timeCat(...gapless)).late(firstOne / steps);
|
||||||
|
};
|
||||||
export default euclid;
|
export default euclid;
|
||||||
|
|
|
||||||
6
docs/dist/voicings.js
vendored
6
docs/dist/voicings.js
vendored
|
|
@ -24,13 +24,11 @@ Pattern.prototype.voicings = function(range) {
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
Pattern.prototype.rootNotes = function(octave = 2) {
|
Pattern.prototype._rootNotes = function(octave = 2) {
|
||||||
return this.fmap((value) => {
|
return this.fmap((value) => {
|
||||||
const [_, root] = value.match(/^([a-gA-G][b#]?).*$/);
|
const [_, root] = value.match(/^([a-gA-G][b#]?).*$/);
|
||||||
return root + octave;
|
return root + octave;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
Pattern.prototype.define("voicings", (range, pat) => pat.voicings(range), {composable: true});
|
Pattern.prototype.define("voicings", (range, pat) => pat.voicings(range), {composable: true});
|
||||||
Pattern.prototype.define("rootNotes", (pat) => {
|
Pattern.prototype.define("rootNotes", (oct, pat) => pat.rootNotes(oct), {composable: true, patternified: true});
|
||||||
return pat.rootNotes();
|
|
||||||
}, {composable: true});
|
|
||||||
|
|
|
||||||
|
|
@ -59696,8 +59696,7 @@ Pattern.prototype.voicings = function(range) {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
Pattern.prototype.rootNotes = function(octave = 2) {
|
Pattern.prototype._rootNotes = function(octave = 2) {
|
||||||
// range = ['G1', 'C3']
|
|
||||||
return this.fmap((value)=>{
|
return this.fmap((value)=>{
|
||||||
const [_, root] = value.match(/^([a-gA-G][b#]?).*$/);
|
const [_, root] = value.match(/^([a-gA-G][b#]?).*$/);
|
||||||
return root + octave;
|
return root + octave;
|
||||||
|
|
@ -59707,11 +59706,10 @@ Pattern.prototype.define('voicings', (range, pat)=>pat.voicings(range)
|
||||||
, {
|
, {
|
||||||
composable: true
|
composable: true
|
||||||
});
|
});
|
||||||
Pattern.prototype.define('rootNotes', (pat)=>{
|
Pattern.prototype.define('rootNotes', (oct, pat)=>pat.rootNotes(oct)
|
||||||
// console.log('call rootNotes ...', pat);
|
, {
|
||||||
return pat.rootNotes();
|
composable: true,
|
||||||
}, {
|
patternified: true
|
||||||
composable: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},{"../../strudel.mjs":"ggZqJ","chord-voicings":"bZACi","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"bZACi":[function(require,module,exports) {
|
},{"../../strudel.mjs":"ggZqJ","chord-voicings":"bZACi","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"bZACi":[function(require,module,exports) {
|
||||||
|
|
@ -136278,6 +136276,16 @@ const euclid = (pulses, steps, rotation = 0)=>{
|
||||||
_strudelMjs.Pattern.prototype.euclid = function(pulses, steps, rotation = 0) {
|
_strudelMjs.Pattern.prototype.euclid = function(pulses, steps, rotation = 0) {
|
||||||
return this.struct(euclid(pulses, steps, rotation));
|
return this.struct(euclid(pulses, steps, rotation));
|
||||||
};
|
};
|
||||||
|
_strudelMjs.Pattern.prototype.euclidLegato = function(pulses, steps, rotation = 0) {
|
||||||
|
const bin_pat = euclid(pulses, steps, rotation);
|
||||||
|
const firstOne = bin_pat.indexOf(1);
|
||||||
|
const gapless = _utilMjs.rotate(bin_pat, firstOne).join('').split('1').slice(1).map((s)=>[
|
||||||
|
s.length + 1,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
);
|
||||||
|
return this.struct(_strudelMjs.timeCat(...gapless)).late(firstOne / steps);
|
||||||
|
};
|
||||||
exports.default = euclid;
|
exports.default = euclid;
|
||||||
|
|
||||||
},{"../../strudel.mjs":"ggZqJ","bjork":"hTZTb","../../util.mjs":"9Z602","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"hTZTb":[function(require,module,exports) {
|
},{"../../strudel.mjs":"ggZqJ","bjork":"hTZTb","../../util.mjs":"9Z602","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"hTZTb":[function(require,module,exports) {
|
||||||
|
|
@ -183283,4 +183291,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.df5f5725.js.map
|
//# sourceMappingURL=index.dd5b0e5b.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.df5f5725.js" defer=""></script>
|
<script src="/tutorial/index.dd5b0e5b.js" defer=""></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue