Export to GitHub

lilypond - issue #694

Enhancement: easier use of microtone accidentals


Posted on Oct 12, 2008 by Helpful Bear

This suggestion has been discussed several times on our lists, and many ideas have been raised. This is an attempt to gather some of these.

Two ideas prevail:

a- we should have support for smaller intervals than quarter-tones

b- the way microtone accidentals are printed should be more flexible.

a) Micro intervals

Many users have asked about thirdtones, sixthtones etc. accidentals. Ideally, a special property could set the pitch as precisely as 1/100 or 1/180 of a tone.

Han-Wen, 2005: "It shouldn't be hard to write music functions that puts the correct cents setting into each NoteEvent, given a desired scale." http://lists.gnu.org/archive/html/lilypond-user/2005-08/msg00142.html

Han-Wen, 2005: "In my opinion, it would be best if Lily were extended with a generic mechanism for entering and printing microtones, so we can support arbitrary styles." http://lists.gnu.org/archive/html/lilypond-devel/2005-10/msg00014.html

b) Look-and-feel of microtone accidentals

Many users have asked about different ways of printing such accidentals; a request that is particularly popular is about arrowed accidentals.

Orm Finnendahl designed some glyphs: http://lists.gnu.org/archive/html/lilypond-devel/2007-01/msg00478.html

Maximilian Albert made a first implementation draft: http://lists.gnu.org/archive/html/lilypond-devel/2007-02/msg00028.html

... then a more elaborate one: http://lists.gnu.org/archive/html/lilypond-devel/2007-10/msg00067.html

... then he announced a bunch of patches more recently: http://lists.gnu.org/archive/html/lilypond-devel/2008-09/msg00158.html

Many (I mean many) people have expressed their interest in these features, and some of them (to be found in the discussions above) have stated they'd be ready to pay some fee to see them implemented.

Comment #1

Posted on Oct 13, 2008 by Quick Cat

Have you ever looked at the current (2.11) microtonal support? It supports arbitrary fractional tones?

Comment #2

Posted on Oct 13, 2008 by Helpful Bear

Oh, yes indeed. I did a grep for "microtone" but not "microtonal", and I didn't search further enough.

This is good news: it means LilyPond is ready for microtonal musics, spectral music, non-equal temperaments etc.; we'd just need to have more ready-to-use macros, and document it better. I'll look into it.

Comment #3

Posted on Jul 27, 2009 by Helpful Bear

Maximilian has just noted that some of his patches are still pending for approval: http://lists.gnu.org/archive/html/lilypond-devel/2009-07/msg00744.html

Comment #4

Posted on Aug 12, 2009 by Quick Ox

I initiated some discussion of the arrow microtonal notation on the lilypond-user mailing list in April 2009 -- at the time no one mentioned Maximilian's patches or the discussion on the -devel list.

What motivated me was an aspect of arrow quarter-tone notation that isn't actually addressed either by Maximilian's patches or the existing arrow notation in 2.12: the extended enharmonic equivalence that arises where, for example, 'c-quarter-sharp' can be notated as either c-natural-with-arrow-up or c-sharp-with-arrow-down. http://lists.gnu.org/archive/html/lilypond-user/2009-04/msg00139.html

The rough solution I came up with at the time follows a form similar to Maximilian's patches: http://lists.gnu.org/archive/html/lilypond-user/2009-04/msg00649.html

... but it runs into some key difficulties, notably transposition. I suspect Maximilian's patches, as they are, will also face these difficulties.

For an example of such a transposition issue, imagine taking E-sharp-up and transposing it to Bb: you get F-double-sharp-up, which is not only ridiculous but also has no associated glyph.

I wonder if it would be possible to combine Maximilian's approach with mine and resolve both these issues of transposition and enharmonically-equivalent arrow notations?

I'm asking in particular because it seems that my approach is of interest to people -- I've recently exchanged a series of emails with a freelance typesetter working for C. F. Peters for whom my solution, with its complete set of arrow accidentals, proved vital. We have attempted to solve the transposition problem with tags -- different notes for the concert and transposed parts -- but it's an ugly, finnicky way to address an issue that needs a more elegant resolution.

Comment #5

Posted on Aug 12, 2009 by Quick Kangaroo

