From d8691dd2c4cf8e365c544e535a6c6d08aa231c8d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 12 Aug 2001 20:51:45 +0200 Subject: [PATCH] release: 1.5.5 ========== * Spelling fixes, notably staffs->staves, except for ChangeLogs. * Removed `Default' from accidental comment names. * Compile fixes. * Fixed off by one error for point and click. * Website fixes, found bug in grace note stem lengths. 1.5.4.h --- CHANGES | 23 +- Documentation/user/tutorial.itely | 4 +- VERSION | 4 +- flower/include/dictionary-iter.hh | 29 -- flower/include/hash-table-iter.hh | 61 --- flower/include/hash-table.hh | 216 ----------- input/regression/grace-nest2.ly | 9 + input/regression/grace-nest3.ly | 7 + input/regression/spacing-accidental-staffs.ly | 18 + input/regression/spacing-accidental.ly | 12 + input/regression/spacing-clefs.ly | 21 ++ input/tutorial/sammartini.ly | 10 +- lily/break-algorithm.cc | 12 +- lily/global-translator.cc | 14 +- lily/gourlay-breaking.cc | 4 +- lily/include/break-algorithm.hh | 6 +- lily/include/column-x-positions.hh | 2 +- lily/include/line-of-score.hh | 2 +- lily/include/moment.hh | 2 + lily/include/new-spacing-spanner.hh | 6 +- lily/include/simple-spacer.hh | 8 +- lily/include/spacing-spanner.hh | 5 +- lily/kpath.cc | 1 + lily/line-of-score.cc | 8 +- lily/moment.cc | 9 +- lily/new-spacing-spanner.cc | 15 +- lily/paper-score.cc | 2 +- lily/parser.yy | 2 +- lily/piano-pedal-performer.cc | 2 - lily/separating-line-group-engraver.cc | 52 +-- lily/sequential-music-iterator.cc | 60 ++- lily/simple-spacer.cc | 110 ++---- lily/spacing-spanner.cc | 12 +- lily/stanza-number-engraver.cc | 2 +- lily/timing-translator.cc | 21 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.redhat.spec | 4 +- make/out/lilypond.suse.spec | 4 +- mf/feta-bolletjes.mf | 354 ++++++++++++++++++ scm/grob-description.scm | 6 +- scm/grob-property-description.scm | 8 +- 41 files changed, 614 insertions(+), 541 deletions(-) delete mode 100644 flower/include/dictionary-iter.hh delete mode 100644 flower/include/hash-table-iter.hh delete mode 100644 flower/include/hash-table.hh create mode 100644 input/regression/grace-nest2.ly create mode 100644 input/regression/grace-nest3.ly create mode 100644 input/regression/spacing-accidental-staffs.ly create mode 100644 input/regression/spacing-accidental.ly create mode 100644 input/regression/spacing-clefs.ly diff --git a/CHANGES b/CHANGES index ad19fd996e..f596eb2ffb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,6 @@ -1.5.4.jcn4 +1.5.4.jcn2 ========== -* New_spacing_spanner: revised spacing generation. - * Spelling fixes, notably staffs->staves, except for ChangeLogs. * Removed `Default' from accidental comment names. @@ -13,8 +11,23 @@ * Website fixes, found bug in grace note stem lengths. -1.5.4 -===== +1.5.4.hwn1 +========== + +* Ancient font update [WARNING FONTS CHANGED!] (Juergen Reuter) + +* New_spacing_spanner: revised spacing generation. + +* Default neutral direction set to down. + +* Junk hash table from flowerlib + +* Bugfix: grace nesting error + +* Bugfix: don't try schedule next bar when were on a grace moment. + +* Bugfix: set measurePosition especially for music starting with +grace. 1.5.3.hwn1 ========== diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 1599e9c98c..6076e1a9ce 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1990,7 +1990,7 @@ these notes are indeed processed by precisely one context with defined above. @separate @example -\grace { } < d4 f> +\grace @{ @} < d4 f> @end example @cindex @code{\grace} @cindex ornaments @@ -2088,7 +2088,7 @@ This ends the two-part section. @separate @example \stemBoth -\grace { } <)b8. d8.-\trill> | +\grace @{ @} <)b8. d8.-\trill> | @end example @cindex trill @cindex stemBoth diff --git a/VERSION b/VERSION index e033a58807..53945ddb6a 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 -PATCH_LEVEL=4 -MY_PATCH_LEVEL=jcn5 +PATCH_LEVEL=5 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/dictionary-iter.hh b/flower/include/dictionary-iter.hh deleted file mode 100644 index eaf0317464..0000000000 --- a/flower/include/dictionary-iter.hh +++ /dev/null @@ -1,29 +0,0 @@ -/* - dictionary-iter.hh -- declare Dictionary_iter - - source file of the Flower Library - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef DICTIONARY_ITER_HH -#define DICTIONARY_ITER_HH - -#include "dictionary.hh" -#include "hash-table-iter.hh" - - -template -class Dictionary_iter : public Hash_table_iter -{ -public: - Dictionary_iter (Dictionary const &d) - : Hash_table_iter (d) - { - - } - - -}; -#endif // Hash_table_ITER_HH diff --git a/flower/include/hash-table-iter.hh b/flower/include/hash-table-iter.hh deleted file mode 100644 index ee84098251..0000000000 --- a/flower/include/hash-table-iter.hh +++ /dev/null @@ -1,61 +0,0 @@ -/* - hash-table-iter.hh -- declare Hash_table_iter - - source file of the Flower Library - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef HASH_TABLE_ITER_HH -#define HASH_TABLE_ITER_HH -#include "hash-table.hh" - -template -class Hash_table_iter -{ - Hash_table *dict_l_; - int i; -public: - Hash_table_iter (Hash_table const &dict) - { - i = 0; - dict_l_ = (Hash_table *) & dict; - next_used (); - } - - bool ok () const - { - return i < dict_l_->fixed_p_->dict_arr_.size (); - } - - void next_used () - { - while (ok () && dict_l_->fixed_p_->dict_arr_[i].free_b_) - { - i ++; - } - } - void operator ++ (int) - { - i++; - next_used (); - } - - K key () const - { - return dict_l_->fixed_p_->dict_arr_[i].key_; - } - V val () const - { - return dict_l_->fixed_p_->dict_arr_[i].value_; - } - V &val_ref () - { - return dict_l_->fixed_p_->dict_arr_[i].value_; - } -}; - - -#endif /* HASH_TABLE_ITER_HH */ - diff --git a/flower/include/hash-table.hh b/flower/include/hash-table.hh deleted file mode 100644 index 8cc51f2e1b..0000000000 --- a/flower/include/hash-table.hh +++ /dev/null @@ -1,216 +0,0 @@ -/* - hash-table.hh -- declare Hash_table_entry, Hash_table - - source file of the Flower Library - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef HASH_TABLE_HH -#define HASH_TABLE_HH - -unsigned int int_hash (int); -unsigned long prime_list (int idx); -template struct Hash_table_iter; - -template -unsigned int -pointer_hash (K *p) -{ - return int_hash ((unsigned int) p); -} - -template -struct Hash_table_entry -{ - K key_; - V value_; - bool free_b_; - - Hash_table_entry () { - free_b_ = true; - } - Hash_table_entry (K s, V v) - { - key_ = s; - value_ = v; - free_b_ = false; - } -}; - -/** - A hash table of prime size. - - We use quadratic probing. - - DEPRECATED. Use either SCM (preferred) or STL -*/ -template -class Fixed_size_hash_table -{ -public: - Array > dict_arr_; - int size_idx_; - Fixed_size_hash_table (int size_idx) - { - size_idx_ = size_idx; - int sz = prime_list (size_idx_); - dict_arr_.set_size (sz); - } - - /// find #s#, or find first empty entry corresponding to #s# - int lookup (K s, unsigned int initial_hash) - { - int sz =dict_arr_.size (); - initial_hash = initial_hash % sz; - int i; - int j = 0; - while (j <= sz/2) { - i = (initial_hash + j*j) % sz; - - if (dict_arr_[i].free_b_) - return i; - - if (dict_arr_[i].key_ == s) - return i; - - j++; - } - - - return -1; - } - - /// remove #s# from the hash table. - V remove (K s, unsigned int initial_hash) - { - // TODO - assert (false); - } -}; - -/** - Hash table with sliding sizes. - */ -template -class Hash_table -{ - Fixed_size_hash_table * fixed_p_; - /// set size to next prime, and copy contents - void enlarge () - { - Fixed_size_hash_table *f = new Fixed_size_hash_table (fixed_p_->size_idx_ +1); - - for (int i=0; i < fixed_p_->dict_arr_.size (); i++) - { - if (fixed_p_->dict_arr_[i].free_b_) - continue; - - K nm (fixed_p_->dict_arr_[i].key_); - unsigned int h = (*hash_func_) (nm); - int nl = f->lookup (nm, h); - - f->dict_arr_[nl] = Hash_table_entry (nm, fixed_p_->dict_arr_[i].value_); - } - delete fixed_p_; - fixed_p_ = f; - } -public: - Hash_table () - { - hash_func_ = 0; - fixed_p_ = new Fixed_size_hash_table (0); - } - ~Hash_table () - { - delete fixed_p_; - } - void operator = (Hash_table const &src) - { - if (&src == this) - return; - - delete fixed_p_; - fixed_p_ = new Fixed_size_hash_table (*src.fixed_p_); - hash_func_ = src.hash_func_; - } - Hash_table (Hash_table const &src) - { - fixed_p_ = new Fixed_size_hash_table (*src.fixed_p_); - hash_func_ = src.hash_func_; - } - - void clear () - { - int i= fixed_p_->size_idx_; - delete fixed_p_; - fixed_p_ = new Fixed_size_hash_table (i); - } - bool elem_b (K s) const - { - int l = fixed_p_->lookup (s, (*hash_func_) (s)); - - return (l >= 0 && !fixed_p_->dict_arr_[l].free_b_) ; - } - - /** - Find and return element. If #s# is not in the table, create an - entry in the table, and init */ - V& elem (K s) - { - int l; - unsigned int h = (*hash_func_) (s); - while ((l= fixed_p_->lookup (s,h)) <0) - { - enlarge (); - } - - fixed_p_->dict_arr_[l].free_b_ = false; - fixed_p_->dict_arr_[l].key_ = s; - return fixed_p_->dict_arr_[l].value_; - } - bool try_retrieve (K k, V *v) - { - int l = fixed_p_->lookup (k, (*hash_func_) (k)); - if (l < 0 || fixed_p_->dict_arr_[l].free_b_) - return false; - else - { - *v = fixed_p_->dict_arr_[l].value_; - return true; - } - } - V elem (K s) const - { - return const_elem (s); - } - V const_elem (K k) const - { - V retval; - assert (elem_b (k)); - retval = ((Hash_table*)this)->elem (k); - return retval; - } - V& operator [] (K k) - { - return elem (k); - } - - V operator [] (K k) const - { - return const_elem (k); - } - - V remove (K s) - { - return fixed_p_->remove (s, (*hash_func_) (s)); - } - friend class Hash_table_iter; -public: - unsigned int (*hash_func_) (K); -}; - - -#endif /* HASH_TABLE_HH */ - diff --git a/input/regression/grace-nest2.ly b/input/regression/grace-nest2.ly new file mode 100644 index 0000000000..5ab4e1e56c --- /dev/null +++ b/input/regression/grace-nest2.ly @@ -0,0 +1,9 @@ +\header { +texidoc = "grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example." + +} + +\score { \notes \context Voice { + { \grace b'4 c''2 } + \grace b'4 c''2 \bar "|." + }} diff --git a/input/regression/grace-nest3.ly b/input/regression/grace-nest3.ly new file mode 100644 index 0000000000..2b6116cf55 --- /dev/null +++ b/input/regression/grace-nest3.ly @@ -0,0 +1,7 @@ + +\score { \notes \relative c'' { + f1 + \grace e8 f1 + < { \grace { e8 } f1 } > +} +} diff --git a/input/regression/spacing-accidental-staffs.ly b/input/regression/spacing-accidental-staffs.ly new file mode 100644 index 0000000000..58d1ecf1c9 --- /dev/null +++ b/input/regression/spacing-accidental-staffs.ly @@ -0,0 +1,18 @@ + +\header { +texidoc = "Accidentals in different staffs don't effect the +spacing of the quarter notes here." +} + +\score { \notes \relative c'' < \context Staff = SA { +c4 c4 cis4 cis4 +c4 c4 c4 c + + + } + { \key d \major c2 c2 c2 cis2 } > + + \paper { linewidth = -1. } + } + + diff --git a/input/regression/spacing-accidental.ly b/input/regression/spacing-accidental.ly new file mode 100644 index 0000000000..f138c3865d --- /dev/null +++ b/input/regression/spacing-accidental.ly @@ -0,0 +1,12 @@ + +\header { +texidoc = "Accidentals sticking out to the left +of a note will take a little more space." +} + +\score { \notes \relative c'' { c4 c cis4 +} +\paper { linewidth = -1. } + +} + diff --git a/input/regression/spacing-clefs.ly b/input/regression/spacing-clefs.ly new file mode 100644 index 0000000000..67c31e743f --- /dev/null +++ b/input/regression/spacing-clefs.ly @@ -0,0 +1,21 @@ + +\header { +texidoc = "If possible clef changes and the like +should be folded under notes of the different staff +" +} + +\score { \notes \relative c'' < \context Staff = SA { +c4 c16 c c c cis4 cis4 +c4 c4 c4 c + + + } + { \key d \major c2 + \clef bass + c,2 c cis2 } > + + \paper { linewidth = -1. } + } + + diff --git a/input/tutorial/sammartini.ly b/input/tutorial/sammartini.ly index b69ea4086c..1975a1cadb 100644 --- a/input/tutorial/sammartini.ly +++ b/input/tutorial/sammartini.ly @@ -14,22 +14,20 @@ viola = \notes \relative c' \context Voice = viola { oboes = \notes \relative c'' \context Voice = oboe { \stemUp s4 g8. b,16 c8 r - \grace { } + \grace \times 2/3 { } < { \times 2/3 { a8 g c } \! c2 } \context Voice = oboeTwo { \stemDown \grace { - \property Voice.Stem \override #'direction = #-1 - [f,16 g] - \property Voice.Stem \revert #'direction - } + \stemDown + [f,16 g] } f8 e e2 } > \stemBoth - \grace { } <)b8. d8.-\trill> | + \grace <)b8. d8.-\trill> | [ < )f8. a>] <)b,8 d> r [ ] r | [ < )e8. g>] } diff --git a/lily/break-algorithm.cc b/lily/break-algorithm.cc index 887efc3d20..e845133d63 100644 --- a/lily/break-algorithm.cc +++ b/lily/break-algorithm.cc @@ -22,7 +22,7 @@ Array Break_algorithm::find_break_indices () const { - Link_array all = pscore_l_->line_l_->column_l_arr (); + Link_array all = pscore_l_->line_l_->column_l_arr (); Array retval; for (int i=0; i < all.size (); i++) @@ -37,11 +37,11 @@ Break_algorithm::find_break_indices () const } -Link_array +Link_array Break_algorithm::find_breaks () const { - Link_array all = pscore_l_->line_l_->column_l_arr (); - Link_array retval; + Link_array all = pscore_l_->line_l_->column_l_arr (); + Link_array retval; for (int i=0; i < all.size (); i++) if (Item::breakable_b (all[i])) @@ -56,7 +56,7 @@ Break_algorithm::find_breaks () const Simple_spacer* -Break_algorithm::generate_spacing_problem (Link_array curline, Interval line) const +Break_algorithm::generate_spacing_problem (Link_array curline, Interval line) const { Simple_spacer * sp = new Simple_spacer; @@ -80,6 +80,8 @@ Break_algorithm::generate_spacing_problem (Link_array curline, Interval li sp->line_len_f_ = line.length (); sp->add_columns (curline); + + return sp; } diff --git a/lily/global-translator.cc b/lily/global-translator.cc index a1dd7c3501..f7848d72a2 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -85,7 +85,9 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) { if (iter-> ok ()) prev_mom_ = now_mom_ = iter->pending_moment (); - + + + bool first = true; while (iter->ok () || moments_left_i ()) { Moment w; @@ -96,6 +98,16 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) } w = sneaky_insert_extra_moment (w); + + // cout << "Proccing " << w << endl; + + + if (first) + { + first = false; + set_property (ly_symbol2scm ("measurePosition"), w.smobbed_copy ()); + } + prepare (w); if (iter->ok ()) iter->process (w); diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 4b8b6048fc..04112971d3 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -54,7 +54,7 @@ Array Gourlay_breaking::do_solve () const { Array optimal_paths; - Link_array all = + Link_array all = pscore_l_->line_l_->column_l_arr (); Array breaks = find_break_indices (); @@ -80,7 +80,7 @@ Gourlay_breaking::do_solve () const for (int start_idx = break_idx; start_idx--;) { - Link_array line = all.slice (breaks[start_idx], breaks[break_idx]+1); + Link_array line = all.slice (breaks[start_idx], breaks[break_idx]+1); line[0] = dynamic_cast (line[0]) ->find_prebroken_piece (RIGHT); line.top () = dynamic_cast (line.top ())->find_prebroken_piece (LEFT); diff --git a/lily/include/break-algorithm.hh b/lily/include/break-algorithm.hh index ba0048b9b2..c91a00bdaf 100644 --- a/lily/include/break-algorithm.hh +++ b/lily/include/break-algorithm.hh @@ -28,7 +28,7 @@ protected: Real linewidth_f_; /// search all pcols which are breakable. - Link_array find_breaks () const; + Link_array find_breaks () const; Array find_break_indices () const; @@ -37,10 +37,10 @@ protected: void solve_line (Column_x_positions*) const; /// does curline fit on the paper? - bool feasible (Link_array) const; + bool feasible (Link_array) const; - Simple_spacer* generate_spacing_problem (Link_array, Interval) const; + Simple_spacer* generate_spacing_problem (Link_array, Interval) const; virtual Array do_solve () const=0; diff --git a/lily/include/column-x-positions.hh b/lily/include/column-x-positions.hh index 7e1a48245c..e8688d3bcd 100644 --- a/lily/include/column-x-positions.hh +++ b/lily/include/column-x-positions.hh @@ -13,7 +13,7 @@ struct Column_x_positions { - Link_array cols_; + Link_array cols_; Array config_; Real force_f_; bool satisfies_constraints_b_; diff --git a/lily/include/line-of-score.hh b/lily/include/line-of-score.hh index 5de05af03f..e2c2fc4b73 100644 --- a/lily/include/line-of-score.hh +++ b/lily/include/line-of-score.hh @@ -26,7 +26,7 @@ public: void output_lines (); Link_array broken_col_range (Item const*, Item const*) const; - Link_array column_l_arr () const; + Link_array column_l_arr () const; void add_column (Paper_column*); void typeset_grob (Grob*); diff --git a/lily/include/moment.hh b/lily/include/moment.hh index 9a19370e4e..6881b933da 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -49,12 +49,14 @@ public: SCM smobbed_copy () const; String str () const; static int compare (Moment const&, Moment const&); + }; IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * ); +ostream & operator << ( ostream &,Moment const &); Moment * unsmob_moment (SCM); int compare (Moment const&,Moment const&); diff --git a/lily/include/new-spacing-spanner.hh b/lily/include/new-spacing-spanner.hh index e46b406ce7..0af0bc5737 100644 --- a/lily/include/new-spacing-spanner.hh +++ b/lily/include/new-spacing-spanner.hh @@ -17,14 +17,14 @@ class New_spacing_spanner { public: static void set_interface (Grob*); - static void do_measure (Grob*,Link_array const &) ; - static void stretch_to_regularity (Grob*, Array *, Link_array const &); + static void do_measure (Grob*,Link_array const &) ; + 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 breakable_column_spacing (Item*,Item*); }; #endif /* SPACING_SPANNER_HH */ diff --git a/lily/include/simple-spacer.hh b/lily/include/simple-spacer.hh index 2f12339490..2f13a107d2 100644 --- a/lily/include/simple-spacer.hh +++ b/lily/include/simple-spacer.hh @@ -63,10 +63,7 @@ struct Spring_description struct Simple_spacer { Array springs_; - Link_array spaced_cols_; - Link_array all_cols_; - Real force_f_; Real indent_f_; Real line_len_f_; @@ -74,10 +71,9 @@ struct Simple_spacer Simple_spacer (); - - void do_wide_springs (Column_x_positions*) const; + void solve (Column_x_positions *) const; - void add_columns (Link_array); + void add_columns (Link_array); void my_solve_linelen (); void my_solve_natural_len (); Real active_springs_stiffness () const; diff --git a/lily/include/spacing-spanner.hh b/lily/include/spacing-spanner.hh index fa3a92f1c7..b045401a02 100644 --- a/lily/include/spacing-spanner.hh +++ b/lily/include/spacing-spanner.hh @@ -17,10 +17,9 @@ class Spacing_spanner { public: static void set_interface (Grob*); - static void do_measure (Grob*,Link_array const &) ; - static void stretch_to_regularity (Grob*, Array *, Link_array const &); + static void do_measure (Grob*,Link_array const &) ; + static void stretch_to_regularity (Grob*, Array *, Link_array const &); 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) ; diff --git a/lily/kpath.cc b/lily/kpath.cc index d97cacba31..0e39e0c1ff 100644 --- a/lily/kpath.cc +++ b/lily/kpath.cc @@ -25,6 +25,7 @@ extern "C" { #include "string.hh" #include "main.hh" #include "kpath.hh" +#include "lily-version.hh" char * diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index bb3384f023..9c70f62adb 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -132,7 +132,7 @@ Line_of_score::break_into_pieces (Array const &breaking) Line_of_score *line_l = dynamic_cast (clone ()); line_l->rank_i_ = i; // line_l->set_immutable_grob_property ("rank", gh_int2scm (i)); - Link_array c (breaking[i].cols_); + Link_array c (breaking[i].cols_); pscore_l_->typeset_line (line_l); line_l->set_bound (LEFT,c[0]); @@ -393,11 +393,11 @@ Line_of_score::broken_col_range (Item const*l, Item const*r) const Return all columns, but filter out any unused columns , since they might disrupt the spacing problem. */ -Link_array +Link_array Line_of_score::column_l_arr ()const { - Link_array acs - = Pointer_group_interface__extract_elements (this, (Item*) 0, "columns"); + Link_array acs + = Pointer_group_interface__extract_elements (this, (Grob*) 0, "columns"); bool bfound = false; for (int i= acs.size (); i -- ;) { diff --git a/lily/moment.cc b/lily/moment.cc index 1f7f62e773..2f98bfd2ea 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -196,10 +196,17 @@ Moment::str () const } Moment -Moment::operator - ( ) const +Moment::operator - () const { Moment m; m.grace_part_ = -grace_part_; m.main_part_ = -main_part_; return m; } + +ostream & +operator << (ostream &os, Moment const &m) +{ + os << m.str (); + return os; +} diff --git a/lily/new-spacing-spanner.cc b/lily/new-spacing-spanner.cc index 324a6cd377..e67af0ea08 100644 --- a/lily/new-spacing-spanner.cc +++ b/lily/new-spacing-spanner.cc @@ -39,7 +39,7 @@ New_spacing_spanner::set_interface (Grob*me) */ void -New_spacing_spanner::do_measure (Grob*me, Link_array const & cols) +New_spacing_spanner::do_measure (Grob*me, Link_array const & cols) { Moment shortest; Moment mean_shortest; @@ -112,8 +112,11 @@ New_spacing_spanner::do_measure (Grob*me, Link_array const & cols) Paper_column *rc = dynamic_cast (r); - cout << "params for cols " << Paper_column::rank_i (l) << " " << Paper_column::rank_i (r) << endl; +#if 0 +cout << "params for cols " << Paper_column::rank_i (l) << " " << Paper_column::rank_i (r) << endl; cout << " musical: " << Paper_column::musical_b (l) << " " << Paper_column::musical_b (r) << endl; +#endif + if (!Paper_column::musical_b (l)) { breakable_column_spacing (l, r); @@ -236,8 +239,8 @@ New_spacing_spanner::breakable_column_spacing (Item* l, Item *r) void New_spacing_spanner::stretch_to_regularity (Grob *me, - Array * springs, - Link_array const & cols) + Array * springs, + Link_array const & cols) { /* Find the starting column of the run. REGULAR-DISTANCE-TO points @@ -470,7 +473,7 @@ SCM New_spacing_spanner::set_springs (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array all (me->pscore_l_->line_l_->column_l_arr ()) ; + Link_array all (me->pscore_l_->line_l_->column_l_arr ()) ; int j = 0; @@ -479,7 +482,7 @@ New_spacing_spanner::set_springs (SCM smob) Grob *sc = all[i]; if (Item::breakable_b (sc)) { - Link_array measure (all.slice (j, i+1)); + Link_array measure (all.slice (j, i+1)); do_measure (me, measure); j = i; } diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 0a9f8114b7..6d659d7064 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -82,7 +82,7 @@ Paper_score::process () /* Be sure to set breakability on first & last column. */ - Link_array pc (line_l_->column_l_arr ()); + Link_array pc (line_l_->column_l_arr ()); pc[0]->set_grob_property ("breakable", SCM_BOOL_T); pc.top ()->set_grob_property ("breakable", SCM_BOOL_T); diff --git a/lily/parser.yy b/lily/parser.yy index 18bca5059b..5019a8d8a2 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -806,7 +806,7 @@ Composite_music: chm->set_spot (*$3->origin ()); } | GRACE Music { -#if 0 +#if 1 /* The other version is for easier debugging of Sequential_music_iterator in combination with grace notes. diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index 3783a353a6..8fe532e60a 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -10,8 +10,6 @@ #include "command-request.hh" #include "musical-request.hh" #include "audio-item.hh" -#include "dictionary.hh" -#include "dictionary-iter.hh" /** perform Piano pedals diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index d767d1bade..0de0777d9d 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -6,7 +6,6 @@ (c) 1998--2001 Han-Wen Nienhuys */ -#include #include "separating-group-spanner.hh" #include "separation-item.hh" @@ -26,8 +25,6 @@ protected: */ Item * last_step_musical_malt_p_; - Item * last_nonnil_musical_malt_p_; - Item * last_nonnil_break_malt_p_; Spanner * sep_span_p_; @@ -43,9 +40,6 @@ public: Separating_line_group_engraver::Separating_line_group_engraver () { last_step_musical_malt_p_ = 0; - last_nonnil_break_malt_p_ = 0; - last_nonnil_musical_malt_p_ = 0; - sep_span_p_ = 0; break_malt_p_ = 0; musical_malt_p_ =0; @@ -102,50 +96,15 @@ Separating_line_group_engraver::stop_translation_timestep () if (break_malt_p_) { Separating_group_spanner::add_spacing_unit (sep_span_p_, break_malt_p_); - + typeset_grob (break_malt_p_); - - last_nonnil_break_malt_p_ = break_malt_p_; break_malt_p_ =0; } if (musical_malt_p_) - { + { Separating_group_spanner::add_spacing_unit (sep_span_p_, musical_malt_p_); - - /* TODO - - move this mucketry into separation-spanner. - - */ - if (last_nonnil_break_malt_p_ && last_nonnil_musical_malt_p_) - { - cout << now_mom ().str () <column_l(); - if (!col) - col = dynamic_cast (unsmob_grob (get_property ("currentCommandColumn"))); - - SCM between = col->get_grob_property ("between-cols"); - - SCM left = last_nonnil_musical_malt_p_->column_l()->self_scm (); - SCM right = get_property ("currentMusicalColumn"); // musical_malt_p_->column_l()->self_scm (); - if (gh_pair_p (between)) - { - /* - ugh. set_..._x () - */ - if (Paper_column::rank_i (unsmob_grob (gh_car (between))) < Paper_column::rank_i (unsmob_grob (left))) - gh_set_car_x (between, left); - if (Paper_column::rank_i (unsmob_grob (gh_cdr (between))) > Paper_column::rank_i (unsmob_grob (right))) - gh_set_cdr_x (between, right); - } - else - { - col->set_grob_property ("between-cols", gh_cons (left, right)); - } - } - if (last_step_musical_malt_p_) { Paper_column *col = @@ -156,16 +115,13 @@ Separating_line_group_engraver::stop_translation_timestep () gh_cons (newtup, col->get_grob_property ("spacing-sequence"))); } - - - last_nonnil_break_malt_p_ = 0; - last_nonnil_musical_malt_p_ = musical_malt_p_; typeset_grob (musical_malt_p_); - } + } last_step_musical_malt_p_ = musical_malt_p_; musical_malt_p_ =0; + } diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 7a6b240a15..13d08740d0 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -12,6 +12,14 @@ #include "music-list.hh" #include "request-chord-iterator.hh" + +/* + + TODO: handling of grace notes is excuisite pain. This handling + should be formally specified and then the implementation verified. + +*/ + /* Invariant for the data structure. @@ -53,10 +61,21 @@ Sequential_music_iterator::~Sequential_music_iterator () } +/* + + + if (start_music.grace) + here.grace -= start_music.grace + + last + if (len + + */ + Grace_skip * get_grace_skips (SCM cursor) { - Moment here (0); + Moment here (0); Moment last (-1); Grace_skip *head = 0; Grace_skip **tail = &head; @@ -67,20 +86,24 @@ get_grace_skips (SCM cursor) Moment l =mus->length_mom (); Moment s = mus->start_mom (); - if (s.grace_part_ && last >= Moment (0)) + if (s.grace_part_) { - Grace_skip *p =new Grace_skip; - p->start_ = last; - p->length_ = (here - last).main_part_; - p->grace_start_ = s.grace_part_; - p->next_ = 0; - *tail = p; - tail = &(*tail)->next_; + if (last != Moment (-1)) + { + Grace_skip *p =new Grace_skip; + p->start_ = last; + p->length_ = (here - last).main_part_; + p->grace_start_ = s.grace_part_; + p->next_ = 0; + *tail = p; + tail = &(*tail)->next_; + } + + here.grace_part_ = s.grace_part_; } - if (l.main_part_) + if (l.to_bool()) { - l.grace_part_ = Rational (0); last = here; here += l; } @@ -122,7 +145,8 @@ Sequential_music_iterator::next_element () Moment start = iter_p_->music_start_mom (); assert (!grace_skips_ || grace_skips_->start_ >= here_mom_); - if (len.main_part_ && grace_skips_ && grace_skips_->start_ == here_mom_) + if (len.main_part_ && grace_skips_ && + grace_skips_->start_.main_part_ == here_mom_.main_part_) { Moment sk; sk.main_part_ = grace_skips_->length_; @@ -289,15 +313,15 @@ Sequential_music_iterator::pending_moment () const if (grace_skips_ && here_mom_ == grace_skips_->start_ && cp.main_part_ >= grace_skips_->length_) { - cp += here_mom_ ; - cp.grace_part_ = grace_skips_->grace_start_; - return cp; + cp += here_mom_ ; + cp.grace_part_ = grace_skips_->grace_start_; + return cp; } - /* - Fix-up a grace note at the start of the music. - */ + /* + Fix-up a grace note at the start of the music. + */ return cp + here_mom_ - iter_p_->music_start_mom (); } diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index f058f56f4f..0340596ad3 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -13,7 +13,6 @@ #include #include // isinf -#include "string-convert.hh" #include "simple-spacer.hh" #include "paper-column.hh" #include "spring.hh" @@ -166,66 +165,55 @@ Simple_spacer::my_solve_natural_len () } void -Simple_spacer::add_columns (Link_array cols) +Simple_spacer::add_columns (Link_array cols) { - for (int i =0; i < cols.size (); i++) - all_cols_.push ( dynamic_cast (cols[i])); - - Grob *next = 0; for (int i=0; i < cols.size () - 1; i++) { SCM spring_params = SCM_UNDEFINED; - - if (next && cols[i] != next) - continue; - for (SCM s = cols[i]->get_grob_property ("ideal-distances"); - !gh_pair_p (spring_params) && gh_pair_p (s); + spring_params == SCM_UNDEFINED && gh_pair_p (s); s = gh_cdr (s)) { Grob *other = unsmob_grob (gh_caar (s)); - int j = i+1; - for (; j < cols.size (); j++) - if (cols[j] == other) - break; - - if(j == cols.size ()) + if (other != cols[i+1]) continue; - next = other; spring_params = gh_cdar (s); } Spring_description desc; - desc.ideal_f_ = -1; - if (gh_pair_p(spring_params)) + if (spring_params != SCM_UNDEFINED) { desc.ideal_f_ = gh_scm2double (gh_car (spring_params)); desc.hooke_f_ = gh_scm2double (gh_cdr (spring_params)); } - - if (gh_pair_p (spring_params) && desc.sane_b ()) + else { - spaced_cols_.push (dynamic_cast (cols[i])); - desc.block_force_f_ = - desc.hooke_f_ * desc.ideal_f_; // block at distance 0 - springs_.push (desc); + programming_error (_f("No spring between column %d and next one", + Paper_column::rank_i (cols[i]) + )); + desc.hooke_f_ = 1.0; + desc.ideal_f_ = default_space_f_; } - else if (gh_pair_p (spring_params) && !desc.sane_b ()) + + if (!desc.sane_b ()) { - programming_error (String_convert::form_str ("insane springs at col %d", Paper_column::rank_i (cols[i]))); - // Generate rods for these cols. + programming_error ("Insane spring found. Setting to unit spring."); + desc.hooke_f_ = 1.0; + desc.ideal_f_ = 1.0; } + + desc.block_force_f_ = - desc.hooke_f_ * desc.ideal_f_; // block at distance 0 + springs_.push (desc); } - - spaced_cols_.push (all_cols_.top ()); - for (int i=0; i < spaced_cols_.size () - 1; i++) + for (int i=0; i < cols.size () - 1; i++) { - for (SCM s = Spaceable_grob::get_minimum_distances (spaced_cols_[i]); + for (SCM s = Spaceable_grob::get_minimum_distances (cols[i]); gh_pair_p (s); s = gh_cdr (s)) { - Item * other = dynamic_cast (unsmob_grob (gh_caar (s))); - int oi = spaced_cols_.find_i (other); + Grob * other = unsmob_grob (gh_caar (s)); + int oi = cols.find_i (other); if (oi >= 0) { add_rod (i, oi, gh_scm2double (gh_cdar (s))); @@ -254,60 +242,6 @@ Simple_spacer::solve (Column_x_positions *positions) const } positions->satisfies_constraints_b_ = (line_len_f_ < 0) || active_b (); - positions->cols_ = spaced_cols_; - do_wide_springs (positions); -} - -/* - Do the columns whose springs didn't paricipate in the spacing process - */ -void -Simple_spacer::do_wide_springs ( Column_x_positions *positions_)const -{ - int i = 0; - - - Array all_posns; - for (int j = 0; j < all_cols_.size () && i < spaced_cols_.size (); j++) - { - if (all_cols_[j] == spaced_cols_[i]) - { - all_posns.push (positions_->config_[i] ); - i++; - continue; - } - - - SCM between = all_cols_[j]->get_grob_property ("between-cols"); - if (!gh_pair_p (between)) - { - programming_error (String_convert::form_str ("loose column rank %d not beween spaced cols", Paper_column::rank_i (all_cols_[j] ))); - all_posns.push (positions_->config_[i]); - continue; - } - - Item * prev = dynamic_cast (unsmob_grob (gh_car (between))); - Item *next = dynamic_cast (unsmob_grob (gh_cdr (between))); - int ip = i; - int in = i; - for (; ip--; ) - if(spaced_cols_[ip] == prev) - break; - - for (; in < spaced_cols_.size (); in++) - if(spaced_cols_[in] == next) - break; - - // TODO: compute iso. 0.5 - if (ip >= 0 && in < positions_->config_.size ()) - all_posns.push (0.5 * (positions_->config_[ip] + positions_->config_[in])); - else - all_posns.push (positions_->config_[i]); - - } - - positions_->config_ = all_posns; - positions_->cols_ = all_cols_; } diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 9b281e83b0..e5a519f1ea 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -104,7 +104,7 @@ find_runs (Grob*me, Link_array cols) */ void -Spacing_spanner::do_measure (Grob*me, Link_array const & cols) +Spacing_spanner::do_measure (Grob*me, Link_array const & cols) { Moment shortest; Moment mean_shortest; @@ -313,7 +313,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array const & cols) void Spacing_spanner::stretch_to_regularity (Grob *me, Array * springs, - Link_array const & cols) + Link_array const & cols) { /* Find the starting column of the run. REGULAR-DISTANCE-TO points @@ -325,7 +325,7 @@ Spacing_spanner::stretch_to_regularity (Grob *me, for (int i = 0 ; i < cols.size () && !first_regular_spaced_col; i++) { SCM rdt = cols[i]->get_grob_property ("regular-distance-to"); - if (cols.find_l (dynamic_cast (unsmob_grob (rdt)))) + if (cols.find_l (unsmob_grob (rdt))) first_regular_spaced_col = unsmob_grob (rdt); } for (int i = springs->size (); i-- ;) @@ -553,16 +553,16 @@ SCM Spacing_spanner::set_springs (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array all (me->pscore_l_->line_l_->column_l_arr ()) ; + Link_array all (me->pscore_l_->line_l_->column_l_arr ()) ; int j = 0; for (int i = 1; i < all.size (); i++) { - Item *sc = all[i]; + Grob *sc = all[i]; if (Item::breakable_b (sc)) { - Link_array measure (all.slice (j, i+1)); + Link_array measure (all.slice (j, i+1)); do_measure (me, measure); j = i; } diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index 5c3d0421e9..5d4b0a5e01 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -38,7 +38,7 @@ Stanza_number_engraver::Stanza_number_engraver () } void -Stanza_number_engraver::acknowledge_grob (Grob_info ) +Stanza_number_engraver::acknowledge_grob (Grob_info i) { if (gh_string_p (get_property ("whichBar"))) { diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index d90e93cec7..5548a249d8 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -67,9 +67,15 @@ Timing_translator::stop_translation_timestep () if (timb && allbars) { Moment barleft = (measure_length () - measure_position ()); - - if (barleft > Moment (0)) - global_l->add_moment_to_process (now_mom () + barleft); + Moment now = now_mom (); + + if (barleft > Moment (0) + /* + Hmm. We insert the bar moment every time we process a + moment. A waste of cpu? + */ + && !now.grace_part_) + global_l->add_moment_to_process (now + barleft); } } @@ -79,13 +85,12 @@ ADD_THIS_TRANSLATOR (Timing_translator); void Timing_translator::initialize () { - Moment m; daddy_trans_l_->set_property ("timing" , SCM_BOOL_T); daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1)); - daddy_trans_l_->set_property ("measurePosition", m.smobbed_copy ()); + daddy_trans_l_->set_property ("timeSignatureFraction", gh_cons (gh_int2scm (4), gh_int2scm (4))); - + daddy_trans_l_->set_property ("measurePosition", Moment (0).smobbed_copy ()); daddy_trans_l_->set_property ("measureLength", Moment (1).smobbed_copy ()); daddy_trans_l_->set_property ("beatLength", Moment (1,4).smobbed_copy ()); } @@ -134,7 +139,8 @@ Timing_translator::start_translation_timestep () } while (!global_l); - Moment dt = global_l->now_mom_ - global_l -> prev_mom_; + Moment now = global_l->now_mom_; + Moment dt = now - global_l -> prev_mom_; if (dt < Moment (0)) { programming_error ("Moving backwards in time"); @@ -153,6 +159,7 @@ Timing_translator::start_translation_timestep () } else { + measposp = now; daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ()); } diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 6a6618c207..89685c8e2d 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.5.4 -Entered-date: 06AUG01 +Version: 1.5.5 +Entered-date: 12AUG01 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.4.tar.gz + 1000k lilypond-1.5.5.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.5.4.tar.gz + 1000k lilypond-1.5.5.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index 1aaf025a8d..fe73841ded 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.4 +Version: 1.5.5 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.4.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.5.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 60b01fe3c3..244fff0007 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.4 +Version: 1.5.5 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.4.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.5.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index 7632fcff47..b7d67cba48 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -560,5 +560,359 @@ fet_beginchar("X-Circled notehead", "2xcircle", "xcircledhead") draw (-xpos+w/2,ypos) -- (xpos+w/2,-ypos); fet_endchar; +%%%%%%%% +% +% +% +% EDITIO VATICANA +% +% +% + +% subbipunctum +fet_beginchar("Ed. Vat. subbipunctum", "0vaticana_subbipunctum", + "vatsubbipunctumhead") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight#; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, 0.5 ht#, 0.5 ht#); + black_notehead_width# := wd#; + + save za, alpha, size; + pair za; + define_pixels(ht, wd); + alpha = 35; + size = 0.45ht; + pickup pencircle + xscaled 0 + yscaled size rotated -alpha; + za = (0, size) / 2 rotated alpha; + draw -za .. za; + +fet_endchar; + + +% parametrized punctum +def punctum_char (expr verbose_name, internal_name, mudela_name, + left_stem, right_stem, + straight, reverse_convexity, excentric, up_shift, mag) = + + fet_beginchar(verbose_name, internal_name, mudela_name) + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight# * mag; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 2a# / a_w; + set_char_box(0.0, 0.4wd#, 0.5ht#, 0.5ht#); + black_notehead_width# := wd#; + + save convexity; + if straight: + if reverse_convexity: + convexity# = -0.02ht#; + else: + convexity# = +0.02ht#; + fi; + else: + if reverse_convexity: + convexity# = -0.05ht#; + else: + convexity# = +0.05ht#; + fi; + fi; + + save yoffs; + if up_shift: + yoffs# = 0.08ht#; + else: + yoffs# = 0.00ht#; + fi + + define_pixels(ht, wd, convexity, yoffs); + pickup pencircle scaled stafflinethickness; + + if excentric: + z1 = (0.00wd, yoffs - 1.0convexity); + z2 = (0.08wd, yoffs + 1.4convexity); + z3 = (0.40wd, yoffs); + penpos1(0.50ht, 90); + penpos2(0.50ht, 90); + penpos3(0.50ht, 90); + if reverse_convexity: + penstroke z1e{up} .. z2e{right} .. z3e; + else: + penstroke z1e{down} .. z2e{right} ..z3e; + fi; + else: + z1 = (0.00wd, yoffs); + z2 = (0.20wd, yoffs + convexity); + z3 = (0.40wd, yoffs); + penpos1(0.50ht, 90); + penpos2(0.50ht, 90); + penpos3(0.50ht, 90); + penstroke z1e .. z2e .. z3e; + fi; + + if left_stem: + z5=(0.00wd + 0.5 stafflinethickness, yoffs); + z6=(0.00wd + 0.5 stafflinethickness, yoffs - 1.5ht); + draw z5 -- z6; + elseif right_stem: + z5=(0.40wd - 0.25 stafflinethickness, yoffs); + z6=(0.40wd - 0.25 stafflinethickness, yoffs - 1.5ht); + draw z5 -- z6; + fi; + + fet_endchar; +enddef; + + +% punctum +punctum_char("Ed. Vat. punctum", "0vaticana_punctum", "vatpunctumhead", + false, false, false, false, false, false, 1.0); + +% virga (i.e. right stemmed punctum) +punctum_char("Ed. Vat. virga", "0vaticana_virga", "vatvirgahead", + false, true, false, false, false, false, 1.0); + +% left stemmed punctum as used in clivis (flexa) ligature +punctum_char("Ed. Vat. reverse virga", "0vaticana_rvirga", "vatrvirgahead", + true, false, false, false, false, false, 1.0); + +% pes lower punctum +punctum_char("Ed. Vat. pes lower punctum", "0vaticana_lpes", "vatlpeshead", + false, false, true, true, false, false, 1.0); + +% pes upper punctum +punctum_char("Ed. Vat. pes upper punctum", "0vaticana_upes", "vatupeshead", + false, false, true, false, false, false, 1.0); + +% pes upper punctum (shifted variation) +% +% Note: This note head is used instead of the regular pes upper +% punctum to avoid collision with the lower punctum note of the pes when +% the upper punctum sits directly on top of the lower punctum. +punctum_char("Ed. Vat. var pes upper punctum", "0vaticana_vupes", + "vatvupeshead", + false, false, true, false, false, true, 1.0); + +% small punctum as used in epiphonus/cephalicus +punctum_char("Ed. Vat. plica", "0vaticana_plica", "vatplicahead", + false, false, true, false, false, false, 0.5); + +% excentric punctum as used in epiphonus +punctum_char("Ed. Vat. epiphonus", "0vaticana_epiphonus", "vatepiphonushead", + false, false, false, true, true, false, 1.0); + +% excentric punctum as used in cephalicus +punctum_char("Ed. Vat. cephalicus", "0vaticana_cephalicus", + "vatcephalicushead", + false, false, false, false, true, false, 1.0); + +% quilisma +fet_beginchar("Ed. Vat. quilisma", "0vaticana_quilisma", "vatquilismahead") + save b_h,a_w; + a_b:=1.54; % b_h*a_b/a_w = wd/ht + b_h:=0.85; + a_w:=1.09; + + save a, beta, ht, wd; + ht# =noteheight#; + 2beta#=ht#*b_h; + a# = beta#*a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, 0.5 ht#, 0.5 ht#); + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle xscaled stafflinethickness yscaled 0.4ht; + z1=(0.00wd,-0.10ht); + z2=(0.00wd,+0.05ht); + z3=(0.15wd,-0.05ht); + z4=(0.15wd,+0.10ht); + z5=(0.30wd,+0.00ht); + z6=(0.30wd,+0.15ht); + draw z1 -- z2 -- z3 -- z4 -- z5 -- z6; + +fet_endchar; + +%%%%%%%% +% +% +% +% EDITIO MEDICAEA +% +% +% + +% subbipunctum +fet_beginchar("Ed. Med. subbipunctum", "0medicaea_subbipunctum", + "medsubbipunctumhead") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight#; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, 0.5 ht#, 0.5 ht#); + black_notehead_width# := wd#; + + save za, alpha, size; + pair za; + define_pixels(ht, wd); + alpha = 35; + size = 0.7ht; + pickup pencircle + xscaled 0 + yscaled size rotated -alpha; + za = (0, size) / 2 rotated alpha; + draw -za .. za; + +fet_endchar; + +% parametrized punctum +def punctum_char (expr verbose_name, internal_name, mudela_name, + left_up_stem, left_down_stem) = + + fet_beginchar(verbose_name, internal_name, mudela_name) + + save a, beta, ht, wd; + ht# = 2 staff_space#; + wd# = ht#; + set_char_box(0.0, 0.4wd#, 0.5ht#, 0.5ht#); + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle scaled stafflinethickness; + + z1 = (0.00wd, 0); + z2 = (0.20wd, 0); + z3 = (0.40wd, 0); + penpos1(0.50ht, 90); + penpos2(0.50ht, 90); + penpos3(0.50ht, 90); + penstroke z1e .. z2e .. z3e; + + if left_down_stem: + z5=(0.00wd + 0.5 stafflinethickness, 0); + z6=(0.00wd + 0.5 stafflinethickness, - 1.25ht); + draw z5 -- z6; + elseif left_up_stem: + z5=(0.00wd + 0.5 stafflinethickness, 0); + z6=(0.00wd + 0.5 stafflinethickness, + 1.25ht); + draw z5 -- z6; + fi; + + fet_endchar; +enddef; + +% punctum +punctum_char("Ed. Med. punctum", "0medicaea_punctum", "medpunctumhead", + false, false); + +% left up-stemmed punctum +punctum_char("Ed. Med. reverse virga", "0medicaea_rvirga", "medrvirgahead", + true, false); + +% virga (i.e. left down-stemmed punctum) +punctum_char("Ed. Med. virga", "0medicaea_virga", "medvirgahead", + false, true); + +%%%%%%%% +% +% +% +% HUFNAGEL +% +% +% + +% punctum +% parametrized punctum +def punctum_char (expr verbose_name, internal_name, mudela_name, + down_stem) = + + fet_beginchar(verbose_name, internal_name, mudela_name) + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight#; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 2a# / a_w; + set_char_box(wd#/2, wd#/2, 0.5 ht#, 0.5 ht#); + black_notehead_width# := wd#; + + save za, zb, zc, alpha, size; + pair za, zb, zc; + define_pixels(ht, wd); + alpha = 55; + size = 0.7ht; + pickup pencircle + xscaled 0 + yscaled size rotated -alpha; + za = (0, size) / 2 rotated alpha; + draw -za .. za; + + if down_stem: + zb = (0.00wd, 0); + zc = (0.00wd, - 1.25ht); + draw zb -- zc; + fi; + fet_endchar; +enddef; + +% punctum +punctum_char("Hufnagel punctum", "0hufnagel_punctum", "hufpunctumhead", false) + +% virga +punctum_char("Hufnagel virga", "0hufnagel_virga", "hufvirgahead", true) + +% pes lower punctum +fet_beginchar("Hufnagel pes lower punctum", "0hufnagel_lpes", "huflpeshead") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight#; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 2a# / a_w; + set_char_box(wd#/2, wd#/2, 0.7 ht#, 0.7 ht#); + black_notehead_width# := wd#; + + save za, zb, zc, alpha, size; + pair za, zb, zc; + define_pixels(ht, wd); + alpha = 35; + size = 0.7ht; + pickup pencircle + xscaled 0 + yscaled size rotated -alpha; + za = (size, 0); + draw -za .. za; +fet_endchar; + fet_endgroup("noteheads"); define_pixels(black_notehead_width); diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 4eb74a3e74..0a76e6263c 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -80,7 +80,7 @@ (thickness . 0.48) ; in staff-space (before-line-breaking-callback . ,Beam::before_line_breaking) (after-line-breaking-callback . ,Beam::after_line_breaking) - (neutral-direction . 1) + (neutral-direction . -1) (dir-function . ,beam-dir-majority) (height-quants . ,default-beam-dy-quants) (vertical-position-quant-function . ,default-beam-y-quants) @@ -500,7 +500,7 @@ )) (SpacingSpanner . ( - (spacing-procedure . ,New_spacing_spanner::set_springs) + (spacing-procedure . ,Spacing_spanner::set_springs) (stem-spacing-correction . 0.5) @@ -575,7 +575,7 @@ (lengths . (3.5 3.5 3.5 4.5 5.0)) (stem-shorten . (0.5)) ; if stem is on middle line, choose this direction. - (neutral-direction . 1) + (neutral-direction . -1) (X-offset-callbacks . (,Stem::off_callback)) (X-extent-callback . ,Stem::dim_callback) (Y-extent-callback . ,Stem::height) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index ae582e5b88..e08b36c8e4 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -101,7 +101,13 @@ Align_interface::center_on_element). .") (grob-property-description 'dash-period number? "the length of one dash + white space.") (grob-property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.") (grob-property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.") -(grob-property-description 'neutral-direction dir? "Where to go if we're in the middle of the staff.") +(grob-property-description 'neutral-direction dir? "Where to go if +we're in the middle of the staff. [Ross] has the following to say +about this: Some engravers consider the middle line neutral, and take +the option of using either up- or down-stems for notes that fall on +it. However, more up-to-date engraving no longer permits an option; +now a down-stem is always appropriate.") + (grob-property-description 'delta-y number? "amount of ascension.") (grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes.") (grob-property-description 'details list? "alist of parameters for detailed grob behavior.") -- 2.39.5