From e9feaaeea0268878f80f67c27f81601edce4e9c9 Mon Sep 17 00:00:00 2001 From: JulienH2000 Date: Mon, 25 Sep 2023 14:12:40 +0200 Subject: [PATCH 1/2] fixed scaleArp Doc --- src/documentation/patterns.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documentation/patterns.ts b/src/documentation/patterns.ts index 2fc8ea1..af9c715 100644 --- a/src/documentation/patterns.ts +++ b/src/documentation/patterns.ts @@ -185,13 +185,13 @@ beat(1)::snd('sine').sustain(0.1).freq([100,100,100,100,200].unique().beat()).ou true )} -- scale(scale: string, mask: number): extrapolate a custom-masked scale from each list elements. [0].scale("major", 3) returns [0,2,4]. You can use western scale names like (Major, Minor, Minor pentatonic ...) or [zeitler](https://ianring.com/musictheory/scales/traditions/zeitler) scale names. Alternatively you can also use the integers as used by Ian Ring in his [study of scales](https://ianring.com/musictheory/scales/). +- scaleArp(scale: string, mask: number): extrapolate a custom-masked scale from each list elements. [0].scale("major", 3) returns [0,2,4]. You can use western scale names like (Major, Minor, Minor pentatonic ...) or [zeitler](https://ianring.com/musictheory/scales/traditions/zeitler) scale names. Alternatively you can also use the integers as used by Ian Ring in his [study of scales](https://ianring.com/musictheory/scales/). ${makeExample( "Extrapolate a 3-elements Mixolydian scale from 2 notes", ` beat(1) :: snd('gtr') - .note([0,5].scale("mixolydian", 3).beat() + 50) + .note([0,5].scaleArp("mixolydian", 3).beat() + 50) .out() `, true From a11a4582f207aef7156f6e2b641ac1669a27aafa Mon Sep 17 00:00:00 2001 From: JulienH2000 Date: Tue, 26 Sep 2023 21:46:58 +0200 Subject: [PATCH 2/2] added scale doc --- src/documentation/patterns.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/documentation/patterns.ts b/src/documentation/patterns.ts index af9c715..cf50083 100644 --- a/src/documentation/patterns.ts +++ b/src/documentation/patterns.ts @@ -185,13 +185,25 @@ beat(1)::snd('sine').sustain(0.1).freq([100,100,100,100,200].unique().beat()).ou true )} -- scaleArp(scale: string, mask: number): extrapolate a custom-masked scale from each list elements. [0].scale("major", 3) returns [0,2,4]. You can use western scale names like (Major, Minor, Minor pentatonic ...) or [zeitler](https://ianring.com/musictheory/scales/traditions/zeitler) scale names. Alternatively you can also use the integers as used by Ian Ring in his [study of scales](https://ianring.com/musictheory/scales/). + - scale(scale: string, base note: number): Map each element of the list to the closest note of the slected scale. [0, 2, 3, 5 ].scale("major", 50) returns [50, 52, 54, 55]. You can use western scale names like (Major, Minor, Minor pentatonic ...) or [zeitler](https://ianring.com/musictheory/scales/traditions/zeitler) scale names. Alternatively you can also use the integers as used by Ian Ring in his [study of scales](https://ianring.com/musictheory/scales/). + +${makeExample( + "Mapping the note array to the E3 major scale", + ` +beat(1) :: snd('gtr') + .note([0, 5, 2, 1, 7].scale("Major", 52).beat()) + .out() +`, + true +)} + +- scaleArp(scale: string, mask: number): extrapolate a custom-masked scale from each list elements. [0].scale("major", 3) returns [0,2,4]. scaleArp supports the same scales as scale. ${makeExample( "Extrapolate a 3-elements Mixolydian scale from 2 notes", ` beat(1) :: snd('gtr') - .note([0,5].scaleArp("mixolydian", 3).beat() + 50) + .note([0, 5].scaleArp("mixolydian", 3).beat() + 50) .out() `, true