Overall impression of your edit: I love it.Dave Keenan wrote: ↑Mon Aug 17, 2020 10:51 pm Good work. Thanks. Here's my edit so far. I haven't got to the development section yet, but it looks pretty good.
Or perhaps you noticed that I had made no attempt myself to represent the 5-roughening of `n/d` in the formula for N2D3P9...You will see that I changed my mind and decided, for pedagogical purposes, to describe the n≥d requirement as outside the N2D3P9 function.
I can't see any good way to do without majorly clouding the more important concepts. I expect you tried and failed as well.
I think it's fine to describe it as outside N2D3P9's formula. That's far from a strict loss. The write-up will now agree with the code.
I know it's a joke, but I nonetheless salute your hiliting work here.N2D3P9 or Entoo-Deethree-Peenine, is a fictional character in the Star Wars franchise. In an alternative timeline, the young Anakin Skywalker assembles the droid N2D3P9 from the parts of three other droids: R2D2, C3P0 and NR-N99. Only joking.
I agree with focusing on it in terms of Sagittal, rather than how I had put it, "for a JI microtonal notation system" (my italics). I wasn't too confident about this bit in the first place, since it felt unlikely that anyone else would ever actually use N2D3P9 to help them design their own JI notation. And why would they, if Sagittal already has them covered?N2D3P9 is a mathematical function which was developed to help in designing the Sagittal microtonal notation. Given a pitch ratio n/d, N2D3P9 estimates its rank in popularity among all rational pitches in musical use. A low value of N2D3P9 indicates that the ratio is used often, and so should have a simple accidental symbol, while a high value indicates that the ratio is used rarely and so can have a more complex symbol if necessary. The real reason for its name will become obvious when we describe how to calculate it.
Putting the concepts of popularity and notational simplicity together right away in the third sentence, rather than one after another in two separate sentences as I did, is a marked improvement in clarity from my version.
My only concern here is that the "the real reason for its name will become obvious when we describe how to calculate it" sentence feels a tad informal compared to the rest. And I don't think the word "real" is right, since no reason for its name has been addressed at all yet. I might instead write "Its name is taken from key components of its formula, which will be described in detail later."
This mini-lesson in microtonal notation system design is excellent. I just can't say enough good things about it. You're the man now, dog.Because factors of 2 and 3 in pitch ratios are already notated by moving along the chain of fifths (... B♭♭ F♭ C♭ G♭ D♭ A♭ E♭ B♭ F C G D A E B F♯ C♯ G♯ D♯ A♯ E♯ B♯ Fx ...) and by changing octaves, N2D3P9 only operates on ratios that have had their factors of 2 and 3 removed. For example, there are various numbers of factors of 2 and 3 in the following ratios: 16/15, 10/9, 6/5, 5/4, 27/20, 45/32, 64/45, 40/27, 8/5, 5/3, 9/5, 15/8, but when their factors of 2 and 3 are removed, they all reduce to 1/5 or 5/1, and so they can all be notated using the same microtonal accidental, pointing either up or down, combined with different letters and sharps or flats. We say that 1/5 or 5/1 is the "2,3-reduced" or "5-rough" form of these pitch ratios.
Because 1/5 and 5/1 use the same accidental pointing either up or down, and because N2D3P9 only operates on ratios whose numerator is larger than their denominator, 5/1 can represent this entire equivalence class for the purpose of notation design.
I think putting explanations of the submetrics first is a great idea.Formula
Before describing how to calculate N2D3P9, we describe two simpler functions that are used in calculating it.
We call the first one "copfr", which stands for "Count Of Prime Factors with Repeats". It applies to any positive integer. For example 175 has the prime factorisation 5 x 5 x 7, which has 3 factors, so copfr(175) = 3. copfr(1) = 0. It is also called the "big omega" function, `Ω`.
The second is "prime-limit", which is also known as "gpf", which stands for greatest prime factor. Prime-limit(175) = 7. Normally, Prime-limit(1) = 1, but because we are dealing with 2,3-reduced or 5-rough numbers, we take prime-limit(1) to be 3, although this does not alter the ranking of ratios by N2D3P9.
I also agree that re-ordering each submetric's list of multiple names such that the official mathematical name comes second, while the more pedagogically accessible name comes first, is better than how I had it. Thanks.
The prime-limit(1) = 3 bit I addressed in my previous reply. We'll see how that plays out and then update here accordingly.
I would just insert something like "So the formula for N2D3P9(`n`/`d`) is:" right before dropping the formula.
I really like putting this version of the formula first, and working up to the condensed one. Great call.$$\text{N2D3P9}(n/d)=\frac{n}{2^{\text{copfr}(n)}}×\frac{d}{3^{\text{copfr}(d)}}×\frac{\text{prime-limit}(nd)}{9} $$
$$\text{where }n\text{ and }d\text{ are 5-rough positive integers and }n≥d$$
Note that where
\(n = 5^{n_5}×7^{n_7}×11^{n_{11}}×...\)
we have
\(2^{\text{copfr}(n)}=2^{n_5}×2^{n_7}×2^{n_{11}}×...\)
and so
\(\frac{n}{2^{\text{copfr}(n)}}=(\frac{5}{2})^{n_5}×(\frac{7}{2})^{n_7}×(\frac{11}{2})^{n_{11}}×...\)
and similarly
\(\frac{d}{3^{\text{copfr}(d)}}=(\frac{5}{3})^{d_5}×(\frac{7}{3})^{d_7}×(\frac{11}{3})^{d_{11}}×...\)
I also notice and approve of the change to use the pedagogically accessible names (copfr and prime-limit) in the first part and the official mathematical names (Ω and gpf) in the second part.
Using `n`/`d` rather than ever bringing `r` into it is an improvement too.
And one-lining your explanatory breakdowns is a big aid in following it. Those were already amazingly helpful but you found a way to improve them.
Would you mind if we returned the example I gave of this feature to the write-up, here? So just append the sentence "For example, N2D3P9(80/77) ≈ 39, suggesting that approximately 38 other undirected 5-rough ratios exist which are more popularly used than 77/5."The division by 9 does not affect the ranking, but it has the effect that there are approximately `N` 5-rough ratios with `\text{N2D3P9}≤N`.
Woo! This is so exciting to see coming together like this.