Skip to content

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.

string

The starting note (e.g., ‘C’)

number

Number of fifths (positive for up, negative for down)

boolean = true

Use unicode symbols (default: true)

string

The resulting note name

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)