Build a fretted scale using Tonal's Scale.get() for validation. This populates the scaleType and scaleName fields on the returned FrettedScale, enabling features like relatedScales.
const scale = buildFromScale(get("E Shape"), "A major");scale.scaleType; // => "major"scale.scaleName; // => "A major"// Works with any scale Tonal knows:buildFromScale(get("Pentatonic Box 1"), "A minor pentatonic");buildFromScale(get("3NPS Pattern 1 (Ionian)"), "C dorian");buildFromScale(get("E Shape"), "G mixolydian");
Returns { empty: true } if the scale name is invalid or the tonic is missing.
buildFrettedScale(shape, root) takes a raw root note and doesn't validate against a scale -- scaleType and scaleName will be empty strings. Use buildFromScale when you want full integration with Tonal's scale system.
Find all modal relatives -- scales that share the same pitch classes. This answers questions like "what other scales can I play over these same frets?"
Get all registered shapes compatible with a mode/scale. Optionally filter by system.
// All CAGED shapes that fit A majormodeShapes("A major", "caged");// All shapes (any system) that fit A dorianmodeShapes("A dorian");// All pentatonic shapes that fit A minor pentatonicmodeShapes("A minor pentatonic", "pentatonic");