Fix wchooseCycles not picking the whole pattern (#1061)

This commit is contained in:
Alexandre G.-Raymond 2024-04-21 11:03:55 +02:00 committed by GitHub
parent 64cc8caeec
commit a194180130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 4 deletions

View file

@ -486,8 +486,10 @@ export const wchoose = (...pairs) => wchooseWith(rand, ...pairs);
* @returns {Pattern}
* @example
* wchooseCycles(["bd",10], ["hh",1], ["sd",1]).s().fast(8)
* @example
* wchooseCycles(["bd bd bd",5], ["hh hh hh",3], ["sd sd sd",1]).fast(4).s()
*/
export const wchooseCycles = (...pairs) => _wchooseWith(rand, ...pairs).innerJoin();
export const wchooseCycles = (...pairs) => _wchooseWith(rand.segment(1), ...pairs).innerJoin();
export const wrandcat = wchooseCycles;