Actually, coverting between the ratios and semitones has alread been done,
as there's a simple set of log and mround functions that do it. Have a look
in the OLL repository under notation-tools and you should find the .ily
files.

Cheers,

A

On Sun, Dec 13, 2015 at 7:51 AM, <msk...@ansuz.sooke.bc.ca> wrote:

> On Sat, 12 Dec 2015, N. Andrew Walsh wrote:
> > accidentals as needed. I suppose, rather than having Lily/Scheme
> calculate
> > prime factors on the fly at runtime, it would be easier to have a lookup
> > table of the prime factorization for each integer up to a certain limit
> (but
> > that would end up being very high, so maybe not). That's a computational
> > problem for further down the road, though.
>
> For numbers of 32 bits or so, doing prime factorization by simple-minded
> trial and error on a present-day computer is cheaper than most people
> realize.  It's a tight loop that fits in cache; the arithmetic may
> actually be faster than a lookup table in main memory, and it's at least
> unlikely to be prohibitively slow.
>
> I think a trickier computational problem may be converting between
> LilyPond's "rational number of semitones" and just-intonation's "rational
> ratio of frequencies" ways to express pitch.  Because of the log function
> in between, in general any number that has a representation on one of
> those scales will have no exact representation on the other, and you're
> forced to do some kind of rounding, or maybe abandon LilyPond's pitch
> scheme for something else.  Have you decided how you want to deal with
> this issue yet?
>
> --
> Matthew Skala
> msk...@ansuz.sooke.bc.ca                 People before principles.
> http://ansuz.sooke.bc.ca/
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to