]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.5.18 release/1.5.18
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 18 Oct 2001 15:44:36 +0000 (17:44 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 18 Oct 2001 15:44:36 +0000 (17:44 +0200)
===========

* Some more hacking at midi2ly.py:
   - options and stuff: moved to library for ly2dvi, midi2ly, mup2ly,
update-lily
   - handle keys and note names
   - simple quantising
   - handle tuplets and silly durations
   - guess clef
   - don't include empty staffs in score
   - print relative pitches by default
   - don't repeat duration by default
   - bugfix: allow 8th notes too
   - include new version of input/test/midi-scales.ly
   - added barchecks + fix
   - bugfix for relative mode

* Shorter MIDI creation texts.

* Bugfix: Key_change_req::transpose: don't deliver reversed list.

* Bugfix: Key_performer::create_audio_elements: transpose list to
`do', before determining tonality.

1.4.8.m

22 files changed:
CHANGES
VERSION
buildscripts/lilylib.py.in
input/paddy.abc
input/regression/lyric-phrasing.ly
input/test/GNUmakefile
lily/grob.cc
lily/include/lily-guile.hh
lily/syllable-group.cc
make/mutopia-rules.make
make/out/lilypond.lsm
make/out/lilypond.mandrake.spec
make/out/lilypond.redhat.spec
make/out/lilypond.suse.spec
midi2ly/GNUmakefile
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm
scripts/GNUmakefile
scripts/abc2ly.py
scripts/lilypond-book.py
scripts/ly2dvi.py

diff --git a/CHANGES b/CHANGES
index e10993120db552b49cf33af98fdd2535bdcc570f..032bb589167abdad482c88b392d56b2db629b98b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 * Bugfix: Key_performer::create_audio_elements: transpose list to
 `do', before determining tonality.
 
+1.4.8.moh1
+==========
+
+* new property "end-alignment" to control non-centered lyric alignment
+
+1.5.17.hwn1
+===========
+
+* Be quicker in Grob::handle_broken_dependencies().
+
+* --strict option for abc2ly, exit if an error is found.
+
+* GUILE 1.3.4 fix.
+
+
 1.5.17
 ======
 
diff --git a/VERSION b/VERSION
index b8f2d2a038c1cb54a2b0d23f42b24eb862712c25..af6498780207a313257cab548ac0f752e4cb3a1e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=17
-MY_PATCH_LEVEL=jcn6
+PATCH_LEVEL=18
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index fea6ffda23dc163ba242f2be3b61b42ac5a0c9ea..10ee45aa9ce39a2bdaad3e67a3f57e2285f3ed6c 100644 (file)
@@ -177,21 +177,6 @@ def cleanup_temp ():
                shutil.rmtree (temp_dir)
 
 
-#what a name.
-def set_setting (dict, key, val):
-       try:
-               val = string.atof (val)
-       except ValueError:
-               #warning (_ ("invalid value: %s") % `val`)
-               pass
-
-       try:
-               dict[key].append (val)
-       except KeyError:
-               warning (_ ("no such setting: %s") % `key`)
-               dict[key] = [val]
-
-
 def strip_extension (f, ext):
        (p, e) = os.path.splitext (f)
        if e == ext:
index 0aadebc63c1e9f3144087a46af9fbd5448ef8905..1492ea208967ba61f515ccbae03d128442a65314 100644 (file)
@@ -1,16 +1,47 @@
-%
-%  This is NOT a lilypond input file. It is an ABC file, see
-%  http://www.gre.ac.uk/~c.walshaw/abc/
-%  
-%  LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
-%
-X:1
-T:Paddy O'Rafferty
-C:Trad.
-M:6/8
-K:D
-dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB||
-~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA||
-fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|
+\header {
+       composer = "Trad."
+       crossRefNumber = "1"
+       footnotes = ""
+       tagline = "Lily was here (unknown version) -- automatically converted from ABC"
+       title = "Paddy O'Rafferty"
+}
+voicedefault = \notes {
+\property Score.defaultBarType="empty"
 
+%   This is NOT a lilypond input file. It is an ABC file, see
+ %   http://www.gre.ac.uk/~c.walshaw/abc/
+ %   
+ %   LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
+ \time 6/8 \key d \major   d''8    fis''8    fis''8    cis''8    e''8    e''8  
+\bar "|"   d''8    e''8    fis''8    g''8    fis''8    e''8  \bar "|"   d''8    
+fis''8    fis''8    cis''8    e''8    e''8  \bar "|"   d''8    fis''8    e''8   
+ d''8    b'8    a'8  \bar "|"   d''8    fis''8    fis''8    cis''8    e''8    
+e''8  \bar "|"   d''8    e''8    fis''8    g''8    fis''8    e''8  \bar "|"   
+fis''8    a''8    fis''8    g''8    fis''8    e''8  \bar "|"   d''8    fis''8   
+ e''8    d''8    b'8    a'8  \bar ":|"   d''8    fis''8    e''8    d''8    
+cis''8    b'8  \bar "||"     a'4. ^"~"    b'4.  \bar "|"   g''8    fis''8    
+e''8    fis''8    d''8    b'8  \bar "|"   a'8    fis'8    a'8    b'4    cis''8  
+\bar "|"   d''8    fis''8    e''8    d''8    cis''8    b'8  \bar "|"   a'4. 
+^"~"    b'4. ^"~"  \bar "|"   e''8    fis''8    e''8    e''8    fis''8    g''8  
+\bar "|"   fis''8    a''8    fis''8    g''8    fis''8    e''8  \bar "|"   d''8  
+  fis''8    e''8    d''8    cis''8    b'8  \bar ":|"   d''8    fis''8    e''8   
+ d''8    b'8    a'8  \bar "||"     fis''8    a'8    a'8    e''8    a'8    a'8  
+\bar "|"   d''8    e''8    fis''8    g''8    fis''8    e''8  \bar "|"   fis''8  
+  a'8    a'8    e''8    a'8    a'8  \bar "|"   d''8    fis''8    e''8    d''8   
+ b'8    a'8  \bar "|"   fis''8    a'8    a'8    e''8    a'8    a'8  \bar "|"   
+d''8    e''8    fis''8    g''8    fis''8    e''8  \bar "|"   fis''8    a''8    
+fis''8    g''8    fis''8    e''8  \bar "|"   d''8    fis''8    e''8    d''8    
+b'8    a'8  \bar ":|"           
+}\score{
+        \notes <
 
+       \context Staff="default"
+       {
+           \voicedefault 
+       }
+
+    >
+       \paper {
+       }
+       \midi {}
+}
index 6a4da6320e522a3ec30318253020636e8bfb8021..f1f45fa8c86801bc12013bb9711e323160d1467d 100644 (file)
@@ -36,7 +36,7 @@
       }
       \context LyricsVoice = "v-2" \lyrics {
         \property LyricsVoice . stanza = "2:"
-        x x x __ x
+        x x x __ x.
       }
    >
 }