I am said C.F. Peters freelancer using Josephs accidentals. They work brilliantly for untransposed parts. All thats missing are the details for transposition. I'm contemporary trumpet soloist in Germany, and looking through my literature, there are several way in which composers like to notate microtonality. One is the default way lilypond notates then (backwards flats etc.), the other, more popular is with arrows. For me as a player, I find the arrows much easier to read. Other composers come up with their own way, sometimes using several in combination. backwards flats for quarter-flat, arrows for slightly sharp or flat. Its a complicated issue, but atleast for notation purposes (MIDI asside), one should be free to choose the accidental-style, just as one can choose the NoteHead style. The transposition issue should be easy enough to fix. I gave lilypond a definition for a double-sharp-quartertone-up, and it transposed without a problem (just missing the proper glyph).

In Europe, using microtones has been standard for a long time (the piece I#m currently typesetting is from 1987!!). Lilypond can and should be there with us!

As v.villaneve mentions, people are willing to pay! I'm certainly looking for a way to donate to lilypond.....

Comment #6

Posted on Apr 1, 2010 by Happy Rhino

This has a confusing mixture of doc and enhancement. Actually, I'm not certain that there is any doc work to be done.

Anybody who cares about microtonal should get in touch with our doc team to get that stuff done. Then we'll mark this issues as strictly code enhancement.

Comment #7

Posted on Sep 19, 2010 by Happy Rhino

At some point in GOP, we might assign a new doc person to work on this and figure out what's actually valid or not. As far as I'm concerned, the entire report is invalid, but I'll leave it here until somebody spends half an hour decyphering everything.

Comment #8

Posted on Sep 19, 2010 by Quick Ox

Can you clarify which points you feel are not clear?

My feeling is that it is principally a code issue, not a doc one. Lilypond simply does not support effectively one of the ways of writing microtones -- which is to successively "shade" pitches by adding extra symbols to the accidentals (up/down arrows, +/-, whatever).

The reason it does not support this notation for microtones is because of Lilypond's internal way of representing pitch -- as staff position + alteration.

That clashes with a notation like e.g. the arrow notation for quarter-tones, where the same alteration (+1/4) can be notated with two different accidentals: natural-with-arrow-up or sharp-with-arrow-down.

I developed a 'cheat' solution that used subtly different alterations to correspond to these different accidentals, but it's far from ideal. A better approach would likely be to have a notation like

 \qUp c \qDown cs

... which modifies the accidental contextually.

Anyway, bottom line is, this needs code solution first and then documentation one.

Comment #9

Posted on Sep 19, 2010 by Happy Rhino

What's not clear... - there's some patch(s), but it's not clear if it applies to current git, or is waiting for revision from the author, or waiting for review. - lilypond already supports arbitrary fractional tones. Notation 1.1.1 Non-Western note names and accidentals, in the 2.13 docs. So what's missing? Just the graphical pointed arrow? - to reduce confusion from developers and bug squad people, we only want "item" per issue. This one claims to be about documentation, but the original reporter (Valentin) didn't know about our arbitrary-fraction-microtones, and there's this patch, and now you're talking about "code solution first"...

We need somebody who cares about microtonal support (you?) to divide this up. - if anything is wrong with our fundamental support for arbitrary fractional microtones, make a minimal bug report and send it to bug-lilypond. The Bug Squad should add a SEPARATE issue for that one. - if the fundamental definitions of microtones are fine, but you want a different display mechanism (which is probably true; the Turkish notation doesn't look familiar to me), then make a minimal bug report and send it to bug-lilypond. The bug squad should add a separate issue for that graphical enhancement request. - if the patch is still good, then send it to lilypond-devel, and if nobody replies, the patch manager will add a separate issue blah blah. - if there's anything else, then send a separate minimal bug report, and blah blah.

Finally, close this issue because it's way too confusing for me. Yes, I may be an idiot, but given that it's an old issue and nobody else has looked into it, I think you need to deal with the idiot. I know this makes extra administrative work (maybe 30 minutes in total?) for people who care about microtonal stuff, but IMHO that's the best chance to move forward with this.

Comment #10

Posted on Sep 19, 2010 by Quick Ox

Looking at the patches, they don't address the fundamental problem. I don't know whether they really matter at this stage.

The problem is not the support for arbitrary fractional alterations of a pitch per se. The problem is that Lilypond permits only one possible accidental for any given alteration of a pitch, whereas some microtonal notations (like the arrowed notation) can have two different accidentals for the same pitch alteration.

I'll try and write up an adequate description of the problems/concerns for the -devel list. I did try and do this some time ago at: http://lists.gnu.org/archive/html/lilypond-user/2009-04/msg00139.html

... but the discussion/feedback at the time didn't lead to an adequate solution.

Comment #11

Posted on Dec 6, 2011 by Quick Ox

Most of this seems be implemented. In version 2.12,

a- we should have support for smaller intervals than quarter-tones Makam 1/9 tones http://lsr.dsi.unimi.it/LSR/Item?id=585 Syntonic commas http://lsr.dsi.unimi.it/LSR/Item?id=786

b- the way microtone accidentals are printed should be more flexible. Arrowed accidentals http://lsr.dsi.unimi.it/LSR/Item?id=784 are available, among other options. The glyph-name-alist can store whatever symbols you like from the LilyPond font, including duplicates, if for example you want to substitute sharp-arrowup for any double-sharp-arrowdown that might appear in transposition for parts.

Version 2.14 addresses the item from comment 4.

taking E-sharp-up and transposing it [for Bb clarinet]: you get F-double-sharp-up, which is [correct] but has no associated glyph.

After the fix to issue 1009 Lilypond prints a warning and converts, in the default tuning, F-double-sharp-up to G-natural-up.

The conversion is done correctly in customized tuning as well. In http://lsr.dsi.unimi.it/LSR/Item?id=785 or http://lsr.dsi.unimi.it/LSR/Item?id=752 you can choose 31-ET, where aisis is one step lower than b. Then if you \transpose b aisis, LilyPond 2.14 will transpose a gis to fisisis, warn that she is substituting an altered G, and will output G-half-sharp if there is a glyph for SHARP/2 on the list.

We could also use or adapt \naturalizeMusic from http://lsr.dsi.unimi.it/LSR/Item?id=266 but so far I have not found a situation where it is needed.

The request from comment 8 for different internals has its own issue 1278.

The remaining difficulty is that rebuilding the note-names and alterations lists for each microtonal system requires a lot of work, and can be frustrating if you are not familiar with Scheme.

I think we want a couple more include-able files like the existing 'makam.ly' to set up other common microtonal systems. I made snippets 784-786 to get started.

Comment #12

Posted on Dec 8, 2011 by Quick Kangaroo

I'm wondering if this is a 'documentation' issue or not. We don't normally (IFAICT) make trackers for LSR snippets. So I'm finding it hard to pick through this tracker from a 'Documentation' perspective - i.e. do I need to add a snippet, if so what and where? or do I need to add an @lilypond somewhere or perhaps a para or two.

Can someone enlighten me or change the label?

Thanks

Comment #13

Posted on Dec 11, 2011 by Quick Ox

Yes, this is 80% a documentation issue. The new snippets were originally intended for these documentation sections: NR 2.8.1 Microtonal Notation http://lsr.dsi.unimi.it/LSR/Item?id=784

NR 2.8.1 Contemporary Key Signatures and Harmony http://lsr.dsi.unimi.it/LSR/Item?id=786

NR 2.10.1 Extending notation and tuning systems http://lsr.dsi.unimi.it/LSR/Item?id=785

However, the re-definition of the note-name tables make the snippets too long to include in the documentation. So, the other 20% is splitting out the redefinitions into an include-able file (similar to 'makam.ly') or maybe as new music functions.

If I can figure out how to do the 20% (which might involve too much scheme and \context stuff for me) I'll make Reitveld issue implementing that part and link it here, so that a Docs patch could be built on top of that.

Comment #14

Posted on Dec 20, 2011 by Quick Ox

After trying to make the 'simple' include file, I agree that this is not a documentation issue. Until there is better support, users of microtonal notation will need to understand Scheme better than I do. (I got stuck on the distinction between ` and ' ). http://codereview.appspot.com/5490080/

Status: Accepted

Labels:
Type-Enhancement Patch-abandoned