char-slop/chordpad.vibed.software
git clone https://git.t4t.associates/char-slop/chordpad.vibed.software
844055b
main
1import { type Analysis , origin } from "../theory/analysis.ts" ; 2 3/** the class that colours a chord by where it comes from, relative to the key */ 4export function originClass ( a :Analysis | undefined ) :string { 5const from = a && origin ( a ); 6if ( from === "home" || from === "sharp" || from === "flat" || from === "inverse" ) 7return `on- ${ from } ` ; 8return from ?`from- ${ from } ` :a ?"chromatic" :"" ; 9}