index 979193993007af1846a8c06f07ea9b803d0732b7..bb53247dda9f9bf8a9ab3e16b8e36d835dfdf251 100644 (file)
@@ -1,8 +1,8 @@
 # input/test/Makefile
 
 depth = ../..
-examples=  font20  
-LOCALSTEPMAKE_TEMPLATES=ly mutopia
+examples=  font20  ancient-font
+LOCALSTEPMAKE_TEMPLATES=ly mutopia 
 
 EXTRA_DISTFILES=features.abc
 
index f55ee2f8e257b73fe4ac3b41ae317a9a0a8e4f4e..bd716106db64817a6b0354e1601e38c8c77136a5 100644 (file)
@@ -354,7 +354,9 @@ Grob::add_dependency (Grob*e)
       CRITERION is either a SMOB pointer to the desired line, or a number
       representing the break direction. Do not modify SRC.
 
-      It is rather tightly coded, since it takes a lot of time.
+      It is rather tightly coded, since it takes a lot of time; it is
+      one of the top functions in the profile.
+
 */
 SCM
 Grob::handle_broken_grobs (SCM src, SCM criterion)
@@ -363,7 +365,7 @@ Grob::handle_broken_grobs (SCM src, SCM criterion)
   Grob *sc = unsmob_grob (src);
   if (sc)
     {
-      if (gh_number_p (criterion))
+      if (SCM_INUMP (criterion))
        {
          Item * i = dynamic_cast<Item*> (sc);
          Direction d = to_dir (criterion);
@@ -388,22 +390,23 @@ Grob::handle_broken_grobs (SCM src, SCM criterion)
            return SCM_UNDEFINED;
 
          /* now: sc && sc->line_l () == line */
-         if (!line
+         if (!line)
+           return sc->self_scm();
              /*
                This was introduced in 1.3.49 as a measure to prevent
                programming errors. It looks expensive (?). TODO:
                benchmark , document when (what kind of programming
                errors) this happens.
               */
-             || (sc->common_refpoint (line, X_AXIS)
-                 && sc->common_refpoint (line, Y_AXIS)))
+         if (sc->common_refpoint (line, X_AXIS)
+              && sc->common_refpoint (line, Y_AXIS))
            {
              return sc->self_scm ();
            }
          return SCM_UNDEFINED;
        }
     }
