fifths_to_note
fifths_to_note(
unison,fifths,unicode?):string
Defined in: packages/pleco-xa/src/scripts/xa-notation.js:920
Calculate the note name for a given number of perfect fifths
Starting from a given unison note, computes the note name that is
fifths perfect fifths away.
Parameters
Section titled “Parameters”unison
Section titled “unison”string
The starting note (e.g., ‘C’)
fifths
Section titled “fifths”number
Number of fifths (positive for up, negative for down)
unicode?
Section titled “unicode?”boolean = true
Use unicode symbols (default: true)
Returns
Section titled “Returns”string
The resulting note name
Example
Section titled “Example”fifths_to_note('C', 1) // 'G' (up one fifth)fifths_to_note('C', -1) // 'F' (down one fifth)fifths_to_note('C', 7, false) // 'C#' (7 fifths = one sharp on the tonic letter)fifths_to_note('B', 1, false) // 'F#' (crossing the B→F♯ boundary adds the sharp)fifths_to_note('G', -3, false)// 'Bb' (docstring golden)