Skip to content

hz_to_fjs

hz_to_fjs(frequencies, fmin?, unison?, unicode?): string | string[]

Defined in: packages/pleco-xa/src/scripts/xa-notation.js:377

Convert one or more frequencies (in Hz) to Functional Just System (FJS) notation

FJS is a notation system for just intonation that extends conventional staff notation. This function identifies the just intonation interval that best matches each frequency.

number | number[]

Frequency value(s) in Hz

number = null

Reference frequency for unison (default: C1 = ~32.7 Hz)

string = 'C'

Unison note name (default: ‘C’)

boolean = true

Use unicode symbols for accidentals (default: true)

string | string[]

FJS notation string(s)

hz_to_fjs(440) // 'A4'
hz_to_fjs(330, 440, 'A') // 'E5^5' (5:3 above A4)
hz_to_fjs([220, 330, 440]) // ['A3', 'E4^5', 'A4']