2 added 198 characters in body

Let me give a try for tempered scales. (In a tempered scale, the ratio of frequencies for adjacent halftones is always $2^{1/(12)}$.)

In this case, we want a distance on $\mathbb R/\mathbb Z$ (with corresponding frequencies given by $2^x/2^{\mathbb N}$, invariant under rotations such that $\frac{5}{12}$ is close to $0$ (in $\mathbb R/\mathbb N$). Say we want it to be closer to $0$ than any other element among $\frac{1}{12},\frac{2}{12},\frac{3}{12},\frac{4}{12},\frac{6}{12}$. One possible recipee: Choose strictly positive rationals $\alpha_1,\dots,\alpha_6\in (0,1/12]$ encoding pleasantness of intervals (say $\alpha_5<\alpha_4<\alpha_3<\alpha_2<\alpha_1<\alpha_6$) and set $d(y,x)=d(x,y)=\min(y-x,\alpha_i+\vert y-x-i/12\vert)$ if $y>x$ with $y-x\leq 1/2$.

The graph of the distance function is a symmetric function modelling the skyline of a symmetric island consisting entirely of montains with slope $1$. Pleasant intervals correspond to passes.

Remark: The requirement $\alpha_i\leq 1/12$ is slightly to strong: we need only $\alpha_i\leq \alpha_j+\vert i-j \vert/{12}$.

1

Let me give a try for tempered scales. (In a tempered scale, the ratio of frequencies for adjacent halftones is always $2^{1/(12)}$.)

In this case, we want a distance on $\mathbb R/\mathbb Z$ (with corresponding frequencies given by $2^x/2^{\mathbb N}$, invariant under rotations such that $\frac{5}{12}$ is close to $0$ (in $\mathbb R/\mathbb N$). Say we want it to be closer to $0$ than any other element among $\frac{1}{12},\frac{2}{12},\frac{3}{12},\frac{4}{12},\frac{6}{12}$. One possible recipee: Choose strictly positive rationals $\alpha_1,\dots,\alpha_6\in (0,1/12]$ encoding pleasantness of intervals (say $\alpha_5<\alpha_4<\alpha_3<\alpha_2<\alpha_1<\alpha_6$) and set $d(y,x)=d(x,y)=\min(y-x,\alpha_i+\vert y-x-i/12\vert)$ if $y>x$ with $y-x\leq 1/2$.

Remark: The requirement $\alpha_i\leq 1/12$ is slightly to strong: we need only $\alpha_i\leq \alpha_j+\vert i-j \vert/{12}$.