diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index d4e05393c..e6d5c89e5 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -118,7 +118,7 @@ export const { s, sound } = registerControl(['s', 'n', 'gain'], 'sound'); * @param {number | Pattern} position Position in the wavetable from 0 to 1 * @synonyms wavetablePosition * @example - * s("squelch").bank("wt_digital").seg(8).note("F1").wt("0 0.25 0.5 0.75 1") + * s("wt_digital").seg(8).note("F1").wt("0 0.25 0.5 0.75 1") */ export const { wt, wavetablePosition } = registerControl('wt', 'wavetablePosition'); @@ -1988,11 +1988,10 @@ export const { spread } = registerControl('spread'); * Set dryness of reverb. See `room` and `size` for more information about reverb. * * @name dry - * @tags superdirt + * @tags superdirt, superdough * @param {number | Pattern} dry 0 = wet, 1 = dry * @example * n("[0,3,7](3,8)").s("superpiano").room(.7).dry("<0 .5 .75 1>").osc() - * @superdirtOnly * */ export const { dry } = registerControl('dry'); @@ -2226,7 +2225,7 @@ export const { orbit } = registerControl('orbit', 'o'); * otherPat.bmod(..) (to modulate another pattern with the bus) * * @name bus - * @tags superdirt + * @tags superdough * @param {number | Pattern} number */ export const { bus } = registerControl('bus'); @@ -2235,7 +2234,7 @@ export const { bus } = registerControl('bus'); * Postgain multiplier prior to sending the signal to the audio bus. * * @name busgain - * @tags superdirt + * @tags superdough * @synonyms bgain * @param {number | Pattern} number */ @@ -2377,7 +2376,7 @@ export const { mode } = registerControl(['mode', 'anchor']); * * @name room * @tags orbit, superdough - * @param {number | Pattern} level between 0 and 1 + * @param {number | Pattern} level * @example * s("bd sd [~ bd] sd").room("<0 .2 .4 .6 .8 1>") * @example diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index 55e7ad73c..1b4ac6b26 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -504,10 +504,25 @@ export class Pattern { /** * Returns a new pattern with the given function applied to the list of haps returned by every query. + * + * As an end user, you will most likely not need to use this; look at `withContext`, `withHapSpan`, etc. instead. * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete + * @example + * note("[a b, c d] a b c d").s("gm_piano").withHaps(x=>{ + * if (x.length > 1) { + * x = x.map(hap => hap.withValue(val => { + * return { + * n: 1, + * // select gm_piano:1 sample + * ...val + * } + * })); + * } + * return x + * }) */ withHaps(func) { const result = new Pattern((state) => func(this.query(state), state)); @@ -517,10 +532,23 @@ export class Pattern { /** * As with `withHaps`, but applies the function to every hap, rather than every list of haps. + * + * As an end user, you will most likely not need to use this; look at `withContext`, `withHapSpan`, etc. instead. * @tags internals * @param {Function} func * @returns Pattern * @noAutocomplete + * @example + * note("c a f e").withHap(x=>{ + * if (x.value.note == 'c') { + * x.value.s = 'gm_piano' + * } + * else { + * x.value.s = 'gm_piano' + * x.value.n = 2 + * } + * return x + * }) */ withHap(func) { return this.withHaps((haps) => haps.map(func)); @@ -850,6 +878,26 @@ export class Pattern { return stack(this, ...pats); } + stackLeft(...pats) { + return stackLeft(this, ...pats); + } + + stackRight(...pats) { + return stackRight(this, ...pats); + } + + stackCenter(...pats) { + return stackCenter(this, ...pats); + } + + stackCentre(...pats) { + return stackCentre(this, ...pats); + } + + stackRepeat(...pats) { + return stackRepeat(this, ...pats); + } + sequence(...pats) { return sequence(this, ...pats); } @@ -1074,7 +1122,7 @@ const COMPOSERS = { * @param {Pattern} pat * @returns {Pattern} * @memberof Pattern - * @tags internal, combiners + * @tags internals, combiners * @example * // because input pattern has `s` set, * // it overrides the "sine" declared earlier @@ -1099,7 +1147,7 @@ const COMPOSERS = { * @param {Pattern} pat * @memberof Pattern * @returns {Pattern} - * @tags internal, combiners + * @tags internals, combiners * @example * // notes, already defined, will stay "c a f e", * // while "s", not defined, will be set to "piano" @@ -1156,24 +1204,163 @@ const COMPOSERS = { * @tags math */ div: [numeralArgs((a, b) => a / b)], + /** + * + * Divides each number by the given factor and returns the remainder + * @name mod + * @memberof Pattern + * @tags math + */ mod: [numeralArgs(_mod)], + /** + * + * Raises each number to the power of the given factor + * @name pow + * @memberof Pattern + * @tags math + */ pow: [numeralArgs(Math.pow)], + /** + * + * Performs a bitwise `and` on each number and the given factor + * @name band + * @memberof Pattern + * @tags math + */ band: [numeralArgs((a, b) => a & b)], + /** + * + * Performs a bitwise `or` on each number and the given factor + * @name bor + * @memberof Pattern + * @tags math + */ bor: [numeralArgs((a, b) => a | b)], + /** + * + * Performs a bitwise `xor` on each number and the given factor + * @name bxor + * @memberof Pattern + * @tags math + */ bxor: [numeralArgs((a, b) => a ^ b)], + /** + * + * Performs a bitwise `left shift` on each number by the given factor + * @name blshift + * @memberof Pattern + * @tags math + */ blshift: [numeralArgs((a, b) => a << b)], + /** + * + * Performs a bitwise `right shift` on each number by the given factor + * @name brshift + * @memberof Pattern + * @tags math + */ brshift: [numeralArgs((a, b) => a >> b)], // TODO - force numerical comparison if both look like numbers? + /** + * performs a < b + * @name lt + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ lt: [(a, b) => a < b], + /** + * performs a > b + * @name gt + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ gt: [(a, b) => a > b], + /** + * performs a <= b + * @name lte + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ lte: [(a, b) => a <= b], + /** + * performs a >= b + * @name gte + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ gte: [(a, b) => a >= b], + /** + * performs a == b + * @name eq + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ eq: [(a, b) => a == b], + /** + * performs a === b (strictly equal) + * @name eqt + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ eqt: [(a, b) => a === b], + /** + * performs a != b + * @name ne + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ ne: [(a, b) => a != b], + /** + * performs a !== b (strictly not equal) + * @name net + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ net: [(a, b) => a !== b], + /** + * performs a && b + * @name and + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ and: [(a, b) => a && b], + /** + * performs a || b + * @name or + * @memberof Pattern + * @tags math + * @param {any} a + * @param {any} b + * @returns Pattern with boolean value(s) + */ or: [(a, b) => a || b], // bitwise ops @@ -1482,6 +1669,18 @@ function _stackWith(func, pats) { return stack(...func(steps, pats)); } +/** + * The input patterns are aligned to the left, with silence padded to the shorter pattern(s) in the final steps if there's a stepcount disparity. See also `stackRight` and `stackCenter/stackCentre` + * + * @name stackLeft + * @tags temporal, stepwise, combiners + * @return {Pattern} + * @example + * stackLeft("0 1 2 3", "3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + * @example + * // chainable + * "0 1 2 3".stackLeft("3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + */ export function stackLeft(...pats) { return _stackWith( (steps, pats) => pats.map((pat) => (pat._steps.eq(steps) ? pat : stepcat(pat, gap(steps.sub(pat._steps))))), @@ -1489,6 +1688,18 @@ export function stackLeft(...pats) { ); } +/** + * The input patterns are aligned to the right, with silence padded to the shorter pattern(s) in the initial steps if there's a stepcount disparity. See also `stackLeft` and `stackCenter/stackCentre` + * + * @name stackRight + * @tags temporal, stepwise, combiners + * @return {Pattern} + * @example + * stackRight("0 1 2 3", "3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + * @example + * // chainable + * "0 1 2 3".stackRight("3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + */ export function stackRight(...pats) { return _stackWith( (steps, pats) => pats.map((pat) => (pat._steps.eq(steps) ? pat : stepcat(gap(steps.sub(pat._steps)), pat))), @@ -1496,7 +1707,19 @@ export function stackRight(...pats) { ); } -export function stackCentre(...pats) { +/** + * The input patterns are aligned to the right, with silence padded to the shorter pattern(s) in the initial steps if there's a stepcount disparity. See also `stackLeft` and `stackRight` + * @name stackCenter + * @tags temporal, stepwise, combiners + * @synonyms stackCentre + * @return {Pattern} + * @example + * stackCenter("0 1 2 3", "3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + * @example + * // chainable + * "0 1 2 3".stackCenter("3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + */ +export function stackCenter(...pats) { return _stackWith( (steps, pats) => pats.map((pat) => { @@ -1510,6 +1733,25 @@ export function stackCentre(...pats) { ); } +export function stackCentre(...pats) { + return stackCenter(...pats); +} + +/** + * Shorthand for `pm(patterns).pace(m)` where m is the max step count in the input patterns + * @name stackRepeat + * @tags temporal, stepwise, combiners + * @return {Pattern} + * @example + * stackRepeat("0 1 2 3", "3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + * @example + * // chainable + * "0 1 2 3".stackRepeat("3 4", "[4 5 6] 7 8 9 10").scale("c:minor").note() + */ +export function stackRepeat(...pats) { + return stackBy(reify('repeat'), ...pats); +} + export function stackBy(by, ...pats) { const [left, ...right] = pats.map((pat) => pat._steps); const steps = left.maximum(...right); @@ -1624,10 +1866,10 @@ export function arrange(...sections) { * @tags combiners * @return {Pattern} * @example -seqPLoop( - [0, 2, "bd(3,8)"], - [1, 3, "cp(3,8)"] -).sound() + * seqPLoop( + * [0, 2, "bd(3,8)"], + * [1, 3, "cp(3,8)"] + * ).sound() */ export function seqPLoop(...parts) { let total = Fraction(0); @@ -2304,11 +2546,11 @@ export const { zoomArc, zoomarc } = register(['zoomArc', 'zoomarc'], function (a * @param {number} slices to play * @example * note("0 1 2 3 4 5 6 7".scale('c:mixolydian')) - *.bite(4, "3 2 1 0") + * .bite(4, "3 2 1 0") * @example * sound("bd - bd bd*2, - sd:6 - sd:5 sd:1 - [- sd:2] -, hh [- cp:7]") - .bank("RolandTR909").speed(1.2) - .bite(4, "0 0 [1 2] <3 2> 0 0 [2 1] 3") + * .bank("RolandTR909").speed(1.2) + * .bite(4, "0 0 [1 2] <3 2> 0 0 [2 1] 3") */ export const bite = register( 'bite', @@ -2431,8 +2673,12 @@ export const off = register('off', function (time_pat, func, pat) { * Returns a new pattern where every other cycle is played once, twice as * fast, and offset in time by one quarter of a cycle. Creates a kind of * breakbeat feel. + * @name brak * @tags temporal * @returns Pattern + * @memberof Pattern + * @example + * s("bd hh!2 rim").brak() */ export const brak = register('brak', function (pat) { return pat.when(slowcat(false, true), (x) => fastcat(x, silence)._late(0.25)); @@ -2921,10 +3167,29 @@ export const { ribbon, rib } = register(['ribbon', 'rib'], (offset, cycles, pat) pat.early(offset).restart(pure(1).slow(cycles)), ); +/** + * Sets the pattern's color to the given [hsla](https://www.w3schools.com/htmL/html_colors_hsl.asp) + * + * @name hsla + * @param {Number} hue (0 - 360) + * @param {Number} saturation percentage (0 - 100) + * @param {Number} lightness percentage (0 - 100) + * @param {Number} alpha (transparency) (0.0 - 1.0) + * @tags visualization + */ export const hsla = register('hsla', (h, s, l, a, pat) => { return pat.color(`hsla(${h}turn,${s * 100}%,${l * 100}%,${a})`); }); +/** + * Sets the pattern's color to the given [hsl](https://www.w3schools.com/htmL/html_colors_hsl.asp) + * + * @name hsl + * @param {Number} hue (0 - 360) + * @param {Number} saturation percentage (0 - 100) + * @param {Number} lightness percentage (0 - 100) + * @tags visualization + */ export const hsl = register('hsl', (h, s, l, pat) => { return pat.color(`hsl(${h}turn,${s * 100}%,${l * 100}%)`); }); @@ -3280,7 +3545,7 @@ export const drop = stepRegister('drop', function (i, pat) { * @tags stepwise * @example * stepcat( - * sound("bd bd - cp").extend(2), + * sound("bd bd - ").extend(2), * sound("bd - sd -") * ).pace(8) */ @@ -3291,15 +3556,12 @@ export const extend = stepRegister('extend', function (factor, pat) { /** * *Experimental* * - * `replicate` is similar to `fast` in that it increases its density, but it also increases the step count - * accordingly. So `stepcat("a b".replicate(2), "c d")` would be the same as `"a b a b c d"`, whereas - * `stepcat("a b".fast(2), "c d")` would be the same as `"[a b] [a b] c d"`. + * `replicate` is similar to `extend`, except that `replicate` will "replicate" the thing being extended. This will only differ from `extend` when the input pattern differs from cycle to cycle. * - * TODO: find out how this function differs from extend * @tags stepwise * @example * stepcat( - * sound("bd bd - cp").replicate(2), + * sound("bd bd - ").replicate(2), * sound("bd - sd -") * ).pace(8) */ @@ -3395,8 +3657,8 @@ export const growlist = (amount, pat) => pat.growlist(amount); * "tha dhi thom nam".shrink("1 -1").sound().bank("mridangam").pace(4) * @example * note("0 1 2 3 4 5 6 7".scale("C:ritusen")).sound("folkharp") - .shrink("1 -1").pace(8) - + * .shrink("1 -1").pace(8) + * */ export const shrink = register( @@ -3435,7 +3697,7 @@ export const shrink = register( * "tha dhi thom nam".grow("1 -1").sound().bank("mridangam").pace(4) * @example * note("0 1 2 3 4 5 6 7".scale("C:ritusen")).sound("folkharp") - .grow("1 -1").pace(8) + * .grow("1 -1").pace(8) */ export const grow = register( @@ -3459,17 +3721,17 @@ export const grow = register( /** * *Experimental* - * - * Inserts a pattern into a list of patterns. On the first repetition it will be inserted at the end of the list, then moved backwards through the list - * on successive repetitions. The patterns are added together stepwise, with all repetitions taking place over a single cycle. Using `pace` to set the + * + * Inserts a pattern into a list of patterns. On the first repetition it will be inserted at the end of the list, then moved backwards through the list + * on successive repetitions. The patterns are added together stepwise, with all repetitions taking place over a single cycle. Using `pace` to set the * number of steps per cycle is therefore usually recommended. * * @tags stepwise * @return {Pattern} * @example * "[c g]".tour("e f", "e f g", "g f e c").note() - .sound("folkharp") - .pace(8) + * .sound("folkharp") + * .pace(8) */ export const tour = function (pat, ...many) { return pat.tour(...many); @@ -3487,16 +3749,16 @@ Pattern.prototype.tour = function (...many) { /** * *Experimental* - * - * 'zips' together the steps of the provided patterns. This can create a long repetition, taking place over a single, dense cycle. + * + * 'zips' together the steps of the provided patterns. This can create a long repetition, taking place over a single, dense cycle. * Using `pace` to set the number of steps per cycle is therefore usually recommended. - * + * * @tags stepwise * @returns {Pattern} * @example * zip("e f", "e f g", "g [f e] a f4 c").note() - .sound("folkharp") - .pace(8) + * .sound("folkharp") + * .pace(8) */ export const zip = function (...pats) { pats = pats.filter((pat) => pat.hasSteps); diff --git a/packages/core/pick.mjs b/packages/core/pick.mjs index 3974c695b..35bd5fc2c 100644 --- a/packages/core/pick.mjs +++ b/packages/core/pick.mjs @@ -104,6 +104,8 @@ export const pickmodF = register('pickmodF', function (pickPattern, lookup, pat) * @param {Pattern} pat * @param {*} xs * @returns {Pattern} + * @example + * note("<0*4 1 2*2 3*3>".pickOut(["g a", "e f", "f g f g" , "g c d"])) */ export const pickOut = register('pickOut', function (lookup, pat) { return _pick(lookup, pat, false).outerJoin(); diff --git a/packages/core/schedulerState.mjs b/packages/core/schedulerState.mjs index 14b4c9054..7c39fb373 100644 --- a/packages/core/schedulerState.mjs +++ b/packages/core/schedulerState.mjs @@ -9,6 +9,12 @@ let cpsFunc; let pattern; let triggerFunc; let isStarted; + +/** + * @name getTime + * @tags internals + * @returns {Number} the current cycle time as a number + */ export function getTime() { if (!time) { throw new Error('no time set! use setTime to define a time source'); @@ -24,6 +30,11 @@ export function setCpsFunc(func) { cpsFunc = func; } +/** + * @name getCps + * @tags internals + * @returns {Number} the current cycles per second + */ export function getCps() { return cpsFunc?.(); } diff --git a/packages/core/signal.mjs b/packages/core/signal.mjs index b86f16e8a..0316c86fe 100644 --- a/packages/core/signal.mjs +++ b/packages/core/signal.mjs @@ -5,7 +5,7 @@ This program is free software: you can redistribute it and/or modify it under th */ import { Hap } from './hap.mjs'; -import { Pattern, fastcat, pure, register, reify, silence, stack, sequenceP } from './pattern.mjs'; +import { Pattern, fastcat, pure, register, reify, silence, stack, sequenceP, isPattern } from './pattern.mjs'; import { _mod } from './util.mjs'; import Fraction from './fraction.mjs'; @@ -16,6 +16,24 @@ export function steady(value) { return new Pattern((state) => [new Hap(undefined, state.span, value)]); } +/** + * Creates a signal given by the input function + * + * @name signal + * @param {*} func + * @returns {Pattern} signal + * @tags generators + * @example + * // sawtooth signal definition + * signal(t=>t%1).segment(16).range(30,40).note() + * @example + * signal(t=>Math.pow(t,2)%1).range(40, 60).add(5).segment(16) + * .off(0, x=>x.add(7)) + * .note() + * .s("gm_electric_guitar_jazz,gm_epiano") + * .gain(1.7) + * .pianoroll() + */ export const signal = (func) => { const query = (state) => [new Hap(undefined, state.span, func(state.span.begin, state.controls))]; return new Pattern(query); @@ -189,6 +207,7 @@ export const time = signal(id); /** * The mouse's x position value ranges from 0 to 1. * @name mousex + * @synonyms mouseX * @return {Pattern} * @tags external_io * @example @@ -199,6 +218,7 @@ export const time = signal(id); /** * The mouse's y position value ranges from 0 to 1. * @name mousey + * @synonyms mouseY * @return {Pattern} * @tags external_io * @example @@ -559,6 +579,9 @@ export const __chooseWith = (pat, xs) => { * @returns {Pattern} * @example * note("c2 g2!2 d2 f1").s(chooseWith(sine.fast(2), ["sawtooth", "triangle", "bd:6"])) + * @example + * // Compare with chooseInWith + * note(chooseWith("<0 0.5 1>*3", ["c3", "b3", "d3"])) */ export const chooseWith = (pat, xs) => { return __chooseWith(pat, xs).outerJoin(); @@ -570,6 +593,13 @@ export const chooseWith = (pat, xs) => { * @tags temporal * @param {Pattern} pat * @param {*} xs + * @example + * // Because the structure comes from the chosen values (the notes, here) + * // The choosing pattern will only advance once per cycle (not 3 times per cycle) + * note(chooseInWith("<0 0.5 1>*3", ["c3", "b3", "d3"])) + * @example + * // Here, the chosen values have a structure such that the choosing pattern will advance 3 times per cycle + * note(chooseInWith("<0 0.5 1>*3", ["c3*3", "b3*3", "d3*3"])) * @returns {Pattern} */ export const chooseInWith = (pat, xs) => { @@ -586,9 +616,7 @@ export const chooseInWith = (pat, xs) => { */ export const choose = (...xs) => chooseWith(rand, xs); -// todo: doc export const chooseIn = (...xs) => chooseInWith(rand, xs); -export const chooseOut = choose; /** * Chooses from the given list of values (or patterns of values), according @@ -734,12 +762,30 @@ export const perlin = signal((t, controls) => _perlin(t, controls.randSeed)); */ export const berlin = signal((t, controls) => _berlin(t, controls.randSeed)); -export const degradeByWith = register( - 'degradeByWith', - (withPat, x, pat) => pat.fmap((a) => (_) => a).appLeft(withPat.filterValues((v) => v > x)), - true, - true, -); +/** + * `degradeByWith` is like `degradeBy`, but with control over the random or other signal used to filter out the events. + * + * `degradeBy(x)` is essentially `degradeByWith(rand, x)` + * + * This allows you to do things other than with `rand`, see examples below + * + * @name degradeByWith + * @param {Pattern|number} test + * @param {Pattern|number} testAgainst + * @memberof Pattern + * @tags temporal + * @returns {Pattern} + * @example + * note("c a f e").degradeByWith(sine, .1) + * @example + * note("c a f e").degradeByWith(perlin, .5) + * @example + * note("c a f e").degradeByWith(sine, cosine) + */ +export const degradeByWith = register('degradeByWith', (withPat, x, pat) => { + if (!isPattern(withPat)) withPat = pure(withPat); + return pat.fmap((a) => (_) => a).appLeft(withPat.filterValues((v) => v > x)); +}); /** * Randomly removes events from the pattern by a given amount. diff --git a/packages/core/test/pattern.test.mjs b/packages/core/test/pattern.test.mjs index 4eb18c647..d2b4df21a 100644 --- a/packages/core/test/pattern.test.mjs +++ b/packages/core/test/pattern.test.mjs @@ -58,7 +58,7 @@ import { arp, } from '../index.mjs'; -import { log, logValues } from '../pattern.mjs'; +import { log, logValues, stackCenter } from '../pattern.mjs'; import { steady } from '../signal.mjs'; @@ -1215,6 +1215,7 @@ describe('Pattern', () => { expect(stackRight(fastcat(0, 1, 2), fastcat(3, 4))._steps).toStrictEqual(Fraction(3)); // maybe this should double when they are either all even or all odd expect(stackCentre(fastcat(0, 1, 2), fastcat(3, 4))._steps).toStrictEqual(Fraction(3)); + expect(stackCenter(fastcat(0, 1, 2), fastcat(3, 4))._steps).toStrictEqual(Fraction(3)); expect(fastcat(0, 1).ply(3)._steps).toStrictEqual(Fraction(6)); expect(fastcat(0, 1).setSteps(undefined).ply(3)._steps).toStrictEqual(undefined); expect(fastcat(0, 1).fast(3)._steps).toStrictEqual(Fraction(2)); diff --git a/packages/core/util.mjs b/packages/core/util.mjs index caf2bc054..c4dd22d3b 100644 --- a/packages/core/util.mjs +++ b/packages/core/util.mjs @@ -70,17 +70,6 @@ export const getEventOffsetMs = (targetTimeSeconds, currentTimeSeconds) => { return (targetTimeSeconds - currentTimeSeconds) * 1000; }; -/** - * @deprecated does not appear to be referenced or invoked anywhere in the codebase - * @noAutocomplete - */ -export const getFreq = (noteOrMidi) => { - if (typeof noteOrMidi === 'number') { - return midiToFreq(noteOrMidi); - } - return midiToFreq(noteToMidi(noteOrMidi)); -}; - const pcs = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B']; /** * @deprecated only used in workshop (first-notes) @@ -130,8 +119,31 @@ export const getPlayableNoteValue = (hap) => { return note; }; +/** + * Given a hap, returns the frequency of the note or freq, if defined + * + * Given a note, returns the frequency of that note + * `getFreq('c3')` + * + * Given a midi note number, returns the frequency of that midi note + * `getFreq('c3')` + * + * @name getFrequency + * @tags pitch + * @synonyms getFreq + * @param {Hap | note | number} input + * @returns {Number} + * @example + * i("4 8 9 10 - - 5 7 9 11 - -").tune("tranh3") + * .mul(getFreq('c3')) + * .freq().clip(.5).room(1) + */ export const getFrequency = (hap) => { - let { value, context } = hap; + let { value, context } = + typeof hap == 'object' + ? hap + : // default: interpret value as midi note. + { value: hap, context: { type: 'note' } }; // if value is number => interpret as midi number as long as its not marked as frequency if (typeof value === 'object') { if (value.freq) { @@ -140,15 +152,17 @@ export const getFrequency = (hap) => { return getFreq(value.note ?? value.n ?? value.value); } if (typeof value === 'number' && context.type !== 'frequency') { - value = midiToFreq(hap.value); + value = midiToFreq(value); } else if (typeof value === 'string' && isNote(value)) { - value = midiToFreq(noteToMidi(hap.value)); + value = midiToFreq(noteToMidi(value)); } else if (typeof value !== 'number') { throw new Error('not a note or frequency: ' + value); } return value; }; +export const getFreq = (hap) => getFrequency(hap); + // rotate array by n steps (to the left) export const rotate = (arr, n) => arr.slice(n).concat(arr.slice(0, n)); diff --git a/packages/mondough/mondough.mjs b/packages/mondough/mondough.mjs index a230c3cb9..a043adb83 100644 --- a/packages/mondough/mondough.mjs +++ b/packages/mondough/mondough.mjs @@ -46,7 +46,6 @@ lib[':'] = tail; lib['..'] = range; lib['def'] = () => silence; lib['or'] = (...children) => chooseIn(...children); // always has structure but is cyclewise.. e.g. "s oh*8.dec[.04 | .5]" -//lib['or'] = (...children) => chooseOut(...children); // "s oh*8.dec[.04 | .5]" is better but "dec[.04 | .5].s oh*8" has no struct function evaluator(node, scope) { const { type } = node; diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index d45e1050b..c4b39b469 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -36,8 +36,9 @@ function humanFileSize(bytes, si) { * * Note: `must` be called with await, otherwise you'll get a pending Promise object. * - * @name getDuration,getDur - * @tag samples + * @name getDuration + * @synonym getDur + * @tags samples * @param {string} sampleName * @param {number} (optional) n * diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 325d4cab4..4aeeea272 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -1827,6 +1827,27 @@ exports[`runs examples > example "bpsustain" example index 0 1`] = ` ] `; +exports[`runs examples > example "brak" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | s:bd ]", + "[ 1/4 → 1/2 | s:hh ]", + "[ 1/2 → 3/4 | s:hh ]", + "[ 3/4 → 1/1 | s:rim ]", + "[ 5/4 → 11/8 | s:bd ]", + "[ 11/8 → 3/2 | s:hh ]", + "[ 3/2 → 13/8 | s:hh ]", + "[ 13/8 → 7/4 | s:rim ]", + "[ 2/1 → 9/4 | s:bd ]", + "[ 9/4 → 5/2 | s:hh ]", + "[ 5/2 → 11/4 | s:hh ]", + "[ 11/4 → 3/1 | s:rim ]", + "[ 13/4 → 27/8 | s:bd ]", + "[ 27/8 → 7/2 | s:hh ]", + "[ 7/2 → 29/8 | s:hh ]", + "[ 29/8 → 15/4 | s:rim ]", +] +`; + exports[`runs examples > example "brand" example index 0 1`] = ` [ "[ 0/1 → 1/10 | s:hh pan:true ]", @@ -2141,6 +2162,40 @@ exports[`runs examples > example "chooseCycles" example index 1 1`] = ` ] `; +exports[`runs examples > example "chooseInWith" example index 0 1`] = ` +[ + "[ (0/1 → 1/3) ⇝ 1/1 | note:c3 ]", + "[ 0/1 ⇜ (1/3 → 2/3) ⇝ 1/1 | note:b3 ]", + "[ 0/1 ⇜ (2/3 → 1/1) | note:d3 ]", + "[ (1/1 → 4/3) ⇝ 2/1 | note:c3 ]", + "[ 1/1 ⇜ (4/3 → 5/3) ⇝ 2/1 | note:b3 ]", + "[ 1/1 ⇜ (5/3 → 2/1) | note:d3 ]", + "[ (2/1 → 7/3) ⇝ 3/1 | note:c3 ]", + "[ 2/1 ⇜ (7/3 → 8/3) ⇝ 3/1 | note:b3 ]", + "[ 2/1 ⇜ (8/3 → 3/1) | note:d3 ]", + "[ (3/1 → 10/3) ⇝ 4/1 | note:c3 ]", + "[ 3/1 ⇜ (10/3 → 11/3) ⇝ 4/1 | note:b3 ]", + "[ 3/1 ⇜ (11/3 → 4/1) | note:d3 ]", +] +`; + +exports[`runs examples > example "chooseInWith" example index 1 1`] = ` +[ + "[ 0/1 → 1/3 | note:c3 ]", + "[ 1/3 → 2/3 | note:b3 ]", + "[ 2/3 → 1/1 | note:d3 ]", + "[ 1/1 → 4/3 | note:c3 ]", + "[ 4/3 → 5/3 | note:b3 ]", + "[ 5/3 → 2/1 | note:d3 ]", + "[ 2/1 → 7/3 | note:c3 ]", + "[ 7/3 → 8/3 | note:b3 ]", + "[ 8/3 → 3/1 | note:d3 ]", + "[ 3/1 → 10/3 | note:c3 ]", + "[ 10/3 → 11/3 | note:b3 ]", + "[ 11/3 → 4/1 | note:d3 ]", +] +`; + exports[`runs examples > example "chooseWith" example index 0 1`] = ` [ "[ 0/1 → 1/5 | note:c2 s:triangle ]", @@ -2166,6 +2221,23 @@ exports[`runs examples > example "chooseWith" example index 0 1`] = ` ] `; +exports[`runs examples > example "chooseWith" example index 1 1`] = ` +[ + "[ 0/1 → 1/3 | note:c3 ]", + "[ 1/3 → 2/3 | note:b3 ]", + "[ 2/3 → 1/1 | note:d3 ]", + "[ 1/1 → 4/3 | note:c3 ]", + "[ 4/3 → 5/3 | note:b3 ]", + "[ 5/3 → 2/1 | note:d3 ]", + "[ 2/1 → 7/3 | note:c3 ]", + "[ 7/3 → 8/3 | note:b3 ]", + "[ 8/3 → 3/1 | note:d3 ]", + "[ 3/1 → 10/3 | note:c3 ]", + "[ 10/3 → 11/3 | note:b3 ]", + "[ 11/3 → 4/1 | note:d3 ]", +] +`; + exports[`runs examples > example "chop" example index 0 1`] = ` [ "[ 0/1 → 1/2 | s:rhodes begin:0.75 end:1 speed:0.25 unit:c ]", @@ -3006,6 +3078,31 @@ exports[`runs examples > example "degradeBy" example index 2 1`] = ` ] `; +exports[`runs examples > example "degradeByWith" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c ]", + "[ 1/4 → 1/2 | note:a ]", + "[ 1/2 → 3/4 | note:f ]", + "[ 3/4 → 1/1 | note:e ]", + "[ 1/1 → 5/4 | note:c ]", + "[ 5/4 → 3/2 | note:a ]", + "[ 3/2 → 7/4 | note:f ]", + "[ 7/4 → 2/1 | note:e ]", + "[ 2/1 → 9/4 | note:c ]", + "[ 9/4 → 5/2 | note:a ]", + "[ 5/2 → 11/4 | note:f ]", + "[ 11/4 → 3/1 | note:e ]", + "[ 3/1 → 13/4 | note:c ]", + "[ 13/4 → 7/2 | note:a ]", + "[ 7/2 → 15/4 | note:f ]", + "[ 15/4 → 4/1 | note:e ]", +] +`; + +exports[`runs examples > example "degradeByWith" example index 1 1`] = `[]`; + +exports[`runs examples > example "degradeByWith" example index 2 1`] = `[]`; + exports[`runs examples > example "delay" example index 0 1`] = ` [ "[ 0/1 → 1/2 | s:bd delay:0 ]", @@ -4381,7 +4478,7 @@ exports[`runs examples > example "extend" example index 0 1`] = ` "[ 3/8 → 1/2 | s:cp ]", "[ 1/2 → 5/8 | s:bd ]", "[ 5/8 → 3/4 | s:bd ]", - "[ 7/8 → 1/1 | s:cp ]", + "[ 7/8 → 1/1 | s:hh ]", "[ 1/1 → 9/8 | s:bd ]", "[ 5/4 → 11/8 | s:sd ]", "[ 3/2 → 13/8 | s:bd ]", @@ -4389,7 +4486,7 @@ exports[`runs examples > example "extend" example index 0 1`] = ` "[ 15/8 → 2/1 | s:cp ]", "[ 2/1 → 17/8 | s:bd ]", "[ 17/8 → 9/4 | s:bd ]", - "[ 19/8 → 5/2 | s:cp ]", + "[ 19/8 → 5/2 | s:hh ]", "[ 5/2 → 21/8 | s:bd ]", "[ 11/4 → 23/8 | s:sd ]", "[ 3/1 → 25/8 | s:bd ]", @@ -4397,7 +4494,7 @@ exports[`runs examples > example "extend" example index 0 1`] = ` "[ 27/8 → 7/2 | s:cp ]", "[ 7/2 → 29/8 | s:bd ]", "[ 29/8 → 15/4 | s:bd ]", - "[ 31/8 → 4/1 | s:cp ]", + "[ 31/8 → 4/1 | s:hh ]", ] `; @@ -5362,7 +5459,7 @@ exports[`runs examples > example "gain" example index 0 1`] = ` exports[`runs examples > example "gap" example index 0 1`] = `[]`; -exports[`runs examples > example "getDur" example index 0 1`] = ` +exports[`runs examples > example "getDuration" example index 0 1`] = ` [ "[ 0/1 → 1/1 | s:sax cps:null ]", "[ 1/1 → 2/1 | s:sax cps:null ]", @@ -5371,6 +5468,43 @@ exports[`runs examples > example "getDur" example index 0 1`] = ` ] `; +exports[`runs examples > example "getFrequency" example index 0 1`] = ` +[ + "[ 0/1 → 1/12 | freq:{i:4} clip:0.5 room:1 ]", + "[ 1/12 → 1/6 | freq:{i:8} clip:0.5 room:1 ]", + "[ 1/6 → 1/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 1/4 → 1/3 | freq:{i:10} clip:0.5 room:1 ]", + "[ 1/2 → 7/12 | freq:{i:5} clip:0.5 room:1 ]", + "[ 7/12 → 2/3 | freq:{i:7} clip:0.5 room:1 ]", + "[ 2/3 → 3/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 3/4 → 5/6 | freq:{i:11} clip:0.5 room:1 ]", + "[ 1/1 → 13/12 | freq:{i:4} clip:0.5 room:1 ]", + "[ 13/12 → 7/6 | freq:{i:8} clip:0.5 room:1 ]", + "[ 7/6 → 5/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 5/4 → 4/3 | freq:{i:10} clip:0.5 room:1 ]", + "[ 3/2 → 19/12 | freq:{i:5} clip:0.5 room:1 ]", + "[ 19/12 → 5/3 | freq:{i:7} clip:0.5 room:1 ]", + "[ 5/3 → 7/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 7/4 → 11/6 | freq:{i:11} clip:0.5 room:1 ]", + "[ 2/1 → 25/12 | freq:{i:4} clip:0.5 room:1 ]", + "[ 25/12 → 13/6 | freq:{i:8} clip:0.5 room:1 ]", + "[ 13/6 → 9/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 9/4 → 7/3 | freq:{i:10} clip:0.5 room:1 ]", + "[ 5/2 → 31/12 | freq:{i:5} clip:0.5 room:1 ]", + "[ 31/12 → 8/3 | freq:{i:7} clip:0.5 room:1 ]", + "[ 8/3 → 11/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 11/4 → 17/6 | freq:{i:11} clip:0.5 room:1 ]", + "[ 3/1 → 37/12 | freq:{i:4} clip:0.5 room:1 ]", + "[ 37/12 → 19/6 | freq:{i:8} clip:0.5 room:1 ]", + "[ 19/6 → 13/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 13/4 → 10/3 | freq:{i:10} clip:0.5 room:1 ]", + "[ 7/2 → 43/12 | freq:{i:5} clip:0.5 room:1 ]", + "[ 43/12 → 11/3 | freq:{i:7} clip:0.5 room:1 ]", + "[ 11/3 → 15/4 | freq:{i:9} clip:0.5 room:1 ]", + "[ 15/4 → 23/6 | freq:{i:11} clip:0.5 room:1 ]", +] +`; + exports[`runs examples > example "grow" example index 0 1`] = ` [ "[ 0/1 → 1/10 | s:tha bank:mridangam ]", @@ -7777,15 +7911,6 @@ exports[`runs examples > example "midi" example index 0 1`] = ` ] `; -exports[`runs examples > example "midi" example index 1 1`] = ` -[ - "[ 0/1 → 1/1 | note:c4 midichan:1 ]", - "[ 1/1 → 2/1 | note:c4 midichan:1 ]", - "[ 2/1 → 3/1 | note:c4 midichan:1 ]", - "[ 3/1 → 4/1 | note:c4 midichan:1 ]", -] -`; - exports[`runs examples > example "midibend" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:c4 midibend:0 ]", @@ -9430,6 +9555,24 @@ exports[`runs examples > example "pickF" example index 2 1`] = ` ] `; +exports[`runs examples > example "pickOut" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:g ]", + "[ 1/4 → 1/2 | note:g ]", + "[ 1/2 → 3/4 | note:a ]", + "[ 3/4 → 1/1 | note:a ]", + "[ (1/1 → 3/2) ⇝ 2/1 | note:e ]", + "[ 1/1 ⇜ (3/2 → 2/1) | note:f ]", + "[ (2/1 → 9/4) ⇝ 5/2 | note:f ]", + "[ 2/1 ⇜ (9/4 → 5/2) | note:g ]", + "[ (5/2 → 11/4) ⇝ 3/1 | note:f ]", + "[ 5/2 ⇜ (11/4 → 3/1) | note:g ]", + "[ 3/1 → 10/3 | note:g ]", + "[ 10/3 → 11/3 | note:c ]", + "[ 11/3 → 4/1 | note:d ]", +] +`; + exports[`runs examples > example "pickmodRestart" example index 0 1`] = ` [ "[ 0/1 → 1/4 | note:C3 s:piano ]", @@ -10373,10 +10516,10 @@ exports[`runs examples > example "replicate" example index 0 1`] = ` "[ 5/4 → 11/8 | s:sd ]", "[ 3/2 → 13/8 | s:bd ]", "[ 13/8 → 7/4 | s:bd ]", - "[ 15/8 → 2/1 | s:cp ]", + "[ 15/8 → 2/1 | s:hh ]", "[ 2/1 → 17/8 | s:bd ]", "[ 17/8 → 9/4 | s:bd ]", - "[ 19/8 → 5/2 | s:cp ]", + "[ 19/8 → 5/2 | s:hh ]", "[ 5/2 → 21/8 | s:bd ]", "[ 11/4 → 23/8 | s:sd ]", "[ 3/1 → 25/8 | s:bd ]", @@ -11965,6 +12108,336 @@ exports[`runs examples > example "shuffle" example index 1 1`] = ` ] `; +exports[`runs examples > example "signal" example index 0 1`] = ` +[ + "[ 0/1 → 1/16 | note:30 ]", + "[ 1/16 → 1/8 | note:30.625 ]", + "[ 1/8 → 3/16 | note:31.25 ]", + "[ 3/16 → 1/4 | note:31.875 ]", + "[ 1/4 → 5/16 | note:32.5 ]", + "[ 5/16 → 3/8 | note:33.125 ]", + "[ 3/8 → 7/16 | note:33.75 ]", + "[ 7/16 → 1/2 | note:34.375 ]", + "[ 1/2 → 9/16 | note:35 ]", + "[ 9/16 → 5/8 | note:35.625 ]", + "[ 5/8 → 11/16 | note:36.25 ]", + "[ 11/16 → 3/4 | note:36.875 ]", + "[ 3/4 → 13/16 | note:37.5 ]", + "[ 13/16 → 7/8 | note:38.125 ]", + "[ 7/8 → 15/16 | note:38.75 ]", + "[ 15/16 → 1/1 | note:39.375 ]", + "[ 1/1 → 17/16 | note:30 ]", + "[ 17/16 → 9/8 | note:30.625 ]", + "[ 9/8 → 19/16 | note:31.25 ]", + "[ 19/16 → 5/4 | note:31.875 ]", + "[ 5/4 → 21/16 | note:32.5 ]", + "[ 21/16 → 11/8 | note:33.125 ]", + "[ 11/8 → 23/16 | note:33.75 ]", + "[ 23/16 → 3/2 | note:34.375 ]", + "[ 3/2 → 25/16 | note:35 ]", + "[ 25/16 → 13/8 | note:35.625 ]", + "[ 13/8 → 27/16 | note:36.25 ]", + "[ 27/16 → 7/4 | note:36.875 ]", + "[ 7/4 → 29/16 | note:37.5 ]", + "[ 29/16 → 15/8 | note:38.125 ]", + "[ 15/8 → 31/16 | note:38.75 ]", + "[ 31/16 → 2/1 | note:39.375 ]", + "[ 2/1 → 33/16 | note:30 ]", + "[ 33/16 → 17/8 | note:30.625 ]", + "[ 17/8 → 35/16 | note:31.25 ]", + "[ 35/16 → 9/4 | note:31.875 ]", + "[ 9/4 → 37/16 | note:32.5 ]", + "[ 37/16 → 19/8 | note:33.125 ]", + "[ 19/8 → 39/16 | note:33.75 ]", + "[ 39/16 → 5/2 | note:34.375 ]", + "[ 5/2 → 41/16 | note:35 ]", + "[ 41/16 → 21/8 | note:35.625 ]", + "[ 21/8 → 43/16 | note:36.25 ]", + "[ 43/16 → 11/4 | note:36.875 ]", + "[ 11/4 → 45/16 | note:37.5 ]", + "[ 45/16 → 23/8 | note:38.125 ]", + "[ 23/8 → 47/16 | note:38.75 ]", + "[ 47/16 → 3/1 | note:39.375 ]", + "[ 3/1 → 49/16 | note:30 ]", + "[ 49/16 → 25/8 | note:30.625 ]", + "[ 25/8 → 51/16 | note:31.25 ]", + "[ 51/16 → 13/4 | note:31.875 ]", + "[ 13/4 → 53/16 | note:32.5 ]", + "[ 53/16 → 27/8 | note:33.125 ]", + "[ 27/8 → 55/16 | note:33.75 ]", + "[ 55/16 → 7/2 | note:34.375 ]", + "[ 7/2 → 57/16 | note:35 ]", + "[ 57/16 → 29/8 | note:35.625 ]", + "[ 29/8 → 59/16 | note:36.25 ]", + "[ 59/16 → 15/4 | note:36.875 ]", + "[ 15/4 → 61/16 | note:37.5 ]", + "[ 61/16 → 31/8 | note:38.125 ]", + "[ 31/8 → 63/16 | note:38.75 ]", + "[ 63/16 → 4/1 | note:39.375 ]", +] +`; + +exports[`runs examples > example "signal" example index 1 1`] = ` +[ + "[ 0/1 → 1/16 | note:45 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 0/1 → 1/16 | note:45 s:gm_epiano gain:1.7 ]", + "[ 0/1 → 1/16 | note:52 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 0/1 → 1/16 | note:52 s:gm_epiano gain:1.7 ]", + "[ 1/16 → 1/8 | note:45.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/16 → 1/8 | note:45.078125 s:gm_epiano gain:1.7 ]", + "[ 1/16 → 1/8 | note:52.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/16 → 1/8 | note:52.078125 s:gm_epiano gain:1.7 ]", + "[ 1/8 → 3/16 | note:45.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/8 → 3/16 | note:45.3125 s:gm_epiano gain:1.7 ]", + "[ 1/8 → 3/16 | note:52.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/8 → 3/16 | note:52.3125 s:gm_epiano gain:1.7 ]", + "[ 3/16 → 1/4 | note:45.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/16 → 1/4 | note:45.703125 s:gm_epiano gain:1.7 ]", + "[ 3/16 → 1/4 | note:52.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/16 → 1/4 | note:52.703125 s:gm_epiano gain:1.7 ]", + "[ 1/4 → 5/16 | note:46.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/4 → 5/16 | note:46.25 s:gm_epiano gain:1.7 ]", + "[ 1/4 → 5/16 | note:53.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/4 → 5/16 | note:53.25 s:gm_epiano gain:1.7 ]", + "[ 5/16 → 3/8 | note:46.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/16 → 3/8 | note:46.953125 s:gm_epiano gain:1.7 ]", + "[ 5/16 → 3/8 | note:53.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/16 → 3/8 | note:53.953125 s:gm_epiano gain:1.7 ]", + "[ 3/8 → 7/16 | note:47.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/8 → 7/16 | note:47.8125 s:gm_epiano gain:1.7 ]", + "[ 3/8 → 7/16 | note:54.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/8 → 7/16 | note:54.8125 s:gm_epiano gain:1.7 ]", + "[ 7/16 → 1/2 | note:48.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/16 → 1/2 | note:48.828125 s:gm_epiano gain:1.7 ]", + "[ 7/16 → 1/2 | note:55.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/16 → 1/2 | note:55.828125 s:gm_epiano gain:1.7 ]", + "[ 1/2 → 9/16 | note:50 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/2 → 9/16 | note:50 s:gm_epiano gain:1.7 ]", + "[ 1/2 → 9/16 | note:57 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/2 → 9/16 | note:57 s:gm_epiano gain:1.7 ]", + "[ 9/16 → 5/8 | note:51.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/16 → 5/8 | note:51.328125 s:gm_epiano gain:1.7 ]", + "[ 9/16 → 5/8 | note:58.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/16 → 5/8 | note:58.328125 s:gm_epiano gain:1.7 ]", + "[ 5/8 → 11/16 | note:52.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/8 → 11/16 | note:52.8125 s:gm_epiano gain:1.7 ]", + "[ 5/8 → 11/16 | note:59.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/8 → 11/16 | note:59.8125 s:gm_epiano gain:1.7 ]", + "[ 11/16 → 3/4 | note:54.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/16 → 3/4 | note:54.453125 s:gm_epiano gain:1.7 ]", + "[ 11/16 → 3/4 | note:61.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/16 → 3/4 | note:61.453125 s:gm_epiano gain:1.7 ]", + "[ 3/4 → 13/16 | note:56.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/4 → 13/16 | note:56.25 s:gm_epiano gain:1.7 ]", + "[ 3/4 → 13/16 | note:63.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/4 → 13/16 | note:63.25 s:gm_epiano gain:1.7 ]", + "[ 13/16 → 7/8 | note:58.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/16 → 7/8 | note:58.203125 s:gm_epiano gain:1.7 ]", + "[ 13/16 → 7/8 | note:65.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/16 → 7/8 | note:65.203125 s:gm_epiano gain:1.7 ]", + "[ 7/8 → 15/16 | note:60.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/8 → 15/16 | note:60.3125 s:gm_epiano gain:1.7 ]", + "[ 7/8 → 15/16 | note:67.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/8 → 15/16 | note:67.3125 s:gm_epiano gain:1.7 ]", + "[ 15/16 → 1/1 | note:62.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/16 → 1/1 | note:62.578125 s:gm_epiano gain:1.7 ]", + "[ 15/16 → 1/1 | note:69.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/16 → 1/1 | note:69.578125 s:gm_epiano gain:1.7 ]", + "[ 1/1 → 17/16 | note:45 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/1 → 17/16 | note:45 s:gm_epiano gain:1.7 ]", + "[ 1/1 → 17/16 | note:52 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 1/1 → 17/16 | note:52 s:gm_epiano gain:1.7 ]", + "[ 17/16 → 9/8 | note:47.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 17/16 → 9/8 | note:47.578125 s:gm_epiano gain:1.7 ]", + "[ 17/16 → 9/8 | note:54.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 17/16 → 9/8 | note:54.578125 s:gm_epiano gain:1.7 ]", + "[ 9/8 → 19/16 | note:50.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/8 → 19/16 | note:50.3125 s:gm_epiano gain:1.7 ]", + "[ 9/8 → 19/16 | note:57.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/8 → 19/16 | note:57.3125 s:gm_epiano gain:1.7 ]", + "[ 19/16 → 5/4 | note:53.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 19/16 → 5/4 | note:53.203125 s:gm_epiano gain:1.7 ]", + "[ 19/16 → 5/4 | note:60.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 19/16 → 5/4 | note:60.203125 s:gm_epiano gain:1.7 ]", + "[ 5/4 → 21/16 | note:56.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/4 → 21/16 | note:56.25 s:gm_epiano gain:1.7 ]", + "[ 5/4 → 21/16 | note:63.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/4 → 21/16 | note:63.25 s:gm_epiano gain:1.7 ]", + "[ 21/16 → 11/8 | note:59.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 21/16 → 11/8 | note:59.453125 s:gm_epiano gain:1.7 ]", + "[ 21/16 → 11/8 | note:66.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 21/16 → 11/8 | note:66.453125 s:gm_epiano gain:1.7 ]", + "[ 11/8 → 23/16 | note:62.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/8 → 23/16 | note:62.8125 s:gm_epiano gain:1.7 ]", + "[ 11/8 → 23/16 | note:69.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/8 → 23/16 | note:69.8125 s:gm_epiano gain:1.7 ]", + "[ 23/16 → 3/2 | note:46.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 23/16 → 3/2 | note:46.328125 s:gm_epiano gain:1.7 ]", + "[ 23/16 → 3/2 | note:53.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 23/16 → 3/2 | note:53.328125 s:gm_epiano gain:1.7 ]", + "[ 3/2 → 25/16 | note:50 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/2 → 25/16 | note:50 s:gm_epiano gain:1.7 ]", + "[ 3/2 → 25/16 | note:57 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/2 → 25/16 | note:57 s:gm_epiano gain:1.7 ]", + "[ 25/16 → 13/8 | note:53.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 25/16 → 13/8 | note:53.828125 s:gm_epiano gain:1.7 ]", + "[ 25/16 → 13/8 | note:60.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 25/16 → 13/8 | note:60.828125 s:gm_epiano gain:1.7 ]", + "[ 13/8 → 27/16 | note:57.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/8 → 27/16 | note:57.8125 s:gm_epiano gain:1.7 ]", + "[ 13/8 → 27/16 | note:64.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/8 → 27/16 | note:64.8125 s:gm_epiano gain:1.7 ]", + "[ 27/16 → 7/4 | note:61.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 27/16 → 7/4 | note:61.953125 s:gm_epiano gain:1.7 ]", + "[ 27/16 → 7/4 | note:68.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 27/16 → 7/4 | note:68.953125 s:gm_epiano gain:1.7 ]", + "[ 7/4 → 29/16 | note:46.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/4 → 29/16 | note:46.25 s:gm_epiano gain:1.7 ]", + "[ 7/4 → 29/16 | note:53.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/4 → 29/16 | note:53.25 s:gm_epiano gain:1.7 ]", + "[ 29/16 → 15/8 | note:50.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 29/16 → 15/8 | note:50.703125 s:gm_epiano gain:1.7 ]", + "[ 29/16 → 15/8 | note:57.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 29/16 → 15/8 | note:57.703125 s:gm_epiano gain:1.7 ]", + "[ 15/8 → 31/16 | note:55.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/8 → 31/16 | note:55.3125 s:gm_epiano gain:1.7 ]", + "[ 15/8 → 31/16 | note:62.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/8 → 31/16 | note:62.3125 s:gm_epiano gain:1.7 ]", + "[ 31/16 → 2/1 | note:60.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 31/16 → 2/1 | note:60.078125 s:gm_epiano gain:1.7 ]", + "[ 31/16 → 2/1 | note:67.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 31/16 → 2/1 | note:67.078125 s:gm_epiano gain:1.7 ]", + "[ 2/1 → 33/16 | note:45 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 2/1 → 33/16 | note:45 s:gm_epiano gain:1.7 ]", + "[ 2/1 → 33/16 | note:52 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 2/1 → 33/16 | note:52 s:gm_epiano gain:1.7 ]", + "[ 33/16 → 17/8 | note:50.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 33/16 → 17/8 | note:50.078125 s:gm_epiano gain:1.7 ]", + "[ 33/16 → 17/8 | note:57.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 33/16 → 17/8 | note:57.078125 s:gm_epiano gain:1.7 ]", + "[ 17/8 → 35/16 | note:55.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 17/8 → 35/16 | note:55.3125 s:gm_epiano gain:1.7 ]", + "[ 17/8 → 35/16 | note:62.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 17/8 → 35/16 | note:62.3125 s:gm_epiano gain:1.7 ]", + "[ 35/16 → 9/4 | note:60.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 35/16 → 9/4 | note:60.703125 s:gm_epiano gain:1.7 ]", + "[ 35/16 → 9/4 | note:67.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 35/16 → 9/4 | note:67.703125 s:gm_epiano gain:1.7 ]", + "[ 9/4 → 37/16 | note:46.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/4 → 37/16 | note:46.25 s:gm_epiano gain:1.7 ]", + "[ 9/4 → 37/16 | note:53.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 9/4 → 37/16 | note:53.25 s:gm_epiano gain:1.7 ]", + "[ 37/16 → 19/8 | note:51.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 37/16 → 19/8 | note:51.953125 s:gm_epiano gain:1.7 ]", + "[ 37/16 → 19/8 | note:58.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 37/16 → 19/8 | note:58.953125 s:gm_epiano gain:1.7 ]", + "[ 19/8 → 39/16 | note:57.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 19/8 → 39/16 | note:57.8125 s:gm_epiano gain:1.7 ]", + "[ 19/8 → 39/16 | note:64.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 19/8 → 39/16 | note:64.8125 s:gm_epiano gain:1.7 ]", + "[ 39/16 → 5/2 | note:63.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 39/16 → 5/2 | note:63.828125 s:gm_epiano gain:1.7 ]", + "[ 39/16 → 5/2 | note:70.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 39/16 → 5/2 | note:70.828125 s:gm_epiano gain:1.7 ]", + "[ 5/2 → 41/16 | note:50 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/2 → 41/16 | note:50 s:gm_epiano gain:1.7 ]", + "[ 5/2 → 41/16 | note:57 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 5/2 → 41/16 | note:57 s:gm_epiano gain:1.7 ]", + "[ 41/16 → 21/8 | note:56.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 41/16 → 21/8 | note:56.328125 s:gm_epiano gain:1.7 ]", + "[ 41/16 → 21/8 | note:63.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 41/16 → 21/8 | note:63.328125 s:gm_epiano gain:1.7 ]", + "[ 21/8 → 43/16 | note:62.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 21/8 → 43/16 | note:62.8125 s:gm_epiano gain:1.7 ]", + "[ 21/8 → 43/16 | note:69.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 21/8 → 43/16 | note:69.8125 s:gm_epiano gain:1.7 ]", + "[ 43/16 → 11/4 | note:49.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 43/16 → 11/4 | note:49.453125 s:gm_epiano gain:1.7 ]", + "[ 43/16 → 11/4 | note:56.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 43/16 → 11/4 | note:56.453125 s:gm_epiano gain:1.7 ]", + "[ 11/4 → 45/16 | note:56.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/4 → 45/16 | note:56.25 s:gm_epiano gain:1.7 ]", + "[ 11/4 → 45/16 | note:63.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 11/4 → 45/16 | note:63.25 s:gm_epiano gain:1.7 ]", + "[ 45/16 → 23/8 | note:63.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 45/16 → 23/8 | note:63.203125 s:gm_epiano gain:1.7 ]", + "[ 45/16 → 23/8 | note:70.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 45/16 → 23/8 | note:70.203125 s:gm_epiano gain:1.7 ]", + "[ 23/8 → 47/16 | note:50.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 23/8 → 47/16 | note:50.3125 s:gm_epiano gain:1.7 ]", + "[ 23/8 → 47/16 | note:57.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 23/8 → 47/16 | note:57.3125 s:gm_epiano gain:1.7 ]", + "[ 47/16 → 3/1 | note:57.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 47/16 → 3/1 | note:57.578125 s:gm_epiano gain:1.7 ]", + "[ 47/16 → 3/1 | note:64.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 47/16 → 3/1 | note:64.578125 s:gm_epiano gain:1.7 ]", + "[ 3/1 → 49/16 | note:45 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/1 → 49/16 | note:45 s:gm_epiano gain:1.7 ]", + "[ 3/1 → 49/16 | note:52 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 3/1 → 49/16 | note:52 s:gm_epiano gain:1.7 ]", + "[ 49/16 → 25/8 | note:52.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 49/16 → 25/8 | note:52.578125 s:gm_epiano gain:1.7 ]", + "[ 49/16 → 25/8 | note:59.578125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 49/16 → 25/8 | note:59.578125 s:gm_epiano gain:1.7 ]", + "[ 25/8 → 51/16 | note:60.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 25/8 → 51/16 | note:60.3125 s:gm_epiano gain:1.7 ]", + "[ 25/8 → 51/16 | note:67.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 25/8 → 51/16 | note:67.3125 s:gm_epiano gain:1.7 ]", + "[ 51/16 → 13/4 | note:48.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 51/16 → 13/4 | note:48.203125 s:gm_epiano gain:1.7 ]", + "[ 51/16 → 13/4 | note:55.203125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 51/16 → 13/4 | note:55.203125 s:gm_epiano gain:1.7 ]", + "[ 13/4 → 53/16 | note:56.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/4 → 53/16 | note:56.25 s:gm_epiano gain:1.7 ]", + "[ 13/4 → 53/16 | note:63.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 13/4 → 53/16 | note:63.25 s:gm_epiano gain:1.7 ]", + "[ 53/16 → 27/8 | note:64.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 53/16 → 27/8 | note:64.453125 s:gm_epiano gain:1.7 ]", + "[ 53/16 → 27/8 | note:71.453125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 53/16 → 27/8 | note:71.453125 s:gm_epiano gain:1.7 ]", + "[ 27/8 → 55/16 | note:52.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 27/8 → 55/16 | note:52.8125 s:gm_epiano gain:1.7 ]", + "[ 27/8 → 55/16 | note:59.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 27/8 → 55/16 | note:59.8125 s:gm_epiano gain:1.7 ]", + "[ 55/16 → 7/2 | note:61.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 55/16 → 7/2 | note:61.328125 s:gm_epiano gain:1.7 ]", + "[ 55/16 → 7/2 | note:68.328125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 55/16 → 7/2 | note:68.328125 s:gm_epiano gain:1.7 ]", + "[ 7/2 → 57/16 | note:50 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/2 → 57/16 | note:50 s:gm_epiano gain:1.7 ]", + "[ 7/2 → 57/16 | note:57 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 7/2 → 57/16 | note:57 s:gm_epiano gain:1.7 ]", + "[ 57/16 → 29/8 | note:58.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 57/16 → 29/8 | note:58.828125 s:gm_epiano gain:1.7 ]", + "[ 57/16 → 29/8 | note:65.828125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 57/16 → 29/8 | note:65.828125 s:gm_epiano gain:1.7 ]", + "[ 29/8 → 59/16 | note:47.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 29/8 → 59/16 | note:47.8125 s:gm_epiano gain:1.7 ]", + "[ 29/8 → 59/16 | note:54.8125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 29/8 → 59/16 | note:54.8125 s:gm_epiano gain:1.7 ]", + "[ 59/16 → 15/4 | note:56.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 59/16 → 15/4 | note:56.953125 s:gm_epiano gain:1.7 ]", + "[ 59/16 → 15/4 | note:63.953125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 59/16 → 15/4 | note:63.953125 s:gm_epiano gain:1.7 ]", + "[ 15/4 → 61/16 | note:46.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/4 → 61/16 | note:46.25 s:gm_epiano gain:1.7 ]", + "[ 15/4 → 61/16 | note:53.25 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 15/4 → 61/16 | note:53.25 s:gm_epiano gain:1.7 ]", + "[ 61/16 → 31/8 | note:55.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 61/16 → 31/8 | note:55.703125 s:gm_epiano gain:1.7 ]", + "[ 61/16 → 31/8 | note:62.703125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 61/16 → 31/8 | note:62.703125 s:gm_epiano gain:1.7 ]", + "[ 31/8 → 63/16 | note:45.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 31/8 → 63/16 | note:45.3125 s:gm_epiano gain:1.7 ]", + "[ 31/8 → 63/16 | note:52.3125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 31/8 → 63/16 | note:52.3125 s:gm_epiano gain:1.7 ]", + "[ 63/16 → 4/1 | note:55.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 63/16 → 4/1 | note:55.078125 s:gm_epiano gain:1.7 ]", + "[ 63/16 → 4/1 | note:62.078125 s:gm_electric_guitar_jazz gain:1.7 ]", + "[ 63/16 → 4/1 | note:62.078125 s:gm_epiano gain:1.7 ]", +] +`; + exports[`runs examples > example "silence" example index 0 1`] = `[]`; exports[`runs examples > example "sine" example index 0 1`] = ` @@ -12665,6 +13138,494 @@ exports[`runs examples > example "stack" example index 1 1`] = ` ] `; +exports[`runs examples > example "stackCenter" example index 0 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 1/10 → 3/10 | note:C3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 3/10 → 1/2 | note:D3 ]", + "[ 3/10 → 1/2 | note:F3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 1/2 → 7/10 | note:Eb3 ]", + "[ 1/2 → 7/10 | note:G3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 7/10 → 9/10 | note:F3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 11/10 → 13/10 | note:C3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 13/10 → 3/2 | note:D3 ]", + "[ 13/10 → 3/2 | note:F3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 3/2 → 17/10 | note:Eb3 ]", + "[ 3/2 → 17/10 | note:G3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 17/10 → 19/10 | note:F3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 21/10 → 23/10 | note:C3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 23/10 → 5/2 | note:D3 ]", + "[ 23/10 → 5/2 | note:F3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 5/2 → 27/10 | note:Eb3 ]", + "[ 5/2 → 27/10 | note:G3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 27/10 → 29/10 | note:F3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 31/10 → 33/10 | note:C3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 33/10 → 7/2 | note:D3 ]", + "[ 33/10 → 7/2 | note:F3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 7/2 → 37/10 | note:Eb3 ]", + "[ 7/2 → 37/10 | note:G3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 37/10 → 39/10 | note:F3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackCenter" example index 1 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 1/10 → 3/10 | note:C3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 3/10 → 1/2 | note:D3 ]", + "[ 3/10 → 1/2 | note:F3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 1/2 → 7/10 | note:Eb3 ]", + "[ 1/2 → 7/10 | note:G3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 7/10 → 9/10 | note:F3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 11/10 → 13/10 | note:C3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 13/10 → 3/2 | note:D3 ]", + "[ 13/10 → 3/2 | note:F3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 3/2 → 17/10 | note:Eb3 ]", + "[ 3/2 → 17/10 | note:G3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 17/10 → 19/10 | note:F3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 21/10 → 23/10 | note:C3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 23/10 → 5/2 | note:D3 ]", + "[ 23/10 → 5/2 | note:F3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 5/2 → 27/10 | note:Eb3 ]", + "[ 5/2 → 27/10 | note:G3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 27/10 → 29/10 | note:F3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 31/10 → 33/10 | note:C3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 33/10 → 7/2 | note:D3 ]", + "[ 33/10 → 7/2 | note:F3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 7/2 → 37/10 | note:Eb3 ]", + "[ 7/2 → 37/10 | note:G3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 37/10 → 39/10 | note:F3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackLeft" example index 0 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 0/1 → 1/5 | note:C3 ]", + "[ 0/1 → 1/5 | note:F3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:D3 ]", + "[ 1/5 → 2/5 | note:G3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:Eb3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 1/1 → 6/5 | note:C3 ]", + "[ 1/1 → 6/5 | note:F3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:D3 ]", + "[ 6/5 → 7/5 | note:G3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:Eb3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 2/1 → 11/5 | note:C3 ]", + "[ 2/1 → 11/5 | note:F3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:D3 ]", + "[ 11/5 → 12/5 | note:G3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:Eb3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:F3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 3/1 → 16/5 | note:C3 ]", + "[ 3/1 → 16/5 | note:F3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:D3 ]", + "[ 16/5 → 17/5 | note:G3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:Eb3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackLeft" example index 1 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 0/1 → 1/5 | note:C3 ]", + "[ 0/1 → 1/5 | note:F3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:D3 ]", + "[ 1/5 → 2/5 | note:G3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:Eb3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 1/1 → 6/5 | note:C3 ]", + "[ 1/1 → 6/5 | note:F3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:D3 ]", + "[ 6/5 → 7/5 | note:G3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:Eb3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 2/1 → 11/5 | note:C3 ]", + "[ 2/1 → 11/5 | note:F3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:D3 ]", + "[ 11/5 → 12/5 | note:G3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:Eb3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:F3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 3/1 → 16/5 | note:C3 ]", + "[ 3/1 → 16/5 | note:F3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:D3 ]", + "[ 16/5 → 17/5 | note:G3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:Eb3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackRepeat" example index 0 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 0/1 → 1/5 | note:C3 ]", + "[ 0/1 → 1/5 | note:F3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:D3 ]", + "[ 1/5 → 2/5 | note:G3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:Eb3 ]", + "[ 2/5 → 3/5 | note:F3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:G3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:C3 ]", + "[ 4/5 → 1/1 | note:F3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 1/1 → 6/5 | note:D3 ]", + "[ 1/1 → 6/5 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:Eb3 ]", + "[ 6/5 → 7/5 | note:F3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:F3 ]", + "[ 7/5 → 8/5 | note:G3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:C3 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:D3 ]", + "[ 9/5 → 2/1 | note:G3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 2/1 → 11/5 | note:Eb3 ]", + "[ 2/1 → 11/5 | note:F3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:F3 ]", + "[ 11/5 → 12/5 | note:G3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:C3 ]", + "[ 12/5 → 13/5 | note:F3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:D3 ]", + "[ 13/5 → 14/5 | note:G3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:Eb3 ]", + "[ 14/5 → 3/1 | note:F3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 3/1 → 16/5 | note:F3 ]", + "[ 3/1 → 16/5 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C3 ]", + "[ 16/5 → 17/5 | note:F3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:D3 ]", + "[ 17/5 → 18/5 | note:G3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:Eb3 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F3 ]", + "[ 19/5 → 4/1 | note:G3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackRepeat" example index 1 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 0/1 → 1/5 | note:C3 ]", + "[ 0/1 → 1/5 | note:F3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:D3 ]", + "[ 1/5 → 2/5 | note:G3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:Eb3 ]", + "[ 2/5 → 3/5 | note:F3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:G3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:C3 ]", + "[ 4/5 → 1/1 | note:F3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 1/1 → 6/5 | note:D3 ]", + "[ 1/1 → 6/5 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:Eb3 ]", + "[ 6/5 → 7/5 | note:F3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:F3 ]", + "[ 7/5 → 8/5 | note:G3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:C3 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:D3 ]", + "[ 9/5 → 2/1 | note:G3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 2/1 → 11/5 | note:Eb3 ]", + "[ 2/1 → 11/5 | note:F3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:F3 ]", + "[ 11/5 → 12/5 | note:G3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:C3 ]", + "[ 12/5 → 13/5 | note:F3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:D3 ]", + "[ 13/5 → 14/5 | note:G3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:Eb3 ]", + "[ 14/5 → 3/1 | note:F3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 3/1 → 16/5 | note:F3 ]", + "[ 3/1 → 16/5 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C3 ]", + "[ 16/5 → 17/5 | note:F3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:D3 ]", + "[ 17/5 → 18/5 | note:G3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:Eb3 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F3 ]", + "[ 19/5 → 4/1 | note:G3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackRight" example index 0 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:C3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:D3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:Eb3 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:F3 ]", + "[ 4/5 → 1/1 | note:G3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:C3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:D3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:Eb3 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:F3 ]", + "[ 9/5 → 2/1 | note:G3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:C3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:D3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:Eb3 ]", + "[ 13/5 → 14/5 | note:F3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:F3 ]", + "[ 14/5 → 3/1 | note:G3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:D3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:Eb3 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F3 ]", + "[ 19/5 → 4/1 | note:G3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + +exports[`runs examples > example "stackRight" example index 1 1`] = ` +[ + "[ 0/1 → 1/15 | note:G3 ]", + "[ 1/15 → 2/15 | note:Ab3 ]", + "[ 2/15 → 1/5 | note:Bb3 ]", + "[ 1/5 → 2/5 | note:C3 ]", + "[ 1/5 → 2/5 | note:C4 ]", + "[ 2/5 → 3/5 | note:D3 ]", + "[ 2/5 → 3/5 | note:D4 ]", + "[ 3/5 → 4/5 | note:Eb3 ]", + "[ 3/5 → 4/5 | note:F3 ]", + "[ 3/5 → 4/5 | note:Eb4 ]", + "[ 4/5 → 1/1 | note:F3 ]", + "[ 4/5 → 1/1 | note:G3 ]", + "[ 4/5 → 1/1 | note:F4 ]", + "[ 1/1 → 16/15 | note:G3 ]", + "[ 16/15 → 17/15 | note:Ab3 ]", + "[ 17/15 → 6/5 | note:Bb3 ]", + "[ 6/5 → 7/5 | note:C3 ]", + "[ 6/5 → 7/5 | note:C4 ]", + "[ 7/5 → 8/5 | note:D3 ]", + "[ 7/5 → 8/5 | note:D4 ]", + "[ 8/5 → 9/5 | note:Eb3 ]", + "[ 8/5 → 9/5 | note:F3 ]", + "[ 8/5 → 9/5 | note:Eb4 ]", + "[ 9/5 → 2/1 | note:F3 ]", + "[ 9/5 → 2/1 | note:G3 ]", + "[ 9/5 → 2/1 | note:F4 ]", + "[ 2/1 → 31/15 | note:G3 ]", + "[ 31/15 → 32/15 | note:Ab3 ]", + "[ 32/15 → 11/5 | note:Bb3 ]", + "[ 11/5 → 12/5 | note:C3 ]", + "[ 11/5 → 12/5 | note:C4 ]", + "[ 12/5 → 13/5 | note:D3 ]", + "[ 12/5 → 13/5 | note:D4 ]", + "[ 13/5 → 14/5 | note:Eb3 ]", + "[ 13/5 → 14/5 | note:F3 ]", + "[ 13/5 → 14/5 | note:Eb4 ]", + "[ 14/5 → 3/1 | note:F3 ]", + "[ 14/5 → 3/1 | note:G3 ]", + "[ 14/5 → 3/1 | note:F4 ]", + "[ 3/1 → 46/15 | note:G3 ]", + "[ 46/15 → 47/15 | note:Ab3 ]", + "[ 47/15 → 16/5 | note:Bb3 ]", + "[ 16/5 → 17/5 | note:C3 ]", + "[ 16/5 → 17/5 | note:C4 ]", + "[ 17/5 → 18/5 | note:D3 ]", + "[ 17/5 → 18/5 | note:D4 ]", + "[ 18/5 → 19/5 | note:Eb3 ]", + "[ 18/5 → 19/5 | note:F3 ]", + "[ 18/5 → 19/5 | note:Eb4 ]", + "[ 19/5 → 4/1 | note:F3 ]", + "[ 19/5 → 4/1 | note:G3 ]", + "[ 19/5 → 4/1 | note:F4 ]", +] +`; + exports[`runs examples > example "stepalt" example index 0 1`] = ` [ "[ 0/1 → 1/5 | s:bd ]", @@ -14742,6 +15703,64 @@ exports[`runs examples > example "withBase" example index 1 1`] = ` ] `; +exports[`runs examples > example "withHap" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c s:gm_piano ]", + "[ 1/4 → 1/2 | note:a s:gm_piano n:2 ]", + "[ 1/2 → 3/4 | note:f s:gm_piano n:2 ]", + "[ 3/4 → 1/1 | note:e s:gm_piano n:2 ]", + "[ 1/1 → 5/4 | note:c s:gm_piano ]", + "[ 5/4 → 3/2 | note:a s:gm_piano n:2 ]", + "[ 3/2 → 7/4 | note:f s:gm_piano n:2 ]", + "[ 7/4 → 2/1 | note:e s:gm_piano n:2 ]", + "[ 2/1 → 9/4 | note:c s:gm_piano ]", + "[ 9/4 → 5/2 | note:a s:gm_piano n:2 ]", + "[ 5/2 → 11/4 | note:f s:gm_piano n:2 ]", + "[ 11/4 → 3/1 | note:e s:gm_piano n:2 ]", + "[ 3/1 → 13/4 | note:c s:gm_piano ]", + "[ 13/4 → 7/2 | note:a s:gm_piano n:2 ]", + "[ 7/2 → 15/4 | note:f s:gm_piano n:2 ]", + "[ 15/4 → 4/1 | note:e s:gm_piano n:2 ]", +] +`; + +exports[`runs examples > example "withHaps" example index 0 1`] = ` +[ + "[ 0/1 → 1/10 | n:1 note:a s:gm_piano ]", + "[ 0/1 → 1/10 | n:1 note:c s:gm_piano ]", + "[ 1/10 → 1/5 | n:1 note:b s:gm_piano ]", + "[ 1/10 → 1/5 | n:1 note:d s:gm_piano ]", + "[ 1/5 → 2/5 | n:1 note:a s:gm_piano ]", + "[ 2/5 → 3/5 | n:1 note:b s:gm_piano ]", + "[ 3/5 → 4/5 | n:1 note:c s:gm_piano ]", + "[ 4/5 → 1/1 | n:1 note:d s:gm_piano ]", + "[ 1/1 → 11/10 | n:1 note:a s:gm_piano ]", + "[ 1/1 → 11/10 | n:1 note:c s:gm_piano ]", + "[ 11/10 → 6/5 | n:1 note:b s:gm_piano ]", + "[ 11/10 → 6/5 | n:1 note:d s:gm_piano ]", + "[ 6/5 → 7/5 | n:1 note:a s:gm_piano ]", + "[ 7/5 → 8/5 | n:1 note:b s:gm_piano ]", + "[ 8/5 → 9/5 | n:1 note:c s:gm_piano ]", + "[ 9/5 → 2/1 | n:1 note:d s:gm_piano ]", + "[ 2/1 → 21/10 | n:1 note:a s:gm_piano ]", + "[ 2/1 → 21/10 | n:1 note:c s:gm_piano ]", + "[ 21/10 → 11/5 | n:1 note:b s:gm_piano ]", + "[ 21/10 → 11/5 | n:1 note:d s:gm_piano ]", + "[ 11/5 → 12/5 | n:1 note:a s:gm_piano ]", + "[ 12/5 → 13/5 | n:1 note:b s:gm_piano ]", + "[ 13/5 → 14/5 | n:1 note:c s:gm_piano ]", + "[ 14/5 → 3/1 | n:1 note:d s:gm_piano ]", + "[ 3/1 → 31/10 | n:1 note:a s:gm_piano ]", + "[ 3/1 → 31/10 | n:1 note:c s:gm_piano ]", + "[ 31/10 → 16/5 | n:1 note:b s:gm_piano ]", + "[ 31/10 → 16/5 | n:1 note:d s:gm_piano ]", + "[ 16/5 → 17/5 | n:1 note:a s:gm_piano ]", + "[ 17/5 → 18/5 | n:1 note:b s:gm_piano ]", + "[ 18/5 → 19/5 | n:1 note:c s:gm_piano ]", + "[ 19/5 → 4/1 | n:1 note:d s:gm_piano ]", +] +`; + exports[`runs examples > example "withValue" example index 0 1`] = ` [ "[ 0/1 → 1/3 | 10 ]", @@ -14761,54 +15780,54 @@ exports[`runs examples > example "withValue" example index 0 1`] = ` exports[`runs examples > example "wt" example index 0 1`] = ` [ - "[ 0/1 → 1/8 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ (1/8 → 1/5) ⇝ 1/4 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ 1/8 ⇜ (1/5 → 1/4) | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 1/4 → 3/8 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ (3/8 → 2/5) ⇝ 1/2 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 3/8 ⇜ (2/5 → 1/2) | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ (1/2 → 3/5) ⇝ 5/8 | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ 1/2 ⇜ (3/5 → 5/8) | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 5/8 → 3/4 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ (3/4 → 4/5) ⇝ 7/8 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 3/4 ⇜ (4/5 → 7/8) | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 7/8 → 1/1 | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 1/1 → 9/8 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ (9/8 → 6/5) ⇝ 5/4 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ 9/8 ⇜ (6/5 → 5/4) | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 5/4 → 11/8 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ (11/8 → 7/5) ⇝ 3/2 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 11/8 ⇜ (7/5 → 3/2) | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ (3/2 → 8/5) ⇝ 13/8 | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ 3/2 ⇜ (8/5 → 13/8) | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 13/8 → 7/4 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ (7/4 → 9/5) ⇝ 15/8 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 7/4 ⇜ (9/5 → 15/8) | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 15/8 → 2/1 | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 2/1 → 17/8 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ (17/8 → 11/5) ⇝ 9/4 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ 17/8 ⇜ (11/5 → 9/4) | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 9/4 → 19/8 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ (19/8 → 12/5) ⇝ 5/2 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 19/8 ⇜ (12/5 → 5/2) | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ (5/2 → 13/5) ⇝ 21/8 | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ 5/2 ⇜ (13/5 → 21/8) | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 21/8 → 11/4 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ (11/4 → 14/5) ⇝ 23/8 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 11/4 ⇜ (14/5 → 23/8) | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 23/8 → 3/1 | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 3/1 → 25/8 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ (25/8 → 16/5) ⇝ 13/4 | s:squelch bank:wt_digital note:F1 wt:0 ]", - "[ 25/8 ⇜ (16/5 → 13/4) | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 13/4 → 27/8 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ (27/8 → 17/5) ⇝ 7/2 | s:squelch bank:wt_digital note:F1 wt:0.25 ]", - "[ 27/8 ⇜ (17/5 → 7/2) | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ (7/2 → 18/5) ⇝ 29/8 | s:squelch bank:wt_digital note:F1 wt:0.5 ]", - "[ 7/2 ⇜ (18/5 → 29/8) | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 29/8 → 15/4 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ (15/4 → 19/5) ⇝ 31/8 | s:squelch bank:wt_digital note:F1 wt:0.75 ]", - "[ 15/4 ⇜ (19/5 → 31/8) | s:squelch bank:wt_digital note:F1 wt:1 ]", - "[ 31/8 → 4/1 | s:squelch bank:wt_digital note:F1 wt:1 ]", + "[ 0/1 → 1/8 | s:wt_digital note:F1 wt:0 ]", + "[ (1/8 → 1/5) ⇝ 1/4 | s:wt_digital note:F1 wt:0 ]", + "[ 1/8 ⇜ (1/5 → 1/4) | s:wt_digital note:F1 wt:0.25 ]", + "[ 1/4 → 3/8 | s:wt_digital note:F1 wt:0.25 ]", + "[ (3/8 → 2/5) ⇝ 1/2 | s:wt_digital note:F1 wt:0.25 ]", + "[ 3/8 ⇜ (2/5 → 1/2) | s:wt_digital note:F1 wt:0.5 ]", + "[ (1/2 → 3/5) ⇝ 5/8 | s:wt_digital note:F1 wt:0.5 ]", + "[ 1/2 ⇜ (3/5 → 5/8) | s:wt_digital note:F1 wt:0.75 ]", + "[ 5/8 → 3/4 | s:wt_digital note:F1 wt:0.75 ]", + "[ (3/4 → 4/5) ⇝ 7/8 | s:wt_digital note:F1 wt:0.75 ]", + "[ 3/4 ⇜ (4/5 → 7/8) | s:wt_digital note:F1 wt:1 ]", + "[ 7/8 → 1/1 | s:wt_digital note:F1 wt:1 ]", + "[ 1/1 → 9/8 | s:wt_digital note:F1 wt:0 ]", + "[ (9/8 → 6/5) ⇝ 5/4 | s:wt_digital note:F1 wt:0 ]", + "[ 9/8 ⇜ (6/5 → 5/4) | s:wt_digital note:F1 wt:0.25 ]", + "[ 5/4 → 11/8 | s:wt_digital note:F1 wt:0.25 ]", + "[ (11/8 → 7/5) ⇝ 3/2 | s:wt_digital note:F1 wt:0.25 ]", + "[ 11/8 ⇜ (7/5 → 3/2) | s:wt_digital note:F1 wt:0.5 ]", + "[ (3/2 → 8/5) ⇝ 13/8 | s:wt_digital note:F1 wt:0.5 ]", + "[ 3/2 ⇜ (8/5 → 13/8) | s:wt_digital note:F1 wt:0.75 ]", + "[ 13/8 → 7/4 | s:wt_digital note:F1 wt:0.75 ]", + "[ (7/4 → 9/5) ⇝ 15/8 | s:wt_digital note:F1 wt:0.75 ]", + "[ 7/4 ⇜ (9/5 → 15/8) | s:wt_digital note:F1 wt:1 ]", + "[ 15/8 → 2/1 | s:wt_digital note:F1 wt:1 ]", + "[ 2/1 → 17/8 | s:wt_digital note:F1 wt:0 ]", + "[ (17/8 → 11/5) ⇝ 9/4 | s:wt_digital note:F1 wt:0 ]", + "[ 17/8 ⇜ (11/5 → 9/4) | s:wt_digital note:F1 wt:0.25 ]", + "[ 9/4 → 19/8 | s:wt_digital note:F1 wt:0.25 ]", + "[ (19/8 → 12/5) ⇝ 5/2 | s:wt_digital note:F1 wt:0.25 ]", + "[ 19/8 ⇜ (12/5 → 5/2) | s:wt_digital note:F1 wt:0.5 ]", + "[ (5/2 → 13/5) ⇝ 21/8 | s:wt_digital note:F1 wt:0.5 ]", + "[ 5/2 ⇜ (13/5 → 21/8) | s:wt_digital note:F1 wt:0.75 ]", + "[ 21/8 → 11/4 | s:wt_digital note:F1 wt:0.75 ]", + "[ (11/4 → 14/5) ⇝ 23/8 | s:wt_digital note:F1 wt:0.75 ]", + "[ 11/4 ⇜ (14/5 → 23/8) | s:wt_digital note:F1 wt:1 ]", + "[ 23/8 → 3/1 | s:wt_digital note:F1 wt:1 ]", + "[ 3/1 → 25/8 | s:wt_digital note:F1 wt:0 ]", + "[ (25/8 → 16/5) ⇝ 13/4 | s:wt_digital note:F1 wt:0 ]", + "[ 25/8 ⇜ (16/5 → 13/4) | s:wt_digital note:F1 wt:0.25 ]", + "[ 13/4 → 27/8 | s:wt_digital note:F1 wt:0.25 ]", + "[ (27/8 → 17/5) ⇝ 7/2 | s:wt_digital note:F1 wt:0.25 ]", + "[ 27/8 ⇜ (17/5 → 7/2) | s:wt_digital note:F1 wt:0.5 ]", + "[ (7/2 → 18/5) ⇝ 29/8 | s:wt_digital note:F1 wt:0.5 ]", + "[ 7/2 ⇜ (18/5 → 29/8) | s:wt_digital note:F1 wt:0.75 ]", + "[ 29/8 → 15/4 | s:wt_digital note:F1 wt:0.75 ]", + "[ (15/4 → 19/5) ⇝ 31/8 | s:wt_digital note:F1 wt:0.75 ]", + "[ 15/4 ⇜ (19/5 → 31/8) | s:wt_digital note:F1 wt:1 ]", + "[ 31/8 → 4/1 | s:wt_digital note:F1 wt:1 ]", ] `; diff --git a/website/src/pages/learn/signals.mdx b/website/src/pages/learn/signals.mdx index 527e42bef..501135b29 100644 --- a/website/src/pages/learn/signals.mdx +++ b/website/src/pages/learn/signals.mdx @@ -55,6 +55,14 @@ There is also `saw2`, `sine2`, `cosine2`, `tri2`, `square2` and `rand2` which ha +## time + + + +## creating your own signal + + + ## mouseX diff --git a/website/src/pages/technical-manual/patterns.mdx b/website/src/pages/technical-manual/patterns.mdx index 49ede526c..da97b2157 100644 --- a/website/src/pages/technical-manual/patterns.mdx +++ b/website/src/pages/technical-manual/patterns.mdx @@ -8,7 +8,7 @@ import { JsDoc } from '../../docs/JsDoc'; # Patterns -Patterns are the essence of Tidal. Its patterns are abstract entities that represent flows of time as functions, adapting a technique called pure functional reactive programming. Taking a time span as its input, a Pattern can output a set of events that happen within that time span. It depends on the structure of the Pattern how the events are located in time. +Patterns are the essence of Uzu languages such as Strudel and Tidal. Its patterns are abstract entities that represent flows of time as functions, adapting a technique called pure functional reactive programming. Taking a time span as its input, a Pattern can output a set of events that happen within that time span. It depends on the structure of the Pattern how the events are located in time. From now on, this process of generating events from a time span will be called **querying**. Example: