HWN
That's a nice thought, Wendy. I've got a few too, to spread
-the credits a bit (Again, no particular order) Michelle, Illushka,
-Ruth, Eva, Fro/ydis, Monique, Noor, Sascha, Monique, Ilse, Monique,
-Eva, Roos, Judith, Tim, and, of course, Wendy!
+the credits a bit (Again, no particular order) Michelle, Illushka,
+Mieke, Ruth, Eva, Fro/ydis, Monique, Mary Anne, Noor, Sascha, Monique,
+Ilse, Monique, Eva, Roos, Judith, Tim, Connie and, of course, Wendy!
JCN
@itemize @bullet
@item @uref{../user/out-www/lilypond.html,LilyPond reference manual}
also available in @uref{../user/out-www/lilypond.ps.gz,Postscript}
-@item LilyPond @uref{../user/out-www/backend.html,backend reference},
- @uref{../user/out-www/engravers.html, engraver reference} and
- @uref{../user/out-www/contexts.html, context reference},
+@item LilyPond @uref{../user/out-www/lilypond-internals.html,internals}
@item @uref{../user/out-www/glossary.html,A glossary of musical
terms}, includes translations. Also available in @uref{../user/out-www/glossary.ps.gz,Postscript})
@item @uref{../user/out-www/mudela-book.html,mudela-book}, a tool for
PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
+INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
+
STEPMAKE_TEMPLATES=tex texinfo documentation
LOCALSTEPMAKE_TEMPLATES=lilypond mudela
ps: $(PS_FILES)
-# urg
-default:
+info: $(INFO_FILES)
+
+default: info
-local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) backdoc
+local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) backdoc-WWW
true
# $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
localclean:
rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
-#ugh. out/ hardcoded.
-backdoc:
- (cd $(outdir); $(topdir)/lily/out/lilypond $(depth)/../ly/generate-documentation)
+backdoc-WWW: $(outdir)/lilypond-internals.html
+
+#ugh. lily/OUT/lilypond hardcoded.
+$(outdir)/lilypond-internals.texi:
+ (cd $(outdir); $(topdir)/lily/out/lilypond ../$(srcdir)/../ly/generate-documentation)
+
\input texinfo @c -*-texinfo-*-
@setfilename lilypond.info
-@settitle LilyPond Reference Manual
+@settitle GNU LilyPond
@titlepage
-@title LilyPond Reference Manual
-@subtitle The GNU Project Typesetter
+@title GNU LilyPond
+@subtitle The music typesetter
@author Han-Wen Nienhuys, Jan Nieuwenhuizen and Adrian Mariano
Copyright @copyright{} 1999 by the authors
@end ignore
-@contents
-
@node Top, , , (dir)
+@chapter GNU LilyPond --- The music typesetter
+
+@contents
@menu
-* Tutorial:: a tutorial introduction to lilypond.
-* Invoking LilyPond:: Operation.
-* Reporting Bugs:: Where to report bugs.
-* Reference Manual:: Reference Manual.
-* More information:: Where to turn to for more help.
-* convert-mudela:: Upgrading input files.
-* Index:: Unified index.
+* Tutorial:: A tutorial introduction to lilypond.
+* Invoking LilyPond:: Operation.
+* Reporting Bugs:: Where to report bugs.
+* Reference Manual:: Reference Manual.
+@c Move to Reference Manual?
+* Internals:(lilypond-internals). Auto generated detailed documentation.
+* More information:: Where to turn to for more help.
+* convert-mudela:: Upgrading input files.
+@c Hmm, having the generated doco in a separate file,
+@c the index can't refer to that.
+* Index:: Unified index.
@end menu
@macro keyindex {word}
+@c -*-texinfo-*-
@c TODO:
@c - Reinsert subsection commands that were lost in the
@c ancient conversion from YODL! /MB
@c - Fix indexing (keyindex) so it doesn't add line breaks /MB
@node Reference Manual, , , Top
+@chapter Reference Manual
+
@menu
-* Overview:: Overview
-* Top level:: Top level
-* notenames:: notenames
-* Lexical conventions:: Lexical conventions
-* Other languages:: notelang
-* modes:: modes
-* Types:: Types
-* Music expressions:: Music expressions
-* Atomic music expressions:: Atomic music expressions
-* Note specification:: notedesc
-* barlines:: barlines
-* Manual beams:: Manual beam
-* stem tremolo:: tremolo
-* Compound music expressions:: Compound music expressions
-* relative:: relative
-* Repeats:: Repeats
-* transpose:: transpose
-* Ambiguities:: Ambiguities
-* Notation conversion specifics:: Notation conversion specifics
-* autobeam:: autobeam
-* lyricprint:: lyricprint
-* Notation Contexts:: Notation Contexts
-* Properties:: Changing formatting
-* Notation output definitions:: Notation output definitions
-* paper:: paper
-* Paper variables:: papervars
-* contextdefs:: contextdefs
-* engravers:: engravers
-* Sound output:: Sound output
-* midilist:: midilist
-* Pre-defined Identifiers:: Pre-defined Identifiers
+* Overview:: Overview
+* Top level:: Top level
+* notenames:: notenames
+* Lexical conventions:: Lexical conventions
+* Other languages:: notelang
+* modes:: modes
+* Types:: Types
+* Music expressions:: Music expressions
+* Atomic music expressions:: Atomic music expressions
+* Note specification:: notedesc
+* barlines:: barlines
+* Manual beams:: Manual beam
+* stem tremolo:: tremolo
+* Compound music expressions:: Compound music expressions
+* relative:: relative
+* Repeats:: Repeats
+* transpose:: transpose
+* Ambiguities:: Ambiguities
+* Notation conversion specifics:: Notation conversion specifics
+* autobeam:: autobeam
+* lyricprint:: lyricprint
+* Notation Contexts:: Notation Contexts
+* Properties:: Changing formatting
+* Notation output definitions:: Notation output definitions
+* paper:: paper
+* Paper variables:: papervars
+* contextdefs:: contextdefs
+* Sound output:: Sound output
+* midilist:: midilist
+* Pre-defined Identifiers:: Pre-defined Identifiers
+@c May be fragile. Better make single link to generated doco?
+* Interpretation contexts:(lilypond-internals)LilyPond interpretation contexts.
+* Engravers:(lilypond-internals)LilyPond engravers.
+* Backend:(lilypond-internals)LilyPond backend.
@end menu
-@chapter Reference Manual
-
@node Overview, , , Reference Manual
-@chapter Tutorial
-
+@c -*-texinfo-*-
@node Tutorial, , , Top
+@chapter Tutorial
+
@menu
-* Introduction:: Introduction
-* The first tune:: The first tune
-* Lyrics and chords:: Lyrics and chords
-* Piano music:: Piano music
-* end of tutorial:: The end
+* Introduction:: Introduction
+* The first tune:: The first tune
+* Lyrics and chords:: Lyrics and chords
+* Piano music:: Piano music
+* end of tutorial:: The end
@end menu
@node Introduction, , , Tutorial
at-ext =
EXTRA_DIST_FILES = README.Debian TODO $(CONF_FILES) \
- control.foka ex.prerm ex.doc-base
-CONF_FILES = changelog control copyright emacsen-startup \
- preinst postinst postrm rules watch
+ control.foka
+CONF_FILES = changelog control copyright doc-base emacsen-startup \
+ preinst postinst postrm prerm rules watch
#OUTCONF_FILES = $(addprefix $(outdir)/, $(basename $(CONF_FILES))) $(OUTIN_FILES)
OUTCONF_FILES = $(OUTIN_FILES)
OUT_DIST_FILES = $(OUTIN_FILES)
+lilypond1.3 (1.3.103) unstable; urgency=low
+
+ * Re-enabled info doc rules.
+
+ -- Jan Nieuwenhuizen <janneke@gnu.org> Sun, 5 Nov 2000 22:15:57 -0100
+
lilypond1.3 (1.3.79-1) unstable; urgency=low
* New upstream release.
--- /dev/null
+Document: lilypond
+Title: GNU LilyPond, the music typesetter
+Author: Various
+Abstract: This documentation describes LilyPond (the GNU Project music
+ typesetter), its language Mudela, and the Mutopia project, a.k.a.
+ "Music To the People."
+Section: Apps/Music
+
+Format: info
+Index: /usr/share/info/lilypond.info.gz
+Files: /usr/share/info/lilypond.info* /usr/share/info/lilypond-internals.info*
--- /dev/null
+#!/bin/sh
+set -e
+
+install-info --quiet --remove /usr/share/info/lilypond.info.gz
+
+#DEBHELPER#
binary-arch: build install
dh_testdir
dh_testroot
- cp -av lilypond-mode.el $(r)/usr/share/emacs/site-lisp/
- dh_installdocs DEDICATION NEWS ROADMAP TODO *.txt \
+ cp -av lilypond-mode.el lilypond-font-lock.el \
+ $(r)/usr/share/emacs/site-lisp/
+ dh_installdocs DEDICATION NEWS ROADMAP *.txt \
Documentation/pictures/out/*.png \
Documentation/out/*.txt \
Documentation/*/out/[a-z]*.dvi \
linewidth = -1.0;
\translator {
\ChordNamesContext
- ChordNames \push #'word-space = #1
+ ChordName \push #'word-space = #1
}
}
}
\paper{
\translator {
\ChordNamesContext
- ChordNames \push #'word-space = #1
+ ChordName \push #'word-space = #1
}
}
}
Molecule
Time_signature::special_time_signature (Score_element*me, String s, int n, int d)
{
- // First guess: s contains only the signature style
- String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
+ /*
+ Randomly probing the font sucks?
+ */
+
+ SCM alist_chain = Font_interface::font_alist_chain (me);
+
+ SCM style_chain =
+ Font_interface::add_style (me, ly_symbol2scm ("timesig-symbol"),
+ alist_chain);
+
+ Font_metric *feta = Font_interface::get_font (me, style_chain);
/*
- Randomly probing the font sucks?
- */
+ First guess: s contains only the signature style, append fraction.
+ */
+ String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
- Molecule m = Font_interface::get_default_font (me)->find_by_name (symbolname);
+ Molecule m = feta->find_by_name (symbolname);
if (!m.empty_b())
return m;
- // Second guess: s contains the full signature name
- m = Font_interface::get_default_font (me)->find_by_name ("timesig-"+s);
+ /*
+ Second guess: s contains the full signature name
+ */
+ m = feta->find_by_name ("timesig-" + s);
if (!m.empty_b ())
return m;
// Resort to default layout with numbers
- return time_signature (me, n,d);
+ return time_signature (me, n, d);
}
;;; Inspired on auctex
-(load-file "lilypond-font-lock.el")
+(load-library "lilypond-font-lock")
(require 'easymenu)
(require 'compile)
(interactive)
(message "Using `LilyPond-mode' version %s" LilyPond-version))
-(provide 'LilyPond-mode)
-;;; LilyPond-mode.el ends here
+(provide 'lilypond-mode)
+;;; lilypond-mode.el ends here
+%
+% Running LilyPond on this file generates the documentation
+%
#(eval-string (ly-gulp-file "generate-documentation.scm"))
+%define info yes
+
Name: lilypond
Version: @TOPLEVEL_VERSION@
Release: 1
strip lily/out/lilypond midi2ly/out/midi2ly
make prefix="$RPM_BUILD_ROOT%{_prefix}" install
-# gzip -9fn $RPM_BUILD_ROOT%{_prefix}/info/* || true
+%if info=="yes"
+gzip -9fn $RPM_BUILD_ROOT%{_prefix}/info/* || true
+%endif
mkdir -p $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d
cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.sh
touch /tmp/.lilypond-install
rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
-# /sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir || true
+%if info=="yes"
+/sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir || true
+%endif
%preun
+%if info=="yes"
if [ $1 = 0 ]; then
- true # /sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir || true
+ /sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir || true
fi
+%endif
%files
%{_prefix}/bin
%endif
+%if info=="yes"
+%{_prefix}/info/lilypond.info.gz
+%{_prefix}/info/lilypond-internals.info.gz
+%endif
+
%{_prefix}/man/man1/abc2ly.1.gz
%{_prefix}/man/man1/as2text.1.gz
%{_prefix}/man/man1/convert-mudela.1.gz
$(outdir)/%.texi: %.tely
cd $(outdir); LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(depth)/../scripts/mudela-book.py -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi ../$<
$(SUBST_TEXI_DEPS)
+
+# nexi: no-lily texi
+# for plain info doco: don't run lily
+$(outdir)/%.nexi: %.tely
+ cd $(outdir); LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(depth)/../scripts/mudela-book.py --no-lily -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi ../$<
+ mv $(@D)/$(*F).texi $@
+ $(SUBST_TEXI_DEPS)
+
+$(outdir)/%.info: $(outdir)/%.nexi
+ -$(MAKEINFO) --force --output=$@ $<
--- /dev/null
+
+;;; backend-documentation-lib.scm -- Functions for backend documentation
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+;;; This file generates documentation for the backend of lilypond.
+
+
+;; alist of property descriptions
+(define (document-element-property prop desc)
+ (let ((handle (assoc (car prop) desc)))
+ (cons
+ (string-append
+ "@code{" (symbol->string (car prop)) "} "
+ "(" (type-name (cadr prop)) "):")
+ (string-append
+ (caddr prop)
+ "\ndefault value: @code{"
+ (if (pair? handle)
+ (scm->string (cdr handle))
+ "not set" )
+ "}"))))
+
+;; Second level, part of element description
+(define (document-interface interface element-description)
+ (let* ((name (car interface))
+ (desc (cadr interface))
+ (props (caddr interface))
+ (docs (map (lambda (x)
+ (document-element-property x element-description))
+ props)))
+
+ (string-append
+ (section 2 (string-append "Interface: " (symbol->string name)))
+ desc
+ (description-list docs))))
+
+;; First level element description
+(define (document-element iname description)
+ (display (string-append "\nProcessing " iname " ... ") (current-error-port))
+ (let* ((metah (assoc 'meta description))
+
+ (meta (if (pair? metah)
+ (cdr metah)
+ '((properties . ()) (name . "huh?"))
+ ))
+
+ (name (cdr (assoc 'name meta)))
+ (ifaces (cdr (assoc 'interface-descriptions meta)))
+ (ifacedoc (map (lambda (x) (document-interface x description))
+ (reverse ifaces))))
+
+ (string-append
+ (node (element-name name))
+ (section 2 (element-name name))
+ "\n"
+
+ (let* ((element (string->symbol name))
+ (engravers
+ (apply append
+ (map (lambda (x)
+ (let ((engraver (car x))
+ (objs (cadddr x)))
+ (if (member element objs)
+ (list engraver)
+ '())))
+ engraver-description-alist))))
+ (string-append
+ name " elements are created by: "
+ (human-listify (map reffy (map engraver-name engravers)))))
+
+ (apply string-append ifacedoc))))
+
+
+(define (document-all-elements name)
+ (let* ((doc (apply string-append
+ (map (lambda (x) (document-element (car x) (cdr x)))
+ all-element-descriptions)))
+ (names (map car all-element-descriptions)))
+
+ (string-append
+ (texi-node-menu name (map (lambda (x) (cons (element-name x) ""))
+ names))
+ doc)))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; BEAMS
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define (default-beam-space-function multiplicity)
- (if (<= multiplicity 3) 0.816 0.844)
- )
-
-;
-; width in staff space.
-;
-(define (default-beam-flag-width-function type)
- (cond
- ((eq? type 1) 1.98)
- ((eq? type 1) 1.65) ;; FIXME: check what this should be and why
- (else 1.32)
- ))
-
-
-; This is a mess : global namespace pollution. We should wait
-; till guile has proper toplevel environment support.
-
-
-;; Beams should be prevented to conflict with the stafflines,
-;; especially at small slopes
-;; ----------------------------------------------------------
-;; ########
-;; ########
-;; ########
-;; --------------########------------------------------------
-;; ########
-;;
-;; hang straddle sit inter hang
-
-;; inter seems to be a modern quirk, we don't use that
-
-
-;; Note: quanting period is take as quants.top () - quants[0],
-;; which should be 1 (== 1 interline)
-(define (mean a b) (* 0.5 (+ a b)))
-(define (default-beam-dy-quants beam stafflinethick)
- (let ((thick (ly-get-elt-property beam 'thickness))
- )
-
- (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1)
- ))
-
-;; two popular veritcal beam quantings
-;; see params.ly: #'beam-vertical-quants
-
-; (todo: merge these 2 funcs ? )
-
-(define (default-beam-y-quants beam multiplicity dy staff-line)
- (let* ((beam-straddle 0)
- (thick (ly-get-elt-property beam 'thickness))
- (beam-sit (/ (+ thick staff-line) 2))
- (beam-hang (- 1 (/ (- thick staff-line) 2)))
- (quants (list beam-hang))
- )
-
- (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-sit quants)))
- (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-straddle quants)))
- ;; period: 1 (interline)
- (append quants (list (+ 1 (car quants))))))
-
-(define (beam-traditional-y-quants beam multiplicity dy staff-line)
- (let* ((beam-straddle 0)
- (thick (ly-get-elt-property beam 'thickness))
- (beam-sit (/ (+ thick staff-line) 2))
- (beam-hang (- 1 (/ (- thick staff-line) 2)))
- (quants '())
- )
- (if (>= dy (/ staff-line -2))
- (set! quants (cons beam-hang quants)))
- (if (and (<= multiplicity 1) (<= dy (/ staff-line 2)))
- (set! quants (cons beam-sit quants)))
- (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-straddle quants)))
- ;; period: 1 (interline)
- (append quants (list (+ 1 (car quants))))))
-
-
-;; There are several ways to calculate the direction of a beam
-;;
-;; * majority: number count of up or down notes
-;; * mean : mean centre distance of all notes
-;; * median : mean centre distance weighted per note
-
-(define (dir-compare up down)
- (sign (- up down)))
-
-;; arguments are in the form (up . down)
-(define (beam-dir-majority count total)
- (dir-compare (car count) (cdr count)))
-
-(define (beam-dir-mean count total)
- (dir-compare (car total) (cdr total)))
-
-(define (beam-dir-median count total)
- (if (and (> (car count) 0)
- (> (cdr count) 0))
- (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count)))
- (dir-compare (car count) (cdr count))))
-
-
-
-;; [Ross] states that the majority of the notes dictates the
-;; direction (and not the mean of "center distance")
-;;
-;; But is that because it really looks better, or because he wants
-;; to provide some real simple hands-on rules?
-;;
-;; We have our doubts, so we simply provide all sensible alternatives.
-
-;; array index multiplicity, last if index>size
-;; beamed stems
-
-
-;; TODO
-;; - take #forced stems into account (now done in C++)?
-;; - take y-position of chord or beam into account
-
-;
-; todo: clean this up a bit: the list is getting rather long.
-;
-(define basic-beam-properties
- `(
- (molecule-callback . ,Beam::brew_molecule)
- (thickness . 0.42) ; in staff-space, should use stafflinethick?
- (before-line-breaking-callback . ,Beam::before_line_breaking)
- (after-line-breaking-callback . ,Beam::after_line_breaking)
- (default-neutral-direction . 1)
- (dir-function . ,beam-dir-majority)
- (height-quants . ,default-beam-dy-quants)
- (vertical-position-quant-function . ,default-beam-y-quants)
- (beamed-stem-shorten . (0.5))
- (outer-stem-length-limit . 0.2)
- (slope-limit . 0.2)
- (flag-width-function . ,default-beam-flag-width-function)
- (space-function . ,default-beam-space-function)
- (damping . 1)
- (meta . ,(element-description "Beam" beam-interface))
- )
- )
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Bar lines.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- /dev/null
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; BEAMS
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (default-beam-space-function multiplicity)
+ (if (<= multiplicity 3) 0.816 0.844)
+ )
+
+;
+; width in staff space.
+;
+(define (default-beam-flag-width-function type)
+ (cond
+ ((eq? type 1) 1.98)
+ ((eq? type 1) 1.65) ;; FIXME: check what this should be and why
+ (else 1.32)
+ ))
+
+
+; This is a mess : global namespace pollution. We should wait
+; till guile has proper toplevel environment support.
+
+
+;; Beams should be prevented to conflict with the stafflines,
+;; especially at small slopes
+;; ----------------------------------------------------------
+;; ########
+;; ########
+;; ########
+;; --------------########------------------------------------
+;; ########
+;;
+;; hang straddle sit inter hang
+
+;; inter seems to be a modern quirk, we don't use that
+
+
+;; Note: quanting period is take as quants.top () - quants[0],
+;; which should be 1 (== 1 interline)
+(define (mean a b) (* 0.5 (+ a b)))
+(define (default-beam-dy-quants beam stafflinethick)
+ (let ((thick (ly-get-elt-property beam 'thickness))
+ )
+
+ (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1)
+ ))
+
+;; two popular veritcal beam quantings
+;; see params.ly: #'beam-vertical-quants
+
+; (todo: merge these 2 funcs ? )
+
+(define (default-beam-y-quants beam multiplicity dy staff-line)
+ (let* ((beam-straddle 0)
+ (thick (ly-get-elt-property beam 'thickness))
+ (beam-sit (/ (+ thick staff-line) 2))
+ (beam-hang (- 1 (/ (- thick staff-line) 2)))
+ (quants (list beam-hang))
+ )
+
+ (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2)))
+ (set! quants (cons beam-sit quants)))
+ (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
+ (set! quants (cons beam-straddle quants)))
+ ;; period: 1 (interline)
+ (append quants (list (+ 1 (car quants))))))
+
+(define (beam-traditional-y-quants beam multiplicity dy staff-line)
+ (let* ((beam-straddle 0)
+ (thick (ly-get-elt-property beam 'thickness))
+ (beam-sit (/ (+ thick staff-line) 2))
+ (beam-hang (- 1 (/ (- thick staff-line) 2)))
+ (quants '())
+ )
+ (if (>= dy (/ staff-line -2))
+ (set! quants (cons beam-hang quants)))
+ (if (and (<= multiplicity 1) (<= dy (/ staff-line 2)))
+ (set! quants (cons beam-sit quants)))
+ (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
+ (set! quants (cons beam-straddle quants)))
+ ;; period: 1 (interline)
+ (append quants (list (+ 1 (car quants))))))
+
+
+;; There are several ways to calculate the direction of a beam
+;;
+;; * majority: number count of up or down notes
+;; * mean : mean centre distance of all notes
+;; * median : mean centre distance weighted per note
+
+(define (dir-compare up down)
+ (sign (- up down)))
+
+;; arguments are in the form (up . down)
+(define (beam-dir-majority count total)
+ (dir-compare (car count) (cdr count)))
+
+(define (beam-dir-mean count total)
+ (dir-compare (car total) (cdr total)))
+
+(define (beam-dir-median count total)
+ (if (and (> (car count) 0)
+ (> (cdr count) 0))
+ (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count)))
+ (dir-compare (car count) (cdr count))))
+
+
+
+;; [Ross] states that the majority of the notes dictates the
+;; direction (and not the mean of "center distance")
+;;
+;; But is that because it really looks better, or because he wants
+;; to provide some real simple hands-on rules?
+;;
+;; We have our doubts, so we simply provide all sensible alternatives.
+
+;; array index multiplicity, last if index>size
+;; beamed stems
+
+
+;; TODO
+;; - take #forced stems into account (now done in C++)?
+;; - take y-position of chord or beam into account
+
+;
+; todo: clean this up a bit: the list is getting rather long.
+;
+(define basic-beam-properties
+ `(
+ (molecule-callback . ,Beam::brew_molecule)
+ (thickness . 0.42) ; in staff-space, should use stafflinethick?
+ (before-line-breaking-callback . ,Beam::before_line_breaking)
+ (after-line-breaking-callback . ,Beam::after_line_breaking)
+ (default-neutral-direction . 1)
+ (dir-function . ,beam-dir-majority)
+ (height-quants . ,default-beam-dy-quants)
+ (vertical-position-quant-function . ,default-beam-y-quants)
+ (beamed-stem-shorten . (0.5))
+ (outer-stem-length-limit . 0.2)
+ (slope-limit . 0.2)
+ (flag-width-function . ,default-beam-flag-width-function)
+ (space-function . ,default-beam-space-function)
+ (damping . 1)
+ (meta . ,(element-description "Beam" beam-interface))
+ )
+ )
+
--- /dev/null
+;;;
+;;; documentation-lib.scm -- Assorted Functions for generated documentation
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Jan Nieuwenhuizen <janneke@gnu.org>
+
+(define (uniqued-alist alist acc)
+ (if (null? alist) acc
+ (if (assoc (caar alist) acc)
+ (uniqued-alist (cdr alist) acc)
+ (uniqued-alist (cdr alist) (cons (car alist) acc)
+ ))))
+
+(define (self-evaluating? x)
+ (or (number? x) (string? x) (procedure? x) (boolean? x)))
+
+(define (texify x)
+ x)
+;; (let*
+;; ((x1 (regexp-substitute/global #f "\([^@]\){" x 'pre "\1@{" 'post))
+;; ((x2 (regexp-substitute/global #f "\([^@]\){" x 'pre "\1@{" 'post))
+;; ((x3 (regexp-substitute/global #f "\([^@]\)@" x 'pre "\1@@" 'post))
+;; )
+;; x2))
+
+(define (scm->string val)
+ (string-append
+ (if (self-evaluating? val) "" "'")
+ (texify
+ (call-with-output-string (lambda (port) (display val port))))
+ ))
+
+(define (node name)
+ (string-append
+ "\n@html"
+ "\n<hr>"
+ "\n@end html"
+ "\n@node " name ",,,"))
+
+(define section-alist
+ '(
+ ;; Hmm, texinfo doesn't have ``part''
+ (0 . "@top")
+ (1 . "@unnumbered")
+ (2 . "@unnumberedsec")
+ (3 . "@unnumberedsubsec")
+ (4 . "@unnumberedsubsubsec")
+ (5 . "@unnumberedsubsubsec")
+ ))
+
+(define (section level name)
+ (string-append "\n" (cdr (assoc level section-alist)) " " name "\n"))
+
+(define (description-list items-alist)
+ (string-append
+ "\n@table @samp\n"
+ (apply string-append
+ (map (lambda (x) (string-append "\n@item " (car x) "\n" (cdr x)))
+ items-alist))
+ "\n@end table\n"))
+
+(define (texi-menu items-alist)
+ (string-append
+ "\n@menu"
+ (apply string-append
+ (map (lambda (x) (string-append "\n* " (car x) ":: " (cdr x)))
+ items-alist))
+ "\n@end menu\n"
+ ;; Menus don't appear in html, so we make a list ourselves
+ "\n@ifhtml\n"
+ (description-list (map (lambda (x) (cons (reffy (car x)) (cdr x)))
+ items-alist))
+ "\n@end ifhtml\n"))
+
+
+(define (texi-node-menu name items-alist)
+ (string-append
+ (node name)
+ (section 1 name)
+ (texi-menu items-alist)))
+
+(define (texi-file-head name file-name top items-alist)
+ (string-append
+ "\input texinfo @c -*-texinfo-*-\n"
+ "@settitle " name
+ "\n@setfilename " file-name ".info"
+ (node "Top") top
+ "\n@top"
+ (section 1 name)
+ (texi-menu items-alist)))
+
+(define (context-name name)
+ (string-append "Context " name))
+
+(define (engraver-name name)
+ name)
+
+(define (element-name name)
+ (string-append "Element " name))
+
+(define (reffy x)
+ (string-append "@ref{" x "}"))
+
+(define (human-listify l)
+ (cond
+ ((null? l) "none")
+ ((null? (cdr l)) (car l))
+ ((null? (cddr l)) (string-append (car l) " and " (cadr l)))
+ (else (string-append (car l) ", " (human-listify (cdr l))))
+ ))
+
+(define (writing-wip x)
+ (display (string-append "\nWriting " x " ... ") (current-error-port)))
--- /dev/null
+
+;;; engraver-documentation-lib.scm -- Functions for engraver documentation
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+(eval-string (ly-gulp-file "translator-description.scm"))
+
+;; alist of translater descriptions
+(define (document-translator-property prop-desc)
+ (cons
+ (string-append
+ "@code{" (car prop-desc) "} "
+ "(" (type-name (cadr prop-desc)) "):")
+ (caddr prop-desc)))
+
+;; First level Engraver description and
+;; second level Context description
+(define (document-engraver level engraver-descr)
+
+ (let* (
+ (props (car (cdddr engraver-descr)))
+ (name (car engraver-descr))
+ (desc (cadr engraver-descr))
+ (objs (caddr engraver-descr))
+ )
+
+ (string-append
+ (section level (engraver-name name))
+ desc
+ "\n\n"
+ (if (null? props)
+ ""
+ (string-append
+ (section (+ level 1) "Properties")
+ (description-list
+ (map (lambda (x) (document-translator-property x)) props))))
+ (if (null? objs)
+ ""
+ (string-append
+ "This engraver creates \n "
+ (human-listify (map reffy (map element-name objs)))
+ " elements.")
+ )
+
+ "\n\n"
+
+ (let* ((paper-alist (My_lily_parser::paper_description))
+ (context-description-alist (map cdr paper-alist))
+ (contexts
+ (apply append
+ (map (lambda (x)
+ (let ((context (cdr (assoc 'type-name x)))
+ (consists (append
+ (list (cdr (assoc 'group-type x)))
+ (cdr (assoc 'consists x))
+ (cdr (assoc 'end-consists x)))))
+
+ (if (member name consists)
+ (list context)
+ '())))
+ context-description-alist))))
+ (string-append
+ name " is part of contexts: "
+ (human-listify (map reffy (map context-name contexts))))))))
+
+
+;; First level Engraver description
+(define (document-separate-engraver top description)
+ (let ((name (car description)))
+ (string-append
+ (node (engraver-name name))
+ (document-engraver 2 description))))
+
+;; Second level, part of Context description
+(define (document-engraver-by-name name)
+ (let*
+ (
+ (eg (assoc (string->symbol name) engraver-description-alist))
+ )
+
+ (if (eq? eg #f)
+ (string-append "Engraver " name ", not documented.\n")
+ (document-engraver 3 (cdr eg))
+ )
+ ))
+
+(define (context-doc-string context-desc)
+ (let*
+ (
+ (name (cdr (assoc 'type-name context-desc)))
+ (desc-handle (assoc (string->symbol name) context-description-alist))
+ (desc (if (pair? desc-handle) (cdr desc-handle) ""))
+
+ (accepts (cdr (assoc 'accepts context-desc)))
+ (consists (append
+ (list (cdr (assoc 'group-type context-desc)))
+ (cdr (assoc 'consists context-desc))
+ (cdr (assoc 'end-consists context-desc))
+ ))
+ )
+
+ (string-append
+ desc
+
+ (if (null? accepts)
+ "This context is a `bottom' context; it can not contain other contexts."
+ (string-append
+ name " can contain \n"
+ (human-listify (map reffy (map context-name accepts)))))
+
+ "\n\nThis context is built from the following engravers\n"
+ (apply string-append
+ (map document-engraver-by-name consists)))))
+
+
+;; First level Context description
+(define (document-context top context-desc)
+ (let ((name (cdr (assoc 'type-name context-desc)))
+ (doc (context-doc-string context-desc)))
+
+ (string-append
+ (node (context-name name))
+ (section 2 (context-name name))
+ doc)))
+
+(define (document-paper name)
+ (let* ((paper-alist (My_lily_parser::paper_description))
+ (names (sort (map car paper-alist) string<?))
+ (contexts (map cdr paper-alist))
+ (doc (apply string-append
+ (map (lambda (x) (document-context name x)) contexts))))
+
+ (string-append
+ (texi-node-menu name (map (lambda (x) (cons (context-name x) ""))
+ names))
+ doc)))
+
+(define (document-all-engravers name)
+ (let* ((descs (map cdr engraver-description-alist))
+ (names (map car engraver-description-alist))
+ (doc (apply string-append
+ (map (lambda (x) (document-separate-engraver name x))
+ descs))))
+
+ (string-append
+ (texi-node-menu name (map (lambda (x) (cons (engraver-name x) ""))
+ names))
+ doc)))
+
((1 medium upright number feta-nummer 11) . "feta-nummer11")
((0 medium upright number feta-nummer 10) . "feta-nummer10")
((-1 medium upright number feta-nummer 8) . "feta-nummer8")
- ((-2 medium upright number feta-nummer 6) . "feta-nummer6")
- ((-3 medium upright number feta-nummer 5) . "feta-nummer5")
- ((-4 medium upright number feta-nummer 4) . "feta-nummer4")
+ ((-2 medium upright number feta-nummer 7) . "feta-nummer7")
+ ((-3 medium upright number feta-nummer 6) . "feta-nummer6")
+ ((-4 medium upright number feta-nummer 5) . "feta-nummer5")
+ ((-5 medium upright number feta-nummer 4) . "feta-nummer4")
((4 medium upright roman cmr 20) . "cmr20")
((3 medium upright roman cmr 16) . "cmr16")
((0 bold upright roman cmbx 10) . "cmbx10")
((-1 bold upright roman cmbx 8) . "cmbx8")
((-2 bold upright roman cmbx 7) . "cmbx7")
+
;; should use the same brace font every where and fix C++ code.
-
((2 medium upright braces feta-braces 26) . "feta-braces26")
((1 medium upright braces feta-braces 23) . "feta-braces23")
((0 medium upright braces feta-braces 20) . "feta-braces20")
+ ((-1 medium upright braces feta-braces 16) . "feta-braces16")
+ ((-2 medium upright braces feta-braces 13) . "feta-braces13")
+ ((-3 medium upright braces feta-braces 11) . "feta-braces11")
((3 bold italic dynamic feta-din 13) . "feta-din13")
((2 bold italic dynamic feta-din 13) . "feta-din13")
. ((finger . ((font-family . number) (font-relative-size . -3)))
(volta . ((font-family . number) (font-relative-size . -2)))
(tuplet . ((font-family . roman) (font-shape . italic) (font-relative-size . -1)))
- (timesig . ((font-family . number) (font-relative-size . 0)))
+
+ (timesig . ((font-family . number) (font-relative-size . 0)))
+ (timesig-symbol . ((font-family . music) (font-relative-size . 0)))
(mmrest . ((font-family . number) (font-relative-size . 1)))
(mmrest-symbol . ((font-family . music) (font-relative-size . 0)))
+;;; generate-documentation.scm -- Generate documentation
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Jan Nieuwenhuizen <janneke@gnu.org>
-(define (urlfy x)
- (string-append "<a href=" x ".html>" x "</a>"))
+;;; File entry point for generated documentation
-(define (human-listify l)
- (cond
- ((null? l) "none")
- ((null? (cdr l)) (car l))
- ((null? (cddr l)) (string-append (car l) " and " (cadr l)))
- (else (string-append (car l) ", " (human-listify (cdr l))))
- ))
+;;; Running LilyPond on this file generates the documentation
-(define (writing-wip x)
- (display (string-append "Writing " x " ... \n") (current-error-port))
- )
-(eval-string (ly-gulp-file "generate-engraver-documentation.scm"))
-(eval-string (ly-gulp-file "generate-backend-documentation.scm"))
+;; We use ly-gulp because these files live in
+;;
+;; PATH=$LILYPONDPREFIX/scm:<datadir>/scm
+;;
+(eval-string (ly-gulp-file "documentation-lib.scm"))
+(eval-string (ly-gulp-file "engraver-documentation-lib.scm"))
+(eval-string (ly-gulp-file "backend-documentation-lib.scm"))
+
+(let* ((doc (string-append
+ (document-paper "LilyPond interpretation contexts")
+ (document-all-engravers "LilyPond engravers")
+ (document-all-elements "LilyPond backend")))
+ (name "lilypond-internals")
+ (outname (string-append name ".texi"))
+ (out (open-output-file outname)))
+
+ (writing-wip outname)
+ (display
+ (string-append
+ (texi-file-head
+
+ ;; we can't use (dir) and top if we're included by lilypond.tely
+ "LilyPond internals" name "(lilypond.info)"
+ '(("LilyPond interpretation contexts" . "Hierarchy and grouping of Engravers")
+ ("LilyPond engravers" . "Engravers create Elements")
+ ("LilyPond backend" . "Detailed description of all Elements")))
+
+ doc
+ "\n@bye")
+ out))
+
+(newline (current-error-port))
; should include default value?
-;;; ::::::: should generate documentation for score elements from here.
+
+;;; FIXME: naming.
+;;; Score elements are called `objects' now and then, which gets
+;;; rather confusing, we now have `elements', `items', `spanners'
+;;; and `objects'.
+
(define (elt-property-description symbol type? description)
(list symbol type? description))
"All elements support this"
(list
(elt-property-description 'X-offset-callbacks list? "list of functions, each taking an element and axis argument. The function determine the position relative to this element's parent. The last one in the list is called first")
- (elt-property-description 'Y-offset-callbacks list? "see <code> X-offset-callbacks</code>")
+ (elt-property-description 'Y-offset-callbacks list? "see @code{X-offset-callbacks}")
(elt-property-description 'X-extent-callback procedure? "procedure taking an element and axis argument, returning a number-pair. The return value is the extent of the element.")
- (elt-property-description 'Y-extent-callback procedure? "see <code> X-extent-callback </code>")
+ (elt-property-description 'Y-extent-callback procedure? "see @code{X-extent-callback}")
(elt-property-description 'font-relative-size integer? "")
(elt-property-description 'extra-offset number-pair? "pair of reals (a cons) forcing an extra offset before outputting")
- (elt-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the <code>meta</code> field.")
+ (elt-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
(elt-property-description 'dependencies list? "list of score-element pointers that indicate who to compute first for certain global passes")
(elt-property-description 'no-spacing-rods boolean? "read from elements: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM)")
(elt-property-description 'extra-extent-X number-pair? "enlarge in X dimension by this much, measured in staff space")
- (elt-property-description 'extra-extent-Y number-pair? "see <code>extra-extent-Y</code>")
+ (elt-property-description 'extra-extent-Y number-pair? "see @code{extra-extent-Y}")
(elt-property-description 'minimum-extent-X number-pair? "minimum size in X dimension, measured in staff space")
- (elt-property-description 'minimum-extent-Y number-pair? "see <code>minimum-extent-Y</code>")
+ (elt-property-description 'minimum-extent-Y number-pair? "see @code{minimum-extent-Y}")
(elt-property-description 'origin ly-input-location? "location in input file of the definition")
(elt-property-description 'transparent boolean? "This is almost the
same as setting molecule-callback to #f, but this retains the
direction to choose if we're in the middle of the staff ")
(elt-property-description 'thickness number? "weight of beams, in staffspace")
(elt-property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)")
- (elt-property-description 'beamed-stem-shorten number? "")
- (elt-property-description 'height-quants number? "")
- (elt-property-description 'vertical-position-quant-function procedure? "")
- (elt-property-description 'dir-function procedure? "")
+ (elt-property-description 'beamed-stem-shorten number? "shorten beamed stems in forced direction")
+ (elt-property-description 'height-quants procedure? "function of type (beam staff-line-thickness) -> list of quants. Default value: default-beam-dy-quants.
+")
+ (elt-property-description 'vertical-position-quant-function procedure? "
+function of type (beam multiplicity dy staff-line-thickness) -> real. Default value: default-beam-y-quants, also available: beam-traditional-y-quants.
+")
+ (elt-property-description 'dir-function procedure? "function of type (count total)->direction. Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.")
(elt-property-description 'damping number? "damping factor.")
(elt-property-description 'outer-stem-length-limit number? "catch
suspect beam slopes, set slope to zero if outer stem is lengthened
more than this (in staffspace)")
(elt-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
)
-))
-
-
+ ))
-;;;;;;;;;;;;;;;;;;;;
(define clef-interface
(lily-interface
(elt-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.")
(elt-property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.")
(elt-property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count in collisions.
-<p>
+
Merge noteheads in collisions, even if they have a different number of
dots. This normal notation for polyphonic guitar music.
(elt-property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
(elt-property-description 'padding number? "add this much extra space between victim and support")
(elt-property-description 'self-alignment-X number? "real number: -1 =
-left aligned, 0 = center, 1 right-aligned in X direction. <p> Set to
-an element pointer, if you want that element to be the center. In
-this case, the center element should have this object as a reference
-point.
+left aligned, 0 = center, 1 right-aligned in X direction.
+
+ Set to an element pointer, if you want that element to be the center.
+In this case, the center element should have this object as a
+reference point.
")
(elt-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
(lily-interface
'line-of-score-interface
"Super element, parent of all:
-<p>
- The columns of a score that form one line. The toplevel element.
- Any element has a Line_of_score as both X and Y reference
- point. The Paper_score contains one element of this type. Control
- enters the Score_element dependency calculation from this single
- Line_of_score object."
+
+The columns of a score that form one line. The toplevel element. Any
+element has a Line_of_score as both X and Y reference point. The
+Paper_score contains one element of this type. Control enters the
+Score_element dependency calculation from this single Line_of_score
+object."
(list
(elt-property-description 'between-system-string string? "string
to dump between two systems. Useful for forcing pagebreaks")
bracket. Setting the property to #'if-no-beam will make it
print only if there is no beam associated with this tuplet bracket.")
(elt-property-description 'tuplet-number-visibility boolean-or-symbol? "
-Like <code>tuplet-bracket-visibility</code>, but for the number.")
+Like @code{tuplet-bracket-visibility}, but for the number.")
(elt-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket ")
(elt-property-description 'thick number? "thickness, in stafflinethickness")
)
(list
(elt-property-description 'text (lambda (x) (or (string? x) (list? x))) "
Scheme markup text. It is defined as follows:
-<p>
-TEXT : STRING | (MARKUP SENTENCE)<br>
-MARKUP: PROPERTY | ABBREV<br>
-SENTENCE: TEXT | SENTENCE TEXT<br>
-PROPERTY: (key . value)<br>
+@example
+
+TEXT : STRING | (MARKUP SENTENCE)
+MARKUP: PROPERTY | ABBREV
+SENTENCE: TEXT | SENTENCE TEXT
+PROPERTY: (key . value)
ABBREV: rows lines roman music bold italic named super sub text, or any font-style
-<p>
+
+@end example
So, TEXT is either a string, or a list of which the CAR is a MARKUP.
MARKUP is either a CONS: an element property '(key . value) or a symbol:
a predefined abbreviation for a list of element properties.
-<p>
+
The following abbreviations are currently defined:
-<dl>
-<dt>rows<dd> horizontal mode: set all text on one line (default)
-<dt>lines<dd> vertical mode: set every text on new line
-<dt>roman<dd> select roman font
-<dt>music<dd> select feta font
-<dt>bold<dd> select bold series
-<dt>italic<dd> select italic shape
-<dt>named<dd> lookup by character name
-<dt>text<dd> plain text lookup (by character value)
-<dt>super<dd> superscript
-<dt>sub<dd> subscript
-<dt> any font-style<dd> finger volta timesig mmrest mark script large Large dynamic
-</dl>
+@table @samp
+@item rows
+horizontal mode: set all text on one line (default)
+@item lines
+ vertical mode: set every text on new line
+@item roman
+ select roman font
+@item music
+ select feta font
+@item bold
+ select bold series
+@item italic
+ select italic shape
+@item named
+ lookup by character name
+@item text
+ plain text lookup (by character value)
+@item super
+ superscript
+@item sub
+ subscript
+@item any font-style
+ finger volta timesig mmrest mark script large Large dynamic
+@end table
" )
;; Should move this somewhere else?
(elt-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical")
(define separation-spanner-interface
(lily-interface
'separation-spanner-interface
- "Spanner that containing <code>separation-item-interface</code> elements to calculate rods"
+ "Spanner that containing @code{separation-item-interface} elements to calculate rods"
'()
))
(define text-script-interface
(elt-property-description 'minimum-distance number? "minimum distance between notes and rests.")
(elt-property-description 'elements list? "list of elements (NoteColumn,
generally) participating in the collision. The
-<code>rest-collision</code> property in <code>elements</code> is set
+@code{rest-collision} property in @code{elements} is set
to a pointer to the collision")
)))
(define script-column-interface
(lily-interface
'script-column-interface
- "An interface that sorts scripts according to their <code>script-priority</code>"
+ "An interface that sorts scripts according to their @code{script-priority}"
(list )))
takes about two noteheads of space (ie, is followed by a notehead of
space):
+@example
2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
- { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
- { assuming: SHORTEST <= 1/8 }
+ @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
+ @{ assuming: SHORTEST <= 1/8 @}
= arithmetic_multiplier *
( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
= arithmetic_multiplier * arithmetic_basicspace
- { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
+ @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
= quartwidth * arithmetic_basicspace
arithmetic_basicspace = 2/1 = 2
+
If you want to space your music wider, use something like:
arithmetic_basicspace = 4.;
+@end example
")
(elt-property-description 'arithmetic-multiplier number? "see arithmetic-basicspace")
(lily-interface
'separation-item-interface
"Item that computes widths to generate spacing rods.
-<p>
+
Calc dimensions for the Separating_group_spanner; this has to be
an item to get dependencies correct. It can't be an element_group
since these usually are in a different X_group
-; lily.scm -- implement Scheme output routines for TeX and PostScript
-;
-; source file of the GNU LilyPond music typesetter
-;
-; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; lily.scm -- implement Scheme output routines for TeX and PostScript
+;;;
+;;; source file of the GNU LilyPond music typesetter
+;;;
+;;; (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;
-; This file contains various routines in Scheme that are easier to
-; do here than in C++. At present it is an unorganised mess. Sorry.
-;
-; We should repartition the entire scm side of lily in a
-; more sane way, using namesspaces/modules?
+;;;
+;;; This file contains various routines in Scheme that are easier to
+;;; do here than in C++. At present it is an unorganised mess. Sorry.
+
+
+;;; We should repartition the entire scm side of lily in a
+;;; more sane way, using namesspaces/modules?
(debug-enable 'backtrace)
(begin
(eval-string (ly-gulp-file "interface.scm"))
+ (eval-string (ly-gulp-file "beam.scm"))
(eval-string (ly-gulp-file "slur.scm"))
(eval-string (ly-gulp-file "font.scm"))
(eval-string (ly-gulp-file "auto-beam.scm"))
(translator-property-description
'CONTEXTNAMEVerticalExtent number-pair? "hard coded vertical extent.
The format is a pair of dimensions, for example, this sets the sizes
-of a staff to 10 (5+5) staffspaces high. <p>
+of a staff to 10 (5+5) staffspaces high.
-<code>
+@example
\property Staff.StaffVerticalExtent = #(-5.0 . 5.0)
-</code>
+@end example
[fixme, naming]")
(translator-property-description
'CONTEXTNAMEMinimumVerticalExtent number-pair?
"minimum vertical extent, same format as CONTEXTNAMEVerticalExtent [fixme, naming]")
(translator-property-description
- 'CONTEXTNAExtraVerticalExtent number-pair?
+ 'CONTEXTNAMExtraVerticalExtent number-pair?
"extra vertical extent, same format
CONTEXTNAMEMinimumVerticalExtent [fixme, naming]") )))
(translator-property-description 'forgetAccidentals boolean? "do
not set localKeySignature when a note alterated differently from
localKeySignature is found.
-<p>
+
Causes accidentals to be printed at every note instead of
remembered for the duration of a measure.
")
(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.<p>
- 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.
+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 'repeatCommands list?
"This property is read to find any command of the form (volta . X), where X is a string or #f")
(translator-property-description 'voltaSpannerDuration moment?
- "maximum duration of the volta bracket.<p>
+ "maximum duration of the volta bracket.
Set to a duration to control the size of the brackets printed by
@code{\alternative}. It specifies the number of whole notes duration
'(TextScript)
(list
(translator-property-description 'combineParts boolean? "try to combine parts?")
+ (translator-property-description 'soloADue boolean? "set Solo/A due texts?")
+ (translator-property-description 'soloText string? "text for begin of solo")
+ (translator-property-description 'soloIIText string? "text for begin of solo for voice ``two''")
+ (translator-property-description 'aDueText string? "text for begin of a due")
+ (translator-property-description 'split-interval number-pair? "always split into two voices for contained intervals")
(translator-property-description 'unison boolean? "set if unisono is detected ")
- (translator-property-description 'solo boolean? "")
- (translator-property-description 'soloADue boolean? "")
- (translator-property-description 'soloText string? "")
- (translator-property-description 'soloIIText string? "")
- (translator-property-description 'aDueText string? "")
- (translator-property-description 'combineParts boolean? "")
- (translator-property-description 'unisilence boolean? "")
- (translator-property-description 'unison boolean? "")
- (translator-property-description 'unirhythm boolean? "")
- (translator-property-description 'solo boolean? "")
- (translator-property-description 'split-interval number-pair? "")
- (translator-property-description 'soloADue boolean? "")
+ (translator-property-description 'solo boolean? "set if solo is detected")
+ (translator-property-description 'unisilence boolean? "set if unisilence is detected")
+ (translator-property-description 'unirhythm boolean? "set if unirhythm is detected")
)))
(cons
(list
(translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically.
")
- (translator-property-description 'beamAutoEnd moment? "
- Specifies when automatically generated beams can end. See
- section XREF-autobeam [FIXME].")
- (translator-property-description 'beamAutoBegin moment? "
- Specifies when automatically generated beams can start. See
- section XREF-autobeam [FIXME].")
+ (translator-property-description 'autoBeamSettings list? "
+Specifies when automatically generated beams should begin and end. The elements have the format:
- )))
+@example
+
+ function shortest-duration-in-beam time-signature
+
+where
+
+ function = begin or end
+ shortest-duration-in-beam = numerator denominator; eg: 1 16
+ time-signature = numerator denominator, eg: 4 4
+
+unspecified or wildcard entries for duration or time-signature
+are given by * *
+
+The user can override beam begin or end time by pushing a wildcard entries
+'(begin * * * *) or '(end * * * *) resp., eg:
+
+ \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4)
+
+The head of the list:
+ '(
+ ((end * * 3 2) . ,(make-moment 1 2))
+ ((end 1 16 3 2) . ,(make-moment 1 4))
+ ((end 1 32 3 2) . ,(make-moment 1 8))
+ ...
+ )
+
+@end example"))))
(cons
'Bar_engraver
(list
(translator-property-description 'whichBar string? "This property is read to determine what type of barline to create.
Example:
-<xmp>
+@example
\\property Staff.whichBar = \"|:\"
-</xmp>
+@end example
will create a start-repeat bar in this staff only
")
(translator-property-description 'staffsFound list? "list of all staff-symbols found.")
prefatory matter (clefs, key signatures) appears, eg. this puts the
key signatures after the bar lines:
-<xmp>
+@example
\\property Score.breakAlignOrder = #'(
Span_bar
Breathing_sign
Key_item
Time_signature
)
-</xmp>
+@end example
")
)))
"Chord_name_engraver"
"Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req
and generate the appropriate chordname."
- '(ChordNames)
+ '(ChordName)
(list
(translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when
translating from notes to chord names. Set to 1 to find
property is used to label subsequent lines. If the
@code{midiInstrument} property is not set, then @code{instrument}
is used to determine the instrument for MIDI output.")
- (translator-property-description 'instr string? "see <code>instrument</code>")
+ (translator-property-description 'instr string? "see @code{instrument}")
)))
(cons
"Property_engraver"
"This is a engraver that converts \property settings into
back-end element-property settings. Example: Voice.stemLength will set
-#'length in all Stem objects<p>
+#'length in all Stem objects.
+
Due to CPU and memory requirements, the use of this engraver is deprecated."
'()
(list
(translator-property-description 'Generic_property_list list? "description of the conversion.
-<p>
- Defines names and types for generic properties. These are properties
- than can be plugged into the backend directly. See the init file
- @file{generic-property.scm} for details. For internal use only, deprecated.
+
+Defines names and types for generic properties. These are properties
+than can be plugged into the backend directly. See the init file
+@file{generic-property.scm} for details. For internal use only,
+deprecated.
")
)))
'(Slur)
(list
- (translator-property-description 'slurBeginAttachment symbol? "")
- (translator-property-description 'slurEndAttachment symbol? "")
+ (translator-property-description 'slurBeginAttachment symbol? "translates to the car of Slur.element-property 'attachment.")
+ (translator-property-description 'slurEndAttachment symbol? "translates to the cdr of Slur.element-property 'attachment.")
(translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set")
)))
(engraver-description
"Span_bar_engraver"
"This engraver makes cross-staff barlines: It catches all normal
-bar lines, and draws a single span-bar across them. <p>"
+bar lines, and draws a single span-bar across them."
'(SpanBar)
(list
'Time_signature_engraver
(engraver-description
"Time_signature_engraver"
- "Create a TimeSignature whenever <code>timeSignatureFraction</code> changes"
+ "Create a TimeSignature whenever @code{timeSignatureFraction} changes"
'(TimeSignature)
(list
)))
notes and rests expand into their full length, printing the appropriate
number of empty bars so that synchronization with other voices is
preserved.
-<code>
-@mudela[fragment,verbatim,center]
+
+@c my @vebatim patch would help...
+@example
+@@mudela[fragment,verbatim,center]
r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
-@end mudela
-</code>
+@@end mudela
+@end example
+
")
(translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
Switch off for cadenzas.")
Normally a tuplet bracket is as wide as the
@code{\times} expression that gave rise to it. By setting this
property, you can make brackets last shorter. Example
-<xmp>
-@mudela[verbatim,fragment]
-\context Voice \times 2/3 {
+
+@example
+@@mudela[verbatim,fragment]
+\context Voice \times 2/3 @{
\property Voice.tupletSpannerDuration = #(make-moment 1 4)
[c8 c c] [c c c]
-}
-@end mudela
-</xmp>
+@}
+@@end mudela
+@end example
")
(translator-property-description 'tupletInvisible boolean? "
If set to true, tuplet bracket creation is switched off
footify:
$(footify) $(sort $(wildcard $(outdir)/*.html out/*.html out-www/*.html))
-# what to do here?
-ifeq (a,b)
+INFO_INSTALL_FILES = $(wildcard $(addsuffix *, $(INFO_FILES)))
-$(outdir)/$(package).info: $(outdir)/topinfo.texinfo $(OUTTEXINFO_FILES)
- $(MAKEINFO) --force -o $@ $(outdir)/topinfo.texinfo
+INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_INSTALL_FILES)" -f $(stepdir)/install-out.sub.make
+localinstall: install-info
+localuninstall: uninstall-info
-INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_FILES)" -f $(stepdir)/install-out.sub.make $@
-
-localinstall: # $(INFO_FILES)
+install-info: $(INFO_FILES)
-$(INSTALL) -d $(infodir)
- $(INFOINSTALL)
-localuninstall:
- $(INFOINSTALL)
-
-endif
+ $(INFOINSTALL) localinstall
+uninstall-info:
+ $(INFOINSTALL) localuninstall
+ -rmdir $(infodir)
\ No newline at end of file
.SUFFIXES: .html .info .texi .texinfo
$(outdir)/%.info: $(outdir)/%.texi
- makeinfo --output=$@ $<
+ -$(MAKEINFO) --force --output=$@ $<
$(outdir)/%.html: $(outdir)/%.texi
- -makeinfo --force --output=$@ --html --no-headers $<
+ -$(MAKEINFO) --force --output=$@ --html --no-headers $<
# we want footers even if website builds (or is built) partly
$(footify) $@