From: fred Date: Tue, 26 Mar 2002 23:56:43 +0000 (+0000) Subject: lilypond-1.3.93 X-Git-Tag: release/1.5.59~1269 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=07adfbf9fec8e582e15ef7726d0cbcc452843d36;p=lilypond.git lilypond-1.3.93 --- diff --git a/CHANGES b/CHANGES index 5282a4ded3..7165bea587 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,38 @@ -1.3.91.uu1 -========== +1.3.92.jcn2 +=========== + +* Added some error messages for toplevel and stray string parse errors. + +* Don't start more than one slur at a time. + +* Set direction of Slur too in a2-engraver. + +1.3.92.hwn1 +=========== +* Removed calls to global GUILE namespace. + +* Added \property: scriptDefinitions, explicitClefVisibility, +explicitKeySignatureVisibility, instrumentEqualizer, +dynamicAbsoluteVolumeFunction + +* Added element properties Bar::break-glyph-function, +Break_align_item::space-alist, Chord_name::chord-name-function + +* Added \property combineParts: part combiner switched off by default. + + +* Remove all print methods. + +* Use Scope::try_retrieve if possible. + +* Remove FAQ in favor of URL. + +* etf2ly.py robustness fixes. + +* Don't compensate for left edge in broken volta spanner. + +1.3.92 +====== * RPM .spec fixes. diff --git a/input/trip.ly b/input/trip.ly index ed3e877acd..7f55ece974 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -67,7 +67,7 @@ praeludiumLeft = \notes \relative c { dis2 cis4 r8 cis } \context Voice = one { \stemup bis2 } \context Voice = three { - \property Voice.dynamicDirection = \down + \property Voice.basicDynamicLineSpannerProperties \push #'direction = #-1 \stemup \shifton r4 gis ~ [gis8 \< @@ -98,23 +98,23 @@ fugaIIRight = \notes \relative c'' { \context Staff \notes\relative c''< \context Voice=one { - \property Voice.horizontalNoteShift=0 - \property Voice.verticalDirection=1 + \shiftoff + \stemup e4 } \context Voice=two { - \property Voice.verticalDirection=1 - \property Voice.horizontalNoteShift=1 + \shifton + \stemup cis } \context Voice=three { - \property Voice.horizontalNoteShift=2 - \property Voice.verticalDirection=1 + \shiftonn + \stemup ais } \context Voice=four { - \property Voice.verticalDirection=-1 - \property Voice.horizontalNoteShift=-1 + \shiftonnn + \stemup fis } > diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index 18d5bbb54b..34039b43ea 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -10,6 +10,7 @@ #include "item.hh" #include "note-head.hh" #include "stem.hh" +#include "slur.hh" #include "translator-group.hh" #include "side-position-interface.hh" #include "directional-element-interface.hh" @@ -42,6 +43,8 @@ A2_engraver::A2_engraver () void A2_engraver::do_process_music () { + if (!to_boolean (get_property ("combineParts"))) + return ; if (!text_p_) { SCM unison = get_property ("unison"); @@ -88,6 +91,9 @@ A2_engraver::do_process_music () void A2_engraver::acknowledge_element (Score_element_info i) { + if (!to_boolean (get_property ("combineParts"))) + return ; + if (text_p_) { if (Note_head::has_interface (i.elem_l_)) @@ -126,10 +132,12 @@ A2_engraver::acknowledge_element (Score_element_info i) else if (unirhythm) state_ = UNIRHYTHM; - if (Stem::has_interface (i.elem_l_)) + if (Stem::has_interface (i.elem_l_) + || Slur::has_interface (i.elem_l_) + // || Text_item::has_interface (i.elem_l_) + //|| Crescendo::has_interface (i.elem_l_) + ) { - Item *stem_l = dynamic_cast (i.elem_l_); - /* Hmm. We must set dir when solo, in order to get the rests collided to the right position @@ -141,11 +149,11 @@ A2_engraver::acknowledge_element (Score_element_info i) { if (daddy_trans_l_->id_str_ == "one") { - stem_l->set_elt_property ("direction", gh_int2scm (1)); + i.elem_l_->set_elt_property ("direction", gh_int2scm (1)); } else if (daddy_trans_l_->id_str_ == "two") { - stem_l->set_elt_property ("direction", gh_int2scm (-1)); + i.elem_l_->set_elt_property ("direction", gh_int2scm (-1)); } } } diff --git a/lily/bar.cc b/lily/bar.cc index 721c807da4..80dad453c0 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -133,22 +133,12 @@ Bar::before_line_breaking (SCM smob) SCM g = me->get_elt_property ("glyph"); SCM orig = g; Direction bsd = item->break_status_dir (); - if (gh_string_p (g)) + if (gh_string_p (g) && bsd) { - if (bsd) - { - SCM breakdir = gh_int2scm (bsd); - g = scm_eval2 (gh_list (ly_symbol2scm ("break-barline"), - g, - breakdir, - SCM_UNDEFINED), - SCM_EOL); - } - } - else - { - g = SCM_EOL; + SCM proc = me->get_elt_property ("break-glyph-function"); + g = gh_call2 (proc, g, gh_int2scm (bsd)); } + if (!gh_string_p (g)) { diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index d8c5f6d2b2..ad1f1cbb47 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -110,12 +110,12 @@ Break_align_interface::do_alignment (Score_element *me) } else next_origin = ly_symbol2scm ("begin-of-note"); - + + SCM alist = me->get_elt_property ("space-alist"); SCM e = scm_assoc (scm_listify (current_origin, next_origin, - SCM_UNDEFINED), - scm_eval2 (ly_symbol2scm ("space-alist"), SCM_EOL)); - + SCM_UNDEFINED), alist); + SCM extra_space; if (e != SCM_BOOL_F) { diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 3d786acc81..80955b20d7 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -152,27 +152,23 @@ MAKE_SCHEME_CALLBACK (Chord_name, brew_molecule); SCM Chord_name::brew_molecule (SCM smob) { - Score_element *sc = unsmob_element (smob); - SCM style = sc->get_elt_property ("style"); + Score_element *me = unsmob_element (smob); + SCM style = me->get_elt_property ("style"); if (!gh_string_p (style)) style = ly_str02scm ("banter"); - SCM inversion = sc-> get_elt_property ("inversion"); + SCM inversion = me-> get_elt_property ("inversion"); if (inversion == SCM_EOL) inversion = SCM_BOOL_F; - SCM bass = sc->get_elt_property ("bass"); + SCM bass = me->get_elt_property ("bass"); if (bass == SCM_EOL) bass = SCM_BOOL_F; - SCM pitches = sc->get_elt_property ("pitches"); - SCM text = scm_eval2 (gh_list (ly_symbol2scm ("chord::user-name"), - style, - ly_quote_scm (pitches), - ly_quote_scm (gh_cons (inversion, bass)), - SCM_UNDEFINED), - SCM_EOL); + SCM pitches = me->get_elt_property ("pitches"); + SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function")); + SCM text = gh_call3 (func, style, ly_quote_scm (pitches), ly_quote_scm (gh_cons (inversion, bass))); - return ly_text2molecule (sc, text).create_scheme (); + return ly_text2molecule (me, text).create_scheme (); } diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index d448e71648..64443eb18b 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -219,8 +219,7 @@ Clef_engraver::do_pre_move_processing() SCM vis = 0; if(to_boolean (clef_p_->get_elt_property("non-default"))) { - vis = ly_symbol2scm ("all-visible"); - vis = scm_eval2 (vis, SCM_EOL); + vis = get_property ("explicitClefVisibility"); } if (vis) diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 1b3adc4d4c..b3ce53051e 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -13,7 +13,7 @@ #include "item.hh" /* -FIXME: should use symbol. +FIXME: should use symbol for #'style. */ MAKE_SCHEME_CALLBACK(Clef,before_line_breaking); diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 1a7ac9e2c6..2ab1550fdb 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -28,7 +28,6 @@ public: ~Dynamic_performer (); protected: - void do_print () const; virtual bool do_try_music (Music* req_l); virtual void do_process_music (); virtual void do_pre_move_processing (); @@ -50,31 +49,24 @@ Dynamic_performer::~Dynamic_performer () { } -void -Dynamic_performer::do_print () const -{ -#ifndef NPRINT - if (text_script_req_l_) - text_script_req_l_->print (); -#endif -} void Dynamic_performer::do_process_music () { if (text_script_req_l_) { - - SCM s = scm_eval2 - (gh_list - (ly_symbol2scm ("dynamic-absolute-volume"), - ly_quote_scm (ly_str02scm (text_script_req_l_->text_str_.ch_C ())), - SCM_UNDEFINED), - SCM_EOL); - Real volume = gh_scm2double (scm_eval2 (ly_symbol2scm ("dynamic-default-volume"), SCM_EOL)); - if (gh_number_p (s)) - volume = gh_scm2double (s); - + SCM proc = get_property ("dynamicAbsoluteVolumeFunction"); + + SCM svolume = SCM_EOL; + if (gh_procedure_p (proc)) + { + svolume = gh_call1 (proc, ly_str02scm (text_script_req_l_->text_str_.ch_C ())); + } + + Real volume = 0.5; + if (gh_number_p (svolume)) + volume = gh_scm2double (svolume); + /* properties override default equaliser setting */ @@ -94,7 +86,7 @@ Dynamic_performer::do_process_music () /* urg, code duplication:: staff_performer */ - s = get_property ("midiInstrument"); + SCM s = get_property ("midiInstrument"); if (!gh_string_p(s)) s = get_property ("instrument"); @@ -103,9 +95,12 @@ Dynamic_performer::do_process_music () s = ly_str02scm ("piano"); - s = scm_eval2 (gh_list (ly_symbol2scm ("instrument-equaliser"), - s, SCM_UNDEFINED), - SCM_EOL); + SCM eq = get_property ("instrumentEqualizer"); + if (gh_procedure_p (eq)) + { + s = gh_call1 (eq, s); + } + if (gh_pair_p (s)) { Interval iv; diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 7d5bef2265..bc9287c763 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -33,8 +33,6 @@ */ SCM ly_str02scm (char const*c); SCM ly_deep_copy (SCM); - - SCM ly_symbol2scm (char const *); String ly_scm2string (SCM s); String ly_symbol2string (SCM); @@ -83,6 +81,13 @@ SCM index_set_cell (SCM cellp, Direction d, SCM val); void add_scm_init_func (void (*)()); +typedef SCM(*Scheme_function_unknown)(); + +#if __GNUC_MINOR__ >= 96 +typedef SCM(*Scheme_function_1)(SCM); +#else +typedef SCM(*Scheme_function_1)(...); +#endif #define MAKE_SCHEME_CALLBACK(TYPE, FUNC) \ static SCM TYPE ## _ ## FUNC ## _proc;\ @@ -90,7 +95,7 @@ void \ TYPE ## _ ## FUNC ## _init_functions () \ { \ TYPE ## _ ## FUNC ## _proc = gh_new_procedure1_0 (#TYPE "::" #FUNC, \ - (SCM(*)(SCM))TYPE :: FUNC); \ + ((Scheme_function_1)TYPE :: FUNC)); \ } \ \ ADD_SCM_INIT_FUNC(TYPE ## _ ## FUNC ## _callback, TYPE ## _ ## FUNC ## _init_functions); \ diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 104687dbd5..110e6717e1 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -84,11 +84,13 @@ Key_engraver::create_key (bool def) announce_element (item_p_,keyreq_l_); } - if (!def) - item_p_->set_elt_property ("visibility-lambda", - scm_eval2 (ly_symbol2scm ("all-visible"), - SCM_EOL)); + if (!def) + { + SCM vis = get_property ("explicitKeySignatureVisibility"); + if (gh_procedure_p (vis)) + item_p_->set_elt_property ("visibility-lambda",vis); + } } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 69fef2e645..4a6e26d5d1 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -53,7 +53,7 @@ ly_parse_scm (char const* s, int* n) /* Read expression from port */ if (!SCM_EOF_OBJECT_P (form = scm_read (port))) - answer = scm_eval_3 (form, 1, SCM_EOL); + answer = scm_eval_3 (form, 1, SCM_EOL); // guh? /* After parsing @@ -100,6 +100,7 @@ ly_symbol2scm(const char *s) return gh_symbol2scm ((char *)s); } + String ly_symbol2string (SCM s) { @@ -345,7 +346,7 @@ ly_number2string (SCM s) { assert (gh_number_p (s)); - char str[100]; // ugh. + char str[400]; // ugh. if (scm_integer_p (s) == SCM_BOOL_F) { @@ -399,11 +400,11 @@ undefd () static void init_functions () { - scm_make_gsubr ("ly-warn", 1, 0, 0, (SCM(*)())ly_warning); - scm_make_gsubr ("ly-gulp-file", 1,0, 0, (SCM(*)())ly_gulp_file); - scm_make_gsubr ("dir?", 1,0, 0, (SCM(*)())ly_isdir_p); - scm_make_gsubr ("undefd", 0,0, 0, (SCM(*)())undefd); - scm_make_gsubr ("ly-number->string", 1, 0,0, (SCM(*)()) ly_number2string); + scm_make_gsubr ("ly-warn", 1, 0, 0, (Scheme_function_unknown)ly_warning); + scm_make_gsubr ("ly-gulp-file", 1,0, 0, (Scheme_function_unknown)ly_gulp_file); + scm_make_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p); + scm_make_gsubr ("undefd", 0,0, 0, (Scheme_function_unknown)undefd); + scm_make_gsubr ("ly-number->string", 1, 0,0, (Scheme_function_unknown) ly_number2string); #ifdef TEST_GC diff --git a/lily/lookup.cc b/lily/lookup.cc index ab81aa4284..62ad7fbb91 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -266,6 +266,10 @@ Lookup::text (String style, String text, Paper_def *paper_l) font_mag = (int)paper_l->get_var ("magnification_" + style); } + /* + FIXME ! + */ + SCM l = scm_assoc (ly_str02scm (style.ch_C()), scm_eval2 (ly_symbol2scm ("cmr-alist"), SCM_EOL)); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index bac852ce55..059d14dd08 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -57,10 +57,9 @@ Script_engraver::do_process_music() { Articulation_req* l=script_req_l_arr_[i]; - SCM list = scm_assoc (ly_str02scm (l->articulation_str_.ch_C ()), - scm_eval2 (ly_symbol2scm ("script-alist"), - SCM_EOL)); - + SCM alist = get_property ("scriptDefinitions"); + SCM list = scm_assoc (ly_str02scm (l->articulation_str_.ch_C ()), alist); + if (list == SCM_BOOL_F) { l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", diff --git a/ly/engraver.ly b/ly/engraver.ly index b3fa68374f..d5b947bf3d 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -397,7 +397,10 @@ ScoreContext = \translator { defaultClef = #"treble" defaultBarType = #"|" systemStartDelimiterGlyph = #'bar-line - + explicitClefVisibility = #all-visible + explicitKeySignatureVisibility = #all-visible + + scriptDefinitions = #default-script-alist % % what order to print accs. We could compute this, % but computing is more work than putting it here. @@ -432,6 +435,7 @@ ScoreContext = \translator { (interfaces . (bar-interface staff-bar-interface)) (break-align-symbol . Staff_bar) (glyph . "|") + (break-glyph-function . ,default-break-barline) (barsize-procedure . ,Bar::get_staff_bar_size) (molecule-callback . ,Bar::brew_molecule) (visibility-lambda . ,all-visible) @@ -462,6 +466,7 @@ ScoreContext = \translator { (interfaces . (break-align-interface)) (stacking-dir . 1) (axes 0) + (space-alist . ,default-break-align-space-alist) (name . "break alignment") ) basicBreakAlignGroupProperties = #`( @@ -490,6 +495,7 @@ ScoreContext = \translator { (molecule-callback . ,Chord_name::brew_molecule) (interfaces . (chord-name-interface)) (after-line-breaking-callback . ,Chord_name::after_line_breaking) + (chord-name-function . ,default-chord-name-function) (name . "chord name") ) basicCollisionProperties = #`( @@ -784,13 +790,6 @@ ScoreContext = \translator { (name . "sostenuto pedal") ) - basicStemTremoloProperties = #`( - (molecule-callback . ,Stem_tremolo::brew_molecule) - (beam-width . 2.0) ; staff-space - (beam-thickness . 0.42) ; staff-space - (beam-space-function . ,default-beam-space-function) - (name . "stem tremolo") - ) basicStemProperties = #`( (interfaces . (stem-interface)) (before-line-breaking-callback . ,Stem::before_line_breaking) @@ -809,6 +808,14 @@ ScoreContext = \translator { (default-neutral-direction . 1) (name . "stem") ) + + basicStemTremoloProperties = #`( + (molecule-callback . ,Stem_tremolo::brew_molecule) + (beam-width . 2.0) ; staff-space + (beam-thickness . 0.42) ; staff-space + (beam-space-function . ,default-beam-space-function) + (name . "stem tremolo") + ) basicSeparationItemProperties = #`( (interfaces . (separation-item-interface)) (name . "separation item") @@ -832,8 +839,7 @@ ScoreContext = \translator { (self-alignment-X . 0) (name . "una chorda pedal") ) - - basicVoltaSpannerProperties = #`( + basicVoltaBracketProperties = #`( (molecule-callback . ,Volta_spanner::brew_molecule) (interfaces . (volta-spanner-interface side-position-interface)) (direction . 1) diff --git a/ly/performer.ly b/ly/performer.ly index 0ad41e658f..2b731e183c 100644 --- a/ly/performer.ly +++ b/ly/performer.ly @@ -120,6 +120,9 @@ ScoreContext = \translator { \accepts RhythmicStaff; \accepts ChordNames; \consists "Swallow_performer"; + + dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume + instrumentEqualizer = #default-instrument-equaliser }; \translator { \ScoreContext } diff --git a/ly/property.ly b/ly/property.ly index 0ac31ec8c6..3c255916de 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -1,31 +1,23 @@ % property.ly -% list of properties that lily recognises -% and some shorthands (ugh) - -%{ - -SEE THE REFERENCE MANUAL FOR EXPLANATIONS. - -%} \version "1.3.59"; - -%{ -stemup = \property Voice.verticalDirection = \up -stemboth= \property Voice.verticalDirection = \center -stemdown = \property Voice.verticalDirection = \down -%} - stemup = \property Voice.basicStemProperties \push #'direction = #1 stemdown = \property Voice.basicStemProperties \push #'direction = #-1 stemboth= \property basicStemProperties \pop #'direction -slurup = \property Voice.slurVerticalDirection = \up -slurboth = \property Voice.slurVerticalDirection = \center -slurdown = \property Voice.slurVerticalDirection = \down -shifton = \property Voice.horizontalNoteShift = #1 -shiftoff = \property Voice.horizontalNoteShift = #0 +slurup = \property Voice.basicSlurProperties \push #'direction = #1 +slurboth = \property basicSlurProperties \pop #'direction +slurdown = \property Voice.basicSlurProperties \push #'direction = #-1 +shifton = \property Voice.basicNoteColumnProperties \push #'horizontal-shift = #1 +shiftonn = \property Voice.basicNoteColumnProperties \push #'horizontal-shift = #2 +shiftonnn = \property Voice.basicNoteColumnProperties \push #'horizontal-shift = #3 +shiftoff = \property basicNoteColumnProperties \pop #'horizontal-shift + + +tieUp = \property Voice.basicTieProperties \push #'direction = #1 +tieDown = \property Voice.basicTieProperties \push #'direction = #-1 +tieBoth = \property basicTieProperties \pop #'direction cadenzaOn = \property Score.timing = ##f cadenzaOff = { \property Score.timing = ##t @@ -34,11 +26,17 @@ cadenzaOff = { \property Score.timing = ##t onevoice = { - \stemboth \shiftoff + \stemboth + \tieBoth } -voiceone = \stemup -voicetwo = \stemdown +voiceone = { \stemup + \tieUp +} +voicetwo = { \stemdown + \tieDown + } + voicethree = { \stemup \shifton @@ -53,31 +51,7 @@ voicefour = { % ugh2. infinity=10000 - -beamslopeproportional = - \property Score.beamSlopedamping = 0 - -beamslopedamped = - \property Score.beamSlopedamping = 1 - - -beamslopezero = - \property Score.beamSlopedamping = \infinity - - -% this sucks, you'd want to pass an array, at least -% (or embedded code: you still can't dictate the slope / stemlength) -beamposfree = - \property Score.beamQuantisation = 0 - - -beamposnormal = - \property Score.beamQuantisation = 1 - - -beampostraditional = - \property Score.beamQuantisation = 2 - +%{ slurnormal = \property Voice.slurDash = ##f @@ -92,7 +66,9 @@ tupletoff = tupleton = \property Voice.tupletVisibility = 3 +%} + tiny = \property Voice.fontSize= -2 diff --git a/mutopia/J.S.Bach/wtk1-fugue2.ly b/mutopia/J.S.Bach/wtk1-fugue2.ly index fe76c48871..56393684cf 100644 --- a/mutopia/J.S.Bach/wtk1-fugue2.ly +++ b/mutopia/J.S.Bach/wtk1-fugue2.ly @@ -50,14 +50,21 @@ dux = \context Voice=two \notes \relative c''{ %%15 g8 g'16 fis g8 c, - es \translator Staff = treble \stemdown g16 fis! g8 a | + es \translator Staff = treble + \stemboth + \stemdown + g16 fis! g8 a | d, g16 fis g8 a! c,16 d es4 d16 c | % forced accident! bes8 r8 r16 d e fis g a bes8 ~ bes16 e, f g | a bes c8 ~ c16 fis,16 g a bes8 es,!16 d es8 g, | as f'16 es f8 a,8 bes g'16 f g8 b, | %%20 - c16 f \translator Staff = bass \stemup es d c bes! as g - f8 \translator Staff = treble \stemdown as' g f | + c16 f \translator Staff = bass + \stemboth \stemup + es d c bes! as g + f8 \translator Staff = treble + \stemboth \stemdown + as' g f | es d es f b, c d b | c4 r8 e8 f f16 e f8 c | d4 r8 d8 es8 es16 d es8 bes | @@ -142,7 +149,7 @@ bassdux = \context Voice=three \notes \relative c' { c16 d es8~ es16 a, bes c d es f8~ f16 b, c d | %%20 % es8 r r e f f, es! d | % -> \classic_accidentals - es8 r r e \stemdown f f, es! d \stemboth | + es8 r r e \stemboth \stemdown f f, es! d \stemboth | r as' g f g f16 es f8 g | c16 d es d c bes as g f bes' as g f es d c | bes c d c bes as g f es as' g f es d c bes | @@ -169,7 +176,6 @@ bassdux = \context Voice=three \notes \relative c' { \dux { \comes \bar "|."; } \time 4/4; - \property Score.timeSignatureStyle = "C" > \context Staff = bass < \key c \minor; @@ -179,7 +185,11 @@ bassdux = \context Voice=three \notes \relative c' { \paper { linewidth = 18.0 \cm; - \translator{ \OrchestralScoreContext } + \translator{ \OrchestralScoreContext + timeSignatureStyle \push #'style = #"C" + + } + } \header{ opus = "BWV 847"; diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index 3dadb920c0..d07db3311e 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -129,10 +129,6 @@ ;; ;; We have our doubts, so we simply provide all sensible alternatives. - - - - ;; array index multiplicity, last if index>size ;; beamed stems @@ -141,9 +137,6 @@ ;; - take #forced stems into account (now done in C++)? ;; - take y-position of chord or beam into account -;;;;;;;;;;;;;;;;;;;;;;; - - ; ; todo: clean this up a bit: the list is getting rather long. ; @@ -167,3 +160,80 @@ (name . "beam") ) ) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Bar lines. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; +; How should a bar line behave at a break? +; +(define (default-break-barline glyph dir) + (let ((result (assoc glyph + '((":|:" . (":|" . "|:")) + ("|" . ("|" . "")) + ("|s" . (nil . "|")) + ("|:" . ("|" . "|:")) + ("|." . ("|." . nil)) + (".|" . (nil . ".|")) + (":|" . (":|" . nil)) + ("||" . ("||" . nil)) + (".|." . (".|." . nil)) + ("brace" . (nil . "brace")) + ("bracket" . (nil . "bracket")) + ) + ))) + + (if (equal? result #f) + (ly-warn (string-append "Unknown bar glyph: `" glyph "'")) + (index-cell (cdr result) dir)) + ) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Prefatory matter: break align item. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Spacing constants +;; +;; rules for this spacing are much more complicated than this. +;; See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147 +;; + +;; (Measured in staff space) +(define default-break-align-space-alist + '( + ((none Instrument_name) . (extra-space 1.0)) + ((Instrument_name Left_edge_item) . (extra-space 1.0)) + ((Left_edge_item Clef_item) . (extra-space 1.0)) + ((Left_edge_item Key_item) . (extra-space 0.0)) + ((Left_edge_item begin-of-note) . (extra-space 1.0)) + ((none Left_edge_item) . (extra-space 0.0)) + ((Left_edge_item Staff_bar) . (extra-space 0.0)) +; ((none Left_edge_item) . (extra-space -15.0)) +; ((none Left_edge_item) . (extra-space -15.0)) + ((none Clef_item) . (minimum-space 1.0)) + ((none Staff_bar) . (minimum-space 0.0)) + ((none Clef_item) . (minimum-space 1.0)) + ((none Key_item) . (minimum-space 0.5)) + ((none Time_signature) . (extra-space 0.0)) + ((none begin-of-note) . (minimum-space 1.5)) + ((Clef_item Key_item) . (minimum-space 4.0)) + ((Key_item Time_signature) . (extra-space 1.0)) + ((Clef_item Time_signature) . (minimum-space 3.5)) + ((Staff_bar Clef_item) . (minimum-space 1.0)) + ((Clef_item Staff_bar) . (minimum-space 3.7)) + ((Time_signature Staff_bar) . (minimum-space 2.0)) + ((Key_item Staff_bar) . (extra-space 1.0)) + ((Staff_bar Time_signature) . (minimum-space 1.5)) + ((Time_signature begin-of-note) . (extra-space 2.0)) + ((Key_item begin-of-note) . (extra-space 2.5)) + ((Staff_bar begin-of-note) . (extra-space 1.0)) + ((Clef_item begin-of-note) . (minimum-space 5.0)) + ((none Breathing_sign) . (minimum-space 0.0)) + ((Breathing_sign Key_item) . (minimum-space 1.5)) + ((Breathing_sign begin-of-note) . (minimum-space 1.0)) + ((Breathing_sign Staff_bar) . (minimum-space 1.5)) + ((Breathing_sign Clef_item) . (minimum-space 2.0)) + ) +) diff --git a/scm/chord-names.scm b/scm/chord-names.scm index ce6e539944..27f4314bfb 100644 --- a/scm/chord-names.scm +++ b/scm/chord-names.scm @@ -330,7 +330,7 @@ ;; parts, complete the missing user-override matched part with normal ;; chord to be name-calculated. ;; -(define (chord::user-name style pitches base-and-inversion) +(define (default-chord-name-function style pitches base-and-inversion) ;(display "pitches:") (display pitches) (newline) ;(display "style:") (display style) (newline) ;(display "b&i:") (display base-and-inversion) (newline) diff --git a/scm/lily.scm b/scm/lily.scm index 2ac90b2155..d15c8bd11a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -85,49 +85,6 @@ (define security-paranoia #f) -;; Spacing constants for prefatory matter. -;; -;; rules for this spacing are much more complicated than this. See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147 -;; -;; - -;; (Measured in staff space) -(define space-alist - '( - ((none Instrument_name) . (extra-space 1.0)) - ((Instrument_name Left_edge_item) . (extra-space 1.0)) - ((Left_edge_item Clef_item) . (extra-space 1.0)) - ((Left_edge_item Key_item) . (extra-space 0.0)) - ((Left_edge_item begin-of-note) . (extra-space 1.0)) - ((none Left_edge_item) . (extra-space 0.0)) - ((Left_edge_item Staff_bar) . (extra-space 0.0)) -; ((none Left_edge_item) . (extra-space -15.0)) -; ((none Left_edge_item) . (extra-space -15.0)) - ((none Clef_item) . (minimum-space 1.0)) - ((none Staff_bar) . (minimum-space 0.0)) - ((none Clef_item) . (minimum-space 1.0)) - ((none Key_item) . (minimum-space 0.5)) - ((none Time_signature) . (extra-space 0.0)) - ((none begin-of-note) . (minimum-space 1.5)) - ((Clef_item Key_item) . (minimum-space 4.0)) - ((Key_item Time_signature) . (extra-space 1.0)) - ((Clef_item Time_signature) . (minimum-space 3.5)) - ((Staff_bar Clef_item) . (minimum-space 1.0)) - ((Clef_item Staff_bar) . (minimum-space 3.7)) - ((Time_signature Staff_bar) . (minimum-space 2.0)) - ((Key_item Staff_bar) . (extra-space 1.0)) - ((Staff_bar Time_signature) . (minimum-space 1.5)) ;double check this. - ((Time_signature begin-of-note) . (extra-space 2.0)) ;double check this. - ((Key_item begin-of-note) . (extra-space 2.5)) - ((Staff_bar begin-of-note) . (extra-space 1.0)) - ((Clef_item begin-of-note) . (minimum-space 5.0)) - ((none Breathing_sign) . (minimum-space 0.0)) - ((Breathing_sign Key_item) . (minimum-space 1.5)) - ((Breathing_sign begin-of-note) . (minimum-space 1.0)) - ((Breathing_sign Staff_bar) . (minimum-space 1.5)) - ((Breathing_sign Clef_item) . (minimum-space 2.0)) - ) -) ;; silly, use alist? (define (find-notehead-symbol duration style) @@ -194,7 +151,7 @@ ) ) -(define script-alist '()) +(define default-script-alist '()) (define font-name-alist '()) (define (font-command name-mag) @@ -393,6 +350,8 @@ ; line numbers only: ;(string-append "\\special{src:" (number->string line) " " file "}") ) + ; no origin info: return empty string + ; "" ; no-origin not yet supported by Xdvi (define (no-origin) "") @@ -948,33 +907,6 @@ (cdr cell) (car cell))) -; -; How should a bar line behave at a break? -; -(define (break-barline glyph dir) - (let ((result (assoc glyph - '((":|:" . (":|" . "|:")) - ("|" . ("|" . "")) - ("|s" . (nil . "|")) - ("|:" . ("|" . "|:")) - ("|." . ("|." . nil)) - (".|" . (nil . ".|")) - (":|" . (":|" . nil)) - ("||" . ("||" . nil)) - (".|." . (".|." . nil)) - ("scorebar" . (nil . "scorepostbreak")) - ("brace" . (nil . "brace")) - ("bracket" . (nil . "bracket")) - ) - ))) - - (if (equal? result #f) - (ly-warn (string-append "Unknown bar glyph: `" glyph "'")) - (index-cell (cdr result) dir)) - ) - ) - - (define major-scale '( (0 . 0) diff --git a/scm/midi.scm b/scm/midi.scm index 94ceeb50e2..fbfdff6cd7 100644 --- a/scm/midi.scm +++ b/scm/midi.scm @@ -23,7 +23,7 @@ ) absolute-volume-alist)) -(define (dynamic-absolute-volume s) +(define (default-dynamic-absolute-volume s) (let ((entry (assoc s absolute-volume-alist))) (if entry (cdr entry)))) @@ -47,7 +47,7 @@ ) instrument-equaliser-alist)) -(define (instrument-equaliser s) +(define (default-instrument-equaliser s) (let ((entry (assoc s instrument-equaliser-alist))) (if entry (cdr entry)))) diff --git a/scm/script.scm b/scm/script.scm index 534cffef89..47d61ab91c 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -6,7 +6,7 @@ ;;TODO? extra padding :: Real (given in staff spaces) -(set! script-alist +(set! default-script-alist (append '(("thumb" . ((feta . ("thumb" . "thumb")) #f 0 1 0)) ("accent" . ((feta . ("sforzato" . "sforzato")) #f -1 0 0)) @@ -36,6 +36,58 @@ ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0)) ("segno" . ((feta . ("segno" . "segno")) #f 0 1 0)) ("coda" . ((feta . ("coda" . "coda")) #f 0 1 0))) - script-alist) + default-script-alist) + ) + + + + +(set! default-script-alist + (append + '(("accDiscant" . ((accordion "Discant" "") #f 0 1 0)) + ("accDiscantF" . ((accordion "Discant" "F") #f 0 1 0)) + ("accDiscantE" . ((accordion "Discant" "E") #f 0 1 0)) + ("accDiscantEh" . ((accordion "Discant" "Eh") #f 0 1 0)) + ("accDiscantFE" . ((accordion "Discant" "FE") #f 0 1 0)) + ("accDiscantFEh" . ((accordion "Discant" "FEh") #f 0 1 0)) + ("accDiscantEE" . ((accordion "Discant" "EE") #f 0 1 0)) + ("accDiscantFEE" . ((accordion "Discant" "FEE") #f 0 1 0)) + ("accDiscantEEE" . ((accordion "Discant" "EEE") #f 0 1 0)) + ("accDiscantFEEE" . ((accordion "Discant" "FEEE") #f 0 1 0)) + ("accDiscantS" . ((accordion "Discant" "S") #f 0 1 0)) + ("accDiscantFS" . ((accordion "Discant" "FS") #f 0 1 0)) + ("accDiscantES" . ((accordion "Discant" "ES") #f 0 1 0)) + ("accDiscantEhS" . ((accordion "Discant" "EhS") #f 0 1 0)) + ("accDiscantFES" . ((accordion "Discant" "FES") #f 0 1 0)) + ("accDiscantFEhS" . ((accordion "Discant" "FEhS") #f 0 1 0)) + ("accDiscantEES" . ((accordion "Discant" "EES") #f 0 1 0)) + ("accDiscantFEES" . ((accordion "Discant" "FEES") #f 0 1 0)) + ("accDiscantEEES" . ((accordion "Discant" "EEES") #f 0 1 0)) + ("accDiscantFEEES" . ((accordion "Discant" "FEEES") #f 0 1 0)) + ("accDiscantSS" . ((accordion "Discant" "SS") #f 0 1 0)) + ("accDiscantESS" . ((accordion "Discant" "ESS") #f 0 1 0)) + ("accDiscantEESS" . ((accordion "Discant" "EESS") #f 0 1 0)) + ("accDiscantEEESS" . ((accordion "Discant" "EEESS") #f 0 1 0)) + ("accFreebase" . ((accordion "Freebase" "") #f 0 -1 0)) + ("accFreebaseF" . ((accordion "Freebase" "F") #f 0 -1 0)) + ("accFreebaseE" . ((accordion "Freebase" "E") #f 0 -1 0)) + ("accFreebaseFE" . ((accordion "Freebase" "FE") #f 0 -1 0)) + ("accBayanbase" . ((accordion "Bayanbase" "") #f 0 -1 0)) + ("accBayanbaseT" . ((accordion "Bayanbase" "T") #f 0 -1 0)) + ("accBayanbaseE" . ((accordion "Bayanbase" "E") #f 0 -1 0)) + ("accBayanbaseTE" . ((accordion "Bayanbase" "TE") #f 0 -1 0)) + ("accBayanbaseEE" . ((accordion "Bayanbase" "EE") #f 0 -1 0)) + ("accBayanbaseTEE" . ((accordion "Bayanbase" "TEE") #f 0 -1 0)) + ("accStdbase" . ((accordion "Stdbase" "") #f 0 -1 0)) + ("accStdbaseFE" . ((accordion "Stdbase" "FE") #f 0 -1 0)) + ("accStdbaseTFE" . ((accordion "Stdbase" "TFE") #f 0 -1 0)) + ("accStdbaseMES" . ((accordion "Stdbase" "MES") #f 0 -1 0)) + ("accStdbaseTFMES" . ((accordion "Stdbase" "TFMES") #f 0 -1 0)) + + ("accSB" . ((accordion "SB" "") #f 0 -1 0)) + ("accBB" . ((accordion "BB" "") #f 0 -1 0)) + ("accOldEE" . ((accordion "OldEE" "") #f 0 -1 0)) + ("accOldEES" . ((accordion "OldEES" "") #f 0 -1 0))) + default-script-alist) )