From 62bf0ff3e35030aab8ade8d4dd13dd90e08492cf Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 22:43:05 +0000 Subject: [PATCH] lilypond-1.3.3 --- Documentation/topdocs/INSTALL.texi | 10 +- Documentation/user/refman.itely | 28 +- Documentation/user/tutorial.itely | 16 +- TODO | 22 -- input/bugs/barline.ly | 2 +- input/bugs/monstrous.ly | 10 +- input/just-friends.ly | 19 +- input/test/chord-inversion.ly | 12 +- input/test/chord-table.ly | 2 +- input/test/chords.ly | 27 +- input/test/gmsusd.ly | 11 +- input/test/notemode-chords.ly | 2 +- input/tutorial/flowing.ly | 4 +- input/twinkle-pop.ly | 8 +- lily/bar-script-engraver.cc | 4 +- lily/beam.cc | 54 +-- lily/bezier.cc | 29 +- lily/bow.cc | 4 +- lily/breathing-sign.cc | 6 +- lily/chord-name-engraver.cc | 35 +- lily/chord.cc | 573 +++++++++++++++++----------- lily/directional-spanner.cc | 6 +- lily/dynamic-engraver.cc | 15 +- lily/include/bezier.hh | 7 +- lily/include/breathing-sign.hh | 3 + lily/include/chord-name-engraver.hh | 2 + lily/include/chord.hh | 31 +- lily/include/directional-spanner.hh | 9 +- lily/include/lily-proto.hh | 2 + lily/include/musical-request.hh | 14 +- lily/include/my-lily-parser.hh | 2 +- lily/include/request.hh | 3 + lily/include/staff-side.hh | 8 +- lily/include/stem-info.hh | 5 +- lily/include/stem.hh | 13 +- lily/lexer.ll | 6 + lily/musical-request.cc | 2 +- lily/my-lily-parser.cc | 25 +- lily/note-column.cc | 4 +- lily/note-heads-engraver.cc | 8 + lily/parser.yy | 24 +- lily/script-column.cc | 2 +- lily/script-engraver.cc | 8 +- lily/script.cc | 4 +- lily/slur-engraver.cc | 2 +- lily/slur.cc | 56 +-- lily/staff-margin-engraver.cc | 2 +- lily/staff-side.cc | 14 +- lily/stem-engraver.cc | 2 +- lily/stem-info.cc | 4 +- lily/stem-staff-side.cc | 6 +- lily/stem-tremolo.cc | 6 +- lily/stem.cc | 47 +-- lily/text-engraver.cc | 2 +- lily/tie-engraver.cc | 2 +- lily/tie.cc | 10 +- lily/tuplet-spanner.cc | 12 +- ly/chord-modifiers.ly | 4 +- mf/GNUmakefile | 2 + stepmake/aclocal.m4 | 2 +- 60 files changed, 727 insertions(+), 527 deletions(-) diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index 1e40606d89..f4cd0c6efd 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -80,9 +80,13 @@ Available at @uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry} or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de} -@item MetaPost, if you want to use direct PostScript output. Please -note that tetex-0.4pl8 (included with Redhat 5.x) does not include -@file{mfplain.mp}, which is needed for producing the scaleable font files. +@item MetaPost, needed for generating PostScript fonts. Please +note that tetex-0.4pl8 (included with Redhat 5.x) does not include +@file{mfplain.mp}, which is needed for producing the scalable font +files. + +If you do not want to use PostScript output, edit @file{mf/GNUmakefile}. + @end itemize diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index bea07dc13d..b772f4b7a7 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1475,7 +1475,7 @@ Chord mode (see section XREF-modes [FIXME]). @example - @var{tonic}[@var{duration}][@code{-}@var{modifiers}][@code{^}@var{subtractions}][@code{/}@var{inversion}]. + @var{tonic}[@var{duration}][@code{-}@var{modifiers}][@code{^}@var{subtractions}][@code{/}@var{inversion}][@code{/+}@var{bass}]. @end example @var{tonic} should be the tonic note of the chord, and @var{duration} @@ -1493,15 +1493,15 @@ must be separated by a dot (`@code{.}'). @mudela[fragment,verbatim] \transpose c'' { \chords { - c1 c-3- c-7 c-8 - c-9 c-9-.5+.7+ c-3-.5- c-4.6.8 + c1 c:3- c:7 c:8 + c:9 c:9-.5+.7+ c:3-.5- c:4.6.8 } } @end mudela @end quotation -The second type of modifier that may appear after the `@code{-}' is a +The second type of modifier that may appear after the `@code{:}' is a named modifier. Named modifiers are listed in the file @file{chord-modifiers.ly}. The available modifiers are `@code{m}' and `@code{min}' which lower the 3rd half a step, `@code{aug}@indexcode{aug}' which @@ -1514,7 +1514,7 @@ which replaces the 5th with a 4th. @mudela[fragment,verbatim] \transpose c'' { \chords { - c1-m c-min7 c-maj c-aug c-dim c-sus + c1:m c:min7 c:maj c:aug c:dim c:sus } } @@ -1529,7 +1529,7 @@ separated by dots. @mudela[fragment,verbatim,center] \transpose c'' { \chords { - c1^3 c-7^5.3 c-8^7 + c1^3 c:7^5.3 c:8^7 } } @end mudela @@ -1543,7 +1543,21 @@ warning will be printed. @mudela[fragment,verbatim,center] \transpose c''' { \chords { - c1 c/e c/g c-7/e + c1 c/e c/g c:7/e + } + } + +@end mudela + +Bass notes can be added by `@code{/+}@indexcode{/+}' and +the name of a single note to a chord. This has the effect of +adding the specified note to the chord, lowered by an octave, +so it becomes the lowest note in the chord. + +@mudela[fragment,verbatim,center] + \transpose c''' { + \chords { + c1 c/+c c/+g c:7/+b } } diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 5029f7fa34..a5d540afc5 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -346,8 +346,8 @@ text = \lyrics @{ accompaniment =\chords @{ r8 - c2-3- f-3-.7 d-min es4 c8-min r8 - c2-min f-min7 g-7^3.5 c-min @} + c2:3- f:3-.7 d:min es4 c8:min r8 + c2:min f:min7 g:7^3.5 c:min @} \score @{ \simultaneous @{ @@ -397,8 +397,8 @@ text = \lyrics { accompaniment =\chords { r8 - c2-3- f-3-.7 d-min es4 c8-min r8 - c2-min f-min7 g-7^3.5 c-min } + c2:3- f:3-.7 d:min es4 c8:min r8 + c2:min f:min7 g:7^3.5 c:min } \score { \simultaneous { @@ -513,7 +513,7 @@ of the chords you want, instead of the notes comprising the chord. @end example There is no accompaniment during the anacrusis.@example - c2-3- f-3-.7 + c2:3- f:3-.7 @end example A chord is started by the tonic of the chord. The @@ -523,19 +523,19 @@ be small. @code{7} modifies (adds) a seventh, which is small by default to create the @code{f a c es} chord. Multiple modifiers must be separated by a dot.@example - d-min es4 c8-min r8 + d:min es4 c8:min r8 @end example Some modifiers have predefined names, eg. @code{min} is the same as @code{3-}, so @code{d-min} is a minor @code{d} chord.@example - c2-min f-min7 g-7^3.5 c-min @} + c2:min f:min7 g:7^3.5 c:min @} @end example A named modifier @code{min} and a normal modifier @code{7} do not have to be separated by a dot. Tones from a chord are removed with chord subtractions. Subtractions are started with a caret, and they are -also separated by dots. In this example, @code{g-7^3.5} produces a +also separated by dots. In this example, @code{g:7^3.5} produces a minor seventh. The brace ends the sequential music. @example \score @{ diff --git a/TODO b/TODO index 813dcad6e0..07f05fc75b 100644 --- a/TODO +++ b/TODO @@ -36,28 +36,6 @@ John . * fix or replace feta-accordion.mf . * script engraver . * bracket pdf hack -. * Chords: -. * Bass/inversion pitch when not part of Chord -Sometimes a series of changing chords will be blocked out over a static tone -in the bass, usually this was referred to as a pedal tone (and it's been -continued to be used, even in contemporary music). Another less frequently -used practice is putting a non-chordal tone in the bass (that is not acting -as a pedal tone) in order to create tension or make a more colorful sound. -There are examples of this in the classsical literature, but its use is much -more prevalent today. For example, the chord sequence Dm7 - Dm7/G is such a -sequence, and the Dm7/G defies easy classification. Is it a G7(no 3rd)add -9/11? Or is it a G7(no 3rd)add2/4? Or perhaps Dm7 add11? It's a heck of a -lot easier to read to just leave it as Dm7/G! -. * Diminished does not mean 5- -When speaking of a chord, dimished can mean one of two things: A diminished -triad or a dimished seventh chord (which is distinctly different from what's -known as the 'half-diminished' chord). The triad is a root with a flat -third and flat fifth, and is notated (at least in America, someone else will -have to fill me in on other countries) as (using C as the root) Cdim, or Co. -The diminished seventh has a root with a flat third, flat fifth, and a -doubly flatted seventh (which is enharmonically equivalent to a sixth, and -from which comes tons of confusion). It is usually notated as (again, using -C as the root) Cdim7 or Co7. . * Mondrup: - I would like the possibility of forcing clef- and key- changes to be diff --git a/input/bugs/barline.ly b/input/bugs/barline.ly index c9c9699906..97ac88ac61 100644 --- a/input/bugs/barline.ly +++ b/input/bugs/barline.ly @@ -15,7 +15,7 @@ melody = \notes \relative c' { accompaniment =\chords \sequential { r8 - c2-min f-min 7 + c2:min f:min 7 } \score { diff --git a/input/bugs/monstrous.ly b/input/bugs/monstrous.ly index 52ca68966f..e25ea236e5 100644 --- a/input/bugs/monstrous.ly +++ b/input/bugs/monstrous.ly @@ -1,12 +1,14 @@ +%% Chord gurus, is this ok now?? + monstrous= \chords{ \property Score.chordInversion = "1" - % /c is missing: - bes-6/c + % /c is/was missing: + bes:6/+c - % Cdim7 ?? - cis-3-.5-.6 + % Cdim7 + c:dim7 } \score{ diff --git a/input/just-friends.ly b/input/just-friends.ly index a6cc637cb3..3b273123c7 100644 --- a/input/just-friends.ly +++ b/input/just-friends.ly @@ -31,18 +31,17 @@ of a certain tune (Jazz, Real Book, for example), like \score{ \context ChordNames \chords{ - \property Score.chordInversion = 1 \property Score.barAtLineStart = 1 \repeat semi 2 { - f1-maj f-maj f-7 bes-7 - c-maj c-maj es es - d-7 g-7 b2-7/fis e-7 a1-7\break - d-7 d-7 d-7 g2-7 ges-7 - - f1-maj f1-maj f-7 bes-7 - c-maj c-maj es es - d-7 g-7 b2-7/fis e-7 a1-7\break - d-7 d2-7 g-7 c1-6 g2-7 c-7 + f1:maj f:maj f:7 bes:7 + c:maj c:maj es es + d:7 g:7 b2:7/fis e:7 a1:7\break + d:7 d:7 d:7 g2:7 ges:7 + + f1:maj f1:maj f:7 bes:7 + c:maj c:maj es es + d:7 g:7 b2:7/fis e:7 a1:7\break + d:7 d2:7 g:7 c1:6 g2:7 c:7 } } \paper{ diff --git a/input/test/chord-inversion.ly b/input/test/chord-inversion.ly index 315561dbca..c54281fa6d 100644 --- a/input/test/chord-inversion.ly +++ b/input/test/chord-inversion.ly @@ -5,14 +5,12 @@ TestedFeatures = "chord inversions"; } inversions = \notes\transpose c''\chords{ - % inversions ignored here - c1 c-sus c-6 c/e c/g c/d - % now try to find chords with inversions - \property Score.chordInversion = 1 - c1 c-sus c-6 - c/e - c/g + % inversions + c1 c:sus c:6 c/e c/g c/d % this triggers a warning: no 'd' in chord of c + + % added bass + c/+e c/+c c/+b } \score{ diff --git a/input/test/chord-table.ly b/input/test/chord-table.ly index 40e599521a..94df658308 100644 --- a/input/test/chord-table.ly +++ b/input/test/chord-table.ly @@ -5,7 +5,7 @@ enteredby = "jcn"; } tab = \notes\transpose c'''\chords{ - c1 c-m c-4 c-m4 c-5+ c-5- c-m5- c-5-.5+ c-6\break %c-m6\break + c1 c:m c:4 c:m4 c:5+ c:5- c:dim c:5-.5+ c:6\break %c:m6\break } \score{ diff --git a/input/test/chords.ly b/input/test/chords.ly index e4e3e756ce..c74d502430 100644 --- a/input/test/chords.ly +++ b/input/test/chords.ly @@ -7,26 +7,27 @@ Would this be acceptable/good enough/convenient for entry? C# cis Cb ces - Cm; Cmin c-3-; c-m; c-min - Caug c-5+; c-aug; - Cdim c-5-; c-dim - Cmaj7 c-7+; c-maj - C7 c-7 - Csus; Csus4 c-4; c-sus + Cm; Cmin c:3-; c:m; c:min + Caug c:5+; c:aug; + Cdim c:3-:5-; c:dim + Cmaj7 c:7+; c:maj + C7 c:7 + Csus; Csus4 c:4; c:sus %} scales = \notes \transpose c'' \chords{ % - c1-m c-min c4-dim c-aug c-sus c-maj - c1-6 c4-7 c-9 c-11 c-13 - c-m7 c-m.sus c-m7.sus - c1-7^5 c-13^5.7.9.11 - % c1-7^5 c-13^5 + c1:m c:min c4:dim c:aug c:sus c:maj + c1:6 c4:7 c:9 c:11 c:13 + c:m7 c:m.sus c:m7.sus + c4:dim7 c:dim9 c2:7^5 + c:13^5.7.9.11 + % c1:7^5 c:13^5 c1 g d a e b fis c1 f bes es as des ges - % wierd, multiple -add, ^sub - c-7+.9-^3.5 + % wierd, multiple :add, ^sub + c:7+.9-^3.5 % long c\breve c\longa } diff --git a/input/test/gmsusd.ly b/input/test/gmsusd.ly index 6217946830..9ba7522e20 100644 --- a/input/test/gmsusd.ly +++ b/input/test/gmsusd.ly @@ -8,20 +8,19 @@ gmsus=\notes\relative c \chords{ g1 % Gm7sus4: the hard way - g1-3-.4.7 + g1:3-.4.7 % another hard way: \notes< g'1 bes c d f > % bit easier: - g1-m.4.7 + g1:m.4.7 - g1-m7.sus - g1-m7.sus4 + g1:m7.sus + g1:m7.sus4 % and finally: - \property Score.chordInversion = 1 - g1-m7.sus/d + g1:m7.sus/d } \score{ diff --git a/input/test/notemode-chords.ly b/input/test/notemode-chords.ly index ed0c154902..5652aa1f0d 100644 --- a/input/test/notemode-chords.ly +++ b/input/test/notemode-chords.ly @@ -5,7 +5,7 @@ % 1.1.53: @x@ syntax dropped % if you want fingering, write chord explicitily; eg < c1-1 e-2 g-3 > % @c1@ @c-7@ @c-7^5@-1-3 - \chords { c1 c-7 c-7^5 } + \chords { c1 c:7 c:7^5 } } } diff --git a/input/tutorial/flowing.ly b/input/tutorial/flowing.ly index 74339f3ceb..597dd2bed8 100644 --- a/input/tutorial/flowing.ly +++ b/input/tutorial/flowing.ly @@ -18,8 +18,8 @@ text = \lyrics { accompaniment =\chords { r8 - c2-3- f-3-.7 d-min es4 c8-min r8 - c2-min f-min7 g-7^3.5 c-min } + c2:3- f:3-.7 d:min es4 c8:min r8 + c2:min f:min7 g:7^3.5 c:min } \score { \simultaneous { diff --git a/input/twinkle-pop.ly b/input/twinkle-pop.ly index eb4cc83b2f..9df29ef6de 100644 --- a/input/twinkle-pop.ly +++ b/input/twinkle-pop.ly @@ -25,12 +25,12 @@ melodie = \notes\relative c'' { acc = \chords { % why don't \skip, s4 work? c2 c f c - f c g-7 c - g f c g-7 % urg, bug! - g f c g-7 + f c g:7 c + g f c g:7 % urg, bug! + g f c g:7 % copy 1-8 c2 c f c - f c g-7 c + f c g:7 c } text = \lyrics{ diff --git a/lily/bar-script-engraver.cc b/lily/bar-script-engraver.cc index 412f0390bb..21de711e9a 100644 --- a/lily/bar-script-engraver.cc +++ b/lily/bar-script-engraver.cc @@ -144,11 +144,11 @@ Bar_script_engraver::create_items (Request *rq) SCM prop = get_property (type_ + "Direction", 0); if (isdir_b (prop)) { - staff_side_p_->dir_ = to_dir (prop); + staff_side_p_->set_direction ( to_dir (prop)); } else { - staff_side_p_->dir_ = UP; + staff_side_p_->set_direction ( UP); } staff_side_p_->set_victim(text_p_); diff --git a/lily/beam.cc b/lily/beam.cc index d75f7906f2..0d7b93157f 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -158,7 +158,7 @@ Beam::auto_knee (SCM gap, bool interstaff_b) { int y = (int)(stems_[i]->chord_start_f () / internote_f) + (int)sinfo_[i].interstaff_f_; - stems_[i]->dir_ = y < knee_y ? UP : DOWN; + stems_[i]->set_direction ( y < knee_y ? UP : DOWN); stems_[i]->set_elt_property ("dir-forced", SCM_BOOL_T); } } @@ -182,10 +182,10 @@ Beam::do_pre_processing () urg: it seems that info on whether beam (voice) dir was forced is being junked here? */ - if (!dir_) - dir_ = get_default_dir (); + if (!get_direction ()) + set_direction ( get_default_dir ()); - set_direction (dir_); + set_direction (get_direction ()); } void @@ -213,8 +213,8 @@ Beam::do_post_processing () if auto-knee did its work, most probably stem directions have changed, so we must recalculate all. */ - dir_ = get_default_dir (); - set_direction (dir_); + set_direction ( get_default_dir ()); + set_direction (get_direction ()); /* auto-knees used to only work for slope = 0 anyway, should be able to set slope per beam @@ -255,8 +255,8 @@ Beam::get_default_dir () const for (int i=0; i dir_ - ? (1 + d * s->dir_)/2 + int current = s->get_direction () + ? (1 + d * s->get_direction ())/2 : s->get_center_distance ((Direction)-d); if (current) @@ -312,7 +312,7 @@ Beam::get_default_dir () const void Beam::set_direction (Direction d) { - dir_ = d; + set_direction ( d); for (int i=0; i remove_elt_property ("dir-forced"); if (force == SCM_UNDEFINED) - s->dir_ = d; + s->set_direction ( d); } } @@ -359,21 +359,21 @@ Beam::check_stemlengths_f (bool set_b) Real y = sinfo_[i].x_ * slope_f_ + left_y_; // correct for knee - if (dir_ != sinfo_[i].dir_) + if (get_direction () != sinfo_[i].get_direction ()) { Real internote_f = sinfo_[i].stem_l_->staff_line_leading_f ()/2; - y -= dir_ * (beam_f / 2 + y -= get_direction () * (beam_f / 2 + (sinfo_[i].mult_i_ - 1) * interbeam_f) / internote_f; if (!i && sinfo_[i].stem_l_->staff_symbol_l () != sinfo_.top ().stem_l_->staff_symbol_l ()) - y += dir_ * (multiple_i_ - (sinfo_[i].stem_l_->flag_i_ - 2) >? 0) + y += get_direction () * (multiple_i_ - (sinfo_[i].stem_l_->flag_i_ - 2) >? 0) * interbeam_f / internote_f; } if (set_b) sinfo_[i].stem_l_->set_stemend (y - sinfo_[i].interstaff_f_); - y *= dir_; + y *= get_direction (); if (y > sinfo_[i].maxy_f_) dy_f = dy_f set_default_extents (); if (s->invisible_b ()) continue; - if (((int)s->chord_start_f ()) && (s->dir_ != s->get_default_dir ())) + if (((int)s->chord_start_f ()) && (s->get_direction () != s->get_default_dir ())) forced_count_i++; total_count_i++; } @@ -433,7 +433,7 @@ Beam::set_steminfo () if (leftx == 0) leftx = info.x_; info.x_ -= leftx; - if (info.dir_ == dir_) + if (info.get_direction () == get_direction ()) { if (forced_count_i == total_count_i) info.idealy_f_ -= shorten_f; @@ -453,7 +453,7 @@ Beam::calculate_slope () { slope_f_ = 0; left_y_ = sinfo_[0].idealy_f_; - left_y_ *= dir_; + left_y_ *= get_direction (); } else { @@ -496,8 +496,8 @@ Beam::calculate_slope () Real damped_slope_dy_f = (solved_slope_f - slope_f_) * dx_f / 2; left_y_ += damped_slope_dy_f; - left_y_ *= dir_; - slope_f_ *= dir_; + left_y_ *= get_direction (); + slope_f_ *= get_direction (); } } @@ -597,7 +597,7 @@ Beam::quantise_left_y (bool extend_b) // isn't this asymmetric ? --hwn // dim(left_y_) = internote - Real dy_f = dir_ * left_y_ * internote_f; + Real dy_f = get_direction () * left_y_ * internote_f; Real beamdx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); Real beamdy_f = beamdx_f * slope_f_ * internote_f; @@ -630,7 +630,7 @@ Beam::quantise_left_y (bool extend_b) quanty_f = iv[BIGGER]; // dim(left_y_) = internote - left_y_ = dir_ * quanty_f / internote_f; + left_y_ = get_direction () * quanty_f / internote_f; } void @@ -645,7 +645,7 @@ Beam::set_stemlens () Real dy_f = check_stemlengths_f (false); for (int i = 0; i < 2; i++) // 2 ? { - left_y_ += dy_f * dir_; + left_y_ += dy_f * get_direction (); quantise_left_y (dy_f); dy_f = check_stemlengths_f (true); if (abs (dy_f) <= epsilon_f) @@ -745,7 +745,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (int j = 0; j < lhalfs; j++) { Molecule b (a); - b.translate_axis (-dir_ * dy * (lwholebeams+j), Y_AXIS); + b.translate_axis (-get_direction () * dy * (lwholebeams+j), Y_AXIS); leftbeams.add_molecule (b); } } @@ -770,7 +770,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (; j < nogap; j++) { Molecule b (a); - b.translate_axis (-dir_ * dy * j, Y_AXIS); + b.translate_axis (-get_direction () * dy * j, Y_AXIS); rightbeams.add_molecule (b); } // TODO: notehead widths differ for different types @@ -783,9 +783,9 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const { Molecule b (a); if (!here->invisible_b ()) - b.translate (Offset (gap_f, -dir_ * dy * j)); + b.translate (Offset (gap_f, -get_direction () * dy * j)); else - b.translate (Offset (0, -dir_ * dy * j)); + b.translate (Offset (0, -get_direction () * dy * j)); rightbeams.add_molecule (b); } @@ -796,7 +796,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (; j < rwholebeams + rhalfs; j++) { Molecule b (a); - b.translate_axis (-dir_ * dy * j, Y_AXIS); + b.translate_axis (-get_direction () * dy * j, Y_AXIS); rightbeams.add_molecule (b); } diff --git a/lily/bezier.cc b/lily/bezier.cc index 3bc35d2da4..024db5f7b8 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -338,8 +338,8 @@ Bezier_bow::calc_clipping () Real end_dy = 0 >? end_h - clip_h; Real pi = M_PI; - Real begin_alpha = (control_[1] - control_[0]).arg () + dir_ * alpha_; - Real end_alpha = pi - (control_[2] - control_[3]).arg () - dir_ * alpha_; + Real begin_alpha = (control_[1] - control_[0]).arg () + get_direction () * alpha_; + Real end_alpha = pi - (control_[2] - control_[3]).arg () - get_direction () * alpha_; Real max_alpha = clip_angle / 90 * pi / 2; if ((begin_dy < 0) && (end_dy < 0) @@ -354,8 +354,8 @@ Bezier_bow::calc_clipping () { Real dy = (begin_dy + end_dy) / 4; dy *= cos (alpha_); - encompass_[0][Y_AXIS] += dir_ * dy; - encompass_[encompass_.size () - 1][Y_AXIS] += dir_ * dy; + encompass_[0][Y_AXIS] += get_direction () * dy; + encompass_[encompass_.size () - 1][Y_AXIS] += get_direction () * dy; } else { @@ -366,8 +366,8 @@ Bezier_bow::calc_clipping () if (end_alpha >= max_alpha) end_dy = 0 >? c * end_alpha / max_alpha * end_h; - encompass_[0][Y_AXIS] += dir_ * begin_dy; - encompass_[encompass_.size () - 1][Y_AXIS] += dir_ * end_dy; + encompass_[0][Y_AXIS] += get_direction () * begin_dy; + encompass_[encompass_.size () - 1][Y_AXIS] += get_direction () * end_dy; Offset delta = encompass_[encompass_.size () - 1] - encompass_[0]; alpha_ = delta.arg (); @@ -466,8 +466,6 @@ Bezier_bow::calc_tangent_controls () end_p = ijk_p; end_rc = default_rc; } - BEZIER_BOW_DEBUG_OUT << "begin " << begin_p[X_AXIS] << ", " << begin_p[Y_AXIS] << endl; - BEZIER_BOW_DEBUG_OUT << "end " << end_p[X_AXIS] << ", " << end_p[Y_AXIS] << endl; Real height =control_[1][Y_AXIS]; for (int i = 0; i < encompass_.size (); i++ ) @@ -507,17 +505,10 @@ Bezier_bow::calc_tangent_controls () Real c3 = begin_p[Y_AXIS] > end_p[Y_AXIS] ? begin_p[Y_AXIS] - rc3 * begin_p[X_AXIS] : end_p[Y_AXIS] - rc3 * end_p[X_AXIS]; - BEZIER_BOW_DEBUG_OUT << "y1 = " << rc1 << " x + 0" << endl; - BEZIER_BOW_DEBUG_OUT << "y2 = " << rc2 << " x + " << c2 << endl; - BEZIER_BOW_DEBUG_OUT << "y3 = " << rc3 << " x + " << c3 << endl; control_[1][X_AXIS] = c3 / (rc1 - rc3); control_[1][Y_AXIS] = rc1 * control_[1][X_AXIS]; control_[2][X_AXIS] = (c3 - c2) / (rc2 - rc3); - BEZIER_BOW_DEBUG_OUT << "c2[X_AXIS] = " << control_[2][X_AXIS] << endl; - BEZIER_BOW_DEBUG_OUT << "(c3 - c2) = " << (c3 - c2) << endl; - BEZIER_BOW_DEBUG_OUT << "(rc2 - rc3) = " << (rc2 - rc3) << endl; control_[2][Y_AXIS] = rc2 * control_[2][X_AXIS] + c2; - BEZIER_BOW_DEBUG_OUT << "c2[Y_AXIS]" << control_[2][Y_AXIS] << endl; calc_return (begin_alpha, end_alpha); } @@ -561,9 +552,9 @@ Bezier_bow::print () const } void -Bezier_bow::set (Array points, int dir) +Bezier_bow::set (Array points, Direction dir) { - dir_ = dir; + set_direction (dir); encompass_ = points; } @@ -578,14 +569,14 @@ Bezier_bow::transform () encompass_.rotate (-alpha_); - if (dir_ == DOWN) + if (get_direction () == DOWN) encompass_.flipy (); } void Bezier_bow::transform_back () { - if (dir_ == DOWN) + if (get_direction () == DOWN) { control_.flipy (); return_.flipy (); diff --git a/lily/bow.cc b/lily/bow.cc index a3214f281e..6033cfe926 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -67,7 +67,7 @@ Drul_array Bow::curve_extent_drul () const { Bezier_bow b (paper_l ()); - b.set (get_encompass_offset_arr (), dir_); + b.set (get_encompass_offset_arr (), get_direction ()); b.calc (); return b.curve_extent_drul_; } @@ -76,7 +76,7 @@ Array Bow::get_controls () const { Bezier_bow b (paper_l ()); - b.set (get_encompass_offset_arr (), dir_); + b.set (get_encompass_offset_arr (), get_direction ()); b.calc (); Array controls; controls.set_size (8); diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index 7c8e44b4e5..2e6ebde757 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -21,7 +21,7 @@ TODO: --> see breathing-sign-engraver.cc Breathing_sign::Breathing_sign () { - dir_ = UP; + set_direction (UP); set_elt_property ("breakable", SCM_BOOL_T); set_elt_property ("visibility-lambda", ly_ch_C_eval_scm ("non_postbreak_visibility")); @@ -33,7 +33,7 @@ Breathing_sign::set_vertical_position (Direction updown) assert(updown >= -1 && updown <= +1); if(updown != 0) - dir_ = updown; + set_direction (updown); } Molecule* @@ -53,6 +53,6 @@ Breathing_sign::do_post_processing() { Real dl = staff_line_leading_f(); - translate_axis(2.0 * dl * dir_, Y_AXIS); + translate_axis(2.0 * dl * get_direction (), Y_AXIS); } diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 4c57efac7e..ef0744d627 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -21,7 +21,8 @@ ADD_THIS_TRANSLATOR (Chord_name_engraver); Chord_name_engraver::Chord_name_engraver () { tonic_req_ = 0; - // bass_req_ = 0; + inversion_req_ = 0; + bass_req_ = 0; } void @@ -44,14 +45,16 @@ Chord_name_engraver::do_try_music (Music* m) tonic_req_ = t; return true; } -#if 0 + if (Inversion_req* i = dynamic_cast (m)) + { + inversion_req_ = i; + return true; + } if (Bass_req* b = dynamic_cast (m)) { bass_req_ = b; return true; } -#endif - return false; } @@ -63,20 +66,13 @@ Chord_name_engraver::do_process_requests () if (!pitch_arr_.size ()) return; - Chord chord (pitch_arr_); - Musical_pitch* inversion = 0; + bool find_inversion_b = false; SCM chord_inversion = get_property ("chordInversion", 0); - if (gh_boolean_p (chord_inversion) && gh_scm2bool (chord_inversion)) - { - int tonic_i = tonic_req_ - ? chord.find_notename_i (tonic_req_->pitch_) : chord.find_tonic_i (); - - if (tonic_i) - { - inversion = &pitch_arr_[0]; - chord.rebuild_insert_inversion (tonic_i); - } - } + if (gh_boolean_p (chord_inversion)) + find_inversion_b = gh_scm2bool (chord_inversion); + + Chord chord = to_chord (pitch_arr_, tonic_req_, inversion_req_, bass_req_, + find_inversion_b); Text_item* item_p = new Text_item; @@ -90,7 +86,7 @@ Chord_name_engraver::do_process_requests () item_p->text_str_ = chord.banter_str (inversion); */ - item_p->text_str_ = chord.banter_str (inversion); + item_p->text_str_ = chord.banter_str (); text_p_arr_.push (item_p); announce_element (Score_element_info (item_p, 0)); @@ -106,4 +102,7 @@ Chord_name_engraver::do_pre_move_processing () text_p_arr_.clear (); pitch_arr_.clear (); tonic_req_ = 0; + inversion_req_ = 0; + bass_req_ = 0; } + diff --git a/lily/chord.cc b/lily/chord.cc index b0b081e217..adef8d4991 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -6,25 +6,214 @@ (c) 1999 Jan Nieuwenhuizen */ +#include "chord.hh" +#include "musical-request.hh" +#include "warn.hh" + + /* - FIXME: + construct from parser output +*/ +Chord +to_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Musical_pitch* bass_p) +{ + // urg: catch dim modifier: 5th and 7th should be lowered + bool dim_b = false; + for (int i=0; i < add_arr_p->size (); i++) + { + Musical_pitch* p = &(*add_arr_p)[i]; + if (p->octave_i_ == -100) + { + p->octave_i_ = 0; + dim_b = true; + } + } + Chord::rebuild_transpose (add_arr_p, tonic); + Chord::rebuild_transpose (sub_arr_p, tonic); + + Musical_pitch fifth = tonic; + fifth.transpose (Musical_pitch (2)); + fifth.transpose (Musical_pitch (2, -1)); + + /* + remove double adds (urg: sus4) + */ + for (int i = add_arr_p->size () - 1; i >= 0 ; i--) + { + int j = Chord::find_pitch_i (add_arr_p, (*add_arr_p)[i]); + if ((j != -1) && (i != j)) + { + add_arr_p->get (i); + } + } + + /* + default chord includes upto 5: <1, 3, 5> + */ + add_arr_p->insert (tonic, 0); + Array tmp = *add_arr_p; + int highest_step = Chord::step_i (tonic, tmp.top ()); + if (highest_step < 5) + tmp.push (fifth); + else if (dim_b) + { + Musical_pitch* p = &add_arr_p->top (); + p->accidental_i_--; + } + + /* + find missing thirds + */ + Array missing_arr = Chord::missing_thirds_pitch_arr (&tmp); + if (highest_step < 5) + missing_arr.push (fifth); + + if (dim_b) + { + for (int i=0; i < missing_arr.size (); i++) + { + missing_arr[i].accidental_i_--; + } + } + + /* + if additions include some 3, don't add third + */ + Musical_pitch third = tonic; + third.transpose (Musical_pitch (2)); + if (Chord::find_notename_i (add_arr_p, third) != -1) + { + int i = Chord::find_pitch_i (&missing_arr, third); + if (i != -1) + missing_arr.get (i); + } + + /* + if additions include 4, assume sus4 and don't add third implicitely + C-sus (4) = c f g (1 4 5) + */ + Musical_pitch sus = tonic; + sus.transpose (Musical_pitch (3)); + if (Chord::find_pitch_i (add_arr_p, sus) != -1) + { + int i = Chord::find_pitch_i (&missing_arr, third); + if (i != -1) + missing_arr.get (i); + } - A triad is a chord of three tones, and not an interval of a third. + /* + if additions include some 5, don't add fifth + */ + if (Chord::find_notename_i (add_arr_p, fifth) != -1) + { + int i = Chord::find_pitch_i (&missing_arr, fifth); + if (i != -1) + missing_arr.get (i); + } + + + /* + complete the list of thirds to be added + */ + add_arr_p->concat (missing_arr); + add_arr_p->sort (Musical_pitch::compare); + + Array pitch_arr; + /* + add all that aren't subtracted + */ + for (int i = 0; i < add_arr_p->size (); i++) + { + Musical_pitch p = (*add_arr_p)[i]; + int j = 0; + for (; j < sub_arr_p->size (); j++) + if (p == (*sub_arr_p)[j]) + { + sub_arr_p->del (j); + j = -1; + break; + } + if (j == sub_arr_p->size ()) + pitch_arr.push (p); + } + + pitch_arr.sort (Musical_pitch::compare); + + for (int i = 0; i < sub_arr_p->size (); i++) + warning (_f ("invalid subtraction: not part of chord: %s", + (*sub_arr_p)[i].str ())); + + return Chord (pitch_arr, inversion_p, bass_p); +} + +/* + Construct from list of pitches and requests */ +Chord +to_chord (Array pitch_arr, Tonic_req* tonic_req, Inversion_req* inversion_req, Bass_req* bass_req, bool find_inversion_b) +{ + Musical_pitch* inversion_p = 0; + Musical_pitch* bass_p = 0; -#include "chord.hh" -#include "warn.hh" + if (bass_req) + { + assert (pitch_arr[0].notename_i_ == bass_req->pitch_.notename_i_); + bass_p = new Musical_pitch (pitch_arr.get (0)); + } + + if (inversion_req) + { + assert (pitch_arr[0].notename_i_ == inversion_req->pitch_.notename_i_); + inversion_p = new Musical_pitch (inversion_req->pitch_); + assert (tonic_req); + int tonic_i = Chord::find_notename_i (&pitch_arr, tonic_req->pitch_); + if (tonic_i) + Chord::rebuild_insert_inversion (&pitch_arr, tonic_i); + } + + if (find_inversion_b && !inversion_p) + { + int tonic_i = tonic_req + ? Chord::find_notename_i (&pitch_arr, tonic_req->pitch_) + : Chord::find_tonic_i (&pitch_arr); + + if (tonic_i) + { + inversion_p = &pitch_arr[0]; + Chord::rebuild_insert_inversion (&pitch_arr, tonic_i); + } + } + + if (tonic_req) + { + assert (pitch_arr[0].notename_i_ == tonic_req->pitch_.notename_i_); + } -// doesn't seem common, and we should know about this during parsing -// #define INVERSION_ADDED_AS_BASE 1 + return Chord (pitch_arr, inversion_p, bass_p); +} -Chord::Chord (Array pitch_arr) +Chord::Chord (Array pitch_arr, Musical_pitch* inversion_p, Musical_pitch* bass_p) { pitch_arr_ = pitch_arr; + inversion_p_ = inversion_p; + bass_p_ = bass_p; +} + +Chord::Chord (Chord const& chord) +{ + pitch_arr_ = chord.pitch_arr_; + inversion_p_ = chord.inversion_p_ ? new Musical_pitch (*chord.inversion_p_) : 0; + bass_p_ = chord.bass_p_ ? new Musical_pitch (*chord.bass_p_) : 0; +} + +Chord::~Chord () +{ + delete inversion_p_; + delete bass_p_; } -static void -rebuild_transpose (Musical_pitch tonic, Array* pitch_arr_p) +void +Chord::rebuild_transpose (Array* pitch_arr_p, Musical_pitch tonic) { for (int i = 0; i < pitch_arr_p->size (); i++) { @@ -39,8 +228,8 @@ rebuild_transpose (Musical_pitch tonic, Array* pitch_arr_p) pitch_arr_p->sort (Musical_pitch::compare); } -static int -find_pitch_i (Array const* pitch_arr_p, Musical_pitch p) +int +Chord::find_pitch_i (Array const* pitch_arr_p, Musical_pitch p) { for (int i = 0; i < pitch_arr_p->size (); i++) if (p == (*pitch_arr_p)[i]) @@ -48,8 +237,8 @@ find_pitch_i (Array const* pitch_arr_p, Musical_pitch p) return -1; } -static int -find_notename_i (Array const* pitch_arr_p, Musical_pitch p) +int +Chord::find_notename_i (Array const* pitch_arr_p, Musical_pitch p) { int i = find_pitch_i (pitch_arr_p, p); if (i == -1) @@ -64,11 +253,8 @@ find_notename_i (Array const* pitch_arr_p, Musical_pitch p) return i; } -/* - trap (NL) != trap(english) - */ -static int -trap_i (Musical_pitch tonic, Musical_pitch p) +int +Chord::step_i (Musical_pitch tonic, Musical_pitch p) { int i = p.notename_i_ - tonic.notename_i_ + (p.octave_i_ - tonic.octave_i_) * 7; @@ -78,15 +264,15 @@ trap_i (Musical_pitch tonic, Musical_pitch p) return i; } -static Array -missing_triads_pitch_arr (Arrayconst* pitch_arr_p) +Array +Chord::missing_thirds_pitch_arr (Array const* pitch_arr_p) { - Array triads; + Array thirds; /* is the third c-e, d-f, etc. small or large? */ int minormajor_a[] = {0, -1, -1, 0,0,-1,-1}; for (int i=0; i < 7; i++) - triads.push (Musical_pitch( 2, minormajor_a[i])); + thirds.push (Musical_pitch( 2, minormajor_a[i])); Musical_pitch tonic = (*pitch_arr_p)[0]; Musical_pitch last = tonic; @@ -95,12 +281,12 @@ missing_triads_pitch_arr (Arrayconst* pitch_arr_p) for (int i = 0; i < pitch_arr_p->size ();) { Musical_pitch p = (*pitch_arr_p)[i]; - int trap = trap_i (tonic, p); + int step = step_i (tonic, p); if (last.notename_i_ == p.notename_i_) - last.transpose (triads[(last.notename_i_ - tonic.notename_i_ + 7) % 7]); - if (trap > trap_i (tonic, last)) + last.transpose (thirds[(last.notename_i_ - tonic.notename_i_ + 7) % 7]); + if (step > step_i (tonic, last)) { - while (trap > trap_i (tonic, last)) + while (step > step_i (tonic, last)) { if ((last.notename_i_ - tonic.notename_i_ + 7) % 7 == 6) { @@ -113,7 +299,7 @@ missing_triads_pitch_arr (Arrayconst* pitch_arr_p) { missing_arr.push (last); } - last.transpose (triads[(last.notename_i_ - tonic.notename_i_ + 7) % 7]); + last.transpose (thirds[(last.notename_i_ - tonic.notename_i_ + 7) % 7]); } } else @@ -126,150 +312,51 @@ missing_triads_pitch_arr (Arrayconst* pitch_arr_p) /* - construct from parser output -*/ -Chord::Chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p) + Mangle into list of pitches. + For normal chord entry, inversion and bass pitches are retained in + specific *_requests + */ +Array +Chord::to_pitch_arr () const { - rebuild_transpose (tonic, add_arr_p); - rebuild_transpose (tonic, sub_arr_p); - - Musical_pitch fifth = tonic; - fifth.transpose (Musical_pitch (2)); - fifth.transpose (Musical_pitch (2, -1)); - - /* - remove double adds (urg: sus4) - */ - for (int i = add_arr_p->size () - 1; i >= 0 ; i--) - { - int j = ::find_pitch_i (add_arr_p, (*add_arr_p)[i]); - if ((j != -1) && (i != j)) - { - add_arr_p->get (i); - } - } - - /* - default chord includes upto 5: <1, 3, 5> - */ - add_arr_p->insert (tonic, 0); - Array tmp = *add_arr_p; - int highest_trap = trap_i (tonic, tmp.top ()); - if (highest_trap < 5) - tmp.push (fifth); - - /* - find missing triads - */ - Array missing_arr = missing_triads_pitch_arr (&tmp); - if (highest_trap < 5) - missing_arr.push (fifth); - - /* - if additions include some 3, don't add third - */ - Musical_pitch third = tonic; - third.transpose (Musical_pitch (2)); - if (::find_notename_i (add_arr_p, third) != -1) - { - int i = ::find_pitch_i (&missing_arr, third); - if (i != -1) - missing_arr.get (i); - } - - /* - if additions include 4, assume sus4 and don't add third implicitely - C-sus (4) = c f g (1 4 5) - */ - Musical_pitch sus = tonic; - sus.transpose (Musical_pitch (3)); - if (::find_pitch_i (add_arr_p, sus) != -1) - { - int i = ::find_pitch_i (&missing_arr, third); - if (i != -1) - missing_arr.get (i); - } - - /* - if additions include some 5, don't add fifth - */ - if (::find_notename_i (add_arr_p, fifth) != -1) - { - int i = ::find_pitch_i (&missing_arr, fifth); - if (i != -1) - missing_arr.get (i); - } - - - /* - complete the list of triads to be added - */ - add_arr_p->concat (missing_arr); - add_arr_p->sort (Musical_pitch::compare); - - /* - add all that aren't subtracted - */ - for (int i = 0; i < add_arr_p->size (); i++) - { - Musical_pitch p = (*add_arr_p)[i]; - int j = 0; - for (; j < sub_arr_p->size (); j++) - if (p == (*sub_arr_p)[j]) - { - sub_arr_p->del (j); - j = -1; - break; - } - if (j == sub_arr_p->size ()) - pitch_arr_.push (p); - } - - pitch_arr_.sort (Musical_pitch::compare); - - for (int i = 0; i < sub_arr_p->size (); i++) - warning (_f ("invalid subtraction: not part of chord: %s", - (*sub_arr_p)[i].str ())); - - if (inversion_p) + Array pitch_arr = pitch_arr_; + if (inversion_p_) { int i = 0; - for (; i < pitch_arr_.size (); i++) + for (; i < pitch_arr.size (); i++) { - if ((pitch_arr_[i].notename_i_ == inversion_p->notename_i_) - && (pitch_arr_[i].accidental_i_ == inversion_p->accidental_i_)) + if ((pitch_arr[i].notename_i_ == inversion_p_->notename_i_) + && (pitch_arr[i].accidental_i_ == inversion_p_->accidental_i_)) break; } - if (i == pitch_arr_.size ()) + if (i == pitch_arr.size ()) { warning (_f ("invalid inversion pitch: not part of chord: %s", - inversion_p->str ())); + inversion_p_->str ())); } else - { -#if INVERSION_ADDED_AS_BASE - pitch_arr_.insert (pitch_arr_[i], 0); - rebuild_with_bass (0); -#else - rebuild_with_bass (i); -#endif - - } - delete inversion_p; + rebuild_with_bass (&pitch_arr, i); } + + if (bass_p_) + { + pitch_arr.insert (*bass_p_, 0); + rebuild_with_bass (&pitch_arr, 0); + } + return pitch_arr; } void -Chord::find_additions_and_subtractions(Array* add_arr_p, Array* sub_arr_p) const +Chord::find_additions_and_subtractions (Array* add_arr_p, Array* sub_arr_p) const { Musical_pitch tonic = pitch_arr_[0]; /* - construct an array of triads for a normal chord + construct an array of thirds for a normal chord */ Array all_arr; all_arr.push (tonic); all_arr.push (pitch_arr_.top ()); - all_arr.concat (missing_triads_pitch_arr (&all_arr)); + all_arr.concat (missing_thirds_pitch_arr (&all_arr)); all_arr.sort (Musical_pitch::compare); int i = 0; @@ -295,7 +382,7 @@ Chord::find_additions_and_subtractions(Array* add_arr_p, Array* add_arr_p, Array 5)) + if (step_i (tonic, pitch_arr_.top () > 5)) add_arr_p->push (pitch_arr_.top ()); } +/* + TODO: + reduce guess work: dim chord + other naming conventions `American'? + don't use TeX constructs + user defined chords-names for specific chords: + tonic, additions, subtractions, inversion, bass -> "my-chord-name" + */ String -Chord::banter_str (Musical_pitch* inversion) const +Chord::banter_str () const { Musical_pitch tonic = pitch_arr_[0]; @@ -335,97 +430,133 @@ Chord::banter_str (Musical_pitch* inversion) const // 7 always means 7-... // scale.push (Musical_pitch (6, -1)); // b - rebuild_transpose (tonic, &scale); + rebuild_transpose (&scale, tonic); bool has3m_b = false; bool has4_b = false; + bool has5m_b = false; String str; + String minor_str; String sep_str; for (int i = 0; i < add_arr.size (); i++) { Musical_pitch p = add_arr[i]; - int trap = trap_i (tonic, p); - if (trap == 4) + int step = step_i (tonic, p); + if (step == 4) has4_b = true; - int accidental = p.accidental_i_ - scale[(trap - 1) % 7].accidental_i_; - if ((trap == 3) && (accidental == -1)) + int accidental = p.accidental_i_ - scale[(step - 1) % 7].accidental_i_; + if ((step == 3) && (accidental == -1)) { - tonic_str += "m"; + minor_str = "m"; has3m_b = true; } + /* + have Cdim rather than Cm5-, even if it's a prefix + */ + else if ((step == 5) && (accidental == -1) && has3m_b) + { + minor_str = "dim"; + has5m_b = true; + } else if (accidental - || (!(trap % 2) || ((i + 1 == add_arr.size ()) && (trap > 5)))) + || (!(step % 2) || ((i + 1 == add_arr.size ()) && (step > 5)))) { str += sep_str; - if ((trap == 7) && (accidental == 1)) - str += "maj7"; - else + sep_str = "/"; + if ((step == 7) && (accidental == 1)) + { + str += "maj7"; + } + else { - str += to_str (trap); - if (accidental) - str += accidental < 0 ? "-" : "+"; + /* + if has3m_b and has5m_b, assume dim + don't mention dim-addition, except for chord-namer + */ + if (((step/2) && (accidental == -1)) + && has3m_b && has5m_b) + { + if (i == add_arr.size () - 1) + str += to_str (step); + else + sep_str = ""; + } + else + { + str += to_str (step); + if (accidental) + str += accidental < 0 ? "-" : "+"; + } } - sep_str = "/"; } } for (int i = 0; i < sub_arr.size (); i++) { Musical_pitch p = sub_arr[i]; - int trap = trap_i (tonic, p); + int step = step_i (tonic, p); /* if chord has 3-, assume minor and don't display 'no3' if additions include 4, assume sus4 and don't display 'no3' + if has3m_b and has5m_b, assume 'dim' chord */ - if (!((trap == 3) && (has3m_b || has4_b))) + if (!((step == 3) && (has3m_b || has4_b)) + && !((step/2) && (step !=3) && (step !=7 ) && (p.accidental_i_ == 0) && has3m_b && has5m_b) + && !((step == 7) && (p.accidental_i_ == -1) && has3m_b && has5m_b)) { - str += sep_str + "no" + to_str (trap); + str += sep_str + "no" + to_str (step); sep_str = "/"; } } + /* + have Co rather than Cdim7 + */ + if (minor_str + str == "dim7") + { + minor_str = ""; + str = "o"; + } + + String inversion_str; - if (inversion) + if (inversion_p_) { - inversion_str = inversion->str (); + inversion_str = inversion_p_->str (); inversion_str = "/" + inversion_str.left_str (1).upper_str () - + acc[inversion->accidental_i_ + 2]; - + + acc[inversion_p_->accidental_i_ + 2]; } - return tonic_str + "$^{" + str + "}$" + inversion_str; -} + String bass_str; + if (bass_p_) + { + bass_str = bass_p_->str (); + bass_str = "/" + bass_str.left_str (1).upper_str () + + acc[bass_p_->accidental_i_ + 2]; -int -Chord::find_notename_i (Musical_pitch p) const -{ - return ::find_notename_i (&pitch_arr_, p); -} + } -int -Chord::find_pitch_i (Musical_pitch p) const -{ - return ::find_pitch_i (&pitch_arr_, p); + return tonic_str + minor_str + "$^{" + str + "}$" + inversion_str + bass_str; } int -Chord::find_tonic_i () const +Chord::find_tonic_i (Array const* pitch_arr_p) { /* find tonic - first try: base of longest line of triads + first try: base of longest line of thirds */ int tonic_i = 0; int longest_i = 0; - for (int i = 0; i < pitch_arr_.size (); i++) + for (int i = 0; i < pitch_arr_p->size (); i++) { - int no_triad_i = 0; - int last_i = pitch_arr_[i % pitch_arr_.size ()].notename_i_; + int no_third_i = 0; + int last_i = (*pitch_arr_p)[i % pitch_arr_p->size ()].notename_i_; int j = 0; - for (; j < pitch_arr_.size (); j++) + for (; j < pitch_arr_p->size (); j++) { - int cur_i = pitch_arr_[(i + j + 1) % pitch_arr_.size ()].notename_i_; + int cur_i = (*pitch_arr_p)[(i + j + 1) % pitch_arr_p->size ()].notename_i_; int gap = cur_i - last_i; while (gap < 0) gap += 7; @@ -433,11 +564,11 @@ Chord::find_tonic_i () const if (gap == 2) last_i = cur_i; else - no_triad_i++; + no_third_i++; } - if (j - no_triad_i > longest_i) + if (j - no_third_i > longest_i) { - longest_i = j - no_triad_i; + longest_i = j - no_third_i; tonic_i = i; } } @@ -448,11 +579,11 @@ Chord::find_tonic_i () const int biggest_i = 0; // if (longest_i) if (longest_i <= 1) - for (int i = 0; i < pitch_arr_.size (); i++) + for (int i = 0; i < pitch_arr_p->size (); i++) { - int gap = pitch_arr_[i].notename_i_ - - pitch_arr_[(i - 1 + pitch_arr_.size ()) - % pitch_arr_.size ()].notename_i_; + int gap = (*pitch_arr_p)[i].notename_i_ + - (*pitch_arr_p)[(i - 1 + pitch_arr_p->size ()) + % pitch_arr_p->size ()].notename_i_; while (gap < 0) gap += 7; gap %= 7; @@ -466,14 +597,14 @@ Chord::find_tonic_i () const } void -Chord::rebuild_from_base (int base_i) +Chord::rebuild_from_base (Array* pitch_arr_p, int base_i) { assert (base_i >= 0); Musical_pitch last (0, 0, -5); Array new_arr; - for (int i = 0; i < pitch_arr_.size (); i++) + for (int i = 0; i < pitch_arr_p->size (); i++) { - Musical_pitch p = pitch_arr_[(base_i + i) % pitch_arr_.size ()]; + Musical_pitch p = (*pitch_arr_p)[(base_i + i) % pitch_arr_p->size ()]; if (p < last) { p.octave_i_ = last.octave_i_; @@ -483,43 +614,37 @@ Chord::rebuild_from_base (int base_i) new_arr.push (p); last = p; } - pitch_arr_ = new_arr; + *pitch_arr_p = new_arr; } void -Chord::rebuild_insert_inversion (int tonic_i) +Chord::rebuild_insert_inversion (Array* pitch_arr_p, int tonic_i) { assert (tonic_i > 0); -#if INVERSION_ADDED_AS_BASE - // inversion was added; don't insert - Musical_pitch inversion = pitch_arr_.get (0); - (void)inversion; -#else - Musical_pitch inversion = pitch_arr_.get (0); - rebuild_from_base (tonic_i - 1); - if (pitch_arr_.size ()) + Musical_pitch inversion = pitch_arr_p->get (0); + rebuild_from_base (pitch_arr_p, tonic_i - 1); + if (pitch_arr_p->size ()) { - inversion.octave_i_ = pitch_arr_[0].octave_i_ - 1; - while (inversion < pitch_arr_[0]) + inversion.octave_i_ = (*pitch_arr_p)[0].octave_i_ - 1; + while (inversion < (*pitch_arr_p)[0]) inversion.octave_i_++; } - for (int i = 0; i < pitch_arr_.size (); i++) - if (pitch_arr_[i] > inversion) + for (int i = 0; i < pitch_arr_p->size (); i++) + if ((*pitch_arr_p)[i] > inversion) { - pitch_arr_.insert (inversion, i); + pitch_arr_p->insert (inversion, i); break; } -#endif } void -Chord::rebuild_with_bass (int bass_i) +Chord::rebuild_with_bass (Array* pitch_arr_p, int bass_i) { assert (bass_i >= 0); - Musical_pitch inversion = pitch_arr_.get (bass_i); + Musical_pitch bass = pitch_arr_p->get (bass_i); // is lowering fine, or should others be raised? - if (pitch_arr_.size ()) - while (inversion > pitch_arr_[0]) - inversion.octave_i_--; - pitch_arr_.insert (inversion, 0); + if (pitch_arr_p->size ()) + while (bass > (*pitch_arr_p)[0]) + bass.octave_i_--; + pitch_arr_p->insert (bass, 0); } diff --git a/lily/directional-spanner.cc b/lily/directional-spanner.cc index e6e4f55947..be9676c4d1 100644 --- a/lily/directional-spanner.cc +++ b/lily/directional-spanner.cc @@ -9,13 +9,13 @@ Directional_spanner::get_default_dir() const void Directional_spanner::do_pre_processing() { - if (!dir_) - dir_ = get_default_dir(); + if (!get_direction ()) + set_direction (get_default_dir()); } Directional_spanner::Directional_spanner() { - dir_ = CENTER; + set_direction (CENTER); } Offset diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index ce2c068c64..8202c7157b 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -114,6 +114,7 @@ Dynamic_engraver::do_process_requests() text_p_ = new Text_item; text_p_->text_str_ = loud; // ugh + text_p_->set_elt_property ("style", gh_str02scm ("dynamic")); staff_side_p_ = new Staff_side_item; staff_side_p_->set_elt_property ("script-priority", @@ -121,23 +122,23 @@ Dynamic_engraver::do_process_requests() staff_side_p_->set_victim (text_p_); staff_side_p_->axis_ = Y_AXIS; - staff_side_p_->dir_ = DOWN; + staff_side_p_->set_direction (DOWN); SCM prop = get_property ("verticalDirection", 0); if (isdir_b (prop)) { - staff_side_p_->dir_ = to_dir (prop); + staff_side_p_->set_direction (to_dir (prop)); } prop = get_property ("dynamicDirection", 0); if (gh_number_p(prop)) { - staff_side_p_->dir_ = to_dir (prop); + staff_side_p_->set_direction (to_dir (prop)); } - if (absd->dir_) + if (absd->get_direction ()) { - staff_side_p_->dir_ = absd->dir_; + staff_side_p_->set_direction (absd->get_direction ()); } prop = get_property ("dynamicPadding", 0); @@ -172,12 +173,12 @@ Dynamic_engraver::do_process_requests() SCM prop = get_property ("verticalDirection", 0); if (isdir_b (prop)) { - to_end_ss_span_p_->dir_ = to_dir (prop); + to_end_ss_span_p_->set_direction (to_dir (prop)); } prop = get_property ("dynamicDirection", 0); if (isdir_b (prop)) { - to_end_ss_span_p_->dir_ = to_dir (prop); + to_end_ss_span_p_->set_direction (to_dir (prop)); } prop = get_property ("dynamicPadding", 0); if (gh_number_p(prop)) diff --git a/lily/include/bezier.hh b/lily/include/bezier.hh index 1122e2c8cc..73b6079104 100644 --- a/lily/include/bezier.hh +++ b/lily/include/bezier.hh @@ -64,13 +64,16 @@ public: bool check_fit_bo (); Real check_fit_f (); void print () const; - void set (Array points, int dir); + void set (Array points, Direction dir); void transform (); void transform_back (); Paper_def* paper_l_; Curve encompass_; - int dir_; + Direction dir_; + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + Real alpha_; Offset origin_; Curve return_; diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index 41de60c64d..6e861a905c 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -20,6 +20,9 @@ public: Breathing_sign (); void set_vertical_position (Direction); + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + protected: virtual void do_post_processing (); diff --git a/lily/include/chord-name-engraver.hh b/lily/include/chord-name-engraver.hh index 779197f70d..4843fae8e9 100644 --- a/lily/include/chord-name-engraver.hh +++ b/lily/include/chord-name-engraver.hh @@ -31,6 +31,8 @@ private: Link_array text_p_arr_; Array rebuild_pitch_arr (int tonic_i) const; Tonic_req* tonic_req_; + Inversion_req* inversion_req_; + Bass_req* bass_req_; }; #endif // CHORD_NAME_ENGRAVER_HH diff --git a/lily/include/chord.hh b/lily/include/chord.hh index 9b38abbb41..871189fafc 100644 --- a/lily/include/chord.hh +++ b/lily/include/chord.hh @@ -16,20 +16,33 @@ class Chord { public: - Chord (Array pitch_arr); - Chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p); + static int find_tonic_i (Array const*); + static int find_pitch_i (Array const*, Musical_pitch p); + static int find_notename_i (Array const*, Musical_pitch p); + static Array missing_thirds_pitch_arr (Array const* pitch_arr_p); + static void rebuild_from_base (Array*, int base_i); + static void rebuild_insert_inversion (Array*, int tonic_i); + static void rebuild_transpose (Array*, Musical_pitch tonic); + static void rebuild_with_bass (Array*, int bass_i); + static int step_i (Musical_pitch tonic, Musical_pitch p); - void rebuild_from_base (int base_i); - void rebuild_insert_inversion (int tonic_i); - void rebuild_with_bass (int bass_i); + Chord (Array pitch_arr, Musical_pitch* inversion_p, Musical_pitch* bass_p); + Chord (Chord const& chord); + ~Chord (); - String banter_str (Musical_pitch* inversion) const; - int find_tonic_i () const; - int find_pitch_i (Musical_pitch p) const; - int find_notename_i (Musical_pitch p) const; + + Array to_pitch_arr () const; + + String banter_str () const; void find_additions_and_subtractions(Array* add_arr_p, Array* sub_arr_p) const; Array pitch_arr_; + Musical_pitch* inversion_p_; + Musical_pitch* bass_p_; }; +Chord to_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Musical_pitch* bass_p); + +Chord to_chord (Array pitch_arr, Tonic_req* tonic_req, Inversion_req* inversion_req, Bass_req* bass_req, bool find_inversion_b); + #endif // CHORD_HH diff --git a/lily/include/directional-spanner.hh b/lily/include/directional-spanner.hh index 199669e99a..cdc56a4ed1 100644 --- a/lily/include/directional-spanner.hh +++ b/lily/include/directional-spanner.hh @@ -14,12 +14,15 @@ JUNKME? */ class Directional_spanner : public Spanner{ -public: - /// -1 below heads, +1 above heads. Direction dir_; + +public: Directional_spanner(); - + + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + /// offset of "center" relative to left-column/0-pos of staff virtual Offset center() const; virtual Direction get_default_dir() const; diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 9e397a0ad2..8db92ce5c2 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -44,6 +44,7 @@ struct Bar_column_engraver; struct Bar_engraver; struct Bar_req; struct Barcheck_req; +struct Bass_req; struct Beam; struct Beam_engraver; struct Beaming_info; @@ -101,6 +102,7 @@ struct Head_column; struct Idealspacing; struct Identifier; struct Input_file; +struct Inversion_req; struct Item; struct Key; struct Key_change_req; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index b64f5eb65d..963f6079fa 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -97,7 +97,19 @@ protected: /// specify tonic of a chord struct Tonic_req : public Melodic_req { - VIRTUAL_COPY_CONS(Music); + VIRTUAL_COPY_CONS (Music); +}; + +/// specify inversion of a chord +struct Inversion_req : public Melodic_req +{ + VIRTUAL_COPY_CONS (Music); +}; + +/// specify bass of a chord +struct Bass_req : public Melodic_req +{ + VIRTUAL_COPY_CONS (Music); }; /// Put a note of specified type, height, and with accidental on the staff. diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index 301eb358ee..01944e6e2d 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -67,7 +67,7 @@ private: String init_str_; Simultaneous_music * get_note_element (Note_req * ,Duration *); - Simultaneous_music * get_chord (Musical_pitch, Array*, Array*, Musical_pitch*, Duration); + Simultaneous_music * get_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Musical_pitch* bass_p, Duration d); Simultaneous_music* get_rest_element (String, Duration *); Simultaneous_music* get_word_element (String, Duration*); String notename_str (Melodic_req* melodic); diff --git a/lily/include/request.hh b/lily/include/request.hh index d525daa83b..496e4209b0 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -40,6 +40,9 @@ class Script_req : public virtual Request { public: Direction dir_; + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + VIRTUAL_COPY_CONS(Music); Script_req (); }; diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh index 76e764b13b..36441beefa 100644 --- a/lily/include/staff-side.hh +++ b/lily/include/staff-side.hh @@ -28,10 +28,14 @@ class Staff_side_element : public Staff_symbol_referencer { void position_self (); - + Direction dir_; public: Score_element * to_position_l_; - Direction dir_; + + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + + Link_array support_l_arr_; Axis axis_; //junkme. diff --git a/lily/include/stem-info.hh b/lily/include/stem-info.hh index e631280c58..248f71b82d 100644 --- a/lily/include/stem-info.hh +++ b/lily/include/stem-info.hh @@ -14,7 +14,10 @@ struct Stem_info { Real x_; - int dir_; + Direction dir_; + void set_direction (Direction d ) { dir_ = d; } + Direction get_direction () const { return dir_; } + int beam_dir_; Real idealy_f_; Real miny_f_; diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 14fe13c22a..2d91e441e9 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -48,7 +48,13 @@ class Stem : public Item, public Staff_symbol_referencer { */ Drul_array yextent_drul_; + /// direction stem (that's me) + Direction dir_; + public: + void set_direction (Direction d); + Direction get_direction () const { return dir_; } + Link_array head_l_arr_; Link_array rest_l_arr_; @@ -62,12 +68,6 @@ public: Beam* beam_l_; Drul_array beams_i_drul_; - - void set_direction (Direction d); - /// direction stem (that's me) - Direction dir_; - - Stem (); /// ensure that this Stem also encompasses the Notehead #n# @@ -81,7 +81,6 @@ public: void do_print() const; void set_stemend (Real); Direction get_default_dir() const; - Direction get_dir () const; int get_center_distance(Direction) const; diff --git a/lily/lexer.ll b/lily/lexer.ll index 7c09d492e9..83beb3eb8e 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -359,6 +359,12 @@ HYPHEN -- - { return CHORD_MINUS; } + : { + return CHORD_COLON; + } + \/\+ { + return CHORD_BASS; + } \^ { return CHORD_CARET; } diff --git a/lily/musical-request.cc b/lily/musical-request.cc index de2c34029d..16bb0d5513 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -203,5 +203,5 @@ Articulation_req::do_equal_b (Request const* r) const Script_req::Script_req () { - dir_ = CENTER; + set_direction (CENTER); } diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 11ae2eeda4..3444be3383 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -163,20 +163,37 @@ My_lily_parser::get_rest_element (String s, Duration * duration_p) // junk me Simultaneous_music * -My_lily_parser::get_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Duration d) +My_lily_parser::get_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Musical_pitch* bass_p, Duration d) { Simultaneous_music*v = new Request_chord; v->set_spot (here_input ()); - Chord chord (tonic, add_arr_p, sub_arr_p, inversion_p); + Chord chord = to_chord (tonic, add_arr_p, sub_arr_p, inversion_p, bass_p); Tonic_req* t = new Tonic_req; t->pitch_ = tonic; v->add_music (t); - for (int i = 0; i < chord.pitch_arr_.size (); i++) + //urg + if (inversion_p + && Chord::find_notename_i (&chord.pitch_arr_, *inversion_p) > 0) { - Musical_pitch p = chord.pitch_arr_[i]; + Inversion_req* i = new Inversion_req; + i->pitch_ = *inversion_p; + v->add_music (i); + } + + if (bass_p) + { + Bass_req* b = new Bass_req; + b->pitch_ = *bass_p; + v->add_music (b); + } + + Array pitch_arr = chord.to_pitch_arr (); + for (int i = 0; i < pitch_arr.size (); i++) + { + Musical_pitch p = pitch_arr[i]; Note_req* n = new Note_req; n->pitch_ = p; n->duration_ = d; diff --git a/lily/note-column.cc b/lily/note-column.cc index c592d92ce5..0f8bd3bc38 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -61,7 +61,7 @@ Direction Note_column::dir () const { if (stem_l_) - return stem_l_->dir_; + return stem_l_->get_direction (); else if (head_l_arr_.size ()) return (Direction)sign (head_positions_interval().center ()); @@ -162,7 +162,7 @@ Note_column::do_post_processing () return; /* ugh. Should be done by beam. */ - Direction d = stem_l_->get_dir (); + Direction d = stem_l_->get_direction (); Real beamy = (stem_l_->hpos_f () - b->stems_[0]->hpos_f ()) * b->slope_f_ + b->left_y_; Real staff_space = rest_l_arr_[0]->staff_line_leading_f (); diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index d23ee6e806..74168092d4 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -29,6 +29,14 @@ Note_heads_engraver::do_try_music (Music *m) { return true; } + else if (Inversion_req* i = dynamic_cast (m)) + { + return true; + } + else if (Bass_req* b = dynamic_cast (m)) + { + return true; + } else if (Busy_playing_req * p = dynamic_cast (m)) { return notes_end_pq_.size (); diff --git a/lily/parser.yy b/lily/parser.yy index f6c73ca83a..6c02b4967e 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -187,7 +187,8 @@ yylex (YYSTYPE *s, void * v_l) %token VERSION /* escaped */ -%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR CHORD_MINUS CHORD_CARET +%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER +%token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET %type exclamations questions %token DIGIT @@ -236,7 +237,7 @@ yylex (YYSTYPE *s, void * v_l) %type pitch_list %type chord %type chord_additions chord_subtractions chord_notes chord_step -%type chord_note chord_inversion +%type chord_note chord_inversion chord_bass %type midi_block midi_body %type duration_length @@ -1455,15 +1456,15 @@ simple_element: ; chord: - steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion { - $$ = THIS->get_chord (*$1, $3, $4, $5, *$2); + steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion chord_bass { + $$ = THIS->get_chord (*$1, $3, $4, $5, $6, *$2); }; chord_additions: { $$ = new Array; } - | CHORD_MINUS chord_notes { + | CHORD_COLON chord_notes { $$ = $2; } ; @@ -1493,7 +1494,18 @@ chord_inversion: $$ = 0; } | '/' steno_tonic_pitch { - $$ = $2 + $$ = $2; + $$->set_spot (THIS->here_input ()); + } + ; + +chord_bass: + { + $$ = 0; + } + | CHORD_BASS steno_tonic_pitch { + $$ = $2; + $$->set_spot (THIS->here_input ()); } ; diff --git a/lily/script-column.cc b/lily/script-column.cc index c5a0ec1144..6fabed4d90 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -50,7 +50,7 @@ Script_column::do_pre_processing () for (int i=0; i < staff_sided_item_l_arr_.size (); i++) { Staff_side_item * ip = get_Staff_side (staff_sided_item_l_arr_[i]); - arrs[ip->dir_].push (staff_sided_item_l_arr_[i]); + arrs[ip->get_direction ()].push (staff_sided_item_l_arr_[i]); } Direction d = DOWN; diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 58bff60dde..5ca373ff10 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -68,14 +68,14 @@ Script_engraver::do_process_requests() if (relative_stem_dir) ss->relative_dir_ = (Direction)relative_stem_dir; else - ss->dir_ = (Direction)force_dir; + ss->set_direction ((Direction)force_dir); SCM dir_prop (get_property ("articulationScriptVerticalDirection", 0)); if (gh_number_p(dir_prop)) - ss->dir_ = to_dir (dir_prop); + ss->set_direction (to_dir (dir_prop)); - if (l->dir_) - ss->dir_ = l->dir_; + if (l->get_direction ()) + ss->set_direction (l->get_direction ()); SCM paddingprop = get_property ("articulationScriptPadding", 0); if (gh_number_p(paddingprop)) diff --git a/lily/script.cc b/lily/script.cc index 4e10621df9..ebceea43ab 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -69,7 +69,7 @@ Script::do_pre_processing () void Script::do_post_processing () { - Direction d = staff_side_l_->dir_; + Direction d = staff_side_l_->get_direction (); Molecule m (get_molecule(d)); /* @@ -90,7 +90,7 @@ Script::set_staff_side (Staff_side_item*g) Molecule* Script::do_brew_molecule_p () const { - return new Molecule (get_molecule (staff_side_l_->dir_)); + return new Molecule (get_molecule (staff_side_l_->get_direction ())); } void diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 045373378d..6795c9d01f 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -115,7 +115,7 @@ Slur_engraver::do_pre_move_processing() for (int i = 0; i < end_slur_l_arr_.size(); i++) { - end_slur_l_arr_[i]->dir_ = slurdir; + end_slur_l_arr_[i]->set_direction (slurdir); typeset_element (end_slur_l_arr_[i]); } end_slur_l_arr_.clear(); diff --git a/lily/slur.cc b/lily/slur.cc index 349dbd34d1..ae96ed9771 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -101,7 +101,7 @@ Slur::encompass_offset (Note_column const* col) const { warning (_ ("Slur over rest?")); o[X_AXIS] = col->hpos_f (); - o[Y_AXIS] = col->extent (Y_AXIS)[dir_]; + o[Y_AXIS] = col->extent (Y_AXIS)[get_direction ()]; return o; } @@ -111,22 +111,22 @@ Slur::encompass_offset (Note_column const* col) const Simply set x to middle of notehead */ - o[X_AXIS] -= 0.5 * stem_l->dir_ * col->extent (X_AXIS).length (); + o[X_AXIS] -= 0.5 * stem_l->get_direction () * col->extent (X_AXIS).length (); - if ((stem_l->dir_ == dir_) + if ((stem_l->get_direction () == get_direction ()) && !stem_l->extent (Y_AXIS).empty_b ()) { - o[Y_AXIS] = stem_l->extent (Y_AXIS)[dir_]; + o[Y_AXIS] = stem_l->extent (Y_AXIS)[get_direction ()]; } else { - o[Y_AXIS] = col->extent (Y_AXIS)[dir_]; + o[Y_AXIS] = col->extent (Y_AXIS)[get_direction ()]; } /* leave a gap: slur mustn't touch head/stem */ - o[Y_AXIS] += dir_ * paper_l ()->get_var ("slur_y_free"); + o[Y_AXIS] += get_direction () * paper_l ()->get_var ("slur_y_free"); o[Y_AXIS] += calc_interstaff_dist (stem_l, this); return o; } @@ -140,8 +140,8 @@ void Slur::do_post_processing () { encompass_arr_.sort (Note_column_compare); - if (!dir_) - dir_ = get_default_dir (); + if (!get_direction ()) + set_direction (get_default_dir ()); /* Slur and tie placement [OSU] @@ -179,23 +179,23 @@ Slur::do_post_processing () no beam getting in the way */ if ((stem_l->extent (Y_AXIS).empty_b () - || !((stem_l->dir_ == dir_) && (dir_ != d))) - && !((dir_ == stem_l->dir_) + || !((stem_l->get_direction () == get_direction ()) && (get_direction () != d))) + && !((get_direction () == stem_l->get_direction ()) && stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1))) { dx_f_drul_[d] = spanned_drul_[d]->extent (X_AXIS).length () / 2; dx_f_drul_[d] -= d * x_gap_f; - if (stem_l->dir_ != dir_) + if (stem_l->get_direction () != get_direction ()) { - dy_f_drul_[d] = note_column_drul[d]->extent (Y_AXIS)[dir_]; + dy_f_drul_[d] = note_column_drul[d]->extent (Y_AXIS)[get_direction ()]; } else { dy_f_drul_[d] = stem_l->chord_start_f () - + dir_ * internote_f; + + get_direction () * internote_f; } - dy_f_drul_[d] += dir_ * y_gap_f; + dy_f_drul_[d] += get_direction () * y_gap_f; } /* side attached to (visible) stem @@ -209,8 +209,8 @@ Slur::do_post_processing () */ if (stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1)) { - dy_f_drul_[d] = stem_l->extent (Y_AXIS)[dir_]; - dy_f_drul_[d] += dir_ * 2 * y_gap_f; + dy_f_drul_[d] = stem_l->extent (Y_AXIS)[get_direction ()]; + dy_f_drul_[d] += get_direction () * 2 * y_gap_f; } /* side attached to notehead, with stem getting in the way @@ -220,8 +220,8 @@ Slur::do_post_processing () dx_f_drul_[d] -= d * x_gap_f; dy_f_drul_[d] = stem_l->chord_start_f () - + dir_ * internote_f; - dy_f_drul_[d] += dir_ * y_gap_f; + + get_direction () * internote_f; + dy_f_drul_[d] += get_direction () * y_gap_f; } } } @@ -300,7 +300,7 @@ Slur::do_post_processing () Real slope_ratio_f = abs (dy_f / dx_f); if (slope_ratio_f > slope_damp_f) { - Direction d = (Direction)(- dir_ * (sign (dy_f))); + Direction d = (Direction)(- get_direction () * (sign (dy_f))); if (!d) d = LEFT; Real damp_f = (slope_ratio_f - slope_damp_f) * dx_f; @@ -308,7 +308,7 @@ Slur::do_post_processing () must never change sign of dy */ damp_f = damp_f height_damp_f) { - Direction d = (Direction)(- dir_ * (sign (dy_f))); + Direction d = (Direction)(- get_direction () * (sign (dy_f))); if (!d) d = LEFT; /* take third step */ @@ -341,8 +341,8 @@ Slur::do_post_processing () */ if (abs (dy_f / dx_f ) < slope_damp_f) { - dy_f_drul_[-d] += dir_ * damp_f; - dy_f_drul_[d] += dir_ * damp_f; + dy_f_drul_[-d] += get_direction () * damp_f; + dy_f_drul_[d] += get_direction () * damp_f; } /* don't change slope too much, would have been catched by slope damping @@ -350,7 +350,7 @@ Slur::do_post_processing () else { damp_f = damp_f stem_l_ - && nc->stem_l_->dir_ == dir_ - && abs (nc->stem_l_->extent (Y_AXIS)[dir_] + && nc->stem_l_->get_direction () == get_direction () + && abs (nc->stem_l_->extent (Y_AXIS)[get_direction ()] - dy_f_drul_[d] + (d == LEFT ? 0 : interstaff_f)) <= snap_f) { @@ -380,9 +380,9 @@ Slur::do_post_processing () snapx_f_drul[d] = nc->stem_l_->hpos_f () - spanned_drul_[d]->relative_coordinate (0, X_AXIS); - snapy_f_drul[d] = nc->stem_l_->extent (Y_AXIS)[dir_] + snapy_f_drul[d] = nc->stem_l_->extent (Y_AXIS)[get_direction ()] + interstaff_interval[d] - + dir_ * 2 * y_gap_f; + + get_direction () * 2 * y_gap_f; snapped_b_drul[d] = true; } diff --git a/lily/staff-margin-engraver.cc b/lily/staff-margin-engraver.cc index 7fdba6a601..a382bf84b1 100644 --- a/lily/staff-margin-engraver.cc +++ b/lily/staff-margin-engraver.cc @@ -51,7 +51,7 @@ Staff_margin_engraver::acknowledge_element (Score_element_info inf) { create_items (0); text_p_->text_str_ = ly_scm2string (long_name); - staff_side_p_->dir_ = LEFT; + staff_side_p_->set_direction (LEFT); Bar_script_engraver::attach_script_to_item (i); /* diff --git a/lily/staff-side.cc b/lily/staff-side.cc index d2b9ab974d..5f923b89d8 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -16,7 +16,7 @@ Staff_side_element::Staff_side_element () { - dir_ = CENTER; + set_direction (CENTER); to_position_l_ = 0; set_elt_property ("transparent", SCM_BOOL_T); axis_ = Y_AXIS; @@ -25,8 +25,8 @@ Staff_side_element::Staff_side_element () void Staff_side_element::do_pre_processing () { - if (!dir_) - dir_ = get_default_direction (); + if (!get_direction ()) + set_direction (get_default_direction ()); if (axis_ == X_AXIS) position_self (); @@ -117,15 +117,15 @@ Staff_side_element::position_self () SCM pad = remove_elt_property ("padding"); if (pad != SCM_UNDEFINED) { - off += gh_scm2double (pad) * dir_; + off += gh_scm2double (pad) * get_direction (); } - Real total_off = dim[dir_] + off; + Real total_off = dim[get_direction ()] + off; /* "no-staff-support" is ugh bugfix to get staccato dots right. */ if (to_position_l_ && to_position_l_->get_elt_property ("no-staff-support") == SCM_UNDEFINED) - total_off += - sym_dim[-dir_]; + total_off += - sym_dim[-get_direction ()]; dim_cache_[axis_]->set_offset (total_off); if (fabs (total_off) > 100 CM) @@ -167,7 +167,7 @@ Staff_side_element::do_print () const DEBUG_OUT << "positioning " << to_position_l_->name(); DEBUG_OUT << "axis == " << axis_name_str (axis_) - << ", dir == " << to_str ((int)dir_ ); + << ", dir == " << to_str ((int)get_direction () ); #endif } diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index a3779c61e7..c43916f4f1 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -99,7 +99,7 @@ Stem_engraver::do_pre_move_processing() SCM prop = get_property ("verticalDirection", 0); if (gh_number_p(prop)) { - stem_p_->dir_ = to_dir (prop); + stem_p_->set_direction (to_dir (prop)); stem_p_->set_elt_property ("dir-forced", SCM_BOOL_T); } diff --git a/lily/stem-info.cc b/lily/stem-info.cc index 270ce80072..4cab4ff111 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -31,7 +31,7 @@ Stem_info::Stem_info (Stem*s, int mult) mult_i_ =mult; stem_l_ = s; x_ = stem_l_->hpos_f (); - dir_ = stem_l_->dir_; + set_direction (stem_l_->get_direction ()); SCM bd = stem_l_->remove_elt_property ("beam-dir"); beam_dir_ = gh_scm2int (bd); @@ -62,7 +62,7 @@ Stem_info::Stem_info (Stem*s, int mult) Real stem_f = paper_l->get_var (type_str + "stem_length" + to_str (mult_i_ dir_); + return (Direction)(relative_dir_ * stem_l_->get_direction ()); } void @@ -86,13 +86,13 @@ Stem_staff_side_item::do_post_processing () Real self_coord = relative_coordinate (c, Y_AXIS); Real now_coord = self_coord - staff_coord; - Real desired_coord = ceil (dir_ * 2.0 * now_coord / staff_line_leading_f ()); + Real desired_coord = ceil (get_direction () * 2.0 * now_coord / staff_line_leading_f ()); if (! (int (desired_coord) % 2)) { desired_coord ++; } - translate_axis (desired_coord * dir_ * staff_line_leading_f () / 2.0 - now_coord, Y_AXIS); + translate_axis (desired_coord * get_direction () * staff_line_leading_f () / 2.0 - now_coord, Y_AXIS); } } diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index ee93f94fa8..5ada498afd 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -84,20 +84,20 @@ Stem_tremolo::do_brew_molecule_p () const { beams->translate (Offset(stem_l_->hpos_f () - hpos_f (), stem_l_->stem_end_f () * internote_f - - stem_l_->beam_l_->dir_ * beams_i * interbeam_f)); + stem_l_->beam_l_->get_direction () * beams_i * interbeam_f)); } else { /* Beams should intersect one beamthickness below staff end */ - Real dy = - beams->extent ()[Y_AXIS].length () / 2 * stem_l_->dir_; + Real dy = - beams->extent ()[Y_AXIS].length () / 2 * stem_l_->get_direction (); /* uhg. Should use relative coords and placement */ Real whole_note_correction = (stem_l_ && stem_l_->invisible_b( )) - ? -stem_l_->get_dir () * stem_l_->note_delta_f ()/2 + ? -stem_l_->get_direction () * stem_l_->note_delta_f ()/2 : 0.0; /* diff --git a/lily/stem.cc b/lily/stem.cc index 018011adbc..178166d73b 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -22,7 +22,7 @@ void Stem::set_direction (Direction d) { - if (!dir_) + if (!get_direction ()) warning (_ ("stem direction set already!")); dir_ = d; @@ -37,7 +37,7 @@ Stem::Stem () beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = -1; yextent_drul_[DOWN] = yextent_drul_[UP] = 0; flag_i_ = 2; - dir_ = CENTER; + set_direction (CENTER); beam_l_ = 0; } @@ -83,31 +83,31 @@ Stem::stem_length_f () const Real Stem::stem_begin_f () const { - return yextent_drul_[Direction(-dir_)]; + return yextent_drul_[Direction(-get_direction ())]; } Real Stem::chord_start_f () const { - return head_positions()[dir_] * staff_line_leading_f ()/2.0; + return head_positions()[get_direction ()] * staff_line_leading_f ()/2.0; } Real Stem::stem_end_f () const { - return yextent_drul_[dir_]; + return yextent_drul_[get_direction ()]; } void Stem::set_stemend (Real se) { // todo: margins - if (dir_ && dir_ * head_positions()[dir_] >= se*dir_) + if (get_direction () && get_direction () * head_positions()[get_direction ()] >= se*get_direction ()) warning (_ ("Weird stem size; check for narrow beams")); - yextent_drul_[dir_] = se; - yextent_drul_[Direction(-dir_)] = head_positions()[-dir_]; + yextent_drul_[get_direction ()] = se; + yextent_drul_[Direction(-get_direction ())] = head_positions()[-get_direction ()]; } int @@ -158,11 +158,6 @@ Stem::get_default_dir () const return Direction (int(paper_l ()->get_var ("stem_default_neutral_direction"))); } -Direction -Stem::get_dir () const -{ - return dir_; -} void @@ -182,15 +177,15 @@ Stem::set_default_stemlen () Real shorten_f = paper_l ()->get_var (type_str + "forced_stem_shorten0"); - if (!dir_) - dir_ = get_default_dir (); + if (!get_direction ()) + set_direction (get_default_dir ()); /* stems in unnatural (forced) direction should be shortened, according to [Roush & Gourlay] */ if (((int)chord_start_f ()) - && (dir_ != get_default_dir ())) + && (get_direction () != get_default_dir ())) length_f -= shorten_f; if (flag_i_ >= 5) @@ -198,11 +193,11 @@ Stem::set_default_stemlen () if (flag_i_ >= 6) length_f += 1.0; - set_stemend ((dir_ > 0) ? head_positions()[BIGGER] + length_f: + set_stemend ((get_direction () > 0) ? head_positions()[BIGGER] + length_f: head_positions()[SMALLER] - length_f); bool no_extend_b = get_elt_property ("no-stem-extend") != SCM_UNDEFINED; - if (!grace_b && !no_extend_b && (dir_ * stem_end_f () < 0)) + if (!grace_b && !no_extend_b && (get_direction () * stem_end_f () < 0)) set_stemend (0); } @@ -221,7 +216,7 @@ Stem::set_noteheads () if (!head_l_arr_.size ()) return; head_l_arr_.sort (Note_head::compare); - if (dir_ < 0) + if (get_direction () < 0) head_l_arr_.reverse (); Note_head * beginhead = head_l_arr_[0]; @@ -238,7 +233,7 @@ Stem::set_noteheads () if (dy <= 1) { if (parity) - head_l_arr_[i]->flip_around_stem (dir_); + head_l_arr_[i]->flip_around_stem (get_direction ()); parity = !parity; } else @@ -277,7 +272,7 @@ Stem::set_spacing_hints () { if (!invisible_b ()) { - SCM scmdir = gh_int2scm (dir_); + SCM scmdir = gh_int2scm (get_direction ()); SCM dirlist = column_l ()->get_elt_property ("dir-list"); if (dirlist == SCM_UNDEFINED) dirlist = SCM_EOL; @@ -300,7 +295,7 @@ Stem::flag () const style = ly_scm2string (st); } - char c = (dir_ == UP) ? 'u' : 'd'; + char c = (get_direction () == UP) ? 'u' : 'd'; Molecule m = lookup_l ()->afm_find (String ("flags-") + to_str (c) + to_str (flag_i_)); if (!style.empty_b ()) @@ -337,7 +332,7 @@ Stem::do_brew_molecule_p () const Real head_wid = 0; if (head_l_arr_.size ()) head_wid = head_l_arr_[0]->extent (X_AXIS).length (); - stem_y[Direction(-dir_)] += dir_ * head_wid * tan(ANGLE)/(2*dy); + stem_y[Direction(-get_direction ())] += get_direction () * head_wid * tan(ANGLE)/(2*dy); if (!invisible_b ()) { @@ -350,7 +345,7 @@ Stem::do_brew_molecule_p () const if (!beam_l_ && abs (flag_i_) > 2) { Molecule fl = flag (); - fl.translate_axis(stem_y[dir_]*dy, Y_AXIS); + fl.translate_axis(stem_y[get_direction ()]*dy, Y_AXIS); mol_p->add_molecule (fl); } @@ -371,10 +366,10 @@ Stem::note_delta_f () const Real rule_thick = paper_l ()->get_var ("stemthickness"); Interval stem_wid(-rule_thick/2, rule_thick/2); - if (dir_ == CENTER) + if (get_direction () == CENTER) r = head_wid.center (); else - r = head_wid[dir_] - stem_wid[dir_]; + r = head_wid[get_direction ()] - stem_wid[get_direction ()]; } return r; } diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index cf8c0ea0f6..5cac32fd3d 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -94,7 +94,7 @@ Text_engraver::do_process_requests () ss->set_elt_property ("script-priority", gh_int2scm (200)); - ss->dir_ = r->dir_; + ss->set_direction (r->get_direction ()); text->text_str_ = r->text_str_; diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index a3ba0358ca..49212b2d09 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -147,7 +147,7 @@ Tie_engraver::do_pre_move_processing () for (int i=0; i< tie_p_arr_.size (); i++) { - tie_p_arr_[i]->dir_ = tie_dir; + tie_p_arr_[i]->set_direction (tie_dir); typeset_element (tie_p_arr_[i]); } tie_p_arr_.clear (); diff --git a/lily/tie.cc b/lily/tie.cc index 8773cf2c78..af2c6fb1a5 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -159,15 +159,15 @@ Tie::do_post_processing() if (dx_f < paper_l ()->get_var ("tie_staffspace_length")) { if (abs (ypos_i) % 2) - y_f += dir_ * internote_f; - y_f += dir_ * y_gap_f; + y_f += get_direction () * internote_f; + y_f += get_direction () * y_gap_f; } else { if (! (abs (ypos_i) % 2)) - y_f += dir_ * internote_f; - y_f += dir_ * internote_f; - y_f -= dir_ * y_gap_f; + y_f += get_direction () * internote_f; + y_f += get_direction () * internote_f; + y_f -= get_direction () * y_gap_f; } dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = y_f; diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 165255db26..0c3646f6ff 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -63,10 +63,10 @@ Tuplet_spanner::do_brew_molecule_p () const num.align_to (X_AXIS, CENTER); num.translate_axis (w/2, X_AXIS); Real interline = paper_l ()->get_var ("interline"); - Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_] - - column_arr_[0]->extent (Y_AXIS) [dir_]; + Real dy = column_arr_.top ()->extent (Y_AXIS) [get_direction ()] + - column_arr_[0]->extent (Y_AXIS) [get_direction ()]; num.align_to (Y_AXIS, CENTER); - num.translate_axis (dir_ * interline, Y_AXIS); + num.translate_axis (get_direction () * interline, Y_AXIS); num.translate_axis (dy/2, Y_AXIS); @@ -75,14 +75,14 @@ Tuplet_spanner::do_brew_molecule_p () const { Real gap = paper_l () -> get_var ("tuplet_spanner_gap"); - mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, dir_)); + mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, get_direction ())); } if (number_visibility) { mol_p->add_molecule (num); } - mol_p->translate_axis (dir_ * interline, Y_AXIS); + mol_p->translate_axis (get_direction () * interline, Y_AXIS); } return mol_p; } @@ -101,7 +101,7 @@ void Tuplet_spanner::do_post_processing () { if (column_arr_.size()) - translate_axis (column_arr_[0]->extent (Y_AXIS)[dir_], Y_AXIS); + translate_axis (column_arr_[0]->extent (Y_AXIS)[get_direction ()], Y_AXIS); if (beam_l_arr_.size () == 1) { diff --git a/ly/chord-modifiers.ly b/ly/chord-modifiers.ly index 48cc2f09f4..ef3942dd66 100644 --- a/ly/chord-modifiers.ly +++ b/ly/chord-modifiers.ly @@ -6,7 +6,9 @@ m = \musicalpitch { 0 2 -1 } min = \musicalpitch { 0 2 -1 } aug = \musicalpitch { 0 4 1 } - dim = \musicalpitch { 0 4 -1 } + % urg! + % dim = \musicalpitch { -100 4 -1 } + dim = \musicalpitch { -100 2 -1 } % urg, not actually a chord-modifier, but it works % c7 -> , c 7+ -> c b maj = \musicalpitch { 0 6 1 } diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 7816b08880..81fd8abf3b 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -33,6 +33,8 @@ INSTALLATION_OUT_FILES2=$(AFM_FILES) INSTALLATION_OUT_DIR3=$(datadir)/tfm INSTALLATION_OUT_FILES3=$(TFM_FILES) +# comment these out if you don't want pfa's to be generated +# or you don't have metapost. INSTALLATION_OUT_DIR4=$(datadir)/pfa INSTALLATION_OUT_FILES4=$(PFA_FILES) diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 8652d3c960..930659f862 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -563,7 +563,7 @@ AC_DEFUN(AC_STEPMAKE_TEXMF, [ # # For now let people define these in their environments # - : ${MFPLAIN_MP=`kpsewhich mfplain.mp`} + : ${MFPLAIN_MP=`kpsewhich mp mfplain.mp`} : ${INIMETAPOST_FLAGS='-interaction=nonstopmode'} rm -f mfput.* -- 2.39.5