From: Han-Wen Nienhuys Date: Sat, 14 Jul 2001 14:41:38 +0000 (+0200) Subject: release: 1.5.2 X-Git-Tag: release/1.5.2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=528e7b6840aa4bd8e23f69c3f6842b124cee26ae;p=lilypond.git release: 1.5.2 ========== * small bugfixes for grace-init.ly * Bugfix: don't mess up spacing when combining different tuplets. * Small bugfixes for lilypond-mode.el. * property-init.ly: bugfix for dot directions in polyphonic music. 1.5.1.j --- diff --git a/CHANGES b/CHANGES index ef2cfe9c85..9aae7780b3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,19 @@ -*** WARNING(reminder): all output via TeX (ie: using ly2dvi or plain -*** lilypond) still yields broken stems, bars and staff lines. +1.5.1.hwn1 +========== + +* small bugfixes for grace-init.ly + +* Bugfix: don't mess up spacing when combining different tuplets. + +* Small bugfixes for lilypond-mode.el. + +* property-init.ly: bugfix for dot directions in polyphonic music. 1.5.1.jcn3 ========== +* Bugfix: text2html: escape entities inside
.
+
 * Added some template .ly's for evaluation.
 
 * Make blot work without -fps too.
@@ -23,7 +33,6 @@ that uses Thread contexts.
 
 1.5.0
 =====
-
 1.5.0.jcn1
 ==========
 
diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely
index a75fb37c1a..1b26344f9e 100644
--- a/Documentation/topdocs/index.tely
+++ b/Documentation/topdocs/index.tely
@@ -7,7 +7,10 @@
 
 @html
 

