Transposition
transpose(notes, fromRoot, toRoot) shifts a set of notes from one key to another by the semitone distance between the two roots.
Live Playground
Section titled “Live Playground”transpose
transpose(notes: Note[], fromRoot: Note, toRoot: Note): Note[]Transposes a set of notes from one key to another. Always transposes the fixed triad [C, E, G] here - pick the roots to shift it between keys.
Result
D, F#, A