From: fred Date: Wed, 27 Mar 2002 00:56:24 +0000 (+0000) Subject: lilypond-1.3.132 X-Git-Tag: release/1.5.59~908 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63d46881c49728e846e56a70f54304cc563b4212;p=lilypond.git lilypond-1.3.132 --- diff --git a/CHANGES b/CHANGES index 29b2aa7ecd..91841f2b9a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,47 @@ +1.3.131.jcn2 +============ + +* Fixes for ascii-script output. Stylesheet needs some work, just as +PostScript output. + +* Bugfix: convert-ly --to accepts argument. + +* Prepared Petites Preludes for (first?) submission to mutopia. + +* Bugfix: out-letter/%.ps generation for mutopia. + +* Bugfix: don't use $(message ) in makefiles; some versions of make +choke on this. + +* Bugfix: ly2dvi.py: don't add magic `//' to TEXINPUTS,MFINPUTS; this +chokes kpsewhich 3.3.1 (bug report filed). + +* Bugfix: file-path.cc: don't interpret relative path as system root. + +* Bugfix: --srcdir install. + +1.3.131.hwn1 +============ + +* Documentation: piano pedals, breath marks, tutorial fixes, +convertors, autochange, \override/\set/\revert, multi-stanza lyrics, +\outputproperty + +* Bugfix: another fix for collapsing dynamics with partcombine. + +* Bugfix: add functionality of +Side_position_interface::self_align_callback() into +Align_interface::align_elements_to_extents(). Otherwise, combining +both (such as in a break alignment) leads to weird behavior: the +spacing information is written halfway during a callback sequence, +leading to weird results. + +This fixes input/test/orchestscore.ly + +* Bugfix: x-offset of stem was off by 0.5 stem thickness. + +* Add grob-property attachment-angle: angle for stem to attach to note head. + 1.3.130.hwn2 ============ diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index f56ab3bca2..a79e99cc6e 100644 --- a/buildscripts/mutopia-index.py +++ b/buildscripts/mutopia-index.py @@ -3,7 +3,35 @@ name = 'mutopia-index' -import find +# find.py -- deprecated in python 2.0 +import fnmatch +import os + +_debug = 0 + +_prune = ['(*)'] + +def find(pattern, dir = os.curdir): + list = [] + names = os.listdir(dir) + names.sort() + for name in names: + if name in (os.curdir, os.pardir): + continue + fullname = os.path.join(dir, name) + if fnmatch.fnmatch(name, pattern): + list.append(fullname) + if os.path.isdir(fullname) and not os.path.islink(fullname): + for p in _prune: + if fnmatch.fnmatch(name, p): + if _debug: print "skip", `fullname` + break + else: + if _debug: print "descend into", `fullname` + list = list + find(pattern, fullname) + return list + + import re import os import sys @@ -154,7 +182,7 @@ for opt in options: dirs = [] for f in files: - dirs = dirs + find.find ('out-www', f); + dirs = dirs + find ('out-www', f) if not dirs: dirs = ['.'] @@ -162,7 +190,7 @@ if not dirs: allfiles = [] for d in dirs: - allfiles = allfiles + find.find ('*.ly.txt', d) + allfiles = allfiles + find ('*.ly.txt', d) print allfiles diff --git a/lily/align-interface.cc b/lily/align-interface.cc index dfb79e812b..5df19061aa 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -26,7 +26,7 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis) Grob * par = me->parent_l (ax); if (par && !to_boolean (par->get_grob_property ("alignment-done"))) { - Align_interface::align_to_extents (par, ax); + Align_interface::align_elements_to_extents (par, ax); } return gh_double2scm (0.0); } @@ -81,7 +81,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a) from the outside by setting minimum-space and extra-space in its children */ void -Align_interface::align_to_extents (Grob * me, Axis a) +Align_interface::align_elements_to_extents (Grob * me, Axis a) { me->set_grob_property ("alignment-done", SCM_BOOL_T); @@ -139,15 +139,30 @@ Align_interface::align_to_extents (Grob * me, Axis a) } - Real where_f=0; + /* + Read self-alignment-X and self-alignment-Y. This may seem like + code duplication. (and really: it is), but this is necessary to + prevent ugly cyclic dependencies that arise when you combine + self-alignment on a child with alignment of children. + */ + + String s ("self-alignment-"); + + s += (a == X_AXIS) ? "X" : "Y"; + + SCM align (me->get_grob_property (s.ch_C())); + Array translates ; + Interval total; + Real where_f=0; + for (int j=0 ; j < elems.size(); j++) { Real dy = 0.0; dy = - stacking_dir * dims[j][-stacking_dir]; if (j) dy += stacking_dir * dims[j-1][stacking_dir]; - + if (j) { dy = (dy >? threshold[SMALLER] ) @@ -155,12 +170,19 @@ Align_interface::align_to_extents (Grob * me, Axis a) } where_f += stacking_dir * dy; + total.unite ( dims[j] + where_f); translates.push (where_f); } + + + Grob * align_center = unsmob_grob (align); + Real center_offset = 0.0; + /* also move the grobs that were empty, to maintain spatial order. */ + Array all_translates; if (translates.size ()) { int i =0; @@ -172,11 +194,20 @@ Align_interface::align_to_extents (Grob * me, Axis a) { w = translates[i++]; } - all_grobs[j]->translate_axis (w, a); - + if (all_grobs[j] == align_center) + center_offset = w; + all_translates .push (w); j++; } } + + if (isdir_b (align)) + { + center_offset = total.linear_combination (gh_scm2double (align)); + } + + for (int j = 0 ; j < all_grobs.size (); j++) + all_grobs[j]->translate_axis (all_translates[j] - center_offset, a); } Axis diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 057ea36945..f17922a017 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -110,12 +110,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) SCM edge_sym = ly_symbol2scm ("Left_edge_item"); Item * edge = new Item (get_property ("LeftEdge")); - /* - We must have left-edge in the middle. Instrument-names - are left to left-edge, so they don't enter the staff. - */ - align_l_->set_grob_property ("self-alignment-X", edge->self_scm ()); - + /* If the element is empty, it will be ignored in the break @@ -125,8 +120,12 @@ Break_align_engraver::acknowledge_grob (Grob_info inf) */ edge->set_extent_callback (Grob::point_dimension_callback_proc, X_AXIS); + /* + We must have left-edge in the middle. Instrument-names + are left to left-edge, so they don't enter the staff. + */ align_l_->set_grob_property ("self-alignment-X", edge->self_scm ()); - + announce_grob (edge, 0); column_alist_ = scm_assoc_set_x (column_alist_, edge_sym, edge->self_scm ()); } diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 36f536ba0f..4318f0b78d 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -64,6 +64,11 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis) me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT)); } + /* + Force break alignment itself to be done first, in the case + */ + + return Side_position::aligned_on_self (element_smob, axis); } @@ -169,7 +174,7 @@ Break_align_interface::do_alignment (Grob *me) /* Force callbacks for alignment to be called */ - Align_interface::align_to_extents (me, X_AXIS); + Align_interface::align_elements_to_extents (me, X_AXIS); Real pre_space = elems[0]->relative_coordinate (column, X_AXIS); @@ -199,10 +204,33 @@ Break_align_interface::do_alignment (Grob *me) stretch_distance = spring_len; } + /* Hint the spacing engine how much space to put in. The pairs are in the format of an interval (ie. CAR < CDR). + */ + /* + UGH UGH UGH + + This is a side effect, and there is no guarantee that this info is + computed at a "sane" moment. + + (just spent some time tracking a bug that was caused by this info + being written halfway: + + self_alignment_callback (*) + -> child->relative_coordinate (self) + -> break_alignment + -> child->relative_coordinate (column) + + the last call incorporates the value that should've been computed + in (*), but--of course-- is not yet. + + The result is that an offsets of align_elements_to_extents () are + not compensated for, and spring_len is completely off. + + */ column->set_grob_property ("extra-space", scm_cons (gh_double2scm (pre_space), diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 223a7303bb..2aee3603d1 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -117,7 +117,6 @@ Dynamic_engraver::try_music (Music * m) It will disappear by itself when stop_translation_timestep () finds that there is nothing to support anymore. */ - line_spanner_ = 0; if (cresc_p_) cresc_p_->suicide (); cresc_p_ = 0; diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 7e814f0439..5c9e37c151 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -87,7 +87,6 @@ (breakable . #t) (stacking-dir . 1) (axes 0) - (X-offset-callbacks . (,Break_align_interface::self_align_callback)) (space-alist . ,default-break-align-space-alist) (meta . ,(grob-description "BreakAlignment" axis-group-interface align-interface @@ -324,7 +323,8 @@ (NoteHead . ( (style . default) (molecule-callback . ,Note_head::brew_molecule) - (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) + (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) + (attachment-angle . ,(* 20/360 3.14159)) (meta . ,(grob-description "NoteHead" rhythmic-head-interface font-interface note-head-interface ))