---- ../lilypond-1.3.115/CHANGES Mon Dec 4 17:42:18 2000
+--- ../lilypond-1.3.115.jcn1/CHANGES Thu Dec 7 22:22:26 2000
+++ b/CHANGES Fri Dec 8 14:26:00 2000
+@@ -1,3 +1,16 @@
+1.3.115.jcn2
+============
+
+* Bugfix: lilypond-book.py: only include exisisting .texidoc files.
+
+* Lilypond: don't write empty header field file if header field does
+not exist (ie, empty .texidoc files).
+
+* Turn on info generation.
+
+* Fixes to dynamic placement and crescendo spanners. Incomprehensible
+``width-correct'' hack remains.
+
+ 1.3.115.jcn1
+ ============
+ --- ../lilypond-1.3.115/CHANGES Mon Dec 4 17:42:18 2000
++ b/CHANGES Thu Dec 7 22:22:26 2000
@@ -1,3 +1,9 @@
1.3.115.jcn1
default: local-doc
+test-reg:
+ rm -f out-www/regression-test.html out-www/regression-test.texi
+ $(MAKE) out=www out-www/regression-test.html
+
local-WWW: copy-for-me txt-to-html $(outdir)/regression-test.ps.gz $(outdir)/regression-test.html footify
copy-for-me:
@lilypondfile{auto-beam-bar.ly}
+@lilypondfile{beam-rest.ly}
+
@lilypondfile{slur-nice.ly}
@lilypondfile{slur-symmetry.ly}
@lilypondfile{slur-symmetry-1.ly}
PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
-# INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
+INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
STEPMAKE_TEMPLATES=tex texinfo documentation
LOCALSTEPMAKE_TEMPLATES=lilypond ly
* Sound output:: Sound output
* midilist:: midilist
* Grobs:: Graphical objects
+* Molecule:: Molecule
* Pre-defined Identifiers:: Pre-defined Identifiers
@c May be fragile. Better make single link to generated doco?
* Interpretation contexts:(lilypond-internals)LilyPond interpretation contexts.
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=115
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+++ /dev/null
-/*
- crescendo.cc -- implement Hairpin
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "molecule.hh"
-#include "crescendo.hh"
-#include "spanner.hh"
-#include "font-interface.hh"
-#include "dimensions.hh"
-#include "paper-def.hh"
-#include "debug.hh"
-#include "paper-column.hh"
-
-MAKE_SCHEME_CALLBACK (Hairpin, brew_molecule, 1);
-
-SCM
-Hairpin::brew_molecule (SCM smob)
-{
- Grob *me= unsmob_grob (smob);
- Spanner *span = dynamic_cast<Spanner*>(me);
-
- Real line = me->paper_l ()->get_var ("stafflinethickness");
-
- Real broken_left = span->get_broken_left_end_align ();
-
- SCM s = me->get_grob_property("grow-direction");
- if (!isdir_b (s))
- {
- me->suicide ();
- return SCM_EOL;
- }
-
- Direction grow_dir = to_dir (s);
- Real padding = gh_scm2double (me->get_grob_property ("padding"));
- Real width = span->spanner_length ();
- width -= span->get_broken_left_end_align ();
-
- if (width < 0)
- {
- warning (_ ((grow_dir < 0) ? "decrescendo too small"
- : "crescendo too small"));
- width = 0;
- }
-
- Drul_array<bool> broken;
- Drul_array<Real> extra_off;
- Direction d = LEFT;
- do
- {
- Item *b = span->get_bound (d);
- broken[d] = b->break_status_dir () != CENTER;
-
- if (!broken [d])
- {
-
- Interval e =b->extent (b, X_AXIS);
- Real r = 0.0;
- if (!e.empty_b ())
- r = e[-d] + padding;
- width += d * r;
- extra_off[d] = r;
- }
- }
- while (flip (&d) != LEFT);
-
- bool continued = broken[Direction (-grow_dir)];
- Real height = gh_scm2double (me->get_grob_property ("height"));
- Real thick = line * gh_scm2double (me->get_grob_property ("thickness"));
-
- const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo";
- SCM hairpin = gh_list (ly_symbol2scm (type),
- gh_double2scm (thick),
- gh_double2scm (width),
- gh_double2scm (height),
- gh_double2scm (continued ? height/2 : 0.0),
- SCM_UNDEFINED);
-
- Box b (Interval (0, width), Interval (-2*height, 2*height));
- Molecule mol (b, hairpin);
- mol.translate_axis (broken_left + extra_off[LEFT], X_AXIS);
-
- return mol.smobbed_copy ();
-}
-
-
*/
#include "debug.hh"
#include "dimensions.hh"
-#include "crescendo.hh"
+#include "hairpin.hh"
#include "musical-request.hh"
#include "paper-column.hh"
#include "note-column.hh"
and a line-spanner will always be created, as \< \! are already
two requests.
- Maybe always creating a line-spanner for a (de)crescendo (see
- below) is not a good idea:
-
- a\< b\p \!c
-
- the \p will be centred on the line-spanner, and thus clash
- with the hairpin. When axis-group code is in place, the \p
- should move below the hairpin, which is probably better?
-
- Urg, but line-spanner must always have at least same duration
+ Note: line-spanner must always have at least same duration
as (de)crecsendo, b.o. line-breaking.
*/
script_p_ = new Item (get_property ("DynamicText"));
script_p_->set_grob_property ("text",
script_req_l_->get_mus_property ("text"));
+
+ Side_position::set_direction (script_p_, LEFT);
+ Side_position::set_axis (script_p_, X_AXIS);
+
if (Direction d = script_req_l_->get_direction ())
Directional_element_interface::set (line_spanner_, d);
else
{
assert (!finished_cresc_p_);
- Grob* cc = unsmob_grob (get_property ("currentMusicalColumn"));
-
- cresc_p_->set_bound (RIGHT, cc);
+
+ cresc_p_->set_bound (RIGHT, script_p_
+ ? script_p_
+ : unsmob_grob (get_property ("currentMusicalColumn")));
finished_cresc_p_ = cresc_p_;
cresc_p_ = 0;
SCM s = get_property ((start_type + "Spanner").ch_C());
if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
{
- cresc_p_ = new Spanner (get_property ("Crescendo"));
+ cresc_p_ = new Spanner (get_property ("Hairpin"));
cresc_p_->set_grob_property ("grow-direction",
gh_int2scm ((start_type == "crescendo")
? BIGGER : SMALLER));
{
cresc_p_ = new Spanner (get_property ("TextSpanner"));
cresc_p_->set_grob_property ("type", s);
+
+ // urg. Can't set this into Text_spanner, because we
+ // only want this for (de)crescendi spanners.
+ cresc_p_->set_grob_property ("padding", gh_double2scm (1));
+
daddy_trans_l_->set_property (start_type
+ "Spanner", SCM_UNDEFINED);
s = get_property ((start_type + "Text").ch_C());
SCM_UNDEFINED);
}
}
+
cresc_p_->set_bound (LEFT, script_p_
? script_p_
: unsmob_grob (get_property ("currentMusicalColumn")));
-
+
Axis_group_interface::add_element (line_spanner_, cresc_p_);
announce_grob (cresc_p_, accepted_spanreqs_drul_[START]);
}
{
if (finished_cresc_p_)
{
+#if 1
finished_cresc_p_->set_bound (RIGHT, script_p_
? script_p_
: unsmob_grob (get_property ("currentMusicalColumn")));
-
+#endif
typeset_grob (finished_cresc_p_);
finished_cresc_p_ =0;
}
--- /dev/null
+/*
+ hairpin.cc -- implement Hairpin
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "molecule.hh"
+#include "hairpin.hh"
+#include "spanner.hh"
+#include "font-interface.hh"
+#include "dimensions.hh"
+#include "paper-def.hh"
+#include "debug.hh"
+#include "paper-column.hh"
+
+MAKE_SCHEME_CALLBACK (Hairpin, brew_molecule, 1);
+
+SCM
+Hairpin::brew_molecule (SCM smob)
+{
+ Grob *me= unsmob_grob (smob);
+ Spanner *spanner = dynamic_cast<Spanner*>(me);
+
+ Real line = me->paper_l ()->get_var ("stafflinethickness");
+
+ SCM s = me->get_grob_property("grow-direction");
+ if (!isdir_b (s))
+ {
+ me->suicide ();
+ return SCM_EOL;
+ }
+
+ Direction grow_dir = to_dir (s);
+
+
+ /* Ugh, must be same as Text_spanner::brew_molecule. */
+ Real padding = gh_scm2double (me->get_grob_property ("padding"));
+ Real broken_left = spanner->get_broken_left_end_align ();
+ Real width = spanner->spanner_length ();
+ width -= broken_left;
+
+ Drul_array<bool> broken;
+ Drul_array<Real> extra_off;
+ Direction d = LEFT;
+ do
+ {
+ Item *b = spanner->get_bound (d);
+ broken[d] = b->break_status_dir () != CENTER;
+
+ if (!broken [d])
+ {
+
+ Interval e =b->extent (b, X_AXIS);
+ Real r = 0.0;
+ if (!e.empty_b ())
+ r = e[-d] + padding;
+ width += d * r;
+ extra_off[d] = r;
+ }
+ }
+ while (flip (&d) != LEFT);
+
+ // FIXME: ecs tells us
+ width += gh_scm2double (me->get_grob_property ("width-correct"));
+ /* /Ugh */
+
+
+
+
+
+ if (width < 0)
+ {
+ warning (_ ((grow_dir < 0) ? "decrescendo too small"
+ : "crescendo too small"));
+ width = 0;
+ }
+
+ bool continued = broken[Direction (-grow_dir)];
+ Real height = gh_scm2double (me->get_grob_property ("height"));
+ Real thick = line * gh_scm2double (me->get_grob_property ("thickness"));
+
+ const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo";
+ SCM hairpin = gh_list (ly_symbol2scm (type),
+ gh_double2scm (thick),
+ gh_double2scm (width),
+ gh_double2scm (height),
+ gh_double2scm (continued ? height/2 : 0.0),
+ SCM_UNDEFINED);
+
+ Box b (Interval (0, width), Interval (-2*height, 2*height));
+ Molecule mol (b, hairpin);
+ mol.translate_axis (broken_left + extra_off[LEFT], X_AXIS);
+
+ return mol.smobbed_copy ();
+}
+
+
+++ /dev/null
-/*
- crescendo.hh -- declare Hairpin
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef CRESCENDO_HH
-#define CRESCENDO_HH
-
-#include "lily-guile.hh"
-/**
- The hairpin symbol.
- */
-struct Hairpin
-{
-public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
- static bool has_interface (Grob*);
-};
-
-#endif // CRESCENDO_HH
--- /dev/null
+/*
+ hairpin.hh -- declare Hairpin
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef HAIRPIN_HH
+#define HAIRPIN_HH
+
+#include "lily-guile.hh"
+/**
+ The hairpin symbol.
+ */
+struct Hairpin
+{
+public:
+ DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ static bool has_interface (Grob*);
+};
+
+#endif // HAIRPIN_HH
for (int i = 0; i < global_score_header_fields.size (); i++)
{
String key = global_score_header_fields[i];
- // SCM val = gh_assoc (ly_str02scm (key.ch_C ()), fields);
SCM val = gh_assoc (ly_symbol2scm (key.ch_C ()), fields);
String s;
+ /* Only write header field to file if it exists */
if (gh_pair_p (val))
- s = ly_scm2string (gh_cdr (val));
- output_score_header_field (base, key, s);
+ {
+ s = ly_scm2string (gh_cdr (val));
+ /* Always write header field file, even if string is empty ... */
+ output_score_header_field (base, key, s);
+ }
}
}
}
- contination types (vert. star, vert. end) |-> eat volta-spanner
- more styles
- more texts/positions
- - style: hairpin ?
*/
MAKE_SCHEME_CALLBACK (Text_spanner, brew_molecule, 1);
Grob *me= unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner*> (me);
- Real staff_space = Staff_symbol_referencer::staff_space (me);
-
+
+
+ /* Ugh, must be same as Hairpin::brew_molecule. */
+ Real padding = gh_scm2double (me->get_grob_property ("padding"));
+ Real broken_left = spanner->get_broken_left_end_align ();
+ Real width = spanner->spanner_length ();
+ width -= broken_left;
+
Drul_array<bool> broken;
+ Drul_array<Real> extra_off;
Direction d = LEFT;
do
{
- Paper_column* s = dynamic_cast<Paper_column*>(spanner->get_bound (d)); // UGH
- if (s && s->musical_b ())
- broken[d] = false;
- else
- broken[d] = true;
+ Item *b = spanner->get_bound (d);
+ broken[d] = b->break_status_dir () != CENTER;
+
+ if (!broken [d])
+ {
+
+ Interval e = b->extent (b, X_AXIS);
+ Real r = 0.0;
+ if (!e.empty_b ())
+ r = e[-d] + padding;
+ width += d * r;
+ extra_off[d] = r;
+ }
}
while (flip (&d) != LEFT);
-
- SCM properties = Font_interface::font_alist_chain (me);
+ // FIXME: ecs tells us
+ width += gh_scm2double (me->get_grob_property ("width-correct"));
+ /* /Ugh */
+
+
+ SCM properties = Font_interface::font_alist_chain (me);
+
SCM edge_text = me->get_grob_property ("edge-text");
Drul_array<Molecule> edge;
if (gh_pair_p (edge_text))
}
while (flip (&d) != LEFT);
}
+ width -= edge[LEFT].extent (X_AXIS).length ()
+ + edge[RIGHT].extent (X_AXIS).length ();
Drul_array<Real> shorten;
shorten[LEFT] = 0;
SCM s = me->get_grob_property ("shorten");
if (gh_pair_p (s))
{
- shorten[LEFT] = gh_scm2double (gh_car (s)) * staff_space;
- shorten[RIGHT] = gh_scm2double (gh_cdr (s)) * staff_space;
+ shorten[LEFT] = gh_scm2double (gh_car (s));
+ shorten[RIGHT] = gh_scm2double (gh_cdr (s));
}
- Real broken_left = spanner->get_broken_left_end_align ();
- Real width = spanner->spanner_length ();
- Grob *bnd = spanner->get_bound (RIGHT);
- width += bnd->extent (bnd, X_AXIS).length ();
- width -= broken_left;
width -= shorten[LEFT] + shorten[RIGHT];
- width -= edge[LEFT].extent (X_AXIS).length ()
- + edge[RIGHT].extent (X_AXIS).length ();
-
+
if (width < 0)
{
warning (_ ("Text_spanner too small"));
m.add_at_edge (X_AXIS, RIGHT, edge_line[RIGHT], 0);
if (!edge[RIGHT].empty_b ())
m.add_at_edge (X_AXIS, RIGHT, edge[RIGHT], 0);
- m.translate_axis (broken_left, X_AXIS);
+ m.translate_axis (broken_left + extra_off[LEFT], X_AXIS);
return m.smobbed_copy ();
}
(meta . ,(element-description "Custos" custos-interface staff-symbol-interface break-aligned-interface) )
))
- (Crescendo . (
+ (Hairpin . (
(molecule-callback . ,Hairpin::brew_molecule)
(thickness . 1.0)
- (padding . 1.0)
+ (padding . 1.0)
+ (width-correct . -1) ;ughr
(height . 0.6666)
(dash-thickness . 1.2)
(dash-length . 4.0)
(self-alignment-Y . 0)
(Y-offset-callbacks . (,Side_position::aligned_on_self))
- (meta . ,(element-description "Crescendo" hairpin-interface))
+ (meta . ,(element-description "Hairpin" hairpin-interface))
))
(DotColumn . (
(molecule-callback . ,Text_spanner::brew_molecule)
(font-shape . italic)
(type . "line")
+ ;;; urg
+ ;;;(padding . 1.0)
+ (width-correct . -1) ;ughr
(direction . 1)
(meta . ,(element-description "TextSpanner" text-spanner-interface font-interface))
))
"Dynamic_engraver"
""
'(DynamicLineSpanner
- DynamicText Crescendo
+ DynamicText Hairpin
TextSpanner)
'(
)))
# should also support fragment in
'output-all': r"""
-@include %(fn)s.texidoc
@tex
\catcode`\@=12
\input lilyponddefs
needed_filetypes.append('png')
if 'eps' in opts and not ('eps' in needed_filetypes):
needed_filetypes.append('eps')
- outname = os.path.join(g_outdir, basename)
+ pathbase = os.path.join (g_outdir, basename)
def f(base, ext1, ext2):
a = os.path.isfile(base + ext2)
if (os.path.isfile(base + ext1) and
not os.path.isfile(base + ext2):
return 1
todo = []
- if 'tex' in needed_filetypes and f(outname, '.ly', '.tex'):
+ if 'tex' in needed_filetypes and f(pathbase, '.ly', '.tex'):
todo.append('tex')
- if 'eps' in needed_filetypes and f(outname, '.tex', '.eps'):
+ if 'eps' in needed_filetypes and f(pathbase, '.tex', '.eps'):
todo.append('eps')
- if 'png' in needed_filetypes and f(outname, '.eps', '.png'):
+ if 'png' in needed_filetypes and f(pathbase, '.eps', '.png'):
todo.append('png')
newbody = ''
if 'verbatim' in opts:
else:
s = 'output-tex'
else: # format == 'texi'
- s = 'output-all'
- newbody = newbody + get_output(s) % {'fn': basename }
+ if os.path.isfile (pathbase + '.texidoc'):
+ newbody = newbody + '\n@include %s.texidoc' % basename
+ s = 'output-all'
+ newbody = newbody + get_output (s) % {'fn': basename }
return ('lilypond', newbody, opts, todo, basename)
def process_lilypond_blocks(outname, chunks):#ugh rename