From d4518f7a6e588b0418078e5aff5bfd9336f983f5 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 12:50:35 +0100 Subject: [PATCH 1/6] began tidal comparison page --- website/src/config.ts | 1 + website/src/pages/learn/strudel-vs-tidal.mdx | 105 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 website/src/pages/learn/strudel-vs-tidal.mdx diff --git a/website/src/config.ts b/website/src/config.ts index 273dc511..8ca153b4 100644 --- a/website/src/config.ts +++ b/website/src/config.ts @@ -56,6 +56,7 @@ export const SIDEBAR: Sidebar = { { text: 'Signals', link: 'learn/signals' }, { text: 'Tonal', link: 'learn/tonal' }, { text: 'MIDI & OSC', link: 'learn/input-output' }, + { text: 'Strudel vs Tidal', link: 'learn/strudel-vs-tidal' }, ], 'Technical Manual': [ { text: 'Patterns', link: 'technical-manual/patterns' }, diff --git a/website/src/pages/learn/strudel-vs-tidal.mdx b/website/src/pages/learn/strudel-vs-tidal.mdx new file mode 100644 index 00000000..5808fc5f --- /dev/null +++ b/website/src/pages/learn/strudel-vs-tidal.mdx @@ -0,0 +1,105 @@ +--- +title: Strudel vs Tidal +layout: ../../layouts/MainLayout.astro +--- + +import { MiniRepl } from '../../docs/MiniRepl'; +import { JsDoc } from '../../docs/JsDoc'; + +# Comparing Strudel and Tidal + +This page is dedicated to exisiting tidal users, giving an overview of all the differences between Strudel and Tidal. + +## Language + +Strudel is written in JavaScript, while Tidal is written in Haskell. + +### Example + +This difference is most obvious when looking at the syntax: + +```hs +iter 4 $ every 3 (||+ n "10 20") $ (n "0 1 3") # s "triangle" # crush 4 +``` + +One _could_ express that pattern to Strudel like so: + +```txt +iter(4, every(3, add.squeeze("10 20"), n("0 1 3").s("triangle").crush(4))) +``` + +- The `$` operator does not exist, so the `iter` function has to wrap everything in parens. +- Custom operators like `||+` are explicit function calls, `add.squeeze` in this case +- The `#` operator is replaced with a chained function call `# crush 4` => `.crush(4)` + +Unlike Haskell, JavaScript lacks the ability to define custom infix +operators, or change the meaning of existing ones. + +Before you discard Strudel as an unwieldy paren monster, look at this alternative way to write the above: + +```txt +n("0 1 3").every(3, add.squeeze("10 20")).iter(4).s("triangle").crush(4) +``` + +By reordering calls, the parens are much less nested. +As a general rule by thumb, you could say that everything Tidal does with `$` is reversed in Strudel: + +`iter 4 $ every 3 (||+ n "10 20") $ (n "0 1 3")` + +becomes + +`n("0 1 3").every(3, add.squeeze("10 20")).iter(4)` + +Simply put, `foo x $ bar x` becomes `bar(x).foo(x)`. + +### Operators + +The [custom operators of tidal](https://tidalcycles.org/docs/reference/pattern_structure/#all-the-operators) are normal functions in strudel: + +| function | tidal | strudel | +| ----------- | ------ | ------- | +| add | \|+ n | .add(n) | +| subtract | \|- n | .sub(n) | +| multiply | \|\* n | .mul(n) | +| divide | \|\/ n | .div(n) | +| modulo | \|\% n | .mod(n) | +| left values | \|\< n | .set(n) | + +The above list only displays the operators taking the structure comes from the `left`. +For each of those, a `right` and `both` variant also exists. +As this directional thinking only works with code, strudel calls these `in` / `out` / `mix`: + +| direction | tidal | strudel | +| --------- | ------- | ----------- | +| left | \|+ n | .add.in(n) | +| right | +\| n | .add.out(n) | +| both | \|+\| n | .add.mix(n) | + +Instead of `+` / `add`, you can use any of the available operators of the first list. + +## Function Compatibility + +[This issue](https://github.com/tidalcycles/strudel/issues/31) tracks which Tidal functions are implemented in Strudel. +The list might not be 100% up to date and probably also misses some functions completely.. +Feel encouraged to search the source code for a function you're looking for. +If you find a function that's not on the list, please tell! + +## Control Params + +As seen in the example, the `#` operator (shorthand for `|>`) is also just a function call in strudel. +So `note "c5" # s "gtr"` becomes `note("c5").s('gtr')`. + +[This file](https://github.com/tidalcycles/strudel/blob/main/packages/core/controls.mjs) lists all available control params. +Note that not all of those work in the Webaudio Output of Strudel. +If you find a tidal control that's not on the list, please tell! + +## Sound + +Tidal is commonly paired with Superdirt / Supercollider for sound generation. +While Strudel also has a way of [communicating with Superdirt](./learn/input-output), +it aims to provide a standalone live coding environment that runs entirely in the browser. + +### Audio Effects + +Many of SuperDirt's effects have been reimplemented in Strudel, using the Web Audio API. +You can find a (not totally complete) [list of available effects here](./learn/effects). From ebb1bbc9668be587414b2eee84ce21b822a62bd9 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 21:14:19 +0100 Subject: [PATCH 2/6] improve effects doc --- packages/core/controls.mjs | 43 +++++++++++++++++----- website/src/pages/learn/effects.mdx | 57 ++++++++++++++++++++++------- website/src/pages/learn/samples.mdx | 8 +++- 3 files changed, 84 insertions(+), 24 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 22e30f33..8682f0e1 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -269,7 +269,7 @@ const generic_params = [ * @name cut * @param {number | Pattern} group cut group number * @example - * s("bd sax").cut(1).osc() + * s("rd*4").cut(1) * */ [ @@ -341,17 +341,36 @@ const generic_params = [ ['f', 'djf', 'DJ filter, below 0.5 is low pass filter, above is high pass filter.'], // ['f', 'cutoffegint', ''], // TODO: does not seem to work - /* + /** * Sets the level of the delay signal. * * @name delay * @param {number | Pattern} level between 0 and 1 * @example - * s("bd").delay("<0 .5 .75 1>").osc() + * s("bd").delay("<0 .25 .5 1>") * */ ['f', 'delay', 'a pattern of numbers from 0 to 1. Sets the level of the delay signal.'], + /** + * Sets the level of the signal that is fed back into the delay. + * Caution: Values >= 1 will result in a signal that gets louder and louder! Don't do it + * + * @name delayfeedback + * @param {number | Pattern} feedback between 0 and 1 + * @example + * s("bd").delay(.25).delayfeedback("<.25 .5 .75 1>").slow(2) + * + */ ['f', 'delayfeedback', 'a pattern of numbers from 0 to 1. Sets the amount of delay feedback.'], + /** + * Sets the time of the delay effect. + * + * @name delaytime + * @param {number | Pattern} seconds between 0 and Infinity + * @example + * s("bd").delay(.25).delaytime("<.125 .25 .5 1>").slow(2) + * + */ ['f', 'delaytime', 'a pattern of numbers from 0 to 1. Sets the length of the delay.'], /* // TODO: test * Specifies whether delaytime is calculated relative to cps. @@ -504,11 +523,15 @@ const generic_params = [ // ['f', 'ophatdecay', ''], // TODO: example /** - * a pattern of numbers. An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share hardware output bus offset and global effects, e.g. reverb and delay. The maximum number of orbits is specified in the superdirt startup, numbers higher than maximum will wrap around. + * An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share the same global effects. * * @name orbit * @param {number | Pattern} number - * + * @example + * stack( + * s("hh*3").delay(.5).delaytime(.25).orbit(1), + * s("~ sd").delay(.5).delaytime(.125).orbit(2) + * ) */ [ 'i', @@ -590,7 +613,7 @@ const generic_params = [ * @name room * @param {number | Pattern} level between 0 and 1 * @example - * s("bd sd").room("<0 .2 .4 .6 .8 1>").osc() + * s("bd sd").room("<0 .2 .4 .6 .8 1>") * */ ['f', 'room', 'a pattern of numbers from 0 to 1. Sets the level of reverb.'], @@ -598,9 +621,9 @@ const generic_params = [ * Sets the room size of the reverb, see {@link room}. * * @name size - * @param {number | Pattern} size between 0 and 1 + * @param {number | Pattern} size between 0 and 10 * @example - * s("bd sd").room(.8).size("<0 .2 .4 .6 .8 1>").osc() + * s("bd sd").room(.8).size("<0 1 2 4 8>") * */ // TODO: find out why : @@ -640,9 +663,9 @@ const generic_params = [ * @name speed * @param {number | Pattern} speed -inf to inf, negative numbers play the sample backwards. * @example - * s("bd").speed("<1 2 4 1 -2 -4>").osc() + * s("bd").speed("<1 2 4 1 -2 -4>") * @example - * speed("1 1.5*2 [2 1.1]").s("sax").cut(1).osc() + * speed("1 1.5*2 [2 1.1]").s("piano").clip(1) * */ [ diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index a73e140a..5310a50a 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -12,54 +12,85 @@ import { JsDoc } from '../../docs/JsDoc'; Wether you're using a synth or a sample, you can apply any of the following built-in audio effects. As you might suspect, the effects can be chained together, and they accept a pattern string as their argument. -# bandf +## bandf -# bandq +## bandq -# coarse +## coarse -# crush +## crush -# cutoff +## cutoff -# gain +## gain -# hcutoff +## hcutoff -# hresonance +## hresonance -# pan +## pan -# resonance +## resonance -# shape +## shape -# velocity +## velocity -# vowel +## vowel + +# Global Effects + +## Local vs Global Effects + +While the above listed "local" effects will always create a separate effects chain for each event, +global effects use the same chain for all events of the same orbit: + +## orbit + + + +## delay + + + +## delaytime + + + +## delayfeedback + + + +## room + + + +## size / roomsize + + diff --git a/website/src/pages/learn/samples.mdx b/website/src/pages/learn/samples.mdx index 7804ffe8..3b5b56ae 100644 --- a/website/src/pages/learn/samples.mdx +++ b/website/src/pages/learn/samples.mdx @@ -217,6 +217,10 @@ Almost everything in Tidal can be patterned using strings! +### `cut` + + + ### `loopAt` @@ -225,4 +229,6 @@ Almost everything in Tidal can be patterned using strings! -
+### `speed` + + From 605a1365d3f42d9ca146179b0a849e13bd2c52b1 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 21:15:32 +0100 Subject: [PATCH 3/6] update snapshots --- test/__snapshots__/examples.test.mjs.snap | 689 +++------------------- 1 file changed, 90 insertions(+), 599 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 533c192c..9176c3c9 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -1150,14 +1150,22 @@ exports[`runs examples > example "crush" example index 0 1`] = ` exports[`runs examples > example "cut" example index 0 1`] = ` [ - "[ 0/1 → 1/2 | s:bd cut:1 ]", - "[ 1/2 → 1/1 | s:sax cut:1 ]", - "[ 1/1 → 3/2 | s:bd cut:1 ]", - "[ 3/2 → 2/1 | s:sax cut:1 ]", - "[ 2/1 → 5/2 | s:bd cut:1 ]", - "[ 5/2 → 3/1 | s:sax cut:1 ]", - "[ 3/1 → 7/2 | s:bd cut:1 ]", - "[ 7/2 → 4/1 | s:sax cut:1 ]", + "[ 0/1 → 1/4 | s:rd cut:1 ]", + "[ 1/4 → 1/2 | s:rd cut:1 ]", + "[ 1/2 → 3/4 | s:rd cut:1 ]", + "[ 3/4 → 1/1 | s:rd cut:1 ]", + "[ 1/1 → 5/4 | s:rd cut:1 ]", + "[ 5/4 → 3/2 | s:rd cut:1 ]", + "[ 3/2 → 7/4 | s:rd cut:1 ]", + "[ 7/4 → 2/1 | s:rd cut:1 ]", + "[ 2/1 → 9/4 | s:rd cut:1 ]", + "[ 9/4 → 5/2 | s:rd cut:1 ]", + "[ 5/2 → 11/4 | s:rd cut:1 ]", + "[ 11/4 → 3/1 | s:rd cut:1 ]", + "[ 3/1 → 13/4 | s:rd cut:1 ]", + "[ 13/4 → 7/2 | s:rd cut:1 ]", + "[ 7/2 → 15/4 | s:rd cut:1 ]", + "[ 15/4 → 4/1 | s:rd cut:1 ]", ] `; @@ -1301,6 +1309,33 @@ exports[`runs examples > example "degradeBy" example index 1 1`] = ` ] `; +exports[`runs examples > example "delay" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | s:bd delay:0 ]", + "[ 1/1 → 2/1 | s:bd delay:0.25 ]", + "[ 2/1 → 3/1 | s:bd delay:0.5 ]", + "[ 3/1 → 4/1 | s:bd delay:1 ]", +] +`; + +exports[`runs examples > example "delayfeedback" example index 0 1`] = ` +[ + "[ (0/1 → 1/1) ⇝ 2/1 | s:bd delay:0.25 delayfeedback:0.25 ]", + "[ 0/1 ⇜ (1/1 → 2/1) | s:bd delay:0.25 delayfeedback:0.25 ]", + "[ (2/1 → 3/1) ⇝ 4/1 | s:bd delay:0.25 delayfeedback:0.5 ]", + "[ 2/1 ⇜ (3/1 → 4/1) | s:bd delay:0.25 delayfeedback:0.5 ]", +] +`; + +exports[`runs examples > example "delaytime" example index 0 1`] = ` +[ + "[ (0/1 → 1/1) ⇝ 2/1 | s:bd delay:0.25 delaytime:0.125 ]", + "[ 0/1 ⇜ (1/1 → 2/1) | s:bd delay:0.25 delaytime:0.125 ]", + "[ (2/1 → 3/1) ⇝ 4/1 | s:bd delay:0.25 delaytime:0.25 ]", + "[ 2/1 ⇜ (3/1 → 4/1) | s:bd delay:0.25 delaytime:0.25 ]", +] +`; + exports[`runs examples > example "detune" example index 0 1`] = ` [ "[ 0/1 → 1/3 | n:0 s:superzow octave:3 detune:0 ]", @@ -1527,571 +1562,6 @@ exports[`runs examples > example "euclid" example index 0 1`] = ` ] `; -exports[`runs examples > example "euclid" example index 0 2`] = ` -[ - "[ 1/5 → 2/5 | note:c3 ]", - "[ 3/5 → 4/5 | note:c3 ]", - "[ 6/5 → 7/5 | note:c3 ]", - "[ 8/5 → 9/5 | note:c3 ]", - "[ 11/5 → 12/5 | note:c3 ]", - "[ 13/5 → 14/5 | note:c3 ]", - "[ 16/5 → 17/5 | note:c3 ]", - "[ 18/5 → 19/5 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 1 1`] = ` -[ - "[ 1/4 → 1/2 | note:c3 ]", - "[ 1/2 → 3/4 | note:c3 ]", - "[ 3/4 → 1/1 | note:c3 ]", - "[ 5/4 → 3/2 | note:c3 ]", - "[ 3/2 → 7/4 | note:c3 ]", - "[ 7/4 → 2/1 | note:c3 ]", - "[ 9/4 → 5/2 | note:c3 ]", - "[ 5/2 → 11/4 | note:c3 ]", - "[ 11/4 → 3/1 | note:c3 ]", - "[ 13/4 → 7/2 | note:c3 ]", - "[ 7/2 → 15/4 | note:c3 ]", - "[ 15/4 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 2 1`] = ` -[ - "[ 1/5 → 2/5 | note:c3 ]", - "[ 2/5 → 3/5 | note:c3 ]", - "[ 4/5 → 1/1 | note:c3 ]", - "[ 6/5 → 7/5 | note:c3 ]", - "[ 7/5 → 8/5 | note:c3 ]", - "[ 9/5 → 2/1 | note:c3 ]", - "[ 11/5 → 12/5 | note:c3 ]", - "[ 12/5 → 13/5 | note:c3 ]", - "[ 14/5 → 3/1 | note:c3 ]", - "[ 16/5 → 17/5 | note:c3 ]", - "[ 17/5 → 18/5 | note:c3 ]", - "[ 19/5 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 3 1`] = ` -[ - "[ 1/7 → 2/7 | note:c3 ]", - "[ 3/7 → 4/7 | note:c3 ]", - "[ 5/7 → 6/7 | note:c3 ]", - "[ 8/7 → 9/7 | note:c3 ]", - "[ 10/7 → 11/7 | note:c3 ]", - "[ 12/7 → 13/7 | note:c3 ]", - "[ 15/7 → 16/7 | note:c3 ]", - "[ 17/7 → 18/7 | note:c3 ]", - "[ 19/7 → 20/7 | note:c3 ]", - "[ 22/7 → 23/7 | note:c3 ]", - "[ 24/7 → 25/7 | note:c3 ]", - "[ 26/7 → 27/7 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 4 1`] = ` -[ - "[ 0/1 → 1/8 | note:c3 ]", - "[ 3/8 → 1/2 | note:c3 ]", - "[ 3/4 → 7/8 | note:c3 ]", - "[ 1/1 → 9/8 | note:c3 ]", - "[ 11/8 → 3/2 | note:c3 ]", - "[ 7/4 → 15/8 | note:c3 ]", - "[ 2/1 → 17/8 | note:c3 ]", - "[ 19/8 → 5/2 | note:c3 ]", - "[ 11/4 → 23/8 | note:c3 ]", - "[ 3/1 → 25/8 | note:c3 ]", - "[ 27/8 → 7/2 | note:c3 ]", - "[ 15/4 → 31/8 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 5 1`] = ` -[ - "[ 0/1 → 1/7 | note:c3 ]", - "[ 2/7 → 3/7 | note:c3 ]", - "[ 4/7 → 5/7 | note:c3 ]", - "[ 6/7 → 1/1 | note:c3 ]", - "[ 1/1 → 8/7 | note:c3 ]", - "[ 9/7 → 10/7 | note:c3 ]", - "[ 11/7 → 12/7 | note:c3 ]", - "[ 13/7 → 2/1 | note:c3 ]", - "[ 2/1 → 15/7 | note:c3 ]", - "[ 16/7 → 17/7 | note:c3 ]", - "[ 18/7 → 19/7 | note:c3 ]", - "[ 20/7 → 3/1 | note:c3 ]", - "[ 3/1 → 22/7 | note:c3 ]", - "[ 23/7 → 24/7 | note:c3 ]", - "[ 25/7 → 26/7 | note:c3 ]", - "[ 27/7 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 6 1`] = ` -[ - "[ 1/9 → 2/9 | note:c3 ]", - "[ 1/3 → 4/9 | note:c3 ]", - "[ 5/9 → 2/3 | note:c3 ]", - "[ 7/9 → 8/9 | note:c3 ]", - "[ 10/9 → 11/9 | note:c3 ]", - "[ 4/3 → 13/9 | note:c3 ]", - "[ 14/9 → 5/3 | note:c3 ]", - "[ 16/9 → 17/9 | note:c3 ]", - "[ 19/9 → 20/9 | note:c3 ]", - "[ 7/3 → 22/9 | note:c3 ]", - "[ 23/9 → 8/3 | note:c3 ]", - "[ 25/9 → 26/9 | note:c3 ]", - "[ 28/9 → 29/9 | note:c3 ]", - "[ 10/3 → 31/9 | note:c3 ]", - "[ 32/9 → 11/3 | note:c3 ]", - "[ 34/9 → 35/9 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 7 1`] = ` -[ - "[ 0/1 → 1/11 | note:c3 ]", - "[ 3/11 → 4/11 | note:c3 ]", - "[ 6/11 → 7/11 | note:c3 ]", - "[ 9/11 → 10/11 | note:c3 ]", - "[ 1/1 → 12/11 | note:c3 ]", - "[ 14/11 → 15/11 | note:c3 ]", - "[ 17/11 → 18/11 | note:c3 ]", - "[ 20/11 → 21/11 | note:c3 ]", - "[ 2/1 → 23/11 | note:c3 ]", - "[ 25/11 → 26/11 | note:c3 ]", - "[ 28/11 → 29/11 | note:c3 ]", - "[ 31/11 → 32/11 | note:c3 ]", - "[ 3/1 → 34/11 | note:c3 ]", - "[ 36/11 → 37/11 | note:c3 ]", - "[ 39/11 → 40/11 | note:c3 ]", - "[ 42/11 → 43/11 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 8 1`] = ` -[ - "[ 1/6 → 1/3 | note:c3 ]", - "[ 1/3 → 1/2 | note:c3 ]", - "[ 1/2 → 2/3 | note:c3 ]", - "[ 2/3 → 5/6 | note:c3 ]", - "[ 5/6 → 1/1 | note:c3 ]", - "[ 7/6 → 4/3 | note:c3 ]", - "[ 4/3 → 3/2 | note:c3 ]", - "[ 3/2 → 5/3 | note:c3 ]", - "[ 5/3 → 11/6 | note:c3 ]", - "[ 11/6 → 2/1 | note:c3 ]", - "[ 13/6 → 7/3 | note:c3 ]", - "[ 7/3 → 5/2 | note:c3 ]", - "[ 5/2 → 8/3 | note:c3 ]", - "[ 8/3 → 17/6 | note:c3 ]", - "[ 17/6 → 3/1 | note:c3 ]", - "[ 19/6 → 10/3 | note:c3 ]", - "[ 10/3 → 7/2 | note:c3 ]", - "[ 7/2 → 11/3 | note:c3 ]", - "[ 11/3 → 23/6 | note:c3 ]", - "[ 23/6 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 9 1`] = ` -[ - "[ 0/1 → 1/7 | note:c3 ]", - "[ 2/7 → 3/7 | note:c3 ]", - "[ 3/7 → 4/7 | note:c3 ]", - "[ 5/7 → 6/7 | note:c3 ]", - "[ 6/7 → 1/1 | note:c3 ]", - "[ 1/1 → 8/7 | note:c3 ]", - "[ 9/7 → 10/7 | note:c3 ]", - "[ 10/7 → 11/7 | note:c3 ]", - "[ 12/7 → 13/7 | note:c3 ]", - "[ 13/7 → 2/1 | note:c3 ]", - "[ 2/1 → 15/7 | note:c3 ]", - "[ 16/7 → 17/7 | note:c3 ]", - "[ 17/7 → 18/7 | note:c3 ]", - "[ 19/7 → 20/7 | note:c3 ]", - "[ 20/7 → 3/1 | note:c3 ]", - "[ 3/1 → 22/7 | note:c3 ]", - "[ 23/7 → 24/7 | note:c3 ]", - "[ 24/7 → 25/7 | note:c3 ]", - "[ 26/7 → 27/7 | note:c3 ]", - "[ 27/7 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 10 1`] = ` -[ - "[ 1/8 → 1/4 | note:c3 ]", - "[ 1/4 → 3/8 | note:c3 ]", - "[ 1/2 → 5/8 | note:c3 ]", - "[ 5/8 → 3/4 | note:c3 ]", - "[ 7/8 → 1/1 | note:c3 ]", - "[ 9/8 → 5/4 | note:c3 ]", - "[ 5/4 → 11/8 | note:c3 ]", - "[ 3/2 → 13/8 | note:c3 ]", - "[ 13/8 → 7/4 | note:c3 ]", - "[ 15/8 → 2/1 | note:c3 ]", - "[ 17/8 → 9/4 | note:c3 ]", - "[ 9/4 → 19/8 | note:c3 ]", - "[ 5/2 → 21/8 | note:c3 ]", - "[ 21/8 → 11/4 | note:c3 ]", - "[ 23/8 → 3/1 | note:c3 ]", - "[ 25/8 → 13/4 | note:c3 ]", - "[ 13/4 → 27/8 | note:c3 ]", - "[ 7/2 → 29/8 | note:c3 ]", - "[ 29/8 → 15/4 | note:c3 ]", - "[ 31/8 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 11 1`] = ` -[ - "[ 0/1 → 1/9 | note:c3 ]", - "[ 2/9 → 1/3 | note:c3 ]", - "[ 4/9 → 5/9 | note:c3 ]", - "[ 2/3 → 7/9 | note:c3 ]", - "[ 8/9 → 1/1 | note:c3 ]", - "[ 1/1 → 10/9 | note:c3 ]", - "[ 11/9 → 4/3 | note:c3 ]", - "[ 13/9 → 14/9 | note:c3 ]", - "[ 5/3 → 16/9 | note:c3 ]", - "[ 17/9 → 2/1 | note:c3 ]", - "[ 2/1 → 19/9 | note:c3 ]", - "[ 20/9 → 7/3 | note:c3 ]", - "[ 22/9 → 23/9 | note:c3 ]", - "[ 8/3 → 25/9 | note:c3 ]", - "[ 26/9 → 3/1 | note:c3 ]", - "[ 3/1 → 28/9 | note:c3 ]", - "[ 29/9 → 10/3 | note:c3 ]", - "[ 31/9 → 32/9 | note:c3 ]", - "[ 11/3 → 34/9 | note:c3 ]", - "[ 35/9 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 12 1`] = ` -[ - "[ 1/11 → 2/11 | note:c3 ]", - "[ 3/11 → 4/11 | note:c3 ]", - "[ 5/11 → 6/11 | note:c3 ]", - "[ 7/11 → 8/11 | note:c3 ]", - "[ 9/11 → 10/11 | note:c3 ]", - "[ 12/11 → 13/11 | note:c3 ]", - "[ 14/11 → 15/11 | note:c3 ]", - "[ 16/11 → 17/11 | note:c3 ]", - "[ 18/11 → 19/11 | note:c3 ]", - "[ 20/11 → 21/11 | note:c3 ]", - "[ 23/11 → 24/11 | note:c3 ]", - "[ 25/11 → 26/11 | note:c3 ]", - "[ 27/11 → 28/11 | note:c3 ]", - "[ 29/11 → 30/11 | note:c3 ]", - "[ 31/11 → 32/11 | note:c3 ]", - "[ 34/11 → 35/11 | note:c3 ]", - "[ 36/11 → 37/11 | note:c3 ]", - "[ 38/11 → 39/11 | note:c3 ]", - "[ 40/11 → 41/11 | note:c3 ]", - "[ 42/11 → 43/11 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 13 1`] = ` -[ - "[ 0/1 → 1/12 | note:c3 ]", - "[ 1/4 → 1/3 | note:c3 ]", - "[ 5/12 → 1/2 | note:c3 ]", - "[ 2/3 → 3/4 | note:c3 ]", - "[ 5/6 → 11/12 | note:c3 ]", - "[ 1/1 → 13/12 | note:c3 ]", - "[ 5/4 → 4/3 | note:c3 ]", - "[ 17/12 → 3/2 | note:c3 ]", - "[ 5/3 → 7/4 | note:c3 ]", - "[ 11/6 → 23/12 | note:c3 ]", - "[ 2/1 → 25/12 | note:c3 ]", - "[ 9/4 → 7/3 | note:c3 ]", - "[ 29/12 → 5/2 | note:c3 ]", - "[ 8/3 → 11/4 | note:c3 ]", - "[ 17/6 → 35/12 | note:c3 ]", - "[ 3/1 → 37/12 | note:c3 ]", - "[ 13/4 → 10/3 | note:c3 ]", - "[ 41/12 → 7/2 | note:c3 ]", - "[ 11/3 → 15/4 | note:c3 ]", - "[ 23/6 → 47/12 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 14 1`] = ` -[ - "[ 1/16 → 1/8 | note:c3 ]", - "[ 1/4 → 5/16 | note:c3 ]", - "[ 7/16 → 1/2 | note:c3 ]", - "[ 5/8 → 11/16 | note:c3 ]", - "[ 13/16 → 7/8 | note:c3 ]", - "[ 17/16 → 9/8 | note:c3 ]", - "[ 5/4 → 21/16 | note:c3 ]", - "[ 23/16 → 3/2 | note:c3 ]", - "[ 13/8 → 27/16 | note:c3 ]", - "[ 29/16 → 15/8 | note:c3 ]", - "[ 33/16 → 17/8 | note:c3 ]", - "[ 9/4 → 37/16 | note:c3 ]", - "[ 39/16 → 5/2 | note:c3 ]", - "[ 21/8 → 43/16 | note:c3 ]", - "[ 45/16 → 23/8 | note:c3 ]", - "[ 49/16 → 25/8 | note:c3 ]", - "[ 13/4 → 53/16 | note:c3 ]", - "[ 55/16 → 7/2 | note:c3 ]", - "[ 29/8 → 59/16 | note:c3 ]", - "[ 61/16 → 31/8 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 15 1`] = ` -[ - "[ 1/8 → 1/4 | note:c3 ]", - "[ 1/4 → 3/8 | note:c3 ]", - "[ 3/8 → 1/2 | note:c3 ]", - "[ 1/2 → 5/8 | note:c3 ]", - "[ 5/8 → 3/4 | note:c3 ]", - "[ 3/4 → 7/8 | note:c3 ]", - "[ 7/8 → 1/1 | note:c3 ]", - "[ 9/8 → 5/4 | note:c3 ]", - "[ 5/4 → 11/8 | note:c3 ]", - "[ 11/8 → 3/2 | note:c3 ]", - "[ 3/2 → 13/8 | note:c3 ]", - "[ 13/8 → 7/4 | note:c3 ]", - "[ 7/4 → 15/8 | note:c3 ]", - "[ 15/8 → 2/1 | note:c3 ]", - "[ 17/8 → 9/4 | note:c3 ]", - "[ 9/4 → 19/8 | note:c3 ]", - "[ 19/8 → 5/2 | note:c3 ]", - "[ 5/2 → 21/8 | note:c3 ]", - "[ 21/8 → 11/4 | note:c3 ]", - "[ 11/4 → 23/8 | note:c3 ]", - "[ 23/8 → 3/1 | note:c3 ]", - "[ 25/8 → 13/4 | note:c3 ]", - "[ 13/4 → 27/8 | note:c3 ]", - "[ 27/8 → 7/2 | note:c3 ]", - "[ 7/2 → 29/8 | note:c3 ]", - "[ 29/8 → 15/4 | note:c3 ]", - "[ 15/4 → 31/8 | note:c3 ]", - "[ 31/8 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 16 1`] = ` -[ - "[ 1/12 → 1/6 | note:c3 ]", - "[ 1/6 → 1/4 | note:c3 ]", - "[ 1/3 → 5/12 | note:c3 ]", - "[ 1/2 → 7/12 | note:c3 ]", - "[ 7/12 → 2/3 | note:c3 ]", - "[ 3/4 → 5/6 | note:c3 ]", - "[ 11/12 → 1/1 | note:c3 ]", - "[ 13/12 → 7/6 | note:c3 ]", - "[ 7/6 → 5/4 | note:c3 ]", - "[ 4/3 → 17/12 | note:c3 ]", - "[ 3/2 → 19/12 | note:c3 ]", - "[ 19/12 → 5/3 | note:c3 ]", - "[ 7/4 → 11/6 | note:c3 ]", - "[ 23/12 → 2/1 | note:c3 ]", - "[ 25/12 → 13/6 | note:c3 ]", - "[ 13/6 → 9/4 | note:c3 ]", - "[ 7/3 → 29/12 | note:c3 ]", - "[ 5/2 → 31/12 | note:c3 ]", - "[ 31/12 → 8/3 | note:c3 ]", - "[ 11/4 → 17/6 | note:c3 ]", - "[ 35/12 → 3/1 | note:c3 ]", - "[ 37/12 → 19/6 | note:c3 ]", - "[ 19/6 → 13/4 | note:c3 ]", - "[ 10/3 → 41/12 | note:c3 ]", - "[ 7/2 → 43/12 | note:c3 ]", - "[ 43/12 → 11/3 | note:c3 ]", - "[ 15/4 → 23/6 | note:c3 ]", - "[ 47/12 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 17 1`] = ` -[ - "[ 1/16 → 1/8 | note:c3 ]", - "[ 3/16 → 1/4 | note:c3 ]", - "[ 5/16 → 3/8 | note:c3 ]", - "[ 1/2 → 9/16 | note:c3 ]", - "[ 5/8 → 11/16 | note:c3 ]", - "[ 3/4 → 13/16 | note:c3 ]", - "[ 7/8 → 15/16 | note:c3 ]", - "[ 17/16 → 9/8 | note:c3 ]", - "[ 19/16 → 5/4 | note:c3 ]", - "[ 21/16 → 11/8 | note:c3 ]", - "[ 3/2 → 25/16 | note:c3 ]", - "[ 13/8 → 27/16 | note:c3 ]", - "[ 7/4 → 29/16 | note:c3 ]", - "[ 15/8 → 31/16 | note:c3 ]", - "[ 33/16 → 17/8 | note:c3 ]", - "[ 35/16 → 9/4 | note:c3 ]", - "[ 37/16 → 19/8 | note:c3 ]", - "[ 5/2 → 41/16 | note:c3 ]", - "[ 21/8 → 43/16 | note:c3 ]", - "[ 11/4 → 45/16 | note:c3 ]", - "[ 23/8 → 47/16 | note:c3 ]", - "[ 49/16 → 25/8 | note:c3 ]", - "[ 51/16 → 13/4 | note:c3 ]", - "[ 53/16 → 27/8 | note:c3 ]", - "[ 7/2 → 57/16 | note:c3 ]", - "[ 29/8 → 59/16 | note:c3 ]", - "[ 15/4 → 61/16 | note:c3 ]", - "[ 31/8 → 63/16 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 18 1`] = ` -[ - "[ 1/16 → 1/8 | note:c3 ]", - "[ 1/8 → 3/16 | note:c3 ]", - "[ 1/4 → 5/16 | note:c3 ]", - "[ 3/8 → 7/16 | note:c3 ]", - "[ 1/2 → 9/16 | note:c3 ]", - "[ 9/16 → 5/8 | note:c3 ]", - "[ 11/16 → 3/4 | note:c3 ]", - "[ 13/16 → 7/8 | note:c3 ]", - "[ 15/16 → 1/1 | note:c3 ]", - "[ 17/16 → 9/8 | note:c3 ]", - "[ 9/8 → 19/16 | note:c3 ]", - "[ 5/4 → 21/16 | note:c3 ]", - "[ 11/8 → 23/16 | note:c3 ]", - "[ 3/2 → 25/16 | note:c3 ]", - "[ 25/16 → 13/8 | note:c3 ]", - "[ 27/16 → 7/4 | note:c3 ]", - "[ 29/16 → 15/8 | note:c3 ]", - "[ 31/16 → 2/1 | note:c3 ]", - "[ 33/16 → 17/8 | note:c3 ]", - "[ 17/8 → 35/16 | note:c3 ]", - "[ 9/4 → 37/16 | note:c3 ]", - "[ 19/8 → 39/16 | note:c3 ]", - "[ 5/2 → 41/16 | note:c3 ]", - "[ 41/16 → 21/8 | note:c3 ]", - "[ 43/16 → 11/4 | note:c3 ]", - "[ 45/16 → 23/8 | note:c3 ]", - "[ 47/16 → 3/1 | note:c3 ]", - "[ 49/16 → 25/8 | note:c3 ]", - "[ 25/8 → 51/16 | note:c3 ]", - "[ 13/4 → 53/16 | note:c3 ]", - "[ 27/8 → 55/16 | note:c3 ]", - "[ 7/2 → 57/16 | note:c3 ]", - "[ 57/16 → 29/8 | note:c3 ]", - "[ 59/16 → 15/4 | note:c3 ]", - "[ 61/16 → 31/8 | note:c3 ]", - "[ 63/16 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 19 1`] = ` -[ - "[ 1/24 → 1/12 | note:c3 ]", - "[ 1/6 → 5/24 | note:c3 ]", - "[ 1/4 → 7/24 | note:c3 ]", - "[ 1/3 → 3/8 | note:c3 ]", - "[ 5/12 → 11/24 | note:c3 ]", - "[ 1/2 → 13/24 | note:c3 ]", - "[ 7/12 → 5/8 | note:c3 ]", - "[ 17/24 → 3/4 | note:c3 ]", - "[ 19/24 → 5/6 | note:c3 ]", - "[ 7/8 → 11/12 | note:c3 ]", - "[ 23/24 → 1/1 | note:c3 ]", - "[ 25/24 → 13/12 | note:c3 ]", - "[ 7/6 → 29/24 | note:c3 ]", - "[ 5/4 → 31/24 | note:c3 ]", - "[ 4/3 → 11/8 | note:c3 ]", - "[ 17/12 → 35/24 | note:c3 ]", - "[ 3/2 → 37/24 | note:c3 ]", - "[ 19/12 → 13/8 | note:c3 ]", - "[ 41/24 → 7/4 | note:c3 ]", - "[ 43/24 → 11/6 | note:c3 ]", - "[ 15/8 → 23/12 | note:c3 ]", - "[ 47/24 → 2/1 | note:c3 ]", - "[ 49/24 → 25/12 | note:c3 ]", - "[ 13/6 → 53/24 | note:c3 ]", - "[ 9/4 → 55/24 | note:c3 ]", - "[ 7/3 → 19/8 | note:c3 ]", - "[ 29/12 → 59/24 | note:c3 ]", - "[ 5/2 → 61/24 | note:c3 ]", - "[ 31/12 → 21/8 | note:c3 ]", - "[ 65/24 → 11/4 | note:c3 ]", - "[ 67/24 → 17/6 | note:c3 ]", - "[ 23/8 → 35/12 | note:c3 ]", - "[ 71/24 → 3/1 | note:c3 ]", - "[ 73/24 → 37/12 | note:c3 ]", - "[ 19/6 → 77/24 | note:c3 ]", - "[ 13/4 → 79/24 | note:c3 ]", - "[ 10/3 → 27/8 | note:c3 ]", - "[ 41/12 → 83/24 | note:c3 ]", - "[ 7/2 → 85/24 | note:c3 ]", - "[ 43/12 → 29/8 | note:c3 ]", - "[ 89/24 → 15/4 | note:c3 ]", - "[ 91/24 → 23/6 | note:c3 ]", - "[ 31/8 → 47/12 | note:c3 ]", - "[ 95/24 → 4/1 | note:c3 ]", -] -`; - -exports[`runs examples > example "euclid" example index 20 1`] = ` -[ - "[ 0/1 → 1/24 | note:c3 ]", - "[ 1/12 → 1/8 | note:c3 ]", - "[ 1/6 → 5/24 | note:c3 ]", - "[ 1/4 → 7/24 | note:c3 ]", - "[ 7/24 → 1/3 | note:c3 ]", - "[ 3/8 → 5/12 | note:c3 ]", - "[ 11/24 → 1/2 | note:c3 ]", - "[ 13/24 → 7/12 | note:c3 ]", - "[ 5/8 → 2/3 | note:c3 ]", - "[ 17/24 → 3/4 | note:c3 ]", - "[ 3/4 → 19/24 | note:c3 ]", - "[ 5/6 → 7/8 | note:c3 ]", - "[ 11/12 → 23/24 | note:c3 ]", - "[ 1/1 → 25/24 | note:c3 ]", - "[ 13/12 → 9/8 | note:c3 ]", - "[ 7/6 → 29/24 | note:c3 ]", - "[ 5/4 → 31/24 | note:c3 ]", - "[ 31/24 → 4/3 | note:c3 ]", - "[ 11/8 → 17/12 | note:c3 ]", - "[ 35/24 → 3/2 | note:c3 ]", - "[ 37/24 → 19/12 | note:c3 ]", - "[ 13/8 → 5/3 | note:c3 ]", - "[ 41/24 → 7/4 | note:c3 ]", - "[ 7/4 → 43/24 | note:c3 ]", - "[ 11/6 → 15/8 | note:c3 ]", - "[ 23/12 → 47/24 | note:c3 ]", - "[ 2/1 → 49/24 | note:c3 ]", - "[ 25/12 → 17/8 | note:c3 ]", - "[ 13/6 → 53/24 | note:c3 ]", - "[ 9/4 → 55/24 | note:c3 ]", - "[ 55/24 → 7/3 | note:c3 ]", - "[ 19/8 → 29/12 | note:c3 ]", - "[ 59/24 → 5/2 | note:c3 ]", - "[ 61/24 → 31/12 | note:c3 ]", - "[ 21/8 → 8/3 | note:c3 ]", - "[ 65/24 → 11/4 | note:c3 ]", - "[ 11/4 → 67/24 | note:c3 ]", - "[ 17/6 → 23/8 | note:c3 ]", - "[ 35/12 → 71/24 | note:c3 ]", - "[ 3/1 → 73/24 | note:c3 ]", - "[ 37/12 → 25/8 | note:c3 ]", - "[ 19/6 → 77/24 | note:c3 ]", - "[ 13/4 → 79/24 | note:c3 ]", - "[ 79/24 → 10/3 | note:c3 ]", - "[ 27/8 → 41/12 | note:c3 ]", - "[ 83/24 → 7/2 | note:c3 ]", - "[ 85/24 → 43/12 | note:c3 ]", - "[ 29/8 → 11/3 | note:c3 ]", - "[ 89/24 → 15/4 | note:c3 ]", - "[ 15/4 → 91/24 | note:c3 ]", - "[ 23/6 → 31/8 | note:c3 ]", - "[ 47/12 → 95/24 | note:c3 ]", -] -`; - exports[`runs examples > example "euclidLegato" example index 0 1`] = ` [ "[ 0/1 → 3/8 | n:g2 decay:0.1 sustain:0.3 ]", @@ -2771,6 +2241,27 @@ exports[`runs examples > example "often" example index 0 1`] = ` ] `; +exports[`runs examples > example "orbit" example index 0 1`] = ` +[ + "[ 0/1 → 1/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 1/3 → 2/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 2/3 → 1/1 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 1/1 → 4/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 4/3 → 5/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 5/3 → 2/1 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 2/1 → 7/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 7/3 → 8/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 8/3 → 3/1 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 3/1 → 10/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 10/3 → 11/3 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 11/3 → 4/1 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]", + "[ 1/2 → 1/1 | s:sd delay:0.5 delaytime:0.125 orbit:2 ]", + "[ 3/2 → 2/1 | s:sd delay:0.5 delaytime:0.125 orbit:2 ]", + "[ 5/2 → 3/1 | s:sd delay:0.5 delaytime:0.125 orbit:2 ]", + "[ 7/2 → 4/1 | s:sd delay:0.5 delaytime:0.125 orbit:2 ]", +] +`; + exports[`runs examples > example "pan" example index 0 1`] = ` [ "[ 0/1 → 1/4 | s:bd pan:0.5 ]", @@ -3283,12 +2774,12 @@ exports[`runs examples > example "size" example index 0 1`] = ` [ "[ 0/1 → 1/2 | s:bd room:0.8 size:0 ]", "[ 1/2 → 1/1 | s:sd room:0.8 size:0 ]", - "[ 1/1 → 3/2 | s:bd room:0.8 size:0.2 ]", - "[ 3/2 → 2/1 | s:sd room:0.8 size:0.2 ]", - "[ 2/1 → 5/2 | s:bd room:0.8 size:0.4 ]", - "[ 5/2 → 3/1 | s:sd room:0.8 size:0.4 ]", - "[ 3/1 → 7/2 | s:bd room:0.8 size:0.6 ]", - "[ 7/2 → 4/1 | s:sd room:0.8 size:0.6 ]", + "[ 1/1 → 3/2 | s:bd room:0.8 size:1 ]", + "[ 3/2 → 2/1 | s:sd room:0.8 size:1 ]", + "[ 2/1 → 5/2 | s:bd room:0.8 size:2 ]", + "[ 5/2 → 3/1 | s:sd room:0.8 size:2 ]", + "[ 3/1 → 7/2 | s:bd room:0.8 size:4 ]", + "[ 7/2 → 4/1 | s:sd room:0.8 size:4 ]", ] `; @@ -3394,26 +2885,26 @@ exports[`runs examples > example "speed" example index 0 1`] = ` exports[`runs examples > example "speed" example index 1 1`] = ` [ - "[ 0/1 → 1/3 | speed:1 s:sax cut:1 ]", - "[ 1/3 → 1/2 | speed:1.5 s:sax cut:1 ]", - "[ 1/2 → 2/3 | speed:1.5 s:sax cut:1 ]", - "[ 2/3 → 5/6 | speed:2 s:sax cut:1 ]", - "[ 5/6 → 1/1 | speed:1.1 s:sax cut:1 ]", - "[ 1/1 → 4/3 | speed:1 s:sax cut:1 ]", - "[ 4/3 → 3/2 | speed:1.5 s:sax cut:1 ]", - "[ 3/2 → 5/3 | speed:1.5 s:sax cut:1 ]", - "[ 5/3 → 11/6 | speed:2 s:sax cut:1 ]", - "[ 11/6 → 2/1 | speed:1.1 s:sax cut:1 ]", - "[ 2/1 → 7/3 | speed:1 s:sax cut:1 ]", - "[ 7/3 → 5/2 | speed:1.5 s:sax cut:1 ]", - "[ 5/2 → 8/3 | speed:1.5 s:sax cut:1 ]", - "[ 8/3 → 17/6 | speed:2 s:sax cut:1 ]", - "[ 17/6 → 3/1 | speed:1.1 s:sax cut:1 ]", - "[ 3/1 → 10/3 | speed:1 s:sax cut:1 ]", - "[ 10/3 → 7/2 | speed:1.5 s:sax cut:1 ]", - "[ 7/2 → 11/3 | speed:1.5 s:sax cut:1 ]", - "[ 11/3 → 23/6 | speed:2 s:sax cut:1 ]", - "[ 23/6 → 4/1 | speed:1.1 s:sax cut:1 ]", + "[ 0/1 → 1/3 | speed:1 s:piano clip:1 ]", + "[ 1/3 → 1/2 | speed:1.5 s:piano clip:1 ]", + "[ 1/2 → 2/3 | speed:1.5 s:piano clip:1 ]", + "[ 2/3 → 5/6 | speed:2 s:piano clip:1 ]", + "[ 5/6 → 1/1 | speed:1.1 s:piano clip:1 ]", + "[ 1/1 → 4/3 | speed:1 s:piano clip:1 ]", + "[ 4/3 → 3/2 | speed:1.5 s:piano clip:1 ]", + "[ 3/2 → 5/3 | speed:1.5 s:piano clip:1 ]", + "[ 5/3 → 11/6 | speed:2 s:piano clip:1 ]", + "[ 11/6 → 2/1 | speed:1.1 s:piano clip:1 ]", + "[ 2/1 → 7/3 | speed:1 s:piano clip:1 ]", + "[ 7/3 → 5/2 | speed:1.5 s:piano clip:1 ]", + "[ 5/2 → 8/3 | speed:1.5 s:piano clip:1 ]", + "[ 8/3 → 17/6 | speed:2 s:piano clip:1 ]", + "[ 17/6 → 3/1 | speed:1.1 s:piano clip:1 ]", + "[ 3/1 → 10/3 | speed:1 s:piano clip:1 ]", + "[ 10/3 → 7/2 | speed:1.5 s:piano clip:1 ]", + "[ 7/2 → 11/3 | speed:1.5 s:piano clip:1 ]", + "[ 11/3 → 23/6 | speed:2 s:piano clip:1 ]", + "[ 23/6 → 4/1 | speed:1.1 s:piano clip:1 ]", ] `; From 8781fa2e3312ed3d4d0e4c329562b9c33dab6cce Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 21:37:31 +0100 Subject: [PATCH 4/6] add filter synonyms --- packages/core/controls.mjs | 29 ++++++++++---------- packages/webaudio/webaudio.mjs | 22 +++++++++++---- website/src/pages/learn/strudel-vs-tidal.mdx | 2 +- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 8682f0e1..b156f721 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -155,22 +155,26 @@ const generic_params = [ * * @name bandf * @param {number | Pattern} frequency center frequency + * @synonyms bpf * @example * s("bd sd,hh*3").bandf("<1000 2000 4000 8000>") * */ ['f', 'bandf', 'A pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter.'], + ['f', 'bpf', ''], // TODO: in tidal, it seems to be normalized /** * Sets the q-factor of the band-pass filter * * @name bandq * @param {number | Pattern} q q factor + * @synonyms bpq * @example * s("bd sd").bandf(500).bandq("<0 1 2 3>") * */ ['f', 'bandq', 'a pattern of anumbers from 0 to 1. Sets the q-factor of the band-pass filter.'], + ['f', 'bpq', ''], /** * a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample. * @@ -282,53 +286,50 @@ const generic_params = [ * * @name cutoff * @param {number | Pattern} frequency audible between 0 and 20000 + * @synonyms lpf * @example * s("bd sd,hh*3").cutoff("<4000 2000 1000 500 200 100>") * */ - // TODO: add lpf synonym ['f', 'cutoff', 'a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter.'], + ['f', 'lpf'], /** * Applies the cutoff frequency of the high-pass filter. * * @name hcutoff * @param {number | Pattern} frequency audible between 0 and 20000 + * @synonyms hpf * @example * s("bd sd,hh*4").hcutoff("<4000 2000 1000 500 200 100>") * */ - // TODO: add hpf synonym - [ - 'f', - 'hcutoff', - 'a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. Also has alias @hpf@', - ], + ['f', 'hcutoff', ''], + ['f', 'hpf', ''], /** * Applies the resonance of the high-pass filter. * * @name hresonance * @param {number | Pattern} q resonance factor between 0 and 50 + * @synonyms hpq * @example * s("bd sd,hh*4").hcutoff(2000).hresonance("<0 10 20 30>") * */ - [ - 'f', - 'hresonance', - 'a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. Has alias @hpq@', - ], + ['f', 'hpq', ''], + ['f', 'hresonance', ''], // TODO: add hpq synonym /** * Applies the cutoff frequency of the low-pass filter. * * @name resonance * @param {number | Pattern} q resonance factor between 0 and 50 + * @synonyms lpq * @example * s("bd sd,hh*4").cutoff(2000).resonance("<0 10 20 30>") * */ - ['f', 'resonance', 'a pattern of numbers from 0 to 1. Specifies the resonance of the low-pass filter.'], - // TODO: add lpq synonym? + ['f', 'lpq'], + ['f', 'resonance', ''], /** * DJ filter, below 0.5 is low pass filter, above is high pass filter. * diff --git a/packages/webaudio/webaudio.mjs b/packages/webaudio/webaudio.mjs index 4cac9083..11eb170b 100644 --- a/packages/webaudio/webaudio.mjs +++ b/packages/webaudio/webaudio.mjs @@ -211,12 +211,22 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => { n = 0, note, gain = 0.8, - cutoff, - resonance = 1, - hcutoff, - hresonance = 1, - bandf, - bandq = 1, + // low pass + lpf, + cutoff = lpf, + lpq = 1, + resonance = lpq, + // high pass + hpf, + hcutoff = hpf, + hpq = 1, + hresonance = hpq, + // band pass + bpf, + bandf = bpf, + bpq = 1, + bandq = bpq, + // coarse, crush, shape, diff --git a/website/src/pages/learn/strudel-vs-tidal.mdx b/website/src/pages/learn/strudel-vs-tidal.mdx index 5808fc5f..507286c9 100644 --- a/website/src/pages/learn/strudel-vs-tidal.mdx +++ b/website/src/pages/learn/strudel-vs-tidal.mdx @@ -102,4 +102,4 @@ it aims to provide a standalone live coding environment that runs entirely in th ### Audio Effects Many of SuperDirt's effects have been reimplemented in Strudel, using the Web Audio API. -You can find a (not totally complete) [list of available effects here](./learn/effects). +You can find a [list of available effects here](./learn/effects). From dbb84ef129d60e94b45296988d49273413ce8ef7 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 21:56:17 +0100 Subject: [PATCH 5/6] write more tidal comparison --- website/src/docs/docs.css | 24 ++++++------ website/src/pages/learn/strudel-vs-tidal.mdx | 41 ++++++++++++++++++++ 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/website/src/docs/docs.css b/website/src/docs/docs.css index 4ca17c9f..ed75ecef 100644 --- a/website/src/docs/docs.css +++ b/website/src/docs/docs.css @@ -1,9 +1,9 @@ -h1::before, -h2::before, -h3::before, -h4::before, -h5::before, -h6::before { +.prose h1::before, +.prose h2::before, +.prose h3::before, +.prose h4::before, +.prose h5::before, +.prose h6::before { display: block; content: ' '; margin-top: -70px; @@ -13,12 +13,12 @@ h6::before { position: relative; } -h1:hover .icon-link, -h2:hover .icon-link, -h3:hover .icon-link, -h4:hover .icon-link, -h5:hover .icon-link, -h6:hover .icon-link, +.prose h1:hover .icon-link, +.prose h2:hover .icon-link, +.prose h3:hover .icon-link, +.prose h4:hover .icon-link, +.prose h5:hover .icon-link, +.prose h6:hover .icon-link, .icon.icon-link:hover { visibility: visible; } diff --git a/website/src/pages/learn/strudel-vs-tidal.mdx b/website/src/pages/learn/strudel-vs-tidal.mdx index 507286c9..daf79b9b 100644 --- a/website/src/pages/learn/strudel-vs-tidal.mdx +++ b/website/src/pages/learn/strudel-vs-tidal.mdx @@ -103,3 +103,44 @@ it aims to provide a standalone live coding environment that runs entirely in th Many of SuperDirt's effects have been reimplemented in Strudel, using the Web Audio API. You can find a [list of available effects here](./learn/effects). + +### Sampler + +Strudel's sampler supports [a subset](http://127.0.0.1:3000/learn/samples) of Superdirt's sampler. +Also, samples are always loaded from a URL rather than from the disk, although [that might be possible in the future](https://github.com/tidalcycles/strudel/issues/118). + +## Evaluation + +The Strudel REPL does not support [block based evaluation](https://github.com/tidalcycles/strudel/issues/34) yet. +You can use the following "workaround" to create multiple patterns that can be turned on and off: + +```txt +let a = note("c a f e") + +let b = s("bd sd") + +stack( + a, + // b +) +``` + +Alternatively, you could write everything as one `stack` and use `.hush()` to silence a pattern: + +```txt +stack( + note("c a f e"), + s("bd sd").hush() +) +``` + +Note that strudel will always use the last statement in your code as the pattern for querying + +## Tempo + +Strudels tempo is 1 cycle per second, while tidal defaults to `0.5625`. +You can get the same tempo as tidal with: + +```txt +note("c a f e").fast(.5625); +``` From 39923565170d2ec5f721ecd980c42388fc4dec44 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 6 Jan 2023 21:58:35 +0100 Subject: [PATCH 6/6] casing --- website/src/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/config.ts b/website/src/config.ts index 8ca153b4..088782f1 100644 --- a/website/src/config.ts +++ b/website/src/config.ts @@ -48,10 +48,10 @@ export const SIDEBAR: Sidebar = { { text: 'Notes', link: 'learn/notes' }, { text: 'Sounds', link: 'learn/sounds' }, { text: 'Coding syntax', link: 'learn/code' }, - { text: 'Mini-notation', link: 'learn/mini-notation' }, + { text: 'Mini-Notation', link: 'learn/mini-notation' }, { text: 'Samples', link: 'learn/samples' }, { text: 'Synths', link: 'learn/synths' }, - { text: 'Audio effects', link: 'learn/effects' }, + { text: 'Audio Effects', link: 'learn/effects' }, { text: 'Functions', link: 'learn/functions' }, { text: 'Signals', link: 'learn/signals' }, { text: 'Tonal', link: 'learn/tonal' },