From 4df2cc30867b5ad4c4cf602028654768c8d4b3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=BD=C3=A1ra?= Date: Mon, 3 Nov 2025 22:03:39 +0100 Subject: [PATCH] added docs for spaces in scale names --- packages/tonal/tonal.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/tonal/tonal.mjs b/packages/tonal/tonal.mjs index 0dc468b20..427a66f4c 100644 --- a/packages/tonal/tonal.mjs +++ b/packages/tonal/tonal.mjs @@ -229,6 +229,9 @@ function _getNearestScaleNote(scaleName, note, preferHigher = true) { * * A scale consists of a root note (e.g. `c4`, `c`, `f#`, `bb4`) followed by semicolon (':') and then a [scale type](https://github.com/tonaljs/tonal/blob/main/packages/scale-type/data.ts). * + * The scale name must be written without spaces (because it would be interpreted as a multi-step pattern otherwise). + * If your scale name includes spaces, replace them with colons. + * * The root note defaults to octave 3, if no octave number is given. * * @name scale @@ -250,6 +253,8 @@ function _getNearestScaleNote(scaleName, note, preferHigher = true) { * .s("piano") * @example * note("C1*16").transpose(irand(36)).scale('Cb2 major').scaleTranspose(3) + * @example + * n("[0 0] [1 2] [3 4] [5 6]").scale("C:major:blues") */ export const scale = register( 'scale',