From 67bef933bedf5d0fe6d335bad982c305fcb99654 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 23 Apr 2022 20:38:51 +0200 Subject: [PATCH] migrate tutorial cat -> seq --- repl/src/tutorial/tutorial.mdx | 52 ++++++++++++++++------------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/repl/src/tutorial/tutorial.mdx b/repl/src/tutorial/tutorial.mdx index 117695c9..38ff8655 100644 --- a/repl/src/tutorial/tutorial.mdx +++ b/repl/src/tutorial/tutorial.mdx @@ -15,7 +15,8 @@ The best place to actually make music with Strudel is the [Strudel REPL](https:/ To get a taste of what Strudel can do, check out this track: - + An important difference to the mini notation: For sharp notes, the letter "s" is used instead of "#", because JavaScript does not support "#" in a variable name. The above is the same as: - + Using strings, you can also use "#". @@ -220,38 +221,35 @@ Most of the time, you won't need that function as input values of pattern creati ### cat(...values) -The given items are con**cat**enated spread evenly over one cycle: +The given items are con**cat**enated, where each one takes one cycle: - + -The function **fastcat** does the same as **cat**. +- Square brackets will create a subsequence +- The function **slowcat** does the same as **cat**. -### sequence(...values) +### seq(...values) -Like **cat**, but allows nesting with arrays: +Like **cat**, but the items are crammed into one cycle: - + + +- Synonyms: **fastcat**, **sequence** ### stack(...values) The given items are played at the same time at the same length: - + -### slowcat(...values) - -Like cat, but each item has the length of one cycle: - - - - +- Square Brackets will create a subsequence ### Nesting functions You can nest functions inside one another: + You can also use the shorthand **pr** instead of **polyrhythm**. @@ -295,7 +293,7 @@ The following functions modify a pattern. Like "/" in mini notation, **slow** will slow down a pattern over the given number of cycles: - + The same in mini notation: @@ -305,19 +303,19 @@ The same in mini notation: Like "\*" in mini notation, **fast** will play a pattern times the given number in one cycle: - + ### early(cycles) With early, you can nudge a pattern to start earlier in time: - + ### late(cycles) Like early, but in the other direction: - + @@ -325,19 +323,19 @@ Like early, but in the other direction: Will reverse the pattern: - + ### every(n, func) Will apply the given function every n cycles: - + Note that late is called directly. This is a shortcut for: - x.late(0.5)))`} /> + x.late(0.5)))`} /> @@ -612,7 +610,7 @@ Turns numbers into notes in the scale (zero indexed). Also sets scale for other Note that the scale root is octaved here. You can also omit the octave, then index zero will default to octave 3.