librosa.interval_to_fjs(interval, *, unison='C', tolerance=1.0317460317460319, unicode=True)[source]

Convert an interval to Functional Just System (FJS) notation.

See for a thorough overview of the FJS notation system, and the examples below.

FJS conversion works by identifying a Pythagorean interval which is within a specified tolerance of the target interval, which provides the core note name. If the interval is derived from ratios other than perfect fifths, then the remaining factors are encoded as superscripts for otonal (increasing) intervals and subscripts for utonal (decreasing) intervals.

intervalfloat > 0 or iterable of floats

A (just) interval to notate in FJS.


The name of the unison note (corresponding to interval=1).


The tolerance threshold for identifying the core note name.


If True (default), use Unicode symbols (♯𝄪♭𝄫)for accidentals, and superscripts/subscripts for otonal and utonal accidentals.

If False, accidentals will be encoded as low-order ASCII representations:

♯ -> #, 𝄪 -> ##, ♭ -> b, 𝄫 -> bb

Otonal and utonal accidentals will be denoted by ^## and _## respectively (see examples below).

note_fjsstr or np.ndarray(dtype=str)

The interval(s) relative to the given unison in FJS notation.


If the provided interval is not positive

If the provided interval cannot be identified with a just intonation prime factorization.


Pythagorean intervals appear as expected, with no otonal or utonal extensions:

>>> librosa.interval_to_fjs(3/2, unison='C')
>>> librosa.interval_to_fjs(4/3, unison='F')

A ptolemaic major third will appear with an otonal ‘5’:

>>> librosa.interval_to_fjs(5/4, unison='A')

And a ptolemaic minor third will appear with utonal ‘5’:

>>> librosa.interval_to_fjs(6/5, unison='A')

More complex intervals will have compound accidentals. For example:

>>> librosa.interval_to_fjs(25/14, unison='F#')
>>> librosa.interval_to_fjs(25/14, unison='F#', unicode=False)

Array inputs are also supported:

>>> librosa.interval_to_fjs([3/2, 4/3, 5/3])
array(['G', 'F', 'A⁵'], dtype='<U2')