# yydebug
InitParser 1
-Parser 1
+Parser 0
InitDeclarations 1
Declarations 1
# FlexLexer debug
Mixed_qp 0
Music 0
Music_iterator 0
-My_lily_lexer 1
+My_lily_lexer 0
Note_head 0
Note_performer 0
Note_req 0
-Document Really Ugly Bugs (coredumps assert fails, etc)
+Document Really Ugly Bugs (coredumps, assert fails, etc)
[Solaris]
=item *
-Gather a moderate number of test users and hackers
-
-=item *
-
-A website on GMP
-
-=item *
-
-Libs for r/w MIDI
-
-=item *
-
Think about interfaces for components.
=item *
for music printing and composing. It was started in november '92 by a
core team of four members (Bryan Ford <baford@cs.utah.edu>, David Linn
<drl@vuse.vanderbilt.edu>, Francois Pinard <pinard@iro.umontreal.ca>,
-Neil Jerram <nj104@cus.cam.ac.uk> and in January '93 Robert Strandh
+Neil Jerram <nj104@cus.cam.ac.uk>) and in January '93 Robert Strandh
<Robert.Strandh@labri.u-bordeaux.fr> joined.
After serious disputes with Robert Strandh
As a related note, you should take a look at the examples and the init
files, as this document does not cover every aspect of mudela yet, and
may be out of date.\footnote{Ok, I am being pessimistic here. This
- just is a disclaimer. Docs usually are written after the program itself.}
+ just is a disclaimer. Docs usually are written after the program
+ itself.} This document intends to give an idea of how it works, it
+is not a guide on how to use it.
\section{Basic elements}
\verb+i'm_a_weird!!!identifier+). \verb+$+ Takes any sequence of
characters which are not whitespace, \verb+$+ and \verb+%+.
\verb+$i'm_a_weird!!!string+
+\def\foobar{$} % silly fontlock mode
\subsection{Nesting characters}
oboe = \melodic { ... }
\score{ \melodic { \oboe }}
\end{verbatim}
+
+The left-hand part of the assignment is really a string, so
+\begin{verbatim}
+"Foo bar 4 2 " = \melodic { .. }
+\end{verbatim}
+
+is also a valid assignment (but you would have trouble referencing to it)
+
+
\subsection{Hierarchical structures}
The general structure consists of declarations:
At the start of parsing, Mudela assumes normal mode.
In Normal mode, a word is looked up in the following order:
-\begin{verbatim}
-word string
-\word keyword, identifier
-\end{verbatim}
-In normalmode, a word is assumed to start with an alphabetic
+\begin{description}
+\item{\verb+word+} string
+\item{\verb|"string"|} string
+\item{\verb|\word|} keyword, identifier
+\end{description}
+In normal mode, a word is assumed to start with an alphabetic
character, followed by alpha-numeric characters.
-\item[Note mode]
- Note mode (and thus Simple mudela) is introduced by
- the keyword \verb+\melodic+. In Note mode, a word is looked up in
- the following order:
+\item[Note mode] Note mode is introduced by the keyword
+ \verb+\melodic+. In Note mode, a word is looked up in the following
+ order:
+\begin{description}
+\item{\verb+word+} notename, string
+\item{\verb|"string"|} string
+\item{\verb|\word|} keyword, identifier
+\end{description}
-\begin{verbatim}
-word notename, string
-\word keyword, identifier
-\end{verbatim}
-In Note mode a word is considered to have alphabetic characters only.
+In Note mode a word is considered to have alphabetic characters only,
+so the underscore (\_) is illegal. If you accidently mistype a
+notename, the parser will assume that you are entering a string (and
+it will most likely complain that you should be in \verb|\lyrics| mode to
+do lyrics)
-\item[Lyric mode]
-Lyrics mode (and thus Simple mudela) is introduced by the keyword \verb+\lyrics+.
-In Lyrics mode, a word is looked up in the following order:
+\item[Lyric mode] Lyrics mode (and thus Simple mudela) is introduced
+ by the keyword \verb+\lyrics+. Because of the various control
+ characters that can appear in lyrics, eg, ``foreign language''
+ accents, the inputting a string containing these has been made very
+ easy.
-\begin{verbatim}
-word string
-\word keyword, identifier
-\end{verbatim}
+In Lyrics mode, a word is looked up in the following order:
+\begin{description}
+\item{\verb+word+} string (thus a lyric)
+\item{\verb|"string"|} string
+\item{\verb|\word|} keyword, identifier
+\end{description}
In Lyric mode every sequence of non-digit and non-white characters
starting with an alphabetic character or the \_ is considered a word.
Hz concert-pitch. \verb+c'+ is also known as the central c. More examples:
\begin[fragment,verbatim]{mudela}
-'a % 110
+ 'a % 110
a % 220
A % 110, uppercase octavates down
a' % 440
-a'' % 880
-'as4.*2/3
+ a'' % 880
+ 'as4.*2/3
\end{mudela}
The last one is an A flat, (just below 110 Hz concert-pitch). The \verb+*2/3+
requests) or attached to notes (eg. accents). The former are
implemented as START and STOP stop features and then attached to the note.
-\begin{verbatim}
-[] START/STOP a beam
-() START/STOP a slur
-\end{verbatim}
+\begin{description}
+\item{[ and ]} start and stop a beam
+\item{( and )} start and stop a slur
+\end{description}
example:
\begin[verbatim,fragment]{mudela}
\end{mudela}
Please note that these two characters do \emph{not} necessarrily nest,
-they should attached to the note \verb+[ <c4 c4>]+ will generate a parse
-error for this reason.
+they should be attached to the note. For this reason, the construct
+\verb+[ <c4 c4>]+ will generate a parse error.
\subsection{Slurs and Ties}
Symbols which can be put at either side (above or below) of a staff
are entered as follows:
\begin[verbatim,fragment]{mudela}
-a-^ % marcato, direction: default
+ a-^ % marcato, direction: default
a^- % portato, direction: above note
a_. % staccato, direction: below note
a^\fermata % predefined identifier
c_"marcato" % add a text
c^"marcato"
-c-"marcato"
+ c-"marcato"
\end{mudela}
If you want to define your own scripts refer to \file{init/script.ly} for
Mudela defines the following dynamic identifiers:
\begin{verbatim}
-ppp pp p mp mf f ff fff
+ppp pp p mp mf f ff fff sfz fz fp
\end{verbatim}
and the following abbreviations:
\begin{verbatim}
Requests as its elements. The examples of the previous section were
processed with \verb+{+ and \verb+}+ enclosing the input.
+\subsection{Durations}
+
+A duration always starts with the duration type (1,2,4 etc), and then
+any optional multipliers/dots
+
+\subsection{Meters/groupings}
+
+A meter has this form:
+\begin{verbatim}
+\meter 3/4 ;
+\end{verbatim}
+
+Rhythmic grouping is a concept closely associated with this. For
+example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is
+entered as
+\begin{verbatim}
+\grouping 8*2 8*3 ;
+\end{verbatim}
+You can start the piece with a partial measure, the command takes the
+same syntax as grouping:
+\begin{verbatim}
+\partial 16*3 4;
+\end{verbatim}
+
+Make the piece start with a upstep [english translation?]
+lasting 1 3/4 quarter notes.
+
+These commands are also "voice elements", and constitute ``Music''
+(consisting of stuff with duration 0).
+
\subsection{Voicegroups}
+
+[OUTDATED]
+
If more than one "voice" is in a staff, then you have the option of
putting the different voices into so called voicegroups: members of
the same voicegroup share certain characteristics, among others:
[adsolete. Has to be fixed in lily]
You can set the voicegroup of a voice with the command \verb+\group+, e.g.,
+
\begin{verbatim}
oboeI = \melodic {
\group "oboes";
\end{verbatim}
makes a chord (all horizontal parts are in the same voicegroup). The construct
\begin{verbatim}
-< \multi 2; { ....} { .... } >
+\multi 2 < { ....} { .... } >
\end{verbatim}
creates horizontal parts which behave independently. You will have to
set voicegroup features by hand (\verb+\stem+ and \verb+\hshift+. See examples)
The construct
\begin{verbatim}
-< \multi 3; { ....} { .... } >
+\multi 3 < { ....} { .... } >
\end{verbatim}
creates a chord with each part in a different staff
-\subsection{Durations}
-
-A duration always starts with the duration type (1,2,4 etc), and then
-any optional multipliers/dots
-
-\subsection{Meters/groupings}
-
-A meter has this form:
-\begin{verbatim}
-\meter 3/4 ;
-\end{verbatim}
-
-Rhythmic grouping is a concept closely associated with this. For
-example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is
-entered as
-\begin{verbatim}
-\grouping 8*2 8*3 ;
-\end{verbatim}
-You can start the piece with a partial measure, the command takes the
-same syntax as grouping:
-\begin{verbatim}
-\partial 16*3 4;
-\end{verbatim}
-
-Make the piece start with a partial measure [english translation?]
-lasting 1 3/4 quarter notes.
-
-These commands are also "voice elements", and constitute simple mudela
-(consisting of stuff with duration 0).
-
\subsection{Examples}
Examples are included with the GNU LilyPond distribution. For the sake of
\section{History}
-This language has a number of roots. First and foremost, GNU LilyPond's
-predecessor mpp was the inspiration of simple Mudela. Secondly, the
-hierarchical structure looks a lot like Rayce's (Rayce is a raytracer
-that I've written as a hobby project. ), which in turn owes a lot to
-POVRay.
+This language has a number of roots. First and foremost, GNU
+LilyPond's predecessor mpp was the inspiration of the Note-mode input.
+Secondly, the hierarchical structure looks a lot like Rayce's (Rayce
+is a raytracer that I've written as a hobby project. ), which in turn
+owes a lot to POVRay.
Now, we know, musictypesetting and raytracing do not necessarily
require the same input format, and we know that a lot more ways exist
Daniel Taupin's now maintains the branch that still carries
the name MusiXTeX.
-=item OpusTeX, http://www.inf.ethz.ch/people/achermann/opustex
+=item OpusTeX, http://www.inf.ethz.ch/personal/achermann/
Andreas Egler's branch is called MusiXTeX.
Notation editor on Acorn machines. Their developers call it ``best
notation program available''.
+=item Ikarus,
+
+The music-engraving system described by [Wanske]
+
=item Finale
=item Score
is more than fifteen years and Amadeus has been running under
different Unix clones. It uses MIDI-keyboard input
-
-
=back
-
=head2 Unknown
=item MusE
-pl 15.jcn2
- - mf-to-table.in: generate mozarella metric info tables
- - autometric.mf: write metric info to mf logfile
+pl 16
+ - bf: doco about {Mus*,Opus}TeX
+ - ; optional after \musicidentifier
+ - bf: configure: MFDIR
+ - bf: String::operator bool () removed
+ - bf: String::operator char const * () removed
+ - bf: Line_spacer::~Line_spacer () added: plugged memleak
+ - bf: Line_of_score::do_unlink () call Spanner::do_unlink
+ - bf: rests in beams
+ - bfs: mudela-man
+ - bf: textnatural
+ - bf: 20 pt flags
+ - bf: longarest
+
pl 15.jcn1
- bf: typos whole and half notehead
- de-uglyfied bolletjes.mf
- ascii output of font metrics in mf logfile
+
+******
+sep 17
+
pl 15
- put top of NEWS file in the webpage
this modifies \stem for the c2
+ * Fix ledgerlines
+
* use properties for:
- Text_style
- default_octave
- Common Music Notation
- PostScript output (esp. Beams, Slurs, etc)
- Move all Score_elems, into libmutype.a
-
* Documentation
- Doc Mutopia (Music To The People)
IDEAS
+ * Output abstract data structures associated with
+Mudela.
* create libmudela, or liblily_frontend
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 15
+TOPLEVEL_PATCH_LEVEL = 16
# use to send patches, always empty for released version:
-TOPLEVEL_MY_PATCH_LEVEL = .jcn2
+TOPLEVEL_MY_PATCH_LEVEL =
-#!@PERL@ -w
-# stupid script to generate WWW site. -*-Perl-*-
+#!@PERL@ -w
+# -*-Perl-*-
+
+
+# stupid script to generate WWW site. The WWW site is my
+# test-suite for LilyPond, I usually don't distribute versions that
+# fail to make the website
use FileHandle;
use Getopt::Long;
$lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
# stupid checks.
- $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
-
-
+ $lily_version= $lily_version;
+
close V;
}
local $base="lilypond/";
-local @examples=("twinkle-pop", "twinkle", "multi", "wtk1-fugue2",
- #"standchen-16",
- #"standchen-20",
+local @examples=("twinkle-pop",
+ "wtk1-fugue2",
+ "standchen-16",
+ "standchen-20",
"wtk1-prelude1",
"toccata-fuga-E",
"scsii-menuetto",
- "cadenza", "scales",
- "rhythm",
- "gallina");
+ "cadenza",
+ "gallina",
+ "twinkle",
+ "collisions",
+ "scales",
+ "rhythm",
+ "multi" );
sub gen_html
+++ /dev/null
-#!@PERL@ -w
-# -*-perl-*-
-
-=head1 TODO
-
-rename me!
-
-Ugh . Perl sux. Anybody for Python?
-
-=cut
-
-$mf_to_table_version = 0.1;
-
-use Getopt::Long;
-
-sub last_conversion
-{
- my @v = &versions;
- return pop @v;
-}
-sub identify
-{
-
- print STDERR "This is mf-to-table " . $mf_to_table_version . "\n";
-}
-
-sub usage
-{
- print STDERR "Usage: mf-to-table [options] LOG..\n"
- . "Generate mozarella metrics table from preparated metafont log\n\n"
- . "Options:\n"
- . " -h, --help print this help\n"
- . " -o, --output=FILE name output file\n"
-}
-
-sub make_table
-{
- my $line;
- my $indent = 0;
- while ($line = <IN>) {
- if ($line =~ /^@@/) {
- $line =~ s/^@@(.*)@@/$1/;
- chop ($line);
- my @fields = split (/:/,$line);
- my $label = $fields [0];
- my $name = $fields [1];
- print OUT "\t" x $indent;
- if ($label eq "font") {
- print OUT "% $name=\\symboltables {\n";
- $indent++;
- } elsif ($label eq "group") {
- print OUT "\"$name\" = \\table {\n";
- $indent++;
- } elsif ($label eq "puorg") {
- print OUT "}\n";
- $indent--;
- } elsif ($label eq "tnof") {
- print OUT "% } % $name\n";
- $indent--;
- } elsif ($label eq "char") {
- my $c = $fields [2];
- my $w = $fields [3];
- my $h = $fields [4];
- my $d = $fields [5];
- my $id = $fields [6];
- my $texstr = $fields [7];
- print OUT sprintf( "\"%s\"\t\"\\%s\"\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\n", $id, $texstr, 0, $w, $h, $d );
- } else {
- print STDERR "mf-to-table: unknown label: \`$label\'\n";
- }
- }
- }
-}
-
-sub set_files
-{
- $infile = "-";
- $outfile = "-";
- $outfile = $opt_output if (defined($opt_output));
-
- if ($ARGV [0]) {
- $infile = $ARGV[0];
- }
- if (( ! -f $infile) && (! $infile =~ /\\.log$/s ) ){
- $infile .= ".log";
- }
- print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. \n";
-}
-
-sub do_one_arg
-{
- set_files;
-
- die "can't open \`$infile\'" unless open IN,$infile ;
- die "can't open \`$outfile\'" unless open OUT, ">$outfile";
- print OUT "% generated at " . localtime() . " from $infile\n";
- print OUT "% changes will be lost\n";
-
- make_table;
-
- close IN;
- close OUT;
-}
-
-## "main"
-
-identify;
-
-#GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
-GetOptions ("help", "output=s");
-
-if ($opt_help) {
- usage();
- $opt_help = 0; # to extinguish typo check.
- exit 0;
-}
-
-local ($infile,$outfile);
-my $processed_one=0;
-
-while (defined($ARGV[0])) {
- do_one_arg;
- shift @ARGV;
- $processed_one = 1;
-}
-do_one_arg unless ($processed_one);
-
tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)"
ac_help="$ac_help
tex-dir=DIR set the directory to put LilyPond TeX files in. "
+ac_help="$ac_help
+ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)"
ac_help="$ac_help
out-dir set the directory for machine generated files. Default out or out-HOST"
fi
-
+# Check whether --enable-mf-dir or --disable-mf-dir was given.
+if test "${enable_mf_dir+set}" = set; then
+ enableval="$enable_mf_dir"
+ MFDIR=$enableval
+else
+ MFDIR=auto
+fi
# Check whether --enable-out-dir or --disable-out-dir was given.
# 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:690: checking for $ac_word" >&5
+echo "configure:698: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:721: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 731 "configure"
+#line 739 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:755: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:763: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:760: checking whether we are using GNU C++" >&5
+echo "configure:768: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:784: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:792: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+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:814: checking for $ac_word" >&5
+echo "configure:822: 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
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:870: checking for a BSD compatible install" >&5
+echo "configure:878: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 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:924: checking for $ac_word" >&5
+echo "configure:932: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+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:958: checking for $ac_word" >&5
+echo "configure:966: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FIND'+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:1024: checking for $ac_word" >&5
+echo "configure:1032: 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:1058: checking for $ac_word" >&5
+echo "configure:1066: 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:1092: checking for $ac_word" >&5
+echo "configure:1100: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1124: checking for $ac_word" >&5
+echo "configure:1132: 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
# 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:1158: checking for $ac_word" >&5
+echo "configure:1166: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
-echo "configure:1194: checking TeX/MF root dir directory" >&5
+echo "configure:1202: checking TeX/MF root dir directory" >&5
find_root_prefix="$prefix"
else
find_texprefix=$TEXPREFIX
fi
+
+if test "x$MFDIR" = xauto; then
+
+
+
+ echo $ac_n "checking MF input directory""... $ac_c" 1>&6
+echo "configure:1243: checking MF input directory" >&5
+ find_dirdir=`(cd $find_texprefix;
+ $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
+
+
+ if test "x$find_dirdir" = x; then
+ find_dirdir="/source";
+
+ echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2
+ warn_b=yes
+
+ true
+ fi
+ MFDIR=$find_dirdir
+ echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
+
+ MFDIR="$TEXPREFIX/$MFDIR"
+
+fi
if test "x$TEXDIR" = xauto ; then
echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
-echo "configure:1235: checking TeX input directory" >&5
+echo "configure:1268: checking TeX input directory" >&5
find_dirdir=`(cd $find_texprefix;
$FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1338: checking how to run the C++ preprocessor" >&5
+echo "configure:1371: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 1351 "configure"
+#line 1384 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1376: checking for FlexLexer.h" >&5
+echo "configure:1409: 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 1381 "configure"
+#line 1414 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
[TEXDIR=$enableval],
[TEXDIR=auto] )
-AC_JUNK_ARGS( AC_ARG_ENABLE(mf-dir,
+AC_ARG_ENABLE(mf-dir,
[ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)],
[MFDIR=$enableval],
- [MFDIR=auto] ))
+ [MFDIR=auto])
AC_ARG_ENABLE(out-dir,
[ out-dir set the directory for machine generated files. Default out or out-HOST],
else
find_texprefix=$TEXPREFIX
fi
+
+if test "x$MFDIR" = xauto; then
+ AC_MF_SUBDIR(MFDIR)
+fi
if test "x$TEXDIR" = xauto ; then
AC_TEX_SUBDIR(TEXDIR)
+pl 31
+ - removed String::bool () [Sigh], String::operator char const *
pl 30
- Cpu_timer
pl 29
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 30
+PATCH_LEVEL = 31
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
if (local_silence_b_|| !os_l_)
return ;
- for (char const *cp = s ; *cp; cp++)
+ for (char const *cp = s.ch_C (); *cp; cp++)
switch (*cp)
{
case '{':
Scalar (Rational);
operator Rational();
Scalar() {}
- bool isnum();
+ bool isnum_b() const;
operator Real();
operator int();
Byte const* byte_C() const;
char* ch_l();
Byte* byte_l();
-
+#if 0
/// deprecated; use ch_C()
operator char const*() const { return ch_C(); }
-
+#endif
String &operator =(String const & source);
/// concatenate s
void operator += (char const* s) { strh_ += s; }
void operator += (String s);
- /// is the string empty?
- operator bool () const
+ bool empty_b () const;
+#if 0
+ /** is the string empty?
+
+ Ugh-ugh-thank-you-cygnus. W32 barfs on this
+ */
+ operator bool () const;
{
return length_i ();
}
+#endif
void append (String);
void prepend (String);
}
-Scalar::operator Rational()
+Scalar::operator Rational ()
{
int p = index_i ('/');
if (p == -1)
String s2 = right_str (len()-p-1);
String s1 = left_str (p);
- return Rational (s1.value_i(), s2.value_i ());
+ return Rational (s1.value_i (), s2.value_i ());
}
bool
-Scalar::isnum()
+Scalar::isnum_b () const
{
int conv = false;
- if (len())
+ if (len ())
{
long l =0;
- conv = sscanf (strh_.ch_C(), "%ld", &l);
+ conv = sscanf (strh_.ch_C (), "%ld", &l);
}
return len() && conv;
}
Scalar::operator Real()
{
- assert (isnum());
- return value_f();
+ assert (isnum_b ());
+ return value_f ();
}
Scalar::operator int()
if (!length_i ())
return 0; // ugh
- assert (isnum());
- return value_i();
+ assert (isnum_b());
+ return value_i ();
}
-Scalar::operator bool() const
+Scalar::operator bool () const
{
- if (!len())
+ if (!len ())
return false;
if (*this == "0")
return false;
String u (*this);
- if (u.upper_str() == "FALSE")
+ if (u.upper_str () == "FALSE")
return false;
return true;
}
return strh_.ch_l();
}
+bool
+String::empty_b () const
+{
+ return !length_i ();
+}
/**
Do a signed comparison, analogous to memcmp;
*/
find the substring.
@return
- index of leftmost occurrence of #searchfor#
+1 index of leftmost occurrence of #searchfor#
*/
int
String::index_i (String searchfor) const
else
{
name = fn;
- f = fopen (fn, "r");
+ f = fopen (fn.ch_C (), "r");
}
if (!f)
stemup = {
\skip 1*0;
% Stupid hack to make < { \stemup } > work
-% \property Thread.cocktailbar = 1
\property Voice.ydirection = \up
}
stemboth= {
\skip 1*0;
- % \property Thread.cocktailbar = 0
\property Voice.ydirection = \center
}
stemdown = {
\skip 1*0;
- %\property Thread.cocktailbar = -1
\property Voice.ydirection = \down
}
"tenor_change" "\caltoclef" 0.0\pt 11.2\pt 0.0\pt 16.0\pt
}
- % ugh what's our outdir called?
- \include "mf/out/font-en-tja16.ly"
+ "balls" = \table {
+ "-2" "\longaball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt
+ "-1" "\breveball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt
+ "0" "\wholeball" 0.0\pt 8.0\pt 0.0\pt 4.4\pt
+ "1" "\halfball" 0.0\pt 5.4\pt 0.0\pt 4.4\pt
+ "2" "\quartball" 0.0\pt 5.5\pt 0.0\pt 4.4\pt
+ }
"slur" = \table {
"whole" "\slurchar%{%}"
"half" "\hslurchar%{%}"
}
-
"accidentals" = \table {
"-2" "\flatflat" 0.0\pt 8.16\pt -2.5\pt 7.5\pt
"-1" "\flat" 0.0\pt 4.8\pt -2.5\pt 7.5\pt
"tenor_change" "\caltoclef" 0.0\pt 16.0\pt 0.0\pt 20.0\pt
}
- % ugh what's our outdir called?
- \include "mf/out/font-en-tja20.ly"
+ "balls" = \table {
+ "-1" "\breveball" 0.0\pt 7.5\pt -2.5\pt 2.5\pt
+ "0" "\wholeball" 0.0\pt 10.2\pt 0.0\pt 5.4\pt
+ "1" "\halfball" 0.0\pt 6.8\pt 0.0\pt 5.4\pt
+ "2" "\quartball" 0.0\pt 6.6\pt 0.0\pt 5.4\pt
+ }
"slur" = \table {
"whole" "\slurchar%{%}" 0.0\pt 0.0\pt 0.0\pt 0.0\pt
}
"flags" = \table {
- "8" "\eighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "16" "\sixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "32" "\thirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "64" "\sixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "128" "\hundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "-8" "\deighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "-16" "\dsixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "-32" "\dthirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "-64" "\dsixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
- "-128" "\dhundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "u3" "\eighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "u4" "\sixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "u5" "\thirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "u6" "\sixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "u7" "\hundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "d3" "\deighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "d4" "\dsixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "d5" "\dthirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "d6" "\dsixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
+ "d7" "\dhundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt
}
"beamslopes" = \table {
-%{MudelaHeader
-
- filename: collisions.ly
- title:
- description: random counterpoint to test collisions
- composer(s):
- entered-by: HWN,JCN
- copyright: public domain
-
- Tested Features:test the Collision resolution
-EndMudelaHeader
-%}
+\header{
+filename collisions.ly
+description random counterpoint to test collisions
+enteredby HWN,JCN
+copyright public domain
+Tested test the Collision resolution
+}
\version "0.1.6";
restsII = \melodic {
\octave c';
\multi 2 <
- { \stemup g' f' e' d' c' b a g f e d c }
- { \stemdown r r r r r r r r r r r r }
- >
+ { \stemup g' f' e' d' c' b a g f e d c }
+ { \stemdown r r r r r r r r r r r r }
+ >
\multi 2 <
- { \stemup r r r r r r r r r r r r }
- { \stemdown c d e f g a b c' d' e' f' g' }
- >
- r8 r4
- \multi 2 < r8 r8 >
- \multi 2 < r8 r8 r8 >
- \multi 2 < r8 r8 r8 r8 >
- \multi 2 < r r >
- \multi 2 < r r r >
- \stemup
- [c''8 r8 c''8 c''8]
- [c8 r8 c8 c8]
- \stemdown
- [c8 r8 c8 c8]
- [c''8 r8 c''8 c''8]
+ { \stemup r r r r r r r r r r r r }
+ { \stemdown c d e f g a b c' d' e' f' g' }
+ >
+ r8 r4
+ \multi 2 < r8 r8 >
+ \multi 2 < r8 r8 r8 >
+ \multi 2 < r8 r8 r8 r8 >
+ \multi 2 < r r >
+ \multi 2 < r r r >
+ \stemup
+ [c''8 r8 c''8 c''8]
+ [c8 r8 c8 c8]
+ \stemdown
+ [c8 r8 c8 c8]
+ [c''8 r8 c''8 c''8]
}
\score{
- { \two_voice \two_voice_steminvert
- \three_voice \rests \restsII }
+ { \two_voice
+ \two_voice_steminvert
+ \three_voice
+ \rests
+ %\restsII
+ }
--- /dev/null
+\header{
+filename standchen.ly
+title St\"andchen (Serenade) "Leise flehen meine Lieder"
+opus D. 957 No. 4
+composers Franz Schubert (1797-1828)
+ Text by Ludwig Rellstab (1799-1860)
+enteredby JCN
+copyright public domain
+
+}
+
+
+% just a silly file to satisfy the make-website script
+\include "standchen.ly"
--- /dev/null
+\header{
+filename standchen.ly
+title St\"andchen (Serenade) "Leise flehen meine Lieder"
+opus D. 957 No. 4
+composers Franz Schubert (1797-1828)
+ Text by Ludwig Rellstab (1799-1860)
+enteredby JCN
+copyright public domain
+}
+
+% just a silly file to satisfy the make-website script
+% this should be run after standchen-16
% 20pt music uses whole pagewidth
linewidth= 195.\mm;
- % we want gourlay, don't set geometric
- % geometric= 1.4;
gourlay_maxmeasures = 9.;
\output "standchen-20.out";
}
\paper{
% 16pt mustn't use whole page width
linewidth= 160.\mm;
- % we want gourlay, don't set geometric
- % geometric= 1.4;
gourlay_maxmeasures = 9.;
\output "standchen-16.out";
}
% these should be two separate scores...
\score{
- \multi 1 <
- \type Grandstaff \multi 3 <
- {\toccata_right \break \fuga2_right }
- { \toccata_left \break \fuga2_left }
+ <
+ \type Grandstaff \multi 3 <
+ { \toccata_right \break \fuga2_right }
+ { \toccata_left \break \fuga2_left }
>
- { \toccata_pedal \break \fuga2_pedal }
+ \type Staff { \toccata_pedal \break \fuga2_pedal }
>
\paper{}
\midi{
Source_file * sl = global_sources->get_file_l(s);
if (!sl)
{
- LexerError("Can't find file `" + s+ "'");
+ String msg ="Can't find file `" + s+ "'";
+ LexerError(msg.ch_C ());
return;
}
void
Mapped_file_storage::open(String name_str)
{
- fildes_i_ = ::open(name_str, O_RDONLY);
+ fildes_i_ = ::open(name_str.ch_C (), O_RDONLY);
if (fildes_i_ == -1)
{
let's hope that "b" opens anything binary, and does not apply
CR/LF translation
*/
- FILE * f = (s) ? fopen (s.ch_C(), "rb") : stdin;
+ FILE * f = (s.length_i ()) ? fopen (s.ch_C(), "rb") : stdin;
if (!f)
{
Music_iterator * mi = get_iterator_p (i.ptr());
if (mi->ok())
{
- if (!chord_C_->translator_type_str_)
+ if (chord_C_->translator_type_str_.empty_b ())
set_translator (mi->report_to_l()->ancestor_l (chord_C_->multi_level_i_));
children_p_list_.bottom().add (mi);
}
void
Clef_engraver::acknowledge_element (Score_elem_info info)
{
- if (info.elem_l_->name() == Bar::static_name () && clef_type_str_)
+ if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i())
{
create_clef();
if (!clef_req_l_)
Scalar def = get_property ("defaultclef");
if (def)
set_type (def);
- if (clef_type_str_)
+ if (clef_type_str_.length_i ())
create_clef();
clef_p_->default_b_ = false;
}
parse_dimen (String dim)
{
int i=dim.length_i()-1;
- char const *s = dim;
+ char const *s = dim.ch_C ();
while (i > 0 && (isspace (s[i]) || isalpha (s[i])))
{
i--;
for (int i= 0; i < children.size(); i++)
{
- children[i]->OK();
- if (i>0)
- assert (children[i-1]->interval().right ==
- children[i]->interval().left);
+ children[i]->OK();
+ if (i>0)
+ assert (children[i-1]->interval().right ==
+ children[i]->interval().left);
}
#endif
}
Rhythmic_grouping::interval() const
{
if (interval_)
- return *interval_;
+ return *interval_;
else
- return
- MInterval (children[0]->interval().left,
- children.top()->interval ().right);
+ return
+ MInterval (children[0]->interval().left,
+ children.top()->interval ().right);
}
void
Rhythmic_grouping::split (Rhythmic_grouping r)
{
if (interval_)
- return ;
+ return ;
r.intersect (interval());
split (r.intervals());
for (int i= 0; i < children.size(); i++)
{
- if (!children[i]->interval_)
- {
- Rhythmic_grouping here (r);
- children[i]->split (here);
- }
+ if (!children[i]->interval_)
+ {
+ Rhythmic_grouping here (r);
+ children[i]->split (here);
+ }
}
}
Array<MInterval> r;
if (interval_ || children.size() == 1)
{
- MInterval i (interval());
- MInterval r1(i), r2(i);
- r1.right = r2.left = i.center();
- r.push (r1); r.push (r2);
+ MInterval i (interval());
+ MInterval r1(i), r2(i);
+ r1.right = r2.left = i.center();
+ r.push (r1); r.push (r2);
}
else
{
- for (int i=0; i < children.size(); i++)
- r.push (children[i]->interval());
+ for (int i=0; i < children.size(); i++)
+ r.push (children[i]->interval());
}
return r;
}
{
if (interval_)
{
- interval_->intersect (t);
- return;
+ interval_->intersect (t);
+ return;
}
for (int i=0; i < children.size(); i++)
{
- MInterval inter = intersection (t, children[i]->interval());
- if (inter.empty_b() || inter.length () <= Rational (0))
- {
- delete children[i];
- children[i] =0;
- }
- else
- {
- children[i]->intersect (t);
- }
+ MInterval inter = intersection (t, children[i]->interval());
+ if (inter.empty_b() || inter.length () <= Rational (0))
+ {
+ delete children[i];
+ children[i] =0;
+ }
+ else
+ {
+ children[i]->intersect (t);
+ }
}
for (int i=0; i < children.size();)
{
- if (!children[i])
- children.del (i);
- else
- i++;
+ if (!children[i])
+ children.del (i);
+ else
+ i++;
}
}
Array<Rhythmic_grouping*> ch;
while (1)
{
- if (i >= children.size() || j >= splitpoints.size ())
- break;
+ if (i >= children.size() || j >= splitpoints.size ())
+ break;
- assert (
- children[starti]->interval().left== splitpoints[startj].left);
- if (children[i]->interval().right < splitpoints[j].right)
- {
- i ++;
- }
- else if (children[i]->interval().right > splitpoints[j].right)
- {
- j ++;
- }
- else
- {
-
- if (i == starti)
- {
- ch.push (children[i]);
- }
- else
- {
- Rhythmic_grouping *newchild=new Rhythmic_grouping (
- children.slice (starti, i+1));
-
- ch.push (newchild);
- }
- i ++;
- j++;
- starti = i;
- startj = j;
-
-
- }
+ assert (
+ children[starti]->interval().left== splitpoints[startj].left);
+ if (children[i]->interval().right < splitpoints[j].right)
+ {
+ i ++;
+ }
+ else if (children[i]->interval().right > splitpoints[j].right)
+ {
+ j ++;
+ }
+ else
+ {
+
+ if (i == starti)
+ {
+ ch.push (children[i]);
+ }
+ else
+ {
+ Rhythmic_grouping *newchild=new Rhythmic_grouping (
+ children.slice (starti, i+1));
+
+ ch.push (newchild);
+ }
+ i ++;
+ j++;
+ starti = i;
+ startj = j;
+
+
+ }
}
if (ch.size() != 1)
- children = ch;
- }
+ children = ch;
+}
Rhythmic_grouping::Rhythmic_grouping (MInterval t, int n)
init();
if (n == 1 || !n)
{
- interval_ = new MInterval (t);
- return;
+ interval_ = new MInterval (t);
+ return;
}
Moment dt = t.length()/Rational (n);
MInterval basic = MInterval (t.left, t.left+dt);
for (int i= 0; i < n; i++)
- children.push (new Rhythmic_grouping (dt*Rational (i) + basic));
+ children.push (new Rhythmic_grouping (dt*Rational (i) + basic));
}
{
interval_ = (s.interval_)? new MInterval (*s.interval_) : 0;
for (int i=0; i < s.children.size(); i++)
- children.push (new Rhythmic_grouping (*s.children[i]));
+ children.push (new Rhythmic_grouping (*s.children[i]));
}
void
{
delete interval_;
for (int i=0; i < children.size(); i++)
- delete children[i];
+ delete children[i];
init();
}
#ifndef NPRINT
DOUT << "{ \n";
if (interval_)
- DOUT <<" Interval "<< interval_->str();
+ DOUT <<" Interval "<< interval_->str();
for (int i=0; i < children.size(); i++)
{
- children[i]->print();
+ children[i]->print();
}
DOUT << "}\n";
#endif
Rhythmic_grouping::child_fit_b (Moment start)
{
if (children.size())
- return (children.top()->interval ().right== start);
+ return (children.top()->interval ().right== start);
return true;
}
{
int i = 1000; // ugh
for (int j = 0 ; j < v.size(); j++)
- i = i <? v[j];
+ i = i <? v[j];
return i;
}
Array< Array<int> > children_beams;
for (int i=0; i < children.size(); i++)
{
- Array<int> child_beams;
- if (children[i]->interval_)
- {
- int f = flags[flagidx++];
- child_beams.push (f);
- }
- else
- {
- child_beams = children[i]->
- generate_beams (flags, flagidx);
- }
- children_beams.push (child_beams);
+ Array<int> child_beams;
+ if (children[i]->interval_)
+ {
+ int f = flags[flagidx++];
+ child_beams.push (f);
+ }
+ else
+ {
+ child_beams = children[i]->
+ generate_beams (flags, flagidx);
+ }
+ children_beams.push (child_beams);
}
Array<int> beams;
int lastm, m, nextm;
for (int i=0; i < children_beams.size(); i++)
{
- bool add_left = (i >0);
- bool add_right = (i < children_beams.size() -1);
+ bool add_left = (i >0);
+ bool add_right = (i < children_beams.size() -1);
- if (!i)
- m = min_elt (children_beams[i]);
- if (add_right)
- nextm = min_elt (children_beams[i+1]);
+ if (!i)
+ m = min_elt (children_beams[i]);
+ if (add_right)
+ nextm = min_elt (children_beams[i+1]);
- if (children_beams[i].size() == 1)
- {
- if (add_right)
- beams.push (m);
- if (add_left)
- beams.push (m);
- }
- else
- {
- if (add_left)
- beams.push (lastm <? m);
- beams.concat (children_beams[i]);
- if (add_right)
- beams.push (m <? nextm);
- }
- lastm = m;
- m = nextm;
+ if (children_beams[i].size() == 1)
+ {
+ if (add_right)
+ beams.push (m);
+ if (add_left)
+ beams.push (m);
+ }
+ else
+ {
+ if (add_left)
+ beams.push (lastm <? m);
+ beams.concat (children_beams[i]);
+ if (add_right)
+ beams.push (m <? nextm);
+ }
+ lastm = m;
+ m = nextm;
}
assert (!(beams.size()%2));
return beams;
Rhythmic_grouping::translate (Moment m)
{
if (interval_)
- *interval_ += m;
+ *interval_ += m;
else
- for (int i=0; i < children.size(); i++)
- children[i]->translate (m);
+ for (int i=0; i < children.size(); i++)
+ children[i]->translate (m);
}
void
assert (m.left >= interval().left);
while (m.right >interval().right)
{
- Array<Rhythmic_grouping*> a (children);
- for (int i=0; i < a.size(); i++)
- {
- a[i] =new Rhythmic_grouping (*children[i]);
- a[i]->translate (children.top()->interval ().right);
- }
- ((Rhythmic_grouping*)this)->children.concat (a);
+ Array<Rhythmic_grouping*> a (children);
+ for (int i=0; i < a.size(); i++)
+ {
+ a[i] =new Rhythmic_grouping (*children[i]);
+ a[i]->translate (children.top()->interval ().right);
+ }
+ ((Rhythmic_grouping*)this)->children.concat (a);
}
assert (m.right <= interval().right);
OK();
Array<Rhythmic_grouping*> children;
for (int i=0; i < beat_i_arr.size(); i++)
{
- Moment last = here;
- here += elt_length_arr[i] * Moment (beat_i_arr[i]);
- children.push (
- new Rhythmic_grouping (MInterval (last, here),
- beat_i_arr[i]));
+ Moment last = here;
+ here += elt_length_arr[i] * Moment (beat_i_arr[i]);
+ children.push (
+ new Rhythmic_grouping (MInterval (last, here),
+ beat_i_arr[i]));
}
return Rhythmic_grouping (children);
}
struct Rest;
struct Rest_collision;
struct Rest_collision_engraver;
-struct Rest_column;
struct Rest_req;
struct Rhythmic_grouping;
struct Rhythmic_head;
{
public:
- Paper_def * paper_l_;
- Paper_def *paper_l() const;
- Line_spacer();
+ Paper_def * paper_l_;
+ Paper_def *paper_l() const;
+ Line_spacer();
- /** solve the spacing problem
- */
- virtual void solve (Col_hpositions *) const=0;
+ /** solve the spacing problem
+ */
+ virtual void solve (Col_hpositions *) const=0;
- /**
- Approximate the spacing problem:
- return a lower bound on the energy
- */
- virtual void lower_bound_solution (Col_hpositions *) const=0;
+ /**
+ Approximate the spacing problem:
+ return a lower bound on the energy
+ */
+ virtual void lower_bound_solution (Col_hpositions *) const=0;
- /** add a col to the problem. columns have to be added left to
- right. The column contains info on it's minimum width. */
- virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0;
+ /** add a col to the problem. columns have to be added left to
+ right. The column contains info on it's minimum width. */
+ virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0;
- /**
- can the posed problem be solved?
+ /**
+ can the posed problem be solved?
- @pre
+ @pre
- prepare() was called
+ prepare() was called
- */
- virtual bool check_constraints (Vector v) const=0;
+ */
+ virtual bool check_constraints (Vector v) const=0;
- /**
- generate a solution which can't fail
- */
- virtual Vector default_solution() const=0;
+ /**
+ generate a solution which can't fail
+ */
+ virtual Vector default_solution() const=0;
- virtual void OK() const{}
- virtual void print() const{}
+ virtual void OK() const{}
+ virtual void print() const{}
- /**
- Call after construction before solving
- */
- virtual void prepare(){}
+ /**
+ Call after construction before solving
+ */
+ virtual void prepare(){}
+ virtual ~Line_spacer ();
};
#endif
Stem ();
/// ensure that this Stem also encompasses the Notehead #n#
- void add (Note_head*n);
- void add (Rest*);
+ void add (Rhythmic_head*n);
DECLARE_MY_RUNTIME_TYPEINFO;
void
Item::do_unlink()
{
+ Link_array<Spanner> attached = attached_span_l_arr_;
+
for (int i=0; i < attached_span_l_arr_.size (); i++) {
Spanner *&s= attached_span_l_arr_[i];
if (s->spanned_drul_[LEFT] == this)
#include "parseconstruct.hh"
#include "main.hh"
#include "identifier.hh"
-void strip_trailing_white(String&);
-void strip_leading_white(String&);
+void strip_trailing_white (String&);
+void strip_leading_white (String&);
#define start_quote() \
- yy_push_state(quote);\
+ yy_push_state (quote);\
yylval.string = new String
#define yylval (*(YYSTYPE*)lexval_l)
-#define YY_USER_ACTION add_lexed_char(YYLeng());
+#define YY_USER_ACTION add_lexed_char (YYLeng ());
%}
%option c++
<notes,incl,INITIAL,lyrics>{
"%{" {
- yy_push_state(longcomment);
+ yy_push_state (longcomment);
}
%[^{\n].*\n {
}
}
"%"+"}" {
- yy_pop_state();
+ yy_pop_state ();
}
<<EOF>> {
- LexerError("EOF found inside a comment");
- if (! close_input())
- yyterminate(); // can't move this, since it actually rets a YY_NULL
+ LexerError ("EOF found inside a comment");
+ if (! close_input ())
+ yyterminate (); // can't move this, since it actually rets a YY_NULL
}
}
<header>{
[\{\}] {
- return YYText()[0];
+ return YYText ()[0];
}
^{WORD} {
- String s=YYText();
- yylval.string = new String(s);
+ String s=YYText ();
+ yylval.string = new String (s);
return FIELDNAME;
}
{HORIZONTALWHITE}+{BLACK}.*\n {
- String s=YYText();
- strip_leading_white(s);
- strip_trailing_white(s);
- yylval.string = new String(s);
+ String s=YYText ();
+ strip_leading_white (s);
+ strip_trailing_white (s);
+ yylval.string = new String (s);
return RECORDLINE;
}
{WHITE}* {
}
. {
- return YYText()[0];
+ return YYText ()[0];
}
}
<notes,INITIAL,lyrics>\\include {
- yy_push_state(incl);
+ yy_push_state (incl);
}
<incl>\"[^"]*\" { /* got the include file name */
- String s (YYText()+1);
- s = s.left_str(s.length_i()-1);
+ String s (YYText ()+1);
+ s = s.left_str (s.length_i ()-1);
DOUT << "#include `" << s << "\'\n";
- new_input(s,source_l_g);
- yy_pop_state();
+ new_input (s,source_l_g);
+ yy_pop_state ();
}
<incl>\"[^"]* { // backup rule
cerr << "missing end quote" << endl;
- exit( 1 );
+ exit (1);
}
<notes>{RESTNAME} {
- const char *s = YYText();
+ const char *s = YYText ();
yylval.string = new String (s);
DOUT << "rest:"<< yylval.string;
return RESTNAME;
}
<INITIAL,lyrics,notes>\\\${BLACK}*{WHITE} {
- String s=YYText() + 2;
- s=s.left_str(s.length_i() - 1);
- return scan_escaped_word(s);
+ String s=YYText () + 2;
+ s=s.left_str (s.length_i () - 1);
+ return scan_escaped_word (s);
}
<INITIAL,lyrics,notes>\${BLACK}*{WHITE} {
- String s=YYText() + 1;
- s=s.left_str(s.length_i() - 1);
- return scan_bare_word(s);
+ String s=YYText () + 1;
+ s=s.left_str (s.length_i () - 1);
+ return scan_bare_word (s);
}
<INITIAL,lyrics,notes>\\\${BLACK}* { // backup rule
cerr << "white expected" << endl;
- exit( 1 );
+ exit (1);
}
<INITIAL,lyrics,notes>\${BLACK}* { // backup rule
cerr << "white expected" << endl;
- exit( 1 );
+ exit (1);
}
<notes>{
{ALPHAWORD}/\' {
post_quotes_b_ = true;
- return scan_bare_word(YYText());
+ return scan_bare_word (YYText ());
}
\'+ {
- yylval.i = YYLeng();
+ yylval.i = YYLeng ();
if (post_quotes_b_) {
post_quotes_b_ = false;
return POST_QUOTES;
return PRE_QUOTES;
}
{ALPHAWORD} {
- return scan_bare_word(YYText());
+ return scan_bare_word (YYText ());
}
{NOTECOMMAND} {
- return scan_escaped_word(YYText()+1);
+ return scan_escaped_word (YYText ()+1);
}
{INT} {
- yylval.i = String_convert::dec2_i( String( YYText() ) );
+ yylval.i = String_convert::dec2_i (String (YYText ()));
return INT;
}
\" {
- start_quote();
+ start_quote ();
}
}
\" {
- start_quote();
+ start_quote ();
}
<quote>{
\\\\ {
*yylval.string +='\"';
}
[^"]+ {
- *yylval.string += YYText();
+ *yylval.string += YYText ();
}
\" {
DOUT << "quoted string: `" << *yylval.string << "'\n";
- yy_pop_state();
+ yy_pop_state ();
return STRING;
}
}
<lyrics>{
\" {
- start_quote();
+ start_quote ();
}
{INT} {
- yylval.i = String_convert::dec2_i( String( YYText() ) );
+ yylval.i = String_convert::dec2_i (String (YYText ()));
return INT;
}
{NOTECOMMAND} {
- return scan_escaped_word(YYText()+1);
+ return scan_escaped_word (YYText ()+1);
}
{LYRICS} {
/* ugr. This sux. */
- String s (YYText());
+ String s (YYText ());
int i = 0;
- while ((i=s.index_i("_")) != -1) // change word binding "_" to " "
- *(s.ch_l() + i) = ' ';
- if ((i=s.index_i("\\,")) != -1) // change "\," to TeX's "\c "
+ while ((i=s.index_i ("_")) != -1) // change word binding "_" to " "
+ *(s.ch_l () + i) = ' ';
+ if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c "
{
- *(s.ch_l() + i + 1) = 'c';
- s = s.left_str(i+2) + " " + s.right_str(s.length_i()-i-2);
+ *(s.ch_l () + i + 1) = 'c';
+ s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2);
}
- yylval.string = new String(s);
+ yylval.string = new String (s);
DOUT << "lyric : `" << s << "'\n";
return STRING;
}
. {
- return yylval.c = YYText()[0];
+ return yylval.c = YYText ()[0];
}
}
<<EOF>> {
DOUT << "<<eof>>";
- if (! close_input()) {
- yyterminate(); // can't move this, since it actually rets a YY_NULL
+ if (! close_input ()) {
+ yyterminate (); // can't move this, since it actually rets a YY_NULL
}
}
{WORD} {
- return scan_bare_word(YYText());
+ return scan_bare_word (YYText ());
}
{KEYWORD} {
- return scan_escaped_word(YYText()+1);
+ return scan_escaped_word (YYText ()+1);
}
{REAL} {
Real r;
- int cnv=sscanf (YYText(), "%lf", &r);
- assert(cnv == 1);
+ int cnv=sscanf (YYText (), "%lf", &r);
+ assert (cnv == 1);
DOUT << "REAL" << r<<'\n';
yylval.real = r;
return REAL;
}
{INT} {
- yylval.i = String_convert::dec2_i( String( YYText() ) );
+ yylval.i = String_convert::dec2_i (String (YYText ()));
return INT;
}
[{}] {
DOUT << "parens\n";
- return YYText()[0];
+ return YYText ()[0];
}
[*:=] {
- char c = YYText()[0];
+ char c = YYText ()[0];
DOUT << "misc char" <<c<<"\n";
return c;
}
<INITIAL,notes>. {
- return yylval.c = YYText()[0];
+ return yylval.c = YYText ()[0];
}
<INITIAL,lyrics,notes>\\. {
- char c= YYText()[1];
+ char c= YYText ()[1];
yylval.c = c;
switch (c) {
case '>':
}
<*>. {
- LexerError( String( "illegal character: " ) +String( YYText()[0] ));
- return YYText()[0];
+ String msg= String ("illegal character: ") +String (YYText ()[0]);
+ LexerError (msg.ch_C ());
+ return YYText ()[0];
}
%%
void
-My_lily_lexer::push_note_state()
+My_lily_lexer::push_note_state ()
{
- yy_push_state(notes);
+ yy_push_state (notes);
}
void
-My_lily_lexer::push_lyric_state()
+My_lily_lexer::push_lyric_state ()
{
- yy_push_state(lyrics);
+ yy_push_state (lyrics);
}
void
-My_lily_lexer::pop_state()
+My_lily_lexer::pop_state ()
{
- yy_pop_state();
+ yy_pop_state ();
}
int
-My_lily_lexer::scan_escaped_word(String str)
+My_lily_lexer::scan_escaped_word (String str)
{
DOUT << "\\word: `" << str<<"'\n";
- int l = lookup_keyword(str);
+ int l = lookup_keyword (str);
if (l != -1) {
DOUT << "(keyword)\n";
return l;
}
- Identifier * id = lookup_identifier(str);
+ Identifier * id = lookup_identifier (str);
if (id) {
DOUT << "(identifier)\n";
yylval.id = id;
return id->token_code_i_;
}
- if ( YYSTATE != notes ) {
- Melodic_req * mel_l = lookup_melodic_req_l(str);
+ if (YYSTATE != notes) {
+ Melodic_req * mel_l = lookup_melodic_req_l (str);
if (mel_l) {
DOUT << "(notename)\n";
yylval.melreq = mel_l;
return NOTENAME_ID;
}
}
- LexerError( "Unknown escaped string: `" + str + "'");
+ String msg ("Unknown escaped string: `" + str + "'");
+ LexerError (msg.ch_C ());
DOUT << "(string)";
- String *sp = new String( str);
+ String *sp = new String (str);
yylval.string=sp;
return STRING;
}
int
-My_lily_lexer::scan_bare_word(String str)
+My_lily_lexer::scan_bare_word (String str)
{
DOUT << "word: `" << str<< "'\n";
if (YYSTATE == notes){
- Melodic_req * mel_l = lookup_melodic_req_l(str);
+ Melodic_req * mel_l = lookup_melodic_req_l (str);
if (mel_l) {
DOUT << "(notename)\n";
yylval.melreq = mel_l;
}
}
- yylval.string=new String( str );
+ yylval.string=new String (str);
return STRING;
}
bool
-My_lily_lexer::note_state_b() const
+My_lily_lexer::note_state_b () const
{
return YY_START == notes;
}
bool
-My_lily_lexer::lyric_state_b() const
+My_lily_lexer::lyric_state_b () const
{
return YY_START == lyrics;
}
void
-My_lily_lexer::push_header_state()
+My_lily_lexer::push_header_state ()
{
- yy_push_state(header);
+ yy_push_state (header);
}
-void strip_trailing_white(String&s)
+void strip_trailing_white (String&s)
{
int i=0;
- for (; i < s.length_i(); i++)
- if (!isspace(s[i]))
+ for (; i < s.length_i (); i++)
+ if (!isspace (s[i]))
break;
- s = s.nomid_str(0, i);
+ s = s.nomid_str (0, i);
}
-void strip_leading_white(String&s)
+void strip_leading_white (String&s)
{
- int i=s.length_i();
+ int i=s.length_i ();
while (i--)
- if (!isspace(s[i]))
+ if (!isspace (s[i]))
break;
- s = s.left_str(i+1);
+ s = s.left_str (i+1);
}
{
return paper_l_ ;
}
+
+Line_spacer::~Line_spacer ()
+{
+}
void
do_one_file (String init_str, String file_str)
{
- if (init_str && "" == path.find (init_str))
+ if (init_str.length_i () && path.find (init_str).empty_b ())
{
error ("Can not find `" + init_str +"\'");
return ;
}
- if (file_str && !path.find (file_str))
+ if (file_str.length_i () && path.find (file_str).empty_b ())
{
error ("Can not find `" + file_str + "'");
return ;
split_path (name_str_r,a,b,c,d);
// add extension if not present.
- if (!d)
+ if (d.empty_b ())
d = ".ly";
name_str_r = a+b+c+d;
}
void
Midi_stream::open()
{
- os_p_ = new ofstream (filename_str_);
+ os_p_ = new ofstream (filename_str_.ch_C ());
if (!*os_p_)
error ("can't open `" + filename_str_ + "\'");
}
else if (m->is_type_b (Change_translator::static_name ()))
p = new Change_iterator((Change_translator*) m);
- if (m -> translator_type_str_)
+ if (m -> translator_type_str_.length_i ())
{
Translator_group* a =report_l->
find_create_translator_l (m-> translator_type_str_, m->translator_id_str_);
if (! check_debug)
return ;
DOUT << name() << "{";
- if (translator_type_str_)
+ if (translator_type_str_.length_i ())
DOUT << translator_type_str_ << " = " << translator_id_str_;
do_print();
DOUT << "}\n";
Absolute_dynamic_req::loudness_str () const
{
String s = loudness_static_str (loudness_);
- if (!s)
+ if (s.empty_b ())
{
s = "mf";
warning (String ("Never heard of dynamic scale ")
int
My_lily_lexer::lookup_keyword (String s)
{
- return keytable_p_->lookup (s);
+ return keytable_p_->lookup (s.ch_C ());
}
Identifier*
Tex_outputter::output_molecule (Molecule const*m, Offset o)
{
String t = m->TeX_string();
- if (!t)
+ if (t.empty_b ())
return ;
String s ("\\placebox{%}{%}{%}");
{
// output
String outname = paper_l_->outfile_str_ ;
- if (!outname)
+ if (outname.empty_b ())
outname = default_out_str_+ ".tex";
*mlog << "TeX output to " << outname << " ...\n";
| Chord { $$ = $1; }
| transposed_music { $$ = $1; }
| MUSIC_IDENTIFIER { $$ = $1->music (); }
+ | MUSIC_IDENTIFIER ';' { $$ = $1->music (); }
| MELODIC
{ THIS->lexer_p_->push_note_state (); }
Music
print ();
String out=midi_l_->outfile_str_;
- if (!out)
+ if (out.empty_b ())
out = default_out_str_ + ".midi";
Midi_stream midi_stream (out);
void
Property_iterator::process_and_next (Moment m)
{
- if (property_l_->var_str_)
+ if (property_l_->var_str_.length_i ())
report_to_l ()->set_property (property_l_->var_str_, property_l_->value_);
Music_iterator::process_and_next (m);
}
void
Line_of_score::do_unlink ()
{
+ Spanner::do_unlink ();
for (int i=0; i < cols.size (); i++)
cols[i]->line_l_ =0;
cols.set_size (0);
}
else
{
- if (!type_str_)
+ if (type_str_.empty_b ())
type_str_ = spanning_l_arr_[0]->type_str_;
- if (!type_str_)
+ if (type_str_.empty_b ())
{
transparent_b_=true;
set_empty (true);
void
Spanner::set_bounds(Direction d, Item*i)
{
-
if (spanned_drul_[d])
spanned_drul_[d]->attached_span_l_arr_.substitute(this,0);
void
Spanner::do_unlink()
{
- if (spanned_drul_[LEFT])
- {
- spanned_drul_[LEFT]->attached_span_l_arr_.substitute (this,0);
- spanned_drul_[LEFT] =0;
- }
- if (spanned_drul_[RIGHT])
- {
- spanned_drul_[RIGHT]->attached_span_l_arr_.substitute (this,0);
- spanned_drul_[RIGHT] = 0;
- }
+ set_bounds (LEFT, 0);
+ set_bounds (RIGHT, 0);
}
void
Stem_engraver::do_creation_processing ()
{
Scalar prop = get_property ("abbrev");
- if (prop && prop.isnum ())
+ if (prop.isnum_b ())
{
default_abbrev_i_ = prop;
}
void
Stem_engraver::acknowledge_element(Score_elem_info i)
{
- if (i.elem_l_->is_type_b (Note_head::static_name()))
+ if (i.elem_l_->is_type_b (Rhythmic_head::static_name()))
{
- Note_head *h = (Note_head*) i.elem_l_->item();
+ Rhythmic_head *h = (Rhythmic_head*) i.elem_l_->item();
if (!stem_p_)
{
Rhythmic_req * r = i.req_l_->musical()->rhythmic();
t = default_abbrev_i_;
else
default_abbrev_i_ = t;
- stem_p_->abbrev_flag_i_ = intlog2 (t) - (durlog_i>? 2);
+ stem_p_->abbrev_flag_i_ =intlog2 (t) - (durlog_i>? 2);
}
announce_element (Score_elem_info (stem_p_, r));
}
{
if (stem_p_)
{
- dir_ = (Direction) int(get_property ("ydirection"));
+ Scalar prop = get_property ("ydirection");
+ dir_ = prop.isnum_b () ? int(prop) : CENTER;
if (dir_)
stem_p_->dir_ = dir_;
}
void
-Stem::add (Note_head *n)
+Stem::add (Rhythmic_head *n)
{
- n->add_dependency (this);
- head_l_arr_.push (n);
-}
-
-void
-Stem::add (Rest *r)
-{
- rest_l_arr_.push (r);
- r->add_dependency (this); // ?
+ n->add_dependency (this); // ?
+ if (n->is_type_b (Note_head::static_name ()))
+ {
+ head_l_arr_.push ((Note_head*)n);
+ }
+ else if (n->is_type_b (Rest::static_name ()))
+ {
+ rest_l_arr_.push ((Rest*)n);
+ }
}
bool
if (dir_ == UP)
stem_xdir_ = RIGHT;
- if (head_l_arr_[0]->balltype_i_ <= 0)
+ if (invisible_b ())
stem_xdir_ = CENTER;
}
return note_delta_f () +Item::hpos_f ();
}
-
+/*
+TODO: head_l_arr_/rest_l_arr_ in do_substitute_dependent ()
+ */
void
Stem::do_substitute_dependency (Score_elem*o,Score_elem*n)
{
Tex_stream::Tex_stream (String filename)
{
- os = new ofstream (filename);
+ os = new ofstream (filename.ch_C ());
if (!*os)
error ("can't open `" + filename+"\'");
nest_level = 0;
Tex_stream::operator<<(String s)
{
- for (char const *cp = s; *cp; cp++)
+ for (char const *cp = s.ch_C (); *cp; cp++)
{
if (outputting_comment)
{
{
Moment m = tr_l->partial()->duration_;
String error = time_.try_set_partial_str (m);
- if (error)
+ if (error.length_i ())
{
tr_l->warning (error);
}
Translator_group *
Translator_group::find_existing_translator_l (String n, String id)
{
- if (is_alias_b (n) && (id_str_ == id || !id))
+ if (is_alias_b (n) && (id_str_ == id || id.empty_b ()))
return this;
Translator_group* r = 0;
for (int i =0; !r && i < group_l_arr ().size(); i++)
}
else
{
- if (id_str_)
+ if (id_str_.length_i ())
DOUT << "ID: " << id_str_ ;
DOUT << " iterators: " << iterator_count_<< "\n";
}
Begin3
Title: LilyPond
-Version: 0.1.15
-Entered-date: 17SEP97
+Version: 0.1.16
+Entered-date: 18SEP97
Description: LilyPond is the GNU Project music typesetter. This
program converts music definition files into
visual or auditive output: it can typeset formatted
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps
- 395k lilypond-0.1.15.tar.gz
+ 395k lilypond-0.1.16.tar.gz
Original-site: pcnov095.win.tue.nl /pub/lilypond/
- 395k lilypond-0.1.15.tar.gz
+ 395k lilypond-0.1.16.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 0.1.15
+Version: 0.1.16
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.15.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.16.tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
EXTRA_DISTFILES = $(MFFILES) $(TEXFILES) TODO
#
-FONT_FILES = $(wildcard *[0-9].mf)
-TABLES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.ly))
-#
-
-all: $(TABLES)
-
-localclean:
- rm -f $(TABLES)
-
-$(outdir)/%.log: %.mf
- mf $<
- mv $(@F) $@
- rm $(shell basename $< .mf).*gf
-
-$(outdir)/%.ly: $(outdir)/%.log
- mf-to-table -o $@ $<
-
localinstall:
$(INSTALL) -d $(MFDIR)/lilypond
$(INSTALL) -m 644 $(MFFILES) $(MFDIR)/lilypond/
+
- add r to dynfont
- move to OpusTeX fonts
- make own font-en-tja{10,11,13,16,20} files
-% autometric.mf
+% metric.mf
% part of LilyPond's pretty-but-neat music font
-% font or database?
def fet_beginfont(expr name,size) =
message "@@font:"&name&":"&decimal size&"@@";
message "";
enddef;
-
-def fet_endfont(expr name) =
- message "@@tnof:"&name&"@@";
- message "";
- enddef;
-
-% group or table?
-def fet_begingroup(expr name) =
- message "@@group:"&name&"@@";
- message "";
- enddef;
-
-def fet_endgroup(expr name) =
- message "@@puorg:"&name&"@@";
- message "";
- enddef;
-def fet_beginchar(expr code,w,h,d,name,id,texstr) =
- message "@@char:"&name&":"&decimal code&":"&decimal w&":"&decimal h&":"&decimal d&":"&id&":"&texstr&"@@";
+def fet_beginchar(expr code,w,h,d,name) =
+ message "@@char:"&name&":"&decimal code&":"&decimal w&":"&decimal h&":"&decimal d&"@@";
beginchar(code,w,h,d) name;
enddef;
save b_h,a_w;
enddef;
-def end_notehead(expr code,interline,name,id,texstr) =
+def end_notehead(expr code,interline,name) =
save a,b,h,w,ai,bi;
h#=interline;
2b#=h#*b_h;
define_pixels(a,b);
define_pixels(w,h);
define_pixels(ai,bi);
- fet_beginchar(code,w#,h#,0,name,id,texstr);
+ fet_beginchar(code,w#,h#,0,name);
path black,white;
black=distorted_ellipse(a,b,a*err_y_a,0,super);
white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,superi);
endgroup;
enddef;
-% fet_begingroup("noteheads");
-fet_begingroup("balls");
% whole note
% Wanske, p.38
% begin_notehead(incr code,interline#,"Whole notehead");
superi:=0.69;
b_h:=1; %no rotate-> no height correction
a_w:=1; % no rotate-> no width correction
- end_notehead(incr code,interline#,"Whole notehead","0","wholeball");
+ end_notehead(incr code,interline#,"Whole notehead");
% half note
% Wanske, p.39
superi:=0.80;
b_h:=0.935;
a_w:=1.12;
- end_notehead(incr code,interline#,"Half notehead","1","halfball");
+ end_notehead(incr code,interline#,"Half notehead");
% quarter note
% Wanske p.38
superi:=0.707;
b_h:=0.85;
a_w:=1.09;
- end_notehead(incr code,interline#,"Quarter notehead","2","quartball");
+ end_notehead(incr code,interline#,"Quarter notehead");
-% silly tableXX.ly fillers, for now
-fet_beginchar(incr code,2interline#,interline#,0,"Longa notehead","-2","longaball");
-endchar;
-fet_beginchar(incr code,2interline#,interline#,0,"Brevis notehead","-1","breveball");
-endchar;
-
-fet_endgroup("noteheads");
+end.
mode_setup;
font_setup;
-input autometric;
-fet_beginfont("dyn", 10);
-
num=-1;
input ital-f;
input ital-z;
font_slant slant; font_x_height x_height#;
-
-fet_endfont("dyn");
-end.
+bye.
mode_setup;
+
test:=0;
staffsize#:=16pt#;
code:=-1;
input autometric;
+% fet_beginfont;
fet_beginfont("font-en-tja", 16);
input bolletjes;
-fet_endfont("font-en-tja");
-
end.
input bolletjes;
-fet_endfont("font-en-tja");
-
end.
{
delete os_p_;
if (indent_i_)
- warning ("lily indent level: " + String (indent_i_));
+ warning ("lily indent level: " + String (indent_i_));
}
Mudela_stream&
static String word_sep_str = "{} \t\n";
while (str.length_i())
{
- int i = str.index_any_i (word_sep_str) + 1;
- if (!i)
- i = str.length_i();
- String word = str.left_str (i);
- str = str.mid_str (i, str.length_i());
- output_wrapped (word);
+ int i = str.index_any_i (word_sep_str) + 1;
+ if (!i)
+ i = str.length_i();
+ String word = str.left_str (i);
+ str = str.mid_str (i, str.length_i());
+ output_wrapped (word);
}
return *this;
}
void
Mudela_stream::open()
{
- os_p_ = new ofstream (filename_str_);
+ os_p_ = new ofstream (filename_str_.ch_C ());
if (!*os_p_)
- error ("can't open: `" + filename_str_ + "\'");
+ error ("can't open: `" + filename_str_ + "\'");
}
void
{
for (int i = 0; i < str.length_i(); i++)
{
- char c = str[ i ];
- switch (c)
- {
- case '{' :
- case '<' :
- handle_pending_indent();
- if (column_i_ == indent_i_ * INDENT_i)
- output ("\t");
- indent_i_++;
- *os_p_ << c;
- column_i_++;
- break;
- case '}' :
- case '>' :
- assert (indent_i_);
- indent_i_--;
- if (pending_indent_i_)
- pending_indent_i_--;
- handle_pending_indent();
- *os_p_ << c;
- column_i_++;
- break;
- case '%' :
- handle_pending_indent();
- comment_mode_b_ = true;
- *os_p_ << c;
- column_i_++;
- break;
- case '\t' :
- handle_pending_indent();
- *os_p_ << c;
- column_i_ += INDENT_i;
- break;
- case '\n' :
- *os_p_ << endl;
- pending_indent_i_ = indent_i_;
- column_i_ = 0;
- comment_mode_b_ = false;
- break;
- default :
- handle_pending_indent();
- *os_p_ << c;
- column_i_++;
- break;
+ char c = str[ i ];
+ switch (c)
+ {
+ case '{' :
+ case '<' :
+ handle_pending_indent();
+ if (column_i_ == indent_i_ * INDENT_i)
+ output ("\t");
+ indent_i_++;
+ *os_p_ << c;
+ column_i_++;
+ break;
+ case '}' :
+ case '>' :
+ assert (indent_i_);
+ indent_i_--;
+ if (pending_indent_i_)
+ pending_indent_i_--;
+ handle_pending_indent();
+ *os_p_ << c;
+ column_i_++;
+ break;
+ case '%' :
+ handle_pending_indent();
+ comment_mode_b_ = true;
+ *os_p_ << c;
+ column_i_++;
+ break;
+ case '\t' :
+ handle_pending_indent();
+ *os_p_ << c;
+ column_i_ += INDENT_i;
+ break;
+ case '\n' :
+ *os_p_ << endl;
+ pending_indent_i_ = indent_i_;
+ column_i_ = 0;
+ comment_mode_b_ = false;
+ break;
+ default :
+ handle_pending_indent();
+ *os_p_ << c;
+ column_i_++;
+ break;
}
}
}
// enough room left -> doit
if (column_i_ + str.length_i() <= wrap_column_i_)
{
- output (str);
- return;
+ output (str);
+ return;
}
// we're at BOL already; this will never fit -> doit
if (column_i_ == indent_i_ * INDENT_i)
{
- output (str);
- return;
+ output (str);
+ return;
}
// ok, let's wrap
// preserve comment mode
if (comment_mode_b_)
- output (String ("\n%"));
+ output (String ("\n%"));
else
- output (String ("\n"));
+ output (String ("\n"));
output (str);
}
}
\def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}}
+\def\textnatural{\raise.4ex\hbox{\textmusic\char"5C}}
\def\textflat{\raise.2ex\hbox{\mus\char"5B}}
\font\italicfont=cmti10
\font\dynfont=dyn10 scaled \magstep2
\font\musicmathfont=cmsy10
- \font\fontentja=font-en-tja20
+ \font\fontentja=font-en-tja20
}
\font\dynfont=dyn10 scaled \magstep1
\font\musicdraw=musixsps
\font\musicmathfont=cmsy8
- \font\fontentja=font-en-tja16
+ \font\fontentja=font-en-tja16
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% provide interface to musixtex fonts
\musicdef\longaball{'047}
\musicdef\halfrest{'074}
\musicdef\wholerest{'075}
-
\musicdef\breverest{'072}
-\musicdef\breverest{'073} %% <- Mats, is this cool?
+\musicdef\longarest{'073}
%% hmm
\musicdef\outsidehalfrest{10}