From: Han-Wen Nienhuys Date: Sun, 14 Oct 2001 13:16:15 +0000 (+0200) Subject: release: 1.5.17 X-Git-Tag: release/1.5.17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5c2afd9ecbe4d91998a325f6323f05ea4d658d96;hp=d0f36b0ba5d2c42a25f056f66feda954094fdead;p=lilypond.git release: 1.5.17 =========== * Emacs-mode: Inserting tags * Enable python2.1/Python.h 1.5.16.h --- diff --git a/AUTHORS.txt b/AUTHORS.txt index 3a1949d8ac..2f561d831b 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -82,5 +82,6 @@ list is alphabetically ordered. * August S.Sigov Russian translation - * Rune Zedeler Drum notation + * Rune Zedeler Drum notation, beaming and + accidental fixes diff --git a/CHANGES b/CHANGES index 58ed8ae144..f2983b1216 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,31 @@ -1.5.16.jcn1 +1.5.16.hjj2 =========== -* Some more random hacking at midi2ly.py. +* Emacs-mode: Inserting tags -1.5.16 -====== +* Enable python2.1/Python.h + +1.5.16.hwn1 +=========== + +* Add unfold-repeats function (Rune Zedeler!) to standard init SCM file. + +* Bugfix: spacing is no longer confused by coupled clefs, where one of the +clefs is loose, and the other not. + +* Robustness fix for Slur. Don't crash if attachment not set. + +* Arpeggios can now have arrows on the top or bottom to determine +their direction. (MF code by Chris Jackson) + +* Symbol cache bugfix in system-start-delimiter.cc -- may switch +symbol cache off for gcc 2.96? + +* MikTeX PDF detection bugfix (Mats Bengtsson) + +* Some more random hacking at midi2ly.py. (jcn1) + +* Inline unsmob_XXX functions. Speedup of 6% on wtk1-fugue2. 1.5.15.jcn1 =========== diff --git a/Documentation/topdocs/AUTHORS.texi b/Documentation/topdocs/AUTHORS.texi index a6ec5460ca..600c935c35 100644 --- a/Documentation/topdocs/AUTHORS.texi +++ b/Documentation/topdocs/AUTHORS.texi @@ -84,7 +84,7 @@ list is alphabetically ordered. @item @email{august@@infran.ru, August S.Sigov} Russian translation @item @email{rune@@zedeler.dk, Rune Zedeler} - Drum notation + Drum notation, beaming and accidental fixes @end itemize @bye diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index fac04df277..093637d504 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1621,6 +1621,13 @@ the specified number of repeats. } @end lilypond +@subsection Unfolding repeats for MIDI output. + +@cindex expanding repeats + +See @file{input/test/unfold-all-repeats.ly}. + + @refbugs Notice that timing information is not remembered at the start of an @@ -1907,6 +1914,34 @@ to the chords in both staves, and set This command creates @code{Voice.Arpeggio} grobs. Cross staff arpeggios are @code{PianoStaff.Arpeggio}. +To add an arrow head to explicitly specify the direction of the +arpeggio, you should set the arpeggio grob property +@code{arpeggio-type}. + +@lilypond[fragment,relative,verbatim] + \context Voice { + \property Voice.Arpeggio \override #'arpeggio-direction = #1 + + \property Voice.Arpeggio \override #'arpeggio-direction = #-1 + + } +@end lilypond + +@ignore +A square bracket on the left indicates that the player should not +arpeggiate the chord. + +@lil ypond[fragment,relative,verbatim] + \context PianoStaff < + \property PianoStaff.connectArpeggios = ##t + \property PianoStaff.Arpeggio \override #'arpeggio-direction = #'bracket + \context Voice = one { } + \context Voice = other { \clef bass } + > +@ e nd lilypond +@end ignore + + @refbugs It is not possible to mix connected arpeggios and unconnected arpeggios diff --git a/VERSION b/VERSION index 8b65089dcf..d157673176 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=16 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=17 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/config.hh.in b/config.hh.in index aa81bd7190..972377ac50 100644 --- a/config.hh.in +++ b/config.hh.in @@ -41,6 +41,9 @@ /* define if you have kpse_find_tfm */ #define HAVE_KPSE_FIND_TFM 0 +/* define if you have python2.1/Python.h header */ +#define HAVE_PYTHON2_1_PYTHON_H 0 + /* define if you have python2.0/Python.h header */ #define HAVE_PYTHON2_0_PYTHON_H 0 diff --git a/configure b/configure index 3f9f6b4dcd..a46decc286 100755 --- a/configure +++ b/configure @@ -3497,7 +3497,7 @@ else fi -for ac_hdr in python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h +for ac_hdr in python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/configure.in b/configure.in index e64d0e859d..1597831177 100644 --- a/configure.in +++ b/configure.in @@ -53,7 +53,7 @@ AC_STEPMAKE_MAKEINFO AC_PATH_PROG(PERL, perl, error) -AC_HAVE_HEADERS(python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h) +AC_HAVE_HEADERS(python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h) AC_STEPMAKE_END diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 995700c55c..9373b48448 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -59,8 +59,10 @@ public: Rational (int, int); Rational (double); Rational (Rational const&r) { copy (r);} + Rational &operator = (Rational const &r) { + copy (r); return *this; + } - Rational &operator = (Rational const &); Rational &operator *= (Rational); Rational &operator /= (Rational); Rational &operator += (Rational); diff --git a/flower/rational.cc b/flower/rational.cc index b2b7c898ee..42e0c0a97c 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -271,16 +271,6 @@ Rational::operator -= (Rational r) return (*this += r); } -/* - be paranoid about overiding libg++ stuff - */ -Rational & -Rational::operator = (Rational const &r) -{ - copy (r); - return *this; -} - String Rational::str () const { diff --git a/input/bugs/cross-staff-tie.ly b/input/bugs/cross-staff-tie.ly new file mode 100644 index 0000000000..7dca649913 --- /dev/null +++ b/input/bugs/cross-staff-tie.ly @@ -0,0 +1,18 @@ + + + +\version "1.4.8" +\score { \notes + \context PianoStaff < + \context Staff = up { \clef G + c'2 ~ \translator Staff=down c' + } + \context Staff = down { \clef F + s1 + } + > + \paper { } +} + + + diff --git a/input/regression/arpeggio.ly b/input/regression/arpeggio.ly index 1f956f90a0..405098dd6c 100644 --- a/input/regression/arpeggio.ly +++ b/input/regression/arpeggio.ly @@ -11,6 +11,8 @@ Arpeggios are supported, both cross-staff and broken single staff. \context PianoStaff < \context Staff=one \notes\relative c''{ \context Voice < fis,-\arpeggio d a > + \property Staff.Arpeggio \override #'arpeggio-direction = #1 + \context Voice < fis,-\arpeggio d a > %%\property PianoStaff.SpanArpeggio \override #'connect = ##t \property PianoStaff.connectArpeggios = ##t @@ -18,6 +20,8 @@ Arpeggios are supported, both cross-staff and broken single staff. \context Staff=two \notes\relative c{ \clef bass \context Voice < g b d-\arpeggio > + \property Staff.Arpeggio \override #'arpeggio-direction = #-1 + \context Voice < g b d-\arpeggio > } > diff --git a/input/test/unfold-all-repeats.ly b/input/test/unfold-all-repeats.ly new file mode 100644 index 0000000000..6d35bbc565 --- /dev/null +++ b/input/test/unfold-all-repeats.ly @@ -0,0 +1,25 @@ + +\header { +texidoc = "The standard function unfold-repeats will recursively unfold +all repeats for correct MIDI output. Thanks to Rune Zedeler." +} + + +mel = \notes \context Staff { + \repeat tremolo 8 {c'32 e' } + \repeat percent 2 { c''8 d'' } + \repeat volta 2 {c'4 d' e' f'} + \alternative { + { g' a' a' g' } + {f' e' d' c' } + } + \bar "|." +} + +\score { \notes { + \mel \break + \apply #unfold-repeats \mel + } +} + + diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 5b0e755577..931030a16c 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -66,18 +66,30 @@ Arpeggio::brew_molecule (SCM smob) */ return SCM_EOL; } + + Direction dir = CENTER; + if (isdir_b (me->get_grob_property ("arpeggio-direction"))) + { + dir = to_dir (me->get_grob_property ("arpeggio-direction")); + } Molecule mol; - Molecule arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio"); + Font_metric *fm =Font_interface::get_default_font (me); + Molecule squiggle = fm->find_by_name ("scripts-arpeggio"); + Real arrow_space = (dir) ? Staff_symbol_referencer::staff_space (me) : 0.0; + Real y = heads[LEFT]; - while (y < heads[RIGHT]) + while (y < heads[RIGHT] - arrow_space) { - mol.add_at_edge (Y_AXIS, UP,arpeggio, 0.0); - y+= arpeggio. extent (Y_AXIS).length (); + mol.add_at_edge (Y_AXIS, UP,squiggle, 0.0); + y+= squiggle. extent (Y_AXIS).length (); } mol.translate_axis (heads[LEFT], Y_AXIS); - + if (dir) + mol.add_at_edge (Y_AXIS, dir, + fm->find_by_name ("scripts-arpeggio-arrow-" + to_str (dir)), 0.0); + return mol.smobbed_copy () ; } diff --git a/lily/duration.cc b/lily/duration.cc index 6476466774..f6ffb9145b 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -80,7 +80,6 @@ Duration::str () const IMPLEMENT_TYPE_P (Duration, "duration?"); -IMPLEMENT_UNSMOB (Duration, duration); SCM Duration::mark_smob (SCM) diff --git a/lily/font-metric.cc b/lily/font-metric.cc index d22da509ee..0fcf96fc11 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -121,7 +121,7 @@ Font_metric::print_smob (SCM s, SCM port, scm_print_state *) } -IMPLEMENT_UNSMOB (Font_metric, metrics); + IMPLEMENT_SMOBS (Font_metric); IMPLEMENT_DEFAULT_EQUAL_P (Font_metric); IMPLEMENT_TYPE_P (Font_metric, "font-metric?"); diff --git a/lily/grob.cc b/lily/grob.cc index 82b1771516..f55ee2f8e2 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -141,7 +141,7 @@ Grob::get_grob_property (SCM sym) const /* Remove the value associated with KEY, and return it. The result is - that a next call will yield SCM_UNDEFINED (and not the underlying + that a next call will yield SCM_EOL (and not the underlying `basic' property. */ SCM @@ -768,7 +768,7 @@ Grob::fixup_refpoint (SCM smob) ****************************************************/ -IMPLEMENT_UNSMOB (Grob, grob); + IMPLEMENT_SMOBS (Grob); IMPLEMENT_DEFAULT_EQUAL_P (Grob); diff --git a/lily/include/duration.hh b/lily/include/duration.hh index bdb988a1c3..7324349fdc 100644 --- a/lily/include/duration.hh +++ b/lily/include/duration.hh @@ -45,7 +45,7 @@ private: #include "compare.hh" INSTANTIATE_COMPARE (Duration, Duration::compare); -Duration*unsmob_duration (SCM); +DECLARE_UNSMOB(Duration,duration); // int compare (Array*, Array*); #endif // DURATION_HH diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index 87137221c3..d3ae05da69 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -34,7 +34,7 @@ protected: Font_metric (); }; -Font_metric * unsmob_metrics (SCM s); +DECLARE_UNSMOB(Font_metric, metrics); #endif /* FONT_METRIC_HH */ diff --git a/lily/include/grob.hh b/lily/include/grob.hh index e1820f9d07..0cabf6e0e1 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -174,7 +174,7 @@ public: DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM)); }; -Grob * unsmob_grob (SCM); +DECLARE_UNSMOB(Grob,grob); #endif // STAFFELEM_HH diff --git a/lily/include/input-smob.hh b/lily/include/input-smob.hh index 2cd9462d5d..c38c240edf 100644 --- a/lily/include/input-smob.hh +++ b/lily/include/input-smob.hh @@ -12,9 +12,10 @@ #include "input.hh" #include "lily-guile.hh" +#include "smobs.hh" SCM make_input (Input spot); -Input *unsmob_input (SCM); +Input *unsmob_input(SCM); extern Input dummy_input_global; diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index 69c7d2ecfe..f5b8f62c10 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -13,13 +13,6 @@ #include "smobs.hh" -#define IMPLEMENT_UNSMOB(CL, name) \ -CL * \ -unsmob_ ## name ( SCM s) \ -{ \ -return CL::unsmob (s); \ -} - #define IMPLEMENT_TYPE_P(CL, FUNCNAME)\ void init_type_p_ ## CL ()\ {\ @@ -64,14 +57,6 @@ SCM CL::smobbed_self () const \ \ return s; \ } \ -CL * \ -CL::unsmob (SCM s) \ -{ \ - if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_) \ - return (CL*) SCM_CELL_WORD_1 (s); \ - else \ - return 0; \ -} \ size_t \ CL::free_smob (SCM ses) \ { \ diff --git a/lily/include/lyric-phrasing-engraver.hh b/lily/include/lyric-phrasing-engraver.hh index 269d5a9658..8a336e55ae 100644 --- a/lily/include/lyric-phrasing-engraver.hh +++ b/lily/include/lyric-phrasing-engraver.hh @@ -118,7 +118,7 @@ private: DECLARE_SIMPLE_SMOBS (Syllable_group,); } ; -Syllable_group * unsmob_voice_entry (SCM); +DECLARE_UNSMOB(Syllable_group,voice_entry); #endif // LYRIC_PHRASING_ENGRAVER_HH diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index a8a3425279..214e3181a4 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -86,7 +86,7 @@ public: }; -Molecule *unsmob_molecule (SCM); +DECLARE_UNSMOB(Molecule,molecule); SCM fontify_atom (Font_metric*, SCM atom); Molecule create_molecule (SCM brew_molecule); diff --git a/lily/include/moment.hh b/lily/include/moment.hh index 4993b7691f..54a8ad9cd7 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -58,7 +58,7 @@ IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * ); ostream & operator << ( ostream &,Moment const &); -Moment * unsmob_moment (SCM); +DECLARE_UNSMOB(Moment,moment); int compare (Moment const&,Moment const&); INSTANTIATE_COMPARE (Moment const&, Moment::compare); diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 9128c2b2ed..bc7e5c73a0 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -46,5 +46,5 @@ public: DECLARE_SMOBS (Music_output_def,); }; -Music_output_def* unsmob_music_output_def (SCM); +DECLARE_UNSMOB(Music_output_def,music_output_def); #endif // Music_output_DEF_HH diff --git a/lily/include/music.hh b/lily/include/music.hh index 2ce12fed36..500eb003dc 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -68,7 +68,7 @@ protected: }; -Music * unsmob_music (SCM); +DECLARE_UNSMOB(Music,music); #endif // MUSIC_HH diff --git a/lily/include/new-spacing-spanner.hh b/lily/include/new-spacing-spanner.hh index ac1ac80696..6238dde3f1 100644 --- a/lily/include/new-spacing-spanner.hh +++ b/lily/include/new-spacing-spanner.hh @@ -10,22 +10,3 @@ #ifndef SPACING_SPANNER_HH #define SPACING_SPANNER_HH -#include "spanner.hh" -#include "spring.hh" - -class New_spacing_spanner -{ -public: - static void set_interface (Grob*); - static void do_measure (Grob*,Link_array *) ; - static void stretch_to_regularity (Grob*, Array *, Link_array const &); - static void breakable_column_spacing (Item* l, Item *r); - DECLARE_SCHEME_CALLBACK (set_springs, (SCM )); - static Real stem_dir_correction (Grob*,Grob*,Grob*) ; - static Real default_bar_spacing (Grob*,Grob*,Grob*,Moment) ; - static Real note_spacing (Grob*,Grob*,Grob*,Moment) ; - static Real get_duration_space (Grob*,Moment dur, Moment shortest) ; -}; - -#endif /* SPACING_SPANNER_HH */ - diff --git a/lily/include/pitch.hh b/lily/include/pitch.hh index c88ed87ff0..c76b11182e 100644 --- a/lily/include/pitch.hh +++ b/lily/include/pitch.hh @@ -72,7 +72,7 @@ public: }; -Pitch* unsmob_pitch (SCM); +DECLARE_UNSMOB(Pitch,pitch); #include "compare.hh" INSTANTIATE_COMPARE (Pitch, Pitch::compare); diff --git a/lily/include/score.hh b/lily/include/score.hh index 78dc4ccabd..af1e3caccb 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -37,5 +37,5 @@ public: private: void run_translator (Music_output_def*); }; -Score * unsmob_score (SCM); +DECLARE_UNSMOB(Score,score); #endif diff --git a/lily/include/separating-group-spanner.hh b/lily/include/separating-group-spanner.hh index c394821df4..848b429104 100644 --- a/lily/include/separating-group-spanner.hh +++ b/lily/include/separating-group-spanner.hh @@ -21,6 +21,7 @@ public: static bool has_interface (Grob*); static void find_musical_sequences (Grob*); DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); + DECLARE_SCHEME_CALLBACK (set_spacing_rods_and_seqs, (SCM )); }; #endif /* SEPARATING_GROUP_SPANNER_HH */ diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index a295473616..437235c9ea 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -110,7 +110,12 @@ private:\ static int print_smob (SCM s, SCM p, scm_print_state*); \ public: \ static SCM equal_p (SCM a, SCM b);\ - static CL * unsmob (SCM);\ + static CL * unsmob (SCM s){\ + if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_) \ + return (CL*) SCM_CELL_WORD_1 (s); \ + else \ + return 0; \ +} \ static SCM smob_p (SCM);\ static void init_smobs (); \ private: @@ -128,6 +133,14 @@ public: \ SCM self_scm () const { return self_scm_; } \ private: +#define DECLARE_UNSMOB(CL,name) \ +inline CL * \ +unsmob_ ## name (SCM s) \ +{ \ +return CL::unsmob (s); \ +} + + #endif /* SMOBS_HH */ diff --git a/lily/include/translator-def.hh b/lily/include/translator-def.hh index 77082e268d..fd6d42fd77 100644 --- a/lily/include/translator-def.hh +++ b/lily/include/translator-def.hh @@ -64,7 +64,7 @@ private: }; -Translator_def* unsmob_translator_def (SCM); +DECLARE_UNSMOB(Translator_def,translator_def); #endif /* TRANSLATOR_DEF_HH */ diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 9877495be1..6c1ff11327 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -142,5 +142,5 @@ extern Dictionary *global_translator_dict_p; void add_translator (Translator*trans_p); Translator*get_translator_l (String s); -Translator *unsmob_translator (SCM); +DECLARE_UNSMOB(Translator,translator); #endif // TRANSLATOR_HH diff --git a/lily/molecule.cc b/lily/molecule.cc index f1aedc2295..c4c46411db 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -268,4 +268,4 @@ Molecule::mark_smob (SCM s) IMPLEMENT_TYPE_P (Molecule, "molecule?"); IMPLEMENT_DEFAULT_EQUAL_P (Molecule); -IMPLEMENT_UNSMOB (Molecule, molecule); + diff --git a/lily/moment.cc b/lily/moment.cc index 91eea12f12..5b1f1d9027 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -13,7 +13,7 @@ #include "warn.hh" #include "ly-smobs.icc" -IMPLEMENT_UNSMOB (Moment,moment); + IMPLEMENT_SIMPLE_SMOBS (Moment); IMPLEMENT_TYPE_P (Moment, "moment?"); diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 308b025773..df2c404764 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -66,7 +66,7 @@ Music_output_def::Music_output_def (Music_output_def const &s) IMPLEMENT_SMOBS (Music_output_def); -IMPLEMENT_UNSMOB (Music_output_def,music_output_def); + IMPLEMENT_DEFAULT_EQUAL_P (Music_output_def); SCM diff --git a/lily/music.cc b/lily/music.cc index c9955845da..d3f5cdb4a8 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -135,7 +135,7 @@ Music::transpose (Pitch) } IMPLEMENT_TYPE_P (Music, "music?"); -IMPLEMENT_UNSMOB (Music,music); + IMPLEMENT_SMOBS (Music); IMPLEMENT_DEFAULT_EQUAL_P (Music); diff --git a/lily/new-spacing-spanner.cc b/lily/new-spacing-spanner.cc index 682dc0847f..5fc0aaf498 100644 --- a/lily/new-spacing-spanner.cc +++ b/lily/new-spacing-spanner.cc @@ -7,7 +7,6 @@ */ -#include "new-spacing-spanner.hh" #include "paper-column.hh" #include "dimensions.hh" #include "paper-def.hh" @@ -16,7 +15,23 @@ #include "line-of-score.hh" #include "misc.hh" #include "separation-item.hh" +#include "spanner.hh" +#include "spring.hh" +class New_spacing_spanner +{ +public: + static void set_interface (Grob*); + static void do_measure (Grob*,Link_array *) ; + static void stretch_to_regularity (Grob*, Array *, Link_array const &); + static void breakable_column_spacing (Item* l, Item *r); + DECLARE_SCHEME_CALLBACK (set_springs, (SCM )); + static Real stem_dir_correction (Grob*,Grob*,Grob*) ; + static Real default_bar_spacing (Grob*,Grob*,Grob*,Moment) ; + static Real note_spacing (Grob*,Grob*,Grob*,Moment) ; + static Real get_duration_space (Grob*,Moment dur, Moment shortest) ; + static void prune_loose_colunms (Link_array*); +}; void New_spacing_spanner::set_interface (Grob*me) @@ -25,6 +40,29 @@ New_spacing_spanner::set_interface (Grob*me) me->set_extent_callback (SCM_EOL, Y_AXIS) ; } +/* + Remove all columns that are not tightly + fitting part of the spacing problem. + */ +void +New_spacing_spanner::prune_loose_colunms (Link_array *cols) +{ + for (int i = cols->size(); i--;) + { + SCM between = cols->elem(i)->get_grob_property ("between-cols"); + if (!gh_pair_p (between)) + continue; + + Item * l = dynamic_cast (unsmob_grob (gh_car (between))); + Item * r = dynamic_cast (unsmob_grob (gh_cdr (between))); + if (l->column_l () != cols->elem (i-1) + || r->column_l () != cols->elem (i +1)) + { + cols->del (i); + } + } +} + /* The algorithm is partly taken from : @@ -49,12 +87,7 @@ New_spacing_spanner::do_measure (Grob*me, Link_array *cols) Moment base_shortest_duration = *unsmob_moment (me->get_grob_property ("maximum-duration-for-spacing")); shortest_in_measure.set_infinite (1); - for (int i = cols->size(); i--;) - { - if (gh_pair_p (cols->elem(i)->get_grob_property ("between-cols"))) - cols->del (i); - } - + prune_loose_colunms (cols); for (int i =0 ; i < cols->size (); i++) { diff --git a/lily/pitch.cc b/lily/pitch.cc index 54d876cfa7..46013523fd 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -240,7 +240,7 @@ pitch_transpose (SCM p, SCM delta) IMPLEMENT_TYPE_P (Pitch, "pitch?"); -IMPLEMENT_UNSMOB (Pitch, pitch); + SCM Pitch::mark_smob (SCM) { diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index 7eeb67188b..5a4d27018a 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -153,7 +153,7 @@ Scheme_hash_table::to_alist () const -IMPLEMENT_UNSMOB (Scheme_hash_table,scheme_hash); + IMPLEMENT_SMOBS (Scheme_hash_table); IMPLEMENT_DEFAULT_EQUAL_P (Scheme_hash_table); diff --git a/lily/score.cc b/lily/score.cc index 9cc2f6d0c6..9b8d379999 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -166,7 +166,7 @@ Score::add_output (Music_output_def *pap_p) IMPLEMENT_SMOBS (Score); IMPLEMENT_DEFAULT_EQUAL_P (Score); -IMPLEMENT_UNSMOB (Score, score); + SCM Score::mark_smob (SCM s) diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index f989389674..66935cbd4a 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -71,6 +71,15 @@ Separating_group_spanner::find_rods (Item * r, SCM next) } } +MAKE_SCHEME_CALLBACK (Separating_group_spanner,set_spacing_rods_and_seqs,1); +SCM +Separating_group_spanner::set_spacing_rods_and_seqs (SCM smob) +{ + set_spacing_rods (smob); + find_musical_sequences (unsmob_grob (smob)); + return SCM_UNSPECIFIED; +} + MAKE_SCHEME_CALLBACK (Separating_group_spanner,set_spacing_rods,1); SCM Separating_group_spanner::set_spacing_rods (SCM smob) @@ -96,6 +105,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob) find_rods (rb, ly_cdr (s)); } find_musical_sequences (me); + #if 0 /* TODO; restore this. @@ -162,14 +172,33 @@ Separating_group_spanner::find_musical_sequences (Grob *me) && lrank - rank == 1 && llmus && !lmus && mus) { + /* + these columns are adjacent, so set spacing-sequence in + IT. + + Q Q+1 Q+2 (rank) + Note Clef Note + + IT LAST LLAST + + */ SCM seq = col->get_grob_property ("spacing-sequence"); col->set_grob_property ("spacing-sequence", gh_cons (gh_cons (it->self_scm (), last->self_scm ()), seq)); + + /* + lcol can not be a loose column, so we make sure + that is and will not be marked as such. + */ + lcol->set_grob_property ("between-cols" , SCM_BOOL_F); } else if (!lmus) { SCM between = lcol->get_grob_property ("between-cols"); + if (between == SCM_BOOL_F) + continue; + if (!gh_pair_p (between)) { between = gh_cons (it->self_scm (), llast->self_scm ()); diff --git a/lily/slur.cc b/lily/slur.cc index 4cc9bf3e5a..e0f4836d04 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -175,7 +175,17 @@ Slur::set_extremities (Grob *me) Direction dir = LEFT; do { - if (!gh_symbol_p (index_cell (me->get_grob_property ("attachment"), dir))) + SCM att = me->get_grob_property ("attachment"); + /* + */ + if (!gh_pair_p (att)) + { + programming_error ("attachment is not a cons?!"); + att = gh_cons (SCM_EOL, SCM_EOL); + me->set_grob_property ("attachment", att); + } + + if (!gh_symbol_p (index_cell (att, dir))) { for (SCM s = me->get_grob_property ("extremity-rules"); s != SCM_EOL; s = ly_cdr (s)) @@ -184,7 +194,7 @@ Slur::set_extremities (Grob *me) gh_int2scm ((int)dir)); if (r != SCM_BOOL_F) { - index_set_cell (me->get_grob_property ("attachment"), dir, + index_set_cell (att, dir, ly_cdar (s)); break; } diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 6a0a62806e..92b7cb7480 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -23,73 +23,6 @@ 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_part_ && 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 : diff --git a/lily/syllable-group.cc b/lily/syllable-group.cc index 119acd03df..3106026868 100644 --- a/lily/syllable-group.cc +++ b/lily/syllable-group.cc @@ -259,7 +259,7 @@ Syllable_group::print_smob (SCM, SCM port, scm_print_state *) return 1; } -IMPLEMENT_UNSMOB (Syllable_group, voice_entry); + IMPLEMENT_SIMPLE_SMOBS (Syllable_group); IMPLEMENT_DEFAULT_EQUAL_P (Syllable_group); diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 48522d74c6..ef0b23afee 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -143,11 +143,11 @@ System_start_delimiter::staff_brace (Grob*me, Real y) name. This is better than using find_font directly, esp. because that triggers mktextfm for non-existent fonts. */ - SCM alist = scm_list_n (gh_cons (ly_symbol2scm ("font-family"), - ly_symbol2scm ("braces")), - gh_cons (ly_symbol2scm ("font-relative-size"), - gh_int2scm (i)), - SCM_UNDEFINED); + SCM br = ly_symbol2scm ("braces"); + SCM fam = gh_cons (ly_symbol2scm ("font-family"), br); + SCM sz = gh_cons (ly_symbol2scm ("font-relative-size"), gh_int2scm (i)); + + SCM alist = scm_list_n (fam, sz, SCM_UNDEFINED); fm = Font_interface::get_font (me, scm_list_n (alist, SCM_UNDEFINED)); /* Hmm, if lookup fails, we get cmr10 anyway */ if (ly_scm2string (ly_car (fm->description_)) == "cmr10") diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 1d1f65aeb5..200e0513cc 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -208,7 +208,7 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o return best_result; } -IMPLEMENT_UNSMOB (Translator_def,translator_def); + IMPLEMENT_SMOBS (Translator_def); IMPLEMENT_DEFAULT_EQUAL_P (Translator_def); diff --git a/lily/translator.cc b/lily/translator.cc index fd9f367df6..ef5f4b100a 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -207,6 +207,6 @@ Translator::static_translator_description ()const return SCM_EOL; } -IMPLEMENT_UNSMOB (Translator, translator); + IMPLEMENT_SMOBS (Translator); IMPLEMENT_DEFAULT_EQUAL_P (Translator); diff --git a/lilypond-mode.el b/lilypond-mode.el index 565aa04943..60e1a9c2cf 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -5,10 +5,10 @@ ;;; ;;; (c) 1999--2001 Jan Nieuwenhuizen ;;; -;;; Changed 29th Aug 2001 Heikki Junes -;;; * Add PS-compilation, PS-viewing and MIDI-play -;;; Changed 12th Sep 2001 Heikki Junes -;;; * Keyboard shortcuts +;;; Changed 2001 Heikki Junes +;;; * Add PS-compilation, PS-viewing and MIDI-play (29th Aug 2001) +;;; * Keyboard shortcuts (12th Sep 2001) +;;; * Inserting tags, inspired on sgml-mode (11th Oct 2001) ;;; Inspired on auctex @@ -426,10 +426,40 @@ command." (define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view) (define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps) (define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-midi) + (define-key LilyPond-mode-map "\C-cn" 'lilypond-notes) + (define-key LilyPond-mode-map "\C-cs" 'lilypond-score) ) ;;; Menu Support +(define-skeleton lilypond-notes + "Lilypond notes tag." + nil +; (if (bolp) nil ?\n) + "\\notes" + (if (y-or-n-p "Set \"\\relative\" attribute? ") + (concat " \\relative " (skeleton-read "Relative: " "" str))) + " { " _ " }") + +(define-skeleton lilypond-score + "Lilypond score tag." + nil + (if (bolp) nil ?\n) + "\\score {\n" + " " _ "\n" + " \\paper { }\n" + (if (y-or-n-p "Insert \"\\header\" field? ") + (concat " \\header {\n " + (skeleton-read "Piece: " "piece = " str) "\n" + (if (y-or-n-p "Insert \"opus\" field? ") + (concat " " (skeleton-read "Opus: " "opus = " str) "\n")) + " }\n")) + (if (y-or-n-p "Insert \"\\midi\" field? ") + (concat " \\midi { " + (skeleton-read "Midi: " "\\tempo 4 = " str) + " }\n")) + "}\n") + (defun LilyPond-command-menu-entry (entry) ;; Return LilyPond-command-alist ENTRY as a menu item. (let ((name (car entry))) @@ -458,6 +488,12 @@ command." [ "Region" LilyPond-command-select-region :keys "C-c C-r" :style radio :selected (eq LilyPond-command-current 'LilyPond-command-region) ])) + '(("Insert" + [ "\\notes..." lilypond-notes + :keys "C-c n" ] + [ "\\score..." lilypond-score + :keys "C-c s" ] + )) ; (let ((file 'LilyPond-command-on-current)) ; (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist)) ;;; Some kind of mapping which includes :keys might be more elegant @@ -471,8 +507,7 @@ command." '([ "View" (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file) :keys "C-c C-v"]) '([ "ViewPS" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) :keys "C-c C-p"]) '([ "Midi" (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file) :keys "C-c C-m"]) - )) - + )) (defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *=" "Regexp matching Identifier definitions.") diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 450d5b7784..c70ccf51f9 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -18,7 +18,8 @@ StaffContext=\translator { % \consists "Repeat_engraver" \consists "Volta_engraver" \consists "Separating_line_group_engraver" - + SeparatingGroupSpanner \override #'spacing-procedure + = #Separating_group_spanner::set_spacing_rods_and_seqs \consists "Clef_engraver" diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index d9edc07d9c..d6166b4dea 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.16 -Entered-date: 09OKT01 +Version: 1.5.17 +Entered-date: 14OKT01 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.16.tar.gz + 1000k lilypond-1.5.17.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.16.tar.gz + 1000k lilypond-1.5.17.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.mandrake.spec b/make/out/lilypond.mandrake.spec index 552f298cac..44b1ba0375 100644 --- a/make/out/lilypond.mandrake.spec +++ b/make/out/lilypond.mandrake.spec @@ -1,5 +1,5 @@ %define name lilypond -%define version 1.5.16 +%define version 1.5.17 %define release 1mdk Name: %{name} diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index 6017b93fb2..3c4ef1750d 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.16 +Version: 1.5.17 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.16.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz Summary: Create and print music notation URL: http://www.lilypond.org/ BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index 25c3b2d41d..d6d085413c 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.16 +Version: 1.5.17 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.16.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index bdb0ef8757..b0481341a7 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -782,8 +782,60 @@ fet_beginchar("Trill-element","trill-element","trill-element"); currentpicture := currentpicture shifted (height/2, width/2); fet_endchar; + + +% +% Arpeggio arrow by Chris Jackson +% + +def draw_arpeggio_arrow = + save thinness, height, width, overshoot, se, sw, ne, nw, alpha; + pair ne, nw, se, sw; + height# = staff_space#; + width# = 0.8height#; + overshoot# = 0.25 staff_space#; + define_pixels (height,overshoot,width); + set_char_box(0, width#, 0, height#); + alpha := -40; + nw = dir (alpha+180); + sw = dir (alpha-90); se = dir alpha; + + penpos1(rthin, alpha+90); + penpos2(5/4 rthick, alpha); + penpos3(5/4 rthick, 0); + + z1 = (width/2, height) - overshoot*se; % numbering is consistent with the arpeggio symbol + z2 = 2[z4,(width/2,height/2)]; + z3 = (0.5 width, 0.5 height); + z4 = (0.25 staff_space, rthin); + z6 = z2l + 1/2rthin*sw; + z9 = (width/2, height) + overshoot*se; + fill z1l {se}..{se} z6 .. z3l .. z3r.. z9{nw} ..{nw} z1r.. cycle; + + bot z10 = ( 0.5w, 0 ); + lft z11 = (-0.3w, 0.8h); + rt z12 = ( 1.3w, 0.8h); + pickup pencircle scaled 0.5 rthin; + filldraw z3 -- z12 {dir -130} .. {dir -110} z10 {dir 110} .. {dir 130} z11 -- cycle; +enddef; + +fet_beginchar("Arpeggio arrow down", "arpeggio-arrow--1", "arpeggioarrowdown"); + draw_arpeggio_arrow; +fet_endchar; + + +fet_beginchar("Arpeggio arrow up", "arpeggio-arrow-1", "arpeggioarrowup"); + draw_arpeggio_arrow; + currentpicture := currentpicture scaled -1 shifted (0.8staff_space, staff_space); +fet_endchar; + + + + % Hmm input feta-slag; + + fet_endgroup("scripts"); diff --git a/modules/midi.c b/modules/midi.c index e3cbea7201..e1153f23d7 100644 --- a/modules/midi.c +++ b/modules/midi.c @@ -23,6 +23,8 @@ midi.parse (s) /* urg */ #if HAVE_PYTHON2_PYTHON_H #include +#elif HAVE_PYTHON2_1_PYTHON_H +#include #elif HAVE_PYTHON2_0_PYTHON_H #include #elif HAVE_PYTHON1_5_PYTHON_H diff --git a/scm/engraver-documentation-lib.scm b/scm/engraver-documentation-lib.scm index e19bce865b..f1e67ab88d 100644 --- a/scm/engraver-documentation-lib.scm +++ b/scm/engraver-documentation-lib.scm @@ -7,7 +7,6 @@ ;;; Jan Nieuwenhuizen -(eval-string (ly-gulp-file "translator-description.scm")) ;; alist of translater descriptions (define (document-translator-property sym) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index 85a6b931f4..6920e911be 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -45,6 +45,8 @@ This procedure is called (using dependency resolution) after line breaking. Retu (grob-property-description 'arch-width number? "width of the hook of a system brace.") (grob-property-description 'arithmetic-basicspace number? "see @ref{spacing-spanner-interface}.") (grob-property-description 'arithmetic-multiplier number? "see @ref{spacing-spanner-interface}.") +(grob-property-description 'arpeggio-direction dir? "If set, put an +arrow on the arpeggio squiggly line.") (grob-property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end.") (grob-property-description 'stem-attachment-function procedure? "Where diff --git a/scm/interface-description.scm b/scm/interface-description.scm index 9d2249cac2..60b76f8d79 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -374,7 +374,7 @@ padding -- horizontal padding. This is useful if a crescendo is set next to a te (lily-interface 'arpeggio-interface "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads." - '(stems)) + '(stems arpeggio-direction)) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index b708b44768..52a9a4a5e3 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -8,3 +8,54 @@ (number->string (ly-get-mus-property mus 'denominator)) )) +(define (unfold-repeats music) +" +[Rune Zedeler] + +Han-Wen Nienhuys wrote: + +> It shouldn't be hard to write a Scheme function to replace all repeats +> with unfold repeats. +[...] +> Left to the reader as an exercise. + +With thanks to Han-Wen: + + +" + (let* ((es (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (body (ly-get-mus-property music 'body)) + (alts (ly-get-mus-property music 'alternatives)) + (n (ly-music-name music))) + + (if (equal? n "Repeated_music") + (begin + (ly-set-mus-property + music 'length Repeated_music::unfolded_music_length) + (ly-set-mus-property + music 'iterator-ctor Unfolded_repeat_iterator::constructor))) + + (if (pair? es) + (ly-set-mus-property + music 'elements + (map unfold-repeats es))) + + (if (music? alts) + (ly-set-mus-property + music 'alternatives + (unfold-repeats alts))) + + (if (music? body) + (ly-set-mus-property + music 'body + (unfold-repeats body))) + + (if (music? e) + (ly-set-mus-property + music 'element + (unfold-repeats e))) + + + music)) + diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 0b00c76eb1..bc30d54039 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -55,11 +55,17 @@ \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}% % Are we using PDFTeX? If so, use pdf definitions. +% MiKTeX checks \pdfoutput the wrong way, makes our +% check more complicated. \ifx\pdfoutput\undefined \input lily-ps-defs \else - \pdfoutput=1 - \input lily-pdf-defs + \ifx\pdfoutput\relax + \input lily-ps-defs + \else + \pdfoutput=1 + \input lily-pdf-defs + \fi \fi \def\EndLilyPondOutput{%