From 7d2ec0f1c47d211f243cf5646b35ef5298d8c82a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 24 Dec 1999 00:58:41 +0100 Subject: [PATCH] release: 1.3.17 =========== * \property stemCentered (boolean): centers stem on note head. See input/test/stem-centered.ly * input/trip.ly, small test of lots of features. * \property Staff.collisionMergeDotted: merge equal noteheads with different dot count. See input/test/collision-merge-dotted.fly * Dotted rest bugfix * Don't crash if a slur does not span any notes. * Volta repeats fixed. * cleanup of Note_heads_engraver * removed dots_i_ member of Dots 1.3.16.j --- CHANGES | 32 +++- Documentation/topdocs/AUTHORS.texi | 5 +- Documentation/topdocs/index.tely | 1 - TODO | 51 +----- VERSION | 4 +- input/praeludium-fuga-E.ly | 55 ++----- input/test/collision-merge-dotted.fly | 11 ++ input/test/stem-centered.ly | 9 ++ input/trip.ly | 213 ++++++++++++++++++++++++++ lily/bar-number-engraver.cc | 8 +- lily/collision.cc | 7 +- lily/dots.cc | 9 +- lily/include/dimension-cache.hh | 3 - lily/include/dots.hh | 2 - lily/include/note-heads-engraver.hh | 4 +- lily/include/rhythmic-head.hh | 6 +- lily/include/stem.hh | 4 +- lily/include/timing-translator.hh | 3 +- lily/multi-measure-rest-engraver.cc | 6 +- lily/music.cc | 5 +- lily/note-heads-engraver.cc | 13 +- lily/repeat-engraver.cc | 20 +-- lily/rest-engraver.cc | 3 +- lily/rhythmic-head.cc | 5 +- lily/score-element.cc | 3 +- lily/slur.cc | 7 + lily/stem-tremolo.cc | 4 +- lily/stem.cc | 36 ++--- lily/timing-translator.cc | 5 - lily/volta-spanner.cc | 5 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- scm/generic-property.scm | 14 +- scripts/convert-mudela.py | 9 ++ 34 files changed, 378 insertions(+), 196 deletions(-) create mode 100644 input/test/collision-merge-dotted.fly create mode 100644 input/test/stem-centered.ly create mode 100644 input/trip.ly diff --git a/CHANGES b/CHANGES index 5b2222460c..59d59c2a77 100644 --- a/CHANGES +++ b/CHANGES @@ -1,22 +1,44 @@ +1.3.16.hwn1 +=========== + +* \property stemCentered (boolean): centers stem on note head. See +input/test/stem-centered.ly + +* input/trip.ly, small test of lots of features. + +* \property Staff.collisionMergeDotted: merge equal noteheads +with different dot count. See input/test/collision-merge-dotted.fly + +* Dotted rest bugfix + +* Don't crash if a slur does not span any notes. + +* Volta repeats fixed. + +* cleanup of Note_heads_engraver + +* removed dots_i_ member of Dots + 1.3.16.jcn1 +=========== * Fixed cross staff slurs. It seems that cross-staff sign was swapped. 1.3.15.hwn1 =========== - * Fixed bug in stem code. Stem in chords works again. Small +* Fixed bug in stem code. Stem in chords works again. Small stem cleanups. - * Use element properties for Staff_symbol. +* Use element properties for Staff_symbol. - * \property sparseTies (boolean). Only make one tie in the +* \property sparseTies (boolean). Only make one tie in the middle for tied chords. - * Junked Directional_spanner, Column_info. +* Junked Directional_spanner, Column_info. Directional_element now is element interface `Directional_element_interface' - * cleanup: use to_boolean () iso. gh_boolean_p && gh_bool2scm +* cleanup: use to_boolean () iso. gh_boolean_p && gh_bool2scm pl 15.jcn4 - removed old notename2scm conversion diff --git a/Documentation/topdocs/AUTHORS.texi b/Documentation/topdocs/AUTHORS.texi index 1472a36863..a9969ccd58 100644 --- a/Documentation/topdocs/AUTHORS.texi +++ b/Documentation/topdocs/AUTHORS.texi @@ -54,9 +54,10 @@ list is alphabetically ordered. @item @email{oliva@@dcc.unicamp.br, Alexandre Oliva}, @uref{http://sunsite.unicamp.br/~oliva/} testing -@item @email{pinard@@iro.umontreal.ca, Franc@,ois Pinard}, +@item @email{pinard@@iro.umontreal.ca, Francois Pinard}, parts of Documentation/Vocab*, started internationalization stuff -@item @email{portnoy@@ai.mit.edu,Stephen Peters} pdfTeX support +@c urg: @c,{} in @email{} barfs. +@item @email{portnoy@@ai.mit.edu,Stephen Peters}, pdfTeX support @item @email{glenprideaux@@iname.com, Glen Prideaux}, minor bug fix to script used to generate doc++ documentation @item @email{Roy.Rankin@@alcatel.com.au, Roy R. Rankin}, diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index 4f137441ae..b283504ec4 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -79,7 +79,6 @@ has the development pages. binary RPMs: @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/} @item Debian binary @uref{ftp://ftp.debian.org/pub/debian/dists/unstable/main/binary-i386/tex} -@item Windows NT: @uref{http://home.austin.rr.com/jbr/jeff/lilypond/} @item i386 RPM: @uref{http://linux.umbc.edu/software/lilypond/rpms/} @item Windows NT: @uref{http://home.austin.rr.com/jbr/jeff/lilypond/} @end itemize diff --git a/TODO b/TODO index 7863d6cfc2..fb57dd8de0 100644 --- a/TODO +++ b/TODO @@ -12,24 +12,11 @@ Grep -i for TODO, FIXME and ugh/ugr/urg. .* TODO . * use hash tabs iso. alist_ for elt property? . * alignment within @itemize -. * make a trip test -. * base on praeludium -. * cross staff beam -. * remain very short -. * broken slurs, ties -. * chords on stem -. * grace notes. -. * dynamics. - . * junk dstream output. . * agressive type-checking for SCM stuff. +. * script columns . * Must stop before this music ends: verse=\lyrics { -. * use "staff-space" and "half-space" iso interline, - staff_line_leading () etc. -. * why does Voice.beamQuantisation = #'none not work? - overriding in ly/params.ly works fine - . * TODO^2: . * make a TODO.texi, like http://www.gnu.org/software/guile/ideas.html . * make this file understandable for 3rd parties. @@ -38,29 +25,6 @@ verse=\lyrics { . * acc at tied note after linebreak. . * fix font-naming and selecting . * sparse ties. -. * -- in the melody contex I have: - - d8 d, d' d, | - -- in the bass context I have: - - - r8 d4. d4 | - -The problem is with 3rd note from melody / 2nd note from the bass. -lilypond prints them as 2 separate notes, while the original score uses -the same note circle, and draws both up and down stems. Like for the 5th -melody / 3rd bass note. Is there any way to solve this ? It looks like -lilypond doesn't like that the bass note is "4." If I make it "4", then -lilypond will draw it like I want. - -Also, another problem is the midi output. Those bass notes are doubled. -Is there any way to mute one of "them" ? - -Probably this is not a problem with lilypond, but with my lack of -knowledge of music theory and/or lilypond. Anyhow, any help is highly -appreciated, like always :-) . * chord tonic: placement of accidental C#, Cb (from scm and C++) . * note head on stem err msg in dutch. . * why need to run -C mf twice? @@ -76,7 +40,6 @@ John . * junk -M ? . * mudela-book doco . * fix or replace feta-accordion.mf -. * script engraver . * bracket pdf hack . * Mondrup: - if I change the property minVerticalAlign in a multi staff score with @@ -85,19 +48,9 @@ _only_ affect staves. - I would like to be able to influence the sloping of xtuplet brackets -- for one of my test scores containing a modern edition of an early -17'th century composition I have a leading measure containing the -orginal clefs and note values of the original composition. I use the -a"harmonic" and "diamond" note head styles for that measure and would -like to have the stems of these notes _centered_ on the notehead as in -the mensural music notation. - - after the leading measure in the above mentioned score I want a double bar line fully drawn across the staves and after that keep to the ChoirStaff bar line types in the rest of the scores - -. * make all Feta (including dynamics) available to the user in - textual scripts. Examples: "D.S. al \coda", "\mf espress.". . * Write script that uses --find-old-relative to do auto relativization. @@ -118,7 +71,7 @@ ChoirStaff bar line types in the rest of the scores . * accidentals closer to note head -.* Beams +.* BEAMS . * [c8. c16 c16 c16] in 6/8 timesig. . * Rewrite Stem, Beam (hairy) . * beams over barlines diff --git a/VERSION b/VERSION index 392c87bcaa..5097f24666 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=16 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=17 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index 638a23de1f..58d5cf7c5a 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -13,7 +13,6 @@ 2nd fuga transposed subject -- 4 bar excerpt. We try to imitate the Griepenkerl/Keller edition which gives the best approximation to Bach's original layout - %} %{ Tested Features: @@ -70,18 +69,18 @@ praeludium_left = \notes \relative c { % 13 \context Staff < - \context VoiceTwo { r4 } - \context VoiceOne { \stemup s4 dis' cis cis ~ | + \context Voice = two { r4 } + \context Voice = one { \stemup s4 dis' cis cis ~ | [cis8 a d cis] [bis gis] cis4 | dis2 cis4 r8 cis } - \context VoiceOne { \stemup bis2 } - \context VoiceThree { \stemup \shifton r4 gis ~ [gis8 gis] ~ \stemdown \shiftoff gis4 | + \context Voice = one { \stemup bis2 } + \context Voice = three { \stemup \shifton r4 gis ~ [gis8 gis] ~ \stemdown \shiftoff gis4 | a4. fis8 gis4. a8 ~ | a4 gis4 gis r8 gis } % { \stemup \shifton s4 fis4 e} % a quick hack to avoid some collisons - \context VoiceFour { \stemdown \shifton s4 fis4 e} - \context VoiceTwo { \stemdown s4 dis4 cis4 } + \context Voice = four { \stemdown \shifton s4 fis4 e} + \context Voice = two { \stemdown s4 dis4 cis4 } > | %16 } @@ -113,7 +112,6 @@ fugaII_right = \notes \relative c'' { \context Voice = VB { \stemdown fis2 } > - % Wadieuw \context Staff \notes\relative c''< \context Voice=one { \property Voice.horizontalNoteShift=0 @@ -139,13 +137,13 @@ fugaII_right = \notes \relative c'' { %16 \context Staff < - \context VoiceOne { dis2 dis4 | + \context Voice = one { dis2 dis4 | cis2 cis4 | b4. [cis8 dis e] } - \context VoiceThree { \stemup \shifton [b8 fis] b2 ~ | + \context Voice = three { \stemup \shifton [b8 fis] b2 ~ | [b8 a!16 gis] a2 ~ | a4 gis2 } - \context VoiceTwo { \stemdown fis2. ~ | + \context Voice = two { \stemdown fis2. ~ | fis ~ | fis4 e2 } > | @@ -158,9 +156,9 @@ fugaII_left = \notes { %15 \context Staff < - \context VoiceTwo { \stemdown b2 \stemup ais4 | + \context Voice = two { \stemdown b2 \stemup ais4 | b2 b4 } - \context VoiceTwo { \stemdown s2 e4 | + \context Voice = two { \stemdown s2 e4 | fis2 fis4 } > \stemdown cis2 e4 | @@ -201,36 +199,7 @@ breakmusic = \notes { > \paper { - \translator { - \VoiceContext - \name "VoiceOne"; - verticalDirection = #1 - } - \translator { - \VoiceContext - \name "VoiceTwo"; - verticalDirection = #1 - } - \translator { - \VoiceContext - \name "VoiceThree"; - verticalDirection = #1 - horizontalNoteShift = #1 - } - \translator { - \VoiceContext - \name "VoiceFour"; - verticalDirection = #-1 - horizontalNoteShift = #1 - } - \translator { - \StaffContext - - \accepts VoiceFour; - \accepts VoiceThree; - \accepts VoiceTwo; - \accepts VoiceOne; - } + \translator { \OrchestralScoreContext } } diff --git a/input/test/collision-merge-dotted.fly b/input/test/collision-merge-dotted.fly new file mode 100644 index 0000000000..bbf4f4d9fc --- /dev/null +++ b/input/test/collision-merge-dotted.fly @@ -0,0 +1,11 @@ + +\relative c'' \context Staff < +\context Voice = one { + \property Staff.collisionMergeDotted = ##t + \stemup + [c8 f g a] +} +\context Voice = two { + \stemdown c,4. f8 + +}> diff --git a/input/test/stem-centered.ly b/input/test/stem-centered.ly new file mode 100644 index 0000000000..a78d48d6aa --- /dev/null +++ b/input/test/stem-centered.ly @@ -0,0 +1,9 @@ + +\score { +\notes { +\relative c'' { +\property Voice. stemCentered = ##t +\property Voice . noteHeadStyle = "harmonic" +c4 c4 c8 c8 } +} +} diff --git a/input/trip.ly b/input/trip.ly new file mode 100644 index 0000000000..dbc7cd9ac4 --- /dev/null +++ b/input/trip.ly @@ -0,0 +1,213 @@ +\header { + filename = "praeludium-fuga-E.ly"; + title = "praeludium and fuga in E-major"; + opus = "BWV 566"; + composer = "Johann Sebastian Bach (1685-1750)"; + enteredby = "JCN"; + copyright = "public domain"; +} +%{ + description + + Praeludium 3 bar excerpt, + 2nd fuga transposed subject -- 4 bar excerpt. + We try to imitate the Griepenkerl/Keller edition which + gives the best approximation to Bach's original layout +%} +%{ + Tested Features: + purpose of this file is testing: + * real-life collisions + * multi-voice input --- splitting? + * organ staff... +%} + +\version "1.3.4"; + + + +praeludium_commands = \notes { +} + +praeludiumRight = \notes { + \key e; + \clef violin; + + % 13 -- how to type -- where to split -- this more neatly? + \context Staff < + \context Voice = I \relative c'' { \stemup r4 dis4 e4. e8 ~ | + \shifton e4 [d8 fis8] \shiftoff gis4 ~ [gis8 fis16 e ] | + fis4 ~ [fis8 e16 dis] e4 r8 e8 } + \context Voice = III \relative c'' { \stemup \shifton r4 bis cis \shiftoff cis | + a' ~ [a16 gis a b] \shifton dis,4 cis ~ | + [cis8 dis16 ais] bis4 cis r8 b } + \context Voice = IV \relative c'' { + + %\stemup + %{ + this is a diversion from the Griepenkerl/Keller + edition; a hack to avoid collisions + %} + \stemdown + \shifton s4 gis } + + \context Voice = II \relative c' { \stemdown +% \shifton % idem + + r4 fis \shiftoff gis gis | + a4. cis8 gis2 | + fis4 gis gis r8 e8 } + > | + % 16 +} + +praeludiumLeft = \notes \relative c { + \key e; + \clef bass; + + % 13 + \context Staff < + \context Voice = two { r4 } + \context Voice = one { \stemup s4 dis' cis cis ~ | + [cis8 ( a \translator Staff = treble \stemdown \shifton d ) cis] + \translator Staff = bass + \shiftoff + [bis gis] cis4 | + dis2 cis4 r8 cis } + \context Voice = one { \stemup bis2 } + \context Voice = three { + \property Voice.dynamicDirection = \down + \stemup \shifton r4 gis ~ [gis8 \< gis] ~ \stemdown \shiftoff gis4 | + a4. fis8 \! gis4. a8 ~ | + a4 gis4 gis r8 gis } +% { \stemup \shifton s4 fis4 e} +% a quick hack to avoid some collisons + \context Voice = four { \stemdown \shifton s4 fis4 e} + \context Voice = two { \stemdown s4 dis4 cis4 } + > | + %16 +} + + + +fugaII_commands = \notes{ + \time3/4; +} + +fugaIIRight = \notes \relative c'' { + \key e; % E-major + \clef violin; + + %15 + \context Staff < + \context Voice = VA { \stemup [b8 fis8] b4 } + \context Voice = VB { \stemdown fis2 } + > + + \context Staff \notes\relative c''< + \context Voice=one { + \property Voice.horizontalNoteShift=0 + \property Voice.verticalDirection=1 + e4 + } + \context Voice=two { + \property Voice.verticalDirection=1 + \property Voice.horizontalNoteShift=1 + cis + } + \context Voice=three { + \property Voice.horizontalNoteShift=2 + \property Voice.verticalDirection=1 + ais + } + \context Voice=four { + \property Voice.verticalDirection=-1 + \property Voice.horizontalNoteShift=-1 + fis + } + > + + %16 + \context Staff < + \context Voice = one { dis2 dis4 | + cis2 cis4 | + b4. [cis8 dis e] } + \context Voice = three { \stemup \shifton [b8 fis] b2 ~ | + [b8 a!16 gis] a2 ~ | + a4 gis2 } + \context Voice = two { \stemdown fis2. ~ | + fis ~ | + fis4 e2 } + > | + %19 +} + +fugaIILeft = \notes { + \key e; + \clef bass; + + %15 + \context Staff < + \context Voice = one { \stemdown + \grace { [c16 ( cis dis] } + \relative b, < )b2 dis fis a b cis dis> \stemup ais4 | + b2 b4 } + \context Voice = two { \stemdown s2 e4 | + fis2 fis4 } + > + \stemdown cis2 e4 | + b4. b8 b4 | + %19 +} + +fugaIIPedal = \notes \relative c { + \key e; + \clef bass; + + %15 + dis4.-\ltoe e8-\rtoe cis4 | + b4.-\lheel [cis8-\ltoe dis8-\rtoe e8-\rheel] | + fis4.-\rtoe [e8-\rheel dis8-\rtoe cis8-\ltoe] | + dis4-\rtoe e4-\rheel e,4-\ltoe | + %19 +} + + + +% these should be two separate scores... +\score{ + \context Score \notes < + \context PianoStaff < + \context Staff = treble { + \property Score.midiInstrument = "church organ" + \praeludiumRight r1 \fugaIIRight } + \context Staff = bass { + \praeludiumLeft r1 \fugaIILeft } + > + \context Staff = pedal \relative c < + { + \time 4/4; + \key E; + \clef bass; + + %13 + r4 fis,4-\ltoe e4.-\lheel e'8-\rheel | + fis4.-\rtoe fis8-\rtoe fis4-\rtoe [e8-\ltoe a-\rtoe] | + dis,4-\ltoe gis-\rtoe [cis,8-\ltoe( b!-\lheel ais-\rtoe gis-\ltoe ~ ] | + %16 + \notes { gis8 r4. )c2 } + \time 3/4; + + \fugaIIPedal } + + > + > + + \paper { + + \translator { \OrchestralScoreContext } + } + + \midi { + \tempo 4 =96; } +} diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index e28939ca67..d2119562fe 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -28,11 +28,13 @@ Bar_number_engraver::do_process_requests () Timing_translator *time = dynamic_cast(tr); // todo include (&&!time->cadenza_b_ ) - if (!time->measure_position () && now_mom () > Moment (0)) + SCM bn = get_property("currentBarNumber",0); + + if (gh_number_p (bn) && + !time->measure_position () && now_mom () > Moment (0)) { create_items (0); - - text_p_->text_str_ = to_str (time->bars_i ()); + text_p_->text_str_ = to_str (gh_scm2int (bn)); } } diff --git a/lily/collision.cc b/lily/collision.cc index a6bf46e56c..edf04de23d 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -153,8 +153,11 @@ Collision::automatic_shift () bool merge = downpos == uppos - && nu_l->balltype_i () == nd_l->balltype_i () - && nu_l->dots_i () == nd_l->dots_i (); + && nu_l->balltype_i () == nd_l->balltype_i (); + + + if (!to_boolean (get_elt_property ("merge-differently-dotted"))) + merge = merge && nu_l->dot_count () == nd_l->dot_count (); /* notes are close, but can not be merged. Shift diff --git a/lily/dots.cc b/lily/dots.cc index ad62ecceda..93eda7287b 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -15,13 +15,14 @@ Dots::Dots () { - dots_i_ =0; + set_elt_property ("dot-count", gh_int2scm (0)); } void Dots::do_post_processing () { - if (!dots_i_) + SCM d= get_elt_property ("dot-count"); + if (!gh_number_p (d) || !gh_scm2int (d)) { set_elt_property ("transparent", SCM_BOOL_T); set_empty (X_AXIS); @@ -50,7 +51,9 @@ Dots::do_brew_molecule_p () const Real dw = d.dim_[X_AXIS].length (); d.translate_axis (-dw, X_AXIS); - for (int i=dots_i_; i--; ) + + + for (int i = gh_scm2int (get_elt_property ("dot-count")); i--; ) { d.translate_axis (2*dw,X_AXIS); out->add_molecule (d); diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index 7db6f94a56..990888c564 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -48,9 +48,6 @@ public: Axis axis () const; Real get_offset () const; void set_callback (Dim_cache_callback); - /** The #offset_# is defined with regard to this graphical_element/ - dimension_cache. */ - void set_offset_callback (Offset_cache_callback); Dimension_cache * parent_l_; Score_element *element_l () const { return elt_l_; } diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 4cb5843b9d..33c821a7b4 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -24,8 +24,6 @@ protected: virtual Molecule * do_brew_molecule_p () const; virtual void do_post_processing (); public: - // junkme. - int dots_i_; Dots (); }; diff --git a/lily/include/note-heads-engraver.hh b/lily/include/note-heads-engraver.hh index 9dcd26f469..9431618b19 100644 --- a/lily/include/note-heads-engraver.hh +++ b/lily/include/note-heads-engraver.hh @@ -17,8 +17,7 @@ class Note_heads_engraver : public Engraver { Link_array note_p_arr_; Link_array dot_p_arr_; Link_array note_req_l_arr_; - PQueue notes_end_pq_; - + Moment note_end_mom_; public: VIRTUAL_COPY_CONS(Translator); Note_heads_engraver(); @@ -27,7 +26,6 @@ protected: virtual bool do_try_music (Music *req_l) ; virtual void do_process_requests(); virtual void do_pre_move_processing(); - virtual void do_post_move_processing(); }; diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index 9013c0eb42..d16d03391c 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -19,9 +19,9 @@ public: int balltype_i () const; void add_dots (Dots *); - Stem * stem_l ()const; - Dots * dots_l ()const; - int dots_i ()const; + Stem * stem_l () const; + Dots * dots_l () const; + int dot_count () const; protected: virtual void do_post_processing (); }; diff --git a/lily/include/stem.hh b/lily/include/stem.hh index e1b330e200..41a8a78fe6 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -62,7 +62,6 @@ public: /// ensure that this Stem also encompasses the Notehead #n# void add_head (Rhythmic_head*n); - Real hpos_f () const; Stem_info calc_stem_info () const; Real chord_start_f () const; @@ -86,8 +85,7 @@ protected: Real stem_end_position () const; - // todo: cleanup, naming - Real note_delta_f () const; + static Real off_callback (Dimension_cache const*); protected: Molecule flag () const; diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 5c11973c2e..84ca4d0528 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -22,6 +22,7 @@ public: Time_signature_change_req * time_signature_req_l () const; Timing_translator (); Link_array timing_req_l_arr_; + protected: virtual void do_creation_processing (); virtual bool do_try_music (Music *req_l); @@ -30,8 +31,6 @@ protected: virtual void do_post_move_processing(); public: - /// JUNKME - int bars_i () const; Moment measure_position () const; Moment measure_length () const; diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 9f8f34fd2a..e602943161 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -86,7 +86,8 @@ Multi_measure_rest_engraver::do_process_requests () mmrest_p_->set_elt_property ("alt-symbol", ly_str02scm ("scripts-repeatsign")); announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_)); - start_measure_i_ = time->bars_i (); + start_measure_i_ + = gh_int2scm (time->get_property ("currentBarNumber", 0)); } } @@ -125,7 +126,8 @@ Multi_measure_rest_engraver::do_post_move_processing () if (mmrest_p_ && !time->measure_position ()) { lastrest_p_ = mmrest_p_; - lastrest_p_->measures_i_ = time->bars_i () - start_measure_i_; + lastrest_p_->measures_i_ + = gh_int2scm (time->get_property ("currentBarNumber", 0)) - start_measure_i_; mmrest_p_ = 0; } diff --git a/lily/music.cc b/lily/music.cc index 8d75a36420..10462173df 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -39,10 +39,7 @@ Music::print() const if (! flower_dstream) return ; DEBUG_OUT << classname(this) << "{"; - /* - if (translator_type_str_.length_i ()) - DEBUG_OUT << translator_type_str_ << " = " << translator_id_str_; - */ + do_print(); DEBUG_OUT << "}\n"; #endif diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index ce6c46dcf5..0eadf768e4 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -22,7 +22,7 @@ Note_heads_engraver::do_try_music (Music *m) if (Note_req * n =dynamic_cast (m)) { note_req_l_arr_.push (n); - notes_end_pq_.insert (now_mom () + m->length_mom ()); + note_end_mom_ = note_end_mom_ >? now_mom () + m->length_mom (); return true; } @@ -40,7 +40,7 @@ Note_heads_engraver::do_try_music (Music *m) } else if (Busy_playing_req * p = dynamic_cast (m)) { - return notes_end_pq_.size (); + return now_mom () < note_end_mom_; } else if (Pitch_interrogate_req *p = dynamic_cast (m)) { @@ -80,7 +80,7 @@ Note_heads_engraver::do_process_requests() sd.set_interface (); note_p->add_dots (d); - d->dots_i_ = note_req_l->duration_.dots_i_; + d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_)); announce_element (Score_element_info (d,0)); dot_p_arr_.push (d); } @@ -118,13 +118,6 @@ Note_heads_engraver::do_pre_move_processing() note_req_l_arr_.clear (); } -void -Note_heads_engraver::do_post_move_processing() -{ - Moment n (now_mom ()); - while (notes_end_pq_.size () && notes_end_pq_.front () <=n) - notes_end_pq_.get (); -} diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index b389d92ee5..cdea34d4b2 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -56,7 +56,7 @@ Repeat_engraver::queue_events () Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom (); SCM novolta = get_property ("noVoltaBraces",0); - bool create_volta = gh_boolean_p (novolta) && !gh_scm2bool (novolta); + bool create_volta = !to_boolean (novolta); Cons_list becel; becel.append (new Bar_create_event (now_mom (), "|:")); @@ -104,15 +104,15 @@ Repeat_engraver::queue_events () volta_number ++; SCM l (get_property ("voltaSpannerDuration", 0)); if (SMOB_IS_TYPE_B (Moment, l)) - { - Moment vSD_mom = *SMOB_TO_TYPE (Moment,l); - if ( vSD_mom < i->car_->length_mom() ) // terminate volta early ? - { - vSD_mom += walk_mom; - c->last_b_ = true; - becel.append (new Bar_create_event (vSD_mom, "stop")); - } - } + { + Moment vSD_mom = *SMOB_TO_TYPE (Moment,l); + if ( vSD_mom < i->car_->length_mom() ) // terminate volta early ? + { + vSD_mom += walk_mom; + c->last_b_ = true; + becel.append (new Bar_create_event (vSD_mom, "stop")); + } + } } walk_mom += i->car_->length_mom(); diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index 368f6fdae2..90e63d79c6 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -61,7 +61,8 @@ Rest_engraver::do_process_requests () si.set_interface (); rest_p_->add_dots (dot_p_); - dot_p_->dots_i_ = rest_req_l_->duration_.dots_i_; + dot_p_->set_elt_property ("dot-count", + gh_int2scm (rest_req_l_->duration_.dots_i_)); announce_element (Score_element_info (dot_p_,0)); } diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 9e354bde2f..72807c77cc 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -42,9 +42,10 @@ Rhythmic_head::stem_l () const } int -Rhythmic_head::dots_i () const +Rhythmic_head::dot_count () const { - return dots_l () ? dots_l ()->dots_i_ : 0; + return dots_l () + ? gh_scm2int (dots_l ()->get_elt_property ("dot-count")) : 0; } void diff --git a/lily/score-element.cc b/lily/score-element.cc index 870c280398..f2c462f91a 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -172,8 +172,7 @@ Score_element::print() const { #ifndef NPRINT DEBUG_OUT << classname(this) << "{\n"; - - + if (flower_dstream && !flower_dstream->silent_b ("Score_element")) ly_display_scm (element_property_alist_); diff --git a/lily/slur.cc b/lily/slur.cc index 9b965fa522..e5be36ae52 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -134,6 +134,13 @@ Slur::do_post_processing () Link_array encompass_arr = Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + if (!encompass_arr.size ()) + { + set_elt_property ("transparent", SCM_BOOL_T); + set_empty (X_AXIS); + set_empty (Y_AXIS); + return; + } if (!directional_element (this).get ()) directional_element (this).set (get_default_dir ()); diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index db15d09e4b..1ca152c275 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -113,9 +113,9 @@ Stem_tremolo::do_brew_molecule_p () const uhg. Should use relative coords and placement */ Real whole_note_correction = (st && st->invisible_b( )) - ? -st->get_direction () * st->note_delta_f ()/2 + ? 0.0 // -st->get_direction () * st->note_delta_f ()/2 : 0.0; - + dy += st->stem_end_position (); beams->translate (Offset(st->hpos_f () - hpos_f ()+ whole_note_correction, dy)); diff --git a/lily/stem.cc b/lily/stem.cc index 9b315ca6d7..7c721c203d 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -215,6 +215,8 @@ Stem::Stem () { set_elt_property ("heads", SCM_EOL); set_elt_property ("rests", SCM_EOL); + + dim_cache_[X_AXIS]->off_callbacks_.push ( &Stem::off_callback); } bool @@ -274,6 +276,8 @@ Stem::get_default_stem_end_position () const scm_to_array (s, &a); // stem uses half-spaces + + // fixme: use gh_list_ref () iso. array[] Real shorten_f = a[((flag_i () - 2) >? 0) flag ().dim_.x (); - r += s->note_delta_f (); } return r; } @@ -475,36 +478,29 @@ Stem::do_brew_molecule_p () const mol_p->add_molecule (fl); } - if (first_head ()) - { - mol_p->translate_axis (note_delta_f (), X_AXIS); - } return mol_p; } Real -Stem::note_delta_f () const +Stem::off_callback (Dimension_cache const * c) { + Stem * st = dynamic_cast (c->element_l ()); + Real r=0; - if (first_head ()) + if (Note_head * f = st->first_head ()) { - Interval head_wid(0, first_head()->extent (X_AXIS).length ()); - Real rule_thick = paper_l ()->get_var ("stemthickness"); + Interval head_wid(0, f->extent (X_AXIS).length ()); - Interval stem_wid(-rule_thick/2, rule_thick/2); - if (get_direction () == CENTER) - r = head_wid.center (); - else - r = head_wid[get_direction ()] - stem_wid[get_direction ()]; + if (to_boolean (st->get_elt_property ("stem-centered"))) + return head_wid.center (); + + Real rule_thick = st->paper_l ()->get_var ("stemthickness"); + Direction d = st->get_direction (); + r = head_wid[d] - d * rule_thick ; } return r; } -Real -Stem::hpos_f () const -{ - return note_delta_f () + Item::hpos_f (); -} Beam* diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index d54a1903f9..8caa3eef77 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -239,8 +239,3 @@ Timing_translator::do_post_move_processing() tr->set_property ("currentBarNumber", gh_int2scm (b)); } -int -Timing_translator::bars_i () const -{ - return gh_scm2int (get_property ("currentBarNumber", 0)); -} diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 2aed1b9570..5acbc039a0 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -39,9 +39,8 @@ Volta_spanner::do_brew_molecule_p () const if (!bar_arr.size ()) return mol_p; - Link_array note_column_arr - = Group_interface__extract_elements (this, (Bar*)0, "note-columns"); - + Link_array note_column_arr + = Group_interface__extract_elements (this, (Score_element*)0, "note-columns"); bool no_vertical_start = false; bool no_vertical_end = last_b_; diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index d1d72eb40c..5af3b0ba8f 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.16 -Entered-date: 22DEC99 +Version: 1.3.17 +Entered-date: 24DEC99 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.16.tar.gz + 1000k lilypond-1.3.17.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.16.tar.gz + 1000k lilypond-1.3.17.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index b8a952b8fb..7a3311f3c1 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.16 +Version: 1.3.17 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.16.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.17.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # get Packager from (undocumented?) ~/.rpmmacros! diff --git a/scm/generic-property.scm b/scm/generic-property.scm index decc1ad6df..9e47ccbf30 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -19,7 +19,8 @@ (list 'stemVerticalDirection dir? 'direction) (list 'verticalDirection dir? 'direction) (list 'stemLength number? 'length) - (list 'stemStyle string? 'style) + (list 'flagStyle string? 'flag-style) + (list 'stemCentered boolean? 'stem-centered) (list 'noStemExtend boolean? 'no-stem-extend) (list 'stemShorten number? 'shorten) )) @@ -106,6 +107,14 @@ (list 'forceHorizontalShift number? 'force-hshift) ))) +(define generic-collision-properties + (cons "Collision" + (list + (list 'collisionMergeDotted boolean? 'merge-differently-dotted) + ) + ) + ) + (define generic-slur-properties (cons "Slur" (list @@ -139,6 +148,7 @@ generic-bar-properties generic-timesig-properties generic-clef-properties + generic-collision-properties generic-All-properties ) ) @@ -148,11 +158,9 @@ generic-bar-properties )) - (define generic-thread-properties (list generic-All-properties generic-dot-properties - ) ) diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index 57d3324966..7328a1b9b7 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -396,6 +396,15 @@ if 1: conversions.append ((1,3,5), conv, 'beamAuto moment properties') +if 1: + def conv (str): + str = re.sub ('stemStyle', + 'flagStyle', + str) + return str + + conversions.append ((1,3,17), conv, 'stemStyle -> flagStyle') + ############################ -- 2.39.5