From 8e25b11a9f3dbf7854e41d35e9dd6dd8a66986e4 Mon Sep 17 00:00:00 2001 From: Rune Zedeler Date: Sun, 9 Dec 2001 08:24:06 +0100 Subject: [PATCH] patch::: 1.5.25.rz1: accidentals 1.5.25.rz1 2001-12-09 Rune Zedeler * lily/lily-guile.cc: Added ly_assoc_front_x() and ly_assoc_cdr() (FIXME: not accessible from guile) * lily/accidental-engraver.cc: rewrote accidental-routines to get better support for Kurt Stone's suggestions. Removed properties: noResetKey, forgetAccidentals, autoReminders, lazyKeySignature. Changed property: localKeySignature. Added properties: extraNatural, autoAccidentals, autoCautionaries. (BUGFIX: broken-tie-support destroyed in 1.5.16) * ly/property-init.ly: added commands \defaultAccidentals \modernAccidentals \modernCautionaries \noResetKey \forgetAccidentals * ly/engraver-init.ly: Correct initialization of new accidentals. * scm/translator-property-description.scm: The new properties added. * input/: Some examples added, some changed. * Documentation/regression-test.tely: Added quick test of new accidentals. --- ChangeLog | 27 ++++ Documentation/regression-test.tely | 13 +- VERSION | 2 +- input/regression/accidental-octave.ly | 76 ++++++++++++ input/regression/accidental-single-double.ly | 4 +- input/regression/accidentals.ly | 71 +++++++++++ input/test/accidentals.ly | 23 ---- lily/accidental-engraver.cc | 122 +++++++++++-------- lily/include/lily-guile.hh | 7 ++ lily/lily-guile.cc | 18 +++ ly/engraver-init.ly | 4 + ly/property-init.ly | 45 ++++++- scm/music-functions.scm | 12 -- scm/translator-property-description.scm | 53 ++++---- 14 files changed, 366 insertions(+), 111 deletions(-) create mode 100644 input/regression/accidental-octave.ly create mode 100644 input/regression/accidentals.ly diff --git a/ChangeLog b/ChangeLog index e30cf2f8fd..df4321bea5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2001-12-09 Rune Zedeler + * lily/lily-guile.cc: Added ly_assoc_front_x() and ly_assoc_cdr() + (FIXME: not accessible from guile) + + * lily/accidental-engraver.cc: rewrote accidental-routines to get + better support for Kurt Stone's suggestions. + Removed properties: noResetKey, forgetAccidentals, autoReminders, + lazyKeySignature. + Changed property: localKeySignature. + Added properties: extraNatural, autoAccidentals, + autoCautionaries. + (BUGFIX: broken-tie-support destroyed in 1.5.16) + + * ly/property-init.ly: added commands + \defaultAccidentals \modernAccidentals \modernCautionaries + \noResetKey \forgetAccidentals + + * ly/engraver-init.ly: Correct initialization of new accidentals. + + * scm/translator-property-description.scm: The new properties + added. + + * input/: Some examples added, some changed. + + * Documentation/regression-test.tely: Added quick test of new + accidentals. + 2001-12-05 Han-Wen Nienhuys * bibtools/bib2html.py: Add simple bib2html convertor, and .bst diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 3876f3b648..0f7791c577 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -35,14 +35,23 @@ documenting bugfixes. @lilypondfile[printfilename]{dots.ly} -@lilypondfile[printfilename]{accidental.ly} - @lilypondfile[printfilename]{multi-measure-rest.ly} @lilypondfile[printfilename]{mm-rests2.ly} + +@section Accidentals + +Accidentals are currently in a development stage. + +@lilypondfile[printfilename]{accidental.ly} + @lilypondfile[printfilename]{accidental-single-double.ly} +@lilypondfile[printfilename]{accidentals.ly} + +@lilypondfile[printfilename]{accidental-octave.ly} + @section Stems diff --git a/VERSION b/VERSION index 65adfb75d9..4c89cef31a 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 PATCH_LEVEL=25 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=rz1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/regression/accidental-octave.ly b/input/regression/accidental-octave.ly new file mode 100644 index 0000000000..11962c970e --- /dev/null +++ b/input/regression/accidental-octave.ly @@ -0,0 +1,76 @@ +\version "1.5.24.rz2" + +\header { +texidoc=" +This shows how accidentals in different octaves are handled. +" +} + +#(define (lo-octave p) + (let* ((a (pitch-alteration p)) + (n (pitch-notename p))) + (make-pitch -1 n a))) + +#(define (no-octaves music) + (let* ((es (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (p (ly-get-mus-property music 'pitch))) + + (if (pair? es) + (ly-set-mus-property + music 'elements + (map no-octaves es))) + + (if (music? e) + (ly-set-mus-property + music 'element + (no-octaves e))) + + (if (pitch? p) + (begin + (set! p (lo-octave p)) + (ly-set-mus-property music 'pitch p))) + + + music)) + + +\include "paper16.ly" + +mel = \notes \transpose c'' { + \time 4/4 \key d \major + gis4 g' g gis' | gis2 g' | g1 | gis | g | gis' | g | + fis4 f' f fis' | fis2 f' | f1 | fis | f | fis' | f | + \bar "|." \break +} + +mus = \notes { + \mel + \property Score.oneMeasureLazy = ##t + \property Score.autoAccidentals = #'((measure-same-octave . 0)) + < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'((measure-same-octave . 0))" \mel > + \property Score.autoAccidentals = #'((measure-same-octave . 1)) + < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'((measure-same-octave . 1))" \mel > + \property Score.autoAccidentals = #'((measure-any-octave . 0)) + < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'((measure-any-octave . 0))" \mel > + \property Score.autoAccidentals = #'((measure-any-octave . 1)) + < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'((measure-any-octave . 1))" \mel > + \modernAccidentals + < s1^""^""^"$\\backslash$modernAccidentals" \mel > + \modernCautionaries + < s1^""^""^"$\\backslash$modernCautionaries" \mel > + \noResetKey + < s1^""^""^"$\\backslash$noResetKey" \mel > + \forgetAccidentals + < s1^""^""^"$\\backslash$forgetAccidentals" \mel > +} + + +\score { + < \context Staff \mus + \context NoteNames \apply #no-octaves \mus + > + \paper { + indent=0.0 + } +} diff --git a/input/regression/accidental-single-double.ly b/input/regression/accidental-single-double.ly index f7676f85ca..cffcbac459 100644 --- a/input/regression/accidental-single-double.ly +++ b/input/regression/accidental-single-double.ly @@ -13,12 +13,12 @@ thenotes = \notes \relative cis' { \time 4/4 gisis'4 gis gisis ges | geses ges geses gis | gisis g geses g | -gis g ges g | +gis ges gis g | \key a \major gisis4 gis gisis ges | geses ges geses gis | gisis g geses g | -gis g ges g | +gis ges gis g | } \score { < \context Staff \thenotes diff --git a/input/regression/accidentals.ly b/input/regression/accidentals.ly new file mode 100644 index 0000000000..71a534d1b4 --- /dev/null +++ b/input/regression/accidentals.ly @@ -0,0 +1,71 @@ +\version "1.5.24.rz2" + +\header{ +texidoc=" +This shows how accidentals are handled. +" +} + +#(define (lo-octave p) + (let* ((a (pitch-alteration p)) + (n (pitch-notename p))) + (make-pitch -1 n a))) + +#(define (no-octaves music) + (let* ((es (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (p (ly-get-mus-property music 'pitch))) + + (if (pair? es) + (ly-set-mus-property + music 'elements + (map no-octaves es))) + + (if (music? e) + (ly-set-mus-property + music 'element + (no-octaves e))) + + (if (pitch? p) + (begin + (set! p (lo-octave p)) + (ly-set-mus-property music 'pitch p))) + + + music)) + + +mel = \notes { \key d \major \time 4/4 + d4 dis dis8 dis, d4 | d dis disis8 d, dis4 | d des disis8 dis, d4 | dis deses d dis ~ | dis dis ~ dis8 d, dis4 ~ | \break + dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis ~ cis cis \bar "|." | \break +} + +\score { \notes + < + \context Staff \transpose c''' { + \mel + \property Score.oneMeasureLazy = ##t + \property Score.autoAccidentals = #'((measure-same-octave . 0)) + < s1^"$\\backslash$property Score.autoAccidentals = \\#'((measure-same-octave . 0))" \mel > + \property Score.autoAccidentals = #'((measure-same-octave . 1)) + < s1^"$\\backslash$property Score.autoAccidentals = \\#'((measure-same-octave . 1))" \mel > + \property Score.autoAccidentals = #'((measure-any-octave . 0)) + < s1^"$\\backslash$property Score.autoAccidentals = \\#'((measure-any-octave . 0))" \mel > + \property Score.autoAccidentals = #'((measure-any-octave . 1)) + < s1^"$\\backslash$property Score.autoAccidentals = \\#'((measure-any-octave . 1))" \mel > + \modernAccidentals + < s1^"$\\backslash$modernAccidentals" \mel > + \modernCautionaries + < s1^"$\\backslash$modernCautionaries" \mel > + \noResetKey + < s1^"$\\backslash$noResetKey" \mel > + \forgetAccidentals + < s1^"$\\backslash$forgetAccidentals" \mel > + } + \context NoteNames \repeat unfold 9 \apply #no-octaves \mel + > + \paper { + indent = 0.0 + } +} + diff --git a/input/test/accidentals.ly b/input/test/accidentals.ly index 294ca11db3..e69de29bb2 100644 --- a/input/test/accidentals.ly +++ b/input/test/accidentals.ly @@ -1,23 +0,0 @@ -% \version "1.5.15.rz1" - -mel = \notes { - d4 dis dis d | d dis disis dis | d des disis d | dis deses d dis ~ | dis dis ~ dis dis ~ | \break - dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis ~ cis cis \bar "|." | \break -} - -\score { \notes \context Staff \transpose c''' { - \key d \major - \mel - \property Score.autoReminders = #'cautionary - < s1^"$\\backslash$property Score.autoReminders = \\#'cautionary" \mel > - \property Score.autoReminders = #'accidental - < s1^"$\\backslash$property Score.autoReminders = \\#'accidental" \mel > - \property Score.autoReminders = ##f - \property Score.forgetAccidentals = ##t - < s1^"$\\backslash$property Score.forgetAccidentals = \\#\\#t" \mel > - \property Score.forgetAccidentals = ##f - \property Score.noResetKey = ##t - < s1^"$\\backslash$property Score.noResetKey = \\#\\#t" \mel > - } -} - diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index 65b83a1b61..015b515e66 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -18,6 +18,7 @@ #include "side-position-interface.hh" #include "engraver.hh" #include "arpeggio.hh" +#include "warn.hh" /** @@ -59,6 +60,7 @@ public: }; + Accidental_engraver::Accidental_engraver () { key_item_p_ =0; @@ -70,7 +72,6 @@ Accidental_engraver::initialize () { last_keysig_ = get_property ("keySignature"); daddy_trans_l_->set_property ("localKeySignature", last_keysig_); - daddy_trans_l_->set_property ("lazyKeySignature", last_keysig_); } /** calculates the number of accidentals on basis of the current local key sig @@ -79,61 +80,96 @@ Accidental_engraver::initialize () * Negative (-1 or -2) if accidental has changed. **/ static int -number_accidentals (SCM sig, Note_req * note_l) +number_accidentals (SCM sig, Note_req * note_l, SCM curbarnum, SCM lazyness, + bool ignore_octave_b) { Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch")); int n = pitch->notename_i_; - int o = pitch->octave_i () ; + int o = pitch->octave_i_; int a = pitch->alteration_i_; - - SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig); - if (prev == SCM_BOOL_F) - prev = scm_assoc (gh_int2scm (n), sig); + int curbarnum_i = gh_scm2int(curbarnum); + int accbarnum_i = 0; + SCM prev; + if (ignore_octave_b) + prev = ly_assoc_cdr (gh_int2scm (n), sig); + else + prev = gh_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig); + /* should really be true unless prev==SCM_BOOL_F */ + if(gh_pair_p(prev) && gh_pair_p(ly_cdr(prev))) { + accbarnum_i = gh_scm2int(ly_cddr(prev)); + prev = gh_cons(ly_car(prev),ly_cadr(prev)); + } + /* If an accidental was not found or the accidental was too old */ + if (prev == SCM_BOOL_F || + (gh_number_p(lazyness) && curbarnum_i>accbarnum_i+gh_scm2int(lazyness))) + prev = gh_assoc (gh_int2scm (n), sig); SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev); - bool different = !gh_equal_p (prev_acc , gh_int2scm (a)); int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0; int num; - if (a==p && !to_boolean (note_l->get_mus_property ("force-accidental"))) num=0; + if (a==p && !to_boolean (note_l->get_mus_property ("force-accidental")) && gh_number_p(prev_acc)) num=0; else if ( (abs(a)get_mus_property ("cautionary")); - if (to_boolean (get_property ("noResetKey"))) { - num = lazy_num; - different = lazy_diff; - } - else if (gh_equal_p (get_property ("autoReminders"),ly_symbol2scm("cautionary")) - || gh_equal_p (get_property ("autoReminders"),ly_symbol2scm("accidental"))) { - num = max(local_num,lazy_num); - if (gh_equal_p (get_property ("autoReminders"),ly_symbol2scm("cautionary")) - && lazy_num>local_num) - cautionary = true; + if (abs(num_caut)>abs(num)) { + num=num_caut; + cautionary=true; } + bool different=num<0; + num=abs(num); /* see if there's a tie that "changes" the accidental */ /* works because if there's a tie, the note to the left @@ -176,7 +212,7 @@ Accidental_engraver::create_grobs () Local_key_item::add_pitch (key_item_p_, *unsmob_pitch (note_l->get_mus_property ("pitch")), cautionary, - num==2, + num==2 && extra_natural_b, tie_break_reminder); Side_position_interface::add_support (key_item_p_,support_l); } @@ -188,40 +224,37 @@ Accidental_engraver::create_grobs () Checking whether it is tied also works mostly, but will it always do the correct thing? - (???? -Rune ) */ Pitch *pitch = unsmob_pitch (note_l->get_mus_property ("pitch")); int n = pitch->notename_i_; - int o = pitch->octave_i () ; + int o = pitch->octave_i_; int a = pitch->alteration_i_; SCM on = gh_cons (gh_int2scm (o), gh_int2scm (n)); - bool forget = to_boolean (get_property ("forgetAccidentals")); if (tie_changes) { /* Remember an alteration that is different both from that of the tied note and of the key signature. */ - localsig = scm_assoc_set_x (localsig, on, SCM_BOOL_T); - lazysig = scm_assoc_set_x (lazysig, on, SCM_BOOL_T); + localsig = ly_assoc_front_x + (localsig, on, gh_cons(SCM_BOOL_T,barnum)); } - else if (!forget) + else { /* not really really correct if there are more than one noteheads with the same notename. */ - localsig = scm_assoc_set_x (localsig, on, gh_int2scm (a)); - lazysig = scm_assoc_set_x (lazysig, on, gh_int2scm (a)); + localsig = ly_assoc_front_x + (localsig, on, gh_cons(gh_int2scm (a),barnum)); } } daddy_trans_l_->set_property ("localKeySignature", localsig); - daddy_trans_l_->set_property ("lazyKeySignature", lazysig); } - + if (key_item_p_) { /* @@ -296,19 +329,12 @@ Accidental_engraver::process_music () SCM sig = get_property ("keySignature"); - /* - Detect key sig changes. If we haven't found any, check if at start - of measure, and set localKeySignature anyhow. */ + /* Detect key sig changes. */ if (last_keysig_ != sig) { daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); - daddy_trans_l_->set_property ("lazyKeySignature", ly_deep_copy (sig)); last_keysig_ = sig; } - else if (!mp.to_bool () ) - { - daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); - } } @@ -321,5 +347,5 @@ events. Due to interaction with ties (which don't come together with note heads), this needs to be in a context higher than Tie_engraver. FIXME", /* creats*/ "Accidentals", /* acks */ "rhythmic-head-interface tie-interface arpeggio-interface", -/* reads */ "localKeySignature forgetAccidentals noResetKey autoReminders", -/* write */ ""); +/* reads */ "localKeySignature extraNatural autoAccidentals autoCautionaries", +/* write */ "localKeySignature"); diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 55aafc98c7..26c2a8a300 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -133,9 +133,11 @@ String ly_symbol2string (SCM); SCM ly_offset2scm (Offset); Offset ly_scm2offset (SCM); SCM ly_assoc_chain (SCM key, SCM achain); +SCM ly_assoc_cdr (SCM key, SCM alist); Interval ly_scm2interval (SCM); SCM ly_interval2scm (Interval); + SCM ly_parse_scm (char const* s, int* n); SCM ly_quote_scm (SCM s); SCM ly_type (SCM); @@ -153,6 +155,11 @@ inline SCM ly_cddr (SCM x) { return SCM_CDDR (x); } inline SCM ly_caddr (SCM x) { return SCM_CADDR (x); } inline SCM ly_cdadr (SCM x) { return SCM_CDADR (x); } inline SCM ly_caadr (SCM x) { return SCM_CAADR (x); } +/* inserts at front, removing dublicates */ +inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val) +{ + return scm_acons(key, val, scm_assoc_remove_x (alist, key)); +} inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); } inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); } inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index a427155491..2cf476fbbf 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -22,6 +22,7 @@ #include "direction.hh" #include "offset.hh" #include "interval.hh" +#include "pitch.hh" SCM ly_last (SCM list) @@ -519,6 +520,23 @@ ly_assoc_chain (SCM key, SCM achain) return SCM_BOOL_F; } +/* looks the key up in the cdrs of the alist-keys + - ignoring the car and ignoring non-pair keys. + Returns first match found. */ +SCM +ly_assoc_cdr (SCM key, SCM alist) +{ + if (gh_pair_p (alist)) { + SCM trykey = ly_caar(alist); + if(gh_pair_p(trykey) && to_boolean(scm_equal_p(key,ly_cdr(trykey)))) + return ly_car(alist); + else + return ly_assoc_cdr (key, ly_cdr (alist)); + } + else + return SCM_BOOL_F; +} + /* LIST has the form "sym1 sym2 sym3" */ diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 1df040265a..691dcb2aaf 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -382,6 +382,10 @@ ScoreContext = \translator { tupletNumberFormatFunction = #denominator-tuplet-formatter subdivideBeams = ##f + extraNatural = ##t + autoAccidentals = #'((measure-same-octave . 0)) + autoCautionaries = #'() + keyAccidentalOrder = #'( (6 . -1) (2 . -1) (5 . -1 ) (1 . -1) (4 . -1) (0 . -1) (3 . -1) diff --git a/ly/property-init.ly b/ly/property-init.ly index 1d26dc2a03..4b200d509b 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -160,8 +160,51 @@ fatText = \property Voice.textNonEmpty = ##t showStaffSwitch = \property PianoStaff.followVoice = ##t hideStaffSwitch = \property PianoStaff.followVoice = ##f +% FIXME: Move this docu (to where?) -% To remove a Volta bracet or some other graphical object, +% accidentals as they were common in the 18th century. +defaultAccidentals = { + \property Score.extraNatural = ##t + \property Score.autoAccidentals = #'((measure-same-octave . 0)) + \property Score.autoCautionaries = #'() +} + +% accidentals as suggested by Kurt Stone, Music Notation in the 20th century. +% This includes all the default accidentals, but accidentals also needs cancelling +% in other octaves and in the next measure. +modernAccidentals = { + \property Score.extraNatural = ##f + \property Score.autoAccidentals = #'((measure-same-octave . 0) (measure-any-octave . 0) (measure-any-octave . 1)) + \property Score.autoCautionaries = #'() +} + +% the accidentals that Stone adds to the old standard as cautionaries +modernCautionaries = { + \property Score.extraNatural = ##f + \property Score.autoAccidentals = #'((measure-same-octave . 0)) + \property Score.autoCautionaries = #'((measure-any-octave . 0) (measure-any-octave . 1)) +} + +% Do not reset the key at the start of a measure. Accidentals will be +% printed only once and are in effect until overridden, possibly many +% measures later. +noResetKey = { + \property Score.autoAccidentals = #'((measure-same-octave . #t)) + \property Score.autoCautionaries = #'() +} + +% do not set localKeySignature when a note alterated differently from +% localKeySignature is found. +% Causes accidentals to be printed at every note instead of +% remembered for the duration of a measure. +% accidentals not being remembered, causing accidentals always to be typeset relative to the time signature +forgetAccidentals = { + \property Score.autoAccidentals = #'((measure-same-octave . -1)) + \property Score.autoCautionaries = #'() +} + + +% To remove a Volta bracket or some other graphical object, % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff turnOff = #'() diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 98127c076f..6d2257b7e6 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -14,8 +14,6 @@ This function replaces all repeats with unfold repeats. It was written by Rune Zedeler. " (let* ((es (ly-get-mus-property music 'elements)) (e (ly-get-mus-property music 'element)) - (body (ly-get-mus-property music 'body)) - (alts (ly-get-mus-property music 'alternatives)) (n (ly-music-name music))) (if (equal? n "Repeated_music") @@ -30,16 +28,6 @@ written by Rune Zedeler. " music 'elements (map unfold-repeats es))) - (if (music? alts) - (ly-set-mus-property - music 'alternatives - (unfold-repeats alts))) - - (if (music? body) - (ly-set-mus-property - music 'body - (unfold-repeats body))) - (if (music? e) (ly-set-mus-property music 'element diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm index 7400a25972..f5b1adaf40 100644 --- a/scm/translator-property-description.scm +++ b/scm/translator-property-description.scm @@ -78,21 +78,42 @@ The head of the list: @end example") +(translator-property-description 'autoAccidentals list? "List of +different ways to typeset an accidental. All algorithms in the list +are tried, and the one returning the most accidentals is used. +Each algorithm-description is a name-value pair. +The algorithms are: +@table @samp +@item measure-same-octave: +This is the default algorithm. Accidentals are typeset if the note changes +the accidental of that note in that octave. Accidentals lasts to the end of the measure +and then as many measures as specified in the value. I.e. 1 means to the end +of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. +@item measure-any-octave: +Accidentals are typeset if the note is different from +the previous note on the same pitch in any octave. The value has same meaning as in +measure-same-octave. +@end table +") + +(translator-property-description 'autoCautionaries list? "List similar to +autoAccidentals, but it controls cautionary accidentals rather than +normal ones. Both lists are tried, and the one giving the most accidentals +wins. In case of draw, a normal accidental is typeset. +") + (translator-property-description 'automaticPhrasing boolean? " If set, the @ref{Lyric_phrasing_engraver} will match note heads of context called Voice X to syllables from LyricsVoice called X-. This feature is turned on by default. See the example file @file{lyrics-multi-stanza.ly}. - ") + (translator-property-description 'automaticMelismata boolean? " If set, \addlyrics will assume that beams, slurs and ties signal melismata, and align lyrics accordingly. ") -(translator-property-description 'autoReminders symbol? "If set to @samp{accidental} or @samp{cautionary}, -a (reminder) accidental automatically is inserted whenever an accidental is reverted - even after a bar.") - (translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note. ") (translator-property-description 'barCheckNoSynchronize boolean? "If set, don't reset measurePosition when finding a bbarcheck. This @@ -178,7 +199,10 @@ procedure? "visibility-lambda function for explicit Key changes; \override of #'visibility-lambda will set the visibility for normal (ie. at the start of the line) key signatures.") - +(translator-property-description 'extraNatural boolean? "Whether to typeset an +extra natural sign before accidentals changing from a non-natural to +another non-natural. +") (translator-property-description 'followVoice boolean? "if set, note heads are tracked across staff switches by a thin line") (translator-property-description 'fontSize integer? @@ -186,13 +210,6 @@ procedure? "visibility-lambda function for explicit Key changes; in a context. This is done using the @code{Font_size_engraver}.") (translator-property-description 'forceClef boolean? "Show clef symbol, even if it hasn't changed. Only active for the first clef after the property is set, not for the full staff.") -(translator-property-description 'forgetAccidentals boolean? "do -not set localKeySignature when a note alterated differently from -localKeySignature is found. - -Causes accidentals to be printed at every note instead of -remembered for the duration of a measure. -") (translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental") (translator-property-description 'graceAlignPosition dir? "put the grace note before or after the main note?") (translator-property-description 'instr markup? "see @code{instrument}") @@ -211,13 +228,13 @@ remembered for the duration of a measure. Alist that defines in what order alterations should be printed. The format is (NAME . ALTER), where NAME is from 0 .. 6 and ALTER from -1, 1. ") -(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) or ((OCTAVE . NAME) . ALTER) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2 ") +(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) or ((OCTAVE . NAME) . ALTER) or ((OCTAVE . NAME) . (ALTER . BARNUMBER)) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2. The optional barnumber contains the number of the measure of the accidental. FIXME: describe broken tie entries.") (translator-property-description 'lastKeySignature list? "Last key signature before a key signature change.") (translator-property-description 'localKeySignature list? "the key -signature at this point in the measure. The format is the same as for keySignature. " +signature at this point in the measure. The format is the same as for keySignature. Is reset at every bar line." ) (translator-property-description 'measureLength moment? "Length of one @@ -236,14 +253,6 @@ MIDI instrument to use ") (translator-property-description 'noAutoBeaming boolean? "If set to true then beams are not generated automatically. ") (translator-property-description 'noDirection boolean? "Don't set directions by a2-engraver when part-combining.") -(translator-property-description 'noResetKey boolean? "Do not -reset local key to the value of keySignature at the start of a measure, -as determined by measurePosition. - -Do not reset the key at the start of a measure. Accidentals will be -printed only once and are in effect until overridden, possibly many -measures later. -") (translator-property-description 'oneBeat moment? " How long does one beat in the current time signature last?") (translator-property-description 'pedalSustainStrings list? "List of string to print for sustain-pedal. Format is (UP UPDOWN DOWN), where each of the three is the string to print when -- 2.39.5