# Neji

A **neji** or **NEJI** (pronounced /nɛdʒi/ "nedgy"; for "near-equivalent just intonation") is a JI scale that is "nearly-equivalent" to an associated *target scale* (or *target* for short). Nejis are designed with a focus on the harmonic resonance of the pitches in mind w.r.t their foreseen musical use. If the target scale is an edo, a neji is technically also a type of well temperament for that edo.

## History

The concept behind nejis is probably first proposed by George Secor in 2002^{[1]}, where he called it a **quasi-equal rational tuning**.

The idea has also been suggested by Paul Erlich and a feature to generate them has existed in Scala since some time in the 1990's.

The term *neji* was coined by Zhea Erose.

Due to the influence of Zhea Erose who originated the term, the term "neji" has often been used in connection with naming harmodal nejis specifically, with other types of nejis being less common.

## Approaches to neji construction

### In primodality

In Zhea Erose's primodality theory, nejis can be used to explore a prime family (see primodality), while keeping the transposability, scale structures, rank-2 harmonic theory, notation, etc. associated with the target scale (usually an edo). (The neji's denominator need not be prime but primes may be preferred for sake of minimizing lower-complexity intervals and maximizing unique ones specific to that prime. Zhea often uses semiprimes *pq*.) Zhea Erose's theory also deals with modulations between different prime families, and combining different prime families into one scale.

### As harmonic segment subsets

Generalizing from the primodal use case of the term "neji", one might choose any relatively low harmonic series segment, *not necessarily in a way associated with primodality*, and select notes therefrom in order to build a neji with extra concordance.

This distinction is more process-based than formalized (because any JI scale trivially occurs as some (possibly very high) harmonic series segment subset); sometimes the pool of intervals is chosen to be a specific "relatively not large" harmonic series segment before notes are selected from it while other times it is guessed at in some "relatively not large" range and then later revised based on what fits (or other considerations). The "relatively not large" focuses on the following key observation of Zhea's that others have agreed with as a valuable observation in the design of JI scales:

- If you focus on choosing intervals as representing different notes of your target
*without regard*for the growing size of the implied denominator of the scale as a single chord, then the denominator will often grow*rapidly*to absurd numbers,*especially*if you are repeatedly stacking the same interval to reach some of the notes.

Technically, this is a simplification of the observation, as you can take any incomplete harmodal neji and add some intervals that are "awkward" w.r.t the denominator to complete it and thus increase the denominator massively, but the scale will overall likely still sound pretty coherent, *especially* if those intervals simplify w.r.t other intervals of interest to the composer, so it is rather the spirit of the observation that your notes of interest should cohere with each-other within reason and that where they don't should ideally be intentional harmonic tensions in the scale accessible for musical use. This logic also shows why the line between nejis (in the general sense) and **harmodal nejis** (defined below) is even more "fuzzy" than one might initially think.

#### Harmodal nejis

If the neji belongs to a (*relatively not large*) harmonic segment and the target scale has a period equal to some positive integer harmonic (like the octave, tritave or pentave), it is a "harmodal neji" (a contraction of "harmonic modal neji"), meaning primodal nejis are a type of harmodal neji. This period is typically an octave, as that's the most common use case. This term has found use before by Zhea but it should be noted it was proposed as a standard way to resolve an ambiguity in the meaning of the stand-alone term "neji", therefore please see the directly below alternative, which may be preferred for consistency/backwards-compatibility.

#### Nonharmodal nejis

An alternative to using the term "harmodal nejis" is to *assume* that a "neji" is harmodal *by default*, and instead specify that a neji is "*nonharmodal*" only when necessary, in order to preserve the colloquial usage of the term "neji". This is consistent with the sentiment that there does not need to be a new term "harmodal neji", while retaining clarity.

### Detempering

A more (JI subgroup) lattice-based approach is detempering. Detempering entails that the neji has the property of being epimorphic (obeys the appropriate mapping logic) with respect to a regular temperament for a tempered scale, equal-division or otherwise.

Importantly and nontrivially, detempering is stricter than merely requiring that the target scale *has* a scale logic (that is, a mapping). Even in those cases where the target scale has a mapping, a neji might still approximate it without following its associated mapping. A detempering, however, must *follow* the mapping.

### Building edo nejis

It's possible to create a working edo neji by simply approximating an edo as closely as possible with selected harmonics from a mode. However, it is sometimes preferable to build particular aesthetic choices into such a neji. One such common choice is to focus on a few intervals in the edo being "nejified" which are of particular interest. The root harmonic is then selected to approximate these intervals of interest as well as possible; the remaining harmonics to fill in the rest of the edo are chosen based on their ability to fit well with the existing notes.