mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
Merge branch 'main' into docs
This commit is contained in:
commit
d980c9ca4c
@ -22,7 +22,7 @@
|
||||
"lint": "eslint . --ext mjs,js --quiet",
|
||||
"codeformat": "prettier --write .",
|
||||
"format-check": "prettier --check .",
|
||||
"report-undocumented": "node undocumented.mjs > undocumented.json",
|
||||
"report-undocumented": "npm run jsdoc-json && node undocumented.mjs > undocumented.json",
|
||||
"check": "npm run format-check && npm run lint && npm run test",
|
||||
"iclc": "cd paper && pandoc --template=pandoc/iclc.html --citeproc --number-sections iclc2023.md -o iclc2023.html && pandoc --template=pandoc/iclc.latex --citeproc --number-sections iclc2023.md -o iclc2023.pdf"
|
||||
},
|
||||
|
||||
@ -621,14 +621,15 @@ const generic_params = [
|
||||
/**
|
||||
* Sets the room size of the reverb, see {@link room}.
|
||||
*
|
||||
* @name size
|
||||
* @name roomsize
|
||||
* @synonyms size
|
||||
* @param {number | Pattern} size between 0 and 10
|
||||
* @example
|
||||
* s("bd sd").room(.8).size("<0 1 2 4 8>")
|
||||
* s("bd sd").room(.8).roomsize("<0 1 2 4 8>")
|
||||
*
|
||||
*/
|
||||
// TODO: find out why :
|
||||
// s("bd sd").room(.8).size("<0 .2 .4 .6 .8 [1,0]>").osc()
|
||||
// s("bd sd").room(.8).roomsize("<0 .2 .4 .6 .8 [1,0]>").osc()
|
||||
// .. does not work. Is it because room is only one effect?
|
||||
[
|
||||
'f',
|
||||
|
||||
@ -1333,6 +1333,13 @@ export const and = curry((a, b) => reify(b).and(a));
|
||||
export const or = curry((a, b) => reify(b).or(a));
|
||||
export const func = curry((a, b) => reify(b).func(a));
|
||||
|
||||
/**
|
||||
* Registers a new pattern method. The method is added to the Pattern class + the standalone function is returned from register.
|
||||
*
|
||||
* @param {string} name name of the function
|
||||
* @param {function} func function with 1 or more params, where last is the current pattern
|
||||
*
|
||||
*/
|
||||
export function register(name, func) {
|
||||
if (Array.isArray(name)) {
|
||||
const result = {};
|
||||
@ -1742,6 +1749,12 @@ export const { zoomArc, zoomarc } = register(['zoomArc', 'zoomarc'], function (a
|
||||
return pat.zoom(a.begin, a.end);
|
||||
});
|
||||
|
||||
/**
|
||||
* Selects the given fraction of the pattern and repeats that part to fill the remainder of the cycle.
|
||||
* @param {number} fraction fraction to select
|
||||
* @example
|
||||
* s("lt ht mt cp, [hh oh]*2").linger("<1 .5 .25 .125>")
|
||||
*/
|
||||
export const linger = register('linger', function (t, pat) {
|
||||
if (t == 0) {
|
||||
return silence;
|
||||
@ -1751,10 +1764,23 @@ export const linger = register('linger', function (t, pat) {
|
||||
return pat._zoom(0, t)._slow(t);
|
||||
});
|
||||
|
||||
/**
|
||||
* Samples the pattern at a rate of n events per cycle. Useful for turning a continuous pattern into a discrete one.
|
||||
* @param {number} segments number of segments per cycle
|
||||
* @example
|
||||
* note(saw.range(0,12).segment(24)).add(40)
|
||||
*/
|
||||
export const segment = register('segment', function (rate, pat) {
|
||||
return pat.struct(pure(true)._fast(rate));
|
||||
});
|
||||
|
||||
/**
|
||||
* Swaps 1s and 0s in a binary pattern.
|
||||
* @name invert
|
||||
* @synonyms inv
|
||||
* @example
|
||||
* s("bd").struct("1 0 0 1 0 0 1 0".lastOf(4, invert))
|
||||
*/
|
||||
export const { invert, inv } = register(['invert', 'inv'], function (pat) {
|
||||
// Swap true/false in a binary pattern
|
||||
return pat.fmap((x) => !x);
|
||||
@ -1826,14 +1852,34 @@ export const rev = register('rev', function (pat) {
|
||||
return new Pattern(query).splitQueries();
|
||||
});
|
||||
|
||||
/**
|
||||
* Silences a pattern.
|
||||
* @example
|
||||
* stack(
|
||||
* s("bd").hush(),
|
||||
* s("hh*3")
|
||||
* )
|
||||
*/
|
||||
export const hush = register('hush', function (pat) {
|
||||
return silence;
|
||||
});
|
||||
|
||||
/**
|
||||
* Applies `rev` to a pattern every other cycle, so that the pattern alternates between forwards and backwards.
|
||||
* @example
|
||||
* note("c d e g").palindrome()
|
||||
*/
|
||||
export const palindrome = register('palindrome', function (pat) {
|
||||
return pat.every(2, rev);
|
||||
});
|
||||
|
||||
/**
|
||||
* Jux with adjustable stereo width. 0 = mono, 1 = full stereo.
|
||||
* @name juxBy
|
||||
* @synonyms juxby
|
||||
* @example
|
||||
* s("lt ht mt ht hh").juxBy("<0 .5 1>/2", rev)
|
||||
*/
|
||||
export const { juxBy, juxby } = register(['juxBy', 'juxby'], function (by, func, pat) {
|
||||
by /= 2;
|
||||
const elem_or = function (dict, key, dflt) {
|
||||
@ -1848,23 +1894,19 @@ export const { juxBy, juxby } = register(['juxBy', 'juxby'], function (by, func,
|
||||
return stack(left, func(right));
|
||||
});
|
||||
|
||||
/**
|
||||
* The jux function creates strange stereo effects, by applying a function to a pattern, but only in the right-hand channel.
|
||||
* @example
|
||||
* s("lt ht mt ht hh").jux(rev)
|
||||
*/
|
||||
export const jux = register('jux', function (func, pat) {
|
||||
return pat._juxBy(1, func, pat);
|
||||
});
|
||||
|
||||
export const { stutWith, stutwith } = register(['stutWith', 'stutwith'], function (times, time, func, pat) {
|
||||
return stack(...listRange(0, times - 1).map((i) => func(pat.late(Fraction(time).mul(i)), i)));
|
||||
});
|
||||
|
||||
export const stut = register('stut', function (times, feedback, time, pat) {
|
||||
return pat._stutWith(times, time, (pat, i) => pat.velocity(Math.pow(feedback, i)));
|
||||
});
|
||||
|
||||
/**
|
||||
* Superimpose and offset multiple times, applying the given function each time.
|
||||
* @name echoWith
|
||||
* @memberof Pattern
|
||||
* @returns Pattern
|
||||
* @synonyms echowith, stutWith, stutwith
|
||||
* @param {number} times how many times to repeat
|
||||
* @param {number} time cycle offset between iterations
|
||||
* @param {function} func function to apply, given the pattern and the iteration index
|
||||
@ -1873,9 +1915,12 @@ export const stut = register('stut', function (times, feedback, time, pat) {
|
||||
* .echoWith(4, 1/8, (p,n) => p.add(n*2))
|
||||
* .scale('C minor').note().legato(.2)
|
||||
*/
|
||||
export const { echoWith, echowith } = register(['echoWith', 'echowith'], function (times, time, func, pat) {
|
||||
return stack(...listRange(0, times - 1).map((i) => func(pat.late(Fraction(time).mul(i)), i)));
|
||||
});
|
||||
export const { echoWith, echowith, stutWith, stutwith } = register(
|
||||
['echoWith', 'echowith', 'stutWith', 'stutwith'],
|
||||
function (times, time, func, pat) {
|
||||
return stack(...listRange(0, times - 1).map((i) => func(pat.late(Fraction(time).mul(i)), i)));
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* Superimpose and offset multiple times, gradually decreasing the velocity
|
||||
@ -1892,6 +1937,19 @@ export const echo = register('echo', function (times, time, feedback, pat) {
|
||||
return pat._echoWith(times, time, (pat, i) => pat.velocity(Math.pow(feedback, i)));
|
||||
});
|
||||
|
||||
/**
|
||||
* Deprecated. Like echo, but the last 2 parameters are flipped.
|
||||
* @name stut
|
||||
* @param {number} times how many times to repeat
|
||||
* @param {number} feedback velocity multiplicator for each iteration
|
||||
* @param {number} time cycle offset between iterations
|
||||
* @example
|
||||
* s("bd sd").stut(3, .8, 1/6)
|
||||
*/
|
||||
export const stut = register('stut', function (times, feedback, time, pat) {
|
||||
return pat._echoWith(times, time, (pat, i) => pat.velocity(Math.pow(feedback, i)));
|
||||
});
|
||||
|
||||
/**
|
||||
* Divides a pattern into a given number of subdivisions, plays the subdivisions in order, but increments the starting subdivision each cycle. The pattern wraps to the first subdivision after the last subdivision is played.
|
||||
* @name iter
|
||||
@ -1917,6 +1975,7 @@ export const iter = register('iter', function (times, pat) {
|
||||
/**
|
||||
* Like `iter`, but plays the subdivisions in reverse order. Known as iter' in tidalcycles
|
||||
* @name iterBack
|
||||
* @synonyms iterback
|
||||
* @memberof Pattern
|
||||
* @returns Pattern
|
||||
* @example
|
||||
@ -1948,6 +2007,7 @@ export const chunk = register('chunk', function (n, func, pat) {
|
||||
/**
|
||||
* Like `chunk`, but cycles through the parts in reverse order. Known as chunk' in tidalcycles
|
||||
* @name chunkBack
|
||||
* @synonyms chunkback
|
||||
* @memberof Pattern
|
||||
* @returns Pattern
|
||||
* @example
|
||||
@ -1960,7 +2020,7 @@ export const { chunkBack, chunkback } = register(['chunkBack', 'chunkback'], fun
|
||||
// TODO - redefine elsewhere in terms of mask
|
||||
export const bypass = register('bypass', function (on, pat) {
|
||||
on = Boolean(parseInt(on));
|
||||
return on ? silence : this;
|
||||
return on ? silence : pat;
|
||||
});
|
||||
|
||||
// sets absolute duration of haps
|
||||
@ -1969,7 +2029,10 @@ export const duration = register('duration', function (value, pat) {
|
||||
return pat.withHapSpan((span) => new TimeSpan(span.begin, span.begin.add(value)));
|
||||
});
|
||||
|
||||
// TODO - make control?
|
||||
/**
|
||||
* Sets the color of the hap in visualizations like pianoroll or highlighting.
|
||||
*/
|
||||
// TODO: move this to controls https://github.com/tidalcycles/strudel/issues/288
|
||||
export const { color, colour } = register(['color', 'colour'], function (color, pat) {
|
||||
return pat.withContext((context) => ({ ...context, color }));
|
||||
});
|
||||
|
||||
@ -1977,6 +1977,23 @@ exports[`runs examples > example "hresonance" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "hush" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/3 | s:hh ]",
|
||||
"[ 1/3 → 2/3 | s:hh ]",
|
||||
"[ 2/3 → 1/1 | s:hh ]",
|
||||
"[ 1/1 → 4/3 | s:hh ]",
|
||||
"[ 4/3 → 5/3 | s:hh ]",
|
||||
"[ 5/3 → 2/1 | s:hh ]",
|
||||
"[ 2/1 → 7/3 | s:hh ]",
|
||||
"[ 7/3 → 8/3 | s:hh ]",
|
||||
"[ 8/3 → 3/1 | s:hh ]",
|
||||
"[ 3/1 → 10/3 | s:hh ]",
|
||||
"[ 10/3 → 11/3 | s:hh ]",
|
||||
"[ 11/3 → 4/1 | s:hh ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "inside" example index 0 1`] = `
|
||||
[
|
||||
"[ 1/8 → 1/4 | note:C3 ]",
|
||||
@ -2014,6 +2031,25 @@ exports[`runs examples > example "inside" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "invert" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | s:bd ]",
|
||||
"[ 3/8 → 1/2 | s:bd ]",
|
||||
"[ 3/4 → 7/8 | s:bd ]",
|
||||
"[ 1/1 → 9/8 | s:bd ]",
|
||||
"[ 11/8 → 3/2 | s:bd ]",
|
||||
"[ 7/4 → 15/8 | s:bd ]",
|
||||
"[ 2/1 → 17/8 | s:bd ]",
|
||||
"[ 19/8 → 5/2 | s:bd ]",
|
||||
"[ 11/4 → 23/8 | s:bd ]",
|
||||
"[ 25/8 → 13/4 | s:bd ]",
|
||||
"[ 13/4 → 27/8 | s:bd ]",
|
||||
"[ 7/2 → 29/8 | s:bd ]",
|
||||
"[ 29/8 → 15/4 | s:bd ]",
|
||||
"[ 31/8 → 4/1 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "irand" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | note:Bb3 ]",
|
||||
@ -2073,6 +2109,96 @@ exports[`runs examples > example "iterBack" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "jux" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/5 | s:lt pan:0 ]",
|
||||
"[ 1/5 → 2/5 | s:ht pan:0 ]",
|
||||
"[ 2/5 → 3/5 | s:mt pan:0 ]",
|
||||
"[ 3/5 → 4/5 | s:ht pan:0 ]",
|
||||
"[ 4/5 → 1/1 | s:hh pan:0 ]",
|
||||
"[ 4/5 → 1/1 | s:lt pan:1 ]",
|
||||
"[ 3/5 → 4/5 | s:ht pan:1 ]",
|
||||
"[ 2/5 → 3/5 | s:mt pan:1 ]",
|
||||
"[ 1/5 → 2/5 | s:ht pan:1 ]",
|
||||
"[ 0/1 → 1/5 | s:hh pan:1 ]",
|
||||
"[ 1/1 → 6/5 | s:lt pan:0 ]",
|
||||
"[ 6/5 → 7/5 | s:ht pan:0 ]",
|
||||
"[ 7/5 → 8/5 | s:mt pan:0 ]",
|
||||
"[ 8/5 → 9/5 | s:ht pan:0 ]",
|
||||
"[ 9/5 → 2/1 | s:hh pan:0 ]",
|
||||
"[ 9/5 → 2/1 | s:lt pan:1 ]",
|
||||
"[ 8/5 → 9/5 | s:ht pan:1 ]",
|
||||
"[ 7/5 → 8/5 | s:mt pan:1 ]",
|
||||
"[ 6/5 → 7/5 | s:ht pan:1 ]",
|
||||
"[ 1/1 → 6/5 | s:hh pan:1 ]",
|
||||
"[ 2/1 → 11/5 | s:lt pan:0 ]",
|
||||
"[ 11/5 → 12/5 | s:ht pan:0 ]",
|
||||
"[ 12/5 → 13/5 | s:mt pan:0 ]",
|
||||
"[ 13/5 → 14/5 | s:ht pan:0 ]",
|
||||
"[ 14/5 → 3/1 | s:hh pan:0 ]",
|
||||
"[ 14/5 → 3/1 | s:lt pan:1 ]",
|
||||
"[ 13/5 → 14/5 | s:ht pan:1 ]",
|
||||
"[ 12/5 → 13/5 | s:mt pan:1 ]",
|
||||
"[ 11/5 → 12/5 | s:ht pan:1 ]",
|
||||
"[ 2/1 → 11/5 | s:hh pan:1 ]",
|
||||
"[ 3/1 → 16/5 | s:lt pan:0 ]",
|
||||
"[ 16/5 → 17/5 | s:ht pan:0 ]",
|
||||
"[ 17/5 → 18/5 | s:mt pan:0 ]",
|
||||
"[ 18/5 → 19/5 | s:ht pan:0 ]",
|
||||
"[ 19/5 → 4/1 | s:hh pan:0 ]",
|
||||
"[ 19/5 → 4/1 | s:lt pan:1 ]",
|
||||
"[ 18/5 → 19/5 | s:ht pan:1 ]",
|
||||
"[ 17/5 → 18/5 | s:mt pan:1 ]",
|
||||
"[ 16/5 → 17/5 | s:ht pan:1 ]",
|
||||
"[ 3/1 → 16/5 | s:hh pan:1 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "juxBy" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/5 | s:lt pan:0.5 ]",
|
||||
"[ 1/5 → 2/5 | s:ht pan:0.5 ]",
|
||||
"[ 2/5 → 3/5 | s:mt pan:0.5 ]",
|
||||
"[ 3/5 → 4/5 | s:ht pan:0.5 ]",
|
||||
"[ 4/5 → 1/1 | s:hh pan:0.5 ]",
|
||||
"[ 4/5 → 1/1 | s:lt pan:0.5 ]",
|
||||
"[ 3/5 → 4/5 | s:ht pan:0.5 ]",
|
||||
"[ 2/5 → 3/5 | s:mt pan:0.5 ]",
|
||||
"[ 1/5 → 2/5 | s:ht pan:0.5 ]",
|
||||
"[ 0/1 → 1/5 | s:hh pan:0.5 ]",
|
||||
"[ 1/1 → 6/5 | s:lt pan:0.5 ]",
|
||||
"[ 6/5 → 7/5 | s:ht pan:0.5 ]",
|
||||
"[ 7/5 → 8/5 | s:mt pan:0.5 ]",
|
||||
"[ 8/5 → 9/5 | s:ht pan:0.5 ]",
|
||||
"[ 9/5 → 2/1 | s:hh pan:0.5 ]",
|
||||
"[ 9/5 → 2/1 | s:lt pan:0.5 ]",
|
||||
"[ 8/5 → 9/5 | s:ht pan:0.5 ]",
|
||||
"[ 7/5 → 8/5 | s:mt pan:0.5 ]",
|
||||
"[ 6/5 → 7/5 | s:ht pan:0.5 ]",
|
||||
"[ 1/1 → 6/5 | s:hh pan:0.5 ]",
|
||||
"[ 2/1 → 11/5 | s:lt pan:0.25 ]",
|
||||
"[ 11/5 → 12/5 | s:ht pan:0.25 ]",
|
||||
"[ 12/5 → 13/5 | s:mt pan:0.25 ]",
|
||||
"[ 13/5 → 14/5 | s:ht pan:0.25 ]",
|
||||
"[ 14/5 → 3/1 | s:hh pan:0.25 ]",
|
||||
"[ 14/5 → 3/1 | s:lt pan:0.75 ]",
|
||||
"[ 13/5 → 14/5 | s:ht pan:0.75 ]",
|
||||
"[ 12/5 → 13/5 | s:mt pan:0.75 ]",
|
||||
"[ 11/5 → 12/5 | s:ht pan:0.75 ]",
|
||||
"[ 2/1 → 11/5 | s:hh pan:0.75 ]",
|
||||
"[ 3/1 → 16/5 | s:lt pan:0.25 ]",
|
||||
"[ 16/5 → 17/5 | s:ht pan:0.25 ]",
|
||||
"[ 17/5 → 18/5 | s:mt pan:0.25 ]",
|
||||
"[ 18/5 → 19/5 | s:ht pan:0.25 ]",
|
||||
"[ 19/5 → 4/1 | s:hh pan:0.25 ]",
|
||||
"[ 19/5 → 4/1 | s:lt pan:0.75 ]",
|
||||
"[ 18/5 → 19/5 | s:ht pan:0.75 ]",
|
||||
"[ 17/5 → 18/5 | s:mt pan:0.75 ]",
|
||||
"[ 16/5 → 17/5 | s:ht pan:0.75 ]",
|
||||
"[ 3/1 → 16/5 | s:hh pan:0.75 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "lastOf" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | note:c3 ]",
|
||||
@ -2189,6 +2315,51 @@ exports[`runs examples > example "leslie" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "linger" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | s:lt ]",
|
||||
"[ 1/4 → 1/2 | s:ht ]",
|
||||
"[ 1/2 → 3/4 | s:mt ]",
|
||||
"[ 3/4 → 1/1 | s:cp ]",
|
||||
"[ 0/1 → 1/4 | s:hh ]",
|
||||
"[ 1/2 → 3/4 | s:hh ]",
|
||||
"[ 1/4 → 1/2 | s:oh ]",
|
||||
"[ 3/4 → 1/1 | s:oh ]",
|
||||
"[ 1/1 → 5/4 | s:lt ]",
|
||||
"[ 5/4 → 3/2 | s:ht ]",
|
||||
"[ 1/1 → 5/4 | s:hh ]",
|
||||
"[ 5/4 → 3/2 | s:oh ]",
|
||||
"[ 3/2 → 7/4 | s:lt ]",
|
||||
"[ 7/4 → 2/1 | s:ht ]",
|
||||
"[ 3/2 → 7/4 | s:hh ]",
|
||||
"[ 7/4 → 2/1 | s:oh ]",
|
||||
"[ 2/1 → 9/4 | s:lt ]",
|
||||
"[ 2/1 → 9/4 | s:hh ]",
|
||||
"[ 9/4 → 5/2 | s:lt ]",
|
||||
"[ 9/4 → 5/2 | s:hh ]",
|
||||
"[ 5/2 → 11/4 | s:lt ]",
|
||||
"[ 5/2 → 11/4 | s:hh ]",
|
||||
"[ 11/4 → 3/1 | s:lt ]",
|
||||
"[ 11/4 → 3/1 | s:hh ]",
|
||||
"[ (3/1 → 25/8) ⇝ 13/4 | s:lt ]",
|
||||
"[ (3/1 → 25/8) ⇝ 13/4 | s:hh ]",
|
||||
"[ (25/8 → 13/4) ⇝ 27/8 | s:lt ]",
|
||||
"[ (25/8 → 13/4) ⇝ 27/8 | s:hh ]",
|
||||
"[ (13/4 → 27/8) ⇝ 7/2 | s:lt ]",
|
||||
"[ (13/4 → 27/8) ⇝ 7/2 | s:hh ]",
|
||||
"[ (27/8 → 7/2) ⇝ 29/8 | s:lt ]",
|
||||
"[ (27/8 → 7/2) ⇝ 29/8 | s:hh ]",
|
||||
"[ (7/2 → 29/8) ⇝ 15/4 | s:lt ]",
|
||||
"[ (7/2 → 29/8) ⇝ 15/4 | s:hh ]",
|
||||
"[ (29/8 → 15/4) ⇝ 31/8 | s:lt ]",
|
||||
"[ (29/8 → 15/4) ⇝ 31/8 | s:hh ]",
|
||||
"[ (15/4 → 31/8) ⇝ 4/1 | s:lt ]",
|
||||
"[ (15/4 → 31/8) ⇝ 4/1 | s:hh ]",
|
||||
"[ (31/8 → 4/1) ⇝ 33/8 | s:lt ]",
|
||||
"[ (31/8 → 4/1) ⇝ 33/8 | s:hh ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "loop" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/1 | s:bd loop:1 ]",
|
||||
@ -2480,6 +2651,27 @@ exports[`runs examples > example "outside" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "palindrome" example index 0 1`] = `
|
||||
[
|
||||
"[ 3/4 → 1/1 | note:c ]",
|
||||
"[ 1/2 → 3/4 | note:d ]",
|
||||
"[ 1/4 → 1/2 | note:e ]",
|
||||
"[ 0/1 → 1/4 | note:g ]",
|
||||
"[ 1/1 → 5/4 | note:c ]",
|
||||
"[ 5/4 → 3/2 | note:d ]",
|
||||
"[ 3/2 → 7/4 | note:e ]",
|
||||
"[ 7/4 → 2/1 | note:g ]",
|
||||
"[ 11/4 → 3/1 | note:c ]",
|
||||
"[ 5/2 → 11/4 | note:d ]",
|
||||
"[ 9/4 → 5/2 | note:e ]",
|
||||
"[ 2/1 → 9/4 | note:g ]",
|
||||
"[ 3/1 → 13/4 | note:c ]",
|
||||
"[ 13/4 → 7/2 | note:d ]",
|
||||
"[ 7/2 → 15/4 | note:e ]",
|
||||
"[ 15/4 → 4/1 | note:g ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "pan" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | s:bd pan:0.5 ]",
|
||||
@ -2908,6 +3100,19 @@ exports[`runs examples > example "room" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "roomsize" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/2 | s:bd room:0.8 roomsize:0 ]",
|
||||
"[ 1/2 → 1/1 | s:sd room:0.8 roomsize:0 ]",
|
||||
"[ 1/1 → 3/2 | s:bd room:0.8 roomsize:1 ]",
|
||||
"[ 3/2 → 2/1 | s:sd room:0.8 roomsize:1 ]",
|
||||
"[ 2/1 → 5/2 | s:bd room:0.8 roomsize:2 ]",
|
||||
"[ 5/2 → 3/1 | s:sd room:0.8 roomsize:2 ]",
|
||||
"[ 3/1 → 7/2 | s:bd room:0.8 roomsize:4 ]",
|
||||
"[ 7/2 → 4/1 | s:sd room:0.8 roomsize:4 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "rootNotes" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/1 | note:C2 ]",
|
||||
@ -3064,6 +3269,107 @@ exports[`runs examples > example "scaleTranspose" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "segment" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/24 | note:40.25 ]",
|
||||
"[ 1/24 → 1/12 | note:40.75 ]",
|
||||
"[ 1/12 → 1/8 | note:41.25 ]",
|
||||
"[ 1/8 → 1/6 | note:41.75 ]",
|
||||
"[ 1/6 → 5/24 | note:42.25 ]",
|
||||
"[ 5/24 → 1/4 | note:42.75 ]",
|
||||
"[ 1/4 → 7/24 | note:43.25 ]",
|
||||
"[ 7/24 → 1/3 | note:43.75 ]",
|
||||
"[ 1/3 → 3/8 | note:44.25 ]",
|
||||
"[ 3/8 → 5/12 | note:44.75 ]",
|
||||
"[ 5/12 → 11/24 | note:45.25 ]",
|
||||
"[ 11/24 → 1/2 | note:45.75 ]",
|
||||
"[ 1/2 → 13/24 | note:46.25 ]",
|
||||
"[ 13/24 → 7/12 | note:46.75 ]",
|
||||
"[ 7/12 → 5/8 | note:47.25 ]",
|
||||
"[ 5/8 → 2/3 | note:47.75 ]",
|
||||
"[ 2/3 → 17/24 | note:48.25 ]",
|
||||
"[ 17/24 → 3/4 | note:48.75 ]",
|
||||
"[ 3/4 → 19/24 | note:49.25 ]",
|
||||
"[ 19/24 → 5/6 | note:49.75 ]",
|
||||
"[ 5/6 → 7/8 | note:50.25 ]",
|
||||
"[ 7/8 → 11/12 | note:50.75 ]",
|
||||
"[ 11/12 → 23/24 | note:51.25 ]",
|
||||
"[ 23/24 → 1/1 | note:51.75 ]",
|
||||
"[ 1/1 → 25/24 | note:40.25 ]",
|
||||
"[ 25/24 → 13/12 | note:40.75 ]",
|
||||
"[ 13/12 → 9/8 | note:41.25 ]",
|
||||
"[ 9/8 → 7/6 | note:41.75 ]",
|
||||
"[ 7/6 → 29/24 | note:42.25 ]",
|
||||
"[ 29/24 → 5/4 | note:42.75 ]",
|
||||
"[ 5/4 → 31/24 | note:43.25 ]",
|
||||
"[ 31/24 → 4/3 | note:43.75 ]",
|
||||
"[ 4/3 → 11/8 | note:44.25 ]",
|
||||
"[ 11/8 → 17/12 | note:44.75 ]",
|
||||
"[ 17/12 → 35/24 | note:45.25 ]",
|
||||
"[ 35/24 → 3/2 | note:45.75 ]",
|
||||
"[ 3/2 → 37/24 | note:46.25 ]",
|
||||
"[ 37/24 → 19/12 | note:46.75 ]",
|
||||
"[ 19/12 → 13/8 | note:47.25 ]",
|
||||
"[ 13/8 → 5/3 | note:47.75 ]",
|
||||
"[ 5/3 → 41/24 | note:48.25 ]",
|
||||
"[ 41/24 → 7/4 | note:48.75 ]",
|
||||
"[ 7/4 → 43/24 | note:49.25 ]",
|
||||
"[ 43/24 → 11/6 | note:49.75 ]",
|
||||
"[ 11/6 → 15/8 | note:50.25 ]",
|
||||
"[ 15/8 → 23/12 | note:50.75 ]",
|
||||
"[ 23/12 → 47/24 | note:51.25 ]",
|
||||
"[ 47/24 → 2/1 | note:51.75 ]",
|
||||
"[ 2/1 → 49/24 | note:40.25 ]",
|
||||
"[ 49/24 → 25/12 | note:40.75 ]",
|
||||
"[ 25/12 → 17/8 | note:41.25 ]",
|
||||
"[ 17/8 → 13/6 | note:41.75 ]",
|
||||
"[ 13/6 → 53/24 | note:42.25 ]",
|
||||
"[ 53/24 → 9/4 | note:42.75 ]",
|
||||
"[ 9/4 → 55/24 | note:43.25 ]",
|
||||
"[ 55/24 → 7/3 | note:43.75 ]",
|
||||
"[ 7/3 → 19/8 | note:44.25 ]",
|
||||
"[ 19/8 → 29/12 | note:44.75 ]",
|
||||
"[ 29/12 → 59/24 | note:45.25 ]",
|
||||
"[ 59/24 → 5/2 | note:45.75 ]",
|
||||
"[ 5/2 → 61/24 | note:46.25 ]",
|
||||
"[ 61/24 → 31/12 | note:46.75 ]",
|
||||
"[ 31/12 → 21/8 | note:47.25 ]",
|
||||
"[ 21/8 → 8/3 | note:47.75 ]",
|
||||
"[ 8/3 → 65/24 | note:48.25 ]",
|
||||
"[ 65/24 → 11/4 | note:48.75 ]",
|
||||
"[ 11/4 → 67/24 | note:49.25 ]",
|
||||
"[ 67/24 → 17/6 | note:49.75 ]",
|
||||
"[ 17/6 → 23/8 | note:50.25 ]",
|
||||
"[ 23/8 → 35/12 | note:50.75 ]",
|
||||
"[ 35/12 → 71/24 | note:51.25 ]",
|
||||
"[ 71/24 → 3/1 | note:51.75 ]",
|
||||
"[ 3/1 → 73/24 | note:40.25 ]",
|
||||
"[ 73/24 → 37/12 | note:40.75 ]",
|
||||
"[ 37/12 → 25/8 | note:41.25 ]",
|
||||
"[ 25/8 → 19/6 | note:41.75 ]",
|
||||
"[ 19/6 → 77/24 | note:42.25 ]",
|
||||
"[ 77/24 → 13/4 | note:42.75 ]",
|
||||
"[ 13/4 → 79/24 | note:43.25 ]",
|
||||
"[ 79/24 → 10/3 | note:43.75 ]",
|
||||
"[ 10/3 → 27/8 | note:44.25 ]",
|
||||
"[ 27/8 → 41/12 | note:44.75 ]",
|
||||
"[ 41/12 → 83/24 | note:45.25 ]",
|
||||
"[ 83/24 → 7/2 | note:45.75 ]",
|
||||
"[ 7/2 → 85/24 | note:46.25 ]",
|
||||
"[ 85/24 → 43/12 | note:46.75 ]",
|
||||
"[ 43/12 → 29/8 | note:47.25 ]",
|
||||
"[ 29/8 → 11/3 | note:47.75 ]",
|
||||
"[ 11/3 → 89/24 | note:48.25 ]",
|
||||
"[ 89/24 → 15/4 | note:48.75 ]",
|
||||
"[ 15/4 → 91/24 | note:49.25 ]",
|
||||
"[ 91/24 → 23/6 | note:49.75 ]",
|
||||
"[ 23/6 → 31/8 | note:50.25 ]",
|
||||
"[ 31/8 → 47/12 | note:50.75 ]",
|
||||
"[ 47/12 → 95/24 | note:51.25 ]",
|
||||
"[ 95/24 → 4/1 | note:51.75 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "seq" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | s:hh ]",
|
||||
@ -3423,6 +3729,43 @@ exports[`runs examples > example "struct" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "stut" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/2 | s:bd ]",
|
||||
"[ 1/2 → 1/1 | s:sd ]",
|
||||
"[ -1/3 ⇜ (0/1 → 1/6) | s:sd ]",
|
||||
"[ 1/6 → 2/3 | s:bd ]",
|
||||
"[ (2/3 → 1/1) ⇝ 7/6 | s:sd ]",
|
||||
"[ -1/6 ⇜ (0/1 → 1/3) | s:sd ]",
|
||||
"[ 1/3 → 5/6 | s:bd ]",
|
||||
"[ (5/6 → 1/1) ⇝ 4/3 | s:sd ]",
|
||||
"[ 1/1 → 3/2 | s:bd ]",
|
||||
"[ 3/2 → 2/1 | s:sd ]",
|
||||
"[ 2/3 ⇜ (1/1 → 7/6) | s:sd ]",
|
||||
"[ 7/6 → 5/3 | s:bd ]",
|
||||
"[ (5/3 → 2/1) ⇝ 13/6 | s:sd ]",
|
||||
"[ 5/6 ⇜ (1/1 → 4/3) | s:sd ]",
|
||||
"[ 4/3 → 11/6 | s:bd ]",
|
||||
"[ (11/6 → 2/1) ⇝ 7/3 | s:sd ]",
|
||||
"[ 2/1 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 3/1 | s:sd ]",
|
||||
"[ 5/3 ⇜ (2/1 → 13/6) | s:sd ]",
|
||||
"[ 13/6 → 8/3 | s:bd ]",
|
||||
"[ (8/3 → 3/1) ⇝ 19/6 | s:sd ]",
|
||||
"[ 11/6 ⇜ (2/1 → 7/3) | s:sd ]",
|
||||
"[ 7/3 → 17/6 | s:bd ]",
|
||||
"[ (17/6 → 3/1) ⇝ 10/3 | s:sd ]",
|
||||
"[ 3/1 → 7/2 | s:bd ]",
|
||||
"[ 7/2 → 4/1 | s:sd ]",
|
||||
"[ 8/3 ⇜ (3/1 → 19/6) | s:sd ]",
|
||||
"[ 19/6 → 11/3 | s:bd ]",
|
||||
"[ (11/3 → 4/1) ⇝ 25/6 | s:sd ]",
|
||||
"[ 17/6 ⇜ (3/1 → 10/3) | s:sd ]",
|
||||
"[ 10/3 → 23/6 | s:bd ]",
|
||||
"[ (23/6 → 4/1) ⇝ 13/3 | s:sd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "sub" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/3 | note:C4 ]",
|
||||
|
||||
@ -72,28 +72,12 @@
|
||||
"and",
|
||||
"or",
|
||||
"func",
|
||||
"register",
|
||||
"compressSpan",
|
||||
"compressspan",
|
||||
"focusSpan",
|
||||
"focusspan",
|
||||
"zoomArc",
|
||||
"zoomarc",
|
||||
"linger",
|
||||
"segment",
|
||||
"invert",
|
||||
"inv",
|
||||
"hush",
|
||||
"palindrome",
|
||||
"juxBy",
|
||||
"juxby",
|
||||
"jux",
|
||||
"stutWith",
|
||||
"stutwith",
|
||||
"stut",
|
||||
"echowith",
|
||||
"iterback",
|
||||
"chunkback",
|
||||
"bypass",
|
||||
"duration",
|
||||
"color",
|
||||
|
||||
@ -27,4 +27,8 @@ import { JsDoc } from '../../docs/JsDoc';
|
||||
|
||||
## echoWith
|
||||
|
||||
<JsDoc client:idle name="Pattern.echoWith" h={0} />
|
||||
<JsDoc client:idle name="echoWith" h={0} />
|
||||
|
||||
## stut
|
||||
|
||||
<JsDoc client:idle name="stut" h={0} />
|
||||
|
||||
@ -51,3 +51,11 @@ import { JsDoc } from '../../docs/JsDoc';
|
||||
## restart
|
||||
|
||||
<JsDoc client:idle name="Pattern#restart" h={0} />
|
||||
|
||||
## hush
|
||||
|
||||
<JsDoc client:idle name="hush" h={0} />
|
||||
|
||||
## invert
|
||||
|
||||
<JsDoc client:idle name="invert" h={0} />
|
||||
|
||||
@ -64,6 +64,14 @@ As you might suspect, the effects can be chained together, and they accept a pat
|
||||
|
||||
<JsDoc client:idle name="vowel" h={0} />
|
||||
|
||||
## jux
|
||||
|
||||
<JsDoc client:idle name="jux" h={0} />
|
||||
|
||||
## juxBy
|
||||
|
||||
<JsDoc client:idle name="juxBy" h={0} />
|
||||
|
||||
# Global Effects
|
||||
|
||||
## Local vs Global Effects
|
||||
@ -91,6 +99,6 @@ global effects use the same chain for all events of the same orbit:
|
||||
|
||||
<JsDoc client:idle name="room" h={0} />
|
||||
|
||||
## size / roomsize
|
||||
## roomsize
|
||||
|
||||
<JsDoc client:idle name="size" h={0} />
|
||||
<JsDoc client:idle name="roomsize" h={0} />
|
||||
|
||||
@ -54,6 +54,10 @@ Some of these have equivalent operators in the Mini Notation:
|
||||
|
||||
<JsDoc client:idle name="Pattern.rev" h={0} />
|
||||
|
||||
## palindrome
|
||||
|
||||
<JsDoc client:idle name="palindrome" h={0} />
|
||||
|
||||
## iter
|
||||
|
||||
<JsDoc client:idle name="Pattern.iter" h={0} />
|
||||
@ -66,6 +70,10 @@ Some of these have equivalent operators in the Mini Notation:
|
||||
|
||||
<JsDoc client:idle name="ply" h={0} />
|
||||
|
||||
## segment
|
||||
|
||||
<JsDoc client:idle name="segment" h={0} />
|
||||
|
||||
## compress
|
||||
|
||||
<JsDoc client:idle name="compress" h={0} />
|
||||
@ -74,6 +82,10 @@ Some of these have equivalent operators in the Mini Notation:
|
||||
|
||||
<JsDoc client:idle name="zoom" h={0} />
|
||||
|
||||
## linger
|
||||
|
||||
<JsDoc client:idle name="linger" h={0} />
|
||||
|
||||
## fastGap
|
||||
|
||||
<JsDoc client:idle name="fastGap" h={0} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user