# Step variety

The step variety (or arity) of a scale is the number of distinct step sizes it has. Unary, binary, ternary, and quaternary scales are scales with exactly 1, 2, 3, and 4 step sizes, respectively. An n-ary scale is a scale with exactly n distinct step sizes.

Unary scales are equal tunings. The class of binary scales consists of all MOS scales and every alteration-by-permutation of an MOS scale, but do not include altered MOS scales such as the harmonic minor scale (abstract step pattern: MsMMsLs), which gain additional step sizes from the alteration. Ternary scales are much less well-understood than binary ones, but one well-studied type of ternary scales is the class of generator-offset scales. Most known facts about ternary scales on the wiki can be found on the page rank-3 scale (which is mostly about specifically ternary scales).

## Etymology

The terms binary and ternary are already used in some academic literature in reference to words over an alphabet, in particular to circular words that represent abstract scales; see e.g. Bulgakova, Buzhinsky and Goncharov (2023), "On balanced and abelian properties of circular words over a ternary alphabet". The use of the term arity borrows an existing technical term and generalizes from this use of binary, ternary, and n-ary to refer to the number of letters in an alphabet in combinatorics on words; combinatorics-on-words literature often instead uses "word on n letters" or "alphabet with n letters" in the arbitrary-n case.

The term step variety, coined by Frédéric Gagné, is in analogy with interval variety for the number of distinct interval sizes in each interval class.

## Difference from scale rank

Certain abstract scale theorists in the xen community have taken to using the n-ary terminology in view of the subtlety of the notion of a scale's rank. Examples of this subtlety are:

• Equal tunings contain MOS scales and ternary scales, but the group generated by the step sizes in these tunings of the scales must be rank 1.
• Certain chroma-altered MOS scales, which are contained in the group generated by the period and the generator of the unaltered MOS are ternary. An example is harmonic minor in any non-edo diatonic tuning, a chroma-alteration of the diatonic MOS with step pattern msmmsLs.

The term n-ary disregards the rank of the group generated by the step sizes, although an n-ary scale is still, in a probabilistic sense, generically rank-n (the group generated by the n step sizes Xi > 0, i = 1, ..., n, has rank n, not lower, for almost all choices of Xi, in the same sense that almost all real numbers between 0 and 1 are irrational).

## Mathematical facts

### Counting scales of a given size on a given number of letters

For r ≥ 1, the number of possible patterns (up to rotation) for periodic scales of size nr on r ordered step sizes x1 > x2 > ... > xr is

$\displaystyle{\dfrac{1}{n} \sum_{d\mid n} \phi(d) \sum_{j=1}^r (-1)^{r-j} {r \choose j} j^{n/d}} \\ =\displaystyle{\dfrac{r!}{n} \sum_{d\mid n} \phi(d) S(n/d, r)}$

where $\phi$ is the Euler totient function and $S(n, r)$ is the Stirling number of the second kind which counts ways to partition an n-element set into r distinguished parts.

## List of named ternary scales

The following is a list of (temperament-agnostic) names that have been given to ternary scales. We ignore the exact arrangement of scale words here.