From 2deafe214a6c060decdeee0e36830b2f3e8972b5 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 07:59:55 +0200 Subject: [PATCH] update loop examples --- packages/core/controls.mjs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index b54170c1..0c166e11 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -299,13 +299,14 @@ const generic_params = [ */ ['end'], /** - * Loops the sample (from `begin` to `end`) the specified number of times. + * Loops the sample. * Note that the tempo of the loop is not synced with the cycle tempo. + * To change the loop region, use loopBegin / loopEnd. * * @name loop - * @param {number | Pattern} times How often the sample is looped + * @param {number | Pattern} on If 1, the sample is looped * @example - * s("bd").loop("<1 2 3 4>").osc() + * s("casio").loop(1) * */ ['loop'], @@ -314,13 +315,11 @@ const generic_params = [ * Note that the loop point must be inbetween `begin` and `end`, and before `loopEnd`! * * @name loopBegin - * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loopb * @example - * s("numbers") - * .loop(1) - * .begin(0).end(1) - * .loopBegin("<0 .25 .5 .75>") + * s("space").loop(1) + * .loopBegin("<0 .125 .25>").scope() */ ['loopBegin', 'loopb'], /** @@ -329,14 +328,11 @@ const generic_params = [ * Note that the loop point must be inbetween `begin` and `end`, and after `loopBegin`! * * @name loopEnd - * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loope * @example - * s("numbers") - * .loop(1) - * .begin(0).end(1) - * .loopBegin("<0 .25 .5 .75>") - * .loopEnd("<0.1 .35 .6 .85>") + * s("space").loop(1) + * .loopEnd("<1 .75 .5 .25>").scope() */ ['loopEnd', 'loope'], /**