From: "N. Andrew Walsh"<n.andrew.wa...@gmail.com>
To: lilypond-user<lilypond-user@gnu.org>
If you've been watching the OpenLilyLib repository, you'll see that Urs has
been working on a set of tools for rendering music in just intonation. He
(quite modestly) says that it isn't ready for production, but there are
already some impressive things it can do: for one, the interface allows to
input a fraction and get back a nearest-semitone pitch with a deviation in
cents*automatically*, which is something the commercial programs don't
offer in any way (every composer I know who works with JI just inputs text
entries manually for every note, with no change in, for example, MIDI
output for ability to handle transpositions).
I haven't been watching that ... I don't know what it is. But it sounds
similar to my Sagittal support. Latest code here, works for me but
something broken on Windows:
https://bitbucket.org/x31eq/microlily
It's possible to turn off the Sagittal accidentals to get output using
standard accidentals, given essentially the AFMM output. I don't
remember if I ever got that working though. You have to specify the
staff position as well as the ratio.
I'd like to be able to put these into Lily, and Urs tells me it can be done
by calling a draw function to draw a path. I can relatively easily make up
some paths with Inkscape and save them as SVGs, but is there a better way
to do this? The NR describes (here:
http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text#graphic-notation-inside-markup)
the means to include eps files into a markup, which presumably could be
used to replace the accidental.
There are some potential complicating factors here. First, the accidentals
I use change depending on the prime factorization of the ratio involved:
for example, the ratio 9/8 (a type of whole tone) would comprise two of the
symbol for 3 (because "9/8" is really "(3*3)/8" ), which means that Urs'
interface for JI ratios would need an add-on to do prime factorization of
the ratios (which is also computationally intensive, even for relatively
simple numbers) or a means to encode ratios as lists of primes that are
then calculated to return the value in cents (that is, do the process in
reverse, starting from "(3*3)/8" and getting 9/8, which might be easier to
do).
I've thought about this with respect to the Extended Helmholtz-JI
notation, for which there are already fonts that would work with my
system. Generating accidentals from pitches is problematic, and would
really mean generating your gamut in advance, with some implied equal
temperament that doesn't give any ambiguity, and the accidentals would
disappear if you exceed that gamut.
Another idea is for commands to add the accidental glyphs, and also do
the correct pitch shift. I think this was prototyped without the pitch
shifting (so ignoring MIDI output) before I implemented my Sagittal
approach. Where it's problematic to get tuning and display working
together, you can define separate functions for the "midi" and "score"
blocks.
Another idea I had, though, is to shove annotations into the list
describing each note. (I think the new parser makes this easier than it
used to be, because each note in a chord is a list.) You can then run a
function over the whole music block to strip out the annotations, set
the pitch, and override the accidental. You can also apply different
functions to the same music block in the midi and score blocks to make
that approach easier. I did a proof of concept of this, which I can't
find now, but I haven't followed it up.
The advantage here, though, would be this: one of the interesting things
about just intonation is that there is no theoretical limit to what kinds
of ratios you use. You could theoretically have unique signs for all the
primes you want, and then the draw function could build them on the fly.
The accidentals become modular, scaling to whatever level of complexity the
composer wants. Harry Partch writes music that tops out at the 13th
overtone, but La Monte Young has pieces with primes in the upper 300s.
You can also make a font with a fixed level of complexity, and it will
be easier to get working for now. An issue with drawing the glyphs in
is that you have to be sure to inform LilyPond of the correct amount of
space to allow for them.
You could also look at the Extended Helmholtz-Ellis JI set, where the
advantage is that the font already exists. It's on this page, along
with some PDFs explaining it:
http://www.marcsabat.com/
So, List: this is, as I said, a somewhat long-term project, but would any
of you be willing to help me learn/do the programming necessary to develop
a system like this? I also have in mind a more general add-on to the OLL
just-intonation library: I'd like to see a set of different .ily files,
each with different sets of accidentals, which a composer could \include
into the score as needed. For example, I could write the ratios using my
system, or use a system that shows accidentals approximated to the nearest
12th-tone, with cents deviation for more exact tuning (which might be of
more relevance to keyed instruments).
I can send a few hand-drawn mock-ups of the accidentals to show what I
mean; I've been doing them by hand, but I'd really like to see them
engraved.
I have some time to adapt what I've already done to different tuning
systems, but nothing more speculative right now.
Graham
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user