From: "N. Andrew Walsh"<n.andrew.wa...@gmail.com>
Converting cents to ratios only makes even a bit of sense if you have some preexisting music in some temperament, which you then want to approximate in just intonation. But even that isn't really something that would be served by calculation from cents and not simply determining yourself what ratios you want (because, at base, deciding which ratio you want to have is entirely arbitrary). Now, if you have some closed scale, it's simply a matter of figuring out the cents values for the notes in the scale, and then rounding your preexisting notes to the nearest one.
It makes sense because at the point you choose the accidental, the deviation from the unaltered pitch is the only information you have — unless you have some other mechanism for passing it along. But what some of the discussion implies is that you could keep a global hash table of the alteration (which happens to be rational and so unique and hashable) chosen for a given ratio input. That would work as long as the input is always JI, and that's a perfectly reasonable assumption. Transposition would still have some wrinkles, though.
Using an equal temperament to set the accidentals is problematic even if you allow Sagittal-style wraparound. Sometimes errors will accumulate so that the correct spelling doesn't match the nearest approximation of a complex ratio to the equal temperament. The simple solution is to convert each ratio to the temperament before they get combined, but that would mean the MIDI ended up equally tempered. The next stage is to use a different equal temperament for the score and MIDI rendering. To guarantee the correct spelling you would need to do factorization. That can be done in Scheme but so far I haven't done it.
But if you are using any kind of temperament at all, you're dealing at base with irrational numbers, and no computation is going to provide meaningful results unless you specify beforehand what your limits are (in which case you're specifying a closed scale, and it's thus much simpler to do the calculations in the other direction). For example, here are all the ratios in a very basic scale that fall within a quartertone of 600 cents: 11/8, 18/13, 7/5, 17/12, 10/7, 23/16, 13/9, and 16/11. Which one of those counts as a "tritone" for your scale depends almost entirely on how simple you want to keep the ratios (and if simplicity isn't necessarily your goal, there's also 352/256, 89/64, 179/128, 359/256, 181/128, 367/256, and 373/256; all of those are pure overtones).
It's a lot more complicated than that. While you could write an adaptive tuning engine in Lilypond, that isn't what we're discussing here, so let's drop it.
Graham _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user