lilypond-user
[Top][All Lists]
Advanced

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

Re: Quarter-tone notation with arrows


From: Joseph Wakeling
Subject: Re: Quarter-tone notation with arrows
Date: Tue, 07 Apr 2009 11:17:30 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090319)

Kees van den Doel wrote:
> I agree it makes total sense to have an "accidental_level2" which make 
> additional microtonal
> alterations to the 12 "diatonic pitches  and their equally tempered 
> "accidental_level1" alterations (b and #)", 
> but there is only one level of accidental in Lilypond, as it adheres to the 
> strict Western notation
> principles of diatonic pitches modified by an accidental.

Yup.  Which is a bit of a bugger in some respects, as I just discovered
from some experiments ... Graham Breed was absolutely right about
transposition problems with my cheaty way of getting these microtonal
accidentals.

I've attached the .ly files for people's amusement.  I don't know if
it's even _possible_ to make them work, but the errors seem to crop up
when the transposition would normally transform a natural into a flat or
sharp (or vice versa).

> If your microtonal accidentals are approximate it makes logical sense to me 
> that B_natural_downarrow
> and B_flat_uparrow should be assigned slightly different pitches, for they 
> will not sound the same anyways. 
> Just as Bb and A# are not the same pitches in all but one tuning.

Well ... different or not, I'm coming to the conclusion that GB's idea
of tweaks instead of different accidental names is the way to go, since
we ARE talking about an addition that shades a given pitch up or down
instead of being a unique accidental in its own right.

So what I'm wondering now is whether it's possible to define a tweak
that adds an up (or down) arrow to the accidental (whatever accidental
that may be) and also tweaks the pitch up or down by the desired amount,
but which would be transparent as far as transposition is concerned.

Then I could just go around writing things like,

        \ih cis \qeh d ....

and all should be both happy _and_ transposeable.  But I don't know if
that's possible ... ?

Thanks to all of you for all your help so far,

    -- Joe
#(define-public SHARP-Q-FLAT 1001/4000)
#(define-public FLAT-Q-SHARP -1001/4000)

quartertonearrowPitchNames =  #`(
        (cff . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (ctqf . ,(ly:make-pitch -1 0 THREE-Q-FLAT))
        (cf . ,(ly:make-pitch -1 0 FLAT))
        (cfqs . ,(ly:make-pitch -1 0 FLAT-Q-SHARP))
        (cqf . ,(ly:make-pitch -1 0 SEMI-FLAT))
        (c . ,(ly:make-pitch -1 0 NATURAL))
        (cqs . ,(ly:make-pitch -1 0 SEMI-SHARP))
        (csqf . ,(ly:make-pitch -1 0 SHARP-Q-FLAT))
        (cs . ,(ly:make-pitch -1 0 SHARP))
        (ctqs . ,(ly:make-pitch -1 0 THREE-Q-SHARP))
        (css . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
        (cx . ,(ly:make-pitch -1 0 DOUBLE-SHARP))

        (dff . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
        (dtqf . ,(ly:make-pitch -1 1 THREE-Q-FLAT))
        (df . ,(ly:make-pitch -1 1 FLAT))
        (dfqs . ,(ly:make-pitch -1 1 FLAT-Q-SHARP))
        (dqf . ,(ly:make-pitch -1 1 SEMI-FLAT))
        (d . ,(ly:make-pitch -1 1 NATURAL))
        (dqs . ,(ly:make-pitch -1 1 SEMI-SHARP))
        (dsqf . ,(ly:make-pitch -1 1 SHARP-Q-FLAT))
        (ds . ,(ly:make-pitch -1 1 SHARP))
        (dtqs . ,(ly:make-pitch -1 1 THREE-Q-SHARP))
        (dss . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
        (dx . ,(ly:make-pitch -1 1 DOUBLE-SHARP))

        (eff . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
        (etqf . ,(ly:make-pitch -1 2 THREE-Q-FLAT))
        (ef . ,(ly:make-pitch -1 2 FLAT))
        (efqs . ,(ly:make-pitch -1 2 FLAT-Q-SHARP))
        (eqf . ,(ly:make-pitch -1 2 SEMI-FLAT))
        (e . ,(ly:make-pitch -1 2 NATURAL))
        (eqs . ,(ly:make-pitch -1 2 SEMI-SHARP))
        (esqf . ,(ly:make-pitch -1 2 SHARP-Q-FLAT))
        (es . ,(ly:make-pitch -1 2 SHARP))
        (etqs . ,(ly:make-pitch -1 2 THREE-Q-SHARP))
        (ess . ,(ly:make-pitch -1 2 DOUBLE-SHARP))
        (ex . ,(ly:make-pitch -1 2 DOUBLE-SHARP))

        (fff . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
        (ftqf . ,(ly:make-pitch -1 3 THREE-Q-FLAT))
        (ff . ,(ly:make-pitch -1 3 FLAT))
        (ffqs . ,(ly:make-pitch -1 3 FLAT-Q-SHARP))
        (fqf . ,(ly:make-pitch -1 3 SEMI-FLAT))
        (f . ,(ly:make-pitch -1 3 NATURAL))
        (fqs . ,(ly:make-pitch -1 3 SEMI-SHARP))
        (fsqf . ,(ly:make-pitch -1 3 SHARP-Q-FLAT))
        (fs . ,(ly:make-pitch -1 3 SHARP))
        (ftqs . ,(ly:make-pitch -1 3 THREE-Q-SHARP))
        (fss . ,(ly:make-pitch -1 3 DOUBLE-SHARP))
        (fx . ,(ly:make-pitch -1 3 DOUBLE-SHARP))

        (gff . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
        (gtqf . ,(ly:make-pitch -1 4 THREE-Q-FLAT))
        (gf . ,(ly:make-pitch -1 4 FLAT))
        (gfqs . ,(ly:make-pitch -1 4 FLAT-Q-SHARP))
        (gqf . ,(ly:make-pitch -1 4 SEMI-FLAT))
        (g . ,(ly:make-pitch -1 4 NATURAL))
        (gqs . ,(ly:make-pitch -1 4 SEMI-SHARP))
        (gsqf . ,(ly:make-pitch -1 4 SHARP-Q-FLAT))
        (gs . ,(ly:make-pitch -1 4 SHARP))
        (gtqs . ,(ly:make-pitch -1 4 THREE-Q-SHARP))
        (gss . ,(ly:make-pitch -1 4 DOUBLE-SHARP))
        (gx . ,(ly:make-pitch -1 4 DOUBLE-SHARP))

        (aff . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
        (atqf . ,(ly:make-pitch -1 5 THREE-Q-FLAT))
        (af . ,(ly:make-pitch -1 5 FLAT))
        (afqs . ,(ly:make-pitch -1 5 FLAT-Q-SHARP))
        (aqf . ,(ly:make-pitch -1 5 SEMI-FLAT))
        (a . ,(ly:make-pitch -1 5 NATURAL))
        (aqs . ,(ly:make-pitch -1 5 SEMI-SHARP))
        (asqf . ,(ly:make-pitch -1 5 SHARP-Q-FLAT))
        (as . ,(ly:make-pitch -1 5 SHARP))
        (atqs . ,(ly:make-pitch -1 5 THREE-Q-SHARP))
        (ass . ,(ly:make-pitch -1 5 DOUBLE-SHARP))
        (ax . ,(ly:make-pitch -1 5 DOUBLE-SHARP))

        (bff . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
        (btqf . ,(ly:make-pitch -1 6 THREE-Q-FLAT))
        (bf . ,(ly:make-pitch -1 6 FLAT))
        (bfqs . ,(ly:make-pitch -1 6 FLAT-Q-SHARP))
        (bqf . ,(ly:make-pitch -1 6 SEMI-FLAT))
        (b . ,(ly:make-pitch -1 6 NATURAL))
        (bqs . ,(ly:make-pitch -1 6 SEMI-SHARP))
        (bsqf . ,(ly:make-pitch -1 6 SHARP-Q-FLAT))
        (bs . ,(ly:make-pitch -1 6 SHARP))
        (btqs . ,(ly:make-pitch -1 6 THREE-Q-SHARP))
        (bss . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
        (bx . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
)


%% set pitch names.
pitchnames = \quartertonearrowPitchNames
#(ly:parser-set-note-names parser pitchnames)


quartertonearrowGlyphs = #`(
        (4001/4000 . "accidentals.doublesharp")
        (1 . "accidentals.doublesharp")
        (3001/4000 . "accidentals.sharp.arrowup")
        (3/4 . "accidentals.sharp.arrowup")
        (2001/4000 . "accidentals.sharp")
        (1/2 . "accidentals.sharp")
        (1001/4000 . "accidentals.sharp.arrowdown")
        (1/4 . "accidentals.natural.arrowup")
        (1/4000 . "accidentals.natural")
        (0 . "accidentals.natural")
        (-1/4000 "accidentals.natural")
        (-1/4 . "accidentals.natural.arrowdown")
        (-1001/4000 . "accidentals.flat.arrowup")
        (-1/2 . "accidentals.flat")
        (-2001/4000 . "accidentals.flat")
        (-3/4 . "accidentals.flat.arrowdown")
        (-3001/4000 . "accidentals.flat.arrowdown")
        (-1 . "accidentals.flatflat")
        (-4001/4000 "accidentals.flatflat")
)


\layout {
  \context {
    \Score
    \override KeySignature #'glyph-name-alist = \quartertonearrowGlyphs
    \override Accidental #'glyph-name-alist = \quartertonearrowGlyphs
    \override AccidentalCautionary #'glyph-name-alist = \quartertonearrowGlyphs
    \override TrillPitchAccidental #'glyph-name-alist = \quartertonearrowGlyphs
    \override AmbitusAccidental #'glyph-name-alist = \quartertonearrowGlyphs
  }
}
\version "2.10.33"
\include "english.ly"

\score{
        {
           <<
                \new Staff = "Clarinet 1" {
                        \set Staff.midiInstrument = "clarinet"
                        \relative c' {
                                c4 d e f
                                g2 <gqf bf>
                        }
                }
                
%               \new Staff = "Clarinet 2" {
%                       \set Staff.midiInstrument = "clarinet"
%                       \relative c'' {
%                               c4 b a g
%                               g2 gqs
%                       }
%               }
           >>
        }
        \layout{}
        \midi{}
}

reply via email to

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