-  else if (gh_pair_p (src))
+  else if (SCM_CONSP (src))
     {
       SCM oldcar =ly_car (src);
       /*
@@ -427,7 +430,7 @@ Grob::handle_broken_grobs (SCM src, SCM criterion)
        }
 
       SCM newcdr = handle_broken_grobs (oldcdr, criterion);
-      return gh_cons (newcar, newcdr);
+      return scm_cons (newcar, newcdr);
     }
   else
     return src;
index 7cc9232bf26b921c51120566d2de168252895a70..54c9decd293fea8ff8ef6a33d7caabae96ff427e 100644 (file)
 /* Guile 1.3.4 compatibility */
 #if GUILE_MINOR_VERSION < 4
 
+
+#ifndef SCM_CELL_TYPE
+#define SCM_CELL_TYPE(X) SCM_CAR (X)
+#endif
+
+#ifndef SCM_CELL_WORD_1
+#define SCM_CELL_WORD_1(X) SCM_CDR (X)
+#endif
+
 #define scm_bits_t SCM
 
 #define fix_guile_1_3_4_scm_puts(scm_data, port) scm_puts ((char*)scm_data, port)
index 3106026868e10d050d1920353167957d53e321bc..1dfbad8d9850e4e12849893cb6d67e555be386ea 100644 (file)
@@ -131,7 +131,7 @@ Syllable_group::set_lyric_align (const char *punc, Grob *default_notehead_l)
 /** determine the distance to translate lyrics to get correct alignment
     Rules: If alignment is centre, translate = 0
            Otherwise,
-             If (length of longest lyric) < 2 * (length of shortest lyric),
+             If (length of longest lyric) < property("end-alignment") * (length of shortest lyric),
                 - centre longest lyric on notehead
              Otherwise
                 - move so shortest lyric just reaches notehead centre
@@ -142,7 +142,7 @@ Syllable_group::amount_to_translate ()
   Real translate = 0.0;
   if (alignment_i_ != CENTER) {
     // FIXME: do we really know the lyric extent here? Some font sizing comes later?
-    Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / 2;
+    Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("end-alignment"));
     Real l2 = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length ();
 
     translate = l1 <? l2;
index d75f9197f257675323f5b4f5f07617a2b9022533..08445758d53908ab05bf49f719dbfbd38ea3c5e9 100644 (file)
@@ -21,7 +21,7 @@ $(outdir)/%.ly.txt: %.abc
        ln -f $< $@
 
 $(outdir)/%.ly: %.abc
-       $(PYTHON) $(ABC2LY) -o $@ $< 
+       $(PYTHON) $(ABC2LY) --strict -o $@ $< 
 
 $(outdir)/%.dvi: $(outdir)/%.ly
        $(PYTHON) $(LY2DVI) --output=$@ --dependencies $< 
index d6166b4dea992976cc07a3077d5373459c5d25f5..71d5ff630129b4f5423f387e56299c562f7e431b 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.5.17
-Entered-date: 14OKT01
+Version: 1.5.18
+Entered-date: 18OKT01
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.5.17.tar.gz 
+       1000k lilypond-1.5.18.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.5.17.tar.gz 
+       1000k lilypond-1.5.18.tar.gz 
 Copying-policy: GPL
 End
index 44b1ba03756fb8576bff06d59e92be9cf4f9e63f..1019348b8dc1b893c4eaf32dfb71e55edb3b98ad 100644 (file)
@@ -1,5 +1,5 @@
 %define name lilypond
-%define version 1.5.17
+%define version 1.5.18
 %define release 1mdk
 
 Name: %{name}
index 3c4ef1750d7542b00d22dd289eb66704cc481626..857d62c67e3969716797510eef8bc23e1a0936cc 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.5.17
+Version: 1.5.18
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.18.tar.gz
 Summary: Create and print music notation 
 URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
index d6d085413c27f1dbc3117a89b9adec514817e212..e4dfe7649b43c209095323d99fc9fe0417765e86 100644 (file)
 
 Distribution: SuSE Linux 7.0 (i386)
 Name: lilypond
-Version: 1.5.17
+Version: 1.5.18
 Release: 2
 Copyright:    GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.18.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.lilypond.org/
index d585c5c702aa63559cac876f2221ece98a4b9317..3ef74f698a225667283b974affab956e4bd68184 100644 (file)
@@ -3,8 +3,8 @@
 
 depth = ..
 
-NAME = midi2ly
-MODULE_NAME = midi2ly
+NAME = midi2ly-old
+MODULE_NAME = midi2ly-old
 
 SUBDIRS = include
 MODULE_LIBS=$(depth)/flower
index 55cece0c443c3ef73e8115444c18a85932f29525..d5de3abb57a5e3af6e351345f0bea24439c1a20f 100644 (file)
                (self-alignment-X . 0)
                (non-rhythmic . #t)
                (word-space . 0.6)
+               (end-alignment . 5)
                (font-family . roman)
                (font-shape . upright)
                (meta . ,(grob-description lyric-syllable-interface text-interface font-interface ))
index 6920e911beefd81a786db8308924713ec0c46af6..9de5556f708765744d30acd3c7c6452cebaa4df8 100644 (file)
@@ -381,6 +381,7 @@ function of type (beam multiplicity dy staff-line-thickness) -> real.  Default v
 (grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY).")
 (grob-property-description 'when moment? "when does this column happen?.")
 (grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).")
+(grob-property-description 'end-alignment number? "proportion of lyric length to align with note-head for non-centered lyrics.")
 (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
 (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
 (grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
index 60b76f8d795936db81618b48c21544c30c675927..e0de47c3f899f73e1ac62e7a602aa5d9d6ae84f1 100644 (file)
@@ -532,7 +532,8 @@ that helps show the length of a melissima (tied/slurred note)."
    'lyric-syllable-interface
    "a single piece of lyrics"
    '(
-    word-space  
+    word-space
+    end-alignment
     ))
 
 
index a61a9b1d58ab9d3e129a96b57afdb1fe9cecacfc..1df3d26a3b890fb463678983f57edbcf4e3119d2 100644 (file)
@@ -1,6 +1,6 @@
 depth = ..
 
-SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly mup2ly
+SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly mup2ly midi2ly
 STEPMAKE_TEMPLATES=script help2man po
 HELP2MAN_EXECS = $(SEXECUTABLES)
 
index b4295e933f597fa6db6b0a7ca854b1c298d1b074..6428e0f1054aa4fb6ff2cbc6062da1b4a01c10fd 100644 (file)
@@ -67,6 +67,7 @@ import os
 
 UNDEF = 255
 state = UNDEF
+strict = 0
 voice_idx_dict = {}
 header = {}
 header['footnotes'] = ''
@@ -88,6 +89,13 @@ DIGITS='0123456789'
 alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  
 HSPACE=' \t'
 midi_specs = ''
+
+
+def error (msg):
+       sys.stderr.write (msg)
+       if strict:
+               sys.exit (1)
+       
        
 def check_clef(s):
       if not s:
@@ -457,6 +465,7 @@ def compute_key (k):
                key_count = flat_key_seq.index (keytup)
                accseq = map (lambda x: (3*x + 3 ) % 7, range (1, key_count + 1))
        else:
+               error ("Huh?")
                raise "Huh"
        
        key_table = [0] * 7
@@ -1226,8 +1235,7 @@ def parse_file (fn):
                        ln = junk_space (ln)
 
                if ln:
-                       msg = "%s: %d: Huh?  Don't understand\n" % (fn, lineno)
-                       sys.stderr.write (msg)
+                       error ("%s: %d: Huh?  Don't understand\n" % (fn, lineno))
                        left = orig_ln[0:-len (ln)]
                        sys.stderr.write (left + '\n')
                        sys.stderr.write (' ' *  len (left) + ln + '\n')        
@@ -1246,7 +1254,8 @@ Options:
   -h, --help          this help
   -o, --output=FILE   set output filename to FILE
   -v, --version       version information
-
+  -s, --strict        be strict about succes.
+  
 This program converts ABC music files (see
 http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt) To LilyPond input.
 """
@@ -1256,7 +1265,7 @@ def print_version ():
 
 
 
-(options, files) = getopt.getopt (sys.argv[1:], 'vo:h', ['help','version', 'output='])
+(options, files) = getopt.getopt (sys.argv[1:], 'vo:hs', ['help','version', 'output=', 'strict'])
 out_filename = ''
 
 for opt in options:
@@ -1265,11 +1274,12 @@ for opt in options:
        if o== '--help' or o == '-h':
                help ()
                sys.exit (0)
-       if o == '--version' or o == '-v':
+       elif o == '--version' or o == '-v':
                print_version ()
                sys.exit(0)
-               
-       if o == '--output' or o == '-o':
+       elif o == '--strict' or o == '-s':
+               strict = 1
+       elif o == '--output' or o == '-o':
                out_filename = a
        else:
                print o
index f7f734b8f258e83b770639482856860cd57b8d22..fd5386915babe6e225f9a6ba3e524e45c487bac7 100644 (file)
@@ -188,7 +188,9 @@ class LatexPaper:
                elif name[-5:] == 'paper':
                        self.m_papersize = name
                else:
-                       self._set_dimen('m_geo_'+name, value)
+                               pass 
+                       # what is _set_dimen ?? /MB
+                               #self._set_dimen('m_geo_'+name, value)
        def __setattr__(self, name, value):
                if type(value) == type("") and \
                   dimension_conversion_dict.has_key (value[-2:]):
index 77ebe9808c3134e9472defca0475834b35e97ac9..eaceb590af6066c0571cb9a382e03307b6502977 100644 (file)
@@ -67,9 +67,19 @@ import operator
 import tempfile
 import traceback
 
-datadir = '@datadir@'
-sys.path.append ('@datadir@/python')
-sys.path.append ('@datadir@/buildscripts/out')
+datadir = ''
+
+if '@datadir@' == ('@' + 'datadir' + '@'):
+       datadir = os.environ['LILYPONDPREFIX']
+else:
+       datadir = '@datadir@'
+
+while datadir[-1] == os.sep:
+       datadir = datadir[:-1]
+
+
+sys.path.append (os.path.join (datadir, 'python'))
+sys.path.append (os.path.join (datadir, 'buildscripts/out'))   
 
 try:
        import gettext
@@ -112,6 +122,7 @@ option_definitions = [
 
 from lilylib import *
 
+# verbose_p = 1 # arg!
 
 layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle',
          'footer', 'head', 'composer', 'arranger', 'instrument',
@@ -170,6 +181,7 @@ environment = {
        'GS_LIB' : datadir + '/ps',
 }
 
+
 def setup_environment ():
        for key in environment.keys ():
                val = environment[key]
@@ -177,6 +189,25 @@ def setup_environment ():
                        val = os.environ[key] + os.pathsep + val 
                os.environ[key] = val
 
+#what a name.
+def set_setting (dict, key, val):
+       try:
+               val = string.atof (val)
+       except ValueError:
+               #warning (_ ("invalid value: %s") % `val`)
+               pass
+
+       try:
+               dict[key].append (val)
+       except KeyError:
+               warning (_ ("no such setting: %s") % `key`)
+               dict[key] = [val]
+
+
+def print_environment ():
+       for (k,v) in os.environ.items ():
+               sys.stderr.write ("%s=\"%s\"\n" % (k,v)) 
+
 def run_lilypond (files, outbase, dep_prefix):
        opts = ''
 #      opts = opts + '--output=%s.tex' % outbase
@@ -196,11 +227,14 @@ def run_lilypond (files, outbase, dep_prefix):
        fs = string.join (files)
 
        if not verbose_p:
-               progress ( _("Running %s...") % 'LilyPond')
                # cmd = cmd + ' 1> /dev/null 2> /dev/null'
+               progress ( _("Running %s...") % 'LilyPond')
        else:
                opts = opts + ' --verbose'
-       
+
+               # for better debugging!
+               print_environment ()
+       print opts, fs  
        system ('lilypond %s %s ' % (opts, fs))
 
 def analyse_lilypond_output (filename, extra):