convention.
* scm/bass-figure.scm (format-bass-figure): rewrite function.
* scm/define-markup-commands.scm (bracketed-y-column): new markup
command.
* lily/include/stencil.hh (class Stencil): add origin field.
* lily/stencil-scheme.cc (LY_DEFINE): ly:stencil-move-to-edge: new
function.
* lily/grob-scheme.cc (LY_DEFINE): ly:grob-alist-chain: new function.
* lily/lexer.ll: remove support for \$ and $ in identifiers
* lily/sequential-iterator.cc: remove copy_grace_fixups
(get_grace_fixup): slight abstraction of fixup code.
* input/test/title-markup.ly (spaceTest): vary staff sizes.
+2004-03-12 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/figured-bass-engraver.cc (process_music): change calling
+ convention.
+
+ * scm/bass-figure.scm (format-bass-figure): rewrite function.
+
+ * scm/define-markup-commands.scm (bracketed-y-column): new markup
+ command.
+
+ * lily/include/stencil.hh (class Stencil): add origin field.
+
+ * lily/stencil-scheme.cc (LY_DEFINE): ly:stencil-move-to-edge: new
+ function.
+
+ * lily/grob-scheme.cc (LY_DEFINE): ly:grob-alist-chain: new function.
+
+ * lily/lexer.ll: remove support for \$ and $ in identifiers
+
+ * lily/sequential-iterator.cc: remove copy_grace_fixups
+ (get_grace_fixup): slight abstraction of fixup code.
+
+ * input/test/title-markup.ly (spaceTest): vary staff sizes.
+
2004-03-12 Heikki Junes <hjunes@cc.hut.fi>
* vim/lilypond-indent.vim: use <C-F> (default) as indent key
* lily/paper-book.cc (output): Bugfix.
+2004-03-11 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * VERSION (MY_PATCH_LEVEL): release 2.1.30
+
+2004-03-11 Jan Nieuwenhuizen <janneke@gnu.org>
+
* Documentation/user/lilypond.tely: Bugfix: Remove './' from
direntries.
@chapter New features in 2.1 since 2.0
@itemize @bullet
+@item The pmx2ly script has been removed from the distribution.
+
+@item Pedal brackets will now run to the last bar of a piece if they are not
+explicitly ended.
@item Context definitions now use the word @code{\context} instead of @code{\translator}.
C clef setting middle C on the middle line of the staff
@aref{C clef}.
-@aitem{ambitus}
+@aitem{ambit}
ES: ambitus,
I: ambitus,
F: ambitus,
S: ambitus,
FI: ambitus, @"a@"aniala, soitinala.
-The term ambitus (plural: ambituses) denotes a range of pitches for a
-given voice in a part of music. It also may denote the pitch range
-that a musical instrument is capable of playing.
+The term ambit (from latin: ambitus, plural: ambitus) denotes a range
+of pitches for a given voice in a part of music. It also may denote
+the pitch range that a musical instrument is capable of playing.
@aitem{ancient minor scale}
I: scala minore naturale,
Bar lines and bar numbers are calculated automatically. For unmetered
music (e.g. cadenzas), this is not desirable. By setting
@code{Score.timing} to false, this automatic timing can be switched
-off.
+off. Empty bar lines,
+
+@example
+ \bar ""
+@end example
+
+@noindent
+indicate where line breaks can occur.
+
@refcommands
\context Staff \notes \relative c' {
c2-\sizeTest c2-\spaceTest
}
+ \paper {
+ #(paper-set-staff-size (* 11.0 pt))
+ }
}
\header {
if (gh_procedure_p (proc))
{
SCM l = SCM_EOL;
-
- for (int i = 0; i <figures_.size (); i++)
- l = gh_cons (figures_[i]->self_scm (), l);
-
- SCM markup = scm_call_2 (proc, l, daddy_context_->self_scm ());
-
+ SCM * t = &l;
+ for (int i = 0; i < figures_.size (); i++)
+ {
+ *t = scm_cons (figures_[i]->self_scm (), SCM_EOL);
+ t = SCM_CDRLOC (*t);
+ }
figure_ = make_item ("BassFigure");
- figure_->set_property ("text", markup);
+ scm_call_3 (proc, l, daddy_context_->self_scm (),
+ figure_->self_scm ());
announce_grob (figure_, figures_[0]->self_scm ()); // todo
}
}
SCM
Grob::get_property_alist_chain (SCM def) const
{
- return scm_list_n (mutable_property_alist_,
- immutable_property_alist_,
- def,
- SCM_UNDEFINED);
+ return scm_list_n (mutable_property_alist_,
+ immutable_property_alist_,
+ def,
+ SCM_UNDEFINED);
}
return sc->get_paper ()->self_scm ();
}
+
+LY_DEFINE(ly_grob_alist_chain, "ly:grob-alist-chain",
+ 1, 0, 0,
+ (SCM g),
+ "Get an alist chain for grob @var{g}."
+ )
+{
+ Grob * sc = unsmob_grob (g);
+ SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
+
+ SCM defaults = sc->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
+ return sc->get_property_alist_chain (defaults);
+}
+
+
LY_DEFINE (ly_get_extent, "ly:grob-extent", 3, 0, 0,
(SCM grob, SCM refp, SCM axis),
"Get the extent in @var{axis} direction of @var{grob} relative to "
class Sequential_iterator : public Music_iterator
{
public:
- Grace_fixup * grace_fixups_;
-
DECLARE_SCHEME_CALLBACK(constructor, ());
Sequential_iterator ();
Sequential_iterator (Sequential_iterator const&);
virtual Music_iterator *try_music_in_children (Music *) const;
virtual bool run_always () const;
protected:
- Moment here_mom_;
Music_iterator * iter_;
- SCM list_;
+ virtual SCM get_music_list ()const;
+ virtual void next_element (bool side_effect);
+
+
+ Grace_fixup *get_grace_fixup () const;
+ void next_grace_fixup ();
+
+private:
+ Moment here_mom_;
+ SCM list_;
SCM cursor_;
+ Grace_fixup * grace_fixups_;
- virtual void next_element (bool side_effect);
virtual void descend_to_child ();
- virtual SCM get_music_list ()const;
};
#endif /* SEQUENTIAL_ITERATOR_HH */
class Stencil
{
friend SCM ly_stencil_set_extent_x (SCM, SCM, SCM);
-
+
+ Offset origin_;
Box dim_;
SCM expr_;
public:
Stencil (Box, SCM s);
Stencil ();
-
-
+
+ Offset origin () const;
SCM smobbed_copy () const;
SCM get_expr () const;
/**
Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
void set_empty (bool);
+ Stencil moved_to_edge (Axis a, Direction d, const Stencil &m, Real padding,
+ Real minimum) const;
+
void add_at_edge (Axis a, Direction d, const Stencil &m, Real padding,
Real minimum);
void add_stencil (Stencil const &m);
<chords,notes,figures>R {
return MULTI_MEASURE_REST;
}
-<INITIAL,chords,lyrics,notes,figures>\\\${BLACK}*{WHITE} {
- String s=YYText () + 2;
- s=s.left_string (s.length () - 1);
- return scan_escaped_word (s);
-}
-<INITIAL,chords,lyrics,notes,figures>\${BLACK}*{WHITE} {
- String s=YYText () + 1;
- s=s.left_string (s.length () - 1);
- return scan_bare_word (s);
-}
-<INITIAL,chords,lyrics,notes,figures>\\\${BLACK}* { // backup rule
- error (_("white expected"));
- exit (1);
-}
-<INITIAL,chords,lyrics,notes,figures>\${BLACK}* { // backup rule
- error (_("white expected"));
- exit (1);
-}
-
<INITIAL,markup,chords,lyrics,notes,figures># { //embedded scm
//char const* s = YYText () + 1;
char const* s = here_str0 ();
}
-/*
- TODO: use rounded boxes.
- */
LY_DEFINE (ly_bracket ,"ly:bracket",
4, 0, 0,
(SCM a, SCM iv, SCM t, SCM p),
return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv),
gh_scm2double (t),
gh_scm2double (p),
- gh_scm2double (t)).smobbed_copy ();
+ 0.95 * gh_scm2double (t)).smobbed_copy ();
}
{
if (safe)
{
- SCM safe_module = scm_primitive_eval (ly_symbol2scm ("safe-module"));
+ static SCM safe_module;
+ if (!safe_module)
+ safe_module = scm_primitive_eval (ly_symbol2scm ("safe-module"));
+
+
answer = scm_eval (form, safe_module);
}
else
char const *s = str.to_str0 () ;
bool v = true;
+/*
+ isalpha (*s);
+ s++;
+*/
while (*s && v)
{
- v = v && isalpha (*s);
+ v = v && isalnum (*s);
s++;
}
return v;
Music *m = unsmob_music ($1);
if ($2) {
SCM salter =m->get_property ("alteration");
- int alter = gh_number_p ( salter) ? gh_scm2int (salter) : 0;
+ int alter = gh_number_p (salter) ? gh_scm2int (salter) : 0;
m->set_property ("alteration",
gh_int2scm (alter + $2));
} else {
#include "sequential-iterator.hh"
#include "music-list.hh"
-Grace_fixup *copy_grace_fixups (Grace_fixup* src);
Grace_fixup *get_grace_fixups (SCM cursor);
/*
list_ = SCM_EOL;
cursor_ = SCM_EOL;
grace_fixups_ = 0;
- iter_ =0;
+ iter_ = 0;
}
SCM
}
Grace_fixup *
-get_grace_fixups (SCM cursor)
+create_grace_fixup_list (SCM cursor)
{
Moment here;
Moment last (-1);
for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
{
- Music * mus = unsmob_music (ly_car (cursor));
+ Music *mus = unsmob_music (ly_car (cursor));
Moment s = mus->start_mom ();
- Moment l =mus->get_length () - s;
+ Moment l = mus->get_length () - s;
if (s.grace_part_)
{
if (last != Moment (-1))
{
- Grace_fixup *p =new Grace_fixup;
+ Grace_fixup *p = new Grace_fixup;
p->start_ = last;
p->length_ = here - last;
p->grace_start_ = s.grace_part_;
here += l;
}
}
- return head;
-}
-
-Grace_fixup *
-copy_grace_fixups (Grace_fixup* src)
-{
- Grace_fixup * head = 0;
- Grace_fixup **dest = &head;
-
- while (src)
- {
- *dest = new Grace_fixup (*src);
- dest = & (*dest)->next_;
- src = src ->next_;
- }
-
+
return head;
}
}
here_mom_ = get_music ()->start_mom ();
- grace_fixups_ = get_grace_fixups (cursor_);
+ grace_fixups_ = create_grace_fixup_list (cursor_);
/*
iter_->ok () is tautology, but what the heck.
Moment len =iter_->music_get_length () - iter_->music_start_mom ();
assert (!grace_fixups_ || grace_fixups_->start_ >= here_mom_);
- if (len.main_part_ && grace_fixups_ &&
- grace_fixups_->start_ == here_mom_)
+ if (len.main_part_
+ && get_grace_fixup ())
{
- here_mom_ += grace_fixups_->length_;
- here_mom_.grace_part_ += grace_fixups_->grace_start_;
+ Grace_fixup *gf = get_grace_fixup ();
+
+ here_mom_ += gf->length_;
+ here_mom_.grace_part_ += gf->grace_start_;
- Grace_fixup * n =grace_fixups_->next_;
- delete grace_fixups_;
- grace_fixups_ = n;
+ next_grace_fixup ();
}
else if (len.grace_part_ && !len.main_part_)
{
Context * c = child_report;
while (c && c != me_report)
{
- c= c->daddy_context_;
+ c = c->daddy_context_;
}
if (c == me_report)
{
while (iter_)
{
- if (grace_fixups_ &&
- grace_fixups_->start_ == here_mom_
- && (grace_fixups_->start_ + grace_fixups_->length_
- + Moment (Rational (0), grace_fixups_->grace_start_) == until))
+ Grace_fixup * gf = get_grace_fixup ();
+ if (gf
+ && gf->start_ + gf->length_
+ + Moment (Rational (0), gf->grace_start_) == until)
{
/*
do the stuff/note/rest preceding a grace.
else
{
Moment w = until - here_mom_ + iter_->music_start_mom ();
- // if (w >= Moment (0))
iter_->process (w);
}
/*
Fix-up a grace note halfway in the music.
*/
- if (grace_fixups_ && here_mom_ == grace_fixups_->start_
- && grace_fixups_->length_ + iter_->music_start_mom () == cp)
+ Grace_fixup * gf = get_grace_fixup ();
+ if (gf
+ && gf->length_ + iter_->music_start_mom () == cp)
{
- return here_mom_ + grace_fixups_->length_ + Moment (0, grace_fixups_->grace_start_);
+ return here_mom_ + gf->length_ + Moment (0, gf->grace_start_);
}
/*
{
return iter_ ? iter_->run_always () : false;
}
+
+void
+Sequential_iterator::next_grace_fixup ()
+{
+ Grace_fixup * n = grace_fixups_->next_;
+ delete grace_fixups_;
+ grace_fixups_ = n;
+}
+
+
+Grace_fixup*
+Sequential_iterator::get_grace_fixup () const
+{
+ if (grace_fixups_ && grace_fixups_->start_ == here_mom_)
+ return grace_fixups_;
+ else
+ return 0;
+}
void
Staff_performer::stop_translation_timestep ()
{
- /*
- UGH. -> don't use eval.
- */
static SCM proc;
if (!proc)
proc = scm_primitive_eval (ly_symbol2scm ("percussion?"));
#include "font-metric.hh"
#include "stencil.hh"
-
+/*
+ TODO: naming add/combine.
+ */
/*
UMGH. junkme!
LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
3, 0, 0, (SCM stil, SCM amount, SCM axis),
- "Return a @var{stil}, "
- "but translated by @var{amount} in @var{axis} direction.")
+ "Return a copy of @var{stil} but translated by @var{amount} in @var{axis} direction.")
{
Stencil *s = unsmob_stencil (stil);
SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
SCM_ASSERT_TYPE (gh_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
- Stencil q (*s);
- q.translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
+ SCM new_s = s->smobbed_copy ();
+ Stencil *q = unsmob_stencil (new_s);
+ q->translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
+ return new_s;
- return q.smobbed_copy ();
}
LY_DEFINE (ly_translate_stencil,"ly:stencil-translate",
SCM_ASSERT_TYPE (is_number_pair (offset), offset, SCM_ARG2, __FUNCTION__, "number pair");
Offset o = ly_scm2offset (offset);
- Stencil q (*s);
- q.translate (o);
- return q.smobbed_copy ();
+ SCM new_s = s->smobbed_copy ();
+ Stencil *q =unsmob_stencil (new_s);
+ q->translate (o);
+ return new_s;
}
LY_DEFINE (ly_stencil_get_expr, "ly:stencil-get-expr",
return ly_interval2scm (s->extent (Axis (gh_scm2int (axis))));
}
-LY_DEFINE (ly_stencil_combined_at_edge,
- "ly:stencil-combine-at-edge",
+LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
+ 4, 2, 0, (SCM first, SCM axis, SCM direction,
+ SCM second,
+ SCM padding,
+ SCM minimum),
+ "Similar to @code{ly:stencil-combine-edge}, but returns "
+ "@var{second} positioned to be next to @var{first}. ")
+{
+ /*
+ C&P from combine-at-edge.
+ */
+ Stencil *s1 = unsmob_stencil (first);
+ Stencil *s2 = unsmob_stencil (second);
+ Stencil first_stencil;
+
+ SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+ SCM_ASSERT_TYPE (is_direction (direction), direction, SCM_ARG4, __FUNCTION__, "dir");
+
+ Real p = 0.0;
+ if (padding != SCM_UNDEFINED)
+ {
+ SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+ p = gh_scm2double (padding);
+ }
+ Real m = 0.0;
+ if (minimum != SCM_UNDEFINED)
+ {
+ SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+ m = gh_scm2double (minimum);
+ }
+
+ if (s1)
+ first_stencil = *s1;
+
+ if (s2)
+ return first_stencil.moved_to_edge (Axis (gh_scm2int (axis)),
+ Direction (gh_scm2int (direction)),
+ *s2, p, m).smobbed_copy ();
+ else
+ return Stencil().smobbed_copy ();
+}
+
+
+
+LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
4, 2, 0, (SCM first, SCM axis, SCM direction,
SCM second,
SCM padding,
return result.smobbed_copy ();
}
-/* FIXME: support variable number of arguments. */
LY_DEFINE (ly_stencil_add ,
"ly:stencil-add", 0, 0, 1, (SCM args),
"Combine stencils. Takes any number of arguments.")
return s->smobbed_self ();
}
+Offset
+Stencil::origin () const
+{
+ return origin_;
+}
+
Interval
Stencil::extent (Axis a) const
{
expr_, SCM_UNDEFINED);
if (!is_empty ())
dim_.translate (o);
+ origin_ += o;
}
void
Offset o (0,0);
o[a] = x;
translate (o);
-}
+}
void
Stencil::add_stencil (Stencil const &s)
translate_axis (-i.linear_combination (x), a);
}
-/* See scheme Function. */
-void
-Stencil::add_at_edge (Axis a, Direction d, Stencil const &s, Real padding,
- Real minimum)
+/*
+ TODO: unintuitive naming, you would expect *this to be moved. Kept
+ API for compat with add_at_edge ().
+*/
+Stencil
+Stencil::moved_to_edge (Axis a, Direction d, Stencil const &s, Real padding,
+ Real minimum) const
{
Real my_extent= is_empty () ? 0.0 : dim_[a][d];
Interval i (s.extent (a));
Real his_extent;
if (i.is_empty ())
{
- programming_error ("Stencil::add_at_edge: adding empty stencil.");
+ programming_error ("Stencil::move_to_edge: adding empty stencil.");
his_extent = 0.0;
}
else
his_extent = i[-d];
Real offset = (my_extent - his_extent) + d * padding;
- if (minimum > 0 && fabs (offset) < minimum)
- offset = sign (offset) * minimum;
-
+
Stencil toadd (s);
- toadd.translate_axis (offset, a);
- add_stencil (toadd);
+ toadd.translate_axis (offset,a);
+
+ if (minimum > 0
+ && d *(- origin ()[a] + toadd.origin ()[a]) < minimum)
+ toadd.translate_axis ( -toadd.origin ()[a]
+ + origin ()[a] + d* minimum, a);
+
+ return toadd;
+}
+
+/* See scheme Function. */
+void
+Stencil::add_at_edge (Axis a, Direction d, Stencil const &s, Real padding,
+ Real minimum)
+{
+ add_stencil (moved_to_edge (a,d,s,padding, minimum));
}
/* Hmm... maybe this is not such a good idea ; stuff can be empty,
tablatureFormat = #fret-number-tablature-format
%%
- bassFigureFormatFunction = #make-bass-figure-markup
+ bassFigureFormatFunction = #format-bass-figure
metronomeMarkFormatter = #format-metronome-markup
graceSettings = #`#(
(Voice Stem direction 1)
"A bass figure, including bracket"
'())
-(define (recursive-split-at pred? l)
- (if (null? l)
- '()
- (let*
- ((x (split-at-predicate pred? l)))
- (set-cdr! x (recursive-split-at pred? (cdr x)))
- x
- )))
-(define-public (make-bass-figure-markup figures context)
-
- (define (no-end-bracket? f1 f2)
- (eq? (ly:music-property f1 'bracket-stop) '())
- )
- (define (no-start-bracket? f1 f2)
- (eq? (ly:music-property f2 'bracket-start) '())
- )
+(define-public (format-bass-figure figures context grob)
;; TODO: support slashed numerals here.
(define (fig-to-markup fig-music)
(let*
(alteration->text-accidental-markup acc)))
fig-markup)
))
-
- (define (fig-seq-to-markup figs)
- (let*
- (
- (c (make-dir-column-markup (map fig-to-markup figs)))
- )
- (if (eq? (ly:music-property (car figs) 'bracket-start) #t)
- (make-bracket-markup c)
- c
- )))
-
- (let*
- (
- (ends (recursive-split-at no-end-bracket? (reverse figures)))
- (starts (map (lambda (x) (recursive-split-at no-start-bracket? x)) ends))
- )
- (make-dir-column-markup (map fig-seq-to-markup (apply append starts)))
- ))
+ (define (filter-brackets i figs acc)
+ (cond
+ ((null? figs) acc)
+ (else
+ (filter-brackets (1+ i) (cdr figs)
+
+ (append
+ (if (eq? (ly:music-property (car figs) 'bracket-start) #t)
+ (list i)
+ '())
+ (if (eq? (ly:music-property (car figs) 'bracket-stop) #t)
+ (list i)
+ '())
+
+ acc)))))
+
+ (set! (ly:grob-property grob 'text)
+ (make-bracketed-y-column-markup
+ (sort (filter-brackets 0 figures '()) <)
+ (map fig-to-markup figures)
+ )))
(barNumberVisibility ,procedure? "Procedure that takes an int and
returns whether the corresponding bar number should be printed")
- (bassFigureFormatFunction ,procedure? "Procedure that produces a markup text. It takes a list of @code{BassFigureEvent}s, and a context.")
+ (bassFigureFormatFunction ,procedure? "Procedure that is called
+to produce the formatting for a @code{BassFigure} grob. It takes a
+list of @code{BassFigureEvent}s, a context, and the grob to format.")
(beatLength ,ly:moment? "The length of one beat in this time signature.")
(beatGrouping ,list?
"List of beatgroups. Eg. in 5/8 time @code{'(2 3)}.")
(skipping I), and continues with double letters."
(Text_item::interpret_markup paper props (number->markletter-string num)))
+
+
+
+
+(def-markup-command (bracketed-y-column paper props indices args)
+ (list? markup-list?)
+ "Make a column of the markups in @var{args}, putting brackets around
+the elements marked in @var{indices}, which is a list of numbers."
+
+ (define (sublist l start stop)
+ (take (drop l start) (- (1+ stop) start)) )
+
+ (define (stencil-list-extent ss axis)
+ (cons
+ (apply min (map (lambda (x) (car (ly:stencil-extent x axis))) ss))
+ (apply max (map (lambda (x) (cdr (ly:stencil-extent x axis))) ss))))
+
+ (define (stack-stencils stencils bskip last-stencil)
+ (cond
+ ((null? stencils) '())
+ ((not last-stencil)
+ (cons (car stencils)
+ (stack-stencils (cdr stencils) bskip (car stencils))))
+ (else
+ (let*
+ ((orig (car stencils))
+ (handle (chain-assoc 'direction props))
+ (dir (if (and (pair? handle) (ly:dir? (cdr handle)))
+ (cdr handle)
+ DOWN))
+ (new (ly:stencil-moved-to-edge last-stencil Y dir
+ orig
+ 0.1 bskip))
+ )
+
+ (cons new (stack-stencils (cdr stencils) bskip new))))
+ ))
+
+ (define (make-brackets stencils indices acc)
+ (if (and stencils
+ (pair? indices)
+ (pair? (cdr indices)))
+ (let*
+ ((encl (sublist stencils (car indices) (cadr indices)))
+ (x-ext (stencil-list-extent encl X))
+ (y-ext (stencil-list-extent encl Y))
+ (thick 0.10)
+ (pad 0.35)
+ (protusion (* 2.5 thick))
+ (lb
+ (ly:stencil-translate-axis
+ (ly:bracket Y y-ext thick protusion)
+ (- (car x-ext) pad) X))
+ (rb (ly:stencil-translate-axis
+ (ly:bracket Y y-ext thick (- protusion))
+ (+ (cdr x-ext) pad) X))
+ )
+
+ (make-brackets
+ stencils (cddr indices)
+ (append
+ (list lb rb)
+ acc)))
+ acc))
+
+ (let*
+ ((stencils
+ (map (lambda (x)
+ (interpret-markup
+ paper
+ props
+ x)) args))
+ (leading
+ (cdr (chain-assoc 'baseline-skip props)))
+ (stacked (stack-stencils stencils 1.25 #f))
+ (brackets (make-brackets stacked indices '()))
+ )
+
+ (apply ly:stencil-add
+ (append stacked brackets)
+ )))
+
+
+
+
+
+
+
+
paper 'linewidth))
(font-family . roman))
(ly:paper-lookup paper 'font-defaults)))))
- (interpret-markup paper props
- (markup #:fill-line
- ;; FIXME: font not found
- ;; ("" #:bold (number->string page-number))))))
- ("" (number->string page-number))))))
+ (interpret-markup paper props
+ (markup #:fill-line
+ ;; FIXME: font not found
+ ;; ("" #:bold (number->string page-number))))))
+ ("" (number->string page-number))))))
(define-public (make-footer paper page-number)
(let ((props (list (append `((linewidth . ,(ly:paper-get-number
;; autochange - fairly related to part combining.
(define-public (make-autochange-music music)
- (define (generate-split-list event-list acc)
+ (define (generate-split-list change-moment event-list acc)
(if (null? event-list)
acc
(let* ((now-tun (caar event-list))
#f)))
;; tail recursive.
(if (and pitch (not (= (ly:pitch-steps pitch) 0)))
- (generate-split-list (cdr event-list)
- (cons (cons now (sign (ly:pitch-steps pitch))) acc))
- (generate-split-list (cdr event-list) acc)))))
+ (generate-split-list #f
+ (cdr event-list)
+ (cons (cons
+
+ (if change-moment
+ change-moment
+ now)
+ (sign (ly:pitch-steps pitch))) acc))
+ (generate-split-list
+ (if pitch #f now)
+ (cdr event-list) acc)))))
+
(set! noticed '())
(let* ((m (make-music 'AutoChangeMusic))
(context (ly:run-translator music part-combine-listener))
(evs (last-pair noticed))
- (split (reverse! (generate-split-list (if (pair? evs)
- (reverse! (cdar evs) '()) '())
- '())
+ (split (reverse! (generate-split-list
+ #f
+ (if (pair? evs)
+ (reverse! (cdar evs) '()) '())
+ '())
'())))
(set! (ly:music-property m 'element) music)
(set! (ly:music-property m 'split-list) split)