From 8daf9e941041625231de4fff2a1039cbfe1a2a3f Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:48:40 +0000 Subject: [PATCH] lilypond-1.1.37 --- Documentation/tex/feta.tex | 24 +++---- NEWS | 29 ++++++++ TODO | 21 +++--- input/bugs/biem.ly | 32 +++++++++ input/test/bar-scripts.ly | 6 +- input/test/big-test.ly | 16 +++++ input/test/hara-kiri.ly | 4 +- input/test/noteheadstyle.fly | 10 +++ input/test/number-staff-lines.fly | 2 +- lily/abbrev.cc | 12 +++- lily/align-element.cc | 110 +++++++++++++++++++----------- lily/auto-beam-engraver.cc | 10 --- lily/beam-engraver.cc | 10 --- lily/beam.cc | 53 +++++++++----- lily/bow.cc | 8 --- lily/chord.cc | 2 +- lily/encompass-info.cc | 43 ++++++++---- lily/graphical-axis-group.cc | 25 +++++-- lily/heads-engraver.cc | 13 ++-- lily/include/afm.hh | 2 - lily/include/align-element.hh | 20 ++++-- lily/include/beam.hh | 4 +- lily/include/bow.hh | 9 +-- lily/include/lily-guile.hh | 2 +- lily/include/lookup.hh | 6 +- lily/include/ly-symbols.hh | 5 ++ lily/lily-guile.cc | 11 +++ lily/lookup.cc | 26 +++---- lily/note-head.cc | 37 +++++----- lily/slur-engraver.cc | 10 +-- lily/slur.cc | 13 ++-- lily/stem-info.cc | 50 +++++++++----- lily/vertical-align-engraver.cc | 22 +++--- ly/declarations.ly | 25 +++---- ly/engraver.ly | 62 ++++++++--------- mf/feta-generic.mf | 4 +- mutopia/J.S.Bach/wtk1-fugue2.ly | 7 +- tex/fetdefs.tex | 5 +- 38 files changed, 462 insertions(+), 288 deletions(-) create mode 100644 input/bugs/biem.ly create mode 100644 input/test/big-test.ly create mode 100644 input/test/noteheadstyle.fly diff --git a/Documentation/tex/feta.tex b/Documentation/tex/feta.tex index 36633bea1b..c713e128af 100644 --- a/Documentation/tex/feta.tex +++ b/Documentation/tex/feta.tex @@ -14,7 +14,7 @@ \font\title = cmbx12 scaled \magstep 4 \font\subtitle = cmr9 -\def\lilyfooter{Lily was here, 1.1.0} +\def\lilyfooter{Lily was here} \def\setchar#1#2{\hbox to\charwidth{\hss{#1\char#2}\hss}} \def\charsperline{6} @@ -22,23 +22,23 @@ \def\charwidth{60pt} \def\listfont#1#2#3{ - \n=#2 - \advance\n by-1 - \advance\n by-\charsperline + \n=#2 + \advance\n by-1 + \advance\n by-\charsperline \loop\ifnum\n<#3 - \advance\n by\charsperline - \i=0 - {\vbox to\charheight{\vss\centerline{ - {\loop\ifnum\i<\charsperline - \advance\i by1 - \advance\n by1 + \advance\n by\charsperline + \i=0 + {\vbox to\charheight{\vss\centerline{ + {\loop\ifnum\i<\charsperline + \advance\i by1 + \advance\n by1 {\setchar{#1}{\number\n}} - \repeat}}}}\repeat} + \repeat}}}}\repeat} \centerline{\title FETA} -\centerline{\subtitle (definately not an abbreviation for Font-En-Tja)} +\centerline{\subtitle (definitely not an abbreviation for Font-En-Tja)} \vskip5mm diff --git a/NEWS b/NEWS index ab43ab8884..8c09cf7b0e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,31 @@ + + - diamond heads (probably really ugly). + - cross head. + - tweaked harmonic head a bit. + - property noteHeadStyle + +pl 36.mb2 + - bf: timeSignatureStyle + - Added dynamic fz (forzando) to Lilypond + - bf: N.W.Gade, sfz -> fz + +pl 36.hwn1 + - debian fixes. + - don't insert extra alignment space for empty stuff. + - Align_element derives from Axis_group_element + - junk all *{horizontal,vertical}* Score_element derived classes. + - G_staff_side_item::padding_f_ now generic property. + - some tweaking of beam & stem. + - junk pointerlist in Sources + - junk Stem::mult_i_, Stem::beam_gap_i_, G_staff_side_item::padding + Bar::at_line_start_b_, Key_item::c_position_, Note_head::type_str_, + Note_head::staff_size, Stem::xdir_ + +pl 36.mb1 + - bf: N.W.Gade + +************** + pl 35.uu1 - more memory tweaks: don't do Score_element::line_l () when deleting lines. - more generic properties. @@ -10,6 +38,7 @@ pl 35.uu1 pl 35.jcn1 - some ps fixes +************ pl 35 pl 34.hwn2 diff --git a/TODO b/TODO index 10fca2894a..328e9d3615 100644 --- a/TODO +++ b/TODO @@ -10,8 +10,17 @@ Grep for TODO and ugh/ugr/urg. .* BUGS . * header for PS enteredby = "bla " +. * Hash_table::remove (). +. * 1. With "lilypond -f ps": The black notes with ledger lines seem to +> have extra "blobs" over and to the left of them and all the ledger +> lines from the staff to the note will have a blob too. For example, +> with the note "a4" there will be a black note at the ledger line where +> "c" would be too. However, only the "a4" will have the extra blob. + . * ps/lily.ps . * AFM for BlueSky AFM files. +. * devise standard for functioning of Vertical_align_element. +. * fix interstaff slurs & beams. . * staff size for post/prebreaks . * .ly files . * input/star-spangled-banner @@ -49,7 +58,7 @@ Grep for TODO and ugh/ugr/urg. } } . * midi key. -. *P.P.S. It can be cool in mudela-book to distinguish in pre,postMudelaExample, +. * P.P.S. It can be cool in mudela-book to distinguish in pre,postMudelaExample, whether MudelaExample is epsed or not: ( if this fragment is floating eps, than 1, otherwise 2). say preMudelaExample[eps]{}, and change it in document body sometimes. . * fix singleStaffBracket @@ -61,7 +70,7 @@ otherwise 2). say preMudelaExample[eps]{}, and change it in document body someti . * fix height of / collisions with lyrics (chords), see input/test/vertical-text.ly; input/test/repeat.ly . * We need feta-din*.mf files for more sizes than 10. -. * latex bla.tex broken (titles / \lilyfooter stuff?) +. * latex bla.tex broken (titles / \lilyfooter stuff? . * fix dynamics decently, ie. use kerning & ligatures. . * support_l_arr_ empty in staff-margin's G_staff_side_item . * minVerticalAlign for StaffGroups. @@ -108,7 +117,6 @@ specify the third. Should there be? . * make "in-between" engraver (Tie, Extender) . * make wide_spanner_engraver (line_group_spanne,r staff_symbol) . * remove Interval dim_ from Dimension_cache and rename the struct. -. * merge align_element and axis_element_group. . * do scaled fonts generally . * The Lilypond accidental symbols are available through the TeX macros, \textflat, \textsharp and \textnatural defined in the init file @@ -124,7 +132,7 @@ compilation. . * junk Script_def . * include examples in RPM. . * fix partial measures in meaningful way. -. * working notehead style. + . * add scripts to bars eg. |^"bla" . * relative mode for mi2mu . * uniformise recent feta contributions. @@ -146,8 +154,6 @@ But what if I want a chord that lasts for 3 whole notes? Or what about 2.5 whole notes? Is there a mechanism for getting this kind of length? - - . * fractional chord durs. . * hang Item on Spanner . * do --safe for PS output? @@ -206,7 +212,6 @@ length? . * strip EXEs before installing . * zip target for binary windows dist (JBR) . * junking \skip req in lyrics -. * percussion note heads . * mi2mu empty staffs. . * horizontal centering of dynamics . * $DEPENDENCIES_OUTPUT support @@ -222,7 +227,6 @@ gs: Operand stack: organ you want to be able to give stop indications on the way through, so the \property Voice.Instrument would be a stop, and \property GrandStaff.instrument would be PipeOrgan...) -. * revise the Score_priority_align_engraver concept. It sucks. . * *.yo: fix pod manpage layout legacy . * text-items clash with stems/beams . * --include, -I option for ly2dvi (pass on to lily) @@ -537,6 +541,7 @@ hesitate to ask. . * specify number of lines .* INPUTLANGUAGE +. * \rhythms 4 16 16 16 16; c c c c c -> c4 c16 etc. . * Language: . * \type -> \context ? . * \translator -> ? diff --git a/input/bugs/biem.ly b/input/bugs/biem.ly new file mode 100644 index 0000000000..36a6cba0c4 --- /dev/null +++ b/input/bugs/biem.ly @@ -0,0 +1,32 @@ +basloopje = \notes\relative c{ + [d,8 a' d f] [a\translator Staff=treble d f d] \translator Staff=bass +} + + + +lower = \type Voice=two \notes \relative c{ + < \basloopje > +} +\score { + \type PianoStaff < +\notes \type Staff = treble { c1 } + + \type Staff = bass < + \clef bass; + \lower + > + > + + \paper { + gourlay_maxmeasures = 4.; + indent = 8.\mm; + textheight = 295.\mm; + + % no slur damping + slur_slope_damping = 100.0; + } + \midi { + \tempo 4 = 54; + } +} + diff --git a/input/test/bar-scripts.ly b/input/test/bar-scripts.ly index d618a2073f..789a6e3aa9 100644 --- a/input/test/bar-scripts.ly +++ b/input/test/bar-scripts.ly @@ -1,5 +1,5 @@ - \version "1.0.14"; +\version "1.0.14"; onestaff = \type Staff = foo\notes { \property Staff.instr = instr @@ -29,4 +29,6 @@ stscore = \score { \onestaff \paper { }} %\score {\stscore} -\score {\scscore} +\score {\scscore +\header { title = "bar scripts"; } +} diff --git a/input/test/big-test.ly b/input/test/big-test.ly new file mode 100644 index 0000000000..71e43baba5 --- /dev/null +++ b/input/test/big-test.ly @@ -0,0 +1,16 @@ + +\score { +\notes \relative c { +\include "noteheadstyle.fly" +}\header { title = "notehead style"; } +} + +\score { +\notes \relative c { +\include "number-staff-lines.fly" +}\header { title = "number of staff lines"; } +} + +\include "bar-scripts.ly" + +\include "font20.ly" diff --git a/input/test/hara-kiri.ly b/input/test/hara-kiri.ly index 0ab043ba56..3acad5cad5 100644 --- a/input/test/hara-kiri.ly +++ b/input/test/hara-kiri.ly @@ -24,11 +24,9 @@ toeter_ii = \notes \relative c { g g g g } -toeters = \type StaffGroup = xtoeters < - \type Staff = toeters < +toeters = \type Staff = toeters < \toeter_i \toeter_ii - > > zager = \type Staff = zager \notes \relative c { diff --git a/input/test/noteheadstyle.fly b/input/test/noteheadstyle.fly new file mode 100644 index 0000000000..c1fcca075a --- /dev/null +++ b/input/test/noteheadstyle.fly @@ -0,0 +1,10 @@ + +c''4 c2 c8 c16 c16 c1 +\property Voice.noteHeadStyle = "diamond" +c4 c2 c8 c16 c16 c1 +\property Voice.noteHeadStyle = "transparent" +c4 c2 c8 c16 c16 c1 +\property Voice.noteHeadStyle = "cross" +c4 c2 c8 c16 c16 c1 +\property Voice.noteHeadStyle = "harmonic" +c4 c2 c8 c16 c16 c1 diff --git a/input/test/number-staff-lines.fly b/input/test/number-staff-lines.fly index 50e188e55b..4794afadc7 100644 --- a/input/test/number-staff-lines.fly +++ b/input/test/number-staff-lines.fly @@ -1,2 +1,2 @@ -c c c \property Staff . numberOfStaffLines = 3 +c' c c \property Staff . numberOfStaffLines = 3 diff --git a/lily/abbrev.cc b/lily/abbrev.cc index b2ff4b8e75..58f2fbe86a 100644 --- a/lily/abbrev.cc +++ b/lily/abbrev.cc @@ -30,8 +30,16 @@ Abbreviation::do_print () const Molecule* Abbreviation::do_brew_molecule_p () const { - Real interbeam_f = paper_l ()->interbeam_f (stem_l_->mult_i_); - Real w = 1.5 * lookup_l ()->ball (2).dim_.x ().length (); + Beam * b = stem_l_->beam_l_; + int mult =0; + if (b) + { + Stem_info i = b->get_stem_info (stem_l_); + mult = i.mult_i_; + } + + Real interbeam_f = paper_l ()->interbeam_f (mult); + Real w = 1.5 * lookup_l ()->notehead (2, "").dim_.x ().length (); Real space = stem_l_->staff_line_leading_f (); Real internote_f = space/2; diff --git a/lily/align-element.cc b/lily/align-element.cc index b637ebd5d0..dc41b5de7f 100644 --- a/lily/align-element.cc +++ b/lily/align-element.cc @@ -10,9 +10,10 @@ #include "interval.hh" #include "direction.hh" #include "debug.hh" +#include "hash-table-iter.hh" struct Align_element_content { - Score_element * elem_l_; + Graphical_element * elem_l_; int priority_i_; static int compare (Align_element_content const &h1, @@ -20,7 +21,7 @@ struct Align_element_content { { return h1.priority_i_ - h2.priority_i_; } - Align_element_content (Score_element *elem_l, int p) + Align_element_content (Graphical_element *elem_l, int p) { priority_i_ = p; elem_l_ = elem_l; @@ -36,7 +37,7 @@ struct Align_element_content { void Align_element::add_element (Score_element*el_l) { - int p = priority_i_arr_.size (); + int p = elem_l_arr_.size (); add_element_priority (el_l, p); } @@ -44,8 +45,8 @@ void Align_element::add_element_priority (Score_element *el, int p) { assert (! contains_b (el)); - elem_l_arr_.push (el); - priority_i_arr_.push (p); + Axis_group_element::add_element (el); + priority_i_hash_[el] = p; add_dependency (el); } @@ -53,30 +54,32 @@ void Align_element::do_substitute_element_pointer (Score_element*o, Score_element*n) { - int i; - while ((i = elem_l_arr_.find_i (o))>=0) - if (n) - elem_l_arr_[i] = n; - else - elem_l_arr_.del (i); - + Axis_group_element :: do_substitute_element_pointer (o,n); if (o == center_l_) { center_l_ = n; } + if (priority_i_hash_.elem_b (o)) + { + priority_i_hash_[n] = priority_i_hash_[o]; + /* + Huh? It seems the old pointers are still used. Why? + */ + // priority_i_hash_.remove (o); + } } void Align_element::do_post_processing() { - if (axis_ == Y_AXIS) + if (axis () == Y_AXIS) do_side_processing (); } void Align_element::do_pre_processing () { - if (axis_ == X_AXIS) + if (axis () == X_AXIS) do_side_processing (); } @@ -85,19 +88,22 @@ Align_element::do_side_processing () { sort_elements (); Array dims; - + + Link_array elems; for (int i=0; i < elem_l_arr_.size(); i++) { - Interval y = elem_l_arr_[i]->extent(axis_) ; - if (y.empty_b()) - y = Interval (0,0); - - dims.push (y); + Interval y = elem_l_arr_[i]->extent(axis ()); + if (!y.empty_b()) + { + dims.push (y); + Score_element *e =dynamic_cast(elem_l_arr_[i]); + elems.push (e); + } } Real where_f=0; Real center_f = 0.0; - for (int i=0 ; i < elem_l_arr_.size(); i++) + for (int i=0 ; i < elems.size(); i++) { Real dy = - stacking_dir_ * dims[i][-stacking_dir_]; if (i) @@ -109,33 +115,48 @@ Align_element::do_side_processing () translate_axis (where_f, axis_); + elems[i]->translate_axis (where_f, axis ()); } + if (dims.size ()) + where_f += dims.top ()[stacking_dir_]; if (align_dir_ == RIGHT) center_f = where_f; - + else if (align_dir_ == CENTER && !center_l_) + center_f = where_f / 2; + if (center_f) - for (int i=0 ; i < elem_l_arr_.size(); i++) - elem_l_arr_[i]->translate_axis (- center_f, axis_); + translate_axis ( - center_f, axis ()); + + dim_cache_[axis ()].invalidate (); } Align_element::Align_element() { + ordered_b_ = true; threshold_interval_ = Interval (0, Interval::infinity ()); - set_elt_property (transparent_scm_sym, SCM_BOOL_T); - set_empty (true); stacking_dir_ = DOWN; - align_dir_ = LEFT; - axis_ = X_AXIS; + align_dir_ = CENTER; center_l_ =0; + priority_i_hash_.hash_func_ = pointer_hash; +} + +Axis +Align_element::axis () const +{ + return axes_[0]; +} + +void +Align_element::set_axis (Axis a) +{ + set_axes (a,a); } @@ -149,17 +170,21 @@ void Align_element::sort_elements () { Array content; - for (int i =0; i < elem_l_arr_.size(); i++) - content.push (Align_element_content (elem_l_arr_[i], priority_i_arr_[i])); + for (int i =0; i < elem_l_arr_.size(); i++) + { + Score_element * e = dynamic_cast (elem_l_arr_[i]); + assert (priority_i_hash_.elem_b (e)); + int p = priority_i_hash_[e]; + content.push (Align_element_content (e, p)); + } content.sort (Align_element_content::compare); elem_l_arr_.clear(); - priority_i_arr_.clear(); + priority_i_hash_.clear(); for (int i =0; i < content.size(); i++) { elem_l_arr_.push (content[i].elem_l_); - priority_i_arr_.push (content[i].priority_i_); } } @@ -176,10 +201,19 @@ Align_element::do_print () const Score_element* Align_element::get_elt_by_priority (int p) const { - for (int i=0; i < priority_i_arr_.size (); i++) + for (Hash_table_iter i(priority_i_hash_); i.ok (); i++) { - if (priority_i_arr_[i] == p) - return elem_l_arr_[i]; + if (i.val () == p) + return i.key(); } return 0; } + +int +Align_element::get_priority (Score_element* e) const +{ + if ( priority_i_hash_.elem_b (e)) + return priority_i_hash_[e]; + else + return elem_l_arr_.find_i (e); +} diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 1396f68e75..c38fd2c531 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -179,16 +179,6 @@ Auto_beam_engraver::create_beam_p () if (prop.isnum_b ()) beam_p->quantisation_ = (Beam::Quantisation)(int)prop; - // must set minVerticalAlign = = maxVerticalAlign to get sane results - // see input/test/beam-interstaff.ly - prop = get_property ("minVerticalAlign", 0); - if (prop.isnum_b ()) - beam_p->vertical_align_drul_[MIN] = prop; - - prop = get_property ("maxVerticalAlign", 0); - if (prop.isnum_b ()) - beam_p->vertical_align_drul_[MAX] = prop; - announce_element (Score_element_info (beam_p, 0)); return beam_p; } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 9afca27c9f..4260dfc44c 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -79,16 +79,6 @@ Beam_engraver::do_process_requests () if (prop.isnum_b ()) beam_p_->quantisation_ = (Beam::Quantisation)(int)prop; - // must set minVerticalAlign == maxVerticalAlign to get sane results - // see input/test/beam-interstaff.ly - prop = get_property ("minVerticalAlign", 0); - if (prop.isnum_b ()) - beam_p_->vertical_align_drul_[MIN] = prop; - - prop = get_property ("maxVerticalAlign", 0); - if (prop.isnum_b ()) - beam_p_->vertical_align_drul_[MAX] = prop; - announce_element (Score_element_info (beam_p_, reqs_drul_[START])); } } diff --git a/lily/beam.cc b/lily/beam.cc index d5f9d9e9a9..53a5eb34e9 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -11,19 +11,22 @@ /* [TODO] - * centre beam symbol + * center beam symbol * less hairy code * redo grouping - */ + +TODO: + +The relationship Stem <-> Beam is way too hairy. Let's figure who +needs what, and what information should be available when. + + */ #include -#include "p-col.hh" -#include "array.hh" #include "proto.hh" #include "dimensions.hh" #include "beam.hh" -#include "abbreviation-beam.hh" #include "misc.hh" #include "debug.hh" #include "molecule.hh" @@ -39,13 +42,17 @@ Beam::Beam () left_y_ = 0; quantisation_ = NORMAL; multiple_i_ = 0; - vertical_align_drul_[MIN] = 0; - vertical_align_drul_[MAX] = -1; } void Beam::add_stem (Stem*s) { +#if 0 + if (!stems_.size ()) + { + dim_cache_[Y_AXIS].parent_l_ = &s->dim_cache_[Y_AXIS]; + } +#endif stems_.push (s); s->add_dependency (this); s->beam_l_ = this; @@ -56,6 +63,19 @@ Beam::add_stem (Stem*s) set_bounds (RIGHT,s); } +Stem_info +Beam::get_stem_info (Stem *s) +{ + Stem_info i; + for (int i=0; i < sinfo_.size (); i++) + { + if (sinfo_[i].stem_l_ == s) + return sinfo_[i]; + } + assert (false); + return i; +} + Molecule* Beam::do_brew_molecule_p () const { @@ -81,7 +101,7 @@ Beam::do_brew_molecule_p () const // correct if last note (and therefore reference point of beam) // is on different staff - Stem_info si = sinfo_.top (); + Stem_info si = sinfo_.top (); mol_p->translate_axis (-si.interstaff_f_ * si.stem_l_->staff_line_leading_f ()/2, Y_AXIS); @@ -94,7 +114,7 @@ Beam::center () const Stem_info si = sinfo_[0]; Real w= (si.stem_l_->note_delta_f () + extent (X_AXIS).length ())/2.0; - return Offset (w, (left_y_ + w* slope_f_) * + return Offset (w, ( w* slope_f_) * si.stem_l_->staff_line_leading_f ()/2); } @@ -216,9 +236,6 @@ Beam::set_default_dir () void Beam::solve_slope () { - /* - should use minimum energy formulation (cf linespacing) - */ assert (sinfo_.size () > 1); DOUT << "Beam::solve_slope: \n"; @@ -284,7 +301,7 @@ Beam::set_steminfo () for (int i=0; i < stems_.size (); i++) { Stem *s = stems_[i]; - s->mult_i_ = multiple_i_; + s->set_default_extents (); if (s->invisible_b ()) continue; @@ -306,7 +323,7 @@ Beam::set_steminfo () if (s->invisible_b ()) continue; - Stem_info info (s); + Stem_info info (s, multiple_i_); if (leftx == 0) leftx = info.x_; info.x_ -= leftx; @@ -669,9 +686,13 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const a.translate_axis( - stemdx/2, X_AXIS); int j = 0; Real gap_f = 0; - if (here->beam_gap_i_) + + SCM gap = get_elt_property (beam_gap_scm_sym); + if (gap != SCM_BOOL_F) { - int nogap = rwholebeams - here->beam_gap_i_; + int gap_i = gh_scm2int (gap); + int nogap = rwholebeams - gap_i; + for (; j < nogap; j++) { Molecule b (a); diff --git a/lily/bow.cc b/lily/bow.cc index 9f198376d5..046a95ee98 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -15,16 +15,10 @@ #include "bezier.hh" #include "main.hh" - - Bow::Bow () { dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0; dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; - dash_i_ = 0; - interstaff_f_ = 0; - vertical_align_drul_[MIN] = 0; - vertical_align_drul_[MAX] = -1; } Molecule* @@ -56,7 +50,6 @@ Bow::do_brew_molecule_p () const Molecule* mol_p = new Molecule; mol_p->add_molecule (a); - mol_p->translate_axis (-interstaff_f_, Y_AXIS); return mol_p; } @@ -86,7 +79,6 @@ Bow::do_height () const Real y = c[i][Y_AXIS]; iv.unite (Interval (y,y)); } - iv -= interstaff_f_; return iv; } diff --git a/lily/chord.cc b/lily/chord.cc index e08ce282e6..03594ceed3 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -9,7 +9,7 @@ #include "chord.hh" #include "warn.hh" -// doesn't seem common, and we should know about this during purple hit +// doesn't seem common, and we should know about this during parsing // #define INVERSION_ADDED_AS_BASE 1 Chord::Chord (Array pitch_arr) diff --git a/lily/encompass-info.cc b/lily/encompass-info.cc index 02f5b28686..452d825aa6 100644 --- a/lily/encompass-info.cc +++ b/lily/encompass-info.cc @@ -16,6 +16,7 @@ #include "staff-symbol.hh" #include "note-head.hh" #include "debug.hh" +#include "align-element.hh" Encompass_info::Encompass_info () { @@ -62,20 +63,36 @@ Encompass_info::Encompass_info (Note_column const* note, Direction dir, Slur con if (stem_l->dir_ != dir) o_.y () += 1.0 * internote * dir; - if (slur_l->encompass_arr_.size () - && stem_l->staff_symbol_l () != slur_l->encompass_arr_[0]->stem_l_->staff_symbol_l ()) + + Dimension_cache *common = note->common_group (slur_l, Y_AXIS); + Align_element * align = dynamic_cast (common->element_l ()); + if (align && align->axis() == Y_AXIS) { - if (slur_l->vertical_align_drul_[MIN] != - slur_l->vertical_align_drul_[MAX]) - warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken")); - interstaff_f_ = slur_l->vertical_align_drul_[MIN]; - /* urg, guess staff order */ - int d = note->head_l_arr_.top ()->position_i_ - - slur_l->encompass_arr_[0]->head_l_arr_[0]->position_i_; - if (abs (d > 3)) - interstaff_f_ *= sign (d); - else if (stem_l->chord_start_f () > - slur_l->encompass_arr_[0]->stem_l_->chord_start_f ()) + if (align->threshold_interval_[MIN] != + align->threshold_interval_[MAX]) + warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff beams/slurs may be broken")); + + interstaff_f_ = align->threshold_interval_[MIN]; + + Dimension_cache * slur_refpoint = &slur_l->dim_cache_[Y_AXIS]; + Dimension_cache * note_refpoint = ¬e->dim_cache_[Y_AXIS]; + + while (slur_refpoint->parent_l_ != common) + slur_refpoint = slur_refpoint->parent_l_; + while (note_refpoint->parent_l_ != common) + note_refpoint = note_refpoint->parent_l_; + + + int slur_prio = + align->get_priority (dynamic_cast (slur_refpoint->element_l ())); + int stem_prio = + align->get_priority (dynamic_cast (note_refpoint->element_l ())); + + /* + our staff is lower -> interstaff_f_ *= -1 + */ + // ? Is this OK? + if (slur_prio < stem_prio) interstaff_f_ *= -1; o_.y () += interstaff_f_; } diff --git a/lily/graphical-axis-group.cc b/lily/graphical-axis-group.cc index c6a6137d3c..b26e805518 100644 --- a/lily/graphical-axis-group.cc +++ b/lily/graphical-axis-group.cc @@ -5,6 +5,7 @@ (c) 1997--1999 Han-Wen Nienhuys */ + #include "interval.hh" #include "graphical-axis-group.hh" #include "axis-group-element.hh" @@ -15,8 +16,8 @@ Graphical_axis_group at one time. */ Graphical_axis_group::Graphical_axis_group (Graphical_axis_group const&s) { - axes_[0] = s.axes_[0]; - axes_[1] = s.axes_[1]; + axes_ = s.axes_; + ordered_b_ = s.ordered_b_; } bool @@ -42,6 +43,7 @@ Graphical_axis_group::add_element (Graphical_element*e) for (int i = 0; i < 2; i++) { Axis a = axes_[i]; + assert (a>=0); Dimension_cache * &d = e->dim_cache_[a].parent_l_; assert (!d || d == &dim_cache_[a]); d = &dim_cache_[a]; @@ -57,7 +59,10 @@ void Graphical_axis_group::remove_element (Graphical_element*e) { assert (contains_b (e)); - elem_l_arr_.unordered_substitute (e,0); + if (ordered_b_) + elem_l_arr_.substitute (e,0); + else + elem_l_arr_.unordered_substitute (e,0); for (int i=0; i< 2; i++) { @@ -96,10 +101,16 @@ Graphical_axis_group::do_print() const #endif } -Graphical_axis_group::Graphical_axis_group (Axis a1, Axis a2) +Graphical_axis_group::Graphical_axis_group () { - axes_[0] = a1; - axes_[1] = a2; + ordered_b_ = false; + axes_[0] = -1 ; + axes_[1] = -1 ; } - +void +Graphical_axis_group::set_axes (Axis a1, Axis a2) +{ + axes_[0] = a1 ; + axes_[1] = a2 ; +} diff --git a/lily/heads-engraver.cc b/lily/heads-engraver.cc index ee5c040c3c..fee3bd41b0 100644 --- a/lily/heads-engraver.cc +++ b/lily/heads-engraver.cc @@ -36,6 +36,7 @@ Note_heads_engraver::do_process_requests() if (note_p_arr_.size ()) return ; + String noteheadstyle = get_property ("noteHeadStyle", 0); for (int i=0; i < note_req_l_arr_.size (); i++) { Note_head *note_p = new Note_head; @@ -53,10 +54,14 @@ Note_heads_engraver::do_process_requests() // note_p->steps_i_ = note_req_l->pitch_.steps (); note_p->position_i_ = note_req_l->pitch_.steps (); - String noteheadstyle = get_property ("noteheadStyle", 0); - if (noteheadstyle.length_i ()) - note_p->note_head_type_str_ = noteheadstyle; - + + if (noteheadstyle == "transparent") + note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T); + else + note_p->set_elt_property (style_scm_sym, + gh_str02scm (noteheadstyle.ch_C())); + + Score_element_info itinf (note_p,note_req_l); announce_element (itinf); note_p_arr_.push (note_p); diff --git a/lily/include/afm.hh b/lily/include/afm.hh index 305007eccd..757ed776ee 100644 --- a/lily/include/afm.hh +++ b/lily/include/afm.hh @@ -29,7 +29,6 @@ struct Adobe_font_char_metric : Character_metric { String str () const; Adobe_font_char_metric (); - Box dimensions () const; }; @@ -56,7 +55,6 @@ struct Adobe_font_metric : Font_metric { Adobe_font_metric (); void read_char_metrics (Data_file &input, int size); - Character_metric *get_char (int, bool) const; }; diff --git a/lily/include/align-element.hh b/lily/include/align-element.hh index fbb84f77d7..edc88cab90 100644 --- a/lily/include/align-element.hh +++ b/lily/include/align-element.hh @@ -10,19 +10,21 @@ #ifndef VERTICAL_ALIGN_ITEM_HH #define VERTICAL_ALIGN_ITEM_HH -#include "score-element.hh" +#include "axis-group-element.hh" #include "interval.hh" #include "direction.hh" #include "axes.hh" +#include "hash-table.hh" /** Order elements top to bottom/left to right/right to left etc.. TODO: implement padding. + + document usage of this. */ -class Align_element : virtual public Score_element { - Link_array elem_l_arr_; - Array priority_i_arr_; +class Align_element : public virtual Axis_group_element { + Hash_table priority_i_hash_; void sort_elements (); public: Interval threshold_interval_ ; @@ -34,21 +36,25 @@ public: Direction stacking_dir_; /** - Which side to align? - -1: left side, 0: centered (around center_l_ if not nil), 1: right side + Which side to align? -1: left side, 0: centered (around + center_l_ if not nil, or around center of width), 1: right side + + URG. Unintuitive if stacking_dir_ == -1 */ Direction align_dir_; - Axis axis_; + Axis axis () const; Score_element * center_l_; Align_element (); + void set_axis (Axis); void add_element (Score_element*); void add_element_priority (Score_element*, int); bool contains_b (Score_element const*) const; Score_element *get_elt_by_priority (int) const; + int get_priority (Score_element*) const; protected: virtual void do_print() const; virtual void do_substitute_element_pointer (Score_element*,Score_element*); diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 3b99b4e083..fcf477430e 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -51,13 +51,11 @@ public: /// maximum number of beams (for opening-up of beam-spacing) int multiple_i_; - /// vertical align distance between staffs - Drul_array vertical_align_drul_; - Array sinfo_; Beam(); void add_stem (Stem*); + Stem_info get_stem_info (Stem*); void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current); void set_stemlens (); diff --git a/lily/include/bow.hh b/lily/include/bow.hh index c6b946e87b..dd3426ce10 100644 --- a/lily/include/bow.hh +++ b/lily/include/bow.hh @@ -16,6 +16,11 @@ /** Base class for anything that looks like a slur. Anybody with a better name? + + UGH. Fixme. Should junk + + dy_f_drul_ , dx_f_drul_ + */ class Bow : public Directional_spanner { @@ -23,10 +28,6 @@ public: Bow (); Offset center () const; - int dash_i_; - Real interstaff_f_; - Drul_array vertical_align_drul_; - protected: virtual Molecule* do_brew_molecule_p () const; // virtual Interval do_width () const; diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 097a77af14..5620719042 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -24,7 +24,7 @@ SCM ly_eval (SCM a); SCM ly_func_o (char const* name); SCM ly_quote_scm (SCM s); void ly_display_scm (SCM s); - +String ly_scm2string (SCM s); #include "array.hh" #include "scalar.hh" diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 9b988f4978..9290359b1e 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -23,13 +23,11 @@ public: Lookup (); Lookup (Lookup const&); - - - Molecule special_ball (int, String) const; Molecule simple_bar (String s, Real w) const; Molecule accidental (int, bool cautionary) const; Molecule afm_find (String, bool warn=true) const; - Molecule ball (int) const; + Molecule notehead (int, String) const; + Molecule bar (String, Real height) const; Molecule beam (Real, Real, Real) const; Molecule clef (String) const; diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index 3dfe3025d4..1e2c85eecb 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -14,9 +14,11 @@ #define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym #endif +DECLARE_LY_SYMBOL(at_line_start); DECLARE_LY_SYMBOL(beam); DECLARE_LY_SYMBOL(beam_thickness); DECLARE_LY_SYMBOL(beam_dir); +DECLARE_LY_SYMBOL(beam_gap); DECLARE_LY_SYMBOL(bracket); DECLARE_LY_SYMBOL(break_helper_only); DECLARE_LY_SYMBOL(break_priority); @@ -25,6 +27,7 @@ DECLARE_LY_SYMBOL(char); DECLARE_LY_SYMBOL(change); DECLARE_LY_SYMBOL(damping); DECLARE_LY_SYMBOL(dashed); +DECLARE_LY_SYMBOL(extremal); DECLARE_LY_SYMBOL(dir_forced); DECLARE_LY_SYMBOL(extender_height); DECLARE_LY_SYMBOL(filledbox); @@ -39,11 +42,13 @@ DECLARE_LY_SYMBOL(notewidth); DECLARE_LY_SYMBOL(non_default); DECLARE_LY_SYMBOL(octave_dir); DECLARE_LY_SYMBOL(output); +DECLARE_LY_SYMBOL(padding); DECLARE_LY_SYMBOL(pianobrace); DECLARE_LY_SYMBOL(placebox); DECLARE_LY_SYMBOL(rulesym); DECLARE_LY_SYMBOL(rulethickness); DECLARE_LY_SYMBOL(staffheight); +DECLARE_LY_SYMBOL(style); DECLARE_LY_SYMBOL(text); DECLARE_LY_SYMBOL(transparent); DECLARE_LY_SYMBOL(tuplet); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 5bac21d917..22c271c892 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -88,3 +88,14 @@ ly_display_scm (SCM s) gh_display (s); gh_newline (); } + +String +ly_scm2string (SCM s) +{ + int len; + char * p = gh_scm2newstr (s , &len); + + String r (p); + delete p; + return r; +} diff --git a/lily/lookup.cc b/lily/lookup.cc index 5bffa992cf..b4ae24acb5 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -120,12 +120,12 @@ Lookup::afm_find (String s, bool warn) const } Molecule -Lookup::ball (int j) const +Lookup::notehead (int j, String type) const { if (j > 2) j = 2; - return afm_find (String ("noteheads-") + to_str (j)); + return afm_find (String ("noteheads-") + to_str (j) + type); } Molecule @@ -162,6 +162,10 @@ Lookup::bar (String str, Real h) const { return fill (Box (Interval(0, 0), Interval (-h/2, h/2))); } + if (str == "scorepostbreak") + { + return simple_bar ("score", h); + } else if (str == "|") { return thin; @@ -336,12 +340,12 @@ Lookup::special_time_signature (String s, int n, int d) const String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); Molecule m = afm_find (symbolname, false); - if (!m.dim_[X_AXIS].empty_b ()) + if (!m.empty_b()) return m; // Second guess: s contains the full signature name m = afm_find ("timesig-"+s, false); - if (!m.dim_[X_AXIS].empty_b ()) + if (!m.empty_b ()) return m; // Resort to default layout with numbers @@ -408,10 +412,7 @@ Lookup::text (String style, String text) const SCM l = gh_eval_str (("(style-to-cmr \"" + style + "\")").ch_C()); if (l != SCM_BOOL_F) { - int len ; - char * s = gh_scm2newstr(SCM_CDR (l), &len); - style = String (s) + to_str ((int)font_h); - delete s; + style = ly_scm2string (SCM_CDR(l)) +to_str ((int)font_h); } Real w = 0; @@ -605,12 +606,3 @@ Lookup::volta (Real w, bool last_b) const } -Molecule -Lookup::special_ball (int j, String kind_of_ball) const -{ - if (j > 2) - j = 2; - - return afm_find (String ("noteheads-") + kind_of_ball); -} - diff --git a/lily/note-head.cc b/lily/note-head.cc index 9b53dc498e..f881c6134c 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -10,17 +10,19 @@ #include "dots.hh" #include "note-head.hh" #include "debug.hh" -#include "paper-def.hh" #include "lookup.hh" #include "molecule.hh" #include "musical-request.hh" +void +Note_head::flip_around_stem (Direction d) +{ + translate_axis (do_width ().length () * d, X_AXIS); +} Note_head::Note_head () { - x_dir_ = CENTER; position_i_ = 0; - extremal_i_ = 0; } void @@ -39,12 +41,14 @@ Note_head::compare (Note_head *const &a, Note_head * const &b) return a->position_i_ - b->position_i_; } +/** + Don't account for ledgerlines in the width. + */ Interval Note_head::do_width () const { - Molecule a = lookup_l ()->ball (balltype_i_); + Molecule a = lookup_l ()->notehead (balltype_i_, ""); // UGH Interval i = a.dim_[X_AXIS]; - i+= x_dir_ * i.length (); return i; } @@ -52,28 +56,25 @@ Molecule* Note_head::do_brew_molecule_p() const { Molecule*out = 0; - Paper_def *p = paper_l (); Real inter_f = staff_line_leading_f ()/2; int sz = lines_i ()-1; - // ugh + int streepjes_i = abs (position_i_) < sz ? 0 : (abs(position_i_) - sz) /2; - - Molecule head; - if (note_head_type_str_.length_i ()) { - if (note_head_type_str_ == "normal") // UGH - note_head_type_str_ = ""; - head = lookup_l()->special_ball (balltype_i_, note_head_type_str_); + + String type; + SCM style =get_elt_property (style_scm_sym); + if (style != SCM_BOOL_F) + { + type = ly_scm2string (SCM_CDR(style)); } - else - head = lookup_l()->ball (balltype_i_); - out = new Molecule (Molecule (head)); - out->translate_axis (x_dir_ * head.dim_[X_AXIS].length (), X_AXIS); - + Molecule head (lookup_l()->notehead (balltype_i_, type)); + + out = new Molecule (Molecule (head)); if (streepjes_i) { diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index a82d866834..4d4fb48d0a 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -76,15 +76,7 @@ Slur_engraver::do_process_requests() Slur * s_p =new Slur; Scalar prop = get_property ("slurdash", 0); if (prop.isnum_b ()) - s_p->dash_i_ = prop; - - prop = get_property ("minVerticalAlign", 0); - if (prop.isnum_b ()) - s_p->vertical_align_drul_[MIN] = prop; - - prop = get_property ("maxVerticalAlign", 0); - if (prop.isnum_b ()) - s_p->vertical_align_drul_[MAX] = prop; + s_p->set_elt_property (dashed_scm_sym, gh_int2scm(prop)); requests_arr_.push (slur_req_l); start_slur_l_arr_.push (s_p); diff --git a/lily/slur.cc b/lily/slur.cc index 3e2b5d1abb..0f9beffe3e 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -150,7 +150,7 @@ Slur::do_post_processing () if (d == RIGHT) { dx_f_drul_[LEFT] = spanned_drul_[LEFT]->extent (X_AXIS).length (); - + // urg -- check if needed if (encompass_arr_.size () > 1) dx_f_drul_[RIGHT] += notewidth_f; @@ -312,18 +312,15 @@ Slur::get_encompass_offset_arr () const notes.push (info.o_ - left); } Encompass_info info (encompass_arr_.top (), dir_, this); + Real inter_staff = info.interstaff_f_; - // urg: - Slur* urg = (Slur*)this; - urg->interstaff_f_ = info.interstaff_f_; - - d[Y_AXIS] += interstaff_f_; + d[Y_AXIS] += inter_staff; // prebreak - if (interstaff_f_ && (encompass_arr_.top () != spanned_drul_[RIGHT])) + if (inter_staff && (encompass_arr_.top () != spanned_drul_[RIGHT])) { Encompass_info info (encompass_arr_[encompass_arr_.size () - 1], dir_, this); - d[Y_AXIS] -= info.o_[Y_AXIS] - interstaff_f_; + d[Y_AXIS] -= info.o_[Y_AXIS] - inter_staff; } notes.push (d); diff --git a/lily/stem-info.cc b/lily/stem-info.cc index a0914f000b..708c6b4f45 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -11,6 +11,7 @@ #include "misc.hh" #include "debug.hh" +#include "align-element.hh" #include "stem.hh" #include "paper-def.hh" #include "lookup.hh" @@ -22,15 +23,14 @@ Stem_info::Stem_info () { } -Stem_info::Stem_info (Stem*s) +Stem_info::Stem_info (Stem*s, int mult) { + mult_i_ =mult; stem_l_ = s; x_ = stem_l_->hpos_f (); dir_ = stem_l_->dir_; SCM bd = stem_l_->remove_elt_property (beam_dir_scm_sym); beam_dir_ = gh_scm2int (SCM_CDR(bd)); - - mult_i_ = stem_l_->mult_i_; interstaff_f_ = 0; Paper_def* paper_l = stem_l_->paper_l (); @@ -106,21 +106,37 @@ Stem_info::Stem_info (Stem*s) idealy_f_ = miny_f_ >? idealy_f_; // interstaff beam - Beam* beam_l_ = stem_l_->beam_l_; - if (beam_l_->sinfo_.size () - && stem_l_->staff_symbol_l () != beam_l_->sinfo_[0].stem_l_->staff_symbol_l ()) + Beam* beam_l = stem_l_->beam_l_; + Dimension_cache *common = stem_l_->common_group (beam_l, Y_AXIS); + Align_element * align = dynamic_cast (common->element_l ()); + if (align && align->axis() == Y_AXIS) { - { - // warning (_ ("invalid dimension cache: guessing staff position")); - if (beam_l_->vertical_align_drul_[MIN] != - beam_l_->vertical_align_drul_[MAX]) - warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken")); - interstaff_f_ = beam_l_->vertical_align_drul_[MIN] / internote_f; - // urg, guess staff order: - // if our stem ends higher, our staff is probably lower... - if (idealy_f_ * beam_dir_ > beam_l_->sinfo_[0].idealy_f_ * beam_dir_) - interstaff_f_ *= -1; - } + if (align->threshold_interval_[MIN] != + align->threshold_interval_[MAX]) + warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff beams/slurs may be broken")); + + interstaff_f_ = align->threshold_interval_[MIN] / internote_f; + + Dimension_cache * beam_refpoint = &beam_l->dim_cache_[Y_AXIS]; + Dimension_cache * stem_refpoint = &stem_l_->dim_cache_[Y_AXIS]; + + while (beam_refpoint->parent_l_ != common) + beam_refpoint = beam_refpoint->parent_l_; + while (stem_refpoint->parent_l_ != common) + stem_refpoint = stem_refpoint->parent_l_; + + + int beam_prio = + align->get_priority (dynamic_cast (beam_refpoint->element_l ())); + int stem_prio = + align->get_priority (dynamic_cast (stem_refpoint->element_l ())); + + /* + our staff is lower -> interstaff_f_ *= -1 + */ + if (beam_prio < stem_prio) + interstaff_f_ *= -1; + idealy_f_ += interstaff_f_ * beam_dir_; miny_f_ += interstaff_f_ * beam_dir_; maxy_f_ += interstaff_f_ * beam_dir_; diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 67fdfda3dd..036cb8d5d8 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -8,8 +8,8 @@ #include "p-col.hh" #include "vertical-align-engraver.hh" -#include "vertical-align-spanner.hh" -#include "vertical-group-spanner.hh" +#include "axis-align-spanner.hh" +#include "axis-group-spanner.hh" Vertical_align_engraver::Vertical_align_engraver() { @@ -19,7 +19,10 @@ Vertical_align_engraver::Vertical_align_engraver() void Vertical_align_engraver::do_creation_processing() { - valign_p_ =new Vertical_align_spanner; + valign_p_ =new Axis_align_spanner; + valign_p_->set_axis (Y_AXIS); + valign_p_->stacking_dir_ = DOWN; + valign_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (valign_p_ , 0)); } @@ -38,7 +41,12 @@ Vertical_align_engraver::do_removal_processing() { valign_p_->threshold_interval_[SMALLER] = Real (dist); } - + + dist = get_property ("alignmentReference",0); + if (dist.length_i () && dist.isnum_b ()) + { + valign_p_->align_dir_ = int (dist); + } valign_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); typeset_element (valign_p_); valign_p_ =0; @@ -47,12 +55,10 @@ Vertical_align_engraver::do_removal_processing() void Vertical_align_engraver::acknowledge_element (Score_element_info i) { - if (i.origin_grav_l_arr_.size() == 1 - && dynamic_cast (i.elem_l_) + if (i.origin_grav_l_arr_.size() == 1 && + dynamic_cast (i.elem_l_) && !i.elem_l_->parent_l (Y_AXIS)) { - assert (!valign_p_->contains_b (i.elem_l_)); - valign_p_->add_element (i.elem_l_); } } diff --git a/ly/declarations.ly b/ly/declarations.ly index bb2f3d39d0..7d01eca86e 100644 --- a/ly/declarations.ly +++ b/ly/declarations.ly @@ -10,18 +10,6 @@ longa = \duration { -2 0 } Gourlay = 1.0 Wordwrap = 0.0 - -papersize = "a4" - -\include "paper20.ly" - -\paper{ - \paper_twenty -} - -% ugh -\include "midi.ly" - % declarations for standard directions left = -1 right = 1 @@ -39,6 +27,19 @@ nobreak = { \penalty = -10000; } major = 0 minor = 3 + + +papersize = "a4" + +\include "paper20.ly" + +\paper{ + \paper_twenty +} + +% ugh +\include "midi.ly" + \include "dynamic.ly" \include "property.ly" diff --git a/ly/engraver.ly b/ly/engraver.ly index 7f6d4bc796..8f11a285f6 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -66,6 +66,7 @@ StaffContext=\translator { \type "Line_group_engraver_group"; \name ChoirStaff; \consists "Vertical_align_engraver"; + alignmentReference = \center; \consists "Staff_group_bar_engraver"; \accepts "Staff"; \accepts "RhythmicStaff"; @@ -126,6 +127,7 @@ GrandStaffContext=\translator{ \consists "Span_bar_engraver"; \consists "Vertical_align_engraver"; \consists "Piano_bar_engraver"; + alignmentReference = \center; minVerticalAlign = 1.5*\staffheight; \accepts "Staff"; @@ -134,15 +136,19 @@ GrandStaffContext=\translator{ \translator{\GrandStaffContext minVerticalAlign = 3.0*\staffheight; maxVerticalAlign = 3.0*\staffheight; + \name "PianoStaff"; } StaffGroupContext= \translator { - \type "Hara_kiri_line_group_engraver"; +% \type "Hara_kiri_line_group_engraver"; % \type "Line_group_engraver_group"; + \type "Engraver_group_engraver"; \consists "Span_bar_engraver"; \consists "Vertical_align_engraver"; + alignmentReference = \center; + \consists "Staff_group_bar_engraver"; \name StaffGroup; \accepts "Staff"; @@ -189,28 +195,6 @@ ChordNameContext = \translator { }; \translator { \ChordNameContext } -ScoreContext = \translator { - \type Score_engraver; - \name Score; - - \consists "Timing_engraver"; - - \consists "Span_score_bar_engraver"; - \consists "Score_priority_engraver"; -% \consists "Priority_horizontal_align_engraver"; - \consists "Vertical_align_engraver"; - - - \accepts "StaffGroup"; - \accepts "Staff"; - \accepts "RhythmicStaff"; - \accepts "Lyrics"; - \accepts "ChordNames"; - \accepts "GrandStaff"; - \accepts "ChoirStaff"; - \accepts "PianoStaff"; -}; -\translator { \ScoreContext } ScoreWithNumbers = \translator { \type "Score_engraver"; @@ -266,31 +250,41 @@ OrchestralPartStaffContext = \translator { \consists "Bar_number_engraver"; }; -OrchestralScoreContext= \translator { + +ScoreContext = \translator { \type Score_engraver; \name Score; - barScriptPadding = "2.0"; % dimension \pt - markScriptPadding = "4.0"; - barColumnPriority = "-4"; - markBreakPriority = "-4"; - defaultClef = treble; \consists "Timing_engraver"; - \consists "Bar_number_engraver"; - \consists "Mark_engraver"; \consists "Span_score_bar_engraver"; \consists "Score_priority_engraver"; - \consists "Vertical_align_engraver"; + alignmentReference = \down; + defaultClef = treble; - \accepts "ChoirStaff"; + \accepts "Staff"; \accepts "StaffGroup"; - \accepts "HaraKiriStaff"; \accepts "RhythmicStaff"; \accepts "Lyrics"; \accepts "ChordNames"; \accepts "GrandStaff"; + \accepts "ChoirStaff"; \accepts "PianoStaff"; +}; + +\translator { \ScoreContext } + +OrchestralScoreContext= \translator { + \ScoreContext + + barScriptPadding = "2.0"; % dimension \pt + markScriptPadding = "4.0"; + + + \consists "Bar_number_engraver"; + \consists "Mark_engraver"; + + \accepts "HaraKiriStaff"; }; diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index df9dc1ee07..01d1cb2c7a 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -1,4 +1,4 @@ -% +i% % feta-generic.mf -- implement % % source file of the Feta (defintively not an abbreviation for Font-En-Tja) @@ -42,5 +42,5 @@ else: % input feta-schrift; % input feta-schrift; % input feta-haak; - input feta-timesig; +% input feta-timesig; fi diff --git a/mutopia/J.S.Bach/wtk1-fugue2.ly b/mutopia/J.S.Bach/wtk1-fugue2.ly index 7166c55fdb..187bb83512 100644 --- a/mutopia/J.S.Bach/wtk1-fugue2.ly +++ b/mutopia/J.S.Bach/wtk1-fugue2.ly @@ -171,7 +171,7 @@ bassdux = \type Voice=three \notes \relative c' { \score { - \type GrandStaff < + \type PianoStaff < \type Staff = treble < \global \dux @@ -189,11 +189,6 @@ bassdux = \type Voice=three \notes \relative c' { textheight = 295.\mm; \translator{ \OrchestralScoreContext } - \translator{ - \GrandStaffContext - minVerticalAlign = 3.0*\staffheight; - maxVerticalAlign = 3.0*\staffheight; - } } \header{ opus = "BWV 847"; diff --git a/tex/fetdefs.tex b/tex/fetdefs.tex index ee03b11bcf..8fca01e38f 100644 --- a/tex/fetdefs.tex +++ b/tex/fetdefs.tex @@ -4,7 +4,10 @@ \def\placebox#1#2#3{% \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}% - +% +% +% UGH! JUNKME! +% \def\fetsixteendefs{% \font\fetasixteen = feta16 \font\fetanummersixteen = feta-nummer8 -- 2.39.5