]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.144
authorfred <fred>
Wed, 27 Mar 2002 00:59:33 +0000 (00:59 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:59:33 +0000 (00:59 +0000)
input/regression/lyric-phrasing.ly [new file with mode: 0644]
lily/lyric-phrasing-engraver.cc
lily/syllable-group.cc
lilypond-mode.el
mutopia/F.Schubert/standchen.ly
scripts/lilypond-book.py

diff --git a/input/regression/lyric-phrasing.ly b/input/regression/lyric-phrasing.ly
new file mode 100644 (file)
index 0000000..ffa791c
--- /dev/null
@@ -0,0 +1,41 @@
+\header{
+  texidoc="Lyric phrasing
+
+  We find start and end of phrases, and align lyrics of multiple stanzas
+  accordingly.
+
+  Also, lyrics at start of melismata should be left aligned.
+  (is that only lyrics that are followed by `__'?  Because
+  that seems to be the case now -- jcn)
+
+@example
+          |        |        |     |      |
+         x|       x|       x|    x|     x|
+
+     1:  Start  sentence  melisma      end.
+     2:  x         x         x______      x
+@end example
+
+  Only lyrics that are followed by '__' while there's a melisma,
+  are left-aligned, in this case the third x.";
+}
+
+\paper { linewidth = -1.; }
+\score {
+  \addlyrics
+    \context Voice = "v" \notes  \relative c'' {
+      \property Staff.automaticMelismata = ##t
+      \autoBeamOff
+      a a a8()a a4
+    }
+    \context Lyrics <
+      \context LyricsVoice = "v-1" \lyrics {
+        \property LyricsVoice . stanza = "1:"
+        Start sentence melisma end.
+      }
+      \context LyricsVoice = "v-2" \lyrics {
+        \property LyricsVoice . stanza = "2:"
+        x x x __ x
+      }
+   >
+}
index e24f7642c3da3157b07fd9831c9aabc61d572e25..b23e2d786eef25dd82e5809709bbf4a0990e5119 100644 (file)
@@ -39,9 +39,24 @@ ADD_THIS_TRANSLATOR (Lyric_phrasing_engraver);
  */
 
 /*
-  We find start and end of phrases, and align lyrics accordingly.
+  We find start and end of phrases, and align lyrics of multiple stanzas
+  accordingly.
+
   Also, lyrics at start of melismata should be left aligned.
+  (is that only lyrics that are followed by `__'?  Because
+  that seems to be the case now -- jcn)
+
+
+          |        |        |     |      |
+         x|       x|       x|    x|     x|
 
+     1:  Start  sentence  melisma      end.
+     2:  x         x         x_____       x
+
+  Only lyrics that are followed by '__' while there's a melisma,
+  are left-aligned, in this case the third x.
+
+  
   Alignment and melismata
 
   I've taken [a different] approach:
index afe3ad10788c0b56567053b0b4766c680510a65a..119acd03df36e3dfe6de5a799d5a626d8f6105e9 100644 (file)
@@ -175,7 +175,10 @@ Syllable_group::appropriate_alignment (const char *punc)
       lastchar = lyric_str[lyric_str.length_i ()-1];
       /* If it doesn't end in punctuation then it ain't an end of phrase */
       if (! strchr (punc, lastchar)) {
-       /* Special case: trailing space. Here examine the previous character and reverse the
+       /*
+         FIXME: Document this.
+         
+         Special case: trailing space. Here examine the previous character and reverse the
           sense of the test (i.e. trailing space makes a break without punctuation, or 
           suppresses a break with punctuation).
           This behaviour can be suppressed by including a space in the 
index 15dc21ae6e24dc4aa4317b9b17a509399bfcb961..177004d0966e50677b5a2b1a809374b9814d4e9e 100644 (file)
@@ -3,7 +3,7 @@
 ;;;
 ;;; source file of the GNU LilyPond music typesetter
 ;;; 
-;;; (c) 1999, 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;;; Inspired on auctex
 
@@ -19,7 +19,7 @@
 (require 'easymenu)
 (require 'compile)
 
-(defconst LilyPond-version "1.3.103"
+(defconst LilyPond-version "1.3.143"
   "`LilyPond-mode' version number.")
 
 (defconst LilyPond-help-address "bug-gnu-music@gnu.org"
@@ -28,6 +28,9 @@
 (defvar LilyPond-mode-hook nil
   "*Hook called by `LilyPond-mode'.")
 
+(defvar LilyPond-kick-xdvi nil
+  "If true, no simultaneous xdvi's are started, but reload signal is sent.")
+
 (defvar LilyPond-regexp-alist
   '(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2))
   "Regexp used to match LilyPond errors.  See `compilation-error-regexp-alist'.")
@@ -292,6 +295,14 @@ Must be the car of an entry in `LilyPond-command-alist'."
           file))
       string)))
 
+(defun LilyPond-shell-process (name buffer command)
+  (let ((old (current-buffer)))
+    (switch-to-buffer-other-window buffer)
+    (goto-char (point-max))
+    (start-process-shell-command name buffer command)
+    (switch-to-buffer-other-window old)))
+  
+
 (defun LilyPond-command (name file)
   "Run command NAME on the file you get by calling FILE.
 
@@ -305,17 +316,19 @@ command."
     (if entry
        (let ((command (LilyPond-command-expand (cadr entry)
                                                (apply file nil))))
-         (let* (
-                (buffer-xdvi (get-buffer "*view*"))
-                (process-xdvi (if buffer-xdvi (get-buffer-process buffer-xdvi) nil)))
-           (if (and process-xdvi
-                    (string-equal name "View"))
-               ;; Don't open new xdvi window, but force redisplay
-               ;; We could make this an option.
-               (signal-process (process-id process-xdvi) 'SIGUSR1)
-             (progn
-               (setq LilyPond-command-default name)
-               (LilyPond-compile-file command name))))))))
+         (if (string-equal name "View")
+             (let ((buffer-xdvi (get-buffer-create "*view*")))
+               (if LilyPond-kick-xdvi
+                 (let ((process-xdvi (get-buffer-process buffer-xdvi)))
+                   (if process-xdvi
+                       ;; Don't open new xdvi window, but force redisplay
+                       ;; We could make this an option.
+                       (signal-process (process-id process-xdvi) 'SIGUSR1)
+                     (LilyPond-shell-process name buffer-xdvi command)))
+                 (LilyPond-shell-process name buffer-xdvi command)))
+           (progn
+             (setq LilyPond-command-default name)
+             (LilyPond-compile-file command name)))))))
          
 ;; XEmacs stuff
 ;; Sadly we need this for a macro in Emacs 19.
index 0b24dc81a943ebae7928b58f7c66eb687b4f2160..69561d89b3487f44a904c5c4dfe4786ab542352a 100644 (file)
@@ -1,51 +1,52 @@
-\header{
-filename =      "standchen.ly";
-%
-% From the album:
-% Schubert-Lieder
-% Edition Schott No. 608
-% Without date, but makes mention of
-% ``Jubil"aums-Ausgabe zum 100. Todestage'' ie, 1928
-%
-% page 60
-%
-title    = "St\\\"andchen";
-subtitle =  "(Serenade)\\\\``Leise flehen meine Lieder''";
-opus =          "D. 957 No. 4";
-date =  "August 1828";
-composer =      "Franz Schubert (1797-1828)";
-poet=   "Text by Ludwig Rellstab (1799-1860)";
-enteredby =     "JCN";
-copyright =     "public domain";
+
+#(set! point-and-click line-column-location)
+
+instrument = "Piano"
+
+\header {
+  title = "Ständchen";
+  subtitle = "(Serenade)";
+  subsubtitle = "Leise flehen meine Lieder";
+  opus = "D. 957 No. 4";
+  date = "August 1828";
+  composer = "Franz Schubert (1797-1828)";
+  poet = "Text by Ludwig Rellstab (1799-1860)";
+  enteredby = "JCN";
+  copyright = "public domain";
+  instrument = \instrument;
 
   % mutopia headers.
-  mutopiatitle = "St\\\"andchen";
-  mutopiasubtitle = "(Serenade)\\\\``Leise flehen meine Lieder''";
+  mutopiatitle = "Standchen";
+  mutopiasubtitle = "Leise flehen meine Lieder";
   mutopiacomposer = "Franz Schubert (1797-1828)";
   mutopiapoet = "Ludwig Rellstab (1799-1860)";
-  mutopiaopus = "D. 957 No. 4";
-  mutopiainstrument = "Piano";
+  mutopiaopus = "D957.4";
+  mutopiainstrument = \instrument;
+  date = "1828/08";
   style = "Romantic";
-  copyright = "Public Domain";
-  tagline =    "\\\\This music is part of the Mutopia project, http://sca.uwater
-loo.ca/Mutopia/\\\\It has been typeset and placed in the public domain by Jan Nieuwenhuizen.\\\\Unrestricted modification and redistribution is permitted and enc
-ouraged - copy this music and share it!";
-  maintainer = "janneke@gnu.org";
-  lastupdated = "1999/Oct/17";
+  source = "Schubert-Lieder; Edition Schott No. 608, (Not dated).
+    Jubilaeums-Ausgabe zum 100. Todestage (~1928).";
 
+  copyright = "Public Domain";
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  lastupdated =         "2001/Mar/26";
+  mutopiapublicdomain = "\\parbox{\hsize}{\\thefooter\\quad\\small
+    \\\\This music is part of the Mutopia project,
+    \\texttt{http://www.mutopiaproject.org/}\\\\It has been typeset
+    and placed in the public domain by " + \maintainer +
+    ".\\\\Unrestricted modification and redistribution is permitted
+    and encouraged---copy this music and share it.}";
+ tagline = \mutopiapublicdomain;
+ footer = "Mutopia-2001/03/26-xx";
 } 
 
-%{
- Tested Features: multivoice accents lyrics chords piano music
-multiple \paper{}s in one \score 
-Note: Original key f.
-%}
-
-\version "1.3.117";
+\version "1.3.141";
 
-dynamicUp =    \property Voice.DynamicLineSpanner \override #'direction = #1
-dynamicRevert =        \property Voice.DynamicLineSpanner \revert #'direction
+dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
+dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
 
+\include "paper16.ly"
 
 vocalVerse =  \notes\relative c''{
        \dynamicUp
@@ -63,7 +64,9 @@ vocalVerse =  \notes\relative c''{
        R2. |
        g8. b16 es4. d8 |
        c8. g16 es4. c8 |
-       \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
+       % CHECK
+       % \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
+       \grace { as'16( bes } \times 2/3 { [ )as8( )g] as } c4. as8 |
        g2. |
        \grace { f16( g } \times 2/3 { [ )f8( )e] f } as4. f8 |
   
@@ -97,7 +100,7 @@ vocalThrough =  \notes\relative c{
 }
 
 lyricVerseOne =  \lyrics{
-       Lei- se fleh- en mei- ne Lie- der 
+       Lei- se fleh- en mei- ne Lie- der
        Durch die Nacht zu dir; 
        In den stil- len Hain her- nie- der
        Lieb- chen, komm zu mir! 
@@ -344,17 +347,17 @@ global =  \notes{
        \bar "|.";
 }
 
-allLyrics =  \lyrics {
+allLyrics = \lyrics {
        \lyricVerseOne
        \lyricVerseTwo
        \lyricThrough
 }
 
-lyricStaff =  \context Lyrics = lyric<
+lyricStaff = \context Lyrics {
        \allLyrics
->
+}
                
-vocals =  \notes{
+vocals = \context Voice {
        \clef treble;
        % certainly no auto-beaming for vocals
        \property Voice.noAutoBeaming = ##t
@@ -388,7 +391,6 @@ trebleStaff =  \context Staff = treble<
        \global
        \treble
 >
-
 bass =  {
        \clef bass;
        \bassIntro 
@@ -424,8 +426,6 @@ grandStaff =  \context PianoStaff <
 %}
 
                \addlyrics
-                       %\context Staff=vocal \vocalStaff
-                       %\context Lyrics=lyric \lyricStaff 
                        \vocalStaff
                        \lyricStaff 
                \grandStaff
index e15ee356ddaff5485255bcb2291298bdc053c8e0..acfec670afd62fe4b97d4aa55d046e4532e0b6fa 100644 (file)
@@ -44,6 +44,30 @@ program_version = '@TOPLEVEL_VERSION@'
 if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
        program_version = '1.4pre'
 
+#
+# Try to cater for bad installations of LilyPond, that have
+# broken TeX setup.  Just hope this doesn't hurt good TeX
+# setups.  Maybe we should check if kpsewhich can find
+# feta16.{afm,mf,tex,tfm}, and only set env upon failure.
+#
+datadir = '@datadir@'
+environment = {
+       'MFINPUTS' : datadir + '/mf:',
+       'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:.:',
+       'TFMFONTS' : datadir + '/tfm:',
+       'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa',
+       'GS_LIB' : datadir + '/ps',
+}
+
+def setup_environment ():
+       for key in environment.keys ():
+               val = environment[key]
+               if os.environ.has_key (key):
+                       val = val + os.pathsep + os.environ[key]
+               os.environ[key] = val
+
+
+
 include_path = [os.getcwd()]
 
 
@@ -1219,6 +1243,7 @@ if g_outdir:
                error ("outdir is a file: %s" % g_outdir)
        if not os.path.exists(g_outdir):
                os.mkdir(g_outdir)
+setup_environment ()
 for input_filename in files:
        do_file(input_filename)