SUBDIRS=user bibliography pictures topdocs misc windows
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly
-
+LILYPOND_BOOK_FLAGS=--extra-options '-e "(set-lily-option (quote internal-type-checking) \#t)"'
README_TOP_FILES=NEWS DEDICATION CHANGES
EXTRA_DIST_FILES=
if (!gh_string_p (g))
{
- me->set_grob_property ("molecule-callback", SCM_BOOL_T);
+ me->set_grob_property ("molecule-callback", SCM_EOL);
me->set_extent_callback (SCM_EOL, X_AXIS);
// leave y_extent for spanbar?
}
}
#endif
-
void
Grob::internal_set_grob_property (SCM s, SCM v)
{
+#ifndef NDEBUG
+ if (internal_type_checking_global_b)
+ assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+#endif
+
+
mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v);
}
return SCM_UNSPECIFIED;
}
+ if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
+ return SCM_UNSPECIFIED;
+
if (sc)
{
sc->internal_set_grob_property (sym, val);
extern bool safe_global_b;
extern bool verbose_global_b;
extern bool store_locations_global_b;
+extern bool internal_type_checking_global_b;
+
/* misc */
extern All_font_metrics *all_fonts_global_p;
set_extent_callback (SCM_EOL, Y_AXIS);
}
else if (trans)
- set_grob_property ("molecule-callback", SCM_BOOL_T);
+ set_grob_property ("molecule-callback", SCM_EOL);
}
}
follow regular localisation guidelines).
*/
static Long_option_init options_static[] = {
- /* print example usage: lilypond -e "(set-lily-option 'help 0)" ? */
- {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")},
+ /* print example usage: lilypond -e "" ? */
+ {_i ("EXPR"), "evaluate", 'e',_i ("Scheme options: try -e \"(set-lily-option 'help 0)\" for more help.")},
/* another bug in option parser: --output=foe is taken as an abbreviation
for --output-format */
{_i ("EXT"), "format", 'f', _i ("use output format EXT (tex [default], pdftex, ps, scm or as)")},
(c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "main.hh"
#include "input-smob.hh"
#include "music.hh"
#include "music-list.hh"
}
+
void
Music::internal_set_mus_property (SCM s, SCM v)
{
+#ifndef NDEBUG
+ if (internal_type_checking_global_b)
+ assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+#endif
+
+
mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v);
}
}
- bool ok = type_check_assignment (val, sym, ly_symbol2scm ("music-type?"));
+ bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?"));
if (ok)
{
sc->internal_set_mus_property (sym, val);
/* General purpose testing flag */
int testing_level_global;
-
+/*
+ crash if internally the wrong type is used for a grob property.
+ */
+bool internal_type_checking_global_b;
/*
*/
if (var == ly_symbol2scm ("help"))
{
- cout << '\n';
- cout << _ ("Scheme options:");
- cout << '\n';
- cout << " help (any-symbol)";
- cout << '\n';
- cout << " midi-debug (boolean)";
- cout << '\n';
- cout << " testing-level (int)";
- cout << '\n';
+ cout << _("lilypond -e EXPR means
+
+evalute EXPR as Scheme after init.scm has been read. In particular,
+the function set-lily-option allows for access to some internal
+variables. Usage:
+
+ (set-lily-option SYMBOL VAL)
+
+possible options for SYMBOL are :
+")<<endl;
+
+ cout << " help (any-symbol)"<<endl;
+ cout << " internal-type-checks #t"<<endl;
+ cout << " midi-debug (boolean)"<<endl;
+ cout << " testing-level (int)"<<endl;
+
exit (0);
}
else if (var == ly_symbol2scm ("midi-debug"))
{
testing_level_global = gh_scm2int (val);
}
+ else if (var == ly_symbol2scm ("internal-type-checks"))
+ {
+ internal_type_checking_global_b = to_boolean (val);
+ }
else if (var == ly_symbol2scm ("find-old-relative"))
{
/*
/*
UGH UGH
*/
- if (gh_symbol_p (gl) && gl == ly_symbol2scm ("brace")
- && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket"))
+ if (gh_string_p (gl) && gh_equal_p (gl, ly_symbol2scm ("brace"))
+ && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_symbol2scm ("bracket")))
inf.grob_l_->translate_axis (-0.8, X_AXIS); // ugh
- else if (gh_symbol_p (gl) && gl == ly_symbol2scm ("bracket")
- && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket"))
+ else if (gh_string_p (gl) && gh_equal_p (gl, ly_symbol2scm ("bracket"))
+ && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_symbol2scm ("bracket")))
{
inf.grob_l_->translate_axis ( -0.8, X_AXIS); // ugh
inf.grob_l_->set_grob_property ("arch-height",
void
System_start_delimiter_engraver::initialize ()
{
- SCM delim_name =get_property ("SystemStartDelimiter");
+ SCM delim_name =get_property ("systemStartDelimiter");
delim_ = new Spanner (internal_get_property (delim_name));
delim_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
/* descr */ "creates a system start delimiter (ie. SystemStart@{Bar,Brace,Bracket@} spanner",
/* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket",
/* acks */ "system-start-delimiter-interface staff-symbol-interface",
-/* reads */ "",
+/* reads */ "systemStartDelimiter",
/* write */ "");
{
Grob * me = unsmob_grob (smob);
SCM gl = me->get_grob_property ("glyph");
-
- if (scm_ilength (me->get_grob_property ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line"))
+
+ if (scm_ilength (me->get_grob_property ("elements")) <= 1 && gh_equal_p (gl,ly_str02scm ("bar-line")))
{
me->suicide ();
}
{
end_volta_span_p_ = volta_span_p_;
volta_span_p_ =0;
-
- /*
- maybe do typeset_grob () directly?
- */
-
- if (!gh_string_p (start_str_))
- end_volta_span_p_->set_grob_property ("last-volta", SCM_BOOL_T);
}
if (gh_string_p (start_str_) && volta_span_p_)
$(outdir)/%.latex: %.doc
rm -f $@
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES)\
+$(LILYPOND_BOOK_FLAGS) --dependencies --outdir=$(outdir) $<
chmod -w $@
# don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
# it is not, for --srcdir builds
$(outdir)/%.texi: %.tely
rm -f $@
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $(LILYPOND_BOOK_FLAGS) $<
chmod -w $@
$(outdir)/%.texi: $(outdir)/%.tely
rm -f $@
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $(LILYPOND_BOOK_FLAGS) $<
rm -f $<
chmod -w $@
# for plain info doco: don't run lily
$(outdir)/%.nexi: %.tely
rm -f $@
- $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $<
+ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $(LILYPOND_BOOK_FLAGS) $<
mv $(@D)/$(*F).texi $@
chmod -w $@
("||:" . ("||" . "|:"))
("|" . ("|" . ""))
("||:" . ("||" . "|:"))
- ("|s" . (nil . "|"))
+ ("|s" . (() . "|"))
("|:" . ("|" . "|:"))
- ("|." . ("|." . nil))
- (".|" . (nil . ".|"))
- (":|" . (":|" . nil))
- ("||" . ("||" . nil))
- (".|." . (".|." . nil))
+ ("|." . ("|." . ()))
+ (".|" . (() . ".|"))
+ (":|" . (":|" . ()))
+ ("||" . ("||" . ()))
+ (".|." . (".|." . ()))
("" . ("" . ""))
- ("empty" . ("nil" . nil))
- ("brace" . (nil . "brace"))
- ("bracket" . (nil . "bracket"))
+ ("empty" . ("()" . ()))
+ ("brace" . (() . "brace"))
+ ("bracket" . (() . "bracket"))
)
)))
;; See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147
;;
-;; documentme: difference between extra-space and minimum-space
-
-;; documentme: difference between extra-space and minimum-space
+;; documentme: difference between extra-space and minimum-space-pair
;; (Measured in staff space)
(define default-break-align-space-alist
'(
- ((Staff_bar Custos) . (minimum-space 2.0))
- ((Custos begin-of-note) . (minimum-space 0.0))
+ ((Staff_bar Custos) . (minimum-space-pair 2.0))
+ ((Custos begin-of-note) . (minimum-space-pair 0.0))
((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 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 Clef_item) . (minimum-space-pair 1.0))
+ ((none Staff_bar) . (minimum-space-pair 0.0))
+ ((none Clef_item) . (minimum-space-pair 1.0))
+ ((none Key_item) . (minimum-space-pair 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))
+ ((none begin-of-note) . (minimum-space-pair 1.5))
+ ((Clef_item Key_item) . (minimum-space-pair 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))
+ ((Clef_item Time_signature) . (minimum-space-pair 3.5))
+ ((Staff_bar Clef_item) . (minimum-space-pair 1.0))
+ ((Clef_item Staff_bar) . (minimum-space-pair 3.7))
+ ((Time_signature Staff_bar) . (minimum-space-pair 2.0))
((Key_item Staff_bar) . (extra-space 1.0))
- ((Staff_bar Time_signature) . (minimum-space 1.5))
+ ((Staff_bar Time_signature) . (minimum-space-pair 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))
- ((Left_edge_item Breathing_sign) . (minimum-space 0.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))
+ ((Clef_item begin-of-note) . (minimum-space-pair 5.0))
+ ((Left_edge_item Breathing_sign) . (minimum-space-pair 0.0))
+ ((none Breathing_sign) . (minimum-space-pair 0.0))
+ ((Breathing_sign Key_item) . (minimum-space-pair 1.5))
+ ((Breathing_sign begin-of-note) . (minimum-space-pair 1.0))
+ ((Breathing_sign Staff_bar) . (minimum-space-pair 1.5))
+ ((Breathing_sign Clef_item) . (minimum-space-pair 2.0))
)
)
(meta . ,(grob-description sustain-pedal-interface side-position-interface font-interface))
))
- ;; TODO: should split in 3
(SystemStartBrace . (
- (glyph . brace)
+ (glyph . "brace")
(molecule-callback . ,System_start_delimiter::brew_molecule)
(collapse-height . 5.0)
(font-family . braces)
(SystemStartBracket . (
(Y-extent-callback . #f)
(molecule-callback . ,System_start_delimiter::brew_molecule)
- (glyph . bracket)
+ (glyph . "bracket")
(arch-height . 1.5)
(arch-angle . 50.0)
(arch-thick . 0.25)
(SystemStartBar . (
(Y-extent-callback . #f)
(molecule-callback . ,System_start_delimiter::brew_molecule)
- (glyph . bar-line)
+ (glyph . "bar-line")
(thickness . 1.6)
(after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
(meta . ,(grob-description system-start-delimiter-interface ))
;; make sure that \property Foo.Bar =\turnOff doesn't complain
-(map (lambda (x) (set-object-property! (car x) 'translator-type? list?))
+(map (lambda (x)
+ ; (display (car x)) (newline)
+
+ (set-object-property! (car x) 'translation-type? list?))
all-grob-descriptions)
(set! all-backend-properties (cons symbol all-backend-properties))
)
-
-
;; put this in an alist?
(grob-property-description 'X-extent-callback procedure? "procedure taking an grob and axis argument, returning a number-pair. The return value is the extent of the grob.")
(grob-property-description 'fraction number-pair? "fraction of a time signature.")
(grob-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.")
-(grob-property-description 'glyph symbol? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. .")
+(grob-property-description 'glyph string? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. .")
(grob-property-description 'glyph-name string? "a name of character within font.")
(grob-property-description 'gap number? "Size of a gap in a variable symbol.")
For barline, space after a thick line.")
(grob-property-description 'layer number? "The output layer [0..2]. The default is 1.")
+
(grob-property-description 'left-padding number? "space left of accs.")
+
(grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.")
(grob-property-description 'lengths list? "Stem length given multiplicity of flag.")
(grob-property-description 'line-count integer? "Number of staff
(grob-property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
(grob-property-description 'maximum-length number? "don't make Grob longer than this")
(grob-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.")
+(grob-property-description 'measure-count integer? "number of measures for a multimeasure rest.")
(grob-property-description 'merge-differently-dotted boolean? " Merge noteheads in collisions, even if they have a different number of dots. This normal notation for some types of polyphonic music. The value of this setting is used by @ref{note-collision-interface} .")
(grob-property-description 'minimum-distance number? "minimum distance between notes and rests.")
(grob-property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs).")
FIXME: also pair? (cons LEFT RIGHT)
")
+(grob-property-description 'minimum-space-pair number-pair? "
+? (cons LEFT RIGHT)
+
+")
(grob-property-description 'minimum-width number? "minimum-width of rest symbol, in staffspace.")
(grob-property-description 'molecule-callback procedure? "Function taking grob as argument, returning a Scheme encoded Molecule.")
+(grob-property-description 'molecule molecule? "Cached output of the molecule-callback.")
(grob-property-description 'new-accidentals list? "list of (pitch, accidental) pairs.")
(grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
(grob-property-description 'right-padding number? "space right of accs.")
(grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")
(grob-property-description 'script-priority number? "A sorting key that determines in what order a script is within a stack of scripts.")
-(grob-property-description 'self-alignment-X number? "real number: -1 =
+(grob-property-description 'self-alignment-X number-or-grob? "real number: -1 =
left aligned, 0 = center, 1 right-aligned in X direction.
Set to an grob pointer, if you want that grob to be the center.
In this case, the center grob should have this object as a
reference point.
-.")
+
+TODO: revise typing.")
(grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
(grob-property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.")
(grob-property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.")
(grob-property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
-(grob-property-description 'side-support list? "the support, a list of grobs.")
+(grob-property-description 'side-support-elements list? "the support, a list of grobs.")
(grob-property-description 'slope number? "some kind of slope")
(grob-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
(grob-property-description 'solid boolean? "should porrectus be solidly filled?.")
(grob-property-description 'stacking-dir dir? "stack contents of grobs in which direction ?.")
(grob-property-description 'staff-space number? "Amount of line leading relative to global staffspace.")
(grob-property-description 'staff-position number? "vertical position in staff spaces, counted from the middle line.")
-(grob-property-description 'staff-symbol boolean? "the staff symbol grob that we're in.")
+
(grob-property-description 'staffline-clearance number? "don't get closer than this to stafflines.")
(grob-property-description 'stem ly-grob? "pointer to Stem object.")
(grob-property-description 'stem-attachment-function procedure? "Where
(grob-property-description 'thickness number? "thickness, measured in stafflinethickness.")
(grob-property-description 'thin-kern number? "space after a hair-line.")
(grob-property-description 'forced-distance number? "forced distance for an alignment.")
+
(grob-property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace.")
(grob-property-description 'transparent boolean? "This is almost the
same as setting molecule-callback to #f, but this retains the
(grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
(grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
(grob-property-description 'y number? "set by beam: position of left edge.")
+
+
+;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;; INTERNAL
+
+(grob-property-description 'left-neighbors list? "")
+(grob-property-description 'right-neighbors list? "")
+(grob-property-description 'left-items list? "")
+(grob-property-description 'right-items list? "")
+(grob-property-description 'cause scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob. ")
+(grob-property-description 'font font-metric? "Cached font metric object")
+(grob-property-description 'break-alignment-done boolean? "mark flag to signal we've done alignment already.")
+(grob-property-description 'staff-symbol ly-grob? "the staff symbol grob that we're in.")
+(grob-property-description 'collision-done boolean? "")
+(grob-property-description 'rest ly-grob? "the staff symbol grob that we're in.")
+(grob-property-description 'rest-collision ly-grob? "rest collision that a rest is in.")
+
+(grob-property-description 'staff-support boolean? " JUNKME.")
+(grob-property-description 'script-molecule pair? "index code for script.")
+
+(grob-property-description 'accidentals-grob ly-grob? "accidentals for this note.")
# g_ is for global (?)
-
+g_extra_opts = ''
g_here_dir = os.getcwd ()
g_dep_prefix = ''
g_outdir = ''
g_read_lys = 0
g_do_pictures = 1
g_num_cols = 1
+
format = ''
g_run_lilypond = 1
no_match = 'a\ba'
('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'),
('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'),
('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
+ ('OPT', '', 'extra-options' , 'Pass OPT quoted to the lilypond command line'),
('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'),
('DIM', '', 'force-lilypond-fontsize', 'deprecated, use --force-music-fontsize'),
('DIR', 'I', 'include', 'include path'),
if g_outdir:
lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/'
texfiles = string.join (tex, ' ')
- system ('lilypond --header=texidoc %s %s' % (lilyopts, texfiles))
+ system ('lilypond --header=texidoc %s %s %s' % (lilyopts, g_extra_opts, texfiles))
#
# Ugh, fixing up dependencies for .tex generation
elif o == '--default-lilypond-fontsize':
print "--default-lilypond-fontsize is deprecated, use --default-music-fontsize"
default_music_fontsize = string.atoi (a)
+ elif o == '--extra-options':
+ g_extra_opts = a
elif o == '--force-music-fontsize':
g_force_lilypond_fontsize = string.atoi(a)
elif o == '--force-lilypond-fontsize':