From c1b378edc5bd3fa8df8c5b4abeaaefe4f2771d75 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 28 Nov 2000 19:51:40 +0100 Subject: [PATCH] release: 1.3.112 ============ * Allow two consecutive glissandi. * Note_head_line_engraver now also listenes to \property "followThread": Automagically connect note-heads when thread switches staff. * Fixed american-chords example (except for o/, that waits for kerning fix). * Added simple glissando line. * Bugfix: broken [crescendo] text spanner. * Bugfix: chord tremolos * Bugfix: staff group brace * Bugfix: volta repeats * Resurrected clef _8 and ^8 syntax. (This should be deprecated?) 1.3. --- CHANGES | 18 +++-- NEWS | 3 +- VERSION | 4 +- buildscripts/clean-fonts.sh | 2 +- input/test/broken-thread-line.ly | 23 ++++++ input/test/clef-8-syntax.ly | 9 +++ input/test/follow-thread.ly | 11 ++- lily/chord-tremolo-engraver.cc | 2 +- lily/clef-engraver.cc | 2 +- lily/clef-item.cc | 6 +- lily/grob.cc | 2 +- lily/include/music-iterator-ctor.hh | 0 lily/line-spanner.cc | 69 +++++++++++------ lily/lyric-phrasing-engraver.cc | 14 ++++ lily/note-head-line-engraver.cc | 4 +- lily/property-engraver.cc | 2 +- lily/volta-engraver.cc | 87 ++++++++++----------- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- scm/backend-property.scm | 6 +- scm/element-descriptions.scm | 5 +- scm/interface.scm | 46 ++++-------- scm/lily.scm | 62 +++++++++------ scm/translator-properties.scm | 1 + scripts/convert-ly.py | 112 ++++++++++++++-------------- 25 files changed, 288 insertions(+), 214 deletions(-) create mode 100644 input/test/broken-thread-line.ly create mode 100644 input/test/clef-8-syntax.ly delete mode 100644 lily/include/music-iterator-ctor.hh diff --git a/CHANGES b/CHANGES index 30feb218f5..86235a9b6f 100644 --- a/CHANGES +++ b/CHANGES @@ -3,24 +3,26 @@ * Allow two consecutive glissandi. -1.3.111.jcn2 -============ - * Note_head_line_engraver now also listenes to \property "followThread": Automagically connect note-heads when thread switches staff. * Fixed american-chords example (except for o/, that waits for kerning fix). -1.3.111.jcn1 -============ - * Added simple glissando line. * Bugfix: broken [crescendo] text spanner. -1.3.110.hwn1 -============ +* Bugfix: chord tremolos + +* Bugfix: staff group brace + +* Bugfix: volta repeats + +* Resurrected clef _8 and ^8 syntax. (This should be deprecated?) + +1.3.111 +======= * Fixed non-empty-text feature. diff --git a/NEWS b/NEWS index fd86eddfd9..6b2f2ea032 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + * Finale (.etf), PMX (.pmx) and musedata import tools. * Point and click functionality using emacs and Xdvi. @@ -19,7 +20,7 @@ internals: LilyPond is smaller, cleaner, more flexible, etc. * Medieval notation features: clefs, custodes -* Piano pedal support, Arpeggios, Custodes +* Piano pedal support, Arpeggios, Glissandi * MIDI: dynamics, tempo changes diff --git a/VERSION b/VERSION index 7fb405ec5d..bc5b6b1d0c 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=111 -MY_PATCH_LEVEL=jcn3 +PATCH_LEVEL=112 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/clean-fonts.sh b/buildscripts/clean-fonts.sh index 09ad8f13c6..18e070ca0f 100755 --- a/buildscripts/clean-fonts.sh +++ b/buildscripts/clean-fonts.sh @@ -22,7 +22,7 @@ fi if [ -d /var/texfonts ]; then TEXDIRS="$TEXDIRS /var/texfonts" fi -if [ -z $TEXDIR ]; then +if [ -z "$TEXDIR" ]; then TEXDIRS=". /var" else TEXDIRS=". $TEXDIRS" diff --git a/input/test/broken-thread-line.ly b/input/test/broken-thread-line.ly new file mode 100644 index 0000000000..6c765fe44b --- /dev/null +++ b/input/test/broken-thread-line.ly @@ -0,0 +1,23 @@ + + +% followThread: connect note heads with line when thread switches staff + +\score{ + \context PianoStaff < + \context Staff=one \notes\relative c''{ + \context Thread + a1 \break + \translator Staff=two + a, + + } + \context Staff=two { \clef bass; \skip 1*2; } + > + \paper{ + linewidth = 70.\mm; + \translator { + \ScoreContext + followThread = ##t + } + } +} diff --git a/input/test/clef-8-syntax.ly b/input/test/clef-8-syntax.ly new file mode 100644 index 0000000000..9cf891a06f --- /dev/null +++ b/input/test/clef-8-syntax.ly @@ -0,0 +1,9 @@ +\score { + \context Voice \notes\relative c { +\clef "bass_8"; c4 + } + \paper { + linewidth=-1.0; + } + \midi { } +} diff --git a/input/test/follow-thread.ly b/input/test/follow-thread.ly index 83b952b769..d0df4d3873 100644 --- a/input/test/follow-thread.ly +++ b/input/test/follow-thread.ly @@ -1,14 +1,19 @@ % followThread: connect note heads with line when thread switches staff \score{ - < + \context PianoStaff < \context Staff=one \notes\relative c''{ \context Thread a \translator Staff=two - a,, a + a, + +% smaller = easier to debug. +%{ a \translator Staff=one a'' +%} + s2 } \context Staff=two { \clef bass; \skip 1; } > @@ -19,4 +24,4 @@ followThread = ##t } } -} \ No newline at end of file +} diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index b7d8502328..496baacbd0 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -80,7 +80,7 @@ Chord_tremolo_engraver::try_music (Music * m) && rp->get_mus_property ("iterator-ctor") == Chord_tremolo_iterator::constructor_cxx_function && !repeat_) { - Moment l = rp->body_length_mom (); + Moment l = rp->length_mom (); repeat_ = rp; start_mom_ = now_mom (); stop_mom_ = start_mom_ + l; diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 06758d2629..c3a2136f2a 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -96,7 +96,7 @@ Clef_engraver::set_central_c (SCM glyph,SCM clefpos, SCM octavation) void Clef_engraver::set_glyph () { - SCM glyph_sym = ly_symbol2scm ("glyph"); + SCM glyph_sym = ly_symbol2scm ("glyph-name"); SCM glyph = get_property ("clefGlyph"); SCM basic = ly_symbol2scm ("Clef"); diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 0481d0b74b..1cdc84a57a 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -22,7 +22,7 @@ Clef::before_line_breaking (SCM smob) { Item * s = dynamic_cast (unsmob_grob (smob)); - SCM glyph = s->get_grob_property ("glyph"); + SCM glyph = s->get_grob_property ("glyph-name"); if (gh_string_p (glyph)) { @@ -33,7 +33,7 @@ Clef::before_line_breaking (SCM smob) to_boolean (s->get_grob_property ("full-size-change"))) { str += "_change"; - s->set_grob_property ("glyph", ly_str02scm (str.ch_C())); + s->set_grob_property ("glyph-name", ly_str02scm (str.ch_C())); } } else @@ -63,7 +63,7 @@ SCM Clef::brew_molecule (SCM smob) { Grob * sc = unsmob_grob (smob); - SCM glyph = sc->get_grob_property ("glyph"); + SCM glyph = sc->get_grob_property ("glyph-name"); if (gh_string_p (glyph)) { return Font_interface::get_default_font (sc)->find_by_name (String (ly_scm2string (glyph))).smobbed_copy (); diff --git a/lily/grob.cc b/lily/grob.cc index 3cf09fcc4a..fdfb97c069 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -77,7 +77,7 @@ Grob::Grob(SCM basicprops) /* Should change default to be empty? */ - if (!gh_procedure_p (cb) && !gh_pair_p (cb)) + if (cb != SCM_BOOL_F && !gh_procedure_p (cb) && !gh_pair_p (cb)) cb = molecule_extent_proc; dim_cache_[a].dimension_ = cb; diff --git a/lily/include/music-iterator-ctor.hh b/lily/include/music-iterator-ctor.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 908680295d..bece984882 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -63,6 +63,16 @@ Line_spanner::line_atom (Grob* me, Real dx, Real dy) } + +/* + Warning: this thing is a cross-staff object, so it should have empty Y-dimensions. + + (If not, you risk that this is called from the staff-alignment + routine, via molecule_extent. At this point, the staffs aren't + separated yet, so it doesn't work cross-staff. + +*/ + MAKE_SCHEME_CALLBACK (Line_spanner, brew_molecule, 1); SCM Line_spanner::brew_molecule (SCM smob) @@ -71,44 +81,55 @@ Line_spanner::brew_molecule (SCM smob) Spanner *spanner = dynamic_cast (me); Grob *common[] = { 0, 0 }; - common[X_AXIS] = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); - common[Y_AXIS] = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), Y_AXIS); - if (!common[X_AXIS] || !common[Y_AXIS]) + Item *l = spanner->get_bound (LEFT); + Item *r = spanner->get_bound (RIGHT); + + /* + FIXME: should also do something sensible across line breaks. + */ + if (l->break_status_dir () || r->break_status_dir ()) return SCM_EOL; - Real dx = - spanner->get_bound (LEFT)->relative_coordinate (common[X_AXIS], X_AXIS) - - spanner->get_bound (RIGHT)->relative_coordinate (common[X_AXIS], X_AXIS) - + spanner->get_bound (RIGHT)->extent (spanner->get_bound (RIGHT), - X_AXIS)[LEFT] - - spanner->get_bound (LEFT)->extent (spanner->get_bound (LEFT), - X_AXIS)[RIGHT]; + for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1)) + { + common[a] = l->common_refpoint (r, a); - Real dy = - spanner->get_bound (LEFT)->relative_coordinate (common[Y_AXIS], Y_AXIS) - - spanner->get_bound (RIGHT)->relative_coordinate (common[Y_AXIS], Y_AXIS) - + spanner->get_bound (RIGHT)->extent (spanner->get_bound (RIGHT), - Y_AXIS).center () - - spanner->get_bound (LEFT)->extent (spanner->get_bound (LEFT), - Y_AXIS).center (); + if (!common[a]) + return SCM_EOL; + } + + Offset dxy ; + for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1)) + { + dxy[a] = r->extent (common[a], a)[LEFT] - + l->extent (common[a], a)[RIGHT]; + } Molecule line; Real gap = gh_scm2double (me->get_grob_property ("gap")); - Offset o (dx, dy); - o *= (o.length () - 2 * gap) / o.length (); + + Offset my_off(me->relative_coordinate (common[X_AXIS], X_AXIS), + me->relative_coordinate (common[Y_AXIS], Y_AXIS) ); + + Offset his_off(l->relative_coordinate (common[X_AXIS], X_AXIS), + l->relative_coordinate (common[Y_AXIS], Y_AXIS) ); + + dxy *= (dxy.length () - 2 * gap) / dxy.length (); - SCM list = Line_spanner::line_atom (me, o[X_AXIS], o[Y_AXIS]); + SCM list = Line_spanner::line_atom (me, dxy[X_AXIS], dxy[Y_AXIS]); if (list == SCM_EOL) return SCM_EOL; - Box b (Interval (0, o[X_AXIS]), Interval (0, o[Y_AXIS])); + Box b (Interval (0, dxy[X_AXIS]), Interval (0, dxy[Y_AXIS])); line = Molecule (b, list); - line.translate_axis (spanner->get_bound (LEFT)->extent (spanner->get_bound (LEFT), X_AXIS).length (), X_AXIS); - Offset g = o * (gap / o.length ()); - line.translate (g); + line.translate_axis (l->extent (l, X_AXIS).length (), X_AXIS); + + + Offset g = dxy * (gap / dxy.length ()); + line.translate (g - my_off + his_off); return line.smobbed_copy (); } diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 045d86ead8..a931d3508f 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -23,6 +23,20 @@ ADD_THIS_TRANSLATOR (Lyric_phrasing_engraver); backend. Fixme. */ +/* + TODO: + + shared lyrics should be vertically centered: + + + +> About lyrics, it happens that there are common words for many bars, like +> for a refrain say. When there is an even number of lyrics lines, I do not +> know how to force the positioning of the common lyric line in the plain +> middle of the others, because this is in between lines. Not a big matter, +> but it would be a bit nicer if this was doable. + + */ /* We find start and end of phrases, and align lyrics accordingly. diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index ae21145eca..57e62f5e6d 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -94,8 +94,8 @@ Note_head_line_engraver::create_grobs () { /* type Glissando? */ line_ = new Spanner (get_property ("NoteHeadLine")); - line_->set_bound (LEFT, head_); - line_->set_bound (RIGHT, last_head_); + line_->set_bound (RIGHT, head_); + line_->set_bound (LEFT, last_head_); line_->set_parent (head_, X_AXIS); line_->set_parent (head_, Y_AXIS); diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index e327679c01..d8f5836835 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -126,7 +126,7 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin) SCM name = e->get_grob_property ("meta"); name = scm_assoc (ly_symbol2scm ("name"), name); scm_display (gh_cdr(name), errport); - scm_puts(" \\push #'",errport); + scm_puts(" \\override #'",errport); scm_write (elt_prop_sym,errport); scm_puts ( " = #",errport); scm_write (val, scm_current_error_port ()); diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 6396ab4275..a4d1af1512 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -26,48 +26,35 @@ public: VIRTUAL_COPY_CONS(Translator); protected: - virtual void start_translation_timestep (); virtual void acknowledge_grob (Grob_info); virtual void finalize (); virtual void stop_translation_timestep (); - void deprecated_process_music (); + virtual void process_music (); virtual void create_grobs (); Moment started_mom_; Spanner *volta_span_p_; Spanner *end_volta_span_p_; - bool first_b_; + SCM start_str_; }; ADD_THIS_TRANSLATOR(Volta_engraver); Volta_engraver::Volta_engraver () { - first_b_ = true; volta_span_p_ = 0; end_volta_span_p_ = 0; } + void -Volta_engraver::create_grobs () -{ - if (first_b_) - { - deprecated_process_music (); - first_b_ = false; - } -} - -void -Volta_engraver::deprecated_process_music () +Volta_engraver::process_music () { - if (volta_span_p_) - return; SCM cs = get_property ("repeatCommands"); - SCM str = SCM_EOL; - bool end = false; + bool end = false; + start_str_ = SCM_EOL; while (gh_pair_p (cs)) { SCM c = gh_car (cs); @@ -77,23 +64,29 @@ Volta_engraver::deprecated_process_music () if (gh_cadr (c) == SCM_BOOL_F) end = true; else - str = gh_cadr (c); + start_str_ = gh_cadr (c); } cs = gh_cdr (cs); } - SCM l (get_property ("voltaSpannerDuration")); - Moment now = now_mom (); + if (volta_span_p_) + { + SCM l (get_property ("voltaSpannerDuration")); + Moment now = now_mom (); - bool early_stop = volta_span_p_ && unsmob_moment (l) - &&*unsmob_moment (l) <= now - started_mom_; + bool early_stop = unsmob_moment (l) + && *unsmob_moment (l) <= now - started_mom_; + + end = end || early_stop; + } + if (end && !volta_span_p_) { warning (_("No volta spanner to end")); // fixme: be more verbose. } - else if (end || early_stop) + else if (end) { end_volta_span_p_ = volta_span_p_; volta_span_p_ =0; @@ -102,33 +95,39 @@ Volta_engraver::deprecated_process_music () maybe do typeset_grob () directly? */ - if (!gh_string_p (str)) + if (!gh_string_p (start_str_)) end_volta_span_p_->set_grob_property ("last-volta", SCM_BOOL_T); } - if (gh_string_p (str)) + if (gh_string_p (start_str_) && volta_span_p_) { - started_mom_ = now; - if (volta_span_p_) + warning (_ ("Already have a volta spanner. Stopping that one prematurely.")); + + if (end_volta_span_p_) { - warning (_ ("Already have a volta spanner. Stopping that one prematurely.")); - - if (end_volta_span_p_) - { - warning (_("Also have a stopped spanner. Giving up.")); - - return ; + warning (_("Also have a stopped spanner. Giving up.")); + return ; + } - } + end_volta_span_p_ = volta_span_p_; + volta_span_p_ = 0; + } +} - end_volta_span_p_ = volta_span_p_; - volta_span_p_ = 0; - } +/* + this could just as well be done in process_music (), but what the hack. + */ +void +Volta_engraver::create_grobs () +{ + if (!volta_span_p_ && gh_string_p (start_str_)) + { + started_mom_ = now_mom () ; volta_span_p_ = new Spanner (get_property ("VoltaBracket")); Volta_spanner::set_interface (volta_span_p_); announce_grob (volta_span_p_,0); - volta_span_p_->set_grob_property ("text", str); + volta_span_p_->set_grob_property ("text", start_str_); } } @@ -167,11 +166,7 @@ Volta_engraver::finalize () } } -void -Volta_engraver::start_translation_timestep () -{ - first_b_ = true; -} + void Volta_engraver::stop_translation_timestep () diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 2bff20dda8..56ec2fd2ac 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.111 -Entered-date: 26NOV00 +Version: 1.3.112 +Entered-date: 28NOV00 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.111.tar.gz + 1000k lilypond-1.3.112.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.111.tar.gz + 1000k lilypond-1.3.112.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index ba37d19ddb..f590cc7453 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.3.111 +Version: 1.3.112 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.111.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.112.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/scm/backend-property.scm b/scm/backend-property.scm index 97a7e0fb70..a42cee3427 100644 --- a/scm/backend-property.scm +++ b/scm/backend-property.scm @@ -141,10 +141,8 @@ is used by @ref{note-collision-interface}") (elt-property-description 'fraction number-pair? "") (elt-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.") -(elt-property-description 'glyph symbol? "a string determining what style of glyph is typeset. Valid choices depend on the function that is reading this property. ") -(elt-property-description 'glyph string? "what kind barline? A concatenation of |, : and .") -(elt-property-description 'glyph string? "a string determining what glyph is typeset") - +(elt-property-description 'glyph symbol? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. ") +(elt-property-description 'glyph-name string? "a name of character within font") (elt-property-description 'grow-direction dir? "crescendo or decrescendo?") (elt-property-description 'hair-thickness number? "thickness, measured in stafflinethickness") diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 98a6a4450c..5ab89e84df 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -4,6 +4,7 @@ (define all-element-descriptions `((Arpeggio . ( (X-extent-callback . ,Arpeggio::width_callback) + (Y-extent-callback . #f) (molecule-callback . ,Arpeggio::brew_molecule) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (X-offset-callbacks . (,Side_position::aligned_side)) @@ -289,6 +290,8 @@ (NoteHeadLine . ( (type . line) (gap . 0.5) + (X-extent-callback . #f) + (Y-extent-callback . #f) (molecule-callback . ,Line_spanner::brew_molecule) (meta . ,(element-description "NoteHeadLine" line-spanner-interface)) @@ -364,7 +367,6 @@ (meta . ,(element-description "SpacingSpanner" spacing-spanner-interface)) )) (SpanBar . ( - (break-align-symbol . Staff_bar) (barsize-procedure . ,Span_bar::get_bar_size) (molecule-callback . ,Bar::brew_molecule) @@ -462,6 +464,7 @@ (meta . ,(element-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface)) )) + ; should split in 3 (SystemStartDelimiter . ( (molecule-callback . ,System_start_delimiter::brew_molecule) (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking) diff --git a/scm/interface.scm b/scm/interface.scm index e7f091e4c6..f8e19e52ce 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -475,8 +475,10 @@ font-point-size font-relative-size) (define line-spanner-interface (lily-interface 'line-spanner-interface - "generic line spanner" - '( + "Generic line drawn between two objects, eg. for use with glissandi. +gap is relative to the total length of the line. " + + '(gap dash-period dash-length line-thickness @@ -490,14 +492,9 @@ font-point-size font-relative-size) "A centred hyphen is a simple line between lyrics used to divide syllables. The length of the hyphen line should stretch based on the size of the gap between syllables." - '( - - thickness - height - minimum-length - word-space - ))) + '( thickness height minimum-length word-space ) + )) (define key-signature-interface (lily-interface @@ -546,32 +543,21 @@ numbers, fields from font-interface may be used. padding is the space between number and rest. Measured in staffspace. " - '( - - columns - expand-limit - minimum-width - padding - ))) + '( columns expand-limit minimum-width padding ) + + )) (define paper-column-interface (lily-interface 'paper-column-interface "" - '( - column-space-strength - before-musical-spacing-factor - stem-spacing-correction - before-grace-spacing-factor - when - bounded-by-me - dir-list - shortest-playing-duration - shortest-starter-duration - contains-grace - extra-space - stretch-distance - ))) + + '(column-space-strength before-musical-spacing-factor +stem-spacing-correction before-grace-spacing-factor when bounded-by-me +dir-list shortest-playing-duration shortest-starter-duration +contains-grace extra-space stretch-distance )) + + ) (define spaceable-element-interface (lily-interface diff --git a/scm/lily.scm b/scm/lily.scm index 3079ac70a0..5036a2af4c 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -785,8 +785,8 @@ ("french" . ("clefs-G" -4 0)) ("soprano" . ("clefs-C" -4 0)) ("mezzosoprano" . ("clefs-C" -2 0)) - ("alto" . ("clefs-C" 0 0)) - ("tenor" . ("clefs-C" 2 0)) + ("alto" . ("clefs-C" 0 0)) + ("tenor" . ("clefs-C" 2 0)) ("baritone" . ("clefs-C" 4 0)) ("varbaritone" . ("clefs-F" 0 0)) ("bass" . ("clefs-F" 2 0)) @@ -828,21 +828,36 @@ ) (define (clef-name-to-properties cl) - (let ((e (assoc cl supported-clefs)) + (let ((e '()) + (oct 0) + (l (string-length cl)) ) + + ;; ugh. cleanme + (if (equal? "8" (substring cl (- l 1) l)) + (begin + (if (equal? "^" (substring cl (- l 2) (- l 1))) + (set! oct 7) + (set! oct -7)) + + (set! cl (substring cl 0 (- l 2))))) + + + (set! e (assoc cl supported-clefs)) (if (pair? e) `(((symbol . clefGlyph) - (type . ,Property_iterator::constructor) + (iterator-ctor . ,Property_iterator::constructor) (value . ,(cadr e)) ) ((symbol . clefPosition) - (type . ,Property_iterator::constructor) + (iterator-ctor . ,Property_iterator::constructor) (value . ,(caddr e)) ) - ((symbol . clefOctavation) - (type . ,Property_iterator::constructor) - (value . ,(caddr (cdr e))) - ) + ,(if (not (equal? oct 0)) + `((symbol . clefOctavation) + (iterator-ctor . ,Property_iterator::constructor) + (value . ,oct) + )) ) (begin (ly-warn (string-append "Unknown clef type `" cl "'\nSee scm/lily.scm for supported clefs")) @@ -864,7 +879,7 @@ (length . ,Repeated_music::folded_music_length) )) ("tremolo" . ((iterator-ctor . ,Chord_tremolo_iterator::constructor) - (length . ,Repeated_music::volta_music_length) + (length . ,Repeated_music::unfolded_music_length) )) )) @@ -882,16 +897,17 @@ )) -(begin - (eval-string (ly-gulp-file "backend-property.scm")) - (eval-string (ly-gulp-file "translator-properties.scm")) - (eval-string (ly-gulp-file "interface.scm")) - (eval-string (ly-gulp-file "beam.scm")) - (eval-string (ly-gulp-file "slur.scm")) - (eval-string (ly-gulp-file "font.scm")) - (eval-string (ly-gulp-file "auto-beam.scm")) - (eval-string (ly-gulp-file "generic-property.scm")) - (eval-string (ly-gulp-file "basic-properties.scm")) - (eval-string (ly-gulp-file "chord-name.scm")) - (eval-string (ly-gulp-file "element-descriptions.scm")) - ) +(map (lambda (x) (eval-string (ly-gulp-file x))) + + '("backend-property.scm" + "translator-properties.scm" + "interface.scm" + "beam.scm" + "slur.scm" + "font.scm" + "auto-beam.scm" + "generic-property.scm" + "basic-properties.scm" + "chord-name.scm" + "element-descriptions.scm" + )) diff --git a/scm/translator-properties.scm b/scm/translator-properties.scm index b3c6366574..42a14ef3c4 100644 --- a/scm/translator-properties.scm +++ b/scm/translator-properties.scm @@ -148,6 +148,7 @@ the music. ") (translator-property-description 'melismaBusy boolean? "") (translator-property-description 'melismaEngraverBusy boolean? "") +(translator-property-description 'midiInstrument string? "") (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically. ") (translator-property-description 'noResetKey boolean? "Do not diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 08b3dc1586..c16c1809a4 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -172,7 +172,7 @@ if 1: sys.stderr.write ('\nNot smart enough to convert to new \\header format') return str - conversions.append ((1,0,2), conv, '\\header { key = concat + with + operator }') + conversions.append (((1,0,2), conv, '\\header { key = concat + with + operator }')) if 1: def conv(str): @@ -180,7 +180,7 @@ if 1: return str - conversions.append ((1,0,3), conv, '\\melodic -> \\notes') + conversions.append (((1,0,3), conv, '\\melodic -> \\notes')) if 1: def conv(str): @@ -189,7 +189,7 @@ if 1: return str - conversions.append ((1,0,4), conv, 'default_{paper,midi}') + conversions.append (((1,0,4), conv, 'default_{paper,midi}')) if 1: def conv(str): @@ -198,7 +198,7 @@ if 1: return str - conversions.append ((1,0,5), conv, 'ChoireStaff -> ChoirStaff') + conversions.append (((1,0,5), conv, 'ChoireStaff -> ChoirStaff')) if 1: def conv(str): @@ -207,7 +207,7 @@ if 1: raise FatalConversionError() return str - conversions.append ((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }') + conversions.append (((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }')) if 1: @@ -216,7 +216,7 @@ if 1: return str - conversions.append ((1,0,7), conv, '\\lyric -> \\lyrics') + conversions.append (((1,0,7), conv, '\\lyric -> \\lyrics')) if 1: def conv(str): @@ -229,12 +229,12 @@ if 1: str = re.sub ('\\]([0-9/]+)', '] }', str) return str - conversions.append ((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 ') + conversions.append (((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 ')) if 1: def conv(str): return str - conversions.append ((1,0,12), conv, 'Chord syntax stuff') + conversions.append (((1,0,12), conv, 'Chord syntax stuff')) if 1: @@ -245,7 +245,7 @@ if 1: return str - conversions.append ((1,0,13), conv, ' c -> ~ c') + conversions.append (((1,0,13), conv, ' c -> ~ c')) if 1: def conv(str): @@ -254,7 +254,7 @@ if 1: return str - conversions.append ((1,0,14), conv, '<[a b> c -> [ ]') + conversions.append (((1,0,14), conv, '<[a b> c -> [ ]')) if 1: @@ -264,7 +264,7 @@ if 1: return str - conversions.append ((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle') + conversions.append (((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle')) if 1: @@ -274,8 +274,8 @@ if 1: raise FatalConversionError() return str - conversions.append ((1,0,18), conv, - '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative') + conversions.append (((1,0,18), conv, + '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative')) if 1: def conv(str): @@ -285,8 +285,8 @@ if 1: return str - conversions.append ((1,0,19), conv, - 'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars') + conversions.append (((1,0,19), conv, + 'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')) if 1: @@ -297,8 +297,8 @@ if 1: return str - conversions.append ((1,0,20), conv, - '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection') + conversions.append (((1,0,20), conv, + '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection')) if 1: @@ -307,8 +307,8 @@ if 1: return str - conversions.append ((1,0,21), conv, - 'hshift -> horizontalNoteShift') + conversions.append (((1,0,21), conv, + 'hshift -> horizontalNoteShift')) if 1: @@ -317,8 +317,8 @@ if 1: return str - conversions.append ((1,1,52), conv, - 'deprecate \\grouping') + conversions.append (((1,1,52), conv, + 'deprecate \\grouping')) if 1: @@ -327,8 +327,8 @@ if 1: return str - conversions.append ((1,1,55), conv, - '\\wheel -> \\coda') + conversions.append (((1,1,55), conv, + '\\wheel -> \\coda')) if 1: def conv(str): @@ -337,8 +337,8 @@ if 1: return str - conversions.append ((1,1,65), conv, - 'slurdash -> slurDash, keyoctaviation -> keyOctaviation') + conversions.append (((1,1,65), conv, + 'slurdash -> slurDash, keyoctaviation -> keyOctaviation')) if 1: def conv(str): @@ -346,8 +346,8 @@ if 1: return str - conversions.append ((1,1,66), conv, - 'semi -> volta') + conversions.append (((1,1,66), conv, + 'semi -> volta')) if 1: @@ -356,8 +356,8 @@ if 1: return str - conversions.append ((1,1,67), conv, - 'beamAuto -> noAutoBeaming') + conversions.append (((1,1,67), conv, + 'beamAuto -> noAutoBeaming')) if 1: def conv(str): @@ -365,8 +365,8 @@ if 1: return str - conversions.append ((1,2,0), conv, - 'automaticMelismas -> automaticMelismata') + conversions.append (((1,2,0), conv, + 'automaticMelismas -> automaticMelismata')) if 1: def conv(str): @@ -374,8 +374,8 @@ if 1: return str - conversions.append ((1,2,1), conv, - 'dynamicDir -> dynamicDirection') + conversions.append (((1,2,1), conv, + 'dynamicDir -> dynamicDirection')) if 1: def conv(str): @@ -384,8 +384,8 @@ if 1: return str - conversions.append ((1,3,4), conv, - '\\cadenza -> \cadenza{On|Off}') + conversions.append (((1,3,4), conv, + '\\cadenza -> \cadenza{On|Off}')) if 1: def conv (str): @@ -394,7 +394,7 @@ if 1: str) return str - conversions.append ((1,3,5), conv, 'beamAuto moment properties') + conversions.append (((1,3,5), conv, 'beamAuto moment properties')) if 1: def conv (str): @@ -403,7 +403,7 @@ if 1: str) return str - conversions.append ((1,3,17), conv, 'stemStyle -> flagStyle') + conversions.append (((1,3,17), conv, 'stemStyle -> flagStyle')) if 1: def conv (str): @@ -412,7 +412,7 @@ if 1: str) return str - conversions.append ((1,3,18), conv, 'staffLineLeading -> staffSpace') + conversions.append (((1,3,18), conv, 'staffLineLeading -> staffSpace')) if 1: def conv (str): @@ -424,7 +424,7 @@ if 1: str) return str - conversions.append ((1,3,35), conv, 'textEmptyDimension -> textNonEmpty') + conversions.append (((1,3,35), conv, 'textEmptyDimension -> textNonEmpty')) if 1: def conv (str): @@ -436,7 +436,7 @@ if 1: sys.stderr.write ('\nNot smart enough to convert to new \\notenames format') return str - conversions.append ((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)') + conversions.append (((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)')) if 1: def conv (str): @@ -446,7 +446,7 @@ if 1: str = re.sub ("\\\\key ([^;]+);", replace, str) return str - conversions.append ((1,3,39), conv, '\\key A ; ->\\key a;') + conversions.append (((1,3,39), conv, '\\key A ; ->\\key a;')) if 1: def conv (str): @@ -454,31 +454,31 @@ if 1: sys.stderr.write ('\nNot smart enough to convert to new tremolo format') return str - conversions.append ((1,3,41), conv, - '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }') + conversions.append (((1,3,41), conv, + '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }')) if 1: def conv (str): str = re.sub ('Staff_margin_engraver' , 'Instrument_name_engraver', str) return str - conversions.append ((1,3,42), conv, - 'Staff_margin_engraver deprecated, use Instrument_name_engraver') + conversions.append (((1,3,42), conv, + 'Staff_margin_engraver deprecated, use Instrument_name_engraver')) if 1: def conv (str): str = re.sub ('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?' , "noteHeadStyle = #'\\1", str) return str - conversions.append ((1,3,49), conv, - 'noteHeadStyle value: string -> symbol') + conversions.append (((1,3,49), conv, + 'noteHeadStyle value: string -> symbol')) if 1: def conv (str): str = re.sub (r"""\\key *([a-z]+) *;""", r"""\\key \1 \major;""",str); return str - conversions.append ((1,3,59), conv, - '\key X ; -> \key X major; ') + conversions.append (((1,3,59), conv, + '\key X ; -> \key X major; ')) if 1: def conv (str): @@ -486,7 +486,7 @@ if 1: 'latexheaders = "', str) return str - conversions.append ((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"') + conversions.append (((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"')) @@ -508,7 +508,7 @@ if 1: str = re.sub ('basic([A-Za-z_]+)Properties', '\\1', str) return str - conversions.append ((1,3,92), conv, 'basicXXXProperties -> XXX') + conversions.append (((1,3,92), conv, 'basicXXXProperties -> XXX')) if 1: def conv (str): @@ -534,8 +534,8 @@ if 1: return str - conversions.append ((1,3,93), conv, - 'property definiton case (eg. onevoice -> oneVoice)') + conversions.append (((1,3,93), conv, + 'property definiton case (eg. onevoice -> oneVoice)')) if 1: @@ -548,7 +548,7 @@ if 1: return str - conversions.append ((1,3,97), conv, 'ChordName -> ChordNames') + conversions.append (((1,3,97), conv, 'ChordName -> ChordNames')) if 1: def conv (str): @@ -560,7 +560,7 @@ if 1: return str - conversions.append ((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)') + conversions.append (((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)')) if 1: @@ -570,7 +570,7 @@ if 1: return str - conversions.append ((1,3,110), conv, '\\push -> \\override, \\pop -> \\revert') + conversions.append (((1,3,110), conv, '\\push -> \\override, \\pop -> \\revert')) ############################ -- 2.39.5