Dstream 1
File_path 1
-My_lily_lexer 1
+My_lily_lexer 0
PCol 1
Score_column 1
Ineq_constrained_qp 1
# yydebug
InitParser 1
-Parser 1
+Parser 0
InitDeclarations 1
Declarations 1
# FlexLexer debug
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 47
+TOPLEVEL_PATCH_LEVEL = 49
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
+ Announcing
+
+ LILYPOND
+
+ The Music Typesetter
+
Do you pine for the nice days of Linux 0.95, when men were men and
wrote their own applications? Are you without a nice project and just
dying to cut your teeth into a bleeding edge application you can
FEATURES
-ASCII script input, with identifiers (for music reuse), customizable
-notenames
+ASCII script input (mudela), with identifiers (for music reuse),
+customizable notenames
MIDI output lets you check if you have entered the correct notes.
MIDI to Mudela conversion through the mi2mu program.
Variable bar: an C<Int*> that you must not delete
=back
+
+Generally default arguments are taboo, except for nil pointers.
=head2 F<scales.ly>
-Features: plets, accents, beam steepnesses.
+Features: plets, accents, beam steepnesses, dynamics, crescendi,
+\octave command.
=head2 F<scsii-menuetto.ly>
=back
+Some of the important requests are:
+
+=over 4
+
+=item C<Barcheck_req>
+
+Checks during music processing if start of this voice element
+coincides with the start of a measure. Handy to check if you left out
+some voice elts.
+
+=item C<Note_req>
+
+Staff has to decide if the ball should be hanging left or right. This
+influences the horizontal dimensions of a column, and this is why
+request processing should be done before horizontal spacing.
+
+Other voices' frivolities may cause the need for accidentals, so this
+is also for the C<Staff> to decide. The C<Staff> can decide on positioning
+based on ottava commands and the appropriate clef.
+
+=item C<Rest_req>
+
+Typeset a rest.
+
+=item C<Span_req>
+
+This type of request typically results in the creation of a C<Spanner>
+
+=item C<Beam_req>
+
+Start/stop a beam.
+
+Staff has to combine this request with the stem_request, since the
+number of flags that a stem wants to carry will determine the
+number of beams.
+
+=item C<Dynamic>
+
+Each dynamic is bound to one note (a crescendo spanning multiple
+notes is thought to be made of two "dynamics": a start and a stop).
+Dynamic changes can occur in a smaller time than the length of its
+note, therefore fore each C<Dynamic> request carries a time, measured
+from the start of its note.
+
+=head2 Voice
+
+=head2 Voice_element
+
+=head2 Voice groups
+
+=head1 Requests
+
+inc
+The result of a request will be an C<Item> or a C<Spanner>, which
+will be put on a C<PStaff>. Note that the C<PStaff> and the original
+C<Staff> need not have anything in common. For example, the
+``double'' piano Staff could interpret commands which juggle
+melodies across the left and right hand, and may put the result in
+two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
+signs and any lyric.
+
+The class C<Staff> should be thought as a container for the
+C<Voice>s, and an interpreter for C<Request>s.
+Different staffs can produce different outputs; a melodious voice
+which is put into a percussion-Staff, will be typeset as the rythm of
+that voice.
+
+After C<Staff> made up her mind, the resultant items and
+spanners are put on the PScore.
+
+
=head1 Request_register
In the previous section the idea of Request has been explained, but
[partly by Mark Basinski <basinski@arizona.edu>]
-Herbert Chlapik,
+Herbert Chlapik, Die Praxis des Notengraphikers. Doblinger, 1987.
+Maxwell Weaner and Walter Boelke, Standard Music Notation Practice,
+revised edition by Arnold Broido and Daniel Dorff. Music Publisher's
+Association of the United States Inc., 1993.
+
W.A. Hegazy and J. S. Gourlay. Optimal line breaking in music. In
``Document Manipulation and Typography'', J.C. van Vliet (ed) 1988.
Stone, Kurt. Music Notation in the Twentieth Century. New York: Norton, 1980.
+=head2 On typesettig programs
+
+From: Miguel Filgueiras <mig@ncc.up.pt>
+
+... as well as other systems. I contribute with some references:
+
+
+D. Blostein, L. Haken, The Lime Music Editor: a Diagram Editor
+Involving Complex Translations. {\em
+Software --- Practice and Experience}, Vol. 24(3), 289--306, 1994.
+
+Alexander Brinkman, {\em PASCAL Programming for Music Research}.
+The University of Chicago Press, 1990.
+
+Miguel Filgueiras, Implementing a Symbolic Music Processing
+System. LIACC, Universidade do Porto, 1996; submitted.
+
+Miguel Filgueiras, Some Music Typesetting Algorithms. LIACC,
+Universidade do Porto, {\em forthcoming}.
+
+ Miguel Filgueiras and Jos\'e Paulo Leal, A First Formulation of
+\SceX, a Music Typesetting System. Centro de Inform\'atica da
+Universidade do Porto, 1993.
+
+Miguel Filgueiras and Jos\'e Paulo Leal. Representation and
+manipulation of music documents in \SceX. {\em Electronic Publishing},
+vol. 6 (4), 507--518, 1993.
+
+Eric Foxley, Music --- A language for typesetting music scores. {\em
+Software --- Practice and Experience}, Vol. 17(8), 485--502, 1987.
+
+John S. Gourlay, A language for music printing. {\em Communications of
+the ACM}, Vol. 29(5), 388--401, 1986.
+
+Cindy Grande, NIFF6a Notation Interchange File Format.
+Grande Software Inc., 1995. {\tt ftp:blackbox.cartah.washington.edu}
+
+Fran\c{c}ois Jalbert, Mu\TeX\ User's Guide (Version $1.1$). Computer
+Science Department, University of British Columbia, 1989.
+
+Peter S. Langston, Unix music tools at Bellcore. {\em
+Software --- Practice and Experience}, Vol. 20(S1), S1/47--S1/61, 1990.
+
+Andreas Mahling, J. Herczeg, M. Herczeg and S<H.-D.> B\"ocker, Beyond
+visualization: knowing and understanding. In P.~Gorny, M.~J. Tauber
+(eds.), {\em Visualization in Human-Computer Interaction}, Lecture
+Notes in Computer Science, 439, 16--26, Springer-Verlag, 1990.
+
+Jan Nieuwenhuizen, Using \TeX\ and the MusiX\TeX\ macro package to
+write parts and scores of music. Department of Physics, Eindhoven
+University of Technology, 1995.
+
+Don Simons, PMX, A Preprocessor for MusiX\TeX\ (Version 1.04).
+dsimons@logicon.com.
+
+Daniel Taupin. Music\TeX: Using \TeX\ to Write Polyphonic or
+Instrumental Music (Version 5.17). Laboratoire de Physique des
+Solides, Centre Universitaire, Orsay, 1996.
+
+Daniel Taupin, Ross Mitchell and Andreas Egler, Musix\TeX: Using \TeX\
+to Write Polyphonic or Instrumental Music (Version T.64). Laboratoire
+de Physique des Solides, Centre Universitaire, Orsay, 1993.
+
+Barry Vercoe, Csound --- A Manual for the Audio Processing System and
+Supporting Programs with Tutorials. Media Lab, M.I.T., Cambridge,
+Massachusetts, 1986 (rev. 1992).
+
+Chris Walshaw, {\tt ABC2M\TeX} --- An easy way of transcribing folk
+and traditional music. School of Maths, University of Greenwich, 1993.
+
+
=item *
-be able to edit the layout
-without danger of changing the original music (Urtext),
+be able to edit the layout without danger of changing the original
+music (Urtext),
=item *
ppp pp p mp mf df ff fff % df iso f, f is a notename.
+and the following abbreviations:
+
+ \< %start crescendo
+ \> % start decrescendo
+ \! % end crescendo/decrescendo
+
+=head2 General
+
The general form of a note is:
post-requests de-octavate notename octavate duration pre-requests
Notenames are just identifiers, and can be declared for any
language appropriate (see F<dutch.ini>).
+
+
=head2 Defaults
If omit the duration of a, a default value is substituted. For this
If you are typing music which does not lie in the "small" and "large"
octave, you can prevent having to type C<'> all the time by using the
-C<\octave> command: These two notes have the same pitch.
+C<\octave> command: These two lines have the same pitch.
- c'' \octave{2} c
+ c'' d'' e''
+ \octave{c''} c d e
By default the setting of C<\octave> is 0.
Rhythms in Mudela are entered identical to Simple mudela.
The melodic part of the information is ignored.
+=head2 Durations
+
+A duration always starts with the duration type (1,2,4 etc), and then
+any optional multipliers/dots
+
+=head2 Meters/groupings
+
+A meter has this form:
+
+ \meter { 3/4 }
+
+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
+
+ \grouping { 8*2 8*3 }
+
+
+
=head1 STRUCTURE
In concrete, a piece of Mudela has the following structure:
This chapter deals with the internals of Mudela. In the end Mudela
converted to Voice, which contain Voice_elements which (in turn)
-contain Requests. The former 2 types are basically containers.
+contain Requests. The former 2 types are basically containers (lists).
Consider the following simple mudela
\music { c4 <e4 g4> }
requests. Merging of requests is preferably done with other requests
done by members of the same voicegroups (beams, brackets, stems)
-Please refer to the documentation of the Child classes of
-C<Request> for explanation of each request type.
-
-The result of a request will be an C<Item> or a C<Spanner>, which
-will be put on a C<PStaff>. Note that the C<PStaff> and the original
-C<Staff> need not have anything in common. For example, the
-``double'' piano Staff could interpret commands which juggle
-melodies across the left and right hand, and may put the result in
-two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
-signs and any lyric.
-
-The class C<Staff> should be thought as a container for the
-C<Voice>s, and an interpreter for C<Request>s and C<Command>s.
-Different staffs can produce different outputs; a melodious voice
-which is put into a percussion-Staff, will be typeset as the rythm of
-that voice.
-
-After C<Staff> made up her mind, the resultant items and
-spanners are put on the PScore.
-
-=over 5
-
-=item C<Barcheck_req>
-
-Checks during music processing if start of this voice element
-coincides with the start of a measure. Handy to check if you left out
-some voice elts.
-
-=item C<Note_req>
-
-Staff has to decide if the ball should be hanging left or right. This
-influences the horizontal dimensions of a column, and this is why
-request processing should be done before horizontal spacing.
-
-Other voices' frivolities may cause the need for accidentals, so this
-is also for the C<Staff> to decide. The C<Staff> can decide on positioning
-based on ottava commands and the appropriate clef.
-
-=item C<Rest_req>
-
-Why a request? It might be a good idea to not typeset the rest, if the
-paper is too crowded.
-
-=item C<Span_req>
-
-This type of request typically results in the creation of a C<Spanner>
-
-=item C<Beam_req>
-
-Staff has to combine this request with the stem_request, since the
-number of flags that a stem wants to carry will determine the
-number of beams.
-
-=item C<Dynamic>
-
-Each dynamic is bound to one note (a crescendo spanning multiple
-notes is thought to be made of two "dynamics": a start and a stop).
-Dynamic changes can occur in a smaller time than the length of its
-note, therefore fore each C<Dynamic> request carries a time, measured
-from the start of its note.
-
-=head2 Voice
-
-=head2 Voice_element
-
-=head2 Voice groups
=head2 Other
-3/Apr/97 LilyPond 0.0.47 1
+3/Apr/97 LilyPond 0.0.48 1
-3/Apr/97 LilyPond 0.0.47 2
+3/Apr/97 LilyPond 0.0.48 2
-3/Apr/97 LilyPond 0.0.47 3
+3/Apr/97 LilyPond 0.0.48 3
+pl 48.hwn1
+ - lsm template
+ - clef in cadenza mode.
+ - notename clear
+ - \command bla; for \meter, \clef, \octave etc.
+
+pl 48
+ - notenames init
+ - Duration order -> grouping
+ - broken key s
+ - default octave
+******
+april 3
pl 47
- dynamic flowerlib
- Input mods: now use Source_file iso Sources
before 0.1
- * fix mi2mu
* update 20 pt table
* remove unnecessary or confusing constructs from .ly
+ * key undo
+
This is an assorted collection of stuff that will be done, might be
done, or is an idea that I want to think about
MAKE-STUFF
- * flower config: separate optiflags.
-
* do platform stuff: configure, header(s), targets, build (out?)
BUGS
- * key at clef change.
-
- * key undo
-
- * key at broken :||:
+ * help-lines
* [c8. c32 c32]
* cis ( | ) cis
- * parser error handling (can you say Segfault?)
+ * lilypond - ->
SEVERELY LACKING:
INPUTLANGUAGE
- * unix style paths for LILYINCLUDE ENV
-
* configure pitch_byte
* special key.
* Raw request syntax
- * uniformate: \clef\violin, \clef"violin", \geometric 1.4,
- \meter{ 2/4 }, etc.
-
* subtime with Subtle_reqs
SMALLISH PROJECTS
* bugreport to doc++ devel: struct not in class hier; public
virtual baseclasses
+ * half-sharps, half-flats
+
+ * unix style paths for LILYINCLUDE EN
+
* rpm package buildroot
* indentable stream for TeX stream, lily stream, Dstream.
* caching breakpoints / saving them.
- * key { C }
-
* use dstream feature in mi2mu
* qtor, btor, mtor-> tor( QUIET_ver ), tor( DEBUG_ver ), etc.
+ - declare notenametab?
+
* use tors feature in lily
* do conventional keys (C G A, F B E, a e fis, d as des, etc ),
* all errors
- * a decent webpage
-
* a test suite
FUTURE
* multiple scripst.
- * mixed fontsizes
+ * mixed fontsizes
* put scripts on bars
* revise calcideal
- * eentje/tweetje
+ * volta
* piano staff
#!/usr/bin/perl -w
-die "arg needed\n" if (!($#ARGV+1));
-my $fn = $ARGV[0];
-my $hh_q = ($fn =~ /hh$/ );
-my $MAILADRESS=$ENV{MAILADRESS};
-my @pw=(getpwuid($<));
-my $username=$pw[6];
-my $what="implement ";
-$what = "declare " if ($hh_q);
-my ($PROJECT, $cwd);
-$PROJECT = "the LilyPond music typesetter";
-chop($cwd = `pwd`);
-
-$PROJECT= "the Flower Library" if ($cwd =~ /flower/);
-my $headstr ="/*
+# generate the standard header of a LilyPond source file.
+my $fn;
+
+sub
+ do_init
+{
+ $MAILADRESS=$ENV{MAILADRESS};
+ @pw=(getpwuid($<));
+ $username=$pw[6];
+
+ die "arg needed\n" if (!($#ARGV+1));
+ $fn = $ARGV[0];
+
+ $hh_b = ($fn =~ /hh$/ );
+ $inc_b= ($hh_b || $fn =~ /[ti]cc$/);
+}
+
+sub
+ do_head
+{
+
+ my $what="implement ";
+ $what = "declare " if ($hh_b);
+ my ($PROJECT, $cwd);
+ $PROJECT = "the LilyPond music typesetter";
+ chop($cwd = `pwd`);
+
+ $PROJECT= "the Flower Library" if ($cwd =~ /flower/);
+
+ my $headstr ="/*
$fn -- $what
source file of $PROJECT
(c) 1997 $username <$MAILADRESS>
*/\n";
-
-my $startdef= $fn;
-$startdef =~ s/[\.-]/_/g;
-$startdef =~ tr/a-z/A-Z/;
-my $terminatestr="\n";
-if ($hh_q) {
- $headstr .= "\n\n#ifndef $startdef\n#define $startdef\n";
- $terminatestr .= "#endif // $startdef\n"
+ print $headstr;
}
-
-print $headstr, $terminatestr;
-
+sub do_inc
+{
+ my $headstr="";
+ my $startdef= $fn;
+ $startdef =~ s/[\.-]/_/g;
+ $startdef =~ tr/a-z/A-Z/;
+ my $terminatestr="\n";
+
+ if ($inc_b) {
+ $headstr = "\n\n#ifndef $startdef\n#define $startdef\n";
+ $terminatestr .= "#endif // $startdef\n"
+ }
+
+ print $headstr, $terminatestr;
+}
+do_init;
+do_head;
+do_inc;
$depth = "../../";
$ENV{"TEXINPUTS"} .= ":$depth/input/:";
$ENV{"LILYINCLUDE"} = "$depth/input/";
+my $cwd;
+chomp($cwd = `pwd`);
+
+die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
chdir ("out");
+
gen_html;
gen_examples;
gen_list;
#!/bin/sh
-
-
+grep -q '^TOP' .version
+ res=$?
+if test ! -f .version || test $res != 0; then
+ echo not in topleveldir
+ exit 1
+fi
function setversion() {
eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' .version`
MJ=$TOPLEVEL_MAJOR_VERSION
debug_b=yes
optimise_b=no
profile_b=no
-
+#shared_b=no
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
enableval="$enable_printing"
then
{ echo "configure: error: Please install GNU make" 1>&2; exit 1; }
else
- $MAKE -v| grep GNU >& /dev/null
+ $MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
echo "configure: warning: Please install *GNU* make" 1>&2
echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
fi
-if $CXX --version | grep '2\.7' >& /dev/null
+if $CXX --version | grep '2\.7' > /dev/null
then
true
else
make help
+
END
+
+
+#if test $shared_b = yes; then
+# echo "NOTE: you are building the *shared* library. You should
+#fi
debug_b=yes
optimise_b=no
profile_b=no
-
+#shared_b=no
AC_ARG_ENABLE(printing,
[ enable-printing set debug printing],
[printing_b=$enableval])
then
AC_MSG_ERROR(Please install GNU make)
else
- $MAKE -v| grep GNU >& /dev/null
+ $MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
AC_MSG_WARN(Please install *GNU* make)
AC_MSG_WARN(can't find flex. Please install Flex (2.5 or better))
fi
-if $CXX --version | grep '2\.7' >& /dev/null
+if $CXX --version | grep '2\.7' > /dev/null
then
true
else
make help
+
END
+
+
+#if test $shared_b = yes; then
+# echo "NOTE: you are building the *shared* library. You should
+#fi
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 10
+PATCH_LEVEL = 11
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
include ./$(depth)/make/Targets.make
include ./$(depth)/make/Rules.make
#
-default: shared-lib
-shared-lib: $(SHAREDLIBRARY)
+default: the-lib
+
+THE_LIB=$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
+the-lib: $(THE_LIB)
# version:
#
+pl 1.1.11
+ - template<> class P
+ - assoc elem() methods
+
pl 1.1.10
- Matrix_storage naming
- Matrix_storage::try_right_multiply to help speed up
- * Autoconf configure script.
-
* fix/junk ambiguous String constructor overloads, e.g.:
String( int ) and String( char )
- * shared lib.
-
* LGPL?
* disable this auto conv: const pointer -> bool -> string
parsestream.h
vector.h
+ * lgetopt: cmd -, or cmd --
/* define if you have snprintf */
#define HAVE_SNPRINTF 0
-
-/* just testing */
-#define HAVE_FOOBAR 0
optimise_b=yes
-shared_b=yes
+shared_b=no
LIB_SUFFIX=.a
# Check whether --enable-shared or --disable-shared was given.
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
AC_LANG_CPLUSPLUS
optimise_b=yes
-shared_b=yes
+shared_b=no
LIB_SUFFIX=.a
AC_ARG_ENABLE(shared,
MODULE_CXXFLAGS="$MODULE_CXXFLAGS -O2 -DSTRING_UTILS_INLINED"
fi
-dnl should enable flower specific compile flags.
AC_SUBST(MODULE_CXXFLAGS)
AC_SUBST(MODULE_LDFLAGS)
AC_SUBST(LIB_SUFFIX)
CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
AC_OUTPUT(out/Flower-flags.make:Flower-flags.make.in)
+
String cl(strip_member(mem));
String idx = cl;
- if (silent->elt_query(mem))
+ if (silent->elt_b(mem))
idx = mem;
- else if (silent->elt_query(cl))
+ else if (silent->elt_b(cl))
idx = cl;
else {
(*silent)[idx] = false;
bool
Dstream::silence(String s)
{
- if (!silent->elt_query(s))
+ if (!silent->elt_b(s))
return false;
return (*silent)[s];
}
return arr.size() -1;
}
public:
- bool elt_query(K key) const {
+ bool elt_b(K key) const {
return find(key) >= 0;
}
void del(K key) {
- assert(elt_query(key));
+ assert(elt_b(key));
int i= find(key);
arr[i].free = true;
}
int i = find_creat(key);
arr[i].val = val;
}
- V& operator[](K key) {
+ V& elem(K key) {
return arr[find_creat(key)].val;
+ }
+ V& operator[](K key) {
+ return elem(key);
}
V const & operator[](K key) const {
- assert(elt_query(key));
+ return elem(key);
+ }
+ V const & elem(K key) const {
+ assert(elt_b(key));
return arr[find(key)].val;
}
};
#include "list.icc"
#include "cursor.hh"
-// instantiate a template: explicit instantiation.
-#define L_instantiate(a) template class List<a>; template class Cursor<a>; \
- template class Link<a>
-
-
#endif // __LIST_HH //
#ifndef LIST_CC
#define LIST_CC
+
+// instantiate a template: explicit instantiation.
+#define L_instantiate(a) template class List<a>; template class Cursor<a>; \
+ template class Link<a>
+
#include "list.hh"
template<class T>
void PL_copy(IPointerList<T*> &dst,IPointerList<T*> const&src);
-#define PL_instantiate(a) template class PointerList<a*>; \
- template class PCursor<a*>;
-#define IPL_instantiate(a) PL_instantiate(a); \
- template class IPointerList<a*>
#include "plist.icc"
#include "plist.hh"
+#define PL_instantiate(a) template class PointerList<a*>; \
+ template class PCursor<a*>;
+#define IPL_instantiate(a) PL_instantiate(a); \
+ template class IPointerList<a*>
+
template<class T>
IPointerList<T>::~IPointerList()
{
--- /dev/null
+/*
+ pointer.hh -- declare P
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef POINTER_HH
+#define POINTER_HH
+
+/** P<T> is a handy template to use iso T*. It inits to 0, deletes on
+ destruction, deep copies upon copying
+
+ It is probably not feasible to use P<T> as template argument, since
+ a lot of auto conversion wouldn't work. new T would be called too
+ much anyway.
+
+ Sorry for the silly naming */
+template <class T>
+class P {
+
+ void copy(T*);
+ T* t_p;
+ void junk();
+public:
+
+ P(P const &src);
+
+ T *get_p() { T*p = t_p; t_p=0; return p; }
+ T *get_l() { return t_p; }
+ T *copy_p() const;
+ void set_p (T *new_p);
+ void set_l (T *t_l);
+
+ P &operator =(P const &);
+ ~P();
+ P() { t_p = 0; }
+ //P(T *p) { t_p = p; }
+
+ T *operator ->() { return t_p; }
+ operator T * () { return t_p; }
+ const T *operator ->() const { return t_p ; }
+ operator const T *() const { return t_p; }
+};
+#endif // POINTER_HH
+
+
--- /dev/null
+/*
+ pointer.tcc -- implement P
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef POINTER_TCC
+#define POINTER_TCC
+
+template<class T>
+inline
+T *
+P<T>::copy_p()const
+{
+ return t_p? new T(*t_p) : 0;
+}
+
+template<class T>
+inline
+void
+P<T>::copy(T *l)
+{
+ t_p = l ? new T(*l) : 0;
+}
+
+template<class T>
+inline
+void
+P<T>::junk()
+{
+ delete t_p;
+ t_p =0;
+}
+
+template<class T>
+inline
+P<T>::P(P<T> const &s)
+{
+ t_p = s.copy_p();
+}
+
+template<class T>
+inline
+P<T> &
+P<T>::operator =(P const&s)
+{
+ junk();
+ copy(s.t_p);
+ return *this;
+}
+
+template<class T>
+inline
+P<T>::~P() {
+ junk();
+}
+
+template<class T>
+inline
+void
+P<T>::set_p(T * np)
+{
+ if (np == t_p)
+ return;
+ delete t_p;
+
+ t_p = np;
+}
+
+
+template<class T>
+inline
+void
+P<T>::set_l(T * l)
+{
+ if (t_p == l)
+ return;
+
+ junk();
+ copy(l);
+}
+
+
+
+#endif // POINTER_TCC
}
Long_option_init *
-Getopt_long::operator()() {
+Getopt_long::operator()()
+{
if (!next())
return 0;
include ./$(depth)/make/Files.make
#
-# descent order into subdirectories:
-#
-SUBDIRS =
-#
-
-# to be remade each build:
-#
-VERSION_DEPENDENCY = #
-#
-
-# module compile settings: (not generally needed!
-#
-
-
# list of distribution files:
#
EXTRA_DISTFILES = result
# main target of this module:
#
-# MAINTARGET = $(EXECUTABLE)
-# MAINTARGET = $(LIBRARY)
MAINTARGET = $(lily_bindir)/$(EXECUTABLE)# huh?
-# MAINTARGET = $(libdir)/$(LIBRARY)# huh?
-
-#default: $(MAINTARGET)
BUILDSTRINGTEST=$(MAINTARGET)
EXECSTRINGTEST=$(EXECUTABLE)
-default: $(BUILDSTRINGTEST) do-stringtest
+# don't do the exec, as this might fail if flowerlib isn't installed yet.
+default: $(BUILDSTRINGTEST)
+
do-stringtest:
- $(EXECSTRINGTEST) > $(outdir)/result # should cmp with a 'standard result'
+ $(EXECSTRINGTEST) > $(outdir)/result
cmp $(outdir)/result result
dummy:
#
include ./$(depth)/make/Targets.make
include ./$(depth)/make/Rules.make
-#
-# list of depend files:
-#
-DEPFILES = $(wildcard $(depdir)/*.dep )
-#
# auto dependencies:
#
% actually are *melodic*s, i.e. they represent a pitch solely. Notes
% have a rhythmic part too. This is the reason that we don't write 'note { .. }'
%
-ceses = \melodic_request { -1 0 -2 }
-ces = \melodic_request { -1 0 -1 }
-c = \melodic_request { -1 0 0 }
-cis = \melodic_request { -1 0 1 }
-cisis = \melodic_request { -1 0 2 }
-deses = \melodic_request { -1 1 -2 }
-des = \melodic_request { -1 1 -1 }
-d = \melodic_request { -1 1 0 }
-dis = \melodic_request { -1 1 1 }
-disis = \melodic_request { -1 1 2 }
-eses = \melodic_request { -1 2 -2 }
-es = \melodic_request { -1 2 -1 }
-e = \melodic_request { -1 2 0 }
-eis = \melodic_request { -1 2 1 }
-eisis = \melodic_request { -1 2 2 }
-feses = \melodic_request { -1 3 -2 }
-fes = \melodic_request { -1 3 -1 }
-f = \melodic_request { -1 3 0 }
-fis = \melodic_request { -1 3 1 }
-fisis = \melodic_request { -1 3 2 }
-geses = \melodic_request { -1 4 -2 }
-ges = \melodic_request { -1 4 -1 }
-g = \melodic_request { -1 4 0 }
-gis = \melodic_request { -1 4 1 }
-gisis = \melodic_request { -1 4 2 }
-ases = \melodic_request { -1 5 -2 }
-as = \melodic_request { -1 5 -1 }
-a = \melodic_request { -1 5 0 }
-ais = \melodic_request { -1 5 1 }
-aisis = \melodic_request { -1 5 2 }
-beses = \melodic_request { -1 6 -2 }
-bes = \melodic_request { -1 6 -1 }
-b = \melodic_request { -1 6 0 }
-bis = \melodic_request { -1 6 1 }
-bisis = \melodic_request { -1 6 2 }
+\notenames {
+ ceses = \melodic_request { -1 0 -2 }
+ ces = \melodic_request { -1 0 -1 }
+ c = \melodic_request { -1 0 0 }
+ cis = \melodic_request { -1 0 1 }
+ cisis = \melodic_request { -1 0 2 }
+ deses = \melodic_request { -1 1 -2 }
+ des = \melodic_request { -1 1 -1 }
+ d = \melodic_request { -1 1 0 }
+ dis = \melodic_request { -1 1 1 }
+ disis = \melodic_request { -1 1 2 }
+ eses = \melodic_request { -1 2 -2 }
+ es = \melodic_request { -1 2 -1 }
+ e = \melodic_request { -1 2 0 }
+ eis = \melodic_request { -1 2 1 }
+ eisis = \melodic_request { -1 2 2 }
+ feses = \melodic_request { -1 3 -2 }
+ fes = \melodic_request { -1 3 -1 }
+ "f" = \melodic_request { -1 3 0 }
+ fis = \melodic_request { -1 3 1 }
+ fisis = \melodic_request { -1 3 2 }
+ geses = \melodic_request { -1 4 -2 }
+ ges = \melodic_request { -1 4 -1 }
+ g = \melodic_request { -1 4 0 }
+ gis = \melodic_request { -1 4 1 }
+ gisis = \melodic_request { -1 4 2 }
+ ases = \melodic_request { -1 5 -2 }
+ as = \melodic_request { -1 5 -1 }
+ a = \melodic_request { -1 5 0 }
+ ais = \melodic_request { -1 5 1 }
+ aisis = \melodic_request { -1 5 2 }
+ beses = \melodic_request { -1 6 -2 }
+ bes = \melodic_request { -1 6 -1 }
+ b = \melodic_request { -1 6 0 }
+ bis = \melodic_request { -1 6 1 }
+ bisis = \melodic_request { -1 6 2 }
-%
-% upper case: 1 octave lower.
-%
+ %
+ % upper case: 1 octave lower.
+ %
-Ceses = \melodic_request { -2 0 -2 }
-Ces = \melodic_request { -2 0 -1 }
-C = \melodic_request { -2 0 0 }
-Cis = \melodic_request { -2 0 1 }
-Cisis = \melodic_request { -2 0 2 }
-Deses = \melodic_request { -2 1 -2 }
-Des = \melodic_request { -2 1 -1 }
-D = \melodic_request { -2 1 0 }
-Dis = \melodic_request { -2 1 1 }
-Disis = \melodic_request { -2 1 2 }
-Eses = \melodic_request { -2 2 -2 }
-Es = \melodic_request { -2 2 -1 }
-E = \melodic_request { -2 2 0 }
-Eis = \melodic_request { -2 2 1 }
-Eisis = \melodic_request { -2 2 2 }
-Feses = \melodic_request { -2 3 -2 }
-Fes = \melodic_request { -2 3 -1 }
-F = \melodic_request { -2 3 0 }
-Fis = \melodic_request { -2 3 1 }
-Fisis = \melodic_request { -2 3 2 }
-Geses = \melodic_request { -2 4 -2 }
-Ges = \melodic_request { -2 4 -1 }
-G = \melodic_request { -2 4 0 }
-Gis = \melodic_request { -2 4 1 }
-Gisis = \melodic_request { -2 4 2 }
-Ases = \melodic_request { -2 5 -2 }
-As = \melodic_request { -2 5 -1 }
-A = \melodic_request { -2 5 0 }
-Ais = \melodic_request { -2 5 1 }
-Aisis = \melodic_request { -2 5 2 }
-Beses = \melodic_request { -2 6 -2 }
-Bes = \melodic_request { -2 6 -1 }
-B = \melodic_request { -2 6 0 }
-Bis = \melodic_request { -2 6 1 }
-Bisis = \melodic_request { -2 6 2 }
+ Ceses = \melodic_request { -2 0 -2 }
+ Ces = \melodic_request { -2 0 -1 }
+ C = \melodic_request { -2 0 0 }
+ Cis = \melodic_request { -2 0 1 }
+ Cisis = \melodic_request { -2 0 2 }
+ Deses = \melodic_request { -2 1 -2 }
+ Des = \melodic_request { -2 1 -1 }
+ D = \melodic_request { -2 1 0 }
+ Dis = \melodic_request { -2 1 1 }
+ Disis = \melodic_request { -2 1 2 }
+ Eses = \melodic_request { -2 2 -2 }
+ Es = \melodic_request { -2 2 -1 }
+ E = \melodic_request { -2 2 0 }
+ Eis = \melodic_request { -2 2 1 }
+ Eisis = \melodic_request { -2 2 2 }
+ Feses = \melodic_request { -2 3 -2 }
+ Fes = \melodic_request { -2 3 -1 }
+ F = \melodic_request { -2 3 0 }
+ Fis = \melodic_request { -2 3 1 }
+ Fisis = \melodic_request { -2 3 2 }
+ Geses = \melodic_request { -2 4 -2 }
+ Ges = \melodic_request { -2 4 -1 }
+ G = \melodic_request { -2 4 0 }
+ Gis = \melodic_request { -2 4 1 }
+ Gisis = \melodic_request { -2 4 2 }
+ Ases = \melodic_request { -2 5 -2 }
+ As = \melodic_request { -2 5 -1 }
+ A = \melodic_request { -2 5 0 }
+ Ais = \melodic_request { -2 5 1 }
+ Aisis = \melodic_request { -2 5 2 }
+ Beses = \melodic_request { -2 6 -2 }
+ Bes = \melodic_request { -2 6 -1 }
+ B = \melodic_request { -2 6 0 }
+ Bis = \melodic_request { -2 6 1 }
+ Bisis = \melodic_request { -2 6 2 }
+}
p = \absdynamic { 5 }
mp = \absdynamic { 4 }
mf = \absdynamic { 3 }
-df = \absdynamic { 2 } % f is a notename too.
+f = \absdynamic { 2 } % f is a notename too.
ff = \absdynamic { 1 }
fff = \absdynamic { 0 }
%
% by Mats Bengtsson.
-
+\notenames {
cessess = \melodic_request { 0 0 -2 }
cess = \melodic_request { 0 0 -1 }
c = \melodic_request { 0 0 0 }
h = \melodic_request { 0 6 0 }
hiss = \melodic_request { 0 6 1 }
hississ = \melodic_request { 0 6 2 }
+}
% author: unknown. Copyright: none
%
-cad = \melodic{
- \cadenza {1}
- \grouping{1*4}\duration { 8}\octave{c}
- \textstyle "italic"
- \clef \violin
- c'4.mf g8
- \textstyle "roman"
+cad = \melodic {
+ \cadenza 1;
+ \grouping 1*4;\duration 8;\octave c';
+
+ \clef \violin ;
+ c'4.\mf g8
+
[e'^"accel" ()d' c' b]
[b()c'] g-\fermata
- \bar \empty
+ \bar \empty;
c [c_"rubato" e g c']
- \octave{c'}
+ \octave c'';
e4. e [g ()f_"rit" e d]
- \duration{16}
+ \duration 16;
dis4()e4
- \bar \empty
+ \bar \empty ;
r8 [c d] [e f g gis]
- \duration{4}
+ \duration 4;
a-> 'f()'e g
f-> 'd()'cis e
- \duration{8}
+ \duration 8;
d4^\fermata
- \bar \empty
+ \bar \empty ;
r8 'a ['b cis]
- \duration{16} [d cis d e]
+ \duration 16; [d cis d e]
f4()[f e d c]
'b4
- \octave{c} [d'8 c'8 a8]2/3
+ \octave c'; [d'8 c'8 a8]2/3
g2
- \bar \empty
- [g c e g] [c' e g c']\octave{c}
+ \bar \empty ;
+ [g c e g] [c' e g c']\octave c'';
[e 'g c e] g4^\fermata %()% BUG!
- \bar \empty
+ \bar \empty ;
[g8.(_"a tempo" e g8. )e]
a4. g8 [f8 e8 d8 c8]
'g2 d2^"tr"
alto = \melodic{
- \meter {4/4}
- \duration{ 8 }
- \key {bes es as}
+ \meter 4/4;
+ \duration 8 ;
+ \key bes es as;
- \clef "alto"
+ \clef "alto";
% these are chords (i.e. non-divisi)
%30
<
- { \octave{ c }
+ { \octave c ;
[ c c-. ] c2.( |
%31
[ ) c c-. ] c4. c-. c4( |
%33
[ ) c c-. ] c4. c-. c4
- \group "+bla"
- \stem{ 1 }[ c16^"div." c16 c16 c16 ] c4 c2
- \group "-"
+ \group "+bla";
+ \stem 1 ;[ c16^"div." c16 c16 c16 ] c4 c2
+ \group "-";
}
%30:2
{
- \octave{ 'c }
- \textstyle "italic"
+ \octave 'c ;
+ \textstyle "italic";
% this should be a \dynamic, rather than text
[ c c_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
- \ \ \ \ - \ \ \ \ -" ] c2.( |
- \textstyle "roman"
+ \textstyle "roman";
%31:2
[ ) c c-. ] c2.( |
%32:2
[ ) c c-. ] c4. c-. c4( |
%33:2
[ ) c c-. ] c4. c-. c4 |
- \octave{c }
+ \octave c ;
%34
- \group "+b"
+ \group "+b";
% these are two \voices (i.e. divisi)
% the c4 and c2, however are really 16th...
% we-ll say "simile" for now...
%
- \octave{ 'c }
- \textstyle "italic"
- \stem{ -1 } [ as16 ff as16 as16 as16 ] as4_"simile" as2
- \textstyle "roman"
- \group "-"
+ \octave 'c ;
+ \textstyle "italic";
+ \stem -1 ;
+ [ as16 \ff as16 as16 as16 ] as4_"simile" as2
+ \textstyle "roman";
+ \group "-";
}
>
%
% declare melody (which will be in *one* staff ) for the lead voice
-melodie = \melodic{
+melodie = \melodic
% switch Lilypond in note-mode
\clef\violin
- \meter{ 2/4 }
- \octave{ c } % set the default octave
+ \meter{ 2/4 ;
+ \octave c ; % set the default octave
% the default note duratino is 4
%%% theme
c c | % the '|' checks if there is a new measure here.
}
% more of this.
-begeleiding = \melodic{
+begeleiding = \melodic
\clef "bass"
- \meter{ 2/4 }
- \octave{ c } % default octave: 1 below the first octave.
+ \meter{ 2/4 ;
+ \octave c ; % default octave: 1 below the first octave.
%%% theme
'c % ' before note means one octave lower.
% Similarly: ' after means one higher.
c e c f c e c d 'b c 'a 'f 'g 'c2
- \octave { 'c }
+ \octave 'c ;
e 'g d 'g c 'g 'b 'g e 'g d 'g c 'g 'b 'g
%%%% var 1
r8 e8() c r8 e8() c r8 f8()c r8 e8()c
%
%
globals=\melodic{
- \meter {4/ 4}
- \partial {8}
- \skip {1*8}
- \skip {3*2 }
+ \meter 4/ 4;
+ \partial 8;
+ \skip 8*1;
+ \skip 2*3 ;
\bar ":|:"
- \skip {1*2}
- \meter {2/4}
+ \skip 2*1;
+ \meter 2/4;
}
-ritme = \staff{melodicregs
- globals
+%ritme = \staff{melodicregs
+% globals
% rhythmic broken for now
% \rhytmic{
% c8
%
% c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
% }
-}
+%}
melody= \staff{melodicregs
globals
- \melodic{
- c8\key{fis cis gis}
+ \melodic \octave {c;
+ c8\key fis cis gis;
|r4 r4 r4 r4
|cis'2.. r8
| r4 r8 r16 r32 r32
- \duration {4}
+ \duration 4;
<
{ c () 'bes [c8 c8] }
{ fis' ()gisis' fis8 fis8 }
[d8 e8 f'8 g8] d8 e8 f8 g8
|fis''2
| a8 b8 c'8 d'8 |c''8 '''c8 c4 |c4 c4 |c4
- \duration{ 16 } 'b 'a 'g 'f \duration{ 4}
+ \duration 16 ; 'b 'a 'g 'f \duration 4;
\clef\bass
|c 'b 'a 'g 'f 'e 'd 'c ''b ''a ''g ''f ''e ''d ''c
\geometric 1.4
\unitspace 3.0 \cm
}
- ritme
- melody
+
+ \staff{ melody}
}
+%% BUG in MIDI!
%
% Viola Quartet
% Martien Lohman (194x-????)
% \barnumberstyle\boxed
globalmusic= \melodic{
- \meter {2/4}
+ \meter 2/4;
% \key fis
- \skip {2*56}
+ \skip 2*56;
% \key bes es as
- \skip {2*8}
- \meter {6/8}
- \skip{ 8*48}
- \meter {2/4}
- \skip {2*16}
+ \skip 2*8;
+ \meter 6/8;
+ \skip 8*48;
+ \meter 2/4;
+ \skip 2*16;
% \key fis
}
\usepackage{a4}
\oddsidemargin-1in\advance\oddsidemargin7.5mm
\evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
\textwidth\hsize\advance\textwidth-15mm
\topmargin-1in\advance\topmargin5mm
-\vsize297mm % so what does a4 do, anyway?
\textheight\vsize\advance\textheight-30mm
\pagestyle{empty}
\begin{document}
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-alto = \melodic{
- \duration{16}
- \clef\alto
- \octave{c}
- \key{fis}
+alto = \melodic {
+ \duration 16;
+ \clef\alto;
+ \octave c;
+ \key fis;
%1
[ 'b8. 'a ] [ 'g8 'b c ] |
%2
%15
[ e8 fis8 ] [ g8 d8 ] |
%16
- \textstyle "italic"
+ \textstyle "italic";
[ c 'a 'fis 'd ] 'g4_"fine" |
- \textstyle "roman"
-% \scoreverb{\mulooseness=-1}
+ \textstyle "roman";
+% \scoreverb \mulooseness=-1;
% \newline
%17
%=1
%48
[ d e d d 'b 'g ]4/6 [ 'a8 'g8 ] |
%theme 2
- \duration{8}
+ \duration 8;
%49
[ f e d ]2/3 f4 |
%50
%55
[ d g 'g ]2/3 [ 'g 'a 'b ]2/3 |
%56
- 'b4 c4 \key{bes es as} | % || \key\Es
+ 'b4 c4 \key bes es as; | % || \key\Es
%57
[ 'b d ] [ 'g 'b ] |
%58
%63
[ 'g 'b ] [ es d ] |
%64
- [ c8. 'g32 'es32 ] 'c4 | % || \meter{6/8}
+ [ c8. 'g32 'es32 ] 'c4 | % || \meter 6/8;
%65
es4.( [ )es d c ] |
%66
%71
d2. |
%72
- c r4 r4. | % || \meter{2/4}
+ c r4 r4. | % || \meter 2/4;
%73
- \duration{8}
+ \duration 8;
[ 'b d ] [ 'g 'b ] |
%74
[ c es ] [ 'g c ] |
%81
g4 [ as g ] |
%82
- \duration{16}
+ \duration 16;
[ g f es f ] g4 |
%83
[ g f e f ] g4 |
%87
'b2 |
%88
- \textstyle "italic"
- c2_"dacapo" \key{fis} |
- \textstyle "roman"
-%\scoreverb{\mulooseness=1}
+ \textstyle "italic";
+ c2_"dacapo" \key fis; |
+ \textstyle "roman";
+%\scoreverb \mulooseness=1;
% \key\G ||
}
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-cello = \melodic{
- \clef"bass"
- \octave{'c}
- \duration{4}
- \key{fis}
+cello = \melodic {
+ \clef"bass";
+ \octave 'c;
+ \duration 4;
+ \key fis;
%%1
g 'g |
%%2
%%15
[ c8 e8 ] [ g8 'g8 ] |
%%16
- \textstyle "italic"
+ \textstyle "italic";
[ d8 c'8 ] b_"fine"
- \textstyle "roman" |
+ \textstyle "roman" ;|
% \newline
%%17=1
g 'g |
%%28
) 'a d |
%%29
- \duration{8}
+ \duration 8;
[ 'a a ] d4 |
%%30
[ 'a a ] d4 |
[ 'a a ] d4 |
%%variant a
%%33
- \duration{16}
+ \duration 16;
[ 'g8 'g 'g ] [ 'g8 'g 'g ] |
%%34
[ 'g8 'g 'g ] g4 |
%%40
'd4 'g4 |
%%41
- \duration{8}
- \textstyle "italic"
+ \duration 8;
+ \textstyle "italic";
r_"pizz"
- \textstyle "roman"
+ \textstyle "roman";
g r 'g |
%%42
r g e4 |
[ 'd 'g ] |
%%theme 2
%%49
- \textstyle "italic"
+ \textstyle "italic";
r4_"arco"
[ 'g 'g 'g ]2/3 |
- \textstyle "roman"
+ \textstyle "roman";
%%50
r4 [ c c c ]2/3 |
%%51
%%55
g2 |
%%56
- 'g4 'c4 \key{bes es as}|
+ 'g4 'c4 \key bes es as;|
% \key\'es ||
%%57
g r g r |
g4 'g4 |
%%64
c4 'c4 |
-% \meter{6/8} ||
+% \meter 6/8; ||
%%65
[ c c c ] c4. |
%%66
%%72
c' r4 r4. |
%%73
-% \meter{2/4} ||
+% \meter 2/4; ||
g r g r |
%%74
c r c r |
%%80
c4 'c4 |
%%81
- \duration{2}
+ \duration 2;
'c |
%%82
'c |
%%87
d |
%%88
- \textstyle "italic"
- d_"dacapo" \key{fis} |
- \textstyle "roman"
+ \textstyle "italic";
+ d_"dacapo" \key fis; |
+ \textstyle "roman";
% \key\'g ||
}
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-violinI = \melodic{
- \clef "violin"
- \octave{c}
- \duration{4}
- \key{fis}
+violinI = \melodic {
+ \clef "violin";
+ \octave c;
+ \duration 4;
+ \key fis;
%1
g [ b8. a16 ] |
%2
%15
c' b |
%16
- \textstyle "italic"
+ \textstyle "italic";
a g_"fine"
- \textstyle "roman" |
+ \textstyle "roman" ;
+ |
%\newline
%17=1
g [ b8. a16 ] |
cis' c' |
%variant a'
%33
- \duration{16} [ b8 d' d' ] [ d'8 d' d' ] |
+ \duration 16; [ b8 d' d' ] [ d'8 d' d' ] |
%34
[ g'8 d' d' ] b4 |
%35
%40
c'4 < b4 d'4 > |
%41
- \textstyle "italic"
- \duration{8}
+ \textstyle "italic";
+ \duration 8;
r_"pizz" d r g
- \textstyle "roman" |
+ \textstyle "roman" ;|
%42
r d e4 |
%43
r d' [ d' b ] |
%theme 2
%49
- \textstyle "italic"
+ \textstyle "italic";
r4_"arco" [ b8 b b ]2/3
- \textstyle "roman" |
+ \textstyle "roman" ;|
%50
r4 [ g g g ]2/3 |
%51
%55
b2 |
%56
- g2 \key{bes es as}|
+ g2 \key bes es as;|
% \key\Es ||
%57
f r f r |
%60
c' r c'4 |
%61
- \duration{16}
+ \duration 16;
[ as f d f as d' ]4/6 [ as f d 'as d f ]4/6 |
%62
[ g es c 'g c es ]4/6 [ g c' es' c' g es ]4/6 |
%63
[ g d g bes d' g' ]4/6 [ f' d' bes g f d ]4/6 |
%64
- \duration{8}
+ \duration 8;
[ c g ] g4 |
-% \meter{6/8} ||
+% \meter 6/8; ||
%65
[ g g g ] g4. |
%66
[ f' d' b ] [ g a8 b ] |
%72
c' r4 r4. |
-% \meter{2/4} ||
+% \meter 2/4; ||
%73
f r f r |
%74
%76
c' r c'4 |
%77
- \duration{16}
+ \duration 16;
[ as f d f as d' ]4/6 [ as f d 'as d f ]4/6 |
%78
[ g es c 'g c es ]4/6 [ f c' es' c' g es ]4/6 |
%80
[ c8 g8 ] g4 |
%81
- \duration{2}
+ \duration 2;
c' |
%82
c' |
%87
d |
%88
- \textstyle "italic"
+ \textstyle "italic";
a_"dacapo"
- \textstyle "roman"
- \key{fis} |
+ \textstyle "roman";
+ \key fis; |
% \key\G ||
}
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-violinII = \melodic{
- \clef "violin"
- \octave{c}
- \duration{4}
- \key{fis}
+violinII = \melodic {
+ \clef "violin";
+ \octave c;
+ \duration 4;
+ \key fis;
%1
d2 |
%2
%15
c d |
%16
- \textstyle "italic"
+ \textstyle "italic";
d2_"fine" |
- \textstyle "roman"
+ \textstyle "roman";
% \newline
%17=1
d2 |
a fis |
%variant a
%33
- \duration{16}
+ \duration 16;
[ g8 b b ] [ b8 g a ] |
%34
[ b8 b b ] f4 |
%40
fis4 g4 |
%41
- \duration{8}
- \textstyle "italic"
+ \duration 8;
+ \textstyle "italic";
r_"pizz"
- \textstyle "roman"
+ \textstyle "roman";
'b r 'b |
%42
r 'b 'g4 |
r fis [ fis d ] |
%theme 2
%49
- \textstyle "italic"
+ \textstyle "italic";
r4_"arco"
- \textstyle "roman"
+ \textstyle "roman";
[ d8 d d ]2/3 |
%50
r4 [ g8 g g ]2/3 |
%55
d2 |
%56
- f4 e4 \key{bes es as}|
+ f4 e4 \key bes es as;|
% \key\Es ||
%57
d r 'b r |
'b d4. |
%64
es2 |
-% \meter{6/8} ||
+% \meter 6/8; ||
%65
- \duration{8}
+ \duration 8;
[ c c c ] c4. |
%66
[ 'g 'g 'g ] 'g4. |
%72
es r4 r4. |
%73
-% \meter{2/4} ||
+% \meter 2/4; ||
d r 'b r |
%74
'g r es r |
%76
g r es4 |
%77
- \duration{2}
+ \duration 2;
f |
%78
es |
%87
% = g |
%88
- \textstyle "italic"
- fis_"dacapo" \key{fis}|
- \textstyle "roman"
+ \textstyle "italic";
+ fis_"dacapo" \key fis;|
+ \textstyle "roman";
% \key\G ||
}
blah = \staff{ melodicregs
\melodic {
- \duration { 8 } \meter {6/8}
-
- \octave{ c }
- |[ a cr a a a a a a a rc a ff decr ]6/9
- \octave{ c }
- |[ a a a a a a a a rc a ]6/9
- \octave { c' }
- [ 'c 'g d a e' b' f'' c''' g''' ]6/9
- [ g''' c''' f'' b' e' a d 'g 'c ]6/9
- \octave{ c'' }
- [ 'c 'g d a e' b' f'' c''' g''' ]6/9
- [ g''' c''' f'' b' e' a d 'g 'c ]6/9
- \octave { ''c}
- [ c g d' ]2/3
- [ d' g c ]2/3
- [ f c' g' ]2/3
- [ g' c' f ]2/3
- \octave{ c }
- [ c g d' ]2/3
- [ d' g c ]2/3
- [ f c' g' ]2/3
- [ g' c' f ]2/3
- [ g' c' f ]2/3
- \meter {4/4}
+ \meter 6/8;
+ \duration 4.;
+ \octave 'c ;
+ \clef "bass";
+ c d
+ \octave c ;
+ c d
+ \clef "violin" ;
+ \octave c' ;
+ c d
+ \octave c'' ;
+ c d
+ \duration 8 ;
+ %ugr
+ |[ a \< a a a a a a \! a a \ff \> ]6/9
+ \octave c' ;
+ |[ a a a a a a a a \! a ]6/9
+ \octave c'' ;
+ [ 'c 'g d a e' b' f'' c''' g''' ]6/9
+ [ g''' c''' f'' b' e' a d 'g 'c ]6/9
+ \octave c' ;
+ [ 'c 'g d a e' b' f'' c''' g''' ]6/9
+ [ g''' c''' f'' b' e' a d 'g 'c ]6/9
+ \octave c' ;
+ [ c g d' ]2/3
+ [ d' g c ]2/3
+ [ f c' g' ]2/3
+ [ g' c' f ]2/3
+ \octave c ;
+ [ c g d' ]2/3
+ [ d' g c ]2/3
+ [ f c' g' ]2/3
+ [ g' c' f ]2/3
+ [ g' c' f ]2/3
+ \meter 4/4;
c1
- \duration { 8}
+ \duration 8;
[c-> d-> e-> f->][g-> a-> b-> c'->] % 1
-\octave{c'} [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
-\octave{c} [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+\octave c'; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+\octave c; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
[c-. d-. e-. f-.][g-. a-. b-. c'-.]
[c'-- b-- a-- g][f-- e-- d c--] % 5
[c-portato d-portato e-portato f-portato]
% % because piece is set very tightly
ii_menuetto = \melodic{
- \clef"alto"
- \meter{3/4}
- \key {bes}
- \octave{c}
+ \clef"alto";
+ \meter 3/4;
+ \key bes;
+ \octave c';
- \duration{8}
- < a2 f2 d2 df > bes4-. |
+ \duration 8;
+ < a2 f2 d2 \f > bes4-. |
%%2
< [ bes^"1" e c_"2"_"4" >
a bes-. g-. ] a4-.^"4" |
%%4
< [ f 'a > e d cis-. 'b-. 'a-. ]
%%5
- < a2 f2 d2 > bes4-. | % @bes4-. |
+ < a2 f2 d2 > bes!4-. |
%%6
< [ bes e > a bes-. g-. ]
- c'4-. | % =c'4-. |
+ c'!4-. |
%%7
< a4-. f4>
< d'4-.-upbow f4 'bes4 >
< e'4-.-downbow g4 'g4 > |
%%8
- < cis'2.-upbow e2. 'a2. > \bar ":|:"%%!! sorry!
+ < cis'2.-upbow e2. 'a2. >
+ \bar ":|:";
%%9
- \clef "violin"
- < e'2 a2 df >
+ \clef "violin";
+ < e'2 a2 \f >
[ d'( e'16 )f'16 ] |
%%10
< [ e' g > d' cis'_"2" e' a( )g ] |
%%11
< \multivoice
- {\stem{1} a4(\stem{1}) d'4 cis'4-. }
- { \stem{-1} f2 e4 } > |
+ {\stem 1; a4(\stem 1;) d'4 cis'4-. }
+ { \stem -1; f2 e4 } > |
%%12
< [ g'^"4" d > f' e' f' d'^"3"( ) c' ] |
%%13
- \clef "alto"%
+ \clef "alto";
< \multivoice
- { \stem{1} bes2 c'4 }
- { \stem{-1} g4(\stem{-1}) f4 e4 }% ugh
+ { \stem 1; bes2 c'4 }
+ { \stem -1; g4(\stem -1;) f4 e4 }% ugh
> |
%%14
- < [ a f > g a f ] < d'4-upbow e4 'bes4 > |
+ < [ a f > g a f ] < d'4-$upbow e4 'bes4 > |
%%15
- < c'4-\downbow f4 'a4 > [ bes( )a g a ] |
+ < c'4-$downbow f4 'a4 > [ bes( )a g a ] |
%%16
[ f( e )f a-. g-. bes-. ] |
%%17
%%20
< { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > |
%%21
- < \multivoice {\stem{1} d'4(\stem{1} ) cis'4 d'4 } { \stem{-1} g2 f4 } > |
+ < \multivoice {\stem 1; d'4(\stem 1; ) cis'4 d'4 } { \stem -1; g2 f4 } > |
%%22
< { [ g( )f g e ] } { [ cis ] } > < f4 d4 > |
%%23
- [ 'g g ] < e4. 'a4. > d-upbow |
+ [ 'g g ] < e4. 'a4. > d-\upbow |
%%24
- < d2.^"fine" 'a2. 'd2._"3 mins."> \bar ":|" % \bar ":||"
+ < d2.^"fine" 'a2. 'd2._"3 mins.">
+ \bar ":|";
%% \tighten % use one line less
}
\usepackage{a4}
\oddsidemargin-1in\advance\oddsidemargin7.5mm
\evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
\textwidth\hsize\advance\textwidth-15mm
\begin{document}
\input lilyponddefs
% The purpose of this file is to demonstrate features of LilyPond.
% (there is an accompanying LaTeX file, standchen.tex)
%
-% thanks to \music group changing, all notes
-% (except for grace notes) are printed
-%
-%%1
+
melodie = \melodic{
- \meter{ 3/4 }
- \clef\violin
- \key{ bes }
- \octave{ c }
- \duration{ 8 }
- r pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
+ \meter 3/4 ;
+ \clef\violin;
+ \key bes ;
+ \octave c' ;
+ \duration 8 ;
+ r \pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
%%2
r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > |
%%3
- \textstyle "italic"
- r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >
- \textstyle "roman" |
+ \textstyle "italic";
+ r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >|
+ \textstyle "roman" ;
+
%%4
r < [ 'a cis > e < 'a cis > e < 'a cis ] > |
-%#%:|
%%5
[ a()bes a ]2/3 d'4. a |
%%6
%%9
< { a'4.( )g' [ g'( f' )e' ]2/3 }
- { cis'4. e'_"dolce" \plet{ 2/3 } e' \plet{ 1/1 } } > |
+ { cis'4. e'_"dolce" \plet 2/3 ; e' \plet 1/1 ; } > |
%%10
< f'2. d'2. > |
%%11
- [ a pp( )bes a ]2/3 f'4. a |
+ [ a (\pp )bes a ]2/3 f'4. a |
%%12
[ g( ) a g ]2/3 e'4. d' |
%%13
%%14
a2 r
< { d'( | )c'4. g [ bes a g ]2/3 }
- { f p ( | )e4._"dolce" bes \plet{ 2/3 } g \plet{ 1/1 } } > |
+ { f \p ( | )e4._"dolce" bes
+ \plet 2/3 ; g
+ \plet 1/1 ;
+ } > |
%%16
< a2. f2. > |
%%17
- \textstyle "italic"
+ \textstyle "italic";
[ a8._"cresc." cis'16 ] f'4. e'
- \textstyle "roman" |
+ \textstyle "roman" ;|
%%18
[ d'8. a16 ] f4. d |
%%19
%#% c'\grace\stemup
- [ bes pp( ) a bes ]2/3 d'4. bes |
+ [ bes (\pp ) a bes ]2/3 d'4. bes |
%%20
a2. |
%%21
%#% a\grace
[ g( )fis g ]2/3 bes4.^> g |
%%22
-%#% =f2. |
- f2. |
+ f!2. |
%%23
- [ a8. mf cis'16 ] f'4. e' |
+ [ a8. \mf cis'16 ] f'4. e' |
%%24
[ d'8. a16 ] fis4. d |
%%25
- [ b mf( ) ais b ]2/3 d'4. b |
+ [ b \mf( ) ais b ]2/3 d'4. b |
%%26
< a2. fis2. > |
%%27
- [ e' df( )dis' e' ]2/3 g'4. cis' |
+ [ e' \f( )dis' e' ]2/3 g'4. cis' |
%%28
< d'2. fis2. > |
%#%\volta1
%%29
< { bes2( [ d'8.( ))g16 ] }
- { g2 mf [ bes8. bes16 ] } > |
+ { g2 \mf [ bes8. bes16 ] } > |
%%30
< { a4. [ a-. a-. a-. ] }
{ fis4. [ fis-.( fis-. )fis-. ] } > |
< { a4. [ a-. a-. a-. ] }
{ g4. [ cis-.( e-. )g-. ] } > |
%%32
- < a2 fis2 pp > < a4 fis4 > |
+ < a2 fis2 \pp > < a4 fis4 > |
%%33
< { b2( [ d'8.( ) )g16 ] }
{ g2 [ b8. b16 ] } > |
d'4( )cis'4 r4 |
%%39
%#% > a4. [ cis' e'8. >! d'16 ] |
- a4. [ cis' e'8. d'16 ] |
+ a4. \> [ cis' e'8. \! d'16 ] |
%%40
cis'2 r4 |
%%41
- < fis'4. cis'4. df > e' [ e'( )d' cis' ]2/3 |
+ < fis'4. \> cis'4. \f > e' [ e'( )d' \! cis' ]2/3 |
%%42
[ b8. cis'16 ] d'4^> b r |
%%43
- [ b8. df cis'16 ] d'4^> b r |
+ [ b8. \f cis'16 ] d'4^> b r |
%%44
- [ b8. cis'16 ] d'4^> b r |
+ [ b8. \> cis'16 ] d'4^> b \! r |
%%45
- [ b p ( )ais b ]2/3 d'4. b |
+ [ b \p ( )ais b ]2/3 d'4. b |
%%46
-%#% { =a2. fis2. } |
- < a2. fis2. > |
+ <a!2. fis2. > |
%%47
- [ e' df( )dis' e' ]2/3 g'4.^> cis' |
+ [ e' \f( )dis' e' ]2/3 g'4.^> cis' |
%%48
- \textstyle "italic"
- < \multivoice { \stem{ 1 } fis2.( | \stem{ -1 } )f2. }
- { \stem{ 1 } d'2.( | \stem{ 1 } )d'4 r4_"decresc." d'4 } >
- \textstyle "roman" |
+ \textstyle "italic";
+ < \multivoice {
+ \stem 1 ; fis2.(
+ | \stem -1 ; )f2. }
+ { \stem 1 ; d'2.( | \stem 1 ; )d'4 r4_"decresc." d'4 } >
+ \textstyle "roman"; |
%%50
< bes2. e2. > |
%%51
< a2. cis2. > |
%%52
- < fis2 d2 > < a4 fis4 pp > |
+ < fis2 d2 > < a4 fis4 \pp > |
%%53
< bes2 g2 > < [ d'8.^> bes8. > < bes16 g16 ] > |
< { a4. [ a-. a-. a-. ] }
{ g4. [ cis-.( e-. )g-. ] } > |
%%56
- \textstyle "italic"
+ \textstyle "italic";
< a2. fis2._"dim." >
- \textstyle "roman" |
+ \textstyle "roman"; |
%%57
< a2. fis2. > |
%%58
}
begeleiding = \melodic{
- \meter{3/4}
- \clef\bass
- \key{bes}
- \octave{ c }
- \duration{2}
+ \meter 3/4;
+ \clef\bass;
+ \key bes;
+ \octave c' ;
+ \duration 2;
'd r4 |
%%2
''bes r4 |
''a r4 |
%#%:|
%%5
-\duration{ 8 }
- < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+\duration 8 ;
+ < \multivoice { \stem 1 ; [ 'f 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%6
- < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
- { \stem{ -1 } ''bes2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'e 'g 'e 'g 'e ] }
+ { \stem -1 ; ''bes2 r4 } > |
%%7
- < \multivoice { \stem{ 1 } [ 'cis 'e 'g 'e 'g e ] }
- { \stem{ -1 } ''a2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'cis 'e 'g 'e 'g e ] }
+ { \stem -1 ; ''a2 r4 } > |
%%8
- < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%9
[ 'a e g e g e ] |
%%10
[ 'd 'a d 'a d 'a ] |
%%11
- < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'f 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%12 == 6
- < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
- { \stem{ -1 } ''bes2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'e 'g 'e 'g 'e ] }
+ { \stem -1 ; ''bes2 r4 } > |
%13
< \multivoice { [ 'e 'g 'bes 'g 'bes 'g ] }
- { \stem{ -1 } 'c2 r4 } > |
+ { \stem -1 ; 'c2 r4 } > |
%%14
- < \multivoice { \stem{ 1 } [ 'a c f c f c ] }
- { \stem{ -1 } 'f2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'a c f c f c ] }
+ { \stem -1 ; 'f2 r4 } > |
%%15
[ 'c 'g 'bes 'g 'bes 'g ] |
%%16
[ ''f 'c 'f 'c 'f 'c ] |
%%17
- < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
- { \stem{ -1 } ''a2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''a 'e 'g 'e 'g 'e ] }
+ { \stem -1 ; ''a2 r4 } > |
%%18
- < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%19
- < \multivoice { \stem{ 1 } [ ''bes 'f 'bes 'f 'bes 'f ] }
- { \stem{ -1 } ''bes2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''bes 'f 'bes 'f 'bes 'f ] }
+ { \stem -1 ; ''bes2 r4 } > |
%%20
- < \multivoice { \stem{ 1 } [ ''f 'c 'f 'c 'f 'c ] }
- { \stem{ -1 } ''f2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''f 'c 'f 'c 'f 'c ] }
+ { \stem -1 ; ''f2 r4 } > |
%%21
< [ 'e 'c > 'g c 'g c 'g ] |
%%22
[ 'f 'a c 'a 'f 'c ] |
%%23
- < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
- { \stem{ -1 } ''a2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''a 'e 'g 'e 'g 'e ] }
+ { \stem -1 ; ''a2 r4 } > |
%%24
- < \multivoice { \stem{ 1 } [ 'd 'fis 'a 'fis 'a 'fis ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'fis 'a 'fis 'a 'fis ] }
+ { \stem -1 ; 'd2 r4 } > |
%%25
- < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
- { \stem{ -1 } ''g2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''g 'd 'b 'd 'b 'd ] }
+ { \stem -1 ; ''g2 r4 } > |
%%26
- < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%27
< [ 'cis ''a > 'e 'a 'e 'a 'e ] |
%%28
%%44
< [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
%%45
- < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
- { \stem{ -1 } ''g2 r4 } > |
+ < \multivoice { \stem 1 ; [ ''g 'd 'b 'd 'b 'd ] }
+ { \stem -1 ; ''g2 r4 } > |
%%46
- < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
- { \stem{ -1 } 'd2 r4 } > |
+ < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
+ { \stem -1 ; 'd2 r4 } > |
%%47
< [ 'cis ''a > 'e 'a 'e 'a 'e ] |
%%48
tekstI = \lyric{
- \meter{ 3/4 }
- \duration{4}
+ \meter 3/4 ;
+ \duration 4;
_ _ _
_ _ _
_ _ _
}
tekstII = \lyric{
- \meter{3/4}
- \duration{4}
+ \meter 3/4;
+ \duration 4;
_ _ _
_ _ _
_ _ _
}
\score{
- \staff{ lyricregs
-
- tekstI tekstII }
+ \staff{ lyricregs tekstI tekstII }
\staff{ melodicregs melodie }
\staff{ melodicregs begeleiding }
\paper{
\usepackage{a4}
\oddsidemargin-1in\advance\oddsidemargin7.5mm
\evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
\textwidth\hsize\advance\textwidth-15mm
-\topmargin-1in\advance\topmargin5mm
-\vsize297mm % so what does a4 do, anyway?
-\textheight\vsize\advance\textheight-30mm
+\topmargin-1in\advance\topmargin10mm
+\textheight\vsize\advance\textheight-35mm
\pagestyle{empty}
\begin{document}
\input lilyponddefs
\input titledefs
-\def\interstaffline{\vskip2mm}
+\def\interstaffline{\vskip1mm}
\def\interscoreline{\vskip3mm}
-\vbox to 10mm{\vss}
\title{St\"andchen\normalsize\\[2ex](Serenade)}
\composer{Franz Schubert (1797-1828)}
\instrument{M\"a\ss ig} % heu
% Copyright: none
melody = \melodic{
- \clef\violin
+ \clef\violin;
c4 c | g g | a a | g g |
f f | e e | d d8.( e16 | )c2 | % :|
c c | g g | a a | g g |
f f | e e | d d8.( e16 | )c2 % :|
- \bar ":|"
+ \bar ":|";
}
-accompany = \melodic{
- \clef \bass
- \octave{'c}\duration{4}
+accompany = \melodic {
+ \clef \bass;
+ \octave'c;
+ \duration 4;
c4 c' | e' c' | f' c' | e' c' |
d' b | c' a | f g | c2 |
c c' | e' c' | f' c' | e' c' |
d' b | c' a | f g | c2
- \bar ":|"
+ \bar ":|";
}
-global = \melodic{
- \meter {2 / 4}
- \skip {2*24}
-% \bar "||"
+global = \melodic {
+ \meter 2 / 4;
+ \skip 2*24;
+% \bar "||";
}
tekst = \lyric{
texte = \lyric{
- \textstyle "italic"
+ \textstyle "italic" ;
Ah! vous dir- ai_- je ma man2
Ce qui cau- se mon tour- ment2
Pa- pa veut que je rai- sonne2
texti = \lyric{
- \textstyle "roman"
+ \textstyle "roman";
Twin- kle, twin- kle, lit- tle star,2
How I won- der what you are.2
Up a- bove the world so high,2
}
textii = \lyric{
- \textstyle "roman"
When the bla- zing sun is gone,2
When he no- thing shines up- on,2
Then you show your lit- tle light,2
textiii = \lyric{
- \textstyle "roman"
Then the tra- veler in the dark2
Thanks you for your ti- ny spark;2
He_could not see which way to go,2
% Public Domain -- typed by by HWN
%
global = \melodic{
- \meter{ 4/4 }
- \grouping{ 2*2 }
- \key{ bes es as }
+ \meter 4/4 ;
+ \grouping 2*2;
+ \key bes es as;
}
- dux = \melodic{
- \clef\violin
- \octave{ c }
- \duration{ \last }
+ dux = \melodic {
+ \clef "violin";
+ \octave c' ;
+ \duration \last ;
- \stem{-1}
+ \stem -1;
r8-"dux"
[c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
[g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
r8 [as g f] [g f16 es] [f8 d] |
}
-comes = \melodic{
- \octave{ c' }
- \stem{1}
+comes = \melodic {
+ \octave c'' ;
+ \stem 1;
r1 |
r1 |
r8-"comes" [g16 fis] [g8 c] [es g16 f] [g8 a]|
}
-bassdux = \melodic{
- \clef \bass
- \octave{ c }
+bassdux = \melodic {
+ \clef "bass";
+ \octave c' ;
r1 |
r |
r |
#include "proto.hh"
#include "plist.hh"
#include "string.hh"
-#include "debug.hh"
#include "source-file.hh"
#include "binary-source-file.hh"
#include "string-convert.hh"
/*
- duration-convert.cc -- implement
+ duration-convert.cc -- implement Duration_convert
source file of the LilyPond music typesetter
*/
#include <assert.h>
#include "duration-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
// statics Duration_convert
bool const Duration_convert::midi_as_plet_b_s = true;
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-// split into 4?
-
#include "proto.hh"
#include "plist.hh"
#include "string.hh"
#include "source.hh"
#include "moment.hh"
#include "duration.hh"
-#include "debug.hh" //ugh
#include "duration-convert.hh"
// statics Duration
int Duration::division_1_i_s = 384 * 4;
+bool
+Duration::duration_type_b(int t)
+{
+ int bit_i=0;
+ while (t > 0)
+ {
+ int rem = t % 2;
+ t /= 2;
+ bit_i += (rem == 1);
+ }
+ return bit_i == 1;
+}
+
Duration::Duration( int type_i, int dots_i = 0)
{
+ assert(duration_type_b(type_i));
type_i_ = type_i;
dots_i_ = dots_i;
ticks_i_ = 0;
+++ /dev/null
-/*
- Argh! this sux! implementation not liblily
- */
-
-#ifndef DEBUG_HH
-#define DEBUG_HH
-
-#include <assert.h>
-#include <iostream.h>
-#include "dstream.hh"
-#include "real.hh"
-#include "proto.hh"
-
-void warning( String message_str );
-void error( String message_str);
-void error_t(const String& s, Time_description const & t_tdes);
-void error_t(String const &s, const Moment &when);
-// warnings
-//void warning(String s);
-#define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
-extern ostream &warnout ;
-
-// progress
-extern ostream *mlog;
-
-// debugging
-extern Dstream *monitor; // monitor
-
-#ifdef NPRINT
-#define mtor if (0) *monitor // clever hack
-#else
-#define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
-#endif
-
-extern bool check_debug;
-
-#endif
(dur)
*/
struct Duration {
- /* actually i hate it when other people use default arguments,
- because it makes you easily loose track of what-s really
- happening; in the routine-s implementation you-re not aware
- of this defaultness (who sets this stupid value?).*/
+ /**
+ Ctor of Duration. type_i should be a power of 2.
+ */
Duration( int type_i = 1, int dots_i = 0);
/// is the "plet factor" of this note != 1 ?
bool plet_b();
String str()const;
void set_plet(int,int );
+ static bool duration_type_b(int t);
void set_ticks( int ticks_i );
Moment length() const ; // zo naai mij
static int division_1_i_s;
--- /dev/null
+/*
+ warn.hh -- declare
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef WARN_HH
+#define WARN_HH
+
+#include "string.hh"
+
+void warning( String message_str );
+void error( String message_str);
+#endif // WARN_HH
Input::error(String s)const
{
message("error: "+ s);
- exit (1);
}
String
#include "plist.hh"
-#include "debug.hh"
+#include "warn.hh"
#include "windhoos-suck-suck-suck-thank-you-cygnus.hh"
#include "source-file.hh"
--- /dev/null
+#include "warn.hh"
+#include <stream.h>
+
+void
+error(String s)
+{
+ cerr << "error: " << s << "\n";
+
+ exit(1);
+}
+
+
+void
+warning(String m)
+{
+ cerr << "warning" <<m <<endl;
+
+}
+
+void
+message(String m)
+{
+ cerr << m<<endl;
+}
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 47
+PATCH_LEVEL = 48
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
Mats Bengtsson <matsb@s3.kth.se>
*/
-
+#include "bar.hh"
#include "clef-reg.hh"
#include "clef-item.hh"
#include "debug.hh"
if (!set_type(c_l->clef_str_))
c_l->error("unknown clef type ");
}
-
+void
+Clef_register::acknowledge_element(Staff_elem_info info)
+{
+ if (info.elem_p_->name() == Bar::static_name()) {
+ if (!clef_p_){
+ create_clef();
+ clef_p_->change = false;
+ }
+ }
+}
bool
Clef_register::try_request(Request * r_l)
{
return true;
}
+void
+Clef_register::create_clef()
+{
+ clef_p_ = new Clef_item;
+ clef_p_->read(*this);
+ announce_element(Staff_elem_info(clef_p_,
+ clef_req_l_));
+}
+
void
Clef_register::process_requests()
{
- Time_description const *time_l = get_staff_info().time_C_;
- if (!clef_req_l_ && (!time_l->whole_in_measure_|| !time_l->when_)) {
- clef_p_ = new Clef_item;
- clef_p_->change = false;
- } else if (clef_req_l_) {
- clef_p_ = new Clef_item;
+ if (clef_req_l_) {
+ create_clef();
clef_p_->change = true;
}
- if (clef_p_) {
- clef_p_->read(*this);
- announce_element(Staff_elem_info(clef_p_,
- clef_req_l_));
- }
}
void
}
IMPLEMENT_STATIC_NAME(Key_change_req);
+void
+Key_change_req::squash_octaves()
+{
+ for (int i=0; i < melodic_p_arr_.size(); i++) {
+ melodic_p_arr_[i]->octave_i_ = 0;
+ }
+}
void
Key_change_req::do_print() const
Key_change_req::Key_change_req()
{
minor_b_ = false;
+ multi_octave_b_= false;
}
Key_change_req::Key_change_req(Key_change_req const&c)
for (int i=0; i < c.melodic_p_arr_.size(); i++)
melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() );
minor_b_ = c.minor_b_;
+ multi_octave_b_ = c.multi_octave_b_;
}
Key_change_req::~Key_change_req()
Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
assert( mel_l );
if ( mel_l->accidental_i_ < 0 )
- flats_i++;
+ flats_i -= mel_l->accidental_i_;
}
return flats_i;
}
Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
assert( mel_l );
if ( mel_l->accidental_i_ > 0 )
- sharps_i++;
+ sharps_i+= mel_l->accidental_i_;
}
return sharps_i;
}
}
bool
-Rhythmic_grouping::child_fit_query(Moment start)
+Rhythmic_grouping::child_fit_b(Moment start)
{
if (children.size())
return ( children.top()->interval().right== start);
{
Moment stop = start+len;
- assert(child_fit_query(start));
+ assert(child_fit_b(start));
children.push(new Rhythmic_grouping(MInterval(start, stop)));
}
#include "request.hh"
#include "input-register.hh"
+Identifier::~Identifier()
+{
+ if (!accessed_b_ && !init_b_)
+ warning("Variable not used");
+}
void
Identifier::error(String expect)
{
}
Identifier::Identifier(String n, int code)
- : name(n)
+ : name_str_(n)
{
token_code_i_ = code;
data = 0;
void
Identifier::print()const
{
- mtor << "identifier \'" << name << "\'=";
+ mtor << "identifier \'" << name_str_ << "\'=";
do_print();
}
class Clef_register : public Request_register {
Clef_item *clef_p_;
Clef_change_req * clef_req_l_;
-
+ void create_clef();
+ void read_req(Clef_change_req*);
+ bool set_type(String);
+protected:
+ virtual void process_requests();
+ virtual void pre_move_processing();
+ virtual void post_move_processing();
+ virtual bool try_request(Request*);
+ virtual void acknowledge_element(Staff_elem_info);
public:
int c0_position_i_;
String clef_type_str_;
/* ************** */
- virtual void process_requests();
- virtual void pre_move_processing();
- virtual void post_move_processing();
- virtual bool try_request(Request*);
+
Clef_register();
NAME_MEMBERS(Clef_register);
- void read_req(Clef_change_req*);
- bool set_type(String);
+
};
#endif // CLEF_HH
public:
Array<Melodic_req*> melodic_p_arr_;
bool minor_b_;
-
+
+ /// don't ignore the octaves in #melodic_p_arr_#?
+ bool multi_octave_b_;
Key_change_req();
Key_change_req(Key_change_req const&);
~Key_change_req();
REQUESTMETHODS(Key_change_req, keychange);
+ /// squash the octaves to 1
+ void squash_octaves();
/// return number of flats in key
int flats_i();
--- /dev/null
+/*
+ Argh! this sux! implementation not liblily
+ */
+
+#ifndef DEBUG_HH
+#define DEBUG_HH
+
+#include <assert.h>
+#include <iostream.h>
+#include "dstream.hh"
+#include "real.hh"
+#include "proto.hh"
+#include "warn.hh"
+
+void error_t(const String& s, Time_description const & t_tdes);
+void error_t(String const &s, const Moment &when);
+
+#define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
+extern ostream &warnout ;
+
+// progress
+extern ostream *mlog;
+
+// debugging
+extern Dstream *monitor; // monitor
+
+
+#ifdef NPRINT
+#define mtor if (0) *monitor // clever hack
+#else
+#define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
+#endif
+
+extern bool check_debug;
+
+#endif
~Rhythmic_grouping();
void add_child(Moment start, Moment len);
- bool child_fit_query(Moment start);
+ bool child_fit_b(Moment start);
void split(Rhythmic_grouping r);
void split(Array<MInterval>);
void split(int n);
struct Identifier : public Input {
void *data;
- String name;
+ String name_str_;
bool init_b_;
bool accessed_b_;
int token_code_i_;
Identifier(String n, int code) ;
- virtual ~Identifier() {}
+ virtual ~Identifier() ;
void print()const;
virtual char const *classname() const{ return "new Identifier"; }
Key_item * kit_p_;
Array<int> accidental_idx_arr_;
bool default_key_b_;
+ bool change_key_b_;
virtual bool try_request(Request *req_l);
virtual void process_requests();
/*
- key.hh -- declare Key
+ key.hh -- declare Key, Octave_key
(c) 1996,97 Han-Wen Nienhuys
*/
#include "varray.hh"
#include "scalar.hh"
-/// administration of current key
-class Key {
- Array<int> accidental_i_arr_;
-
- /* *************** */
+/// administration of current key in one octave.
+class Octave_key {
public:
+ Array<int> accidental_i_arr_;
Key();
void set(int i, int acc);
};
/// administration of accidentals
-struct Local_key
+class Key
{
- void reset(Key);
- Key& oct(int);
- Local_key();
-
-private:
- Array<Key> octaves;
+ /** for each octave a key. Has to be private since octave 0 isn't member 0.
+ */
+ Array<Octave_key> octaves;
+public:
+ bool multi_octave_b_;
+
+ Octave_key&oct(int);
+ Octave_key oct(int) const;
+ void set(int name, int acc);
+ void set(int oct, int name, int acc);
+ Key();
};
#endif // KEY_HH
+
+/*
+ lily-proto.hh -- declare
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef LILY_PROTO_HH
+#define LILY_PROTO_HH
+
struct My_lily_lexer;
struct My_lily_parser;
+struct Notename_table;
+struct Absolute_dynamic_req;
+struct Barcheck_req;
+struct Bar_req;
+struct Beam_req;
+struct Blank_req;
+struct Bracket_req;
+struct Cadenza_req;
+struct Clef_change_req;
+struct Cresc_req;
+struct Decresc_req;
+struct Durational_req;
+struct Dynamic_req;
+struct Group_change_req;
+struct Group_feature_req;
+struct Key_change_req;
+struct Lyric_req;
+struct Melodic_req;
+struct Measure_grouping_req;
+struct Meter_change_req;
+struct Musical_req;
+struct Command_req;
+struct Note_req;
+struct Plet_req;
+struct Partial_measure_req;
+struct Rest_req;
+struct Rhythmic_grouping_req;
+struct Rhythmic_req;
+struct Script_req;
+struct Skip_req;
+struct Slur_req;
+struct Spacing_req ;
+struct Span_req;
+struct Span_dynamic_req;
+struct Subtle_req;
+struct Stem_req;
+struct Terminate_voice_req;
+struct Text_req;
+struct Timing_req;
+
+#endif // LILY_PROTO_HH
static int compare(Local_acc&, Local_acc&);
};
+/**
+ Accidentals which can be different for each octave.
+ */
struct Local_key_item : Item {
-NAME_MEMBERS(Local_key_item);
+ NAME_MEMBERS(Local_key_item);
Array<Local_acc> accs;
Array<Item*> support_items_;
int c0_position;
#include "key.hh"
struct Local_key_register : Request_register {
- Local_key local_key_;
+ Key local_key_;
Local_key_item* key_item_p_;
Key const *key_C_;
/* *************** */
REQUESTMETHODS(Plet_req,plet);
};
-/** Start / stop a beam at this note. if #nplet# is set, the staff will try to put an
-appropriate number over the beam
- */
+/** Start / stop a beam at this note. if #nplet# is set, the staff
+will try to put an appropriate number over the beam */
class Beam_req : public Span_req {
public:
int nplet;
#include <FlexLexer.h>
+#include "lily-proto.hh"
#include "proto.hh"
#include "fproto.hh"
#include "varray.hh"
/// lexer for Mudela
class My_lily_lexer : public Includable_lexer {
int lookup_keyword(String);
- void lookup_notename(int &large, int &small, String s);
int scan_bare_word(String);
int scan_escaped_word(String);
bool post_quotes_b_;
public:
- void * lexval_l;
-
+ void * lexval_l;
+ Notename_table *note_tab_p_;
Assoc<String, Identifier*> *identifier_assoc_p_;
Keyword_table * keytable_p_;
int errorlevel_i_;
/* *************** */
+ void clear_notenames();
Identifier*lookup_identifier(String s);
-
+ Melodic_req* lookup_melodic_req_l(String s);
void push_note_state();
void push_lyric_state();
void pop_state();
~My_lily_lexer();
int yylex();
void print_declarations(bool init_b) const;
-
+ void add_notename(String, Melodic_req*);
bool note_state_b() const;
bool lyric_state_b() const;
};
/*
- my-lily-parser.hh -- declare
+ my-lily-parser.hh -- declare My_lily_parser
source file of the LilyPond music typesetter
Voice_element* get_word_element(Text_def*, Duration*);
void set_last_duration(Duration const *);
void set_duration_mode(String s);
-public:
friend int yyparse( void*);
-
+public:
int default_octave_i_;
Duration default_duration_;
String textstyle_str_;
bool last_duration_mode ;
-
Array<Request*> pre_reqs, post_reqs;
int fatal_error_i_;
Sources * source_l_;
My_lily_lexer * lexer_p_;
Moment plet_mom();
+ void add_notename(String, Melodic_req* req_p);
Input here_input()const;
void remember_spot();
Input pop_spot();
Paper_def*default_paper();
void do_yyparse();
void parser_error(String);
+ void clear_notenames();
Request* get_parens_request(char c);
--- /dev/null
+/*
+ notename-table.hh -- declare
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTENAME_TABLE_HH
+#define NOTENAME_TABLE_HH
+
+#include "pointer.hh"
+#include "string.hh"
+#include "lily-proto.hh"
+#include "assoc.hh"
+
+class Notename_table : Assoc<String, P<Melodic_req> >{
+public:
+ void add(String, Melodic_req*);
+ Melodic_req*get_l(String);
+};
+
+#endif // NOTENAME_TABLE_HH
Array<Staff_walker *> walker_p_arr_;
Array<Staff_walker *> disallow_break_walk_l_arr;
int disallow_break_count_;
+ int breaks_i_;
void reinit();
public:
bool break_allowed_b();
/*
- staff-info.hh -- declare
+ staff-info.hh -- declare Staff_info
source file of the LilyPond music typesetter
/// when is now?
Time_description const *time_C_;
Rhythmic_grouping const *rhythmic_C_;
+
+ ///
bool break_allowed_b_;
Moment when();
void
Key_item::read(Key_register const & key_reg_r)
{
+ assert(!key_reg_r.key_.multi_octave_b_);
const Array<int> &idx_arr =key_reg_r.accidental_idx_arr_;
for (int i = 0 ; i< idx_arr.size(); i++) {
int note = idx_arr[i];
- int acc = key_reg_r.key_.acc(note);
+ int acc = key_reg_r.key_.oct(0).acc(note);
add(note, acc);
}
todo: key undo
*/
-#include "time-description.hh"
#include "key-reg.hh"
#include "key-item.hh"
#include "command-request.hh"
#include "staff-column.hh"
#include "local-key-reg.hh"
#include "musical-request.hh"
+#include "local-key-item.hh"
+#include "bar.hh"
Key_register::Key_register()
{
Key_register::try_request(Request * req_l)
{
Command_req* creq_l= req_l->command();
- if (!creq_l|| !creq_l->keychange())
+ if (!creq_l|| !creq_l->keychange())
return false;
assert(!keyreq_l_); // todo
keyreq_l_ = creq_l->keychange();
+ change_key_b_ = true;
read_req(keyreq_l_);
return true;
}
Key_register::acknowledge_element(Staff_elem_info info)
{
Command_req * r_l = info.req_l_->command() ;
- if (r_l && r_l->clefchange() && !kit_p_) {
- int c0_i= *get_staff_info().c0_position_i_l_;
- kit_p_ = new Key_item(c0_i);
- kit_p_->read(*this);
- announce_element(Staff_elem_info(kit_p_, keyreq_l_));
+ if (r_l && r_l->clefchange()) {
+ change_key_b_ = true;
}
+
+ if (info.elem_p_->name() == Bar::static_name())
+ default_key_b_ = true;
+
}
void
Key_register::process_requests()
{
- Time_description const *time_l = get_staff_info().time_C_;
+ int c0_i= *get_staff_info().c0_position_i_l_;
- if (!keyreq_l_ &&
- (!time_l->whole_in_measure_|| !time_l->when_)) {
- default_key_b_ = true;
- }
-
- if ( default_key_b_ || keyreq_l_) {
- int c0_i= *get_staff_info().c0_position_i_l_;
- kit_p_ = new Key_item(c0_i);
- kit_p_->read(*this);
- announce_element(Staff_elem_info(kit_p_, keyreq_l_));
- }
+ if (key_.multi_octave_b_)
+ assert(false); // TODO .
+ else
+ kit_p_ = new Key_item(c0_i);
+ kit_p_->read(*this);
+ announce_element(Staff_elem_info(kit_p_, keyreq_l_));
}
void
Key_register::pre_move_processing()
-{
+{
+
+ if (! default_key_b_ && ! change_key_b_ ) {
+ delete kit_p_ ;
+ kit_p_ =0;
+ }
+
if (kit_p_) {
- if (default_key_b_)
- typeset_breakable_item(0,0,kit_p_);
- else
+ if (change_key_b_)
typeset_breakable_item(
new Key_item(*kit_p_), kit_p_, new Key_item(*kit_p_));
+ else
+ typeset_breakable_item(0,0,kit_p_);
kit_p_ = 0;
}
}
void
Key_register::read_req(Key_change_req * r)
{
+ key_.multi_octave_b_ = r->multi_octave_b_;
accidental_idx_arr_.set_size(0);
for (int i = 0; i < r->melodic_p_arr_.size(); i ++) {
- int n_i=r->melodic_p_arr_[i]->notename_i_;
- key_.set(n_i, r->melodic_p_arr_[i]->accidental_i_);
+ Melodic_req * m_l =r->melodic_p_arr_[i];
+ int n_i=m_l->notename_i_;
+ int a_i = m_l->accidental_i_;
+ int o_i = m_l->octave_i_;
+ if (r->multi_octave_b_)
+ key_.set(o_i, n_i, a_i);
+ else
+ key_.set(n_i, a_i);
accidental_idx_arr_.push(n_i);
}
}
keyreq_l_ = 0;
default_key_b_ = false;
kit_p_ = 0;
+ change_key_b_ = false;
}
IMPLEMENT_STATIC_NAME(Key_register);
ADD_THIS_REGISTER(Key_register);
const int OCTAVES=14; // ugh..
const int ZEROOCTAVE=7;
-Key::Key()
+Octave_key::Octave_key()
{
accidental_i_arr_.set_size(7);
for (int i= 0; i < 7 ; i++)
accidental_i_arr_[i] = 0;
}
-Local_key::Local_key()
+Key::Key()
{
+ multi_octave_b_ = false;
octaves.set_size(OCTAVES);
}
-Key&
-Local_key::oct(int i)
+Octave_key&
+Key::oct(int i)
+{
+ return octaves[i+ZEROOCTAVE];
+}
+
+Octave_key
+Key::oct(int i)const
{
return octaves[i+ZEROOCTAVE];
}
void
-Key::set(int i, int a)
+Octave_key::set(int i, int a)
{
assert(a > -3 && a < 3);
accidental_i_arr_[i]=a;
}
+void
+Key::set(int o, int n , int a)
+{
+ octaves[o + ZEROOCTAVE].set(n,a);
+}
void
-Local_key::reset(Key k)
+Key::set (int n, int a)
{
for (int i= 0; i < OCTAVES ; i++)
- octaves[i] = k;
+ octaves[i].set(n,a);
}
-
+<notes,INITIAL,lyrics>
include {
yy_push_state(incl);
}
<lyrics>[{}] {
return YYText()[0];
}
-<lyrics>[()\[\]|/.^>_-] {
+<lyrics>[()\[\]|/.^>;_-] {
return yylval.c = YYText()[0];
}
<notes>. {
return yylval.c = YYText()[0];
}
+<INITIAL,lyrics,notes>\\. {
+ char c= YYText()[1];
+ yylval.c = c;
+ switch (c) {
+ case '>':
+ return E_BIGGER;
+ case '<':
+ return E_SMALLER;
+ case '!':
+ return E_EXCLAMATION;
+ default:
+ return E_CHAR;
+ }
+}
<*>. {
LexerError( String( "illegal character: " ) +String( YYText()[0] ));
mtor << "(keyword)\n";
return l;
}
+ Identifier * id = lookup_identifier(str);
+ if (id) {
+ mtor << "(identifier)\n";
+ yylval.id = id;
+ return id->token_code_i_;
+ }
String *sp = new String( str);
yylval.string=sp;
return STRING;
My_lily_lexer::scan_bare_word(String str)
{
mtor << "word: `" << str<< "'\n";
- Identifier * id = lookup_identifier(str);
- if (id) {
- mtor << "(identifier)\n";
- yylval.id = id;
- return id->token_code_i_;
+ if (YYSTATE == notes){
+ Melodic_req * mel_l = lookup_melodic_req_l(str);
+ if (mel_l) {
+ mtor << "(notename)\n";
+ yylval.melreq = mel_l;
+ return NOTENAME_ID;
+ }
+ }
+ if (YYSTATE != notes) {
+ // ugr. Should do this in note mode?
+ Identifier * id = lookup_identifier(str);
+ if (id) {
+ mtor << "(identifier)\n";
+ yylval.id = id;
+ return id->token_code_i_;
+ }
}
-
yylval.string=new String( str );
return STRING;
}
Key_register * key_reg_l =
(Key_register*)info.origin_reg_l_arr_[0];
key_C_ = &key_reg_l->key_;
- local_key_.reset(*key_C_);
+ local_key_ = *key_C_;
}
}
Time_description const * time_C_ = get_staff_info().time_C_;
if (! time_C_->whole_in_measure_){
if (key_C_)
- local_key_.reset(*key_C_);
+ local_key_= *key_C_;
else if( time_C_->when_ >Moment(0))
warning ("Help me! can't figure current key");
}
void
destill_inname( String &name_str_r);
Long_option_init theopts[] = {
- 1, "output", 'o',
- 0, "warranty", 'w',
- 0, "help", 'h',
- 0, "debug", 'd',
- 1, "init", 'i',
- 1, "include", 'I',
- 0, "midi", 'M',
- 0,0,0
+ {1, "output", 'o'},
+ {0, "warranty", 'w'},
+ {0, "help", 'h'},
+ {0, "debug", 'd'},
+ {1, "init", 'i'},
+ {1, "include", 'I'},
+ {0, "midi", 'M'},
+ {0,0,0}
};
void
#include <strstream.h>
#include <ctype.h>
-
+#include "notename-table.hh"
#include "interval.hh"
#include "identifier.hh"
#include "assoc-iter.hh"
-#include "out/parser.hh"
+#include "parser.hh"
#include "keyword.hh"
#include "assoc.hh"
#include "my-lily-lexer.hh"
#include "parseconstruct.hh"
static Keyword_ent the_key_tab[]={
- "bar", BAR,
- "cadenza", CADENZA,
- "clef", CLEF,
- "cm", CM_T,
- "duration", DURATIONCOMMAND,
- "absdynamic", ABSDYNAMIC,
- "group", GROUP,
- "geometric", GEOMETRIC,
- "in", IN_T,
- "inputregister", INPUT_REGS,
- "lyric", LYRIC,
- "key", KEY,
- "melodic" , MELODIC,
- "melodic_request", MELODIC_REQUEST,
- "meter", METER,
- "midi", MIDI,
- "mm", MM_T,
- "multivoice", MULTIVOICE,
- "note", NOTE,
- "octave", OCTAVECOMMAND,
- "output", OUTPUT,
- "partial", PARTIAL,
- "paper", PAPER,
- "plet", PLET,
- "pt", PT_T,
- "score", SCORE,
- "script", SCRIPT,
- "skip", SKIP,
- "staff", STAFF,
- "start", START_T,
- "stem", STEM,
- "table", TABLE,
- "spandynamic", SPANDYNAMIC,
- "symboltables", SYMBOLTABLES,
- "tempo", TEMPO,
- "texid", TEXID,
- "textstyle", TEXTSTYLE,
- "transpose", TRANSPOSE,
- "unitspace", UNITSPACE,
- "width", WIDTH,
- "grouping", GROUPING,
- 0,0
+ {"bar", BAR},
+ {"cadenza", CADENZA},
+ {"clear", CLEAR},
+ {"clef", CLEF},
+ {"cm", CM_T},
+ {"duration", DURATIONCOMMAND},
+ {"absdynamic", ABSDYNAMIC},
+ {"group", GROUP},
+ {"geometric", GEOMETRIC},
+ {"in", IN_T},
+ {"inputregister", INPUT_REGS},
+ {"lyric", LYRIC},
+ {"key", KEY},
+ {"melodic" , MELODIC},
+ {"melodic_request", MELODIC_REQUEST},
+ {"meter", METER},
+ {"midi", MIDI},
+ {"mm", MM_T},
+ {"multivoice", MULTIVOICE},
+ {"note", NOTE},
+ {"notenames", NOTENAMES},
+ {"octave", OCTAVECOMMAND},
+ {"output", OUTPUT},
+ {"partial", PARTIAL},
+ {"paper", PAPER},
+ {"plet", PLET},
+ {"pt", PT_T},
+ {"score", SCORE},
+ {"script", SCRIPT},
+ {"skip", SKIP},
+ {"staff", STAFF},
+ {"start", START_T},
+ {"stem", STEM},
+ {"table", TABLE},
+ {"spandynamic", SPANDYNAMIC},
+ {"symboltables", SYMBOLTABLES},
+ {"tempo", TEMPO},
+ {"texid", TEXID},
+ {"textstyle", TEXTSTYLE},
+ {"transpose", TRANSPOSE},
+ {"unitspace", UNITSPACE},
+ {"width", WIDTH},
+ {"grouping", GROUPING},
+ {0,0}
};
My_lily_lexer::My_lily_lexer()
identifier_assoc_p_ = new Assoc<String, Identifier*>;
errorlevel_i_ = 0;
post_quotes_b_ = false;
-
+ note_tab_p_ = new Notename_table;
}
int
Identifier*
My_lily_lexer::lookup_identifier(String s)
{
- if (!identifier_assoc_p_->elt_query(s))
+ if (!identifier_assoc_p_->elt_b(s))
return 0;
return (*identifier_assoc_p_)[s];
void
My_lily_lexer::add_identifier(Identifier*i)
{
- delete lookup_identifier(i->name);
- (*identifier_assoc_p_)[i->name] = i;
+ delete lookup_identifier(i->name_str_);
+ (*identifier_assoc_p_)[i->name_str_] = i;
}
My_lily_lexer::~My_lily_lexer()
for (Assoc_iter<String,Identifier*>
ai(*identifier_assoc_p_); ai.ok(); ai++) {
mtor << "deleting: " << ai.key()<<'\n';
- Identifier *i_p = ai.val();
- if (!i_p->accessed_b_ && !i_p->init_b_)
- i_p->warning("Variable not used");
-
delete ai.val();
}
+ delete note_tab_p_;
delete identifier_assoc_p_;
}
void
*mlog << "error at EOF" << s << '\n';
} else {
errorlevel_i_ |= 1;
- error(String(s));
- // FIXME.
-/*Input spot(source_l_g = here_spot();
+
+ Input spot(source_file_l(),here_ch_C());
spot.error( s );
- */
}
}
+Melodic_req*
+My_lily_lexer::lookup_melodic_req_l(String s)
+{
+ return note_tab_p_->get_l(s);
+}
+
+void
+My_lily_lexer::add_notename(String s, Melodic_req *p)
+{
+ note_tab_p_->add(s,p);
+}
+
+void
+My_lily_lexer::clear_notenames()
+{
+ delete note_tab_p_;
+ note_tab_p_ = new Notename_table;
+}
#include "voice-element.hh"
#include "musical-request.hh"
#include "command-request.hh"
+#include "parser.hh"
+
+void
+My_lily_parser::clear_notenames()
+{
+ lexer_p_->clear_notenames();
+}
void
My_lily_parser::set_debug()
void
My_lily_parser::parser_error(String s)
{
- lexer_p_->LexerError(s);
-
+ here_input().error(s);
if ( fatal_error_i_ )
exit( fatal_error_i_ );
error_level_i_ = 1;
{
Request* req_p=0;
switch (c) {
- case '|':
- req_p = new Barcheck_req;
- break;
case '[':
case ']':
}
break;
-
+ case '>':
+ case '!':
+ case '<':
+ req_p = new Span_dynamic_req;
+ break;
+
case ')':
case '(':
req_p = new Slur_req;
}
switch (c) {
+ case '<':
+ case '>':
case '(':
case '[':
req_p->span()->spantype = Span_req::START;
break;
+ case '!':
case ')':
case ']':
req_p->span()->spantype = Span_req::STOP;
break;
}
+ if (req_p->musical()->span_dynamic()) {
+ Span_dynamic_req* s_l= (req_p->musical()->span_dynamic()) ;
+ s_l->dynamic_dir_i_ = (c == '<') ? 1:-1;
+ }
+
req_p->set_spot( here_input());
return req_p;
}
Source_file * f_l= lexer_p_->source_file_l();
return Input(f_l, here_ch_C());
}
+
+void
+My_lily_parser::add_notename(String s, Melodic_req * m_p)
+{
+ lexer_p_->add_notename(s, m_p);
+}
return plet_req_p;
}
-
-void
-add_requests(Voice_element *v, Array<Request*> &req)
-{
- for (int i = 0; i < req.size(); i++) {
- v->add(req[i]);
- }
- req.set_size(0);
-}
String *
get_scriptdef(char c)
{
{
Measure_grouping_req * mr_p = new Measure_grouping_req;
for (int i=0; i <i_arr.size(); ) {
- mr_p->beat_i_arr_.push(i_arr[i++]);
mr_p->elt_length_arr_.push(Moment(1, i_arr[i++]));
+ mr_p->beat_i_arr_.push(i_arr[i++]);
}
return mr_p;
}
--- /dev/null
+/*
+ notename-table.cc -- implement Notename_table
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "notename-table.hh"
+#include "pointer.tcc"
+#include "musical-request.hh"
+
+template class P<Melodic_req>;
+
+void
+Notename_table::add(String s, Melodic_req *m_p)
+{
+ elem(s).set_p(m_p);
+}
+
+Melodic_req*
+Notename_table::get_l(String s)
+{
+ if (! elt_b(s))
+ return 0;
+ return elem(s);
+}
+
%token BAR
%token CADENZA
+%token CLEAR
%token CLEF
%token CM_T
%token DURATIONCOMMAND
%token MM_T
%token MULTIVOICE
%token NOTE
+%token NOTENAMES
%token OCTAVECOMMAND
%token OUTPUT
%token PAPER
%token UNITSPACE
%token WIDTH
+/* escaped */
+%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
+
%token <i> DOTS
%token <i> INT
+%token <melreq> NOTENAME_ID
%token <id> REGS_IDENTIFIER
%token <id> IDENTIFIER
%token <id> MELODIC_REQUEST_IDENTIFIER
%type <paper> paper_block paper_body
%type <real> dim real
%type <real> unit
-%type <request> post_request pre_request command_req
+%type <request> post_request pre_request command_req verbose_command_req abbrev_command_req
%type <request> pure_post_request pure_post_request_choice
%type <request> script_req textscript_req dynamic_req
%type <score> score_block score_body
}
| mudela add_declaration { }
| mudela error
+ | mudela add_notenames { }
;
-
+add_notenames:
+ NOTENAMES '{' notenames_body '}'
+ ;
+notenames_body:
+ /**/ {
+ }
+ | notenames_body CLEAR {
+ THIS->clear_notenames();
+ }
+ | notenames_body STRING '=' melodic_request {
+ THIS->add_notename(*$2, $4);
+ delete $2;
+ }
+ ;
/*
DECLARATIONS
*/
}
| old_identifier {
THIS->remember_spot();
- $$ = new String($1->name);
+ $$ = new String($1->name_str_);
THIS->here_input().warning("redeclaration of `" + *$$ + "'");
}
;
staff_init:
- REGS_IDENTIFIER {
+ STAFF_IDENTIFIER {
+ $$ = $1->staff(true);
+ }
+ | REGS_IDENTIFIER {
$$ = new Input_staff;
$$->ireg_p_ = $1->iregs(true);
}
| music_voice_body full_element {
$$->add_elt($2);
}
- | music_voice_body voice_command {
+ | music_voice_body voice_command ';' {
}
| music_voice_body music_chord {
$$->add($2);
$$-> set_spot( THIS->here_input());
}
/* cont: */
- command_req {
+ command_req {
$2-> set_spot( THIS->here_input());
$$->add($2);
;
command_req:
+ abbrev_command_req
+ | verbose_command_req ';' { $$ = $1; }
+ ;
+
+abbrev_command_req:
'|' {
$$ = new Barcheck_req;
}
- | BAR STRING {
+ ;
+
+verbose_command_req:
+ BAR STRING {
$$ = new Bar_req(*$2);
delete $2;
}
- | METER '{' int '/' int '}' {
+ | METER int '/' int {
Meter_change_req *m = new Meter_change_req;
- m->set($3,$5);
+ m->set($2,$4);
// sorry hw, i need meter at output of track,
// but don-t know where to get it... statics should go.
// HW : default: 4/4, meterchange reqs may change it.
- Midi_def::num_i_s = $3;
- Midi_def::den_i_s = $5;
+ Midi_def::num_i_s = $2;
+ Midi_def::den_i_s = $4;
$$ = m;
}
- | SKIP '{' duration_length '}' {
+ | SKIP duration_length {
Skip_req * skip_p = new Skip_req;
- skip_p->duration_ = *$3;
- delete $3;
+ skip_p->duration_ = *$2;
+ delete $2;
$$ = skip_p;
}
- | CADENZA '{' int '}' {
- $$ = new Cadenza_req($3);
+ | CADENZA int {
+ $$ = new Cadenza_req($2);
}
- | PARTIAL '{' duration_length '}' {
- $$ = new Partial_measure_req(*$3);
- delete $3;
+ | PARTIAL duration_length {
+ $$ = new Partial_measure_req(*$2);
+ delete $2;
}
- | STEM '{' int '}' {
- $$ = get_stemdir_req($3);
+ | STEM int {
+ $$ = get_stemdir_req($2);
}
| CLEF STRING {
$$ = new Clef_change_req(*$2);
delete $2;
}
- | KEY '{' pitch_list '}' {
+ | KEY pitch_list {
Key_change_req *key_p= new Key_change_req;
- key_p->melodic_p_arr_ = *$3;
+ key_p->melodic_p_arr_ = *$2;
$$ = key_p;
- delete $3;
+ delete $2;
}
- | GROUPING '{' intastint_list '}' {
- $$ = get_grouping_req(*$3); delete $3;
+ | GROUPING intastint_list {
+ $$ = get_grouping_req(*$2); delete $2;
}
| GROUP STRING {
$$ = new Group_change_req;
URG!!
*/
steno_melodic_req:
- MELODIC_REQUEST_IDENTIFIER {
- $$ = $1->request(false)->clone()->melodic();
+ NOTENAME_ID {
+ $$ = $1->clone()->melodic();
$$->octave_i_ += THIS->default_octave_i_;
}
| steno_melodic_req POST_QUOTES {
| ']' {
$$ = ']';
}
+ | E_SMALLER {
+ $$ = '<';
+ }
+ | E_BIGGER {
+ $$ = '>';
+ }
;
open_request_parens:
- ')' {
+ E_EXCLAMATION {
+ $$ = '!';
+ }
+ | ')' {
$$=')';
}
| '[' {
}
;
+
+
script_definition:
SCRIPT '{' script_body '}' { $$ = $3; }
;
;
voice_command:
- PLET '{' INT '/' INT '}' {
- THIS->default_duration_.set_plet($3,$5);
+ PLET INT '/' INT {
+ THIS->default_duration_.set_plet($2,$4);
}
- | DURATIONCOMMAND '{' STRING '}' {
- THIS->set_duration_mode(*$3);
- delete $3;
+ | DURATIONCOMMAND STRING {
+ THIS->set_duration_mode(*$2);
+ delete $2;
}
- | DURATIONCOMMAND '{' notemode_duration '}' {
- THIS->default_duration_ = *$3;
- delete $3;
+ | DURATIONCOMMAND notemode_duration {
+ THIS->default_duration_ = *$2;
+ delete $2;
}
- | OCTAVECOMMAND { THIS->default_octave_i_ = 2; }
+ | OCTAVECOMMAND {
+ /*
+ This is weird, but default_octave_i_
+ is used in steno_note_req too
+
+ c' -> default_octave_i_ == 1
+ */
+ /* why can't we have \oct{0} iso \oct{c'}*/
+ THIS->default_octave_i_ = 1; }
/* cont */
- '{' steno_melodic_req '}' {
- THIS->default_octave_i_ = $4->octave_i_;
+ steno_melodic_req {
+ THIS->default_octave_i_ = $3->octave_i_;
+ delete $3;
}
| TEXTSTYLE STRING {
THIS->textstyle_str_ = *$2;
explicit_duration:
int {
$$ = new Duration;
- $$->type_i_ = $1;
+ if ( !Duration::duration_type_b($1) )
+ THIS->parser_error("Not a duration");
+ else
+ $$->type_i_ = $1;
}
| explicit_duration DOTS {
$$->dots_i_ = $2;
pitch_list: {
$$ = new Array<Melodic_req*>;
}
- | pitch_list MELODIC_REQUEST_IDENTIFIER {
- $$->push($2->request(false)->clone()->melodic());
+ | pitch_list NOTENAME_ID {
+ $$->push($2->clone()->melodic());
}
;
s->find_col(s->last(), false)->set_breakable();
}
reinit();
+ breaks_i_=0;
}
walker_p_arr_[i]->process();
}
}
- if (when().denominator() == 1) {
- *mlog << "." <<flush;
+ if (break_allowed_b()){
+ breaks_i_ ++;
+ if (! (breaks_i_ % 8))
+ *mlog << "[" <<breaks_i_<<"]"<<flush;
}
}
Score_walker::~Score_walker()
{
+ *mlog << "[" <<breaks_i_<<"]"<<flush;
for (int i=0; i < walker_p_arr_.size(); i++)
delete walker_p_arr_[i];
assert( !score_l_->find_col(score_l_->last(), true)->used_b());
}
if ( req_l->stem() ) {
- if (current_grouping && !current_grouping->child_fit_query(
+ if (current_grouping && !current_grouping->child_fit_b(
get_staff_info().time_C_->whole_in_measure_))
return false;
+/*
+ symtable.cc -- implement Symbol_table
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "misc.hh"
#include "dimen.hh"
#include "debug.hh"
Symbol
Symtable::lookup(String s) const
{
- if (elt_query(s))
+ if (elt_b(s))
return (*this)[s];
else {
error( "Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
ostream *mlog(&cerr);
-void
-error(String s)
-{
- cerr << "error: " << s << "\n";
-
- exit(1);
-}
void
error_t(String const & s, Moment const & r)
String e=s+ " (at t=" + String(t_tdes.bars_i_) + ": " + String(t_tdes.whole_in_measure_) + ")\n";
error(e);
}
-
-void
-warning(String m)
-{
- cerr << "warning" <<m <<endl;
-
-}
-
-void
-message(String m)
-{
- cerr << m<<endl;
-}
# list of distribution files:
#
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in lilypond.lsm.in
#
# generic variables:
--- /dev/null
+Begin3
+Title: LilyPond
+Version: @TOPLEVEL_VERSION@
+Entered-date: @DATE@
+Description: LilyPond is a program which converts a music-script (mudela) into
+TeX output, or MIDI to produce multi-staff scores. Features include multiple
+meters, clefs, keys, lyrics, versatile input-language, cadenzas
+beams, slurs, triplets.
+Keywords: music typesetting midi notation
+Author: hanwen@stack.nl (Han-Wen Nienhuys)
+Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
+Primary-site: pcnov095.win.tue.nl /pub/lilypond/
+ 300k lilypond-@TOPLEVEL_VERSION@.tar.gz
+Alternate-site:
+Original-site:
+Platform: unix/win32, GNU C++
+Copying-policy: GPL
+End
#include "proto.hh"
#include "plist.hh"
-#include "debug.hh"
+#include "warn.hh"
#ifdef mtor
#undef mtor
#endif
{
delete os_p_;
if ( indent_i_ )
- warning( "lily indent level: " + String( indent_i_ ), 0 );
+ warning( "lily indent level: " + String( indent_i_ ));
}
Lily_stream&
{
os_p_ = new ofstream( filename_str_ );
if ( !*os_p_ )
- error ( "can't open `" + filename_str_ + "\'", 0 );
+ error ( "can't open `" + filename_str_ + "\'");
}
void
Verbose level_ver = NORMAL_ver;
-//ugh
-char const* defined_ch_C = 0;
-
// ugh, another global
String
find_file( String str )
return str;
}
-// ugh, copied from warn.cc, cannot use
-void
-message( String message_str, char const* context_ch_C )
-{
- String str = "mi2mu: ";
- Source_file* sourcefile_l = source_l_g->sourcefile_l( context_ch_C );
- if ( sourcefile_l ) {
- str += sourcefile_l->file_line_no_str(context_ch_C) + String(": ");
- }
- str += message_str;
- if ( sourcefile_l ) {
- str += ":\n";
- str += sourcefile_l->error_str( context_ch_C );
- }
-// if ( busy_parsing() )
- cerr << endl; // until we have fine output manager...
- cerr << str << endl;
-}
-
-void
-warning( String message_str, char const* context_ch_C )
-{
- message( "warning: " + message_str, context_ch_C );
-}
-
-void
-error( String message_str, char const* context_ch_C )
-{
- message( message_str, context_ch_C );
- // since when exits error again?
- // i-d say: error: errorlevel |= 1; -> no output upon error
- // warning: recovery -> output (possibly wrong)
- if ( midi_lexer_l_g )
- midi_lexer_l_g->errorlevel_i_ |= 1;
-}
-
void
usage()
{
{
sync_f_ = 1.0;
if ( count_32_i != 8 )
- warning( String( "#32 in quarter: " ) + String( count_32_i ), 0 );
+ warning( String( "#32 in quarter: " ) + String( count_32_i ));
num_i_ = num_i;
den_i_ = den_i;
clocks_1_i_ = clocks_4_i * 4;
}
<meta_event>{U8} {
warning( String( "meta_event: unimplemented event: " )
- + String_convert::bin2hex_str( String( *YYText() ) ),
- this->here_ch_C() );
+ + String_convert::bin2hex_str( String( *YYText() ) )
+//, this->here_ch_C()
+ );
yy_pop_state();
yy_pop_state();
yy_push_state( u8 );
void
My_midi_lexer::error( char const* sz_l )
{
- if ( !source_file_l_ ) {
+ if (1|| !source_file_l_ ) {
cerr << "error at EOF" << sz_l << '\n';
} else {
+
+ // FIXME
+ #if 0
char const* ch_C = here_ch_C();
if ( ch_C ) {
ch_C--;
ch_C++;
}
errorlevel_i_ |= 1;
- ::error( sz_l, ch_C );
+ error( sz_l);
+ #endif
}
}
division_1_i_ = division_4_i * 4;
Duration::division_1_i_s = division_1_i_;
if ( division_4_i < 0 )
- warning( "seconds iso metrical time" , 0 );
+ warning( "seconds iso metrical time" );
}
void