+2003-03-15 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * Documentation/user/music-glossary.tely: add @omf tags
+
+ * Documentation/user/lilypond.tely: add @omf tags
+
+ * scm/generate-documentation.scm (string-append): add @omf tags.
+
+ * stepmake/stepmake/omf-*: new files
+
+ * input/regression/multi-measure-rest.ly (texidoc): add doco
+
+ * GNUmakefile.in (web-doc-install): add web-doc-install target
+
+ * lily/scm-hash.cc (remove): prevent underflow of elt_count_. This
+ fixes crashes while dumping MIDI.
+
+ * ly/performer-init.ly (FiguredBassContext): add Figured bass for
+ midi
+
2003-03-11 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* buildscripts/texi2omf.py: new file.
INFO_DOCS = lilypond lilypond-internals music-glossary
INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
-STEPMAKE_TEMPLATES=tex texinfo documentation
+STEPMAKE_TEMPLATES=tex texinfo omf documentation
+
+OMF_FILES += $(outdir)/lilypond-internals.html.omf
+
LOCALSTEPMAKE_TEMPLATES=lilypond ly
LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
cp dummy-interfaces.itexi $@
endif
+
@end direntry
+@ignore
+@omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
+@omfdescription User manual of the LilyPond music engraving system
+@omftype user manual
+@omfcategory Music
+@end ignore
+
+
+
@ifhtml
This document is also available in @uref{../lilypond.ps.gz,gzipped
PostScript} and @uref{../lilypond.pdf,PDF}.
Copyright @copyright{} 1999--2002 by the authors
@end titlepage
+
+
+@ignore
+@omfcreator Christian Mondrup
+@omfdescription Glossary of musical terms with translations
+@omftype user manual
+@omfcategory Music
+@end ignore
+
+
@ifnottex
@node Top
@top
@ifnottex
Christian Mondrup
@*
-spanish by Davi Gonz@'alez
-@*
Copyright 1999-2002 by the authors
@c License PD, BSD-ish, GNU GPL, GNU FDL?
local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
+
+web-doc-install: web-doc
+ $(INSTALL) -m 755 -d $(local_package_docdir)
+ tar -C $(local_package_docdir)/ -xzf $(outdir)/web.tar.gz
+
web-ext = gz html midi pdf png txt ly
top-web:
cd $(builddir) && rm -f `find . -name \*.html~ -print`
formats = {
'html' : 'text/html',
'pdf' : 'application/pdf',
+ 'ps.gz' : 'application/postscript',
'ps' : 'application/postscript',
}
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
stepmake = @stepmake@
+docdir = $(datadir)/doc/
+omfdir = $(datadir)/omf/
# move out of config.make.in?
package_datadir = $(datadir)/$(package)
package_libdir = $(libdir)/$(package)
+package_docdir = $(docdir)/$(package)
+package_omfdir = $(omfdir)/$(package)
+
local_package_datadir = $(lilypond_datadir)/$(TOPLEVEL_VERSION)
local_package_libdir = $(lilypond_libdir)/$(TOPLEVEL_VERSION)
+local_package_docdir = $(lilypond_docdir)/$(TOPLEVEL_VERSION)
+local_package_omfdir = $(lilypond_docdir)/$(TOPLEVEL_VERSION)
lilypond_datadir = $(package_datadir)
lilypond_libdir = $(package_libdir)
+lilypond_docdir = $(package_docdir)
+
local_lilypond_datadir = $(local_package_datadir)
local_lilypond_libdir = $(local_package_libdir)
multi-measure-rest is a Spanner, minimum distances are set to keep it
colliding from barlines.
+Rests over measures during longer than 2 wholes use breve rests. When
+more than 10 or more measures (tunable through @code{expand-limit})
+are used then a different symbol is used.
-Rests over measures during longer than 2 wholes use breve rests.
"
-
}
R2.
R2.*3
- R2.*27
+ R2.*9
+ R2.*11
+
\time 8/4 R1*2
}
\paper {
#include "scm-hash.hh"
#include "ly-smobs.icc"
-void
+/*
+ Return: number of objects.
+ */
+int
copy_scm_hashes (SCM dest, SCM src)
{
- for (int i = SCM_SYMBOL_LENGTH (src); i--;)
+ int k = 0;
+ for (int i = SCM_VECTOR_LENGTH (src); i--;)
for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p(s); s = ly_cdr (s))
{
scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s));
+ k++;
}
+ return k ;
}
{
hash_tab_ = SCM_EOL;
- elt_count_ = src.elt_count_;
+ elt_count_ = 0;
smobify_self ();
hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11 ), SCM_EOL);
- copy_scm_hashes (hash_tab_, src.hash_tab_);
+ elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
}
void
if (&src == this)
return;
- elt_count_ = src.elt_count_;
hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11), SCM_EOL);
- copy_scm_hashes (hash_tab_, src.hash_tab_);
+ elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
}
SCM
/*
resize if getting too large.
*/
- if (elt_count_ > 2 * SCM_SYMBOL_LENGTH (hash_tab_))
+ if (elt_count_ > 2 * SCM_VECTOR_LENGTH (hash_tab_))
{
SCM nh = scm_make_vector (gh_int2scm (3* elt_count_+1), SCM_EOL);
- copy_scm_hashes (nh, hash_tab_);
+ elt_count_ = copy_scm_hashes (nh, hash_tab_);
hash_tab_ = nh;
}
-
}
// UGH.
Scheme_hash_table::remove (SCM k)
{
scm_hashq_remove_x (hash_tab_, k);
- elt_count_ --;
+ /*
+ don't decrease elt_count_ , as this may cause underflow. The exact
+ value of elt_count_ is not important.
+ */
}
Scheme_hash_table::~Scheme_hash_table ()
Scheme_hash_table::to_alist () const
{
SCM l = SCM_EOL;
- for (int i = SCM_SYMBOL_LENGTH (hash_tab_); i--;)
+ for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;)
for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p(s); s = ly_cdr (s))
{
l = scm_acons (ly_caar (s), ly_cdar (s), l);
\consists "Time_signature_performer"
}
-\translator { \StaffContext }
-\translator { \StaffContext
- \name RhythmicStaff
-}
-
VoiceContext = \translator {
\type "Performer_group_performer"
\consists "Piano_pedal_performer"
\accepts "Thread"
}
-\translator { \VoiceContext }
ThreadContext = \translator {
\type "Performer_group_performer"
\consists "Note_performer"
\consists "Tie_performer"
}
-\translator { \ThreadContext }
-
-% retain for compatibility reasons (FIXME: convert-ly)
-\translator {
- \type "Performer_group_performer"
- \name Grace
-}
-\translator
-{
+FiguredBassContext = \translator {
\type "Performer_group_performer"
- \name VoiceTwo\consists "Note_performer"
-
+ \name FiguredBass
+ \consists "Swallow_performer"
}
GrandStaffContext = \translator {
\accepts RhythmicStaff
\accepts Staff
}
-\translator { \GrandStaffContext }
PianoStaffContext = \translator {
\type "Performer_group_performer"
\name "PianoStaff"
\accepts Staff
}
-\translator { \PianoStaffContext }
+
+ScoreContext = \translator {
+ \type "Score_performer"
+
+ \name Score
+ \alias Timing
+ instrument = #"bright acoustic"
+ \accepts Staff
+ \accepts GrandStaff
+ \accepts PianoStaff
+ \accepts Lyrics
+ \accepts StaffGroup
+ \accepts ChoirStaff
+ \accepts RhythmicStaff
+ \accepts ChordNames
+ \accepts FiguredBass
+
+ \alias "Timing"
+ \consists "Timing_translator"
+ \consists "Swallow_performer"
+
+ dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume
+ instrumentEqualizer = #default-instrument-equalizer
+}
+
\translator {
\type "Performer_group_performer"
\accepts Staff
}
-ScoreContext = \translator {
- \type "Score_performer"
- \name Score
- \alias Timing
- instrument = #"bright acoustic"
- \accepts Staff
- \accepts GrandStaff
- \accepts PianoStaff
- \accepts Lyrics
- \accepts StaffGroup
- \accepts ChoirStaff
- \accepts RhythmicStaff
- \accepts ChordNames
- \alias "Timing"
- \consists "Timing_translator"
- \consists "Swallow_performer"
-
- dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume
- instrumentEqualizer = #default-instrument-equalizer
-}
-\translator { \ScoreContext }
+\translator { \ScoreContext }
+\translator { \StaffContext }
+\translator { \StaffContext \name RhythmicStaff }
+\translator { \VoiceContext }
+\translator { \ThreadContext }
+\translator { \PianoStaffContext }
+\translator { \GrandStaffContext }
+\translator { \FiguredBassContext }
LY2DVI = $(script-dir)/ly2dvi.py
LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py
-
else
+
### some versions apparently choke on $(message)
### $(message running from installed stepmake)
# make html
make web-doc top-web
+make -C Documentation/user/ omf
+
%install
cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
+make prefix="$RPM_BUILD_ROOT%{_prefix}" web-doc-install
+make -C Documentation/user/ prefix="$RPM_BUILD_ROOT%{_prefix}" omf-install
-# again, make sure that main package installs even if doco fails
-mkdir -p web/out
-tar -C web -xzf out/web.tar.gz
%post
chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
+scrollkeeper-update
+
echo 'Please logout first before using LilyPond.'
%preun
+scrollkeeper-update
%if %{info}
if [ $1 = 0 ]; then
%{_datadir}/lilypond/@TOPLEVEL_VERSION@/
%{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
+
+%{docdir}/lilypond/@TOPLEVEL_VERSION@
+%{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
+
/etc/profile.d/lilypond.*
-%files documentation
-%defattr(-, root, root)
-%doc web/
+# % files documentation
+
+# % defattr(-, root, root)
+
# huh ? these are for documentation?!
TELY_FILES := $(wildcard *.tely)
+
+OMF_FILES += $(foreach format, html pdf ps.gz, $(foreach f, $(TELY_FILES), $(outdir)/$(f:.tely=.$(format)).omf))
+
ITELY_FILES := $(wildcard *.itely)
ITEXI_FILES := $(wildcard *.itexi)
LY_FILES := $(wildcard *.ly)
@end macro
@end ifinfo
+
+@ignore
+@omftitle LilyPond internals
+@omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
+@omfdescription Programmer's reference of the LilyPond music engraving system
+@omftype user manual
+@omfcategory Music
+@end ignore
+
+
") out-port)
(define top-node
(grob-property-description 'avoid-note-head boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.")
(grob-property-description 'up-to-staff boolean? "if set, stems' lengths are set so as stems end out of the staff. Used by tablature.")
(grob-property-description 'use-breve-rest boolean? "boolean that tells multi-measure-rest to use a breve rest to represent the duration of 1 measure instead of w whole rest. It defaults to false. It is set to true when the duration of a measure is a breve or longer.")
+
+; (display (length all-backend-properties))
##deprecated
#topdir := $(abs-srcdir)
#endif
-pwd := $(shell pwd)
+
+## `which pwd` is to prevent symlink resolving intelligence
+pwd:=$(shell `which pwd`)
+current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd))
ifeq ($(srcdir),.)
src-depth = $(depth)
--- /dev/null
+
+omf: $(OMF_FILES)
+
+
+omf-local-install: $(OMF_FILES)
+ $(foreach a, $(OMF_FILES), $(INSTALL) $(a) $(local_package_omfdir)/$(a) && ) true
+
+local-install: omf-local-install
--- /dev/null
+
+#empty
+#
+
+OMF_FILES +=
# we want footers even if website builds (or is built) partly
$(footify) $@
+$(outdir)/%.html.omf: $(outdir)/%.texi
+ $(GENERATE_OMF) --format html --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
+$(outdir)/%.pdf.omf: $(outdir)/%.texi
+ $(GENERATE_OMF) --format pdf --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
+
+$(outdir)/%.ps.gz.omf: $(outdir)/%.texi
+ $(GENERATE_OMF) --format ps.gz --location $(local_package_docdir)/$(current-relative-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
+
# Generic rule not possible?
$(outdir)/%/%.html: $(outdir)/%.texi
$(MAKEINFO) --output=$@ --html $<
TEXINFO_SOURCES = $(TEXI_FILES)
OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt))
+
+GENERATE_OMF = $(PYTHON) $(depth)/buildscripts/texi2omf.py
+