lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Microtonal support


From: Graham Breed
Subject: Microtonal support
Date: Mon, 22 Dec 2008 12:09:10 +0800

I've been investigating the new pitch model with Hans.  It is, in
fact, better than either of us thought but some of that isn't
documented.  So pay attention.

First, alterations are specified in terms of what the documentation
vaguely calls "whole tones".  They are specifically intervals of 200
cents or steps of 6 note equal temperament.  For many tunings the size
of a tone or double sharp will not have this value.

Second, it is possible to retune the nominals!  That is, you can have
C major sound different without resorting to hacks like phantom
accidentals.  The usual equal tempered diatonic is set like this in
scm/lily.scm

(ly:set-default-scale (ly:make-scale #(0 1 2 5/2 7/2 9/2 11/2)))

The notes are specified in terms of 6 note equal temperament, same as
the alterations.  The documentation has improved in that it doesn't
claim the vector has to contain integers.  But the implications aren't
explained.

This default scale is, in fact, the thing Lilypond calculates pitches
relative to.  It's used to calculate transpositions.  It's also used
to find the MIDI pitches.  It looks like resetting this default scale
to the same tuning as your alterations always does the right thing.

(There's another function called ly:default-scale that returns #f
whenever I call it.)

Attached, then, is a file enharmonic.ly that makes Lilypond's usual
note names and glyphs work for 31 note equal temperament.  There's an
example scale with sounds right in Timidity, and a transposition and
key signature to show that those work (except for the bug we know
about for microtonal key signatures).  It depends on a file regular.ly
which does the retuning from whole tones as 6-equal and an equal
tempered diatonic to some other meantone/schismatic temperament.  It
may be generally useful and you may want to use this example as the
basis for the documentation.

If anybody has string quartet music, for example, with no enharmonic
equivalences, to hand it could be retuned to meantone very easily.
You copy what enharmonic.ly does and set MIDI to work with one voice
per channel.  The result will hopefully sound better than equal
temperament because the rules for correct spelling are consistent with
meantone.

In fact, we can go even further than that!  I've also attached
canasta.ly that does my own decimal notation for miracle temperament.
The accidentals are wrong because of course Sagittal doesn't work with
Lilypond and I don't have the arrowed accidentals yet.  But the tuning
sounds right (to 72 note equal temperament).  It also works fine with
10 scale steps to the octave.  You have to set the default scale very
early on -- maybe before calling ly:make-pitch is the general rule.

So, in summary, thank you to the developers for doing what we wanted
before we asked for it!


                                   Graham

Attachment: enharmonic.ly
Description: Binary data

Attachment: regular.ly
Description: Binary data

Attachment: canasta.ly
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]