-[logo] + +[picture of lily-cello-girl] + @end html diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index bc69709524..0250be7066 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -223,6 +223,11 @@ of the code is used. @item printfilename Prints the file name before the music example. Useful in conjunction with @code{\lilypondfile}. +@item relative, relative @var{N} + Use relative octave mode. By default, notes are specified relative + central C. The optional integer argument specifies how many octaves + higher (positive number) or lower (negative number) to place the + starting note. @end table @section Invocation diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi index 5e4f97c6c2..9f91398699 100644 --- a/Documentation/user/ly2dvi.itexi +++ b/Documentation/user/ly2dvi.itexi @@ -138,6 +138,9 @@ block. @item papersize The paper size (as a name, e.g. @code{a4}). It is normally read from the @code{\paper} block. + +@item pagenumber + If set to @code{no}, no page numbers will be printed. @end table @unnumberedsubsec Environment variables diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 7a4bc4379b..7ca511494d 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -395,7 +395,7 @@ should last. With this, you can make lots of tuplets while typing @lilypond[fragment, relative, singleline, verbatim] \property Voice.tupletSpannerDuration = #(make-moment 1 4) -\times 2/3 { c''8 c c c c c } +\times 2/3 { c'8 c c c c c } @end lilypond The format of the number is determined by the property @@ -975,7 +975,7 @@ after the last note: @lilypond[fragment,relative,verbatim] \context Staff { - r4 [r8 g'' a r8] r8 [g | a] r8 + r4 [r8 g' a r8] r8 [g | a] r8 } @end lilypond Whenever an manual beam is busy, the automatic beamer will not produce @@ -991,7 +991,7 @@ property, it's value will be used only once, and then it is erased. @lilypond[fragment,relative,verbatim] \context Staff { - [f'8 r16 f g a] + [f8 r16 f g a] [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a] } @end lilypond @@ -1009,7 +1009,7 @@ Set @code{height} to zero, to get horizontal beams: @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'direction = #1 \property Voice.Beam \set #'height = #0 - [a''8 e' d c] + [a'8 e' d c] @end lilypond Here's how you'd specify a weird looking beam that instead of being @@ -1018,7 +1018,7 @@ horizontal, falls two staff spaces: @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'staff-position = #4 \property Voice.Beam \set #'height = #-4 - [c'8 c] + [c8 c] @end lilypond @cindex @code{default-neutral-direction} @@ -1055,7 +1055,7 @@ pair of symbols, specifying the attachment type of the left and right end points @lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 \property Voice.Stem \set #'length = #5.5 - g''8(g)g4 + g'8(g)g4 \property Voice.Slur \set #'attachment = #'(stem . stem) g8(g)g4 @end lilypond @@ -1067,7 +1067,7 @@ stems might look better: @lilypond[fragment,relative,verbatim] \property Voice.Stem \set #'direction = #1 \property Voice.Slur \set #'direction = #1 - d'32( d'4 )d8.. + d32( d'4 )d8.. \property Voice.Slur \set #'attachment = #'(stem . stem) d,32( d'4 )d8.. @end lilypond @@ -1085,7 +1085,7 @@ indicate this preference by increasing the @code{beautiful} value: @lilypond[verbatim,singleline,relative] \property Voice.Beam \override #'direction = #-1 \property Voice.Slur \override #'direction = #1 - c'16( a' f' a a f a, )c, + c16( a' f' a a f a, )c, c( a' f' a a f d, )c \property Voice.Slur \override #'beautiful = #5.0 c( a' f' a a f d, )c @@ -1109,7 +1109,7 @@ indicate a musical sentence. It is started using @code{\(} and @code{\)} respectively. @lilypond[fragment,verbatim,center,relative] - \time 6/4 c'' \( ( d ) e f ( e ) \) d + \time 6/4 c' \( ( d ) e f ( e ) \) d @end lilypond Typographically, the phrasing slur behaves almost exactly like a normal @@ -1398,7 +1398,7 @@ A glissando line (grob @code{Voice.Glissando}) can be requested by attaching a @code{\glissando} to a note: @lilypond[fragment,relative,verbatim] - c''-\glissando c' + c'-\glissando c' @end lilypond @refbugs @@ -1440,7 +1440,7 @@ note: @code{c4-\ff}. The available dynamic marks are: @code{\ppp}, @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}. @lilypond[verbatim,singleline,fragment,relative] - c''\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff + c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff c2\sf c\rfz @end lilypond @@ -1478,7 +1478,7 @@ is an example how to do it: \context Voice { \property Voice.crescendoText = "cresc." \property Voice.crescendoSpanner = #'dashed-line - a''2\mf\< a a \!a + a'2\mf\< a a \!a } @end lilypond @@ -1858,7 +1858,7 @@ You can specify an arpeggio sign on a chord by attaching an @lilypond[fragment,relative,verbatim] - \context Voice + \context Voice @end lilypond When an arpeggio crosses staffs in piano music, you attach an arpeggio @@ -1868,7 +1868,7 @@ to the chords in both staffs, and set @lilypond[fragment,relative,verbatim] \context PianoStaff < \property PianoStaff.connectArpeggios = ##t - \context Voice = one { } + \context Voice = one { } \context Voice = other { \clef bass } > @end lilypond @@ -1900,7 +1900,7 @@ can be printed automatically. This is enabled if the property \context PianoStaff < \property PianoStaff.followVoice = ##t \context Staff \context Voice { - c'1 + c1 \translator Staff=two b2 a } @@ -3247,7 +3247,7 @@ commands won't work with direct PostScript output (see @ref{PostScript output}). @lilypond[fragment,relative,verbatim] - a''^"3 $\\times$ \\`a deux" + a'^"3 $\\times$ \\`a deux" @end lilypond You can also use raw PostScript commands embedded in text scripts. This diff --git a/VERSION b/VERSION index 8fd02b1f0c..3bda81d233 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=1 -MY_PATCH_LEVEL=jcn4 +PATCH_LEVEL=2 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/configure b/configure index 41c09323d3..21e84bc95a 100755 --- a/configure +++ b/configure @@ -2877,10 +2877,12 @@ else {last =0}} warn_b=yes fi - + GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` + GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` + ## The GUILE_FLAGS macro. echo $ac_n "checking for Guile""... $ac_c" 1>&6 -echo "configure:2884: checking for Guile" >&5 +echo "configure:2886: checking for Guile" >&5 if ! $guile_config link > /dev/null ; then echo "$ac_t"""cannot execute $guile_config"" 1>&6 { echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; } @@ -2895,7 +2897,7 @@ echo "configure:2884: checking for Guile" >&5 # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2899: checking for $ac_word" >&5 +echo "configure:2901: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2929,6 +2931,14 @@ else fi + cat >> confdefs.h <> confdefs.h <&6 -echo "configure:2949: checking for $ac_hdr" >&5 +echo "configure:2959: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2982,7 +2992,7 @@ fi done echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6 -echo "configure:2986: checking for kpse_find_file in -lkpathsea" >&5 +echo "configure:2996: checking for kpse_find_file in -lkpathsea" >&5 ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2990,7 +3000,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkpathsea $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3034,12 +3044,12 @@ fi for ac_func in kpse_find_file do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3038: checking for $ac_func" >&5 +echo "configure:3048: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3092,7 +3102,7 @@ done fi echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6 -echo "configure:3096: checking whether to use kpathsea" >&5 +echo "configure:3106: checking whether to use kpathsea" >&5 if test "$kpathsea_b" = yes; then echo "$ac_t""yes" 1>&6 KPATHSEA=1 @@ -3113,7 +3123,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3117: checking for $ac_word" >&5 +echo "configure:3127: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX2HTML'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3154,7 +3164,7 @@ test -n "$BIBTEX2HTML" || BIBTEX2HTML="error" echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3158: checking for 8-bit clean memcmp" >&5 +echo "configure:3168: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3162,7 +3172,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3193,12 +3203,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3197: checking for vprintf" >&5 +echo "configure:3207: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3248,12 +3258,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3252: checking for _doprnt" >&5 +echo "configure:3262: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3306,12 +3316,12 @@ fi for ac_func in memmem snprintf vsnprintf gettext isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3310: checking for $ac_func" >&5 +echo "configure:3320: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3377,7 +3387,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3381: checking for $ac_word" >&5 +echo "configure:3391: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3409,7 +3419,7 @@ test -n "$MAKEINFO" || MAKEINFO="error" if test "$MAKEINFO" != "error"; then echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6 -echo "configure:3413: checking whether makeinfo can split html by @node" >&5 +echo "configure:3423: checking whether makeinfo can split html by @node" >&5 mkdir -p out makeinfo --html --output=out/split <&6 -echo "configure:3441: checking for $ac_word" >&5 +echo "configure:3451: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/flower/include/array.icc b/flower/include/array.icc index 6ede38df66..46194f587f 100644 --- a/flower/include/array.icc +++ b/flower/include/array.icc @@ -108,3 +108,41 @@ Array::slice (int lower, int upper) const return r; } + +/* + lookup with binsearch, return array index. +*/ +template +int +binary_search (Array const &table, + T const &key, int (*compare) (T const&, T const &), + int lo = 0, + int hi = -1 + ) +{ + int cmp; + int result; + if (hi < 0) + hi = table.size (); + + /* binary search */ + do + { + cmp = (lo + hi) / 2; + + result = (*compare) (key, table[cmp]); + + if (result < 0) + hi = cmp; + else + lo = cmp; + } + while (hi - lo > 1); + if (! (*compare) (key, table[lo])) + { + return lo; + } + else + return -1; /* not found */ +} + diff --git a/flower/include/parray.hh b/flower/include/parray.hh index 52399b1718..c39ec2500b 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -265,14 +265,13 @@ binsearch_array (Array const &arr, T t, int (*compare) (T const&,T const&)) template int binsearch_link_array (Link_array const &arr, T *t, - int (*compare) (T *const&,T *const&)) + int (*compare) (T *const&,T *const&), + int lo = 0, int hi = -1 ) { - int lo; - int hi; int cmp; int result; - lo = 0; - hi = arr.size (); + if (hi< 0) + hi = arr.size (); if (hi == 0) return -1; diff --git a/input/bugs/1st-note-spacing.ly b/input/bugs/1st-note-spacing.ly new file mode 100644 index 0000000000..f6170027fd --- /dev/null +++ b/input/bugs/1st-note-spacing.ly @@ -0,0 +1,8 @@ + +\score {\notes \relative c'' < +\context Staff = SA { \times 6/7 { [c8 c c c c c c] } } +\context Staff = SB { \times 6/6 { [c c c c c c] } } +> + +\paper { linewidth = -1. } +} diff --git a/input/bugs/standchen-space.ly b/input/bugs/standchen-space.ly new file mode 100644 index 0000000000..7d9e6322ab --- /dev/null +++ b/input/bugs/standchen-space.ly @@ -0,0 +1,9 @@ + +\score { +\notes \relative c' < +\context Staff = SA { c4. c8 \times 2/3 { [c8 c c] } } +\context Staff = SB { c8 c c c c c } +> + +\paper { linewidth = -1. } +} diff --git a/input/scarlatti-test.ly b/input/scarlatti-test.ly index eec0faa0f0..9d02a9eb8f 100644 --- a/input/scarlatti-test.ly +++ b/input/scarlatti-test.ly @@ -1,6 +1,9 @@ \version "1.3.146" %K000.ly LilyPond 1.2.16 - +\header { +title="John's Scarlatti quotes" +composer = "Domenico Scarlatti" +} \include "scarlatti-properties.ly" @@ -45,7 +48,7 @@ xb={\property Voice.noAutoBeaming=##t} \context Voice=va< \zs \su \context Thread=ta{ \n -\rh \sm[\times 2/3{a'32_"John's Scarlatti quotes" d'' fis''}\n a''16]a'8 g'~ +\rh \sm[\times 2/3{a'32 d'' fis''}\n a''16]a'8 g'~ %a2 g'8 _"1 Aug 2000" \times 2/3{a'16 b' cis'' d'' fis'' g''}| %a3 diff --git a/input/test/chord-banter.ly b/input/test/chord-banter.ly new file mode 100644 index 0000000000..74327da615 --- /dev/null +++ b/input/test/chord-banter.ly @@ -0,0 +1,54 @@ +\version "1.3.146" +\header{ +filename = "chord-table.ly" +copyright = "public domain" +enteredby = "jcn" +} + +tab = \notes\transpose c'''\chords{ + c1 c:m c:4 c:m4 c:5+ \break + c:5- c:dim c:5-.5+ c:6 c:m6\break + c:4.6 c:7 c:m7 c:4.7 c:m4.7\break + c:5+.7 c:5-.7 c:m5-.7 c:maj c:m.maj\break + c:4.maj c:m4.maj c:5+.maj c:m4+.maj c:5-.maj\break + c1:m5-.maj c:dim7 c:5-.5+.7 c:6.maj c:m6.maj\break + c:4.6.maj c:9 c:m9 c:4.9 c:m.4.9\break +} + +\score{ +% \context StaffGroup < + < + \context Staff=c \notes\transpose c\tab + \context ChordNames=c \notes\transpose c\tab +%{ + \context Staff=cis \notes\transpose cis\tab + \context ChordNames=cis \notes\transpose cis\tab + \context Staff=des \notes\transpose des\tab + \context ChordNames=des \notes\transpose des\tab + \context Staff=d \notes\transpose d\tab + \context ChordNames=d \notes\transpose d\tab + \context Staff=es \notes\transpose es\tab + \context ChordNames=es \notes\transpose es\tab + \context Staff=e \notes\transpose e\tab + \context ChordNames=e \notes\transpose e\tab + \context Staff=fis \notes\transpose fis\tab + \context ChordNames=fis \notes\transpose fis\tab + \context Staff=g \notes\transpose g\tab + \context ChordNames=g \notes\transpose g\tab + \context Staff=as \notes\transpose as\tab + \context ChordNames=as \notes\transpose as\tab + \context Staff=a \notes\transpose a\tab + \context ChordNames=a \notes\transpose a\tab + \context Staff=bes \notes\transpose bes,\tab + \context ChordNames=bes \notes\transpose bes,\tab + \context Staff=b \notes\transpose b,\tab + \context ChordNames=b \notes\transpose b,\tab +%} + > + \paper{ + textheight = \vsize - 4.0 * \staffheight + } + +} + + diff --git a/lily/chord.cc b/lily/chord.cc index 3cf7aa3312..233c5722d2 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -298,6 +298,10 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) for (SCM i = add; gh_pair_p (i); i = gh_cdr (i)) { Pitch* p = unsmob_pitch (gh_car (i)); + /* Ugr + This chord modifier stuff should really be fixed + Cmaj7 yields C 7/7- + */ if (p->octave_i () == -100) { p->octave_i_ = 0; @@ -322,7 +326,10 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) if (highest_step < 5) tmp = ly_snoc (fifth, tmp); else if (dim_b) - add = lower_step (tonic, add, gh_int2scm (5)); + { + add = lower_step (tonic, add, gh_int2scm (5)); + add = lower_step (tonic, add, gh_int2scm (7)); + } /* find missing thirds */ SCM missing = missing_thirds (tmp); diff --git a/lily/include/keyword.hh b/lily/include/keyword.hh index c2c6338a0a..8518f958da 100644 --- a/lily/include/keyword.hh +++ b/lily/include/keyword.hh @@ -7,11 +7,13 @@ #ifndef KEYWORD_HH #define KEYWORD_HH +#include "array.hh" + /* for the keyword table */ struct Keyword_ent { - char const *name; - int tokcode; + char const *name_; + int tokcode_; }; /* @@ -19,8 +21,8 @@ struct Keyword_ent */ struct Keyword_table { - Keyword_ent *table; - int maxkey; + Array table_; + Keyword_table (Keyword_ent *); int lookup (char const *s) const; }; diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index 6660379575..507ba6f0fe 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -34,7 +34,7 @@ public: static int rank_i (Grob*); Paper_column (SCM); - bool musical_b () const; + static bool musical_b (Grob *); static Moment when_mom (Grob*); static bool used_b (Grob*) ; diff --git a/lily/keyword.cc b/lily/keyword.cc index e235d6a973..de6aca9e49 100644 --- a/lily/keyword.cc +++ b/lily/keyword.cc @@ -7,56 +7,29 @@ /* for qsort */ -int - tabcmp (void const * p1, void const * p2) +int tabcmp (Keyword_ent const &p1, Keyword_ent const &p2) { - return strcmp (( (Keyword_ent const *) p1)->name, - ((Keyword_ent const *) p2)->name); + return strcmp (p1.name_, p2.name_); } Keyword_table::Keyword_table (Keyword_ent *tab) { - table = tab; - - /* count keywords */ - for (maxkey = 0; table[maxkey].name; maxkey++) - ; + while (tab->name_) + { + table_.push (*tab++); + } - /* sort them */ - qsort (table, maxkey, sizeof (Keyword_ent), tabcmp); + table_.sort (tabcmp); } -/* - lookup with binsearch, return tokencode. -*/ int Keyword_table::lookup (char const *s) const { - int lo; - int hi; - int cmp; - int result; - lo = 0; - hi = maxkey; - - /* binary search */ - do - { - cmp = (lo + hi) / 2; - - result = strcmp (s, table[cmp].name); - - if (result < 0) - hi = cmp; - else - lo = cmp; - } - while (hi - lo > 1); - if (!strcmp (s, table[lo].name)) - { - return table[lo].tokcode; - } + Keyword_ent e ; + e.name_ = s; + int idx = binary_search (table_, e, tabcmp); + if (idx >= 0) + return table_[idx].tokcode_; else - return -1; /* not found */ + return -1; } - diff --git a/lily/music-list.cc b/lily/music-list.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/paper-column.cc b/lily/paper-column.cc index e9cd3be70e..14774ed651 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -59,19 +59,20 @@ Paper_column::when_mom (Grob*me) } return s; } - + bool -Paper_column::musical_b () const +Paper_column::musical_b (Grob *me) { - SCM m = get_grob_property ("shortest-starter-duration"); + SCM m = me->get_grob_property ("shortest-starter-duration"); Moment s (0); if (unsmob_moment (m)) { s = *unsmob_moment (m); } return s != Moment (0); + } - + bool Paper_column::used_b (Grob*me) { diff --git a/lily/parser.yy b/lily/parser.yy index 157988a735..4f4747ab5a 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1825,10 +1825,11 @@ chord_step: $$ = gh_cons ($1, SCM_EOL); } | CHORDMODIFIER_PITCH { - $$ = gh_cons ($1, SCM_EOL); + $$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL); } | CHORDMODIFIER_PITCH chord_note { /* Ugh. */ - $$ = gh_list ($1, $2, SCM_UNDEFINED); + $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (), + $2, SCM_UNDEFINED); } ; diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 31d44a0d7e..1bff342744 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -23,6 +23,73 @@ Spacing_spanner::set_interface (Grob*me) me->set_extent_callback (SCM_EOL, Y_AXIS) ; } +#if 0 +struct Note_run +{ + Array idxes; + int start, end; + Moment duration; + int count; +}; + +int +column_compare (Grob *const &t1, Grob *const &t2) +{ + return Moment::compare (Paper_column::when_mom (t1), + Paper_column::when_mom (t2)); +} + + +Note_run +run_length (Moment dt, int i, Array const &moms, + Link_array runs) +{ + int k = 0; + Array idxes; + + idxes.push (i); + while (1) + { + Moment next = moms[i] + dt; + while (i < moms.size () && moms[i] < next) + i++; + if (i == moms.size () || moms[i] != next) + break; + + idxes.push (i); + k++; + } + + Moment dur = idxes.size () +} + +void +find_runs (Grob*me, Link_array cols) +{ + Link_array filter_cols; + Array col_moments; + for (int i = 0; i < cols.size (); i++) + { + Moment w = Paper_column::when_mom (cols[i]); + + if (!w.grace_mom_ && Paper_column::musical_b (cols[i])) + { + filter_cols.push (cols[i]); + col_moments.push (w); + } + } + + Moment end_mom = col_moments.top (); + for (int i = 0; i < col_moments.size () ; i++) + { + for (int j = i+1; j < col_moments.size (); j++) + { + Moment dt = Paper_column::col_momentsfilter_cols + } + } +} +#endif + /* The algorithm is partly taken from : @@ -51,7 +118,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array cols) int n = 0; for (int i =0 ; i < cols.size (); i++) { - if (dynamic_cast (cols[i])->musical_b ()) + if (Paper_column::musical_b (cols[i])) { Moment *when = unsmob_moment (cols[i]->get_grob_property ("when")); @@ -116,11 +183,11 @@ Spacing_spanner::do_measure (Grob*me, Link_array cols) left_distance = gh_scm2double (gh_cdr (hint)); } // 2nd condition should be (i+1 < col_count ()), ie. not the last column in score. FIXME - else if (!lc->musical_b () && i+1 < cols.size ()) + else if (!Paper_column::musical_b (lc) && i+1 < cols.size ()) { left_distance= default_bar_spacing (me,lc,rc,shortest musical_b ()) + else if (Paper_column::musical_b ( lc)) { left_distance = note_spacing (me,lc, rc, shortest cols) /* don't want to create too much extra space for accidentals */ - if (rc->musical_b ()) + if (Paper_column::musical_b (rc)) { if (to_boolean (rc->get_grob_property ("contains-grace"))) right_dist *= gh_scm2double (rc->get_grob_property ("before-grace-spacing-factor")); // fixme. @@ -271,7 +338,13 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc, } Moment delta_t = Paper_column::when_mom (rc) - Paper_column::when_mom (lc); Real dist = get_duration_space (me, shortest_playing_len, shortest); - dist *= (double) (delta_t / shortest_playing_len); + + + /* + ugh: 0.1 is an arbitrary distance. + */ + dist *= (double) (delta_t.main_part_ / shortest_playing_len.main_part_) + + 0.1 * (double) (delta_t.grace_mom_ / shortest_playing_len.main_part_); diff --git a/lilypond-mode.el b/lilypond-mode.el index bf72c82cfa..b8214e2a7c 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -31,6 +31,9 @@ (defvar LilyPond-kick-xdvi nil "If true, no simultaneous xdvi's are started, but reload signal is sent.") +(defvar LilyPond-command-history nil + "Command history list.") + (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'.") @@ -228,7 +231,7 @@ Must be the car of an entry in `LilyPond-command-alist'." (answer (or LilyPond-command-force (completing-read (concat "Command: (default " default ") ") - LilyPond-command-alist nil t)))) + LilyPond-command-alist nil t nil 'LilyPond-command-history)))) ;; If the answer is "LilyPond" it will not be expanded to "LilyPond" (let ((answer (car-safe (assoc answer LilyPond-command-alist)))) @@ -454,7 +457,7 @@ LilyPond-xdvi-command\t\tcommand to display dvi files -- bit superfluous" (setq comment-start-skip "%{? *") (make-local-variable 'comment-end) - (setq comment-end "\n") + (setq comment-end "") (make-local-variable 'block-comment-start) (setq block-comment-start "%{") diff --git a/ly/grace-init.ly b/ly/grace-init.ly index 54211cb4d9..92e9c30c2f 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -1,58 +1,38 @@ - - #(define (grace-beam-space-function multiplicity) - (* (if (<= multiplicity 3) 0.816 0.844) 0.8)) - - - #(define (make-text-checker text) - (lambda (elt) (equal? text (ly-get-grob-property elt 'text)))) +#(define (grace-beam-space-function multiplicity) + (* (if (<= multiplicity 3) 0.816 0.844) 0.8)) startGraceMusic = { - -%{ -from GraceContext - Stem \override #'flag-style = #"grace" - Stem \override #'stem-length = #6.0 - Stem \override #'direction = #1 - - NoteHead \override #'font-relative-size = #-1 - Stem \override #'font-relative-size = #-1 - Stem \override #'stem-shorten = #'(0) - Beam \override #'font-relative-size = #-1 - TextScript \override #'font-relative-size = #-1 - Slur \override #'font-relative-size = #-1 - Accidentals \override #'font-relative-size = #-1 - Beam \override #'thickness = #0.3 - Beam \override #'space-function = #(lambda (x) 0.5) - - Stem \override #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)) - Stem \override #'beamed-lengths = - #'(0.0 2.5 2.0 1.5) - Stem \override #'beamed-minimum-lengths - = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5)) -%} - - - \property Voice.NoteHead \override #'font-relative-size = #-1 + \property Voice.Stem \override #'direction = #1 \property Voice.Stem \override #'length = #6 + \property Voice.Stem \override #'lengths = + #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)) \property Voice.Stem \override #'beamed-lengths = #(map (lambda (x) (* 1.25 x)) '(0.0 2.5 2.0 1.5)) \property Voice.Stem \override #'beamed-minimum-lengths = #(map (lambda (x) (* 1.25 x)) '(0.0 1.5 1.25 1.0)) - \property Voice.Beam \override #'space-function = #grace-beam-space-function - \property Voice.fontSize = #-2 \property Voice.Stem \override #'no-stem-extend = ##t + \property Voice.Stem \override #'flag-style = #"grace" -% \property Voice.Stem \override #'flag-style = #"grace" + \property Voice.Beam \override #'space-function = #grace-beam-space-function + \property Voice.Beam \override #'thickness = #0.3 + + % must use staff. Accidentals should also be smaller. + \property Staff.fontSize = #-2 } stopGraceMusic = { -% \property Voice.Stem \revert #'flag-style - \property Voice.Stem \override #'no-stem-extend = ##f - \property Voice.Stem \revert #'length + \property Voice.Beam \revert #'space-function + \property Voice.Beam \revert #'thickness + + \property Voice.Stem \revert #'flag-style + \property Voice.Stem \revert #'no-stem-extend \property Voice.Stem \revert #'beamed-lengths \property Voice.Stem \revert #'beamed-minimum-lengths - \property Voice.Beam \revert #'space-function - \property Voice.fontSize \unset + \property Voice.Stem \revert #'lengths + \property Voice.Stem \revert #'length + \property Voice.Stem \revert #'direction + + \property Staff.fontSize \unset } diff --git a/ly/property-init.ly b/ly/property-init.ly index 84c8d2d46e..83ea32eb9a 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -44,6 +44,11 @@ scriptBoth = { \property Voice.Script \revert #'direction } +dotsUp = \property Voice.Dots \override #'direction = #1 +dotsDown = \property Voice.Dots \override #'direction = #-1 +dotsBoth = \property Voice.Dots \revert #'direction + +% why doubly? tupletUp = { \property Voice.TupletBracket \override #'direction = #1 \property Voice.TupletBracket \override #'direction = #1 @@ -84,12 +89,15 @@ voiceOne = { \stemUp \slurUp \tieUp + \dotsUp } voiceTwo = { \stemDown \slurDown \tieDown + \dotsDown + } voiceThree = { @@ -97,6 +105,7 @@ voiceThree = { \slurUp \tieUp \shiftOn + \dotsUp } voiceFour = { @@ -104,6 +113,7 @@ voiceFour = { \slurDown \tieDown \shiftOn + \dotsDown } % There's also dash, but setting dash period/length should be fixed. diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 3d2ba15999..f4d8f31095 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.1 -Entered-date: 03JUL01 +Version: 1.5.2 +Entered-date: 15JUL01 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.1.tar.gz + 1000k lilypond-1.5.2.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.1.tar.gz + 1000k lilypond-1.5.2.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index 30b417e5a4..f8843949ca 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.5.1 +Version: 1.5.2 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.2.tar.gz Summary: Create and print music notation URL: http://www.cs.uu.nl/~hanwen/lilypond BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index 4effed481d..4b7115682e 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.5.1 +Version: 1.5.2 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.2.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 52afa03421..004aededa2 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -52,7 +52,11 @@ (((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4") " " )) ;; Cdim iso Cm5- (((0 . 0) (2 . -1) (4 . -1)) . ("dim")) - ; Co iso Cm5-7- + ; URG: Simply C:m5-/maj7 iso Cdim maj7 + (((0 . 0) (2 . -1) (4 . -1) (6 . 0)) . ("m" (super "5-/maj7" " "))) + ; URG: Simply C:m5-/7 iso Cdim7 + (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . ("m" (super "5-/7" " "))) + ; Co iso C:m5-/7- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") " ")) ; Cdim9 (((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9") " ")) @@ -308,18 +312,19 @@ ;; additions, subtractions and bass or inversion into chord name (define (chord::inner-name-banter tonic exception-part additions subtractions bass-and-inversion steps) - (let ((tonic-text (pitch->chord-name-text-banter tonic steps)) - (except-text exception-part) - (sep-text (if (and (string-match "super" (format "~s" exception-part)) + (let* ((tonic-text (pitch->chord-name-text-banter tonic steps)) + (except-text exception-part) + (sep-text (if (and (string-match "super" (format "~s" except-text)) (or (pair? additions) (pair? subtractions))) (list simple-super "/"))) - (adds-text (chord::additions->text-banter additions subtractions)) - (subs-text (chord::subtractions->text-banter subtractions)) - (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion))) + (adds-text (chord::additions->text-banter additions subtractions)) + (subs-text (chord::subtractions->text-banter subtractions)) + (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion))) (text-append - tonic-text except-text sep-text - (list (list simple-super) adds-text subs-text) + tonic-text except-text " " sep-text + ;;(list (list simple-super) adds-text subs-text) + (list (list '((raise . 1) (font-relative-size . -1))) adds-text subs-text) b+i-text))) (define (chord::name-banter tonic exception-part unmatched-steps diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index e4efd1652a..e70fe1037f 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -401,7 +401,9 @@ output_dict= { @end tex @html

- + +[picture of music] + @end html """, } diff --git a/stepmake/bin/text2html.py b/stepmake/bin/text2html.py index b7f9c922c2..c2424deeba 100644 --- a/stepmake/bin/text2html.py +++ b/stepmake/bin/text2html.py @@ -1,8 +1,24 @@ #@PYTHON@ import os +import re import string import sys + +entities = { + "&" : 'amp', + "`" : 'apos', + '>' : 'gt', + '<' : 'lt', + '"' : 'quot', + } + +def txt2html (s): + for i in entities.keys (): + s = re.sub (i, '\001' + entities[i] + ';', s); + s = re.sub ('\001', '&', s); + return s + for a in sys.argv[1:]: # hmm, we need: text2html out/foe.txt -> out/foe.html, # -o is a bit overkill? @@ -18,7 +34,7 @@ for a in sys.argv[1:]:

 %s
 
-""" % open (a).read () +""" % txt2html (open (a).read ()) open (outfile, 'w').write (s)