* pktrace:
cp mf/out/feta20.* $HOME/usr/src/sketch-0.7.8/Resources/Fontmetrics
- echo 'TeX-feta20,feta20,Roman,-gnu-feta20-medium-r-normal,adobe-fontspecific,feta20' >> $HOME/usr/src/sketch-0.7.8/Resources/Fontmetrics/std.sfd
+ echo 'TeX-feta20,feta20,Roman,-gnu-feta20-medium-r-normal,adobe-fontspec\ific,feta20' >> $HOME/usr/src/sketch-0.7.8/Resources/Fontmetrics/std.sfd
+1.5.3.lec1
+==========
+abc2ly fixes:
+
+ fix to Q: support
+ partial fix for tuplet parsing
+ fix for blank first T: line
+ escape "'s in header lines
+ fix for dotted breve in whole note duration
+ M:none no longer attempts to insert "\time none"
+
+
+1.5.20.uu1
+==========
+
+* etf2ly robustness fixes
+
+* Rewrote outputting backend. Now uses GUILE modules.
+
+* Line breaking bugfix.
+
+* Bugfix: Unfolded_repeat_iterator::add_repeat_command().
+
1.5.20
======
FTP directory for @code{geometry}}. This package is normally included
with the @TeX{} distribution.
-@item MetaPost, needed for generating PostScript fonts. Please
-note that tetex-0.4pl8 (included with Red Hat 5.x) does not include
-@file{mfplain.mp}, which is needed for producing the scalable font
-files.
-
-If you don't have MetaPost and don't want to use PostScript output, then
-edit @file{mf/GNUmakefile}, removing the line saying @code{PFA_FILES=}.
-
@item kpathsea, a library for searching (@TeX{}) files. @code{kpathsea} is
usually included with your installation of @TeX{}. You may need to install
a tetex-devel or tetex-dev package too.
./configure --without-kpathsea --enable-tfm-path=/usr/share/texmf/fonts/tfm/public/cm/:/usr/share/texmf/fonts/tfm/ams/symbols
@end example
+
+@item pktrace, [OPTIONAL], needed for generating PostScript Type1
+fonts. Get it from
+ @uref{http://www.cs.uu.nl/~hanwen/public/software/pktrace-0.1.tar.gz}
+
+@item autotrace-0.27a, [OPTIONAL], needed for generating PostScript Type1
+fonts. You must apply the patch included pktrace-0.1 first.
+@uref{http://autotrace.sourceforge.net}.
+
+@item MetaPost [OPTIONAL] needed for generating PostScript Type3 fonts. Please
+note that tetex-0.4pl8 (included with Red Hat 5.x) does not include
+@file{mfplain.mp}, which is needed for producing the scalable font
+files.
+
+If you don't have MetaPost and don't want to use PostScript output, then
+edit @file{mf/GNUmakefile}, removing the line saying @code{PFA_FILES=}.
+
+
+
@end itemize
@subsection Running requirements
rm `find /var/lib/texmf/fonts -name 'feta*'`
@end example
-a script to do this for you is in @file{buildscripts/clean-fonts.sh}
+a script to do this for you is in @file{buildscripts/out/clean-fonts}
@section Bugs
%\def\postLilypondExample{}
+\usepackage{graphics}
+\def\postLilypondExample{}
+\def\preLilypondExample{}
\begin{document}
-\begin{lilypond}
-\score {
- \notes\relative c' { c d e f g a b c }
-}
-\end{lilypond}
+\preLilypondExample \input lily-464146743.tex \postLilypondExample
-\begin[fragment]{lilypond}
-c d e
-\end{lilypond}
+
+\preLilypondExample \input lily-940223662.tex \postLilypondExample
+
% generate standard lilypond titles
\input titledefs.tex
\def\preLilypondExample{\def\mustmakelilypondtitle{}}
-\begin{lilypond}
-\header {
- title = "Title"
- subtitle = "Subtitle"
- subsubtitle = "Subsubtitle"
- opus = "Opus 1"
- piece = "Piece"
- composer = "Composer"
- enteredby = "JCN"
- instrument = "instrument"
-}
-\paper { linewidth = -1. }
-\score {
- \notes \relative c'' { a b c d }
-}
-\end{lilypond}
+\preLilypondExample \input lily-615430739.tex \postLilypondExample
+
\begin{enumerate}
\item Vers one. aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa
(ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry).
This package is normally included with the TeX distribution.
- * MetaPost, needed for generating PostScript fonts. Please note that
- tetex-0.4pl8 (included with Red Hat 5.x) does not include
- `mfplain.mp', which is needed for producing the scalable font
- files.
-
- If you don't have MetaPost and don't want to use PostScript
- output, then edit `mf/GNUmakefile', removing the line saying
- `PFA_FILES='.
-
* kpathsea, a library for searching (TeX) files. `kpathsea' is
usually included with your installation of TeX. You may need to
install a tetex-devel or tetex-dev package too.
./configure --without-kpathsea --enable-tfm-path=/usr/share/texmf/fonts/tfm/public/cm/:/usr/share/texmf/fonts/tfm/ams/symbols
+ * pktrace, [OPTIONAL], needed for generating PostScript Type1 fonts.
+ Get it from
+ `http://www.cs.uu.nl/~hanwen/public/software/pktrace-0.1.tar.gz'
+
+ * autotrace-0.27a, [OPTIONAL], needed for generating PostScript Type1
+ fonts. You must apply the patch included pktrace-0.1 first.
+ `http://autotrace.sourceforge.net'.
+
+ * MetaPost [OPTIONAL] needed for generating PostScript Type3 fonts.
+ Please note that tetex-0.4pl8 (included with Red Hat 5.x) does not
+ include `mfplain.mp', which is needed for producing the scalable
+ font files.
+
+ If you don't have MetaPost and don't want to use PostScript
+ output, then edit `mf/GNUmakefile', removing the line saying
+ `PFA_FILES='.
+
Running requirements
--------------------
files, eg.,
rm `find /var/lib/texmf/fonts -name 'feta*'`
- a script to do this for you is in `buildscripts/clean-fonts.sh'
+ a script to do this for you is in `buildscripts/out/clean-fonts'
Bugs
====
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
-PATCH_LEVEL=20
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=21
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
dnl aclocal.m4 -*-shell-script-*-
dnl StepMake subroutines for configure.in
fi
fi
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat > conftest.$ac_ext <<EOF
+#line 1903 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ continue
+fi
+rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1921 "configure"
+#include "confdefs.h"
+$ac_declaration
+int main() {
+exit (42);
+; return 0; }
+EOF
+if { (eval echo configure:1928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1896: checking for FlexLexer.h" >&5
+echo "configure:1947: checking for FlexLexer.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1901 "configure"
+#line 1952 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking "g++ version"""... $ac_c" 1>&6
-echo "configure:1943: checking "g++ version"" >&5
+echo "configure:1994: checking "g++ version"" >&5
cxx_version=`$CXX --version`
echo "$ac_t"""$cxx_version"" 1>&6
# urg, egcs: how to check for egcs >= 1.1?
echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6
-echo "configure:1961: checking whether explicit instantiation is needed" >&5
+echo "configure:2012: checking whether explicit instantiation is needed" >&5
if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1966 "configure"
+#line 2017 "configure"
#include "confdefs.h"
template <class T> struct foo { static int baz; };
return foo<int>::baz;
; return 0; }
EOF
-if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lily_cv_need_explicit_instantiation=no
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2003: checking for $ac_word" >&5
+echo "configure:2054: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2046: checking for $ac_word" >&5
+echo "configure:2097: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2081: checking for $ac_word" >&5
+echo "configure:2132: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2149: checking for $ac_word" >&5
+echo "configure:2200: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2182: checking for $ac_word" >&5
+echo "configure:2233: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:2237: checking language" >&5
+echo "configure:2288: checking language" >&5
case "$language" in
En* | en* | Am* | am* | US* | us*)
lang=English;;
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:2273: checking for gettext in -lintl" >&5
+echo "configure:2324: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2281 "configure"
+#line 2332 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
gettext()
; return 0; }
EOF
-if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in gettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2325: checking for $ac_func" >&5
+echo "configure:2376: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2330 "configure"
+#line 2381 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2388: checking for $ac_word" >&5
+echo "configure:2439: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$MSGFMT" || MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh "
echo $ac_n "checking whether msgfmt accepts -o""... $ac_c" 1>&6
-echo "configure:2419: checking whether msgfmt accepts -o" >&5
+echo "configure:2470: checking whether msgfmt accepts -o" >&5
msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
if test "$msgfmt_output" = ""; then
echo "$ac_t""yes" 1>&6
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2447: checking for $ac_word" >&5
+echo "configure:2498: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2483: checking for $ac_word" >&5
+echo "configure:2534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2521: checking for $ac_word" >&5
+echo "configure:2572: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_METAPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2557: checking for $ac_word" >&5
+echo "configure:2608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2596: checking for $ac_word" >&5
+echo "configure:2647: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2632: checking for $ac_word" >&5
+echo "configure:2683: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INIMFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2670: checking for $ac_word" >&5
+echo "configure:2721: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INIMETAPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2706: checking for $ac_word" >&5
+echo "configure:2757: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INIMPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for working metafont mode""... $ac_c" 1>&6
-echo "configure:2740: checking for working metafont mode" >&5
+echo "configure:2791: checking for working metafont mode" >&5
modelist='ljfour lj4 lj3 lj2 ljet laserjet'
for MFMODE in $modelist; do
$METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
echo "$ac_t""$MFMODE" 1>&6
echo $ac_n "checking for mfplain.mp""... $ac_c" 1>&6
-echo "configure:2751: checking for mfplain.mp" >&5
+echo "configure:2802: checking for mfplain.mp" >&5
#
# For now let people define these in their environments
#
echo "$ac_t""$MFPLAIN_MP" 1>&6
echo $ac_n "checking for inimetapost flags""... $ac_c" 1>&6
-echo "configure:2759: checking for inimetapost flags" >&5
+echo "configure:2810: checking for inimetapost flags" >&5
if test ${INIMETAPOST} = "inimp" ; then
: ${INIMETAPOST_FLAGS=''}
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2792: checking for $ac_word" >&5
+echo "configure:2843: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_KPSEWHICH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$KPSEWHICH" || KPSEWHICH="no"
echo $ac_n "checking for tfm path""... $ac_c" 1>&6
-echo "configure:2823: checking for tfm path" >&5
+echo "configure:2874: checking for tfm path" >&5
TFM_FONTS="cmr msam"
## First, let's just see if we can find Guile at all.
echo $ac_n "checking "for guile-config"""... $ac_c" 1>&6
-echo "configure:2851: checking "for guile-config"" >&5
+echo "configure:2902: checking "for guile-config"" >&5
for guile_config in guile-config $target-guile-config $build-guile-config; do
echo "$ac_t"""$guile_config"" 1>&6
if ! $guile_config --version > /dev/null 2>&1 ; then
echo "configure: warning: "cannot execute $guile_config"" 1>&2
echo $ac_n "checking "if we are cross compiling"""... $ac_c" 1>&6
-echo "configure:2857: checking "if we are cross compiling"" >&5
+echo "configure:2908: checking "if we are cross compiling"" >&5
guile_config=error
else
break
exit 1
fi
echo $ac_n "checking "Guile version"""... $ac_c" 1>&6
-echo "configure:2868: checking "Guile version"" >&5
+echo "configure:2919: checking "Guile version"" >&5
need_guile_version="1.3.4"
need_guile_version_numeric=100304
guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'`
## The GUILE_FLAGS macro.
echo $ac_n "checking for Guile""... $ac_c" 1>&6
-echo "configure:2889: checking for Guile" >&5
+echo "configure:2940: checking for Guile" >&5
if ! $guile_config link > /dev/null ; then
echo "$ac_t"""cannot execute $guile_config"" 1>&6
{ echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; }
# Extract the first word of "guile", so it can be a program name with args.
set dummy guile; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2904: checking for $ac_word" >&5
+echo "configure:2955: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2965: checking for $ac_hdr" >&5
+echo "configure:3016: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
+#line 3021 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6
-echo "configure:3002: checking for kpse_find_file in -lkpathsea" >&5
+echo "configure:3053: checking for kpse_find_file in -lkpathsea" >&5
ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkpathsea $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 3061 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
kpse_find_file()
; return 0; }
EOF
-if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in kpse_find_file
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3054: checking for $ac_func" >&5
+echo "configure:3105: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3059 "configure"
+#line 3110 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6
-echo "configure:3112: checking whether to use kpathsea" >&5
+echo "configure:3163: checking whether to use kpathsea" >&5
if test "$kpathsea_b" != no; then
echo "$ac_t""yes" 1>&6
KPATHSEA=1
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3133: checking for $ac_word" >&5
+echo "configure:3184: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX2HTML'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3184: checking for 8-bit clean memcmp" >&5
+echo "configure:3235: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 3192 "configure"
+#line 3243 "configure"
#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int) throw();
-#endif
main()
{
}
EOF
-if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:3223: checking for vprintf" >&5
+echo "configure:3271: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3228 "configure"
+#line 3276 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:3278: checking for _doprnt" >&5
+echo "configure:3326: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3283 "configure"
+#line 3331 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
for ac_func in memmem snprintf vsnprintf gettext isinf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3336: checking for $ac_func" >&5
+echo "configure:3384: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3341 "configure"
+#line 3389 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3407: checking for $ac_word" >&5
+echo "configure:3455: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$MAKEINFO" != "error"; then
echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6
-echo "configure:3439: checking whether makeinfo can split html by @node" >&5
+echo "configure:3487: checking whether makeinfo can split html by @node" >&5
mkdir -p out
makeinfo --html --output=out/split <<EOF
\input texinfo
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3467: checking for $ac_word" >&5
+echo "configure:3515: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3505: checking for $ac_hdr" >&5
+echo "configure:3553: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3510 "configure"
+#line 3558 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
+++ /dev/null
-\include "paper20.ly"
-\version "1.4.7"
-\header {
- title = "Rondo Alla Turca"
- subtitle = "Turkish March"
- composer = "W. A. Mozart"
- piece = "\\quad \\quad \\quad \\quad \\quad Allegretto"
- mutopiatitle = "Rondo Alla Turca"
- mutopiacomposer = "W. A. Mozart (1756-1791)"
- mutopiainstrument = "Piano"
- style = "classical"
- copyright = "Public Domain"
- maintainer = "Rune Zedeler"
- maintainerEmail = "rz@daimi.au.dk"
- lastupdated = "2001/sep/15"
- tagline = "\\parbox{\hsize}{\\thefooter\\quad\\small \\\\This music is part of the Mutopia project, \\texttt{http://www.mutopiaproject.org/}\\\\It has been typeset and placed in the public domain by " + \maintainer + " (" + \maintainerEmail + ").\\\\Unrestricted modification and redistribution is permitted and encouraged---copy this music and share it!}"
-}
-
-volta = "volta"
-
-\include "deutsch.ly";
-
-#(define (remove-scripts music)
- (let* ((es (ly-get-mus-property music 'elements))
- (e (ly-get-mus-property music 'element))
- (body (ly-get-mus-property music 'body))
- (alts (ly-get-mus-property music 'alternatives)))
-
- (if (pair? es)
- (begin
- (ly-set-mus-property
- music 'elements
- (map (lambda (x) (remove-scripts x)) es))
- (let recurse ((elts (ly-get-mus-property music 'elements)))
- (if (and (pair? elts) (pair? (cdr elts)))
- (let ((name (ly-music-name (cadr elts))))
- (if (or (equal? name "Articulation_req") (equal? name "Text_script_req"))
- (begin
- (set-cdr! elts (cddr elts))
- (recurse elts))
- (recurse (cdr elts))))))))
-
- (if (music? alts)
- (ly-set-mus-property
- music 'alternatives
- (remove-scripts alts)))
-
- (if (music? body)
- (ly-set-mus-property
- music 'body
- (remove-scripts body)))
-
- (if (music? e)
- (ly-set-mus-property
- music 'element
- (remove-scripts e)))
- music))
-
-righta = \notes \transpose c''' {
- \scriptUp
- \property Staff.Fingering \override #'direction = #1
- \partial 4 h,16-4-\p( a, gis, a,-1 | )c8-3 r d16-4( c h, c-1 | )e8-3 r f16-4( e dis e-1 | h-4 a gis a h a gis a | )c'4-\accent
- a8-.-3 c'-.-5 | \grace {[g!32( )a]} h8-.-5-\sfz <fis-2 a-.-4> <e g-.> <fis a-.> | \grace {[g32( )a]} h8-.-\sfz <fis-2 a-.> <e g-.> <fis a-.> | \grace {[g32( )a]} h8-.-\sfz <fis-2 a-.> <e g-.> <dis fis-.> e4--
-}
-rightaa = \notes \transpose c''' {
- \partial 4 h,16-4-\p( a, gis, a,-1 | )c8-3 r d16-4( c h, c-1 | )e8-3 r f16-4( e dis e-1 | h-4 a gis a h \< a gis a | \! )c'4-\accent
- a8-.-3 h-. | c'-.-\accent \> h-. a-.-1 \! gis-.-2 a-. e-. f-.-4 d-.-2 | c4-- h,8.-2-\trill( a,32 h, | )a,4--
-}
-
-rightb = \notes \transpose c''' {
- [<c8-1-\mp e-3-.> <d! f!-.>] | <e-3 g-.-5> <e-1 g-.-3> a16-4( g f )e | \stemUp <d4-\accent-4 \context Voice = another {\stemDown \slurDown h,8-2()g, }> \stemBoth
- <c8-1 e-3-.> <d! f!-.> | <e-3 g-.-5> <e-1 g-.-4> a16-4( g f )e | <h,4-2-\accent d-4-->
- <a,8-1 c-3-.> <h, d> | <c-3 e-.-5> <c-1 e-.-3> f16-4( e d )c | \stemUp <h,4-\accent-4 \context Voice = another {\stemDown \slurDown gis,8-2()e,}> \stemBoth
- <a,8 c-.> <h, d> | <c e-.> <c-1 e-.> f16( e d )c | <gis,4-2-- h,-4-\accent>
-}
-
-rightca = \notes \context Voice = voicea \relative c''' { a8-.-\f h-. | cis4-\accent a8-. h-. cis-.-\accent h-. a-. gis-. | fis-. gis-. a-. h-. gis-4( )e-.
-a8-. h-. | cis4-\accent a8-. h cis-.-\accent h-. a-. gis-. | fis-. h-. gis-. e-. a4
-}
-rightc = \notes < \apply #remove-scripts \rightca \transpose c \rightca >
-rightco = \notes \relative c''
-{ \stemDown
- a16-\f( a' h, h' | cis,-\accent )cis' r8 a,16( a' h, h' cis, cis' h, h' a, a' gis, )gis' | fis,( fis' gis, gis' a, a' h, h' gis, gis' e, )e'
- a,16( a' h, h' | cis,-\accent )cis' r8 a,16( a' h, h' cis, cis' h, h' a, a' gis, )gis' | fis,( fis' h, h' gis, gis' e, e'
-}
-rightcoa = \notes \context Voice < )a'4 a'' >
-
-rightd = \notes \relative c''' {
- cis16-3-\p( d cis h a h a gis-3 fis-2 a gis fis | eis fis gis eis cis-2 dis eis cis-1 | fis-4 eis-1 fis gis a gis a-1 h | cis his cis his
- cis d cis )h | a( h a gis-3 fis a gis fis | e fis gis e cis-2 dis e cis | dis-3 e fis dis his-1 cis dis his | )cis4
-}
-righte = \notes \relative c''' {
- e,16-5(-\f d! cis h! | a h cis d-1 e fis gis a | )a-\accent-4( gis fis )e e-5( d cis h | )a-1( h cis d-1 e fis gis a ais8-\accent-3 )h-.-4
- e,16-5( d cis h | a h cis d-1 e fis gis a | )a-\accent-4( gis fis )e e-5( d cis h | cis-3 e a,-1 cis-4 h d gis,-2 h | )a4--
- cis'16-3-\p( d cis h a h a gis-3 fis-2 a gis fis | eis fis gis eis cis-2 dis eis )cis-1 | fis-4( \< eis-1 fis gis a gis a-1 \! h | cis his cis his
- cis his cis ais-2 | )d-4( \> cis d cis d cis d cis | d cis h a gis-2 a h \! gis | a-\p h cis fis,-2 eis fis gis eis )fis4--
-}
-
-strum = \notes \transpose c' { <
- \context Voice = strumUp {\stemUp cis'2-\arpeggio-\accent}
- \context Voice = strumDown {\stemDown < cis4-\arpeggio e a> }
->
-\stemBoth
-}
-
-rightf = \notes \transpose c''' {
- < {\stemUp cis'8. cis'16} \context Voice = another {\stemDown cis4} >
- \strum \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' <d'2-\accent a fis>
- \repeat unfold 4 { \grace{d'8( } < )cis'8-. a e> } | < {\stemUp \slurUp h4.-3()e'8-. \stemBoth} \context Voice = another <gis2 e> >
- \strum \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' <d'2-\accent a fis> \grace{d'8( } < )cis'2-. a e>
- \repeat unfold 4 { \grace{cis'8( } < )h8-. gis e> }
-
- a4-\p-- \grace {[e32()a]} cis'8.-.-4 cis'16 \repeat unfold 2 { \grace {[e32()a]} cis'2-\accent } |
- d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' | d'2-\accent | \repeat unfold 4 { \grace{d'8( } ) cis'8-. } h4.-2()e'8-.
- <\strum s2-\f> \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' <d'2-\accent a fis> \grace{d'8( } < )cis'2-. a e>
- \repeat unfold 4 { \grace{cis'8( } < )h8-. gis e> }
- <a,4. cis e a--> <cis8 cis'-.> <a,4. a--> <e8 e'-.> <a,4. a--> <cis8 cis'-.> <a, a-.> <cis8 cis'-.> <a, a-.> <e8 e'-.> <a,4 a-.>
- <a,4-. cis e a-.( > <) a,4-. cis e a-. > r4
-}
-
-
-lefta = \notes {
- \partial 4 r4 | a8-5( <)c' e'-.> <c' e'-.> <c' e'-.> | a8( <)c' e'-.> <c' e'-.> <c' e'-.> | a8-. <c' e'-.> a8-. <c' e'-.> | a8( <)c' e'-.> <c' e'-.> <c' e'-.> |
- e-. <h e'-.> <h e'-.> <h e'-.> | e-. <h e'-.> <h e'-.> <h e'-.> | e-. <h e'-.> h, h | e4--
-}
-leftaa = \notes { \partial 4
- r4 | a8-5( <)c' e'-.> <c' e'-.> <c' e'-.> | a8( <)c' e'-.> <c' e'-.> <c' e'-.> | a8-. <c' e'-.> a8-. <c' e'-.> | f8( <)a dis'-.> <a dis'-.> <a dis'-.> |
- e-. <a-. e'> d!-. <f-. h> c-. <e-. a> d-. <f-. h> <e-. a> <e-. a> <e-. gis> <e-. gis> <a,4 a-->
-}
-leftb = \notes { \partial 4
- \repeat unfold 2 {r4 | c8-. c'-. e-. e'-. | g4 }
- \repeat unfold 2 {r4 | a,8-. a-. c-. c'-. | e4 }
-}
-
-stra = \notes { \grace {[a,32( cis )e]} a8-. a-. }
-strd = \notes { \grace {[d,32( fis, )a,]} d8-. d-. }
-strdis = \notes { \grace {[dis,32( fis, )a,]} dis8-. dis-. }
-stre = \notes { \grace {[e,32( gis, )h,]} e8-. e-. }
-stral = \notes { \stra a8-. a-. }
-strdl = \notes { \strd d8-. d-. }
-strel = \notes { \stre e8-. e-. }
-
-leftc = \notes { \partial 4
- r4 \stral \stral \strd \strdis \strel \stral \stral \strd \stre
-}
-
-leftd = \notes \relative c { \partial 4
- r4 | fis8-5( <)a cis-.> <a cis-.> <a cis-.> |
- gis8-4( <)h cis-.> <h cis-.> <h cis-.> |
- fis8( <)a cis-.> <a cis-.> <a cis-.> |
- eis8( <)gis cis-.> <gis cis-.> <gis cis-.> |
- fis8( <)a cis-.> <a cis-.> <a cis-.> |
- gis8( <)cis e-.> <cis e-.> <cis e-.> |
- gis8( <)dis' fis-.> <dis fis-.> <dis fis-.> |
- <cis4 e-->
-}
-
-lefte = \notes \relative c' { \partial 4
- r4 | a8( <)cis e-.> <cis e-.> <cis e-.> |
- h-. <d e-.> gis,-. <d' e-.> |
- a8( <)cis e-.> <cis e-.> <cis e-.> |
- e,8( <)gis d'-.> <gis d'-.> <gis d'-.> |
- a8( <)cis e-.> <cis e-.> <cis e-.> |
- h-. <d e-.> gis,-. <d' e-.> |
- a-. fis-. d-. e-. a,-. a'-. r4 |
-
- fis8( <)a cis-.> <a cis-.> <a cis-.> |
- gis8( <)h cis-.> <h cis-.> <h cis-.> |
- fis8( <)a cis-.> <a cis-.> <a cis-.> |
- cis,( <)gis' cis-.> <g cis-.> <fis cis'-.> |
- h,8( <)fis' h-.> <fis h-.> <fis h-.> |
- h,8( <)gis'! h-.> <gis h-.> <gis h-.> |
- cis,-. <fis a-.> cis-. <gis' h-.> <fis4 a-->
-}
-
-leftf = \notes {
- a8-. a8-. \stral \stral \stral \strdl \stral \strel \stral \stral \stral \strdl \stral \strel
- a16( e' cis' e' a e' cis' )e' \repeat unfold 6 { a16 e' cis' e' } \repeat unfold 2 { a16 fis' d' fis' } \repeat unfold 2 { a16 e' cis' e' } \repeat unfold 2 { e16 e' gis e' }
- \stral \stral \stral \strdl \stral \strel \stral \stral \stral \stra \stra a,4-. <a, cis e a-. ( > < )a, cis e a-. > r4
-}
-
-global = \notes {\time 2/4 }
-
-right = \notes {
- \global \clef G \repeat \volta 2 \righta \repeat \volta 2 {\rightb \rightaa } \key a \major \repeat \volta 2 \rightc
- \repeat \volta 2 \rightd \repeat \volta 2 \righte \repeat \volta 2 \rightc
- \key a \minor \repeat \volta 2 \righta \repeat \volta 2 {\rightb \rightaa } \key a \major \repeat \volta 2 \rightco \alternative { \rightcoa {\partial 4 \rightcoa } }
- \rightf \bar "|."
-}
-
-left = \notes {
- \global \clef F \repeat \volta 2 \lefta \repeat \volta 2 { \leftb \leftaa } \key a \major \repeat \volta 2 { \leftc a,4 }
- \repeat \volta 2 \leftd \repeat \volta 2 \lefte \repeat \volta 2 { \leftc a,4 }
- \key a \minor \repeat \volta 2 \lefta \repeat \volta 2 { \leftb \leftaa } \key a \major \repeat \volta 2 \leftc \alternative { a,4 {\partial 2 \stra} }
- \leftf \bar "|."
-}
-
-
-\score { \notes
- \context GrandStaff <
- \property GrandStaff.connectArpeggios = ##t
- \context Staff = up {
- \right
- }
- \context Staff = down {
- \property Staff.VoltaBracket = \turnOff
- \left
- }
- >
- \paper {
- \translator {
- \GraceContext
- Slur \override #'direction = #-1
- }
- \translator {
- \ScoreContext
- SpacingSpanner \override #'arithmetic-basicspace = #1.8
- GraceAlignment \override #'horizontal-space = #-0.4
- PaperColumn \override #'before-grace-spacing-factor = #1.0
-
- }
- interscoreline = 6.0 \pt
-
- }
-}
--- /dev/null
+
+
+
+\score{<
+ \notes \relative c'' \context Staff=violin{
+ \time 3/4
+s2.
+ \grace a b4
+ }
+ \notes \relative c'' \context Staff=violoncello{
+ \time 3/4
+ \clef tenor
+s2. \clef bass b4
+ }
+>
+\paper{
+ linewidth=-1
+}
+}
+
}
\score {
\notes\relative c''' {
- a4( a a a )a
+
+ \time 3/4 a4( a a a )a
\stemDown
a,8( b c )d
\stemUp
\slurDown d16( c b )a
}
-}
\ No newline at end of file
+}
call_constructors ()
{
for (int i=0; i < ctor_global_static_arr_p_->size (); i++)
- (ctor_global_static_arr_p_->elem (i)) ();
+ (ctor_global_static_arr_p_->elem (i)) ();
}
Array<int> breaks = find_break_indices ();
- optimal_paths.set_size (breaks.size ());
-
Break_node first_node ;
-
- optimal_paths[0] = first_node;
- int break_idx=1;
+ optimal_paths.push (first_node);
Real worst_force = 0.0;
- for (; break_idx< breaks.size (); break_idx++)
+ for ( int break_idx=1; break_idx< breaks.size (); break_idx++)
{
/*
start with a short line, add measures. At some point
sp->solve (&cp);
delete sp;
- if (cp.force_f_ > worst_force)
- worst_force = cp.force_f_;
+ if (fabs (cp.force_f_) > worst_force)
+ worst_force = fabs (cp.force_f_);
/*
We remember this solution as a "should always work
solution", in case everything fucks up. */
if (start_idx == break_idx - 1)
backup_sol = cp;
- if (!cp.satisfies_constraints_b_)
- {
- /*
- If it doesn't satisfy constraints, we make this one
- really unattractive.
- */
- cp.force_f_ += worst_force;
- cp.force_f_ *= 10;
- }
-
+
Real this_demerits;
if (optimal_paths[start_idx].demerits_f_ >= infinity_f)
break ;
}
- int prev =break_idx - 1;
+
+ Break_node bnod;
if (minimal_start_idx < 0)
{
- optimal_paths[break_idx].demerits_f_ = infinity_f;
- optimal_paths[break_idx].line_config_ = backup_sol;
+ bnod.demerits_f_ = infinity_f;
+ bnod.line_config_ = backup_sol;
+ bnod.prev_break_i_ = break_idx - 1;
}
else
{
- prev = minimal_start_idx;
- optimal_paths[break_idx].line_config_ = minimal_sol;
- optimal_paths[break_idx].demerits_f_ = minimal_demerits;
+ bnod.prev_break_i_ = minimal_start_idx;
+ bnod.demerits_f_ = minimal_demerits;
+ bnod.line_config_ = minimal_sol;
}
- optimal_paths[break_idx].prev_break_i_ = prev;
- optimal_paths[break_idx].line_i_ = optimal_paths[prev].line_i_ + 1;
-
+ bnod.line_i_ = optimal_paths[bnod.prev_break_i_].line_i_ + 1;
+ optimal_paths.push (bnod);
+
if (! (break_idx % HAPPY_DOTS_I))
progress_indication (String ("[") + to_str (break_idx) + "]");
}
/* do the last one */
- if (break_idx % HAPPY_DOTS_I)
- progress_indication (String ("[") + to_str (break_idx) + "]");
+ if (breaks.size () % HAPPY_DOTS_I)
+ progress_indication (String ("[") + to_str (breaks.size()) + "]");
progress_indication ("\n");
}
}
- return abs (this_one.force_f_) + abs (prev.force_f_ - this_one.force_f_)
+ Real demerit = abs (this_one.force_f_) + abs (prev.force_f_ - this_one.force_f_)
+ break_penalties;
+
+
+ if (!this_one.satisfies_constraints_b_)
+ {
+ /*
+ If it doesn't satisfy constraints, we make this one
+ really unattractive.
+ */
+ demerit += 10;
+ demerit *= 100;
+ }
+
+ return demerit;
}
#define CACHE_SYMBOLS
#ifdef CACHE_SYMBOLS
+
+/*
+ We don't use gh_symbol2scm directly, since it has const-correctness
+ problems in GUILE 1.3.4
+
+ */
SCM my_gh_symbol2scm (const char* x);
// #warning: CACHE_SYMBOLS
SCM value = cached; /* We store this one locally, since G++ -O2 fucks up else */ \
if ( __builtin_constant_p ((x)))\
{ if (!cached)\
- value = cached = scm_gc_protect_object (my_gh_symbol2scm((char*) (x)));\
+ value = cached = scm_gc_protect_object (my_gh_symbol2scm((x)));\
} else\
value = gh_symbol2scm ((char*) (x)); \
value; })
#else
-inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((char*)x); }
+inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); }
#endif
class Paper_outputter
{
bool verbatim_scheme_b_;
- Paper_stream * stream_p_;
+
+
public:
+
+ SCM output_func_ ;
+ Protected_scm file_;
+
String basename_;
Paper_outputter (String nm);
~Paper_outputter ();
void output_string (SCM s);
void output_scheme (SCM scm);
- static void write_header_field_to_file (String filename, String key, String value);
+ void write_header_field_to_file (String filename, SCM, SCM);
void write_header_fields_to_file (Scope *);
};
+++ /dev/null
-#ifndef PAPER_STREAM_HH
-#define PAPER_STREAM_HH
-
-#include "string.hh"
-
-/** Paper output
- Baseclass for writing to a PostScript or TeX file.
- It counts braces to prevent nesting errors, and
- it will add a comment sign before each newline.
- */
-
-class Paper_stream
-{
-public:
- String basename_;
- bool outputting_comment_b_;
- ostream *os_;
- int nest_level;
- /// to check linelen in output. TeX has limits.
- int line_len_i_;
-
- /// open a file for writing
- Paper_stream (String filename);
-
- /// delegate conversion to scalar class
- Paper_stream &operator << (String);
-
- /// close the file
- ~Paper_stream ();
-
-private:
- Paper_stream (Paper_stream const&);
- void break_line ();
-};
-
-#include <iostream.h> /* gcc 3.0 */
-#if __GNUC__ > 2
-ostream *open_file_stream (String filename,
- std::ios_base::openmode mode=std::ios::out);
-#else
-ostream *open_file_stream (String filename, int mode=ios::out);
-#endif
-void close_file_stream (ostream *os);
-
-
-#endif // PAPER_STREAM_HH
--- /dev/null
+/*
+stream.hh -- declare compatibility glue for gcc 3.
+
+source file of the GNU LilyPond music typesetter
+
+(c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef STREAM_HH
+#define STREAM_HH
+#include "string.hh"
+
+
+#include <iostream.h> /* gcc 3.0 */
+#if __GNUC__ > 2
+ostream *open_file_stream (String filename,
+ std::ios_base::openmode mode=std::ios::out);
+#else
+ostream *open_file_stream (String filename, int mode=ios::out);
+#endif
+void close_file_stream (ostream *os);
+
+
+
+
+#endif /* STREAM_HH */
+
scm_init_funcs_->push (f);
}
+
extern void init_cxx_function_smobs ();
void
init_lily_guile ()
{
+ SCM last_mod = scm_current_module ();
+ scm_set_current_module (scm_c_resolve_module ("guile"));
+
init_cxx_function_smobs ();
for (int i=scm_init_funcs_->size () ; i--;)
- (scm_init_funcs_->elem (i)) ();
+ (scm_init_funcs_->elem (i)) ();
+
+ if (verbose_global_b)
+ progress_indication ("\n");
+ read_lily_scm_file ("lily.scm");
+ scm_set_current_module (last_mod);
}
unsigned int ly_scm_hash (SCM s)
SCM my_gh_symbol2scm (const char* x)
{
- return gh_symbol2scm (x);
+ return gh_symbol2scm ((char*)x);
}
{
SCM lastcol = ly_car (line_l->get_grob_property ("columns"));
Grob* e = unsmob_grob (lastcol);
- SCM inter = e->get_grob_property ("between-system-string");
+
+ SCM between = ly_symbol2scm ("between-system-string");
+ SCM inter = e->internal_get_grob_property (between);
if (gh_string_p (inter))
{
- pscore_l_->outputter_l_->output_string (inter);
+ pscore_l_->outputter_l_
+ ->output_scheme (scm_list_n (between,
+ inter, SCM_UNDEFINED));
}
}
}
*/
SCM font_names = ly_quote_scm (paper_l ()->font_descriptions ());
output_scheme (scm_list_n (ly_symbol2scm ("define-fonts"),
- font_names,
- SCM_UNDEFINED));
+ font_names,
+ SCM_UNDEFINED));
/*
line preamble.
#include <iostream.h>
#include <assert.h>
#include <locale.h>
+#include <stdio.h>
#include "config.h"
"USA.\n");
}
+String prefix_directory;
+
void
setup_paths ()
{
// facilitate binary distributions
char const *env_lily = getenv ("LILYPONDPREFIX");
- String prefix_directory;
+
if (env_lily)
prefix_directory = env_lily;
i++;
#endif
}
+
+ char const * glp = getenv ("GUILE_LOAD_PATH");
+
+ String new_glp (glp? glp : "") ;
+ if (glp)
+ new_glp = ":" + new_glp;
+ new_glp = prefix_directory + new_glp;
+
+ /*
+ Yes , so setenv is not posix.
+
+ I say, fuckem'all.
+ */
+
+ setenv ("GUILE_LOAD_PATH", new_glp.ch_C(), 1);
}
/**
}
void
-main_prog (void * closure, int, char**)
+main_prog (void * , int, char**)
{
/*
need to do this first. Engravers use lily.scm contents.
*/
init_lily_guile ();
- if (verbose_global_b)
- progress_indication ("\n");
- read_lily_scm_file ("lily.scm");
cout << endl;
call_constructors ();
int
Midi_def::get_tempo_i (Moment one_beat_mom)
{
- Moment w = *unsmob_moment (scope_p_->scm_elem ("whole-in-seconds"));
- Moment wholes_per_min = Moment (60) /w;
+ SCM wis = ly_symbol2scm ("whole-in-seconds");
+ Moment *w = unsmob_moment (scope_p_->scm_elem (wis));
+
+ Moment wholes_per_min = Moment (60);
+ if (!w)
+ {
+ programming_error ("wholes-in-seconds not set.");
+ wholes_per_min /= 4;
+ }
+ else
+ {
+ wholes_per_min /= *w;
+ }
+
int beats_per_min = int ((wholes_per_min / one_beat_mom).main_part_);
return int (beats_per_min);
}
(c) 1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <fstream.h>
-#include "paper-stream.hh"
+
+#include "stream.hh"
#include "string.hh"
#include "string-convert.hh"
#include "main.hh"
*/
#include <time.h>
-#include <fstream.h>
+
#include <math.h>
-#include <iostream.h>
+
#include "dimensions.hh"
#include "virtual-methods.hh"
#include "paper-outputter.hh"
-#include "paper-stream.hh"
#include "molecule.hh"
#include "array.hh"
#include "string-convert.hh"
/*
Ugh, this is messy.
*/
-
Paper_outputter::Paper_outputter (String name)
{
- stream_p_ = new Paper_stream (name);
-
- /*
- lilypond -f scm x.ly
- guile -s x.scm
- */
- verbatim_scheme_b_ = output_format_global == "scm";
-
- if (verbatim_scheme_b_)
+ if (safe_global_b)
{
- *stream_p_ << ""
- ";;; Usage: guile -s x.scm > x.tex\n"
- " (primitive-load-path 'standalone.scm)\n"
- "; (scm-tex-output)\n"
- " (scm-ps-output)\n"
- " (map (lambda (x) (display (ly-eval x))) ' (\n"
- ;
+ gh_define ("security-paranoia", SCM_BOOL_T);
}
+
+ file_ = scm_open_file (ly_str02scm (name.ch_C()),
+ ly_str02scm ("w"));
+
+ SCM exp = scm_list_n (ly_symbol2scm ("find-dumper"),
+ ly_str02scm (output_format_global.ch_C()),
+ SCM_UNDEFINED);
+ output_func_ = scm_primitive_eval (exp);
}
Paper_outputter::~Paper_outputter ()
{
- if (verbatim_scheme_b_)
- {
- *stream_p_ << "))";
- }
- delete stream_p_;
+
}
void
Paper_outputter::output_header ()
{
- if (safe_global_b)
- {
- gh_define ("security-paranoia", SCM_BOOL_T);
- }
-
- SCM exp = scm_list_n (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
- ly_quote_scm (ly_symbol2scm ("all-definitions")),
- SCM_UNDEFINED);
- exp = scm_primitive_eval (exp);
- scm_primitive_eval (exp);
-
- String creator = gnu_lilypond_version_str ();
-
String generate = _ (", at ");
time_t t (time (0));
generate += ctime (&t);
Make fixed length time stamps
*/
generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0) ;
+ String creator = "lelie";
- SCM args_scm =
- scm_list_n (ly_str02scm (creator.ch_l ()),
- ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
+ SCM args_scm = scm_list_n (ly_str02scm (creator.ch_C ()),
+ ly_str02scm (generate.ch_C ()), SCM_UNDEFINED);
SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm);
+
output_scheme (scm);
}
);
}
-
void
Paper_outputter::output_scheme (SCM scm)
{
- /*
- we don't rename dump_scheme, because we might in the future want
- to remember Scheme. We don't now, because it sucks up a lot of memory.
- */
- dump_scheme (scm);
-}
-
-void flatten_write (SCM x, Paper_stream*ps)
-{
- if (ly_pair_p (x))
- {
- flatten_write (ly_car (x),ps);
- flatten_write (ly_cdr (x),ps);
- }
- else if (gh_string_p (x))
- {
- *ps << String ( SCM_STRING_CHARS(x)) ;
- }
-}
-
-
-/*
- UGH.
-
- Should probably change interface to do less eval (symbol), and more
- apply (procedure, args)
- */
-void
-Paper_outputter::dump_scheme (SCM s)
-{
- if (verbatim_scheme_b_)
- {
- *stream_p_ << ly_scm2string (ly_write2scm (s));
- }
- else
- {
- SCM result = scm_primitive_eval (s);
- flatten_write (result, stream_p_);
- }
+ scm_apply_2 (output_func_, scm, file_, SCM_EOL);
}
void
SCM k = ly_caar (s);
SCM v = ly_cdar (s);
String s = ly_symbol2string (k);
-
if (gh_string_p (v))
{
}
void
-Paper_outputter::output_string (SCM str)
-{
- *stream_p_ << ly_scm2string (str);
-}
-
-void
-Paper_outputter::write_header_field_to_file (String filename, String key, String value)
+Paper_outputter::write_header_field_to_file (String filename, SCM key, SCM value)
{
- if (filename != "-")
- filename += String (".") + key;
- progress_indication (_f ("writing header field `%s' to `%s'...",
- key,
- filename == "-" ? String ("<stdout>") : filename));
-
- ostream *os = open_file_stream (filename);
- *os << value;
- close_file_stream (os);
- progress_indication ("\n");
+ output_scheme (scm_list_n (ly_symbol2scm ("header-to-file"),
+ ly_str02scm (filename.ch_C()),
+ ly_quote_scm (key), value,
+ SCM_UNDEFINED));
}
void
{
s = ly_scm2string (ly_cdr (val));
/* Always write header field file, even if string is empty ... */
- write_header_field_to_file (basename_, key, s);
+ write_header_field_to_file (basename_ , ly_car (val), ly_cdr (val));
}
}
}
#include "paper-column.hh"
#include "scope.hh"
#include "gourlay-breaking.hh"
-#include "paper-stream.hh"
#include "paper-outputter.hh"
#include "file-results.hh"
#include "misc.hh"
+++ /dev/null
-/*
- paper-stream.cc -- implement Paper_stream
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include <errno.h>
-#include <sys/types.h>
-#include <fstream.h>
-
-#include "config.h"
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#include "main.hh"
-#include "paper-stream.hh"
-#include "file-path.hh"
-#include "debug.hh"
-
-const int MAXLINELEN = 200;
-
-#if __GNUC__ > 2
-ostream *
-open_file_stream (String filename, std::ios_base::openmode mode)
-#else
-ostream *
-open_file_stream (String filename, int mode)
-#endif
-{
- ostream *os;
- if ((filename == "-"))
- os = &cout;
- else
- {
- Path p = split_path (filename);
- if (!p.dir.empty_b ())
- if (mkdir (p.dir.ch_C (), 0777) == -1 && errno != EEXIST)
- error (_f ("can't create directory: `%s'", p.dir));
- os = new ofstream (filename.ch_C (), mode);
- }
- if (!*os)
- error (_f ("can't open file: `%s'", filename));
- return os;
-}
-
-void
-close_file_stream (ostream *os)
-{
- *os << flush;
- if (!*os)
- {
- warning (_ ("Error syncing file (disk full?)"));
- exit_status_global = 1;
- }
- if (os != &cout)
- delete os;
- os = 0;
-}
-
-Paper_stream::Paper_stream (String filename)
-{
- os_ = open_file_stream (filename);
- nest_level = 0;
- line_len_i_ = 0;
- outputting_comment_b_=false;
-}
-
-Paper_stream::~Paper_stream ()
-{
- close_file_stream (os_);
- if (nest_level != 0)
- programming_error ("Brace nesting in paper output doesn't match");
-}
-
-// print string. don't forget indent.
-Paper_stream&
-Paper_stream::operator << (String s)
-{
- for (char const *cp = s.ch_C (); *cp; cp++)
- {
- if (outputting_comment_b_)
- {
- *os_ << *cp;
- if (*cp == '\n')
- {
- outputting_comment_b_=false;
- line_len_i_ =0;
- }
- continue;
- }
- line_len_i_ ++;
- switch (*cp)
- {
- case '%':
- outputting_comment_b_ = true;
- *os_ << *cp;
- break;
- case '{':
- nest_level++;
- *os_ << *cp;
- break;
- case '}':
- nest_level--;
- *os_ << *cp;
-
- if (nest_level < 0)
- {
- delete os_; // we want to see the remains.
- assert (nest_level>=0);
- }
-
- /* don't break line if not nested; very ugly for ps */
- if (nest_level == 0)
- break;
-
- *os_ << '%';
- break_line ();
- break;
- case '\n':
- break_line ();
- break;
- case ' ':
- *os_ << ' ';
- if (line_len_i_ > MAXLINELEN)
- break_line ();
-
- break;
- default:
- *os_ << *cp;
- break;
- }
- }
- //urg, for debugging only!!
- *os_ << flush;
- return *this;
-}
-
-void
-Paper_stream::break_line ()
-{
- *os_ << '\n';
- *os_ << to_str (' ', nest_level);
- outputting_comment_b_ = false;
- line_len_i_ = 0;
-}
-
s = ":|";
/*
- TODO: line breaks might be allowed if we set whichBar to "".
+ TODO: line breaks might be allowed if we set whichBar to "".
*/
- if (s != "" || (volta_found && !gh_string_p (get_property ("whichBar"))))
+
+ /*
+ We only set the barline if we wouldn't overwrite a previously set
+ barline.
+ */
+ SCM wb = get_property ("whichBar");
+ SCM db = get_property ("defaultBarType");
+ if (!gh_string_p (wb) || gh_equal_p (db, wb))
{
- daddy_trans_l_->set_property ("whichBar", ly_str02scm (s.ch_C ()));
+ if (s != "" || (volta_found && !gh_string_p (wb)))
+ {
+ daddy_trans_l_->set_property ("whichBar", ly_str02scm (s.ch_C ()));
+ }
}
}
-
ENTER_DESCRIPTION(Repeat_acknowledge_engraver,
/* descr */ "Acknowledge repeated music, and convert the contents of
repeatCommands ainto an appropriate setting for whichBar",
--- /dev/null
+#include "config.h"
+
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <iostream.h>
+#include <fstream.h>
+
+#include "stream.hh"
+#include "file-path.hh"
+#include "warn.hh"
+#include "main.hh"
+
+#if __GNUC__ > 2
+ostream *
+open_file_stream (String filename, std::ios_base::openmode mode)
+#else
+ostream *
+open_file_stream (String filename, int mode)
+#endif
+{
+ ostream *os;
+ if ((filename == "-"))
+ os = &cout;
+ else
+ {
+ Path p = split_path (filename);
+ if (!p.dir.empty_b ())
+ if (mkdir (p.dir.ch_C (), 0777) == -1 && errno != EEXIST)
+ error (_f ("can't create directory: `%s'", p.dir));
+ os = new ofstream (filename.ch_C (), mode);
+ }
+ if (!*os)
+ error (_f ("can't open file: `%s'", filename));
+ return os;
+}
+
+void
+close_file_stream (ostream *os)
+{
+ *os << flush;
+ if (!*os)
+ {
+ warning (_ ("Error syncing file (disk full?)"));
+ exit_status_global = 1;
+ }
+ if (os != &cout)
+ delete os;
+ os = 0;
+}
Unfolded_repeat_iterator::add_repeat_command (SCM what)
{
SCM reps = ly_symbol2scm ("repeatCommands");
- SCM current_reps = report_to_l ()->get_property (reps);
+ SCM current_reps = report_to_l ()->internal_get_property (reps);
Translator_group * where = report_to_l ()->where_defined (reps);
if (where
export DVIPSMAKEPK := mktexpk --destdir $(topdir)/mf/out
endif
-export LILYPONDPREFIX:=$(depth)/
+# don't change to "depth". It makes the GUILE barf.
+#
+# LilyPond is often run from within $(outdir), making a relative
+# PREFIX incorrect.
+export LILYPONDPREFIX:=$(shell cd $(depth)/ ; pwd)
+
export PYTHONPATH:=$(topdir)/python:$(PYTHONPATH)
# guile load path?
%_install_info lilypond.info
%_install_info lilypond-internals.info
+echo 'Please logout first before using LilyPond.'
+
+
%preun
%_remove_install_info lilypond.info
%_remove_install_info lilypond-internals.info
/sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
%endif
+
+echo 'Please logout first before using LilyPond.'
+
%preun
%if info=="yes"
Begin3
Title: LilyPond
-Version: 1.5.20
-Entered-date: 29OKT01
+Version: 1.5.21
+Entered-date: 04NOV01
Description: @BLURB@
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.5.20.tar.gz
+ 1000k lilypond-1.5.21.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.5.20.tar.gz
+ 1000k lilypond-1.5.21.tar.gz
Copying-policy: GPL
End
%define name lilypond
-%define version 1.5.20
+%define version 1.5.21
%define release 1mdk
Name: %{name}
%_install_info lilypond.info
%_install_info lilypond-internals.info
+echo 'Please logout first before using LilyPond.'
+
+
%preun
%_remove_install_info lilypond.info
%_remove_install_info lilypond-internals.info
%define info yes
Name: lilypond
-Version: 1.5.20
+Version: 1.5.21
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.20.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.21.tar.gz
Summary: Create and print music notation
URL: http://www.lilypond.org/
BuildRoot: /tmp/lilypond-install
/sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir
%endif
+
+echo 'Please logout first before using LilyPond.'
+
%preun
%if info=="yes"
Distribution: SuSE Linux 7.0 (i386)
Name: lilypond
-Version: 1.5.20
+Version: 1.5.21
Release: 2
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.20.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.21.tar.gz
# music notation software for.. ?
Summary: A program for printing sheet music.
URL: http://www.lilypond.org/
STEPMAKE_TEMPLATES=metafont metapost install install-out
LOCALSTEPMAKE_TEMPLATES=asciifont
+
+
include $(depth)/make/stepmake.make
AF_FILES = $(wildcard *.af)
TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex))
AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES)))
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
-PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+PFB_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfb))
+
+pfb: $(PFB_FILES)
# Make tfm files first, log files last,
# so that normally log files aren't made twice
export MFINPUTS:=.:$(MFINPUTS)
-default: $(ALL_GEN_FILES)
+default: $(PFA_FILES) $(ALL_GEN_FILES)
##
## todo: this also depends on .tfm, FIXME.
-(debug-enable 'backtrace)
+(define-module (scm ascii-script)
+ :export (as-output-expression)
+ :no-backtrace
+ )
+
+(define this-module (current-module))
+
+(define (as-output-expression expr port)
+ (display (eval expr this-module) port)
+ )
-; (define cmr-alist
-; '(("bold" . "as-dummy")
-; ("brace" . "as-braces")
-; ("dynamic" . "as-dummy")
-; ("default" . "as-dummy")
-; ("feta" . "feta")
-; ("feta-1" . "feta")
-; ("feta-2" . "feta")
-; ("finger" . "as-number")
-; ("typewriter" . "as-dummy")
-; ("italic" . "as-dummy")
-; ("roman" . "as-dummy")
-; ("script" . "as-dummy")
-; ("large" . "as-dummy")
-; ("Large" . "as-dummy")
-; ("mark" . "as-number")
-; ("number" . "as-number")
-; ("timesig" . "as-number")
-; ("volta" . "as-number"))
-; )
+(debug-enable 'backtrace)
+(define (tex-encoded-fontswitch name-mag)
+ (let* ((iname-mag (car name-mag))
+ (ename-mag (cdr name-mag)))
+ (cons iname-mag
+ (cons ename-mag
+ (string-append "magfont"
+ (string-encode-integer
+ (hashq (car ename-mag) 1000000))
+ "m"
+ (string-encode-integer
+ (inexact->exact (* 1000 (cdr ename-mag)))))))))
+
+(define (fontify name-mag-pair exp)
+ (string-append (select-font name-mag-pair)
+ exp))
+
+
+(define (define-fonts internal-external-name-mag-pairs)
+ (set! font-name-alist (map tex-encoded-fontswitch
+ internal-external-name-mag-pairs))
+ (apply string-append
+ (map (lambda (x)
+ (font-load-command (car x) (cdr x)))
+ (map cdr font-name-alist))))
(define as-font-alist-alist
'(
(cmr8 . as-dummy)
(cmr10 . as-dummy)
(cmr12 . as-dummy)
- ))
- ))
+ ))
+ ))
(define (as-properties-to-font-name size fonts properties-alist-list)
(let* ((feta-name (properties-to-font-name fonts properties-alist-list))
(lambda (x y) (as-properties-to-font-name size x y)))
sheet))
-;;;; AsciiScript as -- ascii art output
-(define (as-scm action-name)
-
- (define (beam width slope thick)
- (string-append
- (func "set-line-char" "#")
- (func "rline-to" width (* width slope))
- ))
-
- ; simple flat slurs
- (define (bezier-sandwich l thick)
- (let (
- (c0 (cadddr l))
- (c1 (cadr l))
- (c3 (caddr l)))
- (let* ((x (car c0))
- (dx (- (car c3) x))
- (dy (- (cdr c3) (cdr c0)))
- (rc (/ dy dx))
- (c1-dx (- (car c1) x))
- (c1-line-y (+ (cdr c0) (* c1-dx rc)))
- (dir (if (< c1-line-y (cdr c1)) 1 -1))
- (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
- (string-append
- (func "rmove-to" x y)
- (func "put" (if (< 0 dir) "/" "\\\\"))
- (func "rmove-to" 1 (if (< 0 dir) 1 0))
- (func "set-line-char" "_")
- (func "h-line" (- dx 1))
- (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
- (func "put" (if (< 0 dir) "\\\\" "/"))))))
-
-
- (define (bracket arch_angle arch_width arch_height height arch_thick thick)
- ;; width now fixed?
- (let ((width 1))
- (string-append
- (func "rmove-to" (+ width 1) (- (/ height -2) 1))
- (func "put" "\\\\")
- (func "set-line-char" "|")
- (func "rmove-to" 0 1)
- (func "v-line" (+ height 1))
- (func "rmove-to" 0 (+ height 1))
- (func "put" "/")
- )))
-
- (define (char i)
- (func "char" i))
-
- (define (define-origin a b c ) "")
-
- (define (end-output)
- (func "end-output"))
-
- (define (experimental-on)
- "")
-
- (define (filledbox breapth width depth height)
- (let ((dx (+ width breapth))
- (dy (+ depth height)))
- (string-append
- (func "rmove-to" (* -1 breapth) (* -1 depth))
- (if (< dx dy)
- (string-append
- (func "set-line-char"
- (if (<= dx 1) "|" "#"))
- (func "v-line" dy))
- (string-append
- (func "set-line-char"
- (if (<= dy 1) "-" "="))
- (func "h-line" dx))))))
-
- (define (font-load-command name-mag command)
- ;; (display "name-mag: ")
- ;; (write name-mag)
- ;; (display "command: ")
- ;; (write command)
- (func "load-font" (car name-mag) (cdr name-mag)))
-
- (define (header creator generate)
- (func "header" creator generate))
-
- (define (header-end)
- (func "header-end"))
-
- ;; urg: this is good for half of as2text's execution time
- (define (xlily-def key val)
- (string-append "(define " key " " (arg->string val) ")\n"))
-
- (define (lily-def key val)
- (if
- ;; let's not have all bloody definitions
- (or (equal? key "lilypondpaperlinewidth")
- (equal? key "lilypondpaperstaffheight")
- (equal? key "lilypondpaperoutputscale"))
- (string-append "(define " key " " (arg->string val) ")\n")
- ""))
-
- (define (no-origin) "")
-
- (define (placebox x y s)
- (let ((ey (inexact->exact y)))
- (string-append "(move-to " (number->string (inexact->exact x)) " "
- (if (= 0.5 (- (abs y) (abs ey)))
- (number->string y)
- (number->string ey))
- ")\n" s)))
-
- (define (select-font name-mag-pair)
- (let* ((c (assoc name-mag-pair font-name-alist)))
- (if (eq? c #f)
- (begin
- (ly-warn
- (string-append
- "Programming error: No such font known "
- (car name-mag-pair))))
- "") ; issue no command
- (func "select-font" (car name-mag-pair))))
-
- (define (start-line height)
- (func "start-line" height))
-
- (define (stop-line)
- (func "stop-line"))
-
- (define (text s)
- (func "text" s))
-
- (define (tuplet ht gap dx dy thick dir) "")
-
- (define (volta h w thick vert-start vert-end)
- ;; urg
- (string-append
- (func "set-line-char" "|")
- (func "rmove-to" 0 -4)
- ;; definition strange-way around
- (if (= 0 vert-start)
- (func "v-line" h)
- "")
- (func "rmove-to" 1 h)
- (func "set-line-char" "_")
- (func "h-line" (- w 1))
- (func "set-line-char" "|")
- (if (= 0 vert-end)
- (string-append
- (func "rmove-to" (- w 1) (* -1 h))
- (func "v-line" (* -1 h)))
- "")))
-
-(cond ((eq? action-name 'all-definitions)
- `(begin
- (define beam ,beam)
- (define bracket ,bracket)
- (define char ,char)
- (define define-origin ,define-origin)
- ;;(define crescendo ,crescendo)
- (define bezier-sandwich ,bezier-sandwich)
- ;;(define dashed-slur ,dashed-slur)
- ;;(define decrescendo ,decrescendo)
- (define end-output ,end-output)
- (define experimental-on ,experimental-on)
- (define filledbox ,filledbox)
- ;;(define font-def ,font-def)
- (define font-load-command ,font-load-command)
- ;;(define font-switch ,font-switch)
- (define header ,header)
- (define header-end ,header-end)
- (define lily-def ,lily-def)
- ;;(define invoke-char ,invoke-char)
- ;;(define invoke-dim1 ,invoke-dim1)
- (define no-origin ,no-origin)
- (define placebox ,placebox)
- (define select-font ,select-font)
- (define start-line ,start-line)
- ;;(define stem ,stem)
- (define stop-line ,stop-line)
- (define stop-last-line ,stop-line)
- (define text ,text)
- (define tuplet ,tuplet)
- (define volta ,volta)
- ))
- ((eq? action-name 'tuplet) tuplet)
- ;;((eq? action-name 'beam) beam)
- ;;((eq? action-name 'bezier-sandwich) bezier-sandwich)
- ;;((eq? action-name 'bracket) bracket)
- ((eq? action-name 'char) char)
- ;;((eq? action-name 'crescendo) crescendo)
- ;;((eq? action-name 'dashed-slur) dashed-slur)
- ;;((eq? action-name 'decrescendo) decrescendo)
- ;;((eq? action-name 'experimental-on) experimental-on)
- ((eq? action-name 'filledbox) filledbox)
- ((eq? action-name 'select-font) select-font)
- ;;((eq? action-name 'volta) volta)
- (else (error "unknown tag -- MUSA-SCM " action-name))
- )
- )
-(define (scm-as-output)
- (primitive-eval (as-scm 'all-definitions)))
+(define (beam width slope thick)
+ (string-append
+ (func "set-line-char" "#")
+ (func "rline-to" width (* width slope))
+ ))
+
+ ; simple flat slurs
+(define (bezier-sandwich l thick)
+ (let (
+ (c0 (cadddr l))
+ (c1 (cadr l))
+ (c3 (caddr l)))
+ (let* ((x (car c0))
+ (dx (- (car c3) x))
+ (dy (- (cdr c3) (cdr c0)))
+ (rc (/ dy dx))
+ (c1-dx (- (car c1) x))
+ (c1-line-y (+ (cdr c0) (* c1-dx rc)))
+ (dir (if (< c1-line-y (cdr c1)) 1 -1))
+ (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
+ (string-append
+ (func "rmove-to" x y)
+ (func "put" (if (< 0 dir) "/" "\\\\"))
+ (func "rmove-to" 1 (if (< 0 dir) 1 0))
+ (func "set-line-char" "_")
+ (func "h-line" (- dx 1))
+ (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
+ (func "put" (if (< 0 dir) "\\\\" "/"))))))
+
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+ ;; width now fixed?
+ (let ((width 1))
+ (string-append
+ (func "rmove-to" (+ width 1) (- (/ height -2) 1))
+ (func "put" "\\\\")
+ (func "set-line-char" "|")
+ (func "rmove-to" 0 1)
+ (func "v-line" (+ height 1))
+ (func "rmove-to" 0 (+ height 1))
+ (func "put" "/")
+ )))
+
+(define (char i)
+ (func "char" i))
+
+(define (define-origin a b c ) "")
+
+(define (end-output)
+ (func "end-output"))
+
+(define (experimental-on)
+ "")
+
+(define (filledbox breapth width depth height)
+ (let ((dx (+ width breapth))
+ (dy (+ depth height)))
+ (string-append
+ (func "rmove-to" (* -1 breapth) (* -1 depth))
+ (if (< dx dy)
+ (string-append
+ (func "set-line-char"
+ (if (<= dx 1) "|" "#"))
+ (func "v-line" dy))
+ (string-append
+ (func "set-line-char"
+ (if (<= dy 1) "-" "="))
+ (func "h-line" dx))))))
+
+(define (font-load-command name-mag command)
+ ;; (display "name-mag: ")
+ ;; (write name-mag)
+ ;; (display "command: ")
+ ;; (write command)
+ (func "load-font" (car name-mag) (cdr name-mag)))
+
+(define (header creator generate)
+ (func "header" creator generate))
+
+(define (header-end)
+ (func "header-end"))
+
+;; urg: this is good for half of as2text's execution time
+(define (xlily-def key val)
+ (string-append "(define " key " " (arg->string val) ")\n"))
+
+(define (lily-def key val)
+ (if
+ ;; let's not have all bloody definitions
+ (or (equal? key "lilypondpaperlinewidth")
+ (equal? key "lilypondpaperstaffheight")
+ (equal? key "lilypondpaperoutputscale"))
+ (string-append "(define " key " " (arg->string val) ")\n")
+ ""))
+
+(define (no-origin) "")
+
+(define (placebox x y s)
+ (let ((ey (inexact->exact y)))
+ (string-append "(move-to " (number->string (inexact->exact x)) " "
+ (if (= 0.5 (- (abs y) (abs ey)))
+ (number->string y)
+ (number->string ey))
+ ")\n" s)))
+
+(define (select-font name-mag-pair)
+ (let* ((c (assoc name-mag-pair font-name-alist)))
+ (if (eq? c #f)
+ (begin
+ (ly-warn
+ (string-append
+ "Programming error: No such font known "
+ (car name-mag-pair))))
+ "") ; issue no command
+ (func "select-font" (car name-mag-pair))))
+
+(define (start-line height)
+ (func "start-line" height))
+
+(define (stop-line)
+ (func "stop-line"))
+
+(define (stop-last-line)
+ (func "stop-line"))
+
+
+(define (text s)
+ (func "text" s))
+
+(define (tuplet ht gap dx dy thick dir) "")
+
+(define (volta h w thick vert-start vert-end)
+ ;; urg
+ (string-append
+ (func "set-line-char" "|")
+ (func "rmove-to" 0 -4)
+ ;; definition strange-way around
+ (if (= 0 vert-start)
+ (func "v-line" h)
+ "")
+ (func "rmove-to" 1 h)
+ (func "set-line-char" "_")
+ (func "h-line" (- w 1))
+ (func "set-line-char" "|")
+ (if (= 0 vert-end)
+ (string-append
+ (func "rmove-to" (- w 1) (* -1 h))
+ (func "v-line" (* -1 h)))
+ "")))
;;; General settings
+
+
+
(debug-enable 'backtrace)
(symbol->string (car y))))
-(map (lambda (x) (eval-string (ly-gulp-file x)))
- '("output-lib.scm"
- "tex.scm"
- "ps.scm"
- "sketch.scm"
- "pdf.scm"
- "pdftex.scm"
- "ascii-script.scm"
- ))
+(define (ly-load x) (eval-string (ly-gulp-file x)))
-(define ctor list)
+(ly-load "output-lib.scm")
-(define (ly-load x) (eval-string (ly-gulp-file x)))
+
+(use-modules (scm tex)
+ (scm ps)
+ (scm pysk)
+ (scm ascii-script)
+ )
+
+(define output-alist
+ `(
+ ("tex" . ,tex-output-expression)
+ ("ps" . ,ps-output-expression)
+ ("scm" . ,write)
+ ("as" . ,as-output-expression)
+ ("pysk" . ,pysk-output-expression)
+))
+
+
+
+
+(define (find-dumper format )
+ (let*
+ ((d (assoc format output-alist)))
+
+ (if (pair? d)
+ (cdr d)
+ scm-output-expression)
+ ))
+
(if (not standalone)
(map ly-load
; load-from-path
- '("c++.scm"
+ '("output-lib.scm"
+ "sketch.scm"
+ "pdf.scm"
+ "pdftex.scm"
+ "ascii-script.scm"
+ "c++.scm"
"grob-property-description.scm"
"translator-property-description.scm"
"context-description.scm"
(string-encode-integer (quotient i 26))))))
-(define (tex-encoded-fontswitch name-mag)
- (let* ((iname-mag (car name-mag))
- (ename-mag (cdr name-mag)))
- (cons iname-mag
- (cons ename-mag
- (string-append "magfont"
- (string-encode-integer
- (hashq (car ename-mag) 1000000))
- "m"
- (string-encode-integer
- (inexact->exact (* 1000 (cdr ename-mag)))))))))
-
-(define (define-fonts internal-external-name-mag-pairs)
- (set! font-name-alist (map tex-encoded-fontswitch
- internal-external-name-mag-pairs))
- (apply string-append
- (map (lambda (x)
- (font-load-command (car x) (cdr x)))
- (map cdr font-name-alist))))
-
-;; urg, how can exp be #unspecified? -- in sketch output
-(define (xfontify name-mag-pair exp)
- (string-append (select-font name-mag-pair)
- exp))
-
-(define (fontify name-mag-pair exp)
- (string-append (select-font name-mag-pair)
- (if (string? exp) exp "")))
+
+
+
-(define (ps-scm action-name)
+(define-module (scm ps)
+ :export (ps-output-expression)
+ :no-backtrace
+ )
- ;; alist containing fontname -> fontcommand assoc (both strings)
- (define font-alist '())
- (define font-count 0)
- (define current-font "")
+(define this-module (current-module))
-
- (define (cached-fontname i)
- (string-append
- "lilyfont"
- (make-string 1 (integer->char (+ 65 i)))))
-
-
- (define (select-font name-mag-pair)
- (let*
- (
- (c (assoc name-mag-pair font-name-alist))
- )
-
- (if (eq? c #f)
- (begin
- (display "FAILED\n")
- (display (object-type (car name-mag-pair)))
- (display (object-type (caaar font-name-alist)))
-
- (ly-warn (string-append
- "Programming error: No such font known "
- (car name-mag-pair) " "
- (ly-number->string (cdr name-mag-pair))
- ))
-
- "") ; issue no command
- (string-append " " (cddr c) " "))
- ))
-
- (define (font-load-command name-mag command)
- (string-append
- "/" command
- " { /"
- (car name-mag)
- " findfont "
- "12 " (ly-number->string (cdr name-mag)) " mul "
- "lilypondpaperoutputscale div scalefont setfont } bind def "
- "\n"))
-
- (define (beam width slope thick)
- (string-append
- (numbers->string (list slope width thick)) " draw_beam" ))
-
- (define (comment s)
- (string-append "% " s))
-
- (define (bracket arch_angle arch_width arch_height height arch_thick thick)
- (string-append
- (numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" ))
-
- (define (char i)
- (invoke-char " show" i))
-
-
- (define (hairpin thick width starth endh )
- (string-append
- (numbers->string (list width starth endh thick))
- " draw_hairpin"))
-
- ;; what the heck is this interface ?
- (define (dashed-slur thick dash l)
- (string-append
- (apply string-append (map control->string l))
- (ly-number->string thick)
- " [ "
- (ly-number->string dash)
- " "
- (ly-number->string (* 10 thick)) ;UGH. 10 ?
- " ] 0 draw_dashed_slur"))
-
- (define (dashed-line thick on off dx dy)
- (string-append
- (ly-number->string dx)
- " "
- (ly-number->string dy)
- " "
- (ly-number->string thick)
- " [ "
- (ly-number->string on)
- " "
- (ly-number->string off)
- " ] 0 draw_dashed_line"))
-
- (define (repeat-slash wid slope thick)
- (string-append (numbers->string (list wid slope thick))
- " draw_repeat_slash"))
-
- (define (end-output)
- "\nend-lilypond-output\n")
-
- (define (experimental-on) "")
-
- (define (filledbox breapth width depth height)
- (string-append (numbers->string (list breapth width depth height))
- " draw_box" ))
-
- ;; obsolete?
- (define (font-def i s)
- (string-append
- "\n/" (font i) " {/"
- (substring s 0 (- (string-length s) 4))
- " findfont 12 scalefont setfont} bind def \n"))
-
- (define (font-switch i)
- (string-append (font i) " "))
-
- (define (header-end)
- (string-append
- ;; URG: now we can't use scm output without Lily
- (ly-gulp-file "lilyponddefs.ps")
- " {exch pop //systemdict /run get exec} "
- (ly-gulp-file "music-drawing-routines.ps")
- "{ exch pop //systemdict /run get exec } "
- (if (defined? 'ps-testing) "\n /testing true def" "")
+(define (ps-output-expression expr port)
+ (display (eval expr this-module) port)
+ )
+
+
+(use-modules
+ (guile)
+ (guile-user))
+
+
+
+;;;;;;;;
+;;;;;;;; DOCUMENT ME!
+;;;;;;;;
+(define (tex-encoded-fontswitch name-mag)
+ (let* ((iname-mag (car name-mag))
+ (ename-mag (cdr name-mag)))
+ (cons iname-mag
+ (cons ename-mag
+ (string-append "magfont"
+ (string-encode-integer
+ (hashq (car ename-mag) 1000000))
+ "m"
+ (string-encode-integer
+ (inexact->exact (* 1000 (cdr ename-mag)))))))))
+
+(define (fontify name-mag-pair exp)
+ (string-append (select-font name-mag-pair)
+ exp))
+
+
+(define (define-fonts internal-external-name-mag-pairs)
+ (set! font-name-alist (map tex-encoded-fontswitch
+ internal-external-name-mag-pairs))
+ (apply string-append
+ (map (lambda (x)
+ (font-load-command (car x) (cdr x)))
+ (map cdr font-name-alist))))
+
+
+
+;; alist containing fontname -> fontcommand assoc (both strings)
+(define font-alist '())
+(define font-count 0)
+(define current-font "")
+
+(define (select-font name-mag-pair)
+ (let*
+ (
+ (c (assoc name-mag-pair font-name-alist))
+ )
+
+ (if (eq? c #f)
+ (begin
+ (display "FAILED\n")
+ (display (object-type (car name-mag-pair)))
+ (display (object-type (caaar font-name-alist)))
+
+ (ly-warn (string-append
+ "Programming error: No such font known "
+ (car name-mag-pair) " "
+ (ly-number->string (cdr name-mag-pair))
+ ))
+
+ "") ; issue no command
+ (string-append " " (cddr c) " "))
))
-
- (define (lily-def key val)
-
- (if (string=? (substring key 0 (min (string-length "lilypondpaper") (string-length key))) "lilypondpaper")
- (string-append "/" key " {" val "} bind def\n")
- (string-append "/" key " (" val ") def\n")
- )
- )
-
- (define (header creator generate)
- (string-append
- "%!PS-Adobe-3.0\n"
- "%%Creator: " creator generate "\n"))
-
- (define (invoke-char s i)
- (string-append
- "(\\" (inexact->string i 8) ") " s " " ))
-
- (define (invoke-dim1 s d)
- (string-append
- (ly-number->string (* d (/ 72.27 72))) " " s ))
-
- (define (placebox x y s)
- (string-append
- (ly-number->string x) " " (ly-number->string y) " {" s "} place-box\n"))
-
- (define (bezier-sandwich l thick)
- (string-append
- (apply string-append (map control->string l))
- (ly-number->string thick)
- " draw_bezier_sandwich"))
-
-; TODO: use HEIGHT argument
- (define (start-line height)
- (string-append
- "\n"
- (ly-number->string height)
- " start-line {
+
+(define (font-load-command name-mag command)
+ (string-append
+ "/" command
+ " { /"
+ (car name-mag)
+ " findfont "
+ "12 " (ly-number->string (cdr name-mag)) " mul "
+ "lilypondpaperoutputscale div scalefont setfont } bind def "
+ "\n"))
+
+(define (beam width slope thick)
+ (string-append
+ (numbers->string (list slope width thick)) " draw_beam" ))
+
+(define (comment s)
+ (string-append "% " s "\n"))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+ (string-append
+ (numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" ))
+
+(define (char i)
+ (invoke-char " show" i))
+
+
+(define (hairpin thick width starth endh )
+ (string-append
+ (numbers->string (list width starth endh thick))
+ " draw_hairpin"))
+
+;; what the heck is this interface ?
+(define (dashed-slur thick dash l)
+ (string-append
+ (apply string-append (map control->string l))
+ (ly-number->string thick)
+ " [ "
+ (ly-number->string dash)
+ " "
+ (ly-number->string (* 10 thick)) ;UGH. 10 ?
+ " ] 0 draw_dashed_slur"))
+
+(define (dashed-line thick on off dx dy)
+ (string-append
+ (ly-number->string dx)
+ " "
+ (ly-number->string dy)
+ " "
+ (ly-number->string thick)
+ " [ "
+ (ly-number->string on)
+ " "
+ (ly-number->string off)
+ " ] 0 draw_dashed_line"))
+
+(define (repeat-slash wid slope thick)
+ (string-append (numbers->string (list wid slope thick))
+ " draw_repeat_slash"))
+
+(define (end-output)
+ "\nend-lilypond-output\n")
+
+(define (experimental-on) "")
+
+(define (filledbox breapth width depth height)
+ (string-append (numbers->string (list breapth width depth height))
+ " draw_box" ))
+
+;; obsolete?
+(define (font-def i s)
+ (string-append
+ "\n/" (font i) " {/"
+ (substring s 0 (- (string-length s) 4))
+ " findfont 12 scalefont setfont} bind def \n"))
+
+(define (font-switch i)
+ (string-append (font i) " "))
+
+(define (header-end)
+ (string-append
+ ;; URG: now we can't use scm output without Lily
+ (ly-gulp-file "lilyponddefs.ps")
+ " {exch pop //systemdict /run get exec} "
+ (ly-gulp-file "music-drawing-routines.ps")
+ "{ exch pop //systemdict /run get exec } "
+ (if (defined? 'ps-testing) "\n /testing true def" "")
+ ))
+
+(define (lily-def key val)
+
+ (if (string=? (substring key 0 (min (string-length "lilypondpaper") (string-length key))) "lilypondpaper")
+ (string-append "/" key " {" val "} bind def\n")
+ (string-append "/" key " (" val ") def\n")
+ )
+ )
+
+(define (header creator generate)
+ (string-append
+ "%!PS-Adobe-3.0\n"
+ "%%Creator: " creator generate "\n"))
+
+(define (invoke-char s i)
+ (string-append
+ "(\\" (inexact->string i 8) ") " s " " ))
+
+(define (invoke-dim1 s d)
+ (string-append
+ (ly-number->string (* d (/ 72.27 72))) " " s ))
+
+(define (placebox x y s)
+ (string-append
+ (ly-number->string x) " " (ly-number->string y) " {" s "} place-box\n"))
+
+(define (bezier-sandwich l thick)
+ (string-append
+ (apply string-append (map control->string l))
+ (ly-number->string thick)
+ " draw_bezier_sandwich"))
+
+ ; TODO: use HEIGHT argument
+(define (start-line height)
+ (string-append
+ "\n"
+ (ly-number->string height)
+ " start-line {
lilypondpaperoutputscale lilypondpaperoutputscale scale
"))
-
- (define (stem breapth width depth height)
- (string-append (numbers->string (list breapth width depth height))
- " draw_box" ))
- (define (stop-line)
- "}\nstop-line\n")
+(define (stem breapth width depth height)
+ (string-append (numbers->string (list breapth width depth height))
+ " draw_box" ))
- (define (text s)
- (string-append "(" s ") show "))
+(define (stop-line)
+ "}\nstop-line\n")
+(define (stop-last-line)
+ "}\nstop-line\n")
- (define (volta h w thick vert_start vert_end)
- (string-append
- (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
- " draw_volta"))
+(define (text s)
+ (string-append "(" s ") show "))
- (define (tuplet ht gap dx dy thick dir)
- (string-append
- (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
- " draw_tuplet"))
+(define (volta h w thick vert_start vert_end)
+ (string-append
+ (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
+ " draw_volta"))
- (define (unknown)
- "\n unknown\n")
+(define (tuplet ht gap dx dy thick dir)
+ (string-append
+ (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
+ " draw_tuplet"))
- (define (ez-ball ch letter-col ball-col)
- (string-append
- " (" ch ") "
- (numbers->string (list letter-col ball-col))
- " /Helvetica-Bold " ;; ugh
- " draw_ez_ball"))
- (define (define-origin a b c ) "")
- (define (no-origin) "")
-
- ;; PS
- (cond ((eq? action-name 'all-definitions)
- `(begin
- (define beam ,beam)
- (define tuplet ,tuplet)
- (define bracket ,bracket)
- (define char ,char)
- (define hairpin ,hairpin)
- (define volta ,volta)
- (define bezier-sandwich ,bezier-sandwich)
- (define dashed-line ,dashed-line)
- (define dashed-slur ,dashed-slur)
- (define end-output ,end-output)
- (define experimental-on ,experimental-on)
- (define filledbox ,filledbox)
- (define font-def ,font-def)
- (define font-switch ,font-switch)
- (define header-end ,header-end)
- (define lily-def ,lily-def)
- (define font-load-command ,font-load-command)
- (define header ,header)
- (define invoke-char ,invoke-char)
- (define invoke-dim1 ,invoke-dim1)
- (define placebox ,placebox)
- (define select-font ,select-font)
- (define start-line ,start-line)
- (define stem ,stem)
- (define stop-line ,stop-line)
- (define stop-last-line ,stop-line)
- (define repeat-slash ,repeat-slash)
- (define text ,text)
- (define no-origin ,no-origin)
- (define define-origin ,define-origin)
- (define ez-ball ,ez-ball)
- ))
- ((eq? action-name 'repeat-slash) repeat-slash)
- ((eq? action-name 'tuplet) tuplet)
- ((eq? action-name 'beam) beam)
- ((eq? action-name 'bezier-sandwich) bezier-sandwich)
- ((eq? action-name 'bracket) bracket)
- ((eq? action-name 'char) char)
- ((eq? action-name 'dashed-line) dashed-line)
- ((eq? action-name 'dashed-slur) dashed-slur)
- ((eq? action-name 'hairpin) hairpin)
- ((eq? action-name 'experimental-on) experimental-on)
- ((eq? action-name 'filledbox) filledbox)
- ((eq? action-name 'ez-ball) ez-ball)
- ((eq? action-name 'select-font) select-font)
- ((eq? action-name 'volta) volta)
- (else (error "unknown tag -- PS-SCM " action-name))
- )
- )
+(define (unknown)
+ "\n unknown\n")
+
+(define (ez-ball ch letter-col ball-col)
+ (string-append
+ " (" ch ") "
+ (numbers->string (list letter-col ball-col))
+ " /Helvetica-Bold " ;; ugh
+ " draw_ez_ball"))
-(define (scm-ps-output)
- (primitive-eval (ps-scm 'all-definitions)))
+(define (define-origin a b c ) "")
+(define (no-origin) "")
+
+
-
-
-(use-modules (ice-9 format))
-
-(define (ascii->string i) (make-string 1 (integer->char i)))
-
-(define (control->list c)
- (list (+ global-x (car c)) (+ global-y (cdr c))))
-
-(define (control-flip-y c)
- (cons (car c) (* -1 (cdr c))))
-
-;;; urg.
-(define (sk-numbers->string l)
- (string-append
- (number->string (car l))
- (if (null? (cdr l))
- ""
- (string-append "," (sk-numbers->string (cdr l))))))
-
-(define global-x 0.0)
-(define global-y 0.0)
-(define global-list '())
-(define global-font "")
-(define global-s "")
-(define global-scale 1.0)
-(define (global-mul-scale x) (* global-scale x))
-
-;; hmm, global is global
-(define (global-filledbox width dy dx height x y)
- (string-append
- "fp((0,0,0))\n"
- "lw(0.1)\n"
- "r("
- (sk-numbers->string
- (map global-mul-scale (list width dy dx height x y)))
- ")\n"))
-
-(define (global-bezier l)
- (let* ((c0 (car (list-tail l 3)))
- (c123 (list-head l 3))
- (start (control->list c0))
- (control (apply append (map control->list c123))))
- (string-append
- "bs(" (sk-numbers->string (map global-mul-scale start)) ",0)\n"
- "bc(" (sk-numbers->string (map global-mul-scale control)) ",2)\n")))
-
-
-(define (global-beziers l thick)
- (let* (;;(burp (set! global-y (+ global-y (* 2 (cdar l)))))
- (first
- (list-tail l 4))
- (second
- (list-head l 4))
- )
- (string-append
- "fp((0,0,0))\n"
- "lw(0.1)\n"
- "b()\n"
- (global-bezier first)
- (global-bezier second)
- ;;"b_()\n"
- )))
-
-
-(define (sketch-scm action-name)
-
- ;; alist containing fontname -> fontcommand assoc (both strings)
- (define font-alist '())
- (define font-count 0)
- (define current-font "")
-
- (define (font-def x)
- "")
-
- (define (cached-fontname i)
- "")
-
- (define (select-font name-mag-pair)
- (set! global-font (car name-mag-pair))
- "")
-
- (define (font-load-command name-mag command)
- "")
-
- (define (beam width slope thick)
- (let ((s (list
- 'global-filledbox
- width
- (* slope width)
- 0
- thick
- 'global-x
- 'global-y)))
- (set! global-s s))
- "\n")
-
- (define (comment s)
- (string-append "% " s))
-
- (define (bracket arch_angle arch_width arch_height height arch_thick thick)
- (string-append
- (numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" ))
-
- (define (char i)
- (set! global-s
-;; `(string-append "txt(" ,(number->string i) ",("
-;; (sk-numbers->string (list global-x global-y))
- `(string-append
- "fp((0,0,0))\n"
- "le()\n"
- "lw(0.1)\n"
-;; "Fn('" global-font "')\n"
-;; "Fn('Times-Roman')\n"
- "Fn('TeX-feta20')\n"
- "Fs(20)\n"
- ;; chars > 128 don't work yet
- "txt('" ,(ascii->string (modulo i 128)) "',("
-;; "char(" ,(number->string i) ",("
- (sk-numbers->string (list (* global-scale global-x)
- (* global-scale global-y)))
- "))\n")))
-
- (define (hairpin thick width starth endh )
- (string-append
- (numbers->string (list width starth endh thick))
- " draw_hairpin"))
-
- ;; what the heck is this interface ?
- (define (dashed-slur thick dash l)
- (string-append
- (apply string-append (map control->string l))
- (ly-number->string thick)
- " [ "
- (ly-number->string dash)
- " "
- (ly-number->string (* 10 thick)) ;UGH. 10 ?
- " ] 0 draw_dashed_slur"))
-
- (define (dashed-line thick on off dx dy)
- (string-append
- (ly-number->string dx)
- " "
- (ly-number->string dy)
- " "
- (ly-number->string thick)
- " [ "
- (ly-number->string on)
- " "
- (ly-number->string off)
- " ] 0 draw_dashed_line"))
-
- (define (repeat-slash wid slope thick)
- (string-append (numbers->string (list wid slope thick))
- " draw_repeat_slash"))
-
- (define (end-output)
- "guidelayer('Guide Lines',1,0,0,1,(0,0,1))
-grid((0,0,20,20),0,(0,0,1),'Grid')\n")
-
- (define (experimental-on) "")
-
- (define (font-switch i)
- "")
-
- (define (header-end)
- "")
-
- (define (lily-def key val)
- (if (equal? key "lilypondpaperoutputscale")
- (set! global-scale (string->number val)))
- "")
-
-
- (define (header creator generate)
- (string-append
- "##Sketch 1 2
-document()
-layout('A4',0)
-layer('Layer 1',1,1,0,0,(0,0,0))
-"))
-
- (define (invoke-char s i)
- "")
-
- (define (invoke-dim1 s d)
- (string-append
- (ly-number->string (* d (/ 72.27 72))) " " s ))
-
- ;; urg
- (define (placebox x y s)
-;; (format (current-error-port) "placebox: ~S, ~S, ~S\n" x y s)
- (set! global-x (+ x 0))
- (set! global-y (+ y 100))
- (let ((s (primitive-eval global-s)))
- (set! global-s "\n")
- s))
-
- (define (bezier-sandwich l thick)
- (let ((s (list
- 'global-beziers
- 'global-list
- thick)))
- (set! global-s s)
- (set! global-list l))
- "\n")
-
-; TODO: use HEIGHT argument
- (define (start-line height)
- "G()\n"
- )
-
- ;; r((520.305,0,0,98.0075,51.8863,10.089))
- ;; width, 0, 0, height, x, y
- (define (filledbox breapth width depth height)
- (let ((s (list
- 'global-filledbox
- (+ breapth width)
- 0 0
- (+ depth height)
- `(- global-x ,breapth)
- `(- global-y ,depth))))
-;; (format (current-error-port) "filledbox: ~S\n" s)
- (set! global-s s))
- "\n")
-
- (define (stem x y z w) (filledbox x y z w))
-
-
- (define (stop-line)
- "G_()\n")
-
- (define (text s)
- (set! global-s
- `(string-append "txt('" ,s "',("
- (sk-numbers->string (list global-x global-y))
- "))\n")))
-
-
- (define (volta h w thick vert_start vert_end)
- (string-append
- (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
- " draw_volta"))
-
- (define (tuplet ht gap dx dy thick dir)
- (string-append
- (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
- " draw_tuplet"))
-
-
- (define (unknown)
- "\n unknown\n")
-
- (define (ez-ball ch letter-col ball-col)
- (string-append
- " (" ch ") "
- (numbers->string (list letter-col ball-col))
- " /Helvetica-Bold " ;; ugh
- " draw_ez_ball"))
-
- (define (define-origin a b c ) "")
- (define (no-origin) "")
-
- ;; PS
- (cond ((eq? action-name 'all-definitions)
- `(begin
- (define beam ,beam)
- (define tuplet ,tuplet)
- (define bracket ,bracket)
- (define char ,char)
- (define hairpin ,hairpin)
- (define volta ,volta)
- (define bezier-sandwich ,bezier-sandwich)
- (define dashed-line ,dashed-line)
- (define dashed-slur ,dashed-slur)
- (define end-output ,end-output)
- (define experimental-on ,experimental-on)
- (define filledbox ,filledbox)
- (define stem ,stem)
- (define font-def ,font-def)
- (define font-switch ,font-switch)
- (define header-end ,header-end)
- (define lily-def ,lily-def)
- (define font-load-command ,font-load-command)
- (define header ,header)
- (define invoke-char ,invoke-char)
- (define invoke-dim1 ,invoke-dim1)
- (define placebox ,placebox)
- (define select-font ,select-font)
- (define start-line ,start-line)
- (define stem ,stem)
- (define stop-line ,stop-line)
- (define stop-last-line ,stop-line)
- (define repeat-slash ,repeat-slash)
- (define text ,text)
- (define no-origin ,no-origin)
- (define define-origin ,define-origin)
- (define ez-ball ,ez-ball)
- ))
- ((eq? action-name 'repeat-slash) repeat-slash)
- ((eq? action-name 'tuplet) tuplet)
- ((eq? action-name 'beam) beam)
- ((eq? action-name 'bezier-sandwich) bezier-sandwich)
- ((eq? action-name 'bracket) bracket)
- ((eq? action-name 'char) char)
- ((eq? action-name 'dashed-line) dashed-line)
- ((eq? action-name 'dashed-slur) dashed-slur)
- ((eq? action-name 'hairpin) hairpin)
- ((eq? action-name 'experimental-on) experimental-on)
- ((eq? action-name 'filledbox) filledbox)
- ((eq? action-name 'ez-ball) ez-ball)
- ((eq? action-name 'select-font) select-font)
- ((eq? action-name 'volta) volta)
- (else (error "unknown tag -- SKETCH-SCM " action-name))
- )
- )
-
-
;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+(define-module (scm tex)
+ :export (tex-output-expression)
+ :no-backtrace
+ )
+
+(use-modules (scm ps)
+ (ice-9 regex)
+ (ice-9 string-fun)
+ (ice-9 format)
+ (guile-user)
+ (guile)
+ )
+
+(define this-module (current-module))
+
+;;;;;;;;
+;;;;;;;; DOCUMENT ME!
+;;;;;;;;
+(define (tex-encoded-fontswitch name-mag)
+ (let* ((iname-mag (car name-mag))
+ (ename-mag (cdr name-mag)))
+ (cons iname-mag
+ (cons ename-mag
+ (string-append "magfont"
+ (string-encode-integer
+ (hashq (car ename-mag) 1000000))
+ "m"
+ (string-encode-integer
+ (inexact->exact (* 1000 (cdr ename-mag)))))))))
+
+(define (define-fonts internal-external-name-mag-pairs)
+ (set! font-name-alist (map tex-encoded-fontswitch
+ internal-external-name-mag-pairs))
+ (apply string-append
+ (map (lambda (x)
+ (font-load-command (car x) (cdr x)))
+ (map cdr font-name-alist))))
+
+
+;; urg, how can exp be #unspecified? -- in sketch output
;;
-;; todo: this dispatch is totally LAME
-
-(define (tex-scm action-name)
- (define (unknown)
- "%\n\\unknown%\n")
-
-
- (define (select-font name-mag-pair)
- (let*
- (
- (c (assoc name-mag-pair font-name-alist))
- )
-
- (if (eq? c #f)
- (begin
- (display "FAILED\n")
- (display (object-type (car name-mag-pair)))
- (display (object-type (caaar font-name-alist)))
-
- (ly-warn (string-append
- "Programming error: No such font known "
- (car name-mag-pair) " "
- (ly-number->string (cdr name-mag-pair))
- ))
- "") ; issue no command
- (string-append "\\" (cddr c)))
-
-
- ))
-
- (define (beam width slope thick)
- (embedded-ps ((ps-scm 'beam) width slope thick)))
-
- (define (bracket arch_angle arch_width arch_height height arch_thick thick)
- (embedded-ps ((ps-scm 'bracket) arch_angle arch_width arch_height height arch_thick thick)))
-
- (define (dashed-slur thick dash l)
- (embedded-ps ((ps-scm 'dashed-slur) thick dash l)))
-
- (define (hairpin thick w sh eh)
- (embedded-ps ((ps-scm 'hairpin) thick w sh eh)))
-
- (define (char i)
- (string-append "\\char" (inexact->string i 10) " "))
-
- (define (dashed-line thick on off dx dy)
- (embedded-ps ((ps-scm 'dashed-line) thick on off dx dy)))
-
- (define (font-load-command name-mag command)
- (string-append
- "\\font\\" command "="
- (car name-mag)
- " scaled "
- (ly-number->string (inexact->exact (* 1000 (cdr name-mag))))
- "\n"))
-
- (define (ez-ball c l b)
- (embedded-ps ((ps-scm 'ez-ball) c l b)))
- (define (embedded-ps s)
- (string-append "\\embeddedps{" s "}"))
-
- (define (comment s)
- (string-append "% " s))
-
- (define (end-output)
+;; set! returns #<unspecified> --hwn
+(define (fontify name-mag-pair exp)
+ (string-append (select-font name-mag-pair)
+ exp))
+
+
+(define (unknown)
+ "%\n\\unknown%\n")
+
+(define (select-font name-mag-pair)
+ (let*
+ (
+ (c (assoc name-mag-pair font-name-alist))
+ )
+
+ (if (eq? c #f)
(begin
-; uncomment for some stats about lily memory
-; (display (gc-stats))
+ (display "FAILED\n")
+ (display (object-type (car name-mag-pair)))
+ (display (object-type (caaar font-name-alist)))
+
+ (ly-warn (string-append
+ "Programming error: No such font known "
+ (car name-mag-pair) " "
+ (ly-number->string (cdr name-mag-pair))
+ ))
+ "") ; issue no command
+ (string-append "\\" (cddr c)))
+
+
+ ))
+
+(define (beam width slope thick)
+ (embedded-ps (list 'beam width slope thick)))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+ (embedded-ps (list 'bracket arch_angle arch_width arch_height height arch_thick thick)))
+
+(define (dashed-slur thick dash l)
+ (embedded-ps (list 'dashed-slur thick dash l)))
+
+(define (hairpin thick w sh eh)
+ (embedded-ps (list 'hairpin thick w sh eh))
+)
+
+(define (char i)
+ (string-append "\\char" (inexact->string i 10) " "))
+
+(define (dashed-line thick on off dx dy)
+ (embedded-ps (list 'dashed-line thick on off dx dy)))
+
+(define (font-load-command name-mag command)
+ (string-append
+ "\\font\\" command "="
+ (car name-mag)
+ " scaled "
+ (ly-number->string (inexact->exact (* 1000 (cdr name-mag))))
+ "\n"))
+
+(define (ez-ball c l b)
+ (embedded-ps (list 'ez-ball c l b)))
+
+(define (header-to-file fn key val)
+ (set! key (symbol->string key))
+ (if (not (equal? "-" fn))
+ (set! fn (string-append fn "." key))
+ )
+ (display
+ (format "writing header field `~a' to `~a'..."
+ key
+ (if (equal? "-" fn) "<stdout>" fn)
+ )
+ (current-error-port))
+ (if (equal? fn "-")
+ (display val)
+ (display val (open-file fn "w"))
+ )
+ (display "\n" (current-error-port))
+ ""
+ )
+
+
+(define (embedded-ps expr)
+ (let
+ ((os (open-output-string)))
+ (ps-output-expression expr os)
+ (string-append "\\embeddedps{" (get-output-string os) "}")
+ ))
+
+(define (comment s)
+ (string-append "% " s "\n"))
+
+(define (end-output)
+ (begin
+ ; uncomment for some stats about lily memory
+ ; (display (gc-stats))
(string-append "\n\\EndLilyPondOutput"
- ; Put GC stats here.
+ ; Put GC stats here.
)))
-
- (define (experimental-on)
- "")
-
- (define (repeat-slash w a t)
- (embedded-ps ((ps-scm 'repeat-slash) w a t)))
-
- (define (font-switch i)
- (string-append
- "\\" (font i) "\n"))
-
- (define (font-def i s)
- (string-append
- "\\font" (font-switch i) "=" s "\n"))
-
- (define (header-end)
- (string-append
- "\\special{\\string! "
-
- ;; URG: ly-gulp-file: now we can't use scm output without Lily
- (if use-regex
- ;; fixed in 1.3.4 for powerpc -- broken on Windows
- (regexp-substitute/global #f "\n"
- (ly-gulp-file "music-drawing-routines.ps") 'pre " %\n" 'post)
- (ly-gulp-file "music-drawing-routines.ps"))
- (if (defined? 'ps-testing) "/testing true def%\n" "")
- "}"
- "\\input lilyponddefs \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
-
- ;; Note: this string must match the string in ly2dvi.py!!!
- (define (header creator generate)
- (string-append
- "% Generated automatically by: " creator generate "\n"))
-
- (define (invoke-char s i)
- (string-append
- "\n\\" s "{" (inexact->string i 10) "}" ))
-
- (define (invoke-dim1 s d)
- (string-append
- "\n\\" s "{" (number->dim d) "}"))
- (define (pt->sp x)
- (* 65536 x))
-
- ;;
- ;; need to do something to make this really safe.
- ;;
- (define (output-tex-string s)
- (if security-paranoia
- (if use-regex
- (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
- (begin (display "warning: not paranoid") (newline) s))
- s))
-
- (define (lily-def key val)
- (let ((tex-key
- (if use-regex
- ;; fixed in 1.3.4 for powerpc -- broken on Windows
- (regexp-substitute/global
- #f "_" (output-tex-string key) 'pre "X" 'post)
- (output-tex-string key)))
- (tex-val (output-tex-string val)))
- (if (equal? (sans-surrounding-whitespace tex-val) "")
- (string-append "\\let\\" tex-key "\\undefined\n")
- (string-append "\\def\\" tex-key "{" tex-val "}\n"))))
-
- (define (number->dim x)
- (string-append
- ;;ugh ly-* in backend needs compatibility func for standalone output
- (ly-number->string x) " \\outputscale "))
-
- (define (placebox x y s)
- (string-append
- "\\placebox{"
- (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
-
- (define (bezier-sandwich l thick)
- (embedded-ps ((ps-scm 'bezier-sandwich) l thick)))
-
- (define (start-line ht)
- (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
-
- (define (stop-line)
- "}\\vss}\\interscoreline\n")
- (define (stop-last-line)
- "}\\vss}")
-
- (define (filledbox breapth width depth height)
- (if (defined? 'ps-testing)
- (embedded-ps
- (string-append (numbers->string (list breapth width depth height))
- " draw_box" ))
- (string-append
- "\\kern" (number->dim (- breapth))
- "\\vrule width " (number->dim (+ breapth width))
- "depth " (number->dim depth)
- "height " (number->dim height) " ")))
-
- (define (text s)
- (string-append "\\hbox{" (output-tex-string s) "}"))
-
- (define (tuplet ht gapx dx dy thick dir)
- (embedded-ps ((ps-scm 'tuplet) ht gapx dx dy thick dir)))
-
- (define (volta h w thick vert_start vert_end)
- (embedded-ps ((ps-scm 'volta) h w thick vert_start vert_end)))
-
- (define (define-origin file line col)
- (if (procedure? point-and-click)
- (string-append "\\special{src\\string:"
- (point-and-click line col file)
- "}" )
- "")
- )
- ; no-origin not yet supported by Xdvi
- (define (no-origin) "")
-
- ;; TeX
- ;; The procedures listed below form the public interface of TeX-scm.
- ;; (should merge the 2 lists)
- (cond ((eq? action-name 'all-definitions)
- `(begin
- (define font-load-command ,font-load-command)
- (define beam ,beam)
- (define bezier-sandwich ,bezier-sandwich)
- (define bracket ,bracket)
- (define char ,char)
- (define dashed-line ,dashed-line)
- (define dashed-slur ,dashed-slur)
- (define hairpin ,hairpin)
- (define end-output ,end-output)
- (define experimental-on ,experimental-on)
- (define filledbox ,filledbox)
- (define font-def ,font-def)
- (define font-switch ,font-switch)
- (define header-end ,header-end)
- (define lily-def ,lily-def)
- (define ez-ball ,ez-ball)
- (define header ,header)
- (define invoke-char ,invoke-char)
- (define invoke-dim1 ,invoke-dim1)
- (define placebox ,placebox)
- (define select-font ,select-font)
- (define start-line ,start-line)
- (define stop-line ,stop-line)
- (define stop-last-line ,stop-last-line)
- (define text ,text)
- (define tuplet ,tuplet)
- (define volta ,volta)
- (define define-origin ,define-origin)
- (define no-origin ,no-origin)
- (define repeat-slash ,repeat-slash)
- ))
-
- ((eq? action-name 'beam) beam)
- ((eq? action-name 'tuplet) tuplet)
- ((eq? action-name 'bracket) bracket)
- ((eq? action-name 'hairpin) hairpin)
- ((eq? action-name 'dashed-line) dashed-line)
- ((eq? action-name 'dashed-slur) dashed-slur)
- ((eq? action-name 'end-output) end-output)
- ((eq? action-name 'experimental-on) experimental-on)
- ((eq? action-name 'font-def) font-def)
- ((eq? action-name 'font-switch) font-switch)
- ((eq? action-name 'header-end) header-end)
- ((eq? action-name 'lily-def) lily-def)
- ((eq? action-name 'header) header)
- ((eq? action-name 'invoke-char) invoke-char)
- ((eq? action-name 'invoke-dim1) invoke-dim1)
- ((eq? action-name 'placebox) placebox)
- ((eq? action-name 'bezier-sandwich) bezier-sandwich)
- ((eq? action-name 'start-line) start-line)
- ((eq? action-name 'stem) stem)
- ((eq? action-name 'stop-line) stop-line)
- ((eq? action-name 'stop-last-line) stop-last-line)
- ((eq? action-name 'volta) volta)
- (else (error "unknown tag -- PS-TEX " action-name))
- )
+(define (experimental-on)
+ "")
+
+(define (repeat-slash w a t)
+ (embedded-ps (list 'repeat-slash w a t)))
+
+(define (font-switch i)
+ (string-append
+ "\\" (font i) "\n"))
+
+(define (font-def i s)
+ (string-append
+ "\\font" (font-switch i) "=" s "\n"))
+
+(define (header-end)
+ (string-append
+ "\\special{\\string! "
+
+ ;; URG: ly-gulp-file: now we can't use scm output without Lily
+ (if use-regex
+ ;; fixed in 1.3.4 for powerpc -- broken on Windows
+ (regexp-substitute/global #f "\n"
+ (ly-gulp-file "music-drawing-routines.ps") 'pre " %\n" 'post)
+ (ly-gulp-file "music-drawing-routines.ps"))
+ (if (defined? 'ps-testing) "/testing true def%\n" "")
+ "}"
+ "\\input lilyponddefs \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
+
+;; Note: this string must match the string in ly2dvi.py!!!
+(define (header creator generate)
+ (string-append
+ "% Generated automatically by: " creator generate "\n"))
+
+(define (invoke-char s i)
+ (string-append
+ "\n\\" s "{" (inexact->string i 10) "}" ))
+
+(define (invoke-dim1 s d)
+ (string-append
+ "\n\\" s "{" (number->dim d) "}"))
+(define (pt->sp x)
+ (* 65536 x))
+
+;;
+;; need to do something to make this really safe.
+;;
+(define (output-tex-string s)
+ (if security-paranoia
+ (if use-regex
+ (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+ (begin (display "warning: not paranoid") (newline) s))
+ s))
+
+(define (lily-def key val)
+ (let ((tex-key
+ (if use-regex
+ ;; fixed in 1.3.4 for powerpc -- broken on Windows
+ (regexp-substitute/global
+ #f "_" (output-tex-string key) 'pre "X" 'post)
+ (output-tex-string key)))
+ (tex-val (output-tex-string val)))
+ (if (equal? (sans-surrounding-whitespace tex-val) "")
+ (string-append "\\let\\" tex-key "\\undefined\n")
+ (string-append "\\def\\" tex-key "{" tex-val "}\n"))))
+
+(define (number->dim x)
+ (string-append
+ ;;ugh ly-* in backend needs compatibility func for standalone output
+ (ly-number->string x) " \\outputscale "))
+
+(define (placebox x y s)
+ (string-append
+ "\\placebox{"
+ (number->dim y) "}{" (number->dim x) "}{" s "}%\n"))
+
+(define (bezier-sandwich l thick)
+ (embedded-ps (list 'bezier-sandwich `(quote ,l) thick)))
+
+(define (start-line ht)
+ (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
+
+(define (stop-line)
+ "}\\vss}\\interscoreline\n")
+(define (stop-last-line)
+ "}\\vss}")
+
+(define (filledbox breapth width depth height)
+ (if (defined? 'ps-testing)
+ (embedded-ps
+ (string-append (numbers->string (list breapth width depth height))
+ " draw_box" ))
+ (string-append
+ "\\kern" (number->dim (- breapth))
+ "\\vrule width " (number->dim (+ breapth width))
+ "depth " (number->dim depth)
+ "height " (number->dim height) " ")))
+
+(define (text s)
+ (string-append "\\hbox{" (output-tex-string s) "}"))
+
+(define (tuplet ht gapx dx dy thick dir)
+ (embedded-ps (list 'tuplet ht gapx dx dy thick dir)))
+
+(define (volta h w thick vert_start vert_end)
+ (embedded-ps (list 'volta h w thick vert_start vert_end)))
+(define (between-system-string string)
+ string
)
+(define (define-origin file line col)
+ (if (procedure? point-and-click)
+ (string-append "\\special{src\\string:"
+ (point-and-click line col file)
+ "}" )
+ "")
+ )
+
+ ; no-origin not yet supported by Xdvi
+(define (no-origin) "")
-(define (scm-tex-output)
- (primitive-eval (tex-scm 'all-definitions)))
+(define (tex-output-expression expr port)
+ (display (eval expr this-module) port )
+ )
# the default placement for text in abc is above the staff.
# %%LY now supported.
# \breve and \longa supported.
-
+# M:none doesn't crash lily.
+
# Limitations
#
# Multiple tunes in single file not supported
ks = hdr.keys ()
ks.sort ()
for k in ks:
+ hdr[k] = re.sub('"', '\\"', hdr[k])
outf.write ('\t%s = "%s"\n'% (k,hdr[k]))
outf.write ('}')
array2=string.split(array[1],'=')
denominator=array2[0]
perminute=array2[1]
- duration=str(string.atof(denominator)/string.atoi(numerator))
+ duration=str(string.atoi(denominator)/string.atoi(numerator))
midi_specs=string.join(["\\tempo", duration, "=", perminute])
else:
sys.stderr.write("abc2ly: Warning, unable to parse Q specification: %s\n" % a)
if re.match ('\([2-9]', str):
dig = str[1]
str = str[2:]
- state.parsing_tuplet = string.atoi (dig[0])
-
+ prev_tuplet_state = state.parsing_tuplet
+ state.parsing_tuplet = string.atoi (dig[0])
+ if prev_tuplet_state:
+ voices_append ("}")
voices_append ("\\times %s {" % tup_lookup[dig])
return str
a = re.sub('[ \t]*$','', a) #strip trailing blanks
if header.has_key('title'):
if a:
- header['title'] = header['title'] + '\\\\\\\\' + a
+ if len(header['title']):
+ header['title'] = header['title'] + '\\\\\\\\' + a
+ else:
+ header['subtitle'] = a
else:
header['title'] = a
if g == 'M': # Meter
set_default_len_from_time_sig (a)
else:
length_specified = 0
- voices_append ('\\time %s' % a)
+ if not a == 'none':
+ voices_append ('\\time %s' % a)
state.next_bar = ''
if g == 'K': # KEY
a = check_clef(a)
if base == 1:
if (multiply_tup[0] / multiply_tup[1]) == 2:
base = '\\breve'
+ if (multiply_tup[0] / multiply_tup[1]) == 3:
+ base = '\\breve'
+ dots = 1
if (multiply_tup[0] / multiply_tup[1]) == 4:
base = '\longa'
return '%s%s' % ( base, '.'* dots)
def set_timesig (self, finale):
(beats, fdur) = finale
(log, dots) = EDU_to_duration (fdur)
- assert dots == 0
+ if dots <> 0:
+ sys.stderr.write ("\nHuh? Beat duration has a dot? (EDU Duration = %d)" % fdur)
self.timesig = (beats, log)
def length (self):
frame_obj_list = [None]
for frno in m.frames:
- fr = self.frames[frno]
- frame_obj_list.append (fr)
+ try:
+ fr = self.frames[frno]
+ frame_obj_list.append (fr)
+ except IndexError:
+ sys.stderr.write ("\nNon-existent frame %d" % frno)
m.frames = frame_obj_list
for fr in frame_obj_list[1:]:
$(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf
gftopk $< $@
+
+$(outdir)/%.pfb:
+ pktrace $(basename $(@F))
+ mv $(basename $(@F)).pfb $(outdir)
+
+
+
#%.afm:
# $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
# mv $@ $@.in
xpms: $(addprefix $(outdir)/, $(XPM_FONTS:%=%.afm)) pks
$(foreach i, $(XPM_FONTS), $(SHELL) $(depth)/buildscripts/mf-to-xpms.sh $(i) && ) true
+
+pfb: $(PFB_FILES)
+