-2002-03-20 Jan Nieuwenhuizen <janneke@gnu.org>
+--- ../lilypond-1.5.43/ChangeLog Tue Mar 19 01:50:26 2002
+++ b/ChangeLog Wed Mar 20 02:24:52 2002
+@@ -1,3 +1,29 @@
+2002-03-20 Rune Zedeler <rune@zedeler.dk>
+
+ * lily/beaming-info.cc: Stupid typo fixed
+
+ * lily/accidental-engraver.cc: rewrote accidental-routines to get
+ support for cross-context auto-accidentals.
+ Now the engraver can stay in Staff-context and see other contexts
+ from there.
+ Changed properties: autoAccidentals, autoCautionaries
+
+ * lily/translator-group.cc (set_children_property):
+ Function added recursively setting the same property (deep_copied)
+ for all children of a Translator_group.
+
+ * ly/property-init.ly: added commands
+ \pianoAccidentals \voiceAccidentals
+ \modernVoiceAccidentals \modernVoiceCautionaries
+
+ * ly/engraver-init.ly: Correct initialization of new accidentals.
+
+ * scm/translator-property-description.scm: Updated
+
+ * input/regression/accidental-voice.ly: Added
+
+ * Documentation/regression-test.tely: Added new test
+
+ 2002-03-19 Han-Wen <hanwen@cs.uu.nl>
+
+ * VERSION: 1.5.43 released2002-03-20 Jan Nieuwenhuizen <janneke@gnu.org>
* mf/GNUmakefile (lilypond.map): Don't prepend TeX to font name
(this fixes pdf output). Drop awk dependency.
@lilypondfile[printfilename]{accidental-octave.ly}
+@lilypondfile[printfilename]{accidental-voice.ly}
+
@section Stems
@item @email{august@@infran.ru, August S.Sigov}
Russian translation
@item @email{rune@@zedeler.dk, Rune Zedeler}
- Drum notation, beaming and accidental fixes
+ Drum notation, beaming and auto-accidental changes. Font updates. Misc fixes.
@end itemize
@bye
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=43
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=rz1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
-\version "1.5.24.rz2"
+\version "1.5.43.rz1"
\header {
texidoc="
This shows how accidentals in different octaves are handled.
+Fixme: Shorten and docu
"
}
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 >
+ \property Score.autoAccidentals = #'(Staff (same-octave . 0))
+ < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (same-octave . 0))" \mel >
+ \property Score.autoAccidentals = #'(Staff (same-octave . 1))
+ < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (same-octave . 1))" \mel >
+ \property Score.autoAccidentals = #'(Staff (any-octave . 0))
+ < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (any-octave . 0))" \mel >
+ \property Score.autoAccidentals = #'(Staff (any-octave . 1))
+ < s1^""^""^"$\\backslash$property Score.autoAccidentals = \\#'(Staff (any-octave . 1))" \mel >
\modernAccidentals
< s1^""^""^"$\\backslash$modernAccidentals" \mel >
\modernCautionaries
--- /dev/null
+\version "1.5.43.rz1"
+
+\header{
+texidoc="
+This shows how modern cross voice auto cautionary accidentals are handled.
+The first two fisses get accidentals because they belong to different voices.
+The first f gets cautionary natural because of previous measure.
+The last f gets cautionary natural because fis was only in the other voice.
+"
+}
+
+#(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))
+
+voicea = \notes \transpose c'' {
+ \stemUp
+ fis2 a2 f4 fis a2
+}
+voiceb = \notes \transpose c'' {
+ \stemDown
+ c2 fis2 f4 c f2
+}
+
+\score {
+ <
+ \notes
+ \context NoteNames=namesa \apply #no-octaves \voicea
+ \context Staff <
+ \modernVoiceCautionaries
+ \context Voice = voicea \voicea
+ \context Voice = voiceb \voiceb
+ >
+ \context NoteNames=namesb \apply #no-octaves \voiceb
+ >
+}
-\version "1.5.24.rz2"
+\version "1.5.43.rz1"
\header{
texidoc="
\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 >
+ \property Score.autoAccidentals = #'(Staff (same-octave . 0))
+ < s1^"$\\backslash$property Score.autoAccidentals = \\#'((same-octave . 0))" \mel >
+ \property Score.autoAccidentals = #'(Staff (same-octave . 1))
+ < s1^"$\\backslash$property Score.autoAccidentals = \\#'((same-octave . 1))" \mel >
+ \property Score.autoAccidentals = #'(Staff (any-octave . 0))
+ < s1^"$\\backslash$property Score.autoAccidentals = \\#'((any-octave . 0))" \mel >
+ \property Score.autoAccidentals = #'(Staff (any-octave . 1))
+ < s1^"$\\backslash$property Score.autoAccidentals = \\#'((any-octave . 1))" \mel >
\modernAccidentals
< s1^"$\\backslash$modernAccidentals" \mel >
\modernCautionaries
accidental-engraver.cc -- implement accidental_engraver
(c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
- Modified 2001 by Rune Zedeler <rz@daimi.au.dk>
+ Modified 2001-2002 by Rune Zedeler <rz@daimi.au.dk>
*/
#include "musical-request.hh"
#include "arpeggio.hh"
#include "warn.hh"
+#include "translator-group.hh"
+
/**
virtual void finalize ();
public:
- // todo -> property
+ // todo -> property (why? -rz)
SCM last_keysig_;
/*
Link_array<Grob> head_l_arr_;
Link_array<Item> forced_l_arr_;
Link_array<Grob> tie_l_arr_;
+ Link_array<Translator_group> origin_l_arr_;
};
Accidental_engraver::initialize ()
{
last_keysig_ = get_property ("keySignature");
- daddy_trans_l_->set_property ("localKeySignature", last_keysig_);
+
+ Translator_group * trans_ = daddy_trans_l_;
+ while (trans_) {
+ trans_ -> set_property ("localKeySignature", ly_deep_copy(last_keysig_));
+ trans_ = trans_->daddy_trans_l_;
+ }
+ daddy_trans_l_->set_children_property("localKeySignature",last_keysig_);
+
}
/** calculates the number of accidentals on basis of the current local key sig
- * (passed as argument).
+ * (passed as argument)
* Returns number of accidentals (0, 1 or 2).
* Negative (-1 or -2) if accidental has changed.
**/
+// FIXME: Use references for SCM-values
static int
number_accidentals (SCM sig, Note_req * note_l, SCM curbarnum, SCM lazyness,
bool ignore_octave_b)
return a==p ? num : -num;
}
-static int
-number_accidentals (SCM localsig, Note_req * note_l, SCM accidentals_l,
- SCM curbarnum) {
+int
+number_accidentals (Note_req * note_l, Translator_group * origin_l,
+ SCM accidentals_sl, SCM curbarnum_s) {
int number=0;
int diff=0;
- while(gh_pair_p(accidentals_l)) {
- if(gh_pair_p(ly_car(accidentals_l))) {
- SCM type = gh_caar(accidentals_l);
- SCM lazyness = gh_cdar(accidentals_l);
- bool measure_same_octave_b =
- gh_eq_p(ly_symbol2scm("measure-same-octave"),type);
- bool measure_any_octave_b =
- gh_eq_p(ly_symbol2scm("measure-any-octave"),type);
- if(measure_same_octave_b || measure_any_octave_b) {
+ if(gh_pair_p(accidentals_sl) && !gh_symbol_p(ly_car(accidentals_sl)))
+ warning(_f("Accidental typesetting list must begin with context-name: %s",
+ ly_scm2string(ly_car(accidentals_sl)).ch_C()));
+ while(gh_pair_p(accidentals_sl) && origin_l) {
+ // If pair then it is a new accidentals typesetting rule to be checked
+ if(gh_pair_p(ly_car(accidentals_sl))) {
+ SCM type = gh_caar(accidentals_sl);
+ SCM lazyness = gh_cdar(accidentals_sl);
+ SCM localsig = origin_l->get_property ("localKeySignature");
+ bool same_octave_b =
+ gh_eq_p(ly_symbol2scm("same-octave"),type);
+ bool any_octave_b =
+ gh_eq_p(ly_symbol2scm("any-octave"),type);
+ if(same_octave_b || any_octave_b) {
int n = number_accidentals
- (localsig,note_l,curbarnum,lazyness,measure_any_octave_b);
+ (localsig,note_l,curbarnum_s,lazyness,any_octave_b);
diff |= n<0;
number = max(number,abs(n));
}
- else warning(_f("unknown accidental typesetting: %s",
+ else warning(_f("unknown accidental typesetting: %s. Ignored",
ly_symbol2string(type).ch_C()));
}
- else warning(_f("Accidental typesetting must be pair: %s",
- ly_scm2string(ly_car(accidentals_l)).ch_C()));
- accidentals_l = ly_cdr(accidentals_l);
+ // if symbol then it is a context name. Scan parent contexts to find it.
+ else if (gh_symbol_p(ly_car(accidentals_sl))) {
+ String context = ly_symbol2string(ly_car(accidentals_sl));
+ while (origin_l && !origin_l->is_alias_b(context)) {
+ origin_l = origin_l->daddy_trans_l_;
+ }
+ if (!origin_l)
+ warning(_f("Symbol is not a parent context: %s. Ignored",
+ context.ch_C()));
+ }
+ else warning(_f("Accidental typesetting must be pair or context-name: %s",
+ ly_scm2string(ly_car(accidentals_sl)).ch_C()));
+ accidentals_sl = ly_cdr(accidentals_sl);
}
return diff ? -number : number;
}
{
if (!key_item_p_ && mel_l_arr_.size ())
{
- SCM localsig = get_property ("localKeySignature");
- SCM accidentals_l = get_property ("autoAccidentals");
- SCM cautionaries_l = get_property ("autoCautionaries");
+ //SCM localsig = get_property ("localKeySignature");
+ SCM accidentals_sl = get_property ("autoAccidentals");
+ SCM cautionaries_sl = get_property ("autoCautionaries");
SCM barnum = get_property ("currentBarNumber");
bool extra_natural_b = get_property ("extraNatural")==SCM_BOOL_T;
{
Grob * support_l = head_l_arr_[i];
Note_req * note_l = mel_l_arr_[i];
+ Translator_group * origin_l = origin_l_arr_[i];
- int num = number_accidentals(localsig,note_l,accidentals_l,barnum);
- int num_caut = number_accidentals(localsig,note_l,cautionaries_l,barnum);
+ int num = number_accidentals(note_l,origin_l,accidentals_sl,barnum);
+ int num_caut = number_accidentals(note_l,origin_l,cautionaries_sl,barnum);
bool cautionary = to_boolean (note_l->get_mus_property ("cautionary"));
if (abs(num_caut)>abs(num))
{
Grob *tie_break_reminder = 0;
bool tie_changes = false;
- for (int i=0; i < tie_l_arr_.size (); i++)
- if (support_l == Tie::head (tie_l_arr_[i], RIGHT))
+ for (int j=0; j < tie_l_arr_.size (); j++)
+ if (support_l == Tie::head (tie_l_arr_[j], RIGHT))
{
tie_changes = different;
/* Enable accidentals for broken tie
Maybe check property noTieBreakForceAccidental? */
if (different)
- tie_break_reminder = tie_l_arr_[i];
+ tie_break_reminder = tie_l_arr_[j];
break;
}
int n = pitch->notename_i_;
int o = pitch->octave_i_;
int a = pitch->alteration_i_;
- SCM on = gh_cons (gh_int2scm (o), gh_int2scm (n));
- if (tie_changes)
- {
- /*
- Remember an alteration that is different both from
- that of the tied note and of the key signature.
- */
- localsig = ly_assoc_front_x
- (localsig, on, gh_cons(SCM_BOOL_T,barnum));
- }
- else
- {
- /*
- not really really correct if there are more than one
- noteheads with the same notename.
- */
- localsig = ly_assoc_front_x
- (localsig, on, gh_cons(gh_int2scm (a),barnum));
- }
- }
-
- daddy_trans_l_->set_property ("localKeySignature", localsig);
+ SCM on_s = gh_cons (gh_int2scm (o), gh_int2scm (n));
+
+ /*
+ TODO: Speed this up!
+ Perhaps only check translators mentioned in the auto-accidentals?
+ -rz
+ */
+ Translator_group * trans_ = origin_l_arr_[i];
+ while (trans_) {
+ SCM localsig = trans_->get_property ("localKeySignature");
+ if (tie_changes)
+ {
+ /*
+ Remember an alteration that is different both from
+ that of the tied note and of the key signature.
+ */
+ localsig = ly_assoc_front_x
+ (localsig, on_s, gh_cons(SCM_BOOL_T,barnum));
+ }
+ else
+ {
+ /*
+ not really really correct if there are more than one
+ noteheads with the same notename.
+ */
+ localsig = ly_assoc_front_x
+ (localsig, on_s, gh_cons(gh_int2scm (a),barnum));
+ }
+ trans_->set_property ("localKeySignature", localsig);
+ trans_ = trans_->daddy_trans_l_;
+ }
+ }
}
-
+
if (key_item_p_)
{
arpeggios_.clear ();
tie_l_arr_.clear ();
head_l_arr_.clear ();
- forced_l_arr_.clear ();
+ forced_l_arr_.clear ();
+ origin_l_arr_.clear ();
}
void
{
mel_l_arr_.push (note_l);
head_l_arr_.push (info.grob_l_);
+ origin_l_arr_.push (info.origin_trans_l_->daddy_trans_l_);
}
else if (Tie::has_interface (info.grob_l_))
{
SCM sig = get_property ("keySignature");
- /* Detect key sig changes. */
- if (last_keysig_ != sig)
- {
- daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig));
- last_keysig_ = sig;
+ /* Detect key sig changes.
+ Update all parents and children
+ */
+ if (last_keysig_ != sig) {
+ Translator_group * trans_ = daddy_trans_l_;
+ while (trans_) {
+ trans_ -> set_property ("localKeySignature", ly_deep_copy(sig));
+ trans_ = trans_->daddy_trans_l_;
}
+ daddy_trans_l_->set_children_property("localKeySignature",sig);
+
+ last_keysig_ = sig;
+ }
}
ENTER_DESCRIPTION(Accidental_engraver,
+/* The FIXME below is deprecated and should be removed. -rz */
/* descr */ "Make accidentals. Catches note heads, ties and notices key-change
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",
beat_pos = infos_[i].start_mom_ / beat_length;
int den = beat_pos.den ();
if (infos_[i].beams_i_drul_[LEFT] == infos_[i-1].beams_i_drul_[RIGHT] && !subdivide)
- den *= 4;
+ den *= 2;
if (den < minden)
{
minidx = i;
// egcs
typedef void (Translator::*Method_pointer) (void);
#define set_property(x,y) internal_set_property(ly_symbol2scm(x),y)
+#define set_children_property(x,y) internal_set_children_property(ly_symbol2scm(x),y)
class Scheme_hash_table;
void unset_property (SCM var_sym);
void internal_set_property (SCM var_sym, SCM value);
+ void internal_set_children_property (SCM var_sym, SCM value);
Translator_group *where_defined (SCM name_sym) const;
String id_str_;
properties_dict ()->set (sym, val);
}
+void
+Translator_group::internal_set_children_property (SCM sym, SCM val)
+{
+ internal_set_property (sym, val);
+ for (SCM p = trans_group_list_; gh_pair_p (p); p = ly_cdr(p)) {
+ Translator_group *trg = dynamic_cast<Translator_group*> (unsmob_translator (ly_car (p)));
+ trg->internal_set_children_property(sym,ly_deep_copy(val));
+ }
+}
+
/*
TODO: look up to check whether we have inherited var?
*/
MinimumVerticalExtent = #'(-4 . 4)
ExtraVerticalExtent = ##f
VerticalExtent = ##f
+ localKeySignature = #'()
% explicitly set instrument, so we don't get
% weird effects when doing instrument names for
MinimumVerticalExtent = ##f
ExtraVerticalExtent = ##f
VerticalExtent = ##f
-
+ localKeySignature = #'()
+
\accepts Staff
\name StaffContainer
}
alignmentReference = #0
\consists "System_start_delimiter_engraver"
systemStartDelimiter = #'SystemStartBracket
+ localKeySignature = #'()
\accepts "Staff"
\accepts "RhythmicStaff"
MinimumVerticalExtent = ##f
ExtraVerticalExtent = ##f
VerticalExtent = ##f
+ localKeySignature = #'()
\consists "Pitch_squash_engraver"
\consists "Separating_line_group_engraver"
\name Voice
Generic_property_list = #generic-voice-properties
+ localKeySignature = #'()
\consists "Font_size_engraver"
% must come before all
ThreadContext = \translator{
\type Engraver_group_engraver
\name Thread
+ localKeySignature = #'()
\consists "Font_size_engraver"
\consists "Thread_devnull_engraver"
GrandStaffContext=\translator{
\type "Engraver_group_engraver"
\name GrandStaff
+ localKeySignature = #'()
\consists "Span_bar_engraver"
\consists "Span_arpeggio_engraver"
\consists "System_start_delimiter_engraver"
PianoStaffContext = \translator{
\GrandStaffContext
\name "PianoStaff"
+ \alias "GrandStaff"
\consists "Vertical_align_engraver"
\consists "Instrument_name_engraver"
InnerStaffGroupContext= \translator {
\type "Engraver_group_engraver"
\name InnerStaffGroup
+ localKeySignature = #'()
\consists "Span_bar_engraver"
\consists "Span_arpeggio_engraver"
ScoreContext = \translator {
\type Score_engraver
\name Score
+ localKeySignature = #'()
\consists "Repeat_acknowledge_engraver"
\consists "Staff_collecting_engraver"
subdivideBeams = ##f
extraNatural = ##t
- autoAccidentals = #'((measure-same-octave . 0))
+ autoAccidentals = #'(Staff (same-octave . 0))
autoCautionaries = #'()
% accidentals as they were common in the 18th century.
defaultAccidentals = {
\property Score.extraNatural = ##t
- \property Score.autoAccidentals = #'((measure-same-octave . 0))
- \property Score.autoCautionaries = #'()
+ \property Score.autoAccidentals = #'(Staff (same-octave . 0))
+ \property Score.autoCautionaries = #'()
+}
+
+% accidentals in voices instead of staves.
+% Notice that accidentals from one voice do NOT get cancelled in other voices
+voiceAccidentals = {
+ \property Score.extraNatural = ##t
+ \property Score.autoAccidentals = #'(Voice (same-octave . 0))
+ \property Score.autoCautionaries = #'()
+
}
% accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
% 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.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (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))
+ \property Score.autoAccidentals = #'(Staff (same-octave . 0))
+ \property Score.autoCautionaries = #'(Staff (any-octave . 0) (any-octave . 1))
+}
+
+% Multivoice accidentals to be read both by musicians playing one voice
+% and musicians playing all voices.
+% Accidentals are typeset for each voice, but they ARE cancelled across voices.
+modernVoiceAccidentals = {
+ \property Staff.extraNatural = ##f
+ \property Staff.autoAccidentals = #'(
+ Voice (same-octave . 0) (any-octave . 0) (any-octave . 1)
+ Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
+ )
+ \property Staff.autoCautionaries = #'()
+}
+
+% same as modernVoiceAccidental eccept that all special accidentals are typeset
+% as cautionaries
+modernVoiceCautionaries = {
+ \property Staff.extraNatural = ##f
+ \property Staff.autoAccidentals = #'(
+ Voice (same-octave . 0)
+ )
+ \property Staff.autoCautionaries = #'(
+ Voice (any-octave . 0) (any-octave . 1)
+ Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
+ )
+}
+
+% stone's suggestions for accidentals on grand staff.
+% Accidentals are cancelled across the staves in the same grand staff as well
+pianoAccidentals = {
+ \property GrandStaff.autoAccidentals = #'(
+ Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
+ GrandStaff (any-octave . 1)
+ )
+ \property GrandStaff.autoCautionaries = #'()
}
% 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.autoAccidentals = #'(Staff (same-octave . #t))
\property Score.autoCautionaries = #'()
}
% 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.autoAccidentals = #'(Staff (same-octave . -1))
\property Score.autoCautionaries = #'()
}
(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.
+Each entry is either a symbol containg a context name or a name-value
+pair containing an algorithm-description.
+The list must begin with a symbol (context name).
+The symbols denote in which context THE FOLLOWING algorithms (until next symbol)
+will be interpreted. All notes in the interpretation context will share accidentals.
+The contexts must be stated in order, innermost first.
The algorithms are:
@table @samp
-@item measure-same-octave:
+@item 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:
+of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
+@item 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.
+same-octave.
@end table
")