Stem 1
Staff 1
Score 1
-Voice 1
-Voice_element 1
+Voice 0
+Voice_element 0
Input_cursor 1
Commands_at 1
Input_command 1
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 44
+TOPLEVEL_PATCH_LEVEL = 45
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
=item *
Bash. Most scripts will continue to work with a stock sh, but they
-will generate (harmless) syntax errors
+might generate (harmless) syntax errors
=item *
GNU make.
localclean:
rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES)
-localinstall: $(outdir)/lilypond.1
+localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5
+ $(INSTALL) -d $(mandir)/man5
$(INSTALL) -d $(mandir)/man1
- $(INSTALL) -m 755 $< $(mandir)/man1
-
+ $(INSTALL) -m 755 $(outdir)/lilypond.1 $(mandir)/man1
+ $(INSTALL) -m 755 $(outdir)/mudela.5 $(mandir)/man5
+
localuninstall:
rm -f $(mandir)/man1/lilypond.1
=head1 DOCUMENTATION
=item *
-<a href=README.html
+<a href=lilypond.html
>
-README
+The manual page
</a
>
>
=item *
-<a href=lilyinput.html
+<a href=mudela.html
>
-notes on the input format
+Mudela, the input format
</a
>
=item *
<a href=faq.html
>
-FAQ
+FAQs
</a
>
>
=item *
-<a href=lelie_logo.png
+<a href=lelieblond.png
>
-The lilypond logo (in PNG format)
+The lilypond logo (Big)
+</a
+>
+
+=item *
+<a href=lelie_logo.gif
+>
+The lilypond logo (in gif format)
</a
>
=item *
-<a href=wohltemperirt.ly
+<a href=wohltemperirt.ly.txt
>
An example inputfile: from Bach's WTK: c-minor fugue
</a
=back
-=head1 REQUESTS
-
-[see F<request.hh>]
-
-Any Voice_element can do a number of requests. A request is done
-to the C<Staff> which contains the C<Voice_element>. The staff decides
-whether to to honor the request, ignore it, or merge it with other
-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.
-
-This subfield would come in handy, if LilyPond was adapted for midi
-support.
=back
deciding which requests should be honored, which should merged with
other requests, and which should be ignored. Consider this (pseudo)input
- { % chord
+ < % chord
\music { [c() c] }
\music { [e() e] }
- }
+ >
Both the c and e are part of a chord (they are in the same
Voice_group), so they should share the beams, and the two [ ] pairs
LilyPond first reads 'symbol.ini', which contains declarations crucial
to proper operation of LilyPond (symbol tables, note names).
+
+This language looks a lot like Rayce's (Rayce is a raytracer that I've
+written as a hobby project. I used as a practice program for writing
+(among others) C++ and Yacc. It also gave me RSI :-( ) which in turn
+owes a lot to the POVRay raytracer. Now, I know, musictypesetting and
+Raytracing do not necessarily require the same input format, but I was
+just to lazy to make up a new and/or better input format. Suggestions
+appreciated.
+=head1 NAME
+
+LilyInput - LilyPond input format
+
+=head1 DESCRIPTION
+
+This page globally documents the the LilyPond input format, mudela.
+To get a better impression, please study some examples.
+
+=head2 Overview
+
+General format of a construct:
+
+ BLOCKNAME { <info to go with this block> }
+
+Some types allow declarations:
+
+ IDENTIFIER = BLOCKNAME {
+ <info to go with this block>
+ }
+
+ ..
+
+ BLOCKNAME {
+ IDENTIFIER
+ ...
+ }
+
+
+In musicmode, eg,
+
+ ''!c8.-"text"_v
+
+and in lyricmode, eg,
+
+ Twin- kle, twin- kle lit- tle star,2
+
+a lot of characters parse differently
+than in "command" mode, eg,
+
+ identifier = score { .. }
+
+So you have to signal this to the tokenizer. This is done with
+'$'. '$' is a delimiter, which used by the tokenizer only. The same
+goes for lyrics, it has a '@' delimiter.
+
+=item *
+musicmode: The brace still is used to group grammatical groups.
+
+=item *
+musicmode: "word" are preceded by a '\' (backslash)
+
+This means you can write some stuff in a zillion ways:
+
+=item 1.
+ $\var = \blockname { ... } $
+
+=item 2.
+ var = blockname { $ ... $ }
+
+=item 3.
+ var = $ $ $\blockname { ... $ }
+
+=head2 Comments
+
+Not really crystallized; you can use '#' or '%' as line comment
+
+=head2 other
+
+LilyPond first reads 'symbol.ini', which contains declarations crucial
+to proper operation of LilyPond (symbol tables, note names).
Jan Nieuwenhuizen <jan@digicash.com>, Context errors, Lyrics,
mi2mu, MIDI stuff, make structure, bits of FlowerLib, general
-comments.
+comments, Mudela design.
=item *
This document describes the the LilyPond input format, which is an
effective language for definining music. We call this language
-(rather arrogantly) The Musical Definition Language (S<Mudela 2>).
+(rather arrogantly) The Musical Definition Language (S<Mudela 0.1>).
The first aim of Mudela is to define a piece of music,
being complete from both from a musical typesetting,
followed by alpha-numerics. Identifiers can contain any characters
(except whitespace, C<$> and C<%>), if you use this construct:
- $Id_with###@weird92chars =
+ $i'm_a_weird###identifier
+
+(which is the identifier with the name
+C<i'm_a_weird###identifier> ). C<$> Takes any sequence of
+characters which are not whitespace, C<$> and C<%>.
+
+ \$i'm_a_weird###escaped_word
=head2 Nesting characters
Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To
-aid the eye in reading, for chords the C<<> and the C<>> are used as
+aid the eye in reading, for chords the < and the > are used as
nesting braces.
=head2 Identifiers
Most instantiations that use an IDENTIFIER are specified as follows:
- \TYPE { IDENTIFIER [...] }
+ \TYPE{ IDENTIFIER [...] }
Some exceptions on this rule have been made to prevent inputting
Mudela becoming tedious
maintenance no long examples are included in this document.
+=head1 INTERNALS
+
+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.
+Consider the following simple mudela
+
+ \music { c4 <e4 g4> }
+
+After the parsing, this is converted to: (from the debug output)
+
+ Voice { start: 0
+ voice_element { dur :1/4
+ Stem_req {duration { 4}}
+ Note_req {notename: 0 acc: 0 oct: -1
+ duration { 4}}
+ Group_change_req {}
+ }
+ voice_element { dur :0
+ Terminate_voice_req {}
+ }
+ }
+
+ Voice { start: 1/4
+ voice_element { dur :1/4
+ Stem_req {duration { 4}}
+ Note_req {notename: 2 acc: 0 oct: -1
+ duration { 4}}
+ Group_change_req {}
+ }
+ voice_element { dur :0
+ Terminate_voice_req {}
+ }
+ }
+
+ Voice { start: 1/4
+ voice_element { dur :1/4
+ Stem_req {duration { 4}}
+ Note_req {notename: 4 acc: 0 oct: -1
+ duration { 4}}
+ Group_change_req {}
+ }
+ voice_element { dur :0
+ Terminate_voice_req {}
+ }
+ }
+
+
=head2 Requests
+As you can see, most information is stored in the form of a request.
+In music typesetting, the user might want to cram a lot more symbols
+on the paper than actually fits. To reflect this idea (the user asks
+more than we can do), the container for this data is called Request.
+
+A request is done to
+the C<Staff> which contains the C<Voice_element>. The staff decides
+whether to to honor the request, ignore it, or merge it with other
+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
it will not compile with AT&T CC.
+\bo Bash. Most scripts will continue to work with a stock
- sh, but they will generate (harmless) syntax errors
+ sh, but they might generate (harmless) syntax errors
+\bo GNU make.
-24/Mar/97 LilyPond 0.0.44 1
+25/Mar/97 LilyPond 0.0.45 1
-24/Mar/97 LilyPond 0.0.44 2
+25/Mar/97 LilyPond 0.0.45 2
-24/Mar/97 LilyPond 0.0.44 3
+25/Mar/97 LilyPond 0.0.45 3
+++ /dev/null
-#
-# project LilyPond -- the musical typesetter
-# title top level makefile for LilyPond
-# file Makefile
-#
-# Copyright (c) 1997 by
-# Jan Nieuwenhuizen <jan@digicash.com>
-# Han-Wen Nienhuys <hanwen@stack.nl>
-# ...your sort order here, or how to comment-out a comment
-
-# subdir level:
-#
-depth = .
-#
-
-# identify module:
-#
-NAME = lilypond
-include .version
-include ./$(depth)/make/Version.make
-
-# generic variables:
-#
-include ./$(depth)/make/Variables.make
-#
-
-# descent order into subdirectories:
-#
-SUBDIRS = flower lib lily mi2mu \
- Documentation bin init input tex make
-#
-
-# list of distribution files:
-#
-# SYMLINKS = # naah, configure
-SCRIPTS = configure configure.in install-sh
-README_FILES = ANNOUNCE COPYING NEWS README TODO INSTALL.text
-EXTRA_DISTFILES= .dstreamrc .version $(README_FILES) $(SCRIPTS) $(SYMLINKS)
-#
-
-
-# generic targets and rules:
-#
-include ./$(depth)/make/Targets.make
-include ./$(depth)/make/Rules.make
-#
-
-localdist: configure
-
-# ugh. I know dep is not quite what is really needed.
-INSTALL.text: check-doc-deps
- rm -f INSTALL.text
- ln `find -name INSTALL.text|head -1` .
-
-localclean:
- rm -f $(allexe) core config.cache config.log config.status
-
-localinstall: all
- $(INSTALL) -d $(bindir)
- $(INSTALL) -m 755 $(allexe) $(bindir)
-
-localuninstall:
- for i in $(allexe); do rm -f $(bindir)/`basename $$i`; done
\ No newline at end of file
+pl 45
+ - Removing unused Voice_regs & Voice_groups
+ - -O2 bugfix
+
+pl 44.jcn1
+ - merged 42.3 42.jcn4 code trees (see stuff below)
+ - moving towards Mudela 0.1 (again)
+ * keyword "music" dropped for horizontal music
+ * keywords "\lyric" "\melodic" introduced, e.g.:
+ melody = \melodic { c c | g g }
+ * removed level of indirection:
+ - staff initialisable with music identifier list:
+ \staff{ global melody }
+ - \score and staffs alike
+ - gnu standard(?) help texts
+ - configure "creates" toplevel Makefile from make/Toplevel.make
+
+Bugfix
+ - fixed mi2mu
+ - write meter to track0 too...
+ - default octave
+ - new Sources in My_midi_lexer: sourcefile_p_ = get_file_l(): oeps.
+ (ain-t hungarian grand?)
+
+Examples
+ - updated for mudela 0.1
+
******
pl 44
+ - naming: _c_l -> _C
- pure parser, My_lily_parser
- ''a iso ``a
- Includable_lexer
- declaration used check.
-
+pl 42.jcn4
+ - lily writes midi meter/key changes from requests
+ - mi2mu:
+ + write mudela 0.1
+ + write bar change requests
+ + more tunable quantisation
+
+Examples
+ - half-new-menuetto.ly converted to mudela -almost- 0.1
+ - new mi2mu of bach's wtk pre1/fugue1
+
+pl 42.3 (jcn version)
+ - oeps, branched source tree
+
pl 42.hwn3
- const naming change (T const <-> const T)
- Mudela 0.1 (roughly the same as below..)
pl 42.3
- moving towards Mudela 0.1:
- * (almost) all keywords must be preceded by backslash '\'
+ * all keywords must be preceded by backslash '\'
* explicit lexer switches '$' and '@' dropped
* keyword "music" dropped for horizontal music
* keywords "\lyric" " introduced, e.g.:
before 0.1
- * fix -O2 -NDEBUG compile
-
* remove spurious/outdated comments in .ly, debug .ly
* pushgroup, popgroup.
* cis ( | ) cis
- * Group_feature at start of music.
-
* parser error handling (can you say Segfault?)
SEVERELY LACKING:
SMALLISH PROJECTS
* key transposition
+
+ * caching breakpoints / saving them.
* key { C }
* use tors feature in lily
+ * do conventional keys (C G A, F B E, a e fis, d as des, etc ),
+ besides lists of flats/sharps
+
* midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
* fix Staff_elem::width() derivs to use offset_
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
-
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
enableval="$enable_printing"
- :
-else
- DEFINES="$DEFINES -DNPRINT=1"
+ printing_b=$enableval
fi
+
+
# Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then
enableval="$enable_checking"
- DEFINES="$DEFINES -DNDEBUG=1"
+ checking_b=$enableval
fi
+
+
+
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
- :
-else
- DEFINES="$DEFINES -g"
+ debug_b=$enableval
fi
+
# Check whether --enable-optimise or --disable-optimise was given.
if test "${enable_optimise+set}" = set; then
enableval="$enable_optimise"
- DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+ optimise_b=$enableval
fi
+
+
# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
enableval="$enable_profiling"
- DEFINES="$DEFINES -pg"
+ profile_b=$enableval
fi
+
# Check whether --enable-texprefix or --disable-texprefix was given.
if test "${enable_texprefix+set}" = set; then
enableval="$enable_texprefix"
TEXPREFIX=auto
fi
+
+if test $profile_b = yes; then
+ EXTRA_LIBES="-pg"
+ DEFINES="$DEFINES -pg"
+fi
+
+if test $printing_b = no; then
+ DEFINES="$DEFINES -DNPRINT=1"
+fi
+
+if test $debug_b = yes; then
+ DEFINES="$DEFINES -g"
+fi
+if test $checking_b = no; then
+ DEFINES="$DEFINES -DNDEBUG=1"
+fi
+if test $optimise_b = yes; then
+ DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+fi
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
for ac_prog in $CCC c++ g++ gcc CC cxx cc++
# 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:594: checking for $ac_word" >&5
+echo "configure:623: 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:625: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:654: 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 635 "configure"
+#line 664 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:668: \"$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:659: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:688: 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:664: checking whether we are using GNU C++" >&5
+echo "configure:693: 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:673: \"$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:702: \"$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:688: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:717: 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:718: checking for $ac_word" >&5
+echo "configure:747: 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:774: checking for a BSD compatible install" >&5
+echo "configure:803: 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:828: checking for $ac_word" >&5
+echo "configure:857: 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:875: checking for $ac_word" >&5
+echo "configure:904: 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:909: checking for $ac_word" >&5
+echo "configure:938: 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:943: checking for $ac_word" >&5
+echo "configure:972: 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 "$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:977: checking for $ac_word" >&5
+echo "configure:1006: 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
# do something sensible if root hasn't specced dir yet attempts install
echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6
-echo "configure:1013: checking TeX installation directory" >&5
+echo "configure:1042: checking TeX installation directory" >&5
ac_tmp_prefix=$prefix
test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix
then
{ echo "configure: error: Please install GNU make" 1>&2; exit 1; }
else
- $MAKE -v| grep -q GNU
+ $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 -q '2\.7'
+if $CXX --version | grep '2\.7' >& /dev/null
then
true
else
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1076: checking how to run the C++ preprocessor" >&5
+echo "configure:1105: 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 1089 "configure"
+#line 1118 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1123: \"$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:1114: checking for FlexLexer.h" >&5
+echo "configure:1143: 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 1119 "configure"
+#line 1148 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
true
else
echo "$ac_t""no" 1>&6
-{ echo "configure: error: can't find flex header. Please install Flex headers correctly" 1>&2; exit 1; }
+echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
fi
subdirs="flower"
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in
+ Makefile:make/Toplevel.make.in
+ " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
s%@BISON@%$BISON%g
s%@FLEX@%$FLEX%g
s%@TEXPREFIX@%$TEXPREFIX%g
+s%@EXTRA_LIBES@%$EXTRA_LIBES%g
s%@MAKE@%$MAKE%g
s%@PODMAN@%$PODMAN%g
s%@CXXCPP@%$CXXCPP%g
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in"}
+CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in
+ Makefile:make/Toplevel.make.in
+ "}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
eval "DIR_DATADIR=$datadir"
DIR_DATADIR="$DIR_DATADIR/lilypond"
echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1521: checking " >&5
+echo "configure:1555: checking " >&5
cat << EOF > lib/out/config.hh
)
(cd flower;
)
-cat << END
+cat << END
Finished configuring. For making everything, do:
make all
AC_LANG_CPLUSPLUS
-
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+
AC_ARG_ENABLE(printing,
- [ enable-printing set debug printing],
- [],
- [DEFINES="$DEFINES -DNPRINT=1"])
+ [ enable-printing set debug printing],
+ [printing_b=$enableval])
+
+
AC_ARG_ENABLE(checking,
- [ disable-checking set runtime checks],
- [DEFINES="$DEFINES -DNDEBUG=1"],
- [])
+ [ disable-checking set runtime checks],
+ [checking_b=$enableval] )
+
+
+
AC_ARG_ENABLE(debug,
- [ disable-debug set debug info],
- [],
- [DEFINES="$DEFINES -g"])
+ [ disable-debug set debug info],
+ [debug_b=$enableval])
+
AC_ARG_ENABLE(optimise,
- [ enable-optimise use maximal speed optimisations],
- [DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"])
-AC_ARG_ENABLE(profiling,
- [ enable-profiling compile with gprof support],
- [DEFINES="$DEFINES -pg"])
+ [ enable-optimise use maximal speed optimisations],
+ [optimise_b=$enableval])
+
+
+AC_ARG_ENABLE(profiling,
+ [ enable-profiling compile with gprof support],
+ [profile_b=$enableval])
+
AC_ARG_ENABLE(texprefix,
- [ texprefix=DIR set the tex-directory to put the lilypond subdir in.],
- [TEXPREFIX=$enableval],
- [TEXPREFIX=auto] )
+ [ texprefix=DIR set the tex-directory to put the lilypond subdir in.],
+ [TEXPREFIX=$enableval],
+ [TEXPREFIX=auto] )
+
+if test $profile_b = yes; then
+ EXTRA_LIBES="-pg"
+ DEFINES="$DEFINES -pg"
+fi
+
+if test $printing_b = no; then
+ DEFINES="$DEFINES -DNPRINT=1"
+fi
+
+if test $debug_b = yes; then
+ DEFINES="$DEFINES -g"
+fi
+if test $checking_b = no; then
+ DEFINES="$DEFINES -DNDEBUG=1"
+fi
+if test $optimise_b = yes; then
+ DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+fi
dnl COMPILEINFO="$HOST $host $TARGET $target"
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
AC_SUBST(BISON)
AC_SUBST(FLEX)
AC_SUBST(TEXPREFIX)
-
+AC_SUBST(EXTRA_LIBES)
AC_CHECK_PROGS(BISON, bison, error)
AC_CHECK_PROGS(FLEX, flex, error)
then
AC_MSG_ERROR(Please install GNU make)
else
- $MAKE -v| grep -q GNU
+ $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 -q '2\.7'
+if $CXX --version | grep '2\.7' >& /dev/null
then
true
else
fi
AC_CHECK_HEADER(FlexLexer.h, true,
- AC_MSG_ERROR(can't find flex header. Please install Flex headers correctly))
+ AC_MSG_WARN(can't find flex header. Please install Flex headers correctly))
AC_CONFIG_SUBDIRS(flower)
-AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in)
+AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in
+ Makefile:make/Toplevel.make.in
+ )
# rgu
sed 's/TOPLEVEL_//g' < .version > lily/.version
(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
-dnl echo 0 > out/.build
)
(cd flower;
-dnl echo 0 > out/.build
)
-cat << END
+cat << END
Finished configuring. For making everything, do:
make all
#
localdist: configure
+
+-include /dev/null $(DEPFILES)
+#
pl 1.1.7
- PQueue blondification.
- String_convert::i2hex_str fix, unsigned eqvs introduced
- - long long deprecioated, now named I64
+ - long long depreciated, now named I64
- type I32 introduced. should be used iso int where 32 bits are
needed(or, brr, assumed...)
void
Matrix::insert_row(Vector v, int k)
{
+ int c = cols();
assert(v.dim()==cols());
dat->insert_row(k);
- for (int j=0; j < cols(); j++)
+ for (int j=0; j < c; j++)
dat->elem(k,j)=v(j);
}
Matrix::swap_columns(int c1, int c2)
{
assert(c1>=0&& c1 < cols()&&c2 < cols() && c2 >=0);
- for (int i=0; i< rows(); i++) {
+ int r = rows();
+ for (int i=0; i< r; i++) {
Real r=dat->elem(i,c1);
dat->elem(i,c1) = dat->elem(i,c2);
dat->elem(i,c2)=r;
Matrix::swap_rows(int c1, int c2)
{
assert(c1>=0&& c1 < rows()&&c2 < rows() && c2 >=0);
- for (int i=0; i< cols(); i++) {
+ int c = cols();
+ for (int i=0; i< c; i++) {
Real r=dat->elem(c1,i);
dat->elem(c1,i) = dat->elem(c2,i);
dat->elem(c2,i)=r;
% common dutch names for notes. "es" means flat, "is" means sharp
%
-ceses = \melodic { -1 0 -2 }
-ces = \melodic { -1 0 -1 }
-c = \melodic { -1 0 0 }
-cis = \melodic { -1 0 1 }
-cisis = \melodic { -1 0 2 }
-deses = \melodic { -1 1 -2 }
-des = \melodic { -1 1 -1 }
-d = \melodic { -1 1 0 }
-dis = \melodic { -1 1 1 }
-disis = \melodic { -1 1 2 }
-eses = \melodic { -1 2 -2 }
-es = \melodic { -1 2 -1 }
-e = \melodic { -1 2 0 }
-eis = \melodic { -1 2 1 }
-eisis = \melodic { -1 2 2 }
-feses = \melodic { -1 3 -2 }
-fes = \melodic { -1 3 -1 }
-f = \melodic { -1 3 0 }
-fis = \melodic { -1 3 1 }
-fisis = \melodic { -1 3 2 }
-geses = \melodic { -1 4 -2 }
-ges = \melodic { -1 4 -1 }
-g = \melodic { -1 4 0 }
-gis = \melodic { -1 4 1 }
-gisis = \melodic { -1 4 2 }
-ases = \melodic { -1 5 -2 }
-as = \melodic { -1 5 -1 }
-a = \melodic { -1 5 0 }
-ais = \melodic { -1 5 1 }
-aisis = \melodic { -1 5 2 }
-beses = \melodic { -1 6 -2 }
-bes = \melodic { -1 6 -1 }
-b = \melodic { -1 6 0 }
-bis = \melodic { -1 6 1 }
-bisis = \melodic { -1 6 2 }
+
+%
+% Please note that, while these names are used to enter *notes*, they
+% 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 }
%
%
-Ceses = \melodic { -2 0 -2 }
-Ces = \melodic { -2 0 -1 }
-C = \melodic { -2 0 0 }
-Cis = \melodic { -2 0 1 }
-Cisis = \melodic { -2 0 2 }
-Deses = \melodic { -2 1 -2 }
-Des = \melodic { -2 1 -1 }
-D = \melodic { -2 1 0 }
-Dis = \melodic { -2 1 1 }
-Disis = \melodic { -2 1 2 }
-Eses = \melodic { -2 2 -2 }
-Es = \melodic { -2 2 -1 }
-E = \melodic { -2 2 0 }
-Eis = \melodic { -2 2 1 }
-Eisis = \melodic { -2 2 2 }
-Feses = \melodic { -2 3 -2 }
-Fes = \melodic { -2 3 -1 }
-F = \melodic { -2 3 0 }
-Fis = \melodic { -2 3 1 }
-Fisis = \melodic { -2 3 2 }
-Geses = \melodic { -2 4 -2 }
-Ges = \melodic { -2 4 -1 }
-G = \melodic { -2 4 0 }
-Gis = \melodic { -2 4 1 }
-Gisis = \melodic { -2 4 2 }
-Ases = \melodic { -2 5 -2 }
-As = \melodic { -2 5 -1 }
-A = \melodic { -2 5 0 }
-Ais = \melodic { -2 5 1 }
-Aisis = \melodic { -2 5 2 }
-Beses = \melodic { -2 6 -2 }
-Bes = \melodic { -2 6 -1 }
-B = \melodic { -2 6 0 }
-Bis = \melodic { -2 6 1 }
-Bisis = \melodic { -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 }
-%
+%%
+% Please note that, while these names are used to enter *notes*, they
+% 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
% common Swedish names for notes. "-ess" means flat, "-iss" means sharp
%
% by Mats Bengtsson.
-cessess = \melodic { 0 0 -2 }
-cess = \melodic { 0 0 -1 }
-c = \melodic { 0 0 0 }
-ciss = \melodic { 0 0 1 }
-cississ = \melodic { 0 0 2 }
-dessess = \melodic { 0 1 -2 }
-dess = \melodic { 0 1 -1 }
-d = \melodic { 0 1 0 }
-diss = \melodic { 0 1 1 }
-dississ = \melodic { 0 1 2 }
-essess = \melodic { 0 2 -2 }
-ess = \melodic { 0 2 -1 }
-e = \melodic { 0 2 0 }
-eiss = \melodic { 0 2 1 }
-eississ = \melodic { 0 2 2 }
-fessess = \melodic { 0 3 -2 }
-fess = \melodic { 0 3 -1 }
-f = \melodic { 0 3 0 }
-fiss = \melodic { 0 3 1 }
-fississ = \melodic { 0 3 2 }
-gessess = \melodic { 0 4 -2 }
-gess = \melodic { 0 4 -1 }
-g = \melodic { 0 4 0 }
-giss = \melodic { 0 4 1 }
-gississ = \melodic { 0 4 2 }
-assess = \melodic { 0 5 -2 }
-ass = \melodic { 0 5 -1 }
-a = \melodic { 0 5 0 }
-aiss = \melodic { 0 5 1 }
-aississ = \melodic { 0 5 2 }
-hessess = \melodic { 0 6 -2 }
-b = \melodic { 0 6 -1 }
-h = \melodic { 0 6 0 }
-hiss = \melodic { 0 6 1 }
-hississ = \melodic { 0 6 2 }
+cessess = \melodic_request { 0 0 -2 }
+cess = \melodic_request { 0 0 -1 }
+c = \melodic_request { 0 0 0 }
+ciss = \melodic_request { 0 0 1 }
+cississ = \melodic_request { 0 0 2 }
+dessess = \melodic_request { 0 1 -2 }
+dess = \melodic_request { 0 1 -1 }
+d = \melodic_request { 0 1 0 }
+diss = \melodic_request { 0 1 1 }
+dississ = \melodic_request { 0 1 2 }
+essess = \melodic_request { 0 2 -2 }
+ess = \melodic_request { 0 2 -1 }
+e = \melodic_request { 0 2 0 }
+eiss = \melodic_request { 0 2 1 }
+eississ = \melodic_request { 0 2 2 }
+fessess = \melodic_request { 0 3 -2 }
+fess = \melodic_request { 0 3 -1 }
+f = \melodic_request { 0 3 0 }
+fiss = \melodic_request { 0 3 1 }
+fississ = \melodic_request { 0 3 2 }
+gessess = \melodic_request { 0 4 -2 }
+gess = \melodic_request { 0 4 -1 }
+g = \melodic_request { 0 4 0 }
+giss = \melodic_request { 0 4 1 }
+gississ = \melodic_request { 0 4 2 }
+assess = \melodic_request { 0 5 -2 }
+ass = \melodic_request { 0 5 -1 }
+a = \melodic_request { 0 5 0 }
+aiss = \melodic_request { 0 5 1 }
+aississ = \melodic_request { 0 5 2 }
+hessess = \melodic_request { 0 6 -2 }
+b = \melodic_request { 0 6 -1 }
+h = \melodic_request { 0 6 0 }
+hiss = \melodic_request { 0 6 1 }
+hississ = \melodic_request { 0 6 2 }
% author: unknown. Copyright: none
%
-cad = \music {
+cad = \melodic{
\cadenza {1}
\grouping{1*4}\duration { 8}
\textstyle "italic"
}
\score {
- \staff { \melodic
- \music { cad }
- }
-
+ \staff { cad }
\paper {}
\midi { \tempo 4:90 }
}
% (maybe even sooner :-)
%
-alto = \music {
+alto = \melodic{
\meter {4/4} \grouping {4*4}
\duration{ 8 }
}
-\score {
- \staff { \melodic \music { alto }}
-
-
- \paper {
+\score{
+ \staff{ alto }
+ \paper{
\unitspace 14\mm
\geometric 1.4
}
include "this-is-hopefully-a-nonexisting-file"
-mwa = \music {
+
+mwa = \melodic{
\meter{3/4}
[ a8 a8 a8 a8 a8 ] %
[ a8 ] %
}
-bla = \lyrics {
+bla = \lyric{
These Gates will open just like windows. % ok; warning
}
+% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion 'pointer_' failed.
+%IOT trap/Abort
+% als geen music in staff
+
include "this-is-hopefully-a-nonexisting-file"
-\score {
- \staff {
- lyric \music { bla }
- }
- \staff {
- \melodic \music { mwa }
- }
+\score{
+ \staff{ bla }
+ \staff{ mwa }
}
-% Creator: This is mi2mu 0.0.11.2 #14/FlowerLib 1.1.7 #1 of Mar 12 1997 02:11:21
-% Automatically generated, at Wed Mar 12 02:22:22 1997
-% from input file: fugue1.\midi
+% Creator: This is mi2mu 0.0.12.1 #5/FlowerLib 1.1.9 #0 of Mar 24 1997 21:30:32
+% Automatically generated, at Mon Mar 24 23:39:09 1997
+% from input file: fugue1.midi
-track0 = \music {
- % \midi copyright:
+track0 = \melodic{
+ % midi copyright:
% instrument:
+ % 1
+
+ % 26:2.
+ |
+ % 27
} % track0
-track1 = \music {
- % \midi copyright:
+track1 = \melodic{
+ % midi copyright:
% instrument:
- g8 a8 b8 c'8. { \music{ d'16 } } { \music{ c'16 } }
- { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16
- d'16 c'16 b16 g16 a16 b16 c'16 b16 c'16 d'16 e'16
- d'16 e'16 fis'16 g'8 b8 c'8 a8 d'16 c'16 b16 a16 {
- \music{ g8. } } g16 f16 e16 f16 g16 a16 g16 a16 b16
- c'2 b4 c'8 d'8 e'8 f'8. { \music{ f'16 } \music{
- g'16 } } e'8 a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8.
- b'16 a'16 g'16 f'2 e'8. fis'16 g'2 fis'4 g'16 f'16
- e'16 d'16 c'16 d'16 c'16 b16 a16 c'16 b16 a16 c'16
- a16 gis8 e'8 d'8 c'16 b16 a16 gis16 a16 b16 c'16
- fis16 gis16 a16 b8 a16 b16 c'8 f'8 e'8 d'4 c'16 b16
- { \music{ c'16 } } { \music{ b16 } } { \music{ b16
- b16 } \music{ c'16 c'16 } \music{ b16 } \music{
- c'16 c'16 } } { } { \music{ b16 } } { \music{ a16 }
- } a4 g8 a8 b8 c'8. { \music{ d'16 } } { \music{
- c'16 } } { \music{ b8 } } c'8 d'8 e'8 f'8. { \music{
- g'16 } } { \music{ f'16 } } { \music{ e'8 } } a'8
- d'8 g'8. a'16 g'16 f'16 e'8 a'8 d'8 ais'8 a'8 g'16
- f'16 g'16 f'16 g'16 e'16 f'16 { \music{ g'16 } } {
- \music{ g'16 } } { \music{ a'16 } } { \music{ g'16 }
- } { } { } { \music{ f'16 } } { \music{ g'16 } } {
- \music{ a'16 } } cis'16 d'16 g'16 { \music{ f'16 }
- } { \music{ e'16 } } { \music{ f'16 } } { \music{
- e'16 } } { } { \music{ f'16 } } { } { } { } {
- \music{ e'8 } } { } d'16 d'8 g8 a8 b8 c'8 d'16 {
- \music{ c'16 } } { \music{ b8 } } e'8 a8 { \music{
- d'8. } } e'16 d'16 c'16 b16 c'16 d'16 e'16 f'16
- g'16 a'16 g'16 f'16 e'16 d'16 c'16 { \music{ c'16 }
- } { \music{ b16 } } { \music{ c'16 } } { } { } {
- \music{ b8. } } c'8 d'8 g8 { \music{ c'4 } } b8 c'4
- b8 ais8 a8 { \music{ d'4 } } c'8 d'8 e'8 f'4 a'16 {
- \music{ g'16 } } f'16 e'16 { \music{ f'16 } } {
- \music{ e'16 } } d'16 c'2 g16 { \music{ a16 } } b16
- c'16 d'16 e'16 { \music{ f'8. } } { \music{ d'16 }
- \music{ c'16 e'16 } } f'16 { \music{ g'16 } } {
- \music{ a'8. } } b'16 c''2
+ % 1
+
+ % 2:4*5/32
+ g8 a8 b8 c'8.
+ % 3:4*5/128
+ < { d'16 } > < { c'16 } > < { b8 } > e'8 a8 < {
+ d'8. } > e'16 d'16 c'16 b16 g16 a16 b16 c'16 b16
+ c'16 d'16 e'16 d'16 e'16 fis'16 g'8 b8 c'8 a8 d'16
+ c'16 b16 a16
+ % 5:4*47/384
+ < { g8. } > g16 f16 e16 f16 g16 a16 g16 a16 b16 c'2
+ b4 |
+ % 7
+ c'8 d'8 e'8 f'8. < { f'16 } { g'16 } > e'8 a'8 d'8
+ g'8. a'16 g'16 f'16 e'8 a'8. b'16 a'16 g'16 f'2
+ e'8. fis'16 g'2 fis'4 g'16 f'16 e'16 d'16 c'16 d'16
+ c'16 b16 a16 c'16 b16 a16
+ % 11:4
+ c'16 a16 gis8 e'8 d'8 c'16 b16 a16 gis16 a16 b16
+ c'16 fis16 gis16 a16 b8 a16 b16 c'8 f'8 e'8 d'4
+ c'16 b16
+ % 13:4*45/256
+ < { c'16 } > < { b16 } > < { b16 b16 } { c'16 c'16 }
+ { b16 } { c'16 c'16 } > < > < { b16 } > < { a16 }
+ > |
+ % 14
+ a4
+ % 15:4*5/32
+ g8 a8 b8 c'8.
+ % 16:4*5/128
+ < { d'16 } > < { c'16 } > < { b8 } > c'8 d'8 e'8
+ f'8. < { g'16 } > < { f'16 } > |
+ % 17
+ < { e'8 } > a'8 d'8 g'8. a'16 g'16 f'16 e'8 a'8 d'8
+ ais'8 a'8 g'16 f'16 g'16 f'16 g'16 e'16 f'16
+ % 18:4*155/768
+ < { g'16 } > < { g'16 } > < { a'16 } > < { g'16 } >
+ < > < > < { f'16 } > < { g'16 } > |
+ % 19
+ < { a'16 } > cis'16 d'16 g'16 < { f'16 } > < { e'16
+ } > < { f'16 } > < { e'16 } > < > < { f'16 } > < >
+ < > < > < { e'8 } > < > d'16 d'8
+ % 20:4*7/32
+ g8 a8 b8
+ % 21:4
+ c'8 d'16 < { c'16 } > < { b8 } > e'8 a8 < { d'8. }
+ >
+ % 22:4*5/384
+ e'16 d'16 c'16 b16 c'16 d'16 e'16 f'16 g'16 a'16
+ g'16 f'16 e'16 d'16 c'16 < { c'16 } > < { b16 } > <
+ { c'16 } > |
+ % 23
+ < > < > < { b8. } > c'8 d'8 g8 < { c'4 } > b8 c'4
+ b8 ais8 a8
+ % 24:4*59/384
+ < { d'4 } > c'8 d'8 e'8
+ % 25:4
+ f'4 a'16 < { g'16 } > f'16 e'16 < { f'16 } > < {
+ e'16 } > d'16 |
+ % 26
+ c'2 g16 < { a16 } > b16 c'16 d'16 e'16 < { f'8. } >
+ |
+ % 27
+ < { d'16 } { c'16 e'16 } > f'16 < { g'16 } > < {
+ a'8. } > b'16 c''2
} % track1
-track2 = \music {
- % \midi copyright:
+track2 = \melodic{
+ % midi copyright:
% instrument:
- c8 d8 e8 f8. { \music{ g16 } } { \music{ f16 } } {
- \music{ e8 } } a8 d8 { \music{ g8. } } a16 g16 f16
- e16 f16 e16 d16 c16 d16 c16 'b16 'a8 fis8 { \music{
- g4. } } f16 e16 f8 d8 g8 f8 e8 d8 g4 f16 e16 f4 f16
- e8 d4 c8 f8 g16 f16 e16 f8 d8 g4.. g8 a8 b8 {
- \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 }
- } { \music{ b8 } } e'8 a8 { \music{ d'8. } } e'16
- d'16 c'16 b8 d8 e8 fis8 { \music{ g8. } } { \music{
- a16 } } { \music{ g16 } } { \music{ f8 } } b8 e8
- a8. b16 a16 gis16 fis8 f8 e8 d8. e16 fis16 gis16
- a16 gis16 a16 b16 gis16 fis16 gis16 a16 b8 c8 d8 e8
- { \music{ f8. } } { \music{ g16 } } { \music{ f16 }
- } { \music{ e8 } } a8 d8 g8. a16 g16 f16 e16 e16
- fis16 g4 fis8 gis8 { \music{ a4 } } g8 a8 b8 {
- \music{ c'8. } } { \music{ d'16 } } { \music{ c'16 }
- } { \music{ b8 } } e'8 a8 d'8. e'16 d'16 c'16 b8
- g'8 cis'8 d'8 e'8 cis'8 d'8 e'8 a8 e8 fis8 g8 {
- \music{ a8. } } { \music{ b16 } } { \music{ a16 } }
- { \music{ g8 } } c'8 fis8 { \music{ b8. } } c'16
- b16 a16 g16 fis16 e16 d16 e4 d4 a16 g16 f16 e16 g16
- f16 a16 g4 a16 ais8 { \music{ c'4 } } d'8 g8 {
- \music{ g4. } } f4 e8 d4 e16 a4 g4 f8 g8 a8 {
- \music{ ais8. } } { \music{ c'16 } } { \music{
- ais16 } } { \music{ a8 } } d'8 g8 { \music{ c'8. }
- } d'16 c'16 ais16 a16 ais16 a16 g16 f16 g16 f16 e16
- g16 a4 f'16 d'8 { \music{ e'2 } \music{ g'2 } }
+ % 1
+ c8 d8 e8 f8. < { g16 } > < { f16 } > < { e8 } > a8
+ d8
+ % 2:4*107/3840
+ < { g8. } > a16 g16 f16 e16 f16 e16 d16 c16 d16 c16
+ 'b16 'a8 fis8
+ % 3:4*203/3840
+ < { g4. } > f16 e16 f8 d8 g8 f8 e8 d8
+ % 4:2
+ g4 f16 e16
+ % 5:4
+ f4 f16 e8 d4 c8 f8
+ % 6:4
+ g16 f16 e16 f8 d8 g2
+ % 7:4*241/3840
+
+ % 9:8
+ g8 a8 b8 < { c'8. } > < { d'16 } > < { c'16 } > < {
+ b8 } > e'8 a8
+ % 10:4*13/480
+ < { d'8. } > e'16 d'16 c'16 b8 d8 e8 fis8
+ % 11:4*23/384
+ < { g8. } > < { a16 } > < { g16 } > < { f8 } > b8
+ e8 a8. b16 a16 gis16 fis8 f8 e8 d8. e16 fis16 gis16
+ a16 gis16 a16 b16 gis16 fis16 gis16 a16 b8
+ % 13:4*5/32
+
+ % 14:8
+ c8 d8 e8 < { f8. } > < { g16 } > < { f16 } > < { e8
+ } > a8 d8 g8. a16 g16 f16
+ % 15:2
+ e16 e16 fis16 g4
+ % 16:4*91/3840
+ fis8 gis8 < { a4 } > g8 a8 b8 < { c'8. } > |
+ % 17
+ < { d'16 } > < { c'16 } > < { b8 } > e'8 a8 d'8.
+ e'16 d'16 c'16 b8 g'8 cis'8 d'8 e'8 cis'8 d'8 e'8
+ a8
+ % 19:8
+ e8 fis8 g8 < { a8. } > < { b16 } > < { a16 } > |
+ % 20
+ < { g8 } > c'8 fis8 < { b8. } > c'16 b16 a16 g16
+ fis16 e16 d16 e4
+ % 21:4
+ d4 a16 g16 f16 e16 g16 f16 a16 |
+ % 22
+ g4 a16 ais8 < { c'4 } > d'8 g8 < { g4. } > |
+ % 23
+ f4 e8 d4 |
+ % 24
+ e16 a4 g4 f8 g8 a8 < { ais8. } > |
+ % 25
+ < { c'16 } > < { ais16 } > < { a8 } > d'8 g8 < {
+ c'8. } > d'16 c'16 ais16 a16 ais16 a16 g16 f16 g16
+ f16 e16
+ % 26:2
+ g16 a4
+ % 27:4
+ f'16 d'8 < { e'2 } { g'2 } >
} % track2
-track3 = \music {
- % \midi copyright:
+track3 = \melodic{
+ % midi copyright:
% instrument:
- 'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16 } }
- { \music{ 'b8 } } e8 'a8 { \music{ d8. } } e16 d16
- c16 'b8 c4 'ais8 'a8 d8 'g8 c8 'a16 'b16 c16 d4 'g4
- 'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16 } }
- { } 'b8 e8 'a8 d8. e16 d16 c16 'b8 e4. d4 'b16 c16
- 'a16 e16 d16 c16 'b16 c16 'a16 'b16 c16 d16 c16
- 'b16 'a16 'g4 'e8 'fis8 'gis8 'a8. { \music{ 'b16 }
- } { \music{ 'a16 } } { \music{ 'g8 } } c8 'fis8
- 'b8. c16 'b16 'a16 'gis8 { \music{ 'a4 } } 'gis8
- 'a4 'g8 'a8 'b8 c8. { \music{ d16 } } { \music{ c16
- } } { \music{ 'b8 } } e8 'a8 d4 'g8 d4 c8 'a8 e4 d8
- 'a8 'b8 cis8 d8. { \music{ e16 } } { \music{ d16 }
- } { \music{ c8 } } f8 'b8 e8. f16 e16 d16 cis8 'a8
- 'b8 cis8 d8. { \music{ e16 } } { \music{ d16 } } {
- \music{ c8 } } fis8 'b8 e8. fis16 e16 d16 c4.. d16
- c16 'b16 'a16 'g16 'a16 'fis16 'g8 'b8 c8 { \music{
- d8 } } e8. { \music{ f16 } } { \music{ e16 } } {
- \music{ d8 } } g8 c8 f8. g16 f16 e16 d4 e8 d4 {
- \music{ 'g8 } } 'g4. 'c8 'd8 'e8 'f8. { \music{
- 'g16 } } { \music{ 'f16 } } { \music{ 'e8 } } 'a8
- 'd8 { \music{ 'g8. } } 'a16 'g16 'f16 'e16 'd16
- 'e16 'f16 'g16 'a16 'ais16 'g16 'a16 'e16 'f16 'g16
- 'a16 'b16 c16 { \music{ 'a16 } \music{ d2 } } c1
+ % 1
+
+ % 4:8
+ 'g8 'a8 'b8 c8. < { d16 } > < { c16 } > < { 'b8 } >
+ e8 'a8
+ % 5:4*11/384
+ < { d8. } > e16 d16 c16 'b8 c4 'ais8 'a8 d8 'g8 c8
+ % 6:2
+ 'a16 'b16 c16 d4 'g4
+ % 7:4
+ 'g8 'a8 'b8 c8. < { d16 } > < { c16 } > < > |
+ % 8
+ 'b8 e8 'a8 d8. e16 d16 c16 'b8 e4. d4
+ % 9:2
+ 'b16 c16 'a16 e16 d16 c16 'b16 c16 'a16 'b16 c16
+ d16 c16 'b16 'a16 'g4
+ % 10:2.
+
+ % 12:8
+ 'e8 'fis8 'gis8 'a8. < { 'b16 } > < { 'a16 } > < {
+ 'g8 } > c8 'fis8 'b8. c16 'b16 'a16
+ % 13:2
+ 'gis8 < { 'a4 } > 'gis8 'a4
+ % 14:4
+ 'g8 'a8 'b8 c8. < { d16 } > < { c16 } > |
+ % 15
+ < { 'b8 } > e8 'a8 d4 'g8 d4 c8 'a8 e4 d8
+ % 16:4*5/32
+
+ % 17:8
+ 'a8 'b8 cis8 d8. < { e16 } > < { d16 } > < { c8 } >
+ f8 'b8 e8. f16 e16 d16 cis8
+ % 18:4*5/32
+
+ % 19:8
+ 'a8 'b8 cis8 d8. < { e16 } > < { d16 } > < { c8 } >
+ fis8 'b8 e8. fis16 e16 d16
+ % 20:2
+ c2 d16 c16 'b16 'a16 'g16 'a16 'fis16
+ % 21:2
+ 'g8 'b8 c8 < { d8 } > e8.
+ % 22:4*5/128
+ < { f16 } > < { e16 } > < { d8 } > g8 c8 f8. g16
+ f16 e16 d4 e8 d4
+ % 23:4*59/384
+ < { 'g8 } > 'g4. 'c8 'd8 'e8 'f8.
+ % 24:4*21/128
+ < { 'g16 } > < { 'f16 } > < { 'e8 } > 'a8 'd8
+ % 25:4*11/384
+ < { 'g8. } > 'a16 'g16 'f16 'e16 'd16 'e16 'f16
+ 'g16 'a16 'ais16 'g16 'a16 'e16 'f16 'g16 'a16 'b16
+ c16
+ % 26:4*7/64
+ < { 'a16 } { d2 } > |
+ % 27
+ c1
} % track3
-track4 = \music {
- % \midi copyright:
+track4 = \melodic{
+ % midi copyright:
% instrument:
- 'c8 'd8 'e8 'f8. { \music{ 'g16 } } { \music{ 'f16 }
- } { \music{ 'e8 } } 'a8 'd8 { \music{ 'g8. } }
- 'a16 'g16 'f16 'e16 'f16 'e16 'd16 'c16 'd16 'c16
- ''b16 ''a8 'd8 'a8 'fis8 'g16 'a16 'ais16 'g16
- 'cis8 'd8 'a4 'e4 'a16 'b16 c16 d16 c16 'b16 'a16
- 'g16 c8 ''g8 ''a8 ''b8 'c8. { \music{ 'd16 } } {
- \music{ 'c16 } } { \music{ ''b8 } } 'e8 ''a8 'd8.
- 'e16 'd16 'c16 { \music{ ''b8 } } 'e4 'd8 'c8 'f4
- 'e4 'd4 'e8 'f8 'e16 'd16 'e4 ''a4 ''g8 ''a8 ''b8
- 'c8. { \music{ 'd16 } } { \music{ 'c16 } } { \music{
- ''b8 } } 'e8 ''a8 'd8. 'e16 'd16 'c16 ''b8 ai''s8
- ''a8 ''g8 ''a8 'fis8 'g8 'e8 'd4 'e8 'f8 'g8. {
- \music{ 'a16 } } { \music{ 'g16 } } { \music{ 'f8 }
- } 'ais8 'e8 'a8. 'b16 { \music{ 'a16 } } 'g16 'f16
- 'e16 'f16 'd16 'g8 'a8 'd4.. 'e16 'd16 'c16 ''b16
- ''a16 ''g16 fi''s16 ''e8 'e8 'fis8 'g4 'a16 'g16
- 'fis8 'd8 'g1 'a4 'b8 c8 'f16 'a16 'g16 'f16 'e16
- 'd16 'c16 ''b16 'c16 'd16 'e16 'f16 'g8 ''g8 'b2
+ % 1
+
+ % 5:4*5/32
+ 'c8 'd8 'e8 'f8.
+ % 6:4*5/128
+ < { 'g16 } > < { 'f16 } > < { 'e8 } > 'a8 'd8 < {
+ 'g8. } > 'a16 'g16 'f16 'e16 'f16 'e16 'd16 'c16
+ 'd16 'c16 ''b16 ''a8 'd8 'a8 'fis8 'g16 'a16 'ais16
+ 'g16 'cis8 'd8 'a4 'e4 'a16 'b16 c16 d16 c16 'b16
+ 'a16 'g16 c8
+ % 9:4*5/32
+
+ % 10:4*5/32
+ ''g8 ''a8 ''b8 'c8.
+ % 11:4*5/128
+ < { 'd16 } > < { 'c16 } > < { ''b8 } > 'e8 ''a8
+ 'd8. 'e16 'd16 'c16 < { ''b8 } > |
+ % 12
+ 'e4 'd8 'c8 'f4 'e4 'd4 'e8 'f8 'e16 'd16 'e4 ''a4
+ % 14:4
+
+ % 15:8
+ ''g8 ''a8 ''b8 'c8. < { 'd16 } > < { 'c16 } > < {
+ ''b8 } > 'e8 ''a8 'd8. 'e16 'd16 'c16 ''b8 ''ais8
+ ''a8 ''g8 ''a8 'fis8 'g8 'e8 'd4 'e8 'f8 'g8.
+ % 18:4*5/128
+ < { 'a16 } > < { 'g16 } > < { 'f8 } > 'ais8 'e8
+ 'a8. 'b16 < { 'a16 } > 'g16 'f16 'e16 'f16 'd16 'g8
+ 'a8
+ % 19:2
+ 'd2 'e16 'd16 'c16 ''b16 ''a16 ''g16 ''fis16 ''e8
+ 'e8 'fis8 'g4 'a16 'g16 'fis8 'd8 'g1 'a4 'b8 c8
+ 'f16 'a16 'g16 'f16 'e16 'd16 'c16 ''b16 'c16 'd16
+ 'e16 'f16 'g8 ''g8 |
+ % 24
+
+ % 26:2
+ 'b2 |
+ % 27
+
} % track4
-score {
- \staff { \melodic \music { track0 } }
- \staff { \melodic \music { track1 } }
- \staff { \melodic \music { track2 } }
- \staff { \melodic \music { track3 } }
- \staff { \melodic \music { track4 } }
-
- \midi {
+\score{
+ \staff{ track0 }
+ \staff{ track1 }
+ \staff{ track2 }
+ \staff{ track3 }
+ \staff{ track4 }
+
+ \paper{
+ \unitspace 20\mm
+ }\midi{
\tempo 4:60
}
}
%
% copyright: None
%
-% declare \music (which will be in *one* \staff ) for the lead \voice
+% declare melody (which will be in *one* staff ) for the lead voice
-melodie = \music {
+melodie = \melodic{
% switch Lilypond in note-mode
\clef\violin
- \octave {} % 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 =
-% \clef bass % bass-\clef
-% \music { % as you can see, the sign obliges
- % you to precede \keyword by a backslash: \
- \music {
+begeleiding = \melodic{
\clef "bass"
- \octave { ' } % default \octave: 1 below the first \octave.
+ \meter{ 2/4 }
+ \octave{ c' } % default octave: 1 below the first octave.
%%% theme
- 'c % ' means one \octave lower.
+ 'c % ' means one octave lower.
% Similarly: ' means one higher.
c e c f c e c d 'b c 'a 'f 'g 'c2
\octave { ' }
r8 d8()'b r8 c8()'a r8 'a8()'f r8 'e8()'c
}
-
-% create a \staff named bstaf
-bstaf = \staff {
- \melodic
- \music { begeleiding } % use the declared \music
- \music { \meter {2/4 } }
- }
-
-% another one
-vstaf = \staff {
- \melodic
- \music { melodie }
- % default \clef is violin \clef
- \music { \meter {2/4 } }
- }
-
-
-\score {
- \staff { vstaf }
- \staff { bstaf }
- \paper {
+\score{
+ \staff{ melodie }
+ \staff{ begeleiding }
+ \paper{
\unitspace 2.5\cm % a whole note takes 2.5 \cm ideally.
}
}
% COPYRIGHT: GPL
%
%
-globals=\music{
+globals=\melodic{
\meter {4/ 4}
\partial {8}
\skip {1*8}
\meter {2/4}
}
-ritme = \staff {
- rhythmic
- \music{globals}
- \music {
- c8
- |[a8() a8. a8 a16 a16 a16] c4.
-
- %[c8( )a'8() c8 c8]% BUG!
- |c2 c2
-
- |[fis16 dis'16( fis16 dis'16 ][fis16) dis'16 fis16 dis'16]
- | r32 r32 r16 r8 r4 r2
- |[c8. c16] [c16 c8.] [c16 c16 c8] [c16 c8 c16]
-
- c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
-
- }
+ritme = \staff{
+ globals
+% rhythmic broken for now
+% \rhytmic{
+% c8
+% |[a8() a8. a8 a16 a16 a16] c4.
+%
+% %[c8( )a'8() c8 c8]% BUG!
+% |c2 c2
+%
+% |[fis16 dis'16( fis16 dis'16 ][fis16) dis'16 fis16 dis'16]
+% | r32 r32 r16 r8 r4 r2
+% |[c8. c16] [c16 c8.] [c16 c16 c8] [c16 c8 c16]
+%
+% c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
+% }
}
-melody=
-\staff {
- \melodic
- \music { globals }
- \music{
+melody= \staff{
+ globals
+ \melodic{
c8\key{fis cis gis}
|r4 r4 r4 r4
|cis'2.. r8
}
-\score {
- \paper {
+\score{
+ \paper{
\geometric 1.4
\unitspace 3.0 \cm
}
-% \staff { ritme } % broken for now
- \staff { melody }
-
+ ritme
+ melody
}
-
-
-
% \barnumbering5
% \barnumberstyle\boxed
-globalmusic= \music {
+globalmusic= \melodic{
\meter {2/4}
% \key fis
\skip {56*2}
include "mlvio2.ly"
include "mlcello.ly"
-\score {
- \staff {
- \melodic
- \music { alto }
- \music { globalmusic }
- }
- \staff {
- \melodic
- \music { violinI }
- \music { globalmusic }
- }
- \staff {
- \melodic
- \music { violinII }
- \music { globalmusic }
- }
- \staff {
- \melodic
- \music { cello }
- \music { globalmusic }
- }
- \paper {
+\score{
+ \staff{ globalmusic alto }
+ \staff{ globalmusic violinI }
+ \staff{ globalmusic violinII }
+ \staff{ globalmusic cello }
+ \paper{
\unitspace 24\mm
\width 195\mm
\output "martien.out"
}
- \midi {
+ \midi{
\tempo 4:80
}
}
% \midi.ly
% test source for lilypond-s \midi \output
-melodie = \music {
+melodie = \melodic{
\clef\violin
+ \meter{ 2/4 }
c c | g g | a a | g2
f f | e e | d d8.( e16 | )c2 | % :|
}
-begeleiding = \music {
-
- \clef \bass
- \octave{-1}
+begeleiding = \melodic{
+ \clef\bass
+ \meter{ 2/4 }
+ \octave{'c}
c c' | e' c' | f' c' | e' c'
d' b | c' a | f g | c2 |
}
-mstaf = \staff {
- \melodic
- \music { melodie }
-}
-
-bass_staf = \staff {
- \melodic
- \music { begeleiding }
-}
-
-score {
- \staff { mstaf }
- \staff { bass_staf }
- \co\mmands {
- \meter { 2 * 4}
- }
- \midi {
+\score{
+ \staff{ melodie }
+ \staff{ begeleiding }
+ \midi{
\tempo 4:120
}
}
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-alto = \music {
-
+alto = \melodic{
\duration{16}
\clef\alto
- \octave{}
+ \octave{c}
\key{fis}
%1
[ 'b8. 'a ] [ 'g8 'b c ] |
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-cello = \music {
-
-\clef"bass" \octave{'}
+cello = \melodic{
+ \clef"bass"
+ \octave{'c}
\duration{4}
\key{fis}
%%1
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-violinI = \music {
-
+violinI = \melodic{
\clef "violin"
- \octave{}
+ \octave{c}
\duration{4}
\key{fis}
%1
% The purpose of this file is to demonstrate features of LilyPond;
% respect the copyright.
%
-violinII = \music {
-
-\clef "violin" \octave{}
+violinII = \melodic{
+ \clef "violin"
+ \octave{c}
\duration{4}
\key{fis}
%1
-melanie = \music {
-
+melanie = \melodic{
+ \meter{2/4}
\duration{8}
[ c d ] { [ d d' } { c c' ] } |
[ c d ] [ e { d g } c ]2/3 |
[ c d ] [ c16 d16 e'16 e'16 d16 c16 ]4/6 |
[ c d e e d c ]4/6 |
- [c d ] { \music{ [ c d e ]2/3 } \music{ [ f g a ]2/3 } } |
+ [c d ] < { [ c d e ]2/3 } { [ f g a ]2/3 } > |
[ c d ] [ d c ] |
}
-michelle = \music {
-
+michelle = \melodic{
+ \meter{2/4}
\duration{8}
[ c c c c ] |
[ c c c c ] |
[ c c c c ] |
[ c c c c ] |
[ c c c c ] |
-
}
-mireille = \music {
- @
+mireille = \lyric{
+ \meter{2/4}
\duration{8}
o o o o |
o o [ o o o ]2/3 |
[ o o o o o o]4/6 |
o o [ o o o ]2/3 |
o o o o |
- @
}
-score {
- \staff { lyric \music { mireille } }
- \staff { \melodic \music { melanie } }
- \staff { \melodic \music { michelle } }
- \co\mmands{
- \meter {2*4}
- }
+\score{
+ \staff{ mireille }
+ \staff{ melanie }
+ \staff{ michelle }
+ \paper{}
}
-% Creator: This is mi2mu 0.0.11.2 #14/FlowerLib 1.1.7 #1 of Mar 12 1997 02:05:36
-% Automatically generated, at Wed Mar 12 02:09:07 1997
-% from input file: pre1.\midi
-% jcn: using option -n
+% Creator: This is mi2mu 0.0.12.1 #5/FlowerLib 1.1.9 #0 of Mar 24 1997 21:30:32
+% Automatically generated, at Mon Mar 24 23:24:05 1997
+% from input file: pre1.midi
-track0 = \music {
- % \midi copyright:
+track0 = \melodic{
+ % midi copyright:
% instrument:
- { } { } { } { } { } { } { } { }
+ % 1
+
+ % 34:8
+ |
+ % 35
+
} % track0
-track1 = \music {
- % \midi copyright:
+track1 = \melodic{
+ % midi copyright:
% instrument:
- { \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{
- g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 d'16
- f'16 a16 d'16 f'16 } } { \music{ a16 d'16 f'16 a16
- d'16 f'16 } } { \music{ g16 d'16 f'16 g16 d'16 f'16
- } } { \music{ g16 d'16 f'16 g16 d'16 f'16 } } {
- \music{ g16 c'16 e'16 g16 c'16 e'16 } } { \music{
- g16 c'16 e'16 g16 c'16 e'16 } } { \music{ a16 e'16
- a'16 a16 e'16 a'16 } } { \music{ a16 e'16 a'16 a16
- e'16 a'16 } } { \music{ fis16 a16 d'16 fis16 a16
- d'16 } } { \music{ fis16 a16 d'16 fis16 a16 d'16 }
- } { \music{ g16 d'16 g'16 g16 d'16 g'16 } } {
- \music{ g16 d'16 g'16 g16 d'16 g'16 } } { \music{
- e16 g16 c'16 e16 g16 c'16 } } { \music{ e16 g16
- c'16 e16 g16 c'16 } } { \music{ e16 g16 c'16 e16
- g16 c'16 } } { \music{ e16 g16 c'16 e16 g16 c'16 }
- } { \music{ d16 fis16 c'16 d16 fis16 c'16 } } {
- \music{ d16 fis16 c'16 d16 fis16 c'16 } } { \music{
- d16 g16 b16 d16 g16 b16 } } { \music{ d16 g16 b16
- d16 g16 b16 } } { \music{ e16 g16 cis'16 e16 g16
- cis'16 } } { \music{ e16 g16 cis'16 e16 g16 cis'16 }
- } { \music{ d16 a16 d'16 d16 a16 d'16 } } { \music{
- d16 a16 d'16 d16 a16 d'16 } } { \music{ d16 f16
- b16 d16 f16 b16 } } { \music{ d16 f16 b16 d16 f16
- b16 } } { \music{ c16 g16 c'16 c16 g16 c'16 } } {
- \music{ c16 g16 c'16 c16 g16 c'16 } } { \music{
- 'a16 c16 f16 'a16 c16 f16 } } { \music{ 'a16 c16
- f16 'a16 c16 f16 } } { \music{ 'a16 c16 f16 'a16
- c16 f16 } } { \music{ 'a16 c16 f16 'a16 c16 f16 } }
- { \music{ 'g16 'b16 f16 'g16 'b16 f16 } } { \music{
- 'g16 'b16 f16 'g16 'b16 f16 } } { \music{ 'g16 c16
- e16 'g16 c16 e16 } } { \music{ 'g16 c16 e16 'g16
- c16 e16 } } { \music{ 'ais16 c16 e16 'ais16 c16 e16
- } } { \music{ 'ais16 c16 e16 'ais16 c16 e16 } } {
- \music{ 'a16 c16 e16 'a16 c16 e16 } } { \music{
- 'a16 c16 e16 'a16 c16 e16 } } { \music{ 'a16 c16
- dis16 'a16 c16 dis16 } } { \music{ 'a16 c16 dis16
- 'a16 c16 dis16 } } { \music{ 'b16 c16 d16 'b16 c16
- d16 } } { \music{ 'b16 c16 d16 'b16 c16 d16 } } {
- \music{ 'g16 'b16 d16 'g16 'b16 d16 } } { \music{
- 'g16 'b16 d16 'g16 'b16 d16 } } { \music{ 'g16 c16
- e16 'g16 c16 e16 } } { \music{ 'g16 c16 e16 'g16
- c16 e16 } } { \music{ 'g16 c16 f16 'g16 c16 f16 } }
- { \music{ 'g16 c16 f16 'g16 c16 f16 } } { \music{
- 'g16 'b16 f16 'g16 'b16 f16 } } { \music{ 'g16 'b16
- f16 'g16 'b16 f16 } } { \music{ 'a16 c16 fis16 'a16
- c16 fis16 } } { \music{ 'a16 c16 fis16 'a16 c16
- fis16 } } { \music{ 'g16 c16 g16 'g16 c16 g16 } } {
- \music{ 'g16 c16 g16 'g16 c16 g16 } } { \music{
- 'g16 c16 f16 'g16 c16 f16 } } { \music{ 'g16 c16
- f16 'g16 c16 f16 } } { \music{ 'g16 'b16 f16 'g16
- 'b16 f16 } } { \music{ 'g16 'b16 f16 'g16 'b16 f16 }
- } { \music{ 'g16 'ais16 e16 'g16 'ais16 e16 } } {
- \music{ 'g16 'ais16 e16 'g16 'ais16 e16 } } {
- \music{ 'f16 'a16 c16 f16 c16 'a16 c16 'a16 'f16
- 'a16 'f16 'd16 'f16 'd16 } } { \music{ g16 b16 d'16
- f'16 d'16 b16 d'16 b16 g16 b16 d16 f16 e64 } } {
- \music{ f64 } } { } { \music{ e32 } } { \music{ d16
- } } { \music{ c'1 } \music{ g1 } \music{ e1 } }
+ % 1
+ g16 c'16 e'16 g16 c'16 e'16 g16 c'16 e'16 g16 c'16
+ e'16 |
+ % 2
+ a16 d'16 f'16 a16 d'16 f'16 a16 d'16 f'16 a16 d'16
+ f'16 |
+ % 3
+ g16 d'16 f'16 g16 d'16 f'16 g16 d'16 f'16 g16 d'16
+ f'16 |
+ % 4
+ g16 c'16 e'16 g16 c'16 e'16 g16 c'16 e'16 g16 c'16
+ e'16 |
+ % 5
+ a16 e'16 a'16 a16 e'16 a'16 a16 e'16 a'16 a16 e'16
+ a'16 |
+ % 6
+ fis16 a16 d'16 fis16 a16 d'16 fis16 a16 d'16 fis16
+ a16 d'16 |
+ % 7
+ g16 d'16 g'16 g16 d'16 g'16 g16 d'16 g'16 g16 d'16
+ g'16 |
+ % 8
+ e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 e16 g16 c'16
+ |
+ % 9
+ e16 g16 c'16 e16 g16 c'16 e16 g16 c'16 e16 g16 c'16
+ |
+ % 10
+ d16 fis16 c'16 d16 fis16 c'16 d16 fis16 c'16 d16
+ fis16 c'16 |
+ % 11
+ d16 g16 b16 d16 g16 b16 d16 g16 b16 d16 g16 b16 |
+ % 12
+ e16 g16 cis'16 e16 g16 cis'16 e16 g16 cis'16 e16
+ g16 cis'16 |
+ % 13
+ d16 a16 d'16 d16 a16 d'16 d16 a16 d'16 d16 a16 d'16
+ |
+ % 14
+ d16 f16 b16 d16 f16 b16 d16 f16 b16 d16 f16 b16 |
+ % 15
+ c16 g16 c'16 c16 g16 c'16 c16 g16 c'16 c16 g16 c'16
+ |
+ % 16
+ 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16
+ |
+ % 17
+ 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16 'a16 c16 f16
+ |
+ % 18
+ 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16
+ f16 |
+ % 19
+ 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16
+ |
+ % 20
+ 'ais16 c16 e16 'ais16 c16 e16 'ais16 c16 e16 'ais16
+ c16 e16 |
+ % 21
+ 'a16 c16 e16 'a16 c16 e16 'a16 c16 e16 'a16 c16 e16
+ |
+ % 22
+ 'a16 c16 dis16 'a16 c16 dis16 'a16 c16 dis16 'a16
+ c16 dis16 |
+ % 23
+ 'b16 c16 d16 'b16 c16 d16 'b16 c16 d16 'b16 c16 d16
+ |
+ % 24
+ 'g16 'b16 d16 'g16 'b16 d16 'g16 'b16 d16 'g16 'b16
+ d16 |
+ % 25
+ 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16 'g16 c16 e16
+ |
+ % 26
+ 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16
+ |
+ % 27
+ 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16
+ f16 |
+ % 28
+ 'a16 c16 fis16 'a16 c16 fis16 'a16 c16 fis16 'a16
+ c16 fis16 |
+ % 29
+ 'g16 c16 g16 'g16 c16 g16 'g16 c16 g16 'g16 c16 g16
+ |
+ % 30
+ 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16 'g16 c16 f16
+ |
+ % 31
+ 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16 f16 'g16 'b16
+ f16 |
+ % 32
+ 'g16 'ais16 e16 'g16 'ais16 e16 'g16 'ais16 e16
+ 'g16 'ais16 e16 |
+ % 33
+ 'f16 'a16 c16 f16 c16 'a16 c16 'a16 'f16 'a16 'f16
+ 'd16 'f16 'd16 |
+ % 34
+ g16 b16 d'16 f'16 d'16 b16 d'16 b16 g16 b16 d16 f16
+ < { e16 } > < { f16 } > < { e16 } > < > < > d16 |
+ % 35
+ < { c'1 } { g1 } { e1 } >
} % track1
-% jcn: substituted some "2" \durations to "4."
-track2 = \music {
- % \midi copyright:
+track2 = \melodic{
+ % midi copyright:
% instrument:
- { \music{ e4. } } { \music{ e4. } } { \music{ d4. }
- } { \music{ d4. } } { \music{ d4. } } { \music{ d4.
- } } { \music{ e4. } } { \music{ e4. } } { \music{
- e4. } } { \music{ e4. } } { \music{ d4. } } {
- \music{ d4. } } { \music{ d4. } } { \music{ d4. } }
- { \music{ c4. } } { \music{ c4. } } { \music{ c4. }
- } { \music{ c4. } } { \music{ 'a4. } } { \music{
- 'a4. } } { \music{ 'b4. } } { \music{ 'b4. } } {
- \music{ 'ais4. } } { \music{ 'ais4. } } { \music{
- 'a4. } } { \music{ 'a4. } } { \music{ 'gis4. } } {
- \music{ 'gis4. } } { \music{ 'g4. } } { \music{
- 'g4. } } { \music{ 'f4. } } { \music{ 'f4. } } {
- \music{ 'f4. } } { \music{ 'f4. } } { \music{ 'd4. }
- } { \music{ 'd4. } } { \music{ 'e4. } } { \music{
- 'e4. } } { \music{ 'g4. } } { \music{ 'c4. } } { } {
- } { \music{ 'g4. } } { } { \music{ ''f4. } } {
- \music{ 'f4. } } { \music{ ''f4. } } { \music{ 'f4. }
- } { \music{ fi''s4. } } { \music{ fi''s4. } \music{
- 'c4. } } { } { \music{ 'c4. } } { \music{ gi''s4. } }
- { \music{ gi''s4. } \music{ 'f4. } } { } { \music{
- 'f4. } } { \music{ ''g4. } } { \music{ ''g4. } \music{
- 'f4. } } { } { \music{ 'f4. } } { \music{ ''g4. } }
- { \music{ ''g4. } \music{ 'e4. } } { } { \music{ ''g4.
- } \music{ 'e4. } } { } { \music{ ''g4. } \music{
- 'd4. } } { } { \music{ ''g4. } \music{ 'd4. } } { } {
- \music{ 'd4. } } { \music{ ''g4. } } { \music{ ''g4. }
- \music{ 'd4. } } { } { \music{ 'dis4. } } { \music{
- ''g4. } } { \music{ 'dis4. } } { \music{ ''g4. } } {
- \music{ 'e4. } } { \music{ ''g4. } } { \music{ 'e4. }
- } { \music{ ''g4. } } { \music{ 'd4. } } { \music{
- ''g4. } } { \music{ 'd4. } } { \music{ ''g4. } } {
- \music{ 'd4. } } { \music{ ''g4. } } { \music{ 'd4. }
- } { \music{ ''c4. } } { \music{ 'c4. } } { \music{
- ''c4. } } { \music{ 'c4. } } { \music{ ''c1 } } {
- \music{ 'c1 } } { \music{ ''c1 } \music{ ''b1 } } {
- } { } { } { \music{ ''c1 } \music{ 'c1 } }
-} % track4.
+ % 1
+ e4. e4.
+ % 2:4*89/3840
+ d4. d4.
+ % 3:4*3/128
+ d4. d4.
+ % 4:4*89/3840
+ e4. e4.
+ % 5:4*29/1280
+ e4. e4.
+ % 6:4*29/1920
+ d4. d4.
+ % 7:4*79/3840
+ d4. d4.
+ % 8:4*83/3840
+ c4. c4.
+ % 9:4*29/1280
+ c4. c4.
+ % 10:4*5/192
+ 'a4. 'a4.
+ % 11:4*91/3840
+ 'b4. 'b4.
+ % 12:4*103/3840
+ 'ais4. 'ais4.
+ % 13:4*83/3840
+ 'a4. 'a4.
+ % 14:4*53/1920
+ 'gis4. 'gis4.
+ % 15:4*1/40
+ 'g4. 'g4.
+ % 16:4*91/3840
+ 'f4. 'f4.
+ % 17:4*23/960
+ 'f4. 'f4.
+ % 18:4*113/3840
+ 'd4. 'd4.
+ % 19:4*91/3840
+ 'e4. 'e4.
+ % 20:4*33/1280
+ 'g4. < { 'c2 } > < { 'g4. } > ''f2
+ % 21:4*11/384
+ < { 'f4. } > ''f2 < { 'f4. } > ''fis2
+ % 22:4*7/3840
+ < { ''fis2 } { 'c2 } > < { 'c4. } > ''gis2
+ % 23:4*39/1280
+ < { ''gis2 } { 'f4. } > < { 'f4. } > ''g2
+ % 24:4*59/1920
+ < { ''g2 } { 'f4. } > < { 'f4. } > ''g2
+ % 25:4*17/3840
+ < { ''g2 } { 'e2 } > < { ''g2 } { 'e4. } >
+ % 26:4*19/640
+ < { ''g2 } { 'd4. } > < { ''g2 } { 'd2 } >
+ % 27:4*1/1280
+ < { 'd4. } > ''g2 < { ''g2 } { 'd4. } >
+ % 28:4*101/3840
+ < { 'dis4. } > ''g2 < { 'dis4. } > ''g2
+ % 29:4*17/640
+ < { 'e4. } > ''g2 < { 'e4. } > ''g2
+ % 30:4*3/128
+ < { 'd4. } > ''g2 < { 'd4. } > ''g2
+ % 31:4*101/3840
+ < { 'd4. } > ''g2 < { 'd4. } > ''c2
+ % 32:4*47/1920
+ < { 'c4. } > ''c2 < { 'c4. } > ''c1 < { 'c1 } >
+ % 33:4*113/480
+ < { ''c1 } { ''b1 } > < >
+ % 34:4*113/480
+ |
+ % 35
+ < { ''c1 } { 'c1 } >
+} % track2
-score {
- \staff { \melodic \music { track0 } }
- \staff { \melodic \music { track1 } }
- \staff { \melodic \music { track2 } }
-
- \co\mmands {
- \meter { 4*4 }
- }
- \midi {
+\score{
+ \staff{ track0 }
+ \staff{ track1 }
+ \staff{ track2 }
+
+ \paper{
+ \unitspace 20\mm
+ }\midi{
\tempo 4:60
}
}
% add any impressive examples here, please
ritme = \staff {
- \melodic
-
- \music {
+ \rhythmic{
\partial {1*8} % doesnt' have to be here.
\meter{ 4/4}
c8 |
}
-another = \staff {
- \melodic
- \music { \meter{ 4/4}
+another = \staff{
+ \melodic{ \meter{ 4/4}
c1 c1 c1 c4 c4 c4 c4 \meter{ 4/4} c1 c1 c1
}
}
-yanother = \staff {
- \melodic
- \music { \meter{ 4/4}
+yanother = \staff{
+ \melodic{ \meter{ 4/4}
c1 c1 c1 c4 c4 c4 c4 c1 c1 c1
}
}
-\score {
- \staff{ritme}
- \staff { another }
- \staff { yanother }
+\score{
+ ritme
+ another
+ yanother
- \paper {
+ \paper{
\unitspace 2\cm
\geometric 1.3
}
-blah =
-\staff {\melodic\music{ \meter {6/8}
+blah = \staff{\melodic{ \meter {6/8}
\skip {36*8}
\meter {4/4}}
- \music{
+ \melodic{
\duration { 8 }
\octave{ }
|[ a a a a a a a a a ]6/9
}
}
-\score {
- \staff {
+\score{
blah
- }
- \paper {
+ \paper{
\symboltables {table_sixteen}
\unitspace 1.5 \cm
\geometric 1.4
% (there is an accompanying LaTeX file, scsii-menuetto.tex)
%
+%% Stuff from MPP version
% \lefttitle{Menuetto}
% \tempo{Moderato}
% \metron{4=120}
%
-% \meter{3/4}
% \key\F % \key is F ( f-major )
-% \clef\alto % use alto \clef
-% \duration8 % default \duration is eight' note
%
-% \verb{\no\barnumbers} % issue MusiXTeX \co\mmand
-% \barnumbering0
% \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam
% \stemlength3 % shorter \stemlength
% % because piece is set very tightly
-%%1 % double co\mments are included in .tex file
-ii_menuetto = \music {
- \clef"alto"\meter{3/4}
+
+ii_menuetto = \melodic{
+ \clef"alto"
+ \meter{3/4}
\key {bes}
- \octave{1}
+ \octave{c}
+
\duration{8}
< a2 f2 d2 df > bes4-. |
%%2
}
-\score {
- \staff {
- \melodic \music { $ii_menuetto }
- }
- \paper {
+\score{
+ \staff{ $ii_menuetto }
+ \paper{
\width 195\mm
\unitspace 9\mm % to get lily to use only three lines
\geometric 1.4
\output "scsii-menuetto.out"
}
- \midi {
+ \midi{
\tempo 4:120
\output "scsii-menuetto.midi"
}
% (except for grace notes) are printed
%
%%1
-melodie = \music { \clef\violin\octave{1}
- \key{bes}
- \meter{3/4}\duration{ 8 }
+melodie = \melodic{
+ \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-| ] > |
%%58
< a2.^\fermata fis2. > |
%#%\tighten
- }
+}
-begeleiding = \music {
- \key{bes}\meter{3/4}
+begeleiding = \melodic{
+ \meter{3/4}
\clef\bass
+ \key{bes}
+ \octave{ c }
\duration{2}
'd r4 |
%%2
}
-tekstI = \lyrics {
- \meter{3/4}
+tekstI = \lyric{
+ \meter{ 3/4 }
\duration{4}
_ _ _
_ _ _
}
-tekstII= \lyrics {
+tekstII = \lyric{
\meter{3/4}
\duration{4}
_ _ _
}
-\score {
- \staff {
- lyric
- \music { tekstI }
- \music { tekstII }
- }
-% Setting up music ...lilypond: ../flower/include/cursor.inl:98: class Cursor<void *> Cursor<void *>::operator ++(int): Assertion 'pointer_' failed.
-%IOT trap/Abort
-% als geen music in staff
- \staff {
- \melodic
- \music { melodie }
- }
- \staff {
- \melodic
- \music { begeleiding }
- }
- \paper {
+\score{
+ \staff{ lyric % this sux el grandioso. What about \lyricstaff, \melodicstaff etc.
+ tekstI tekstII }
+ \staff{ melodie }
+ \staff{ begeleiding }
+ \paper{
\width 195\mm
% on two pages...
\geometric 1.2
\output "standchen.out"
}
- \midi {
+ \midi{
\tempo 4:54
}
}
%
% Copyright: none
-melodie = \music {
+melody = \melodic{
\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 ":|"
-
}
-begeleiding = \music {
+accompany = \melodic{
\clef \bass
- \octave{-1}
+ \octave{'c}
c 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 ":|"
-
}
-globalmusic=\music{
+
+global = \melodic{
\meter {2 / 4}
\skip {24*2}
% \bar "||"
}
-tekst = \lyrics {
+
+tekst = \lyric{
Al- tijd is Kort- jak- je ziek,2
midden in_de week maar s'_zon- dags niet.2
s'_Zon- dags gaat ze naar de kerk,2
midden in_de week maar s'_zon- dags niet.2
}
-hegedraagjetekst = \lyrics {
+hegedraagjetekst = \lyric{
Al- tijd zuigt Bill Gates mijn piek,2
"\TeX" is slecht- ser dan mu- ziek.2
s'_Zon- dags gaat het door een raam,2
"\TeX" is slecht- ser dan mu- ziek.2
}
-texte = \lyrics {
+texte = \lyric{
\textstyle "italic"
Ah! vous dir- ai_- je ma man2
}
-textI = \lyrics {
+texti = \lyric{
\textstyle "roman"
Twin- kle, twin- kle, lit- tle star,2
How I won- der what you are!2
}
-textII = \lyrics {
+textii = \lyric{
\textstyle "roman"
When the bla- zing sun is gone,2
When he no- thing shines up- on,2
}
-textIII = \lyrics{
+textiii = \lyric{
\textstyle "roman"
Then the tra- veler in the dark2
}
-mstaf = \staff {
- \melodic
- \music { melodie }
- \music { globalmusic }
-}
-
-bassstaf = \staff {
- \melodic
- \music { begeleiding }
- \music { globalmusic }
-}
-
-
-dutchstaf = \staff {
- lyric
- \music { tekst }
- \music {hegedraagjetekst}
- \music { globalmusic }
-}
-
-frenchstaf = \staff {
- lyric
- \music { texte }
- \music { globalmusic }
-}
-
-englishstaf = \staff {
- lyric
- \music { textI }
- \music { textII }
- \music { textIII }
- \music { globalmusic }
-}
-
-tstaf = \staff {
- lyric
- \music { tekst }
- \music { texte }
- \music { globalmusic }
-}
-
-
-\score {
- \staff { mstaf }
- \staff { dutchstaf }
- \staff { frenchstaf }
- \staff { englishstaf }
- \staff { bassstaf }
- \paper {
+\score{
+ \staff{ global melody }
+ \staff{ global tekst hegedraagjetekst }
+ \staff{ global texte }
+ \staff{ global texti textii textiii }
+ \staff{ accompany }
+ \paper{
\unitspace 2.5\cm
}
-
- \midi {
+ \midi{
\tempo 4:120
}
}
%
% Public Domain -- typed by by HWN
%
-global=\music{\meter {4/4}
- \grouping {2*2}
- \key {bes es as}
+ global = \melodic{
+ \meter{ 4/4 }
+ \grouping{ 2*2 }
+ \key{ bes es as }
+ }
+
+ dux = \melodic{
+ \clef\violin
+ \octave{ c }
+ \duration{ \last }
-}
-
-dux = \music {
- \clef \violin\octave{1}
- \duration { \last }
\stem{-1}
r8-"dux"
[c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
r8 [as g f] [g f16 es] [f8 d] |
}
-comes = \music {
- \octave {2}\stem{1}
+comes = \melodic{
+ \octave{ c' }
+ \stem{1}
r1 |
r1 |
r8-"comes" [g16 fis] [g8 c] [es g16 f] [g8 a]|
}
-bassdux = \music {
+bassdux = \melodic{
\clef \bass
- \octave {1}
+ \octave{ c }
r1 |
r |
r |
[G c16 B] [c8 d] [F16 G] As4 [G16 F] |
}
-trebstaf = \staff { \melodic
- % every "\music {} " in a \staff has its own "\voicegroup"
- \music { dux }
- \music { comes }
- \music{global}
- }
+% every "melody" declared in a staff has its own "voicegroup"
+trebstaf = \staff{ global dux comes }
-basstaf = \staff { \melodic
- \music { bassdux }
- \music{global}
-}
-\score {
- \staff { trebstaf }
- \staff { basstaf }
-
- \paper {}
- \midi {
+\score{
+ trebstaf
+ \staff{ bassdux global }
+ \paper{}
+ \midi{
\tempo 4:90
}
}
#include "debug.hh"
// statics Duration_convert
-bool Duration_convert::be_blonde_b_s = false;
+bool const Duration_convert::midi_as_plet_b_s = true;
+bool Duration_convert::no_quantify_b_s = false;
bool Duration_convert::no_double_dots_b_s = false;
bool Duration_convert::no_triplets_b_s = false;
int Duration_convert::no_smaller_than_i_s = 0;
}
#endif
-#if 0
Duration
Duration_convert::mom2_dur( Moment mom )
+{
+ /* this is cute,
+ but filling an array using Duration_iterator
+ might speed things up, a little
+ */
+ Duration_iterator iter_dur;
+ assert( iter_dur );
+ while ( iter_dur ) {
+ Duration dur = iter_dur++;
+ if ( mom == dur2_mom( dur ) )
+ return dur;
+ }
+ if ( midi_as_plet_b_s ) {
+ Moment mom_4 = mom / Moment( 4 );
+ long num = mom_4.numerator().as_long();
+ long den = mom_4.denominator().as_long();
+ Duration dur( 4, 0 );
+ dur.set_plet( num, den );
+ return dur;
+ }
+ assert( 0 );
+ // no can do
+ Duration dur( 0 );
+ return dur;
+}
+
+Duration
+Duration_convert::mom2standardised_dur( Moment mom )
{
/* this is cute,
but filling an array using Duration_iterator
Duration_iterator iter_dur;
assert( iter_dur );
while ( iter_dur ) {
- Duration lower_dur = iter_dur++;
- Duration upper_dur( 0 );
- if ( iter_dur )
- upper_dur = iter_dur();
- Moment lower_mom = dur2_mom( lower_dur );
- Moment upper_mom = dur2_mom( upper_dur );
- if ( mom == lower_mom )
+ Duration lower_dur = iter_dur++;
+ Duration upper_dur( 0 );
+ if ( iter_dur )
+ upper_dur = iter_dur();
+ Moment lower_mom = dur2_mom( lower_dur );
+ Moment upper_mom = dur2_mom( upper_dur );
+ if ( mom < lower_mom )
return lower_dur;
- if ( mom == upper_mom ) // don-t miss last (sic)
- return upper_dur;
- if ( ( mom >= lower_mom ) && ( mom <= upper_mom ) ) {
- warning( String( "duration not exact: " ) + String( (Real)mom ) , 0 );
- if ( abs( mom - lower_mom ) < abs( mom - upper_mom ) )
- return lower_dur;
- else
- return upper_dur;
- }
- lower_dur = upper_dur;
+ if ( mom == lower_mom )
+ return lower_dur;
}
- return Duration( 0 );
+ return iter_dur();
}
-#endif
+
Moment
Duration_convert::plet_factor_mom( Duration dur )
but filling an array using Duration_iterator
might speed things up, a little
*/
+ // should use mom2_dur
Moment mom( ticks_i, Duration::division_1_i_s );
Duration_iterator iter_dur;
assert( iter_dur );
if ( mom == dur2_mom( dur ) )
return dur;
}
+ if ( midi_as_plet_b_s ) {
+ Duration dur( 4, 0 );
+ dur.set_plet( ticks_i, Duration::division_1_i_s / 4 );
+ return dur;
+ }
Duration dur( 0 );
dur.set_ticks( ticks_i );
return dur;
but filling an array using Duration_iterator
might speed things up, a little
*/
+ // should use mom2standardised_dur
Moment mom( ticks_i, Duration::division_1_i_s );
Duration_iterator iter_dur;
assert( iter_dur );
cursor_dur_.type_i_ = 128;
if ( Duration_convert::no_smaller_than_i_s )
cursor_dur_.type_i_ = Duration_convert::no_smaller_than_i_s;
- cursor_dur_.set_plet( 0,1 ); // ugh?
+// cursor_dur_.set_plet( 1, 1 );
}
Duration
assert( !cursor_dur_.plet_b() );
cursor_dur_.dots_i_ = 0;
cursor_dur_.type_i_ /= 4;
- cursor_dur_.set_plet( 2, 3 );
+ cursor_dur_.set_plet( 2, 3 );
}
else if ( cursor_dur_.plet_b()
&& ( cursor_dur_.plet_.iso_i_ == 2 )
&& ( cursor_dur_.plet_.type_i_ == 3 ) ) {
assert( !cursor_dur_.dots_i_ );
- cursor_dur_.set_plet( 0,1 );
+ cursor_dur_.set_plet( 1, 1 );
cursor_dur_.type_i_ *= 2;
cursor_dur_.dots_i_ = 1;
}
dots_i_ = dots_i;
ticks_i_ = 0;
}
+
+Moment
+Duration::length() const
+{
+ return Duration_convert::dur2_mom(*this);
+}
+
void
Duration::set_plet(int i, int t)
{
plet_.type_i_ = t;
}
-Moment
-Duration::length() const
-{
- return Duration_convert::dur2_mom(*this);
-}
void
Duration::set_ticks( int ticks_i )
{
assert( !dots_i_ );
ticks_i_ = ticks_i;
}
+
String
Duration::str()const
{
return Duration_convert::dur2_str(*this);
}
+
+Plet::Plet()
+{
+ type_i_ = 1;
+ iso_i_ = 1;
+}
+
Plet::Plet( int iso_i, int type_i )
{
iso_i_ = iso_i;
type_i_ = type_i;
}
+
Moment
Plet::mom()const
{
return Moment( iso_i_, type_i_ );
}
-Plet::Plet()
+bool
+Duration::plet_b()
{
- type_i_ = 1;
- iso_i_ = 1;
+ return !plet_.unit_b();
}
+
bool
Plet::unit_b()const
{
return type_i_ == 1 && iso_i_ == 1;
}
-bool
-Duration::plet_b()
-{
- return !plet_.unit_b();
-}
+
/* Urgh. statics.
*/
- static bool be_blonde_b_s; // cute, but not informative. everythiing is blonde, right? HW
+ static bool const midi_as_plet_b_s = true;
+ static bool no_quantify_b_s;
static bool no_double_dots_b_s;
static bool no_triplets_b_s;
static int no_smaller_than_i_s;
// /// Return Moment (fraction of whole) representation, best guess.
// static Duration mom2_dur( Moment mom );
+ /// Return duration from Moment (fraction of whole) representation.
+ static Duration mom2_dur( Moment mom );
+
+ /// Return standardised duration, best guess if not exact.
+ static Duration mom2standardised_dur( Moment mom );
+
/// Return plet factor (not a Moment: should use Rational?).
static Moment plet_factor_mom( Duration dur );
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 44
+PATCH_LEVEL = 45
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
MY_PATCH_LEVEL =
-#
Command_req* c_l = r_l->command();
if (!c_l|| !c_l->bar())
return false;
-
- assert(!bar_req_l_);
- bar_req_l_ = c_l->bar();
+ Bar_req * b= c_l->bar();
+ if (bar_req_l_ && bar_req_l_->compare(*b))
+ return false;
+
+ bar_req_l_ = b;
return true;
}
}
}
+
+
void
Bar_register::split_bar(Bar *& pre, Bar * no, Bar * &post)
{
bar_req_l_ = 0;
bar_p_ =0;
}
+
+IMPLEMENT_STATIC_NAME(Bar_register);
+
+
type = t;
}
+IMPLEMENT_STATIC_NAME(Bar);
+
void
Bar::do_print()const
{
out->translate(Offset(x0 - left->hpos,0));
}
+IMPLEMENT_STATIC_NAME(Beam);
+
void
Beam::do_print()const
{
return output;
}
+IMPLEMENT_STATIC_NAME(Clef_item);
set_type("violin");
}
}
+IMPLEMENT_STATIC_NAME(Clef_register);
#include "musical-request.hh"
+IMPLEMENT_STATIC_NAME(Cadenza_req);
+
void
Cadenza_req::do_print()const
{
return type_str_ == c1.type_str_;
}
+IMPLEMENT_STATIC_NAME(Bar_req);
+
void
Bar_req::do_print() const
{
duration_ =m;
}
/* *************** */
-Meter_change_req::Meter_change_req()
-{
- beats_i_ = 0;
- one_beat_i_ =0;
-}
-void
-Meter_change_req::set(int b,int o)
-{
- beats_i_=b;
- one_beat_i_=o;
-}
+
+IMPLEMENT_STATIC_NAME(Timing_req);
void
Timing_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Command_req);
+
void
Command_req::do_print()const{}
/* *************** */
+IMPLEMENT_STATIC_NAME(Barcheck_req);
+
void
Barcheck_req::do_print() const{}
/* *************** */
+IMPLEMENT_STATIC_NAME(Clef_change_req);
+
void
Clef_change_req::do_print() const
{
clef_str_ = s;
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Group_feature_req);
+
void
Group_feature_req::do_print() const
{
stemdir_i_ = 0;
}
+IMPLEMENT_STATIC_NAME(Group_change_req);
+
void
Group_change_req::do_print()const
{
mtor << "id : " << newgroup_str_;
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Terminate_voice_req);
+
void
Terminate_voice_req::do_print()const
{
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Partial_measure_req);
+
void
Partial_measure_req::do_print() const
{
mtor << duration_;
}
+IMPLEMENT_STATIC_NAME(Meter_change_req);
+
void
Meter_change_req::do_print() const
{
- mtor << beats_i_ << "*" << one_beat_i_;
+ mtor << beats_i_ << "/" << one_beat_i_;
+}
+
+int
+Meter_change_req::compare(Meter_change_req const &m)
+{
+ return m.beats_i_ == beats_i_ && one_beat_i_ == m.one_beat_i_;
+}
+
+Meter_change_req::Meter_change_req()
+{
+ beats_i_ = 0;
+ one_beat_i_ =0;
+}
+
+void
+Meter_change_req::set(int b,int o)
+{
+ beats_i_=b;
+ one_beat_i_=o;
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Measure_grouping_req);
+
void
Measure_grouping_req::do_print() const
{
}
}
+IMPLEMENT_STATIC_NAME(Key_change_req);
+
void
Key_change_req::do_print() const
{
Key_change_req::Key_change_req()
{
+ minor_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() );
- }
+ 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_;
}
Key_change_req::~Key_change_req()
{
- for (int i=0; i < melodic_p_arr_.size(); i++)
- delete melodic_p_arr_[i];
+ for (int i=0; i < melodic_p_arr_.size(); i++)
+ delete melodic_p_arr_[i];
+}
+
+int
+Key_change_req::flats_i()
+{
+ int flats_i = 0;
+ for ( int i = 0; i < melodic_p_arr_.size(); i++ ) {
+ Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
+ assert( mel_l );
+ if ( mel_l->accidental_i_ < 0 )
+ flats_i++;
+ }
+ return flats_i;
+}
+
+int
+Key_change_req::minor_b()
+{
+ return minor_b_;
}
+
+int
+Key_change_req::sharps_i()
+{
+ int sharps_i = 0;
+ for ( int i = 0; i < melodic_p_arr_.size(); i++ ) {
+ Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
+ assert( mel_l );
+ if ( mel_l->accidental_i_ > 0 )
+ sharps_i++;
+ }
+ return sharps_i;
+}
+
int pos = (dir_i_ >0) ? staff_size_i_ + 4 : - 4 ;
m_p->translate(Offset(0,pos * paper()->internote()));
}
+
+IMPLEMENT_STATIC_NAME(Crescendo);
{
dir_i_ = i.direction_i_;
}
+
+IMPLEMENT_STATIC_NAME(Dynamic_register);
{
note_req_l_ = 0;
}
+
+IMPLEMENT_STATIC_NAME(Notehead_register);
#ifndef CLASS_NAME_HH
#define CLASS_NAME_HH
-/// a macro to declare the classes name as a static and virtual function.
+/** a macro to declare the classes name as a static and virtual function.
+ The static_name() can *not* be inlined (this might have the effect that
+ s->name() != S::static_name(). Overlapping strings need not be merged in C++
+ */
#define NAME_MEMBERS(c) \
-static char const *static_name(){ return #c; }\
+static char const *static_name();\
virtual char const *name() const{ return c::static_name(); } \
int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out()
+
+#define IMPLEMENT_STATIC_NAME(c)\
+ char const *c::static_name() { return #c; }
#endif // CLASS-NAME_HH
struct Meter_change_req : Timing_req {
int beats_i_, one_beat_i_;
+ int compare(Meter_change_req const&);
Meter_change_req();
void set(int,int);
REQUESTMETHODS(Meter_change_req, meterchange);
};
+/**
+ Handle key changes.
+ Routines for sharps and flats are separated,
+ so that caller may identify non-conventional keys.
+*/
struct Key_change_req : Command_req {
Array<Melodic_req*> melodic_p_arr_;
- virtual void transpose(Melodic_req const &)const;
+ bool minor_b_;
+
Key_change_req();
Key_change_req(Key_change_req const&);
~Key_change_req();
REQUESTMETHODS(Key_change_req, keychange);
+
+ /// return number of flats in key
+ int flats_i();
+
+ /// return number of sharps in key
+ int sharps_i();
+
+ void transpose(Melodic_req const & d) const;
+ /// is minor key?
+ int minor_b();
};
struct Clef_change_req : Command_req {
virtual ~Input_music(){}
virtual void print() const =0;
virtual void set_default_group(String)=0;
- virtual bool find_plet_start_bo(char c, Moment& moment_r) = 0;
+ virtual bool find_plet_start_b(char c, Moment& moment_r) = 0;
virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i) = 0;
virtual void transpose(Melodic_req const&) const =0;
virtual Voice_list convert()const;
virtual void translate_time(Moment dt);
virtual void print() const;
- virtual bool find_plet_start_bo(char c, Moment& moment_r);
+ virtual bool find_plet_start_b(char c, Moment& moment_r);
virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
virtual Input_music *clone() const {
return new Simple_music(*this);
Complex_music(Complex_music const &);
virtual void print() const ;
void concatenate(Complex_music*);
- virtual bool find_plet_start_bo(char c, Moment& moment_r);
+ virtual bool find_plet_start_b(char c, Moment& moment_r);
virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
};
\end{itemize}
*/
-struct PCol {
+class PCol {
+public:
PointerList<Item const *> its;
PointerList<Spanner const *> stoppers, starters;
-
-
/** prebreak is put before end of line.
if broken here, then (*this) column is discarded, and prebreak
is put at end of line, owned by Col
/// if lines are broken then this column is in #line#
Line_of_score const *line_l_;
- /// if lines are broken then this column x-coord #hpos#
- Real hpos;
+ /** if lines are broken then this column x-coord #hpos# if not
+ known, then hpos == -1.(ugh?) */
+
+ Real hpos; // should use ptr?
PScore * pscore_l_;
signed compare on columns.
@return < 0 if c1 < c2.
- */static int compare(const PCol &c1, const PCol &c2);
-
+ */
+ static int compare(const PCol &c1, const PCol &c2);
+ void set_rank(int);
void OK() const;
void set_breakable();
void print()const;
private:
+
+ /**
+ The ranking: left is smaller than right
+ -1 is uninitialised.
+ */
+ int rank_i_;
PCol(PCol const&){}
};
--- /dev/null
+/*
+ registergroup.hh -- declare
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef REGISTERGROUP_HH
+#define REGISTERGROUP_HH
+
+
+#include "plist.hh"
+#include "staff-elem-info.hh"
+#include "register.hh"
+
+/**
+ Group a number of registers. Usually delegates everything to its contents.
+ Postfix: group
+ */
+class Register_group_register : public Request_register {
+protected:
+ IPointerList<Request_register*> reg_list_;
+ virtual void do_print()const;
+public:
+
+ /**
+ Junk #reg_l#.
+
+ Pre:
+ #reg_l# is in #reg_list_#
+ */
+ virtual void terminate_register(Request_register * reg_l);
+
+ NAME_MEMBERS(Register_group_register);
+
+ /**
+ Remove #reg_l# from the list, and return it.
+ */
+ Request_register * get_register_p(Request_register*reg_l);
+ virtual void set_feature(Features i);
+ virtual bool acceptable_request_b(Request*);
+ virtual void pre_move_processing();
+ virtual void post_move_processing();
+ virtual void acknowledge_element(Staff_elem_info info);
+ virtual bool try_request(Request*);
+ virtual void process_requests();
+ virtual ~Register_group_register();
+ virtual void add(Request_register* reg_p);
+ virtual bool contains_b(Request_register*);
+};
+
+#endif // REGISTERGROUP_HH
+
+
*/
virtual Staff_info get_staff_info();
+
virtual void do_print()const;
public:
/** Every Request_register (except for the 'top' which is directly
+++ /dev/null
-/*
- registergroup.hh -- declare
-
- source file of the LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-
-#ifndef REGISTERGROUP_HH
-#define REGISTERGROUP_HH
-
-
-#include "plist.hh"
-#include "staff-elem-info.hh"
-#include "register.hh"
-
-/**
- Group a number of registers. Usually delegates everything to its contents.
- Postfix: group
- */
-class Register_group_register : public Request_register {
-protected:
- IPointerList<Request_register*> reg_list_;
- virtual void do_print()const;
-public:
-
- /**
- Junk #reg_l#.
-
- Pre:
- #reg_l# is in #reg_list_#
- */
- virtual void terminate_register(Request_register * reg_l);
-
- /**
- Remove #reg_l# from the list, and return it.
- */
- Request_register * get_register_p(Request_register*reg_l);
- virtual void set_feature(Features i);
- virtual bool acceptable_request_b(Request*);
- virtual void pre_move_processing();
- virtual void post_move_processing();
- virtual void acknowledge_element(Staff_elem_info info);
- virtual bool try_request(Request*);
- virtual void process_requests();
- virtual ~Register_group_register();
- virtual void add(Request_register* reg_p);
- virtual bool contains_b(Request_register*);
-};
-
-#endif // REGISTERGROUP_HH
-
-
#define REST_HH
#include "item.hh"
+/** typeset a Rest. A "vanilla" item.
+ */
struct Rest : Item {
int dots;
void paper();
// utils:
- PCursor<Score_column*> create_cols(Moment);
+ PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
Score(Score const&){}
Staff_elem_info();
};
+/// struct to pass staff info along a Request_register hierarchy.
struct Staff_info {
int *c0_position_i_;
Staff_walker *walk_l_;
+
+ /// when is now?
Time_description const *time_C_;
Rhythmic_grouping const *rhythmic_C_;
bool break_allowed_b_;
/** one horizontal bit. Voice_element is nothing but a container for
*the requests, */
struct Voice_element {
- Moment duration;
+ /** the duration of the element. This can be 0; The duration is
+ determined from rhythmical requests contained in this
+ Voice_element */
+ Moment duration_;
char const* defined_ch_C_;
Voice const *voice_l_;
IPointerList<Request*> reqs;
Voice_element(Voice_element const & src );
void add(Request*);
- bool find_plet_start_bo(char c, Moment& moment_r);
+ bool find_plet_start_b(char c, Moment& moment_r);
void print ()const;
void set_default_group(String id);
void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
#ifndef VOICEGROUPREGS_HH
#define VOICEGROUPREGS_HH
-#include "registergroup.hh"
+#include "register-group.hh"
struct Voice_group_registers : Register_group_register {
String group_id_str_;
Array<Voice_registers*> voice_regs_l_;
+ Moment termination_mom_;
/* *************** */
static bool static_acceptable_request_b(Request*);
virtual void terminate_register(Request_register*);
virtual void do_print() const;
+ virtual void post_move_processing();
virtual void add(Request_register*);
Voice_group_registers(String id);
virtual bool try_request(Request*);
#ifndef VOICEREGS_HH
#define VOICEREGS_HH
-#include "registergroup.hh"
+#include "register-group.hh"
class Voice_registers : public Register_group_register {
-
public:
Voice *voice_l_;
/* *************** */
*/
struct Voice {
+ /** the elements, earliest first.
+ Please use the member #add()# to add a new element
+ */
IPointerList<Voice_element *> elts;
Moment start;
Moment last() const;
void transpose(Melodic_req const &)const;
void add(Voice_element*);
- bool find_plet_start_bo(char c, Moment& moment_r);
+ bool find_plet_start_b(char c, Moment& moment_r);
void print() const;
void set_default_group(String id);
void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i);
#define WALKREGS_HH
-#include "registergroup.hh"
+#include "register-group.hh"
/**
Top level registers: the interface to Complex_walker.
#include "input-music.hh"
#include "voice.hh"
#include "musical-request.hh"
+#include "command-request.hh"
#include "voice-element.hh"
void
for (iter_top(velt_l->reqs,i); i.ok(); i++)
if ( i->plet() ) {
Moment start_moment = 0;
- if ( !find_plet_start_bo( i->plet()->type_c_, start_moment ) ) {
+ if ( !find_plet_start_b( i->plet()->type_c_, start_moment ) ) {
error( "begin of plet not found", i->defined_ch_C_ );
break;
}
Simple_music::convert()const
{
Voice_list l;
- l.bottom().add(new Voice(voice_));
+ Voice * v_p = new Voice(voice_);
+ PCursor<Voice_element*> i= v_p->elts.bottom();
+ // need-to-have, otherwise memory will be filled up with regs.
+ if (!i.ok() || i->duration_) {
+ v_p->add ( new Voice_element);
+ i=v_p->elts.bottom();
+ }
+ i->add(new Terminate_voice_req);
+ l.bottom().add(v_p);
return l;
}
void
Simple_music::print() const
{
+#ifndef NPRINT
mtor << "Simple_music {";
voice_.print();
mtor << "}\n";
+#endif
}
bool
-Simple_music::find_plet_start_bo(char c, Moment& moment_r)
+Simple_music::find_plet_start_b(char c, Moment& moment_r)
{
- return voice_.find_plet_start_bo(c, moment_r);
+ return voice_.find_plet_start_b(c, moment_r);
}
void
-Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i)
+Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment,
+ int num_i, int den_i)
{
voice_.set_plet_backwards(now_moment_r, until_moment, num_i, den_i);
}
i->set_default_group(g);
}
bool
-Complex_music::find_plet_start_bo(char c, Moment& moment_r)
+Complex_music::find_plet_start_b(char c, Moment& moment_r)
{
for (iter_bot(elts,i); i.ok(); i--) {
- if ( i->find_plet_start_bo(c, moment_r) )
+ if ( i->find_plet_start_b(c, moment_r) )
return true;
}
return false;
pcol_l_ = 0;
}
+IMPLEMENT_STATIC_NAME(Item);
+
void
Item::do_print() const
{
output->add_right(m);
return output;
}
+IMPLEMENT_STATIC_NAME(Key_item);
default_key_b_ = false;
kit_p_ = 0;
}
+IMPLEMENT_STATIC_NAME(Key_register);
mtor << "rest:"<< yylval.string;
return RESTNAME;
}
-<INITIAL,lyrics,notes>\$\\{BLACK}*{WHITE} {
+<INITIAL,lyrics,notes>\\\${BLACK}*{WHITE} {
String s=YYText() + 2;
s=s.left_str(s.length_i() - 1);
return scan_escaped_word(s);
assert(false);
};
+IMPLEMENT_STATIC_NAME(Local_key_item);
warning ("Help me! can't figure current key", 0);
}
}
+IMPLEMENT_STATIC_NAME(Local_key_register);
};
void
-help()
+usage()
{
cout <<
- "--help, -h This help\n"
- "--warranty, -w show warranty & copyright\n"
- "--output, -o set default output\n"
- "--debug, -d enable debug output\n"
- "--init, -i set init file\n"
- "--include, -I add to file search path.\n"
- "--midi, -M midi output only\n"
+ "Usage: lilypond [options] [mudela-file]\n"
+ "Typeset and or produce midi output from mudela-file or stdin\n"
+ "\n"
+ "Options:\n"
+ " -d, --debug enable debugging output\n"
+ " -I, --include=DIR add DIR to search path\n"
+ " -i, --init=FILE use FILE as init file\n"
+ " -h, --help this help\n"
+ " -w, --warranty show warranty and copyright\n"
+ " -o, --output=FILE set FILE as default output\n"
+ " -M, --midi produce midi output only\n"
"\n"
"LilyPond was compiled with the following settings:\n"
#ifdef NDEBUG
init_str = oparser.optarg;
break;
case 'h':
- help();
+ usage();
exit(0);
break;
case 'd':
#include "command-request.hh"
Meter_register::Meter_register()
-
{
post_move_processing();
}
Command_req* creq_l= r_l->command();
if (!creq_l || !creq_l->meterchange())
return false;
-
- assert(!meter_req_l_);
- meter_req_l_ = r_l->command()->meterchange();
-
+ Meter_change_req *m = creq_l->meterchange();
+ if (meter_req_l_ && meter_req_l_->compare(*m))
+ return false;
+
+ meter_req_l_ = m;
return true;
}
meter_req_l_ = 0;
meter_p_ =0;
}
+IMPLEMENT_STATIC_NAME(Meter_register);
return new Molecule(Atom(s));
}
+IMPLEMENT_STATIC_NAME(Meter);
Midi_text instrument_name( Midi_text::INSTRUMENT_NAME, "piano" );
midi_track.add( Moment( 0 ), &instrument_name );
- // set key, help, where to get key, where to get major/minor?
- int accidentals_i = 0;
- int minor_i = 0;
-
-
- Midi_key midi_key( accidentals_i, minor_i );
- midi_track.add( Moment( 0 ), &midi_key );
-
Midi_tempo midi_tempo( midi_l_->get_tempo_i( Moment( 1, 4 ) ) );
midi_track.add( Moment( 0 ), &midi_tempo );
- Midi_time midi_time( Midi_def::num_i_s, Midi_def::den_i_s, 18 );
- midi_track.add( Moment( 0 ), &midi_time );
-
for (Midi_walker w (st_l, &midi_track); w.ok(); w++)
w.process_requests();
// set track name
Midi_text track_name( Midi_text::TRACK_NAME, "Track " + String_convert::i2dec_str( 0, 0, '0' ) );
midi_track.add( Moment( 0 ), &track_name );
+
+ // ugh, to please lily when reparsing mi2mu output.
+ // lily currently barfs when no meter present.
+ Midi_time midi_time( 4, 4, 18 );
+ midi_track.add( Moment( 0.0 ), &midi_time );
+
*midi_stream_l_ << midi_track;
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>, Jan Nieuwenhuizen <jan@digicash.com>
*/
+#include "command-request.hh"
#include "musical-request.hh"
#include "p-score.hh"
#include "staff.hh"
Midi_walker::process_requests()
{
do_stop_notes(ptr()->when());
+
+ for ( int i = 0; i < ptr()->commandreq_l_arr_.size(); i++ ) {
+ Command_req *c_l = ptr()->commandreq_l_arr_[i]->command();
+ Meter_change_req* meter_l = c_l->meterchange();
+ if ( meter_l )
+ output_event( Midi_time( meter_l->beats_i_, meter_l->one_beat_i_, 18 ), 0 );
+ Key_change_req* key_l = c_l->keychange();
+ if ( key_l ) {
+ int sharps_i = key_l->sharps_i();
+ int flats_i = key_l->flats_i();
+ // midi cannot handle non-conventional keys
+ if ( !( flats_i && sharps_i ) )
+ output_event( Midi_key( sharps_i - flats_i, key_l->minor_b() ), 0 );
+ }
+ }
+
for ( int i = 0; i < ptr()->musicalreq_l_arr_.size(); i++ ) {
Rhythmic_req *n = ptr()->musicalreq_l_arr_[i]->rhythmic();
#include "voice.hh"
#include "voice-element.hh"
+IMPLEMENT_STATIC_NAME(Stem_req);
void
Stem_req::do_print() const
{
}
/* ************** */
-void Musical_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Musical_req);
+void
+Musical_req::do_print()const{}
+
+IMPLEMENT_STATIC_NAME(Request);
+
void Request::do_print() const{}
/* *************** */
+IMPLEMENT_STATIC_NAME(Span_req);
+
void
Span_req::do_print() const
{
distance = 0;
strength = 0;
}
+IMPLEMENT_STATIC_NAME(Spacing_req);
+
void
Spacing_req::do_print()const
{
#endif
}
+IMPLEMENT_STATIC_NAME(Blank_req);
+
void
Blank_req::do_print()const
{
}
}
+IMPLEMENT_STATIC_NAME(Melodic_req);
+
void
Melodic_req::do_print() const
{
type_i_ = 1;
}
+IMPLEMENT_STATIC_NAME(Plet_req);
+
void
Plet_req::do_print() const
{
{
}
+IMPLEMENT_STATIC_NAME(Rhythmic_req);
+
void
Rhythmic_req::do_print() const
{
#ifndef NPRINT
- mtor << duration_.str();
+ mtor << "duration { " <<duration_.str() << "}";
#endif
}
dir_i_ = -1; // lyrics below (invisible) staff
}
+IMPLEMENT_STATIC_NAME(Lyric_req);
+
void
Lyric_req::do_print() const
{
{
forceacc_b_ = false;
}
+IMPLEMENT_STATIC_NAME(Note_req);
+
void
Note_req::do_print() const
{
#ifndef NPRINT
Melodic_req::do_print();
- mtor << " forceacc_b_ " << forceacc_b_ << '\n';
+ if (forceacc_b_) {
+ mtor << " force accidental\n";
+ }
Rhythmic_req::do_print();
#endif
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Rest_req);
+
void
Rest_req::do_print() const
{
{
nplet = 0;
}
-
-void Beam_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Beam_req);
+void
+Beam_req::do_print()const{}
/* *************** */
-void Slur_req::do_print()const{}
+IMPLEMENT_STATIC_NAME(Slur_req);
+void
+Slur_req::do_print()const{}
/* *************** */
int
Span_req:: compare(Span_req const &r1, Span_req const &r2)
scriptdef_p_ = new Script_def(*s.scriptdef_p_);
}
+IMPLEMENT_STATIC_NAME(Script_req);
+
void
Script_req::do_print() const
{
tdef_p_ = tdef_p;
}
+IMPLEMENT_STATIC_NAME(Text_req);
+
void
Text_req::do_print() const
{
return duration_;
}
+IMPLEMENT_STATIC_NAME(Skip_req);
+
void
Skip_req::do_print() const
{
}
/* *************** */
+IMPLEMENT_STATIC_NAME(Subtle_req);
+
void
Subtle_req::do_print() const
{
#endif
}
+IMPLEMENT_STATIC_NAME(Dynamic_req);
+
void
Dynamic_req::do_print() const
{
Subtle_req::do_print();
}
+IMPLEMENT_STATIC_NAME(Absolute_dynamic_req);
+
void
Absolute_dynamic_req::do_print() const
{
Dynamic_req::do_print();
- mtor << " loudness_" <<loudness_;
+ mtor << " loudness " <<loudness_;
}
String
dynamic_dir_i_ = 0;
}
+IMPLEMENT_STATIC_NAME(Span_dynamic_req);
+
void
Span_dynamic_req::do_print()const
{
"dynamic", DYNAMIC,
"geometric", GEOMETRIC,
"in", IN_T,
- "lyrics", LYRICS,
+ "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,
"transpose", TRANSPOSE,
"unitspace", UNITSPACE,
"width", WIDTH,
- "music", MUSIC,
"grouping", GROUPING,
0,0
};
Lyric_req* lreq_p = new Lyric_req(tdef_p);
lreq_p->duration_ = *duration_p;
- lreq_p->print();
- lreq_p->defined_ch_C_ = here_ch_C();
+ lreq_p->defined_ch_C_ = here_ch_C();
velt_p->add(lreq_p);
Rest_req * rest_req_p = new Rest_req;
rest_req_p->duration_ = *duration_p;
- rest_req_p->print();
- rest_req_p->defined_ch_C_ = here_ch_C();
+ rest_req_p->defined_ch_C_ = here_ch_C();
velt_p->add(rest_req_p);
delete duration_p;
source_l_ = source_l;
lexer_p_ = 0;
default_duration_.type_i_ = 4;
- default_octave_i_=0;
+ default_octave_i_ = 3; // retain old default
textstyle_str_="roman"; // in lexer?
error_level_i_ = 0;
last_duration_mode = false;
dots = r_req_l->duration_.dots_i_;
}
+IMPLEMENT_STATIC_NAME(Notehead);
+
void
Notehead::do_print()const
{
int
PCol::rank() const
{
+#if 0
if(!pscore_l_)
return -1;
PCursor<PCol*> me=pscore_l_->find_col( (PCol*)this);
return -1;
PCursor<PCol*> bot(pscore_l_->cols.top());
return me - bot;
+#endif
+ assert(rank_i_ != -1);
+ return rank_i_;
+}
+
+void
+PCol::set_rank(int i)
+{
+ rank_i_ = i;
+ if (prebreak_p_)
+ prebreak_p_->rank_i_ = i;
+ if (postbreak_p_)
+ postbreak_p_->rank_i_ = i;
}
void
mtor << "PCol {";
if (rank() >= 0)
- mtor << "rank: " << rank() << '\n';
+ mtor << "rank: " << rank_i_ << '\n';
mtor << "# symbols: " << its.size() ;
if (breakable_b()){
int
PCol::compare(PCol const &c1, PCol const &c2)
{
- PScore*ps_l = c1.pscore_l_;
- PCursor<PCol*> ac(ps_l->find_col(&c1));
- PCursor<PCol*> bc(ps_l->find_col(&c2));
- assert(ac.ok() && bc.ok());
- return ac - bc;
+ return c1.rank() - c2.rank();
}
void
void
PScore::clean_cols()
{
+ int rank_i = 0;
for (iter_top(cols,c); c.ok(); )
if (!c->used_b()) {
delete c.remove_p();
- } else
+ } else {
+ c->set_rank(rank_i++);
c++;
+ }
+
}
PScore::process()
{
clean_cols();
+
*mlog << "Preprocessing ... " <<flush;
preprocess();
*mlog << "\nCalculating column positions ... " <<flush;
%token GEOMETRIC
%token GROUPING
%token IN_T
-%token LYRICS
+%token LYRIC
%token KEY
%token MELODIC
+%token MELODIC_REQUEST
%token METER
%token MIDI
%token MM_T
%token MULTIVOICE
-%token MUSIC
+%token NOTE
%token OCTAVECOMMAND
%token OUTPUT
%token PAPER
$$ = $4;
$$-> defined_ch_C_ = THIS->define_spot_array_.pop();
}
+ | { THIS->remember_spot(); }
+/*cont*/ STAFF_IDENTIFIER {
+ $$ = $2->staff(true);
+ $$-> defined_ch_C_ = THIS->define_spot_array_.pop();
+ }
;
staff_init:
- STAFF_IDENTIFIER { $$ = $1->staff(true); }
+ /* empty */ {
+ $$ = new Input_staff( "melodic" );
+ }
| STRING {
$$ = new Input_staff(*$1);
delete $1;
}
- | MELODIC {
- $$ = new Input_staff("melodic");
- }
;
staff_body:
staff_init
| staff_body init_music {
+ $$ = $1;
$2->set_default_group( "staff_music" + String($$->music_.size()));
$$->add($2);
}
init_music_voice { $$ = $1; }
| init_music_chord { $$ = $1; }
| init_lyrics_voice { $$ = $1; }
+ | VOICE_IDENTIFIER {
+ $$ = $1->mvoice(true);
+ }
;
init_lyrics_voice:
- LYRICS { THIS->lexer_p_->push_lyric_state(); }
+ LYRIC { THIS->lexer_p_->push_lyric_state(); }
music_voice { $$ = $3; THIS->lexer_p_->pop_state(); }
;
init_music_voice:
- MUSIC { THIS->lexer_p_->push_note_state(); }
+ MELODIC { THIS->lexer_p_->push_note_state(); }
/* cont*/ music_voice
{ $$=$3; THIS->lexer_p_->pop_state(); }
;
init_music_chord:
- MUSIC { THIS->lexer_p_->push_note_state(); }
+ { THIS->lexer_p_->push_note_state(); }
/* cont*/ music_chord
- { $$=$3; THIS->lexer_p_->pop_state(); }
+ { $$=$2; THIS->lexer_p_->pop_state(); }
;
/*
MUSIC
| music_voice_body '>' {
THIS->fatal_error_i_ = 1;
THIS->parser_error("Confused by errors: bailing out");
- };
+ }
+ ;
music_chord: '<' music_chord_body '>' { $$ = $2; }
;
;
melodic_request:
- MELODIC '{' int int int '}' {/* ugh */
+ MELODIC_REQUEST '{' int int int '}' {/* ugh */
$$ = new Melodic_req;
$$->octave_i_ = $3;
$$->notename_i_ = $4;
THIS->default_duration_ = *$3;
delete $3;
}
- | OCTAVECOMMAND '{' int '}' {
- THIS->default_octave_i_ = $3;
+ | OCTAVECOMMAND { THIS->default_octave_i_ = 2; }
+/* cont */
+ '{' steno_melodic_req '}' {
+ THIS->default_octave_i_ = $4->octave_i_;
}
| TEXTSTYLE STRING {
THIS->textstyle_str_ = *$2;
void
Active_constraints::OK()
{
- #ifndef NDEBUG
+#ifndef NDEBUG
H.OK();
A.OK();
assert(active.size() +inactive.size() == opt->cons.size());
A -= A*opt->quad*Matrix(a,a/q);
}else
WARN << "degenerate constraints";
- #ifndef NDEBUG
+#ifndef NDEBUG
Vector rem_row(A.row(q));
assert(rem_row.norm() < EPS);
- #endif
+#endif
A.delete_row(q);
}
--- /dev/null
+/*
+ registergroup.cc -- implement Register_group_register
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "register-group.hh"
+#include "register.hh"
+
+bool
+Register_group_register::acceptable_request_b(Request* r)
+{
+ for (iter_top(reg_list_, i); i.ok(); i++) {
+ if (i->acceptable_request_b(r))
+ return true;
+ }
+ return false;
+}
+
+void
+Register_group_register::set_feature(Features d)
+{
+ for (iter_top(reg_list_, i); i.ok(); i++) {
+ i->set_feature(d);
+ }
+}
+
+void
+Register_group_register::pre_move_processing()
+{
+ for (iter_top(reg_list_, i); i.ok(); i++)
+ i->pre_move_processing();
+}
+
+void
+Register_group_register::process_requests()
+{
+ for (iter_top(reg_list_, i); i.ok(); i++)
+ i->process_requests();
+}
+
+void
+Register_group_register::post_move_processing()
+{
+ iter_top(reg_list_, i);
+ while (i.ok()) {
+ // this construction to ensure clean deletion
+ Request_register *reg_l = i++;
+ reg_l->post_move_processing();
+ }
+}
+
+void
+Register_group_register::acknowledge_element(Staff_elem_info info)
+{
+ if (!contains_b(info.origin_reg_l_arr_[0]))
+ return;
+
+ for (iter_top(reg_list_, i); i.ok(); i++)
+ i->acknowledge_element(info);
+}
+
+bool
+Register_group_register::contains_b(Request_register* reg_l)
+{
+ bool parent_b = Request_register::contains_b(reg_l);
+
+ if (parent_b)
+ return true;
+ for (iter_top(reg_list_, j); j.ok(); j++)
+ if (j->contains_b(reg_l))
+ return true;
+ return false;
+}
+
+
+
+bool
+Register_group_register::try_request(Request*req_l)
+{
+ iter_top(reg_list_, i);
+ while (i.ok()) {
+
+
+ // this construction to ensure clean deletion
+ Request_register *reg_l = i++;
+ if (reg_l->try_request( req_l ))
+ return true;
+ }
+ return false;
+}
+
+void
+Register_group_register::add(Request_register *reg_p)
+{
+ reg_list_.bottom().add(reg_p);
+ reg_p->daddy_reg_l_ = this;
+}
+
+
+Register_group_register::~Register_group_register()
+{
+
+}
+
+Request_register *
+Register_group_register::get_register_p(Request_register*reg_l)
+{
+ iterator(reg_list_) reg_cur= reg_list_.find(reg_l);
+ assert(reg_cur.ok());
+ return reg_cur.remove_p();
+}
+
+void
+Register_group_register::terminate_register(Request_register*r_l)
+{
+ delete get_register_p(r_l);
+}
+
+IMPLEMENT_STATIC_NAME(Register_group_register);
+
+void
+Register_group_register::do_print()const
+{
+#ifndef NPRINT
+ for (iter_top(reg_list_, i); i.ok(); i++)
+ i->print();
+#endif
+}
#include "complex-walker.hh"
#include "local-key-item.hh"
#include "complex-staff.hh"
-#include "registergroup.hh"
+#include "register-group.hh"
#include "debug.hh"
#endif
}
+IMPLEMENT_STATIC_NAME(Request_register);
+
void
Request_register::do_print()const
{
+++ /dev/null
-/*
- registergroup.cc -- implement Register_group_register
-
- source file of the LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include "proto.hh"
-#include "plist.hh"
-#include "registergroup.hh"
-#include "register.hh"
-
-bool
-Register_group_register::acceptable_request_b(Request* r)
-{
- for (iter_top(reg_list_, i); i.ok(); i++) {
- if (i->acceptable_request_b(r))
- return true;
- }
- return false;
-}
-
-void
-Register_group_register::set_feature(Features d)
-{
- for (iter_top(reg_list_, i); i.ok(); i++) {
- i->set_feature(d);
- }
-}
-
-void
-Register_group_register::pre_move_processing()
-{
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->pre_move_processing();
-}
-
-void
-Register_group_register::process_requests()
-{
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->process_requests();
-}
-
-void
-Register_group_register::post_move_processing()
-{
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->post_move_processing();
-}
-
-void
-Register_group_register::acknowledge_element(Staff_elem_info info)
-{
- if (!contains_b(info.origin_reg_l_arr_[0]))
- return;
-
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->acknowledge_element(info);
-}
-
-bool
-Register_group_register::contains_b(Request_register* reg_l)
-{
- bool parent_b = Request_register::contains_b(reg_l);
-
- if (parent_b)
- return true;
- for (iter_top(reg_list_, j); j.ok(); j++)
- if (j->contains_b(reg_l))
- return true;
- return false;
-}
-
-
-
-bool
-Register_group_register::try_request(Request*req_l)
-{
- for (iter_top(reg_list_, i); i.ok(); i++)
- if (i->try_request(req_l))
- return true;
- return false;
-}
-
-void
-Register_group_register::add(Request_register *reg_p)
-{
- reg_list_.bottom().add(reg_p);
- reg_p->daddy_reg_l_ = this;
-}
-
-
-Register_group_register::~Register_group_register()
-{
-
-}
-
-Request_register *
-Register_group_register::get_register_p(Request_register*reg_l)
-{
- iterator(reg_list_) reg_cur= reg_list_.find(reg_l);
- assert(reg_cur.ok());
- return reg_cur.remove_p();
-}
-
-void
-Register_group_register::terminate_register(Request_register*r_l)
-{
- delete get_register_p(r_l);
-}
-
-void
-Register_group_register::do_print()const
-{
-#ifndef NPRINT
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->print();
-#endif
-}
}
+IMPLEMENT_STATIC_NAME(Rest);
+
void
Rest::do_print()const
{
for (iter_top(staffs_,i); i.ok(); i++) {
i->setup_staffcols();
- i->OK();
}
}
}
}
-/**
- Create columns at time #w#.
- this sux. We should have Score_column create the appropriate PCol.
- Unfortunately, PCols don't know about their position.
+/** Create columns at time #w#. This sux. We should have
+ Score_column create the appropriate PCol. Unfortunately, PCols
+ don't know about their position.
- @return cursor pointing to the nonmusical (first) column
- */
+ @return cursor pointing to the nonmusical (first) column */
PCursor<Score_column*>
-Score::create_cols(Moment w)
+Score::create_cols(Moment w, PCursor<Score_column*> &i)
{
Score_column* c1 = new Score_column(w);
Score_column* c2 = new Score_column(w);
c1->musical_b_ = false;
c2->musical_b_ = true;
-
- iter_top(cols_,i);
+ if (i.ok()) {
+ i --;
+ }
+ if ( !i.ok() ) {
+ i = cols_.top();
+ }
for (; i.ok(); i++) {
- assert(i->when() != w);
if (i->when() > w)
break;
}
if (i->when() > w)
break;
}
- i = create_cols(w);
+ i = create_cols(w,i);
if (mus)
i++;
return i;
void
Score::paper_output()
{
- OK();
if (paper_p_->outfile=="")
paper_p_->outfile = default_out_fn + ".out";
if (i.direction_i_|| i.initialiser_b_)
dir_i_ = i.direction_i_;
}
+IMPLEMENT_STATIC_NAME(Script_register);
out->translate(Offset(0,dy * pos));
return out;
}
+IMPLEMENT_STATIC_NAME(Script);
warning("unterminated slur", requests_arr_[i]->defined_ch_C_);
}
}
+IMPLEMENT_STATIC_NAME(Slur_register);
return output;
}
+IMPLEMENT_STATIC_NAME(Slur);
+IMPLEMENT_STATIC_NAME(Spanner);
+
void
Spanner::do_print()const
{
dependencies.push(p);
p->dependants.push(p);
}
+IMPLEMENT_STATIC_NAME(Staff_elem);
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-
-
-
#include "proto.hh"
#include "plist.hh"
#include "staff.hh"
#include "command-request.hh" // todo
#include "midi-stream.hh"
#include "pqueue.hh"
+
+
void
Staff::add(PointerList<Voice*> const &l)
{
Staff::setup_staffcols()
{
PQueue<Subtle_req *, Moment> subtle_req_pq;
+ PCursor<Staff_column*> last(cols_);
for (iter_top(voice_list_,i); i.ok(); i++) {
- PCursor<Staff_column*> last(cols_);
Moment now = i->start;
iter_top(i->elts,j);
while( j.ok()) {
}
if(next == now) {
s_l->add(j, subtle_req_pq);
- now += j->duration;
+ now += j->duration_;
j++;
}
}
}
- PCursor<Staff_column*> last(cols_);
-
+ last = cols_.top();
while (subtle_req_pq.size()) {
Moment front =subtle_req_pq.front_idx();
Staff_column *s_l = get_col(front, &last);
s_l->setup_one_request(subtle_req_pq.get()); // ugh!
}
- OK();
}
void
no_lines_i_ = l;
}
+IMPLEMENT_STATIC_NAME(Staff_symbol);
+
void
Staff_symbol::do_print()const
{
{
default_dir_i_ = i.direction_i_;
}
+
+IMPLEMENT_STATIC_NAME(Stem_beam_register);
stem_xoffset=0;
}
+IMPLEMENT_STATIC_NAME(Stem);
+
void
Stem::do_print() const
{
return mol_p;
}
+
+IMPLEMENT_STATIC_NAME(Text_item);
{
text_req_l_ = 0;
}
+IMPLEMENT_STATIC_NAME(Text_register);
support = 0;
}
+IMPLEMENT_STATIC_NAME(Text_spanner);
+
void
Text_spanner::do_print() const
{
Voice_element::print() const
{
#ifndef NPRINT
- mtor << "voice_element { dur :"<< duration <<"\n";
+ mtor << "voice_element { dur :"<< duration_ <<"\n";
for (iter_top(reqs,rc); rc.ok(); rc++) {
rc->print();
}
Voice_element::add(Request*r)
{
if (r->duration()) {
- assert (!duration || duration == r->duration());
- duration = r->duration();
+ assert (!duration_ || duration_ == r->duration());
+ duration_ = r->duration();
}
r->elt_l_ = this;
Voice_element::Voice_element()
{
voice_l_ = 0;
- duration = 0;
+ duration_ = 0;
defined_ch_C_ = 0;
}
}
bool
-Voice_element::find_plet_start_bo(char c, Moment& moment_r)
+Voice_element::find_plet_start_b(char c, Moment& moment_r)
{
assert( c == ']' );
- moment_r += duration;
+ moment_r += duration_;
for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
if (i->beam() && i->beam()->spantype == Span_req::START )
return true;
Voice_element::set_plet_backwards(Moment& now_moment_r,
Moment until_moment, int num_i, int den_i)
{
- now_moment_r += duration;
+ now_moment_r += duration_;
if ( now_moment_r > until_moment )
return;
for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-
+#include "voice.hh"
#include "proto.hh"
#include "plist.hh"
#include "musical-request.hh"
if (id=="") // UGH
id = __FUNCTION__ + String(temp_id_count++);
group_id_str_ = id;
+ termination_mom_ = 0;
}
bool
for (int i=0; i <voice_regs_l_.size(); i++) {
if (r_l == voice_regs_l_[i])
voice_regs_l_.del(i);
+ mtor << "Terminating voice_reg " ;
Register_group_register::terminate_register(r_l);
return;
}
}
assert(false);
}
+IMPLEMENT_STATIC_NAME(Voice_group_registers);
+
void
Voice_group_registers::do_print() const
{
#ifndef NPRINT
mtor << "ID: " << group_id_str_<<"\n";
+ mtor << "stopping at " << termination_mom_ << "\n";
Register_group_register::do_print();
#endif
}
Voice_group_registers::add(Request_register*r_l)
{
Register_group_register::add(r_l);
- if (r_l->name() == Voice_registers::static_name())
- voice_regs_l_.push( (Voice_registers*)r_l );
+ if (r_l->name() == Voice_registers::static_name()) {
+ Voice_registers * vregs_l = (Voice_registers*)r_l;
+ voice_regs_l_.push( vregs_l );
+ Voice *v_l = vregs_l->voice_l_;
+ termination_mom_ = termination_mom_ >? v_l -> last();
+ mtor << "adding Voice_registers, now terminating at " <<
+ termination_mom_<< "\n";
+ }
+}
+
+void
+Voice_group_registers::post_move_processing()
+{
+ if ( get_staff_info().time_C_ ->when_ > termination_mom_ ){
+ mtor << "Terminating voice_group\n";
+ daddy_reg_l_->terminate_register(this);
+ }
+ Register_group_register::post_move_processing();
}
bool
Voice_registers::acceptable_request_b(Request*r)
{
-// return (r->rest() || r->note() || r->slur() || r->groupchange());
- return r->groupchange()
+ Command_req * c_l = r->command();
+ return r->groupchange() || (c_l&&c_l->terminate())
|| Register_group_register::acceptable_request_b(r);
}
+IMPLEMENT_STATIC_NAME(Voice_registers);
+
void
Voice_registers::do_print() const
{
+#ifndef NPRINT
mtor << "Voice= " << voice_l_<<'\n';
Register_group_register::do_print();
+#endif
}
}
bool
-Voice::find_plet_start_bo(char c, Moment& moment_r)
+Voice::find_plet_start_b(char c, Moment& moment_r)
{
for (iter_bot(elts, i); i.ok(); i--)
- if ( i->find_plet_start_bo(c, moment_r) )
+ if ( i->find_plet_start_b(c, moment_r) )
return true;
return false;
}
l = start;
for (iter_top(elts,i); i.ok(); i++)
- l += i->duration;
+ l += i->duration_;
return l;
}
# @configure_input@
INSTALL = @INSTALL@
-USER_CXXFLAGS = @CXXFLAGS@
+USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
+
#CXX = @CXX@
prefix = @prefix@
bindir = @bindir@
includedir = @includedir@
datadir = @datadir@
-
+EXTRA_LIBES = @EXTRA_LIBES@
RANLIB = @RANLIB@
DEFS = @DEFS@
#SET_MAKE = @SET_MAKE@
# list of distribution files:
#
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in
#
# generic variables:
$(depth)/%.text: $(outdir)/%.text
cp $< $@
+$(outdir)/%.5: %.pod
+ $(pod2groff)
$(outdir)/%.1: %.pod
- pod2man --center="LilyPond documentation" --section="0"\
- --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
+ $(pod2groff)
+
+
+
#
# outdirs:
endif
distclean: clean
- rm -rf $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
+ rm -rf Makefile $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen)
# configure:
--- /dev/null
+# -*-Makefile-*-
+#
+# @configure_input@
+#
+# project LilyPond -- the musical typesetter
+# title top level makefile for LilyPond
+# file Makefile
+#
+# Copyright (c) 1997 by
+# Jan Nieuwenhuizen <jan@digicash.com>
+# Han-Wen Nienhuys <hanwen@stack.nl>
+# ...your sort order here, or how to comment-out a comment
+
+# subdir level:
+#
+depth = .
+#
+
+# identify module:
+#
+NAME = lilypond
+include .version
+include ./$(depth)/make/Version.make
+
+# generic variables:
+#
+include ./$(depth)/make/Variables.make
+#
+
+# descent order into subdirectories:
+#
+SUBDIRS = flower lib lily mi2mu \
+ Documentation bin init input tex make
+#
+
+# list of distribution files:
+#
+SCRIPTS = configure configure.in install-sh
+README_FILES = ANNOUNCE COPYING NEWS README TODO INSTALL.text
+EXTRA_DISTFILES= .dstreamrc .version $(README_FILES) $(SCRIPTS) $(SYMLINKS)
+
+# do not dist ./Makefile (is copied from make/Toplevel.make)
+DISTFILES:=$(EXTRA_DISTFILES)# Makefile $(ALL_SOURCES)
+#
+
+
+# generic targets and rules:
+#
+include ./$(depth)/make/Targets.make
+include ./$(depth)/make/Rules.make
+#
+
+localdist: configure
+
+INSTALL.text: check-doc-deps
+ rm -f INSTALL.text
+ ln `find -name INSTALL.text|head -1` .
+
+localclean:
+ rm -f $(allexe) core config.cache config.log config.status
+ rm -f $(outdir)/*.{class,html,gif}
+
+localinstall: all
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) -m 755 $(allexe) $(bindir)
+
+localuninstall:
+ for i in $(allexe); do rm -f $(bindir)/`basename $$i`; done
STRIPDEBUG=true #replace to do stripping of certain objects
DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
-DOCDIR=$(depth)/doc++
+DOCDIR=$(depth)/$(outdir)
progdocs=$(allhh) $(allcc)
+pod2groff=pod2man --center="LilyPond documentation" --section="0"\
+ --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 12
+PATCH_LEVEL = 13
# use to send patches, always empty for released version:
-MY_PATCH_LEVEL = .1# include separator: "-1" or ".a"
+MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
virtual String mudela_str( bool command_mode_bo );
private:
- bool const simple_plet_bo_ = false;
+ static bool const simple_plet_b_s = false;
Duration dur_;
String name_str_;
};
#define monitor_p_g &cout
enum Verbose { QUIET_ver, BRIEF_ver, NORMAL_ver, VERBOSE_ver, DEBUG_ver };
extern Verbose level_ver;
-#ifdef NPRINT
-#define dtor if ( 0 ) *monitor_p_g
-#define mtor if ( 0 ) *monitor_p_g
-#define vtor if ( level_ver >= VERBOSE_ver ) *monitor_p_g
-#define btor if ( level_ver >= BRIEF_ver ) *monitor_p_g
-#define qtor if ( level_ver >= QUIET_ver ) *monitor_p_g
+#if 0 // NPRINT
+ // not what i want, all output goes through tors.
+ // set verbosity level.
+ #define tor( threshold ) if ( 0 ) *monitor_p_g
#else
-#define dtor if ( level_ver >= DEBUG_ver ) *monitor_p_g
-#define vtor if ( level_ver >= VERBOSE_ver ) *monitor_p_g
-#define mtor if ( level_ver >= NORMAL_ver ) *monitor_p_g
-#define btor if ( level_ver >= BRIEF_ver ) *monitor_p_g
-#define qtor if ( level_ver >= QUIET_ver ) *monitor_p_g
+ #define tor( threshold ) if ( level_ver >= threshold ) *monitor_p_g
#endif
extern Sources* source_l_g;
char const* here_ch_C();
static int varint2_i( String str );
int yylex();
- Source_file * source_file_p_ ;
+ Source_file * source_file_l_ ;
private:
int char_count_;
public: // ugh
}
void
-help()
+usage()
{
- mtor <<
- "--be-blonde, -b use exact, blonde durations, e.g.: a[385]\n"
- "--debug, -d be really verbose\n"
- "--help, -h this help\n"
- "--include=DIR, -I DIR add DIR to search path\n"
- "--no-silly, -n assume no triplets and no smaller than 16\n"
- "--output=FILE, -o FILE set FILE as default output\n"
- "--quiet, -q be quiet\n"
- "--verbose, -v be verbose\n"
- "--warranty, -w show warranty & copyright\n"
+ tor( NORMAL_ver ) <<
+ "Usage: mi2mu [options] midi-file\n"
+ "Translate midi-file to mudela\n"
+ "\n"
+ "Options:\n"
+ " -b, --no-quantify write exact durations, e.g.: a4*385/384\n"
+ " -d, --debug print lots of debugging stuff\n"
+ " -h, --help this help\n"
+ " -I, --include=DIR add DIR to search path\n"
+ " -n, --no-silly assume no plets or double dots, smallest is 16\n"
+ " -o, --output=FILE set FILE as default output\n"
+ " -p, --no-plets assume no plets\n"
+ " -q, --quiet be quiet\n"
+ " -s, --smallest=N assume no shorter (reciprocal) durations than N\n"
+ " -v, --verbose be verbose\n"
+ " -w, --warranty show warranty and copyright\n"
+ " -x, --no-double-dots assume no double dotted notes\n"
;
}
void
identify()
{
- mtor << mi2mu_version_str() << endl;
+ tor( NORMAL_ver ) << mi2mu_version_str() << endl;
}
void
notice()
{
- mtor <<
+ tor( NORMAL_ver ) <<
"\n"
"Mi2mu, translate midi to mudela.\n"
"Copyright (C) 1997 by\n"
0, "help", 'h',
0, "no-silly", 'n',
1, "output", 'o',
+ 1, "no-plets", 'p',
0, "quiet", 'q',
+ 1, "smallest", 's',
0, "verbose", 'v',
0, "warranty", 'w',
+ 0, "no-double-dots", 'x',
0,0,0
};
Getopt_long getopt_long( argc_i, argv_sz_a, long_option_init_a );
String output_str;
while ( Long_option_init* long_option_init_p = getopt_long() )
switch ( long_option_init_p->shortname ) {
- case 'b':
- Duration_convert::be_blonde_b_s = true;
- break;
- case 'd':
- level_ver = DEBUG_ver;
- break;
- case 'h':
- help();
- exit( 0 );
- break;
- case 'n':
- Duration_convert::no_double_dots_b_s = false;
- Duration_convert::no_triplets_b_s = true;
- Duration_convert::no_smaller_than_i_s = 16;
- break;
- case 'o':
- output_str = getopt_long.optarg;
- break;
- case 'q':
- level_ver = QUIET_ver;
- break;
- case 'v':
- level_ver = VERBOSE_ver;
- break;
- case 'w':
- notice();
- exit( 0 );
- break;
- default:
- assert( 0 );
- break;
- }
-
+ case 'b':
+ Duration_convert::no_quantify_b_s = true;
+ break;
+ case 'd':
+ level_ver = DEBUG_ver;
+ break;
+ case 'h':
+ usage();
+ exit( 0 );
+ break;
+// case 'I':
+// path->push( getopt_long.optarg );
+// break;
+ case 'n':
+ Duration_convert::no_double_dots_b_s = true;
+ Duration_convert::no_triplets_b_s = true;
+ Duration_convert::no_smaller_than_i_s = 16;
+ break;
+ case 'o':
+ output_str = getopt_long.optarg;
+ break;
+ case 'p':
+ Duration_convert::no_triplets_b_s = true;
+ break;
+ case 'q':
+ level_ver = QUIET_ver;
+ break;
+ case 's': {
+ int i = String_convert::dec2_i( getopt_long.optarg );
+ if ( !i ) {
+ usage();
+ exit( 2 ); //usage
+ }
+ Duration_convert::no_smaller_than_i_s = i;
+ }
+ break;
+ case 'v':
+ level_ver = VERBOSE_ver;
+ break;
+ case 'w':
+ notice();
+ exit( 0 );
+ break;
+ case 'x':
+ Duration_convert::no_double_dots_b_s = false;
+ break;
+ default:
+ assert( 0 );
+ break;
+ }
+
char* arg_sz = 0;
while ( ( arg_sz = getopt_long.get_next_arg() ) ) {
My_midi_parser midi_parser( arg_sz, & source );
String
Midi_key::mudela_str( bool command_mode_bo )
{
- String str = "key\\";
+ String str = "\\key\\";
if ( !minor_i_ )
str += String( (char)( ( key_i_ + 2 ) % 7 + 'A' ) );
else // heu, -2: should be - 1 1/2: A -> fis
str += String( (char)( ( key_i_ + 2 - 2 ) % 7 + 'a' ) );
- if ( !command_mode_bo )
- str = String( '\\' ) + str;
+// if ( !command_mode_bo )
+// str = String( '\\' ) + str;
str = String( "%" ) + str + "\n"; // "\key\F" not supported yet...
return str;
}
else
notename_str += "es";
accidental_i--;
- String octave_str;
- octave_str += String( '\'', ( pitch_i - Midi_note::c0_pitch_i_c_ ) / 12 );
- octave_str += String( '`', ( Midi_note::c0_pitch_i_c_ + 11 - pitch_i ) / 12 );
- return octave_str + notename_str;
+ String de_octavate_str = String( '\'', ( Midi_note::c0_pitch_i_c_ + 11 - pitch_i ) / 12 );
+ String octavate_str = String( '\'', ( pitch_i - Midi_note::c0_pitch_i_c_ ) / 12 );
+ return de_octavate_str + notename_str + octavate_str;
}
+// statics Midi_note
+bool const Midi_note::simple_plet_b_s = false;
+
Midi_note::Midi_note( String name_str, Duration dur )
{
// do i want pitch too?
Midi_note::mudela_str( bool command_mode_bo )
{
// assert( !command_mode_bo );
-// undefined ref to simple_plet_bo_ ??
-// if ( simple_plet_bo_ )
-// return name_str_ + Duration_convert::dur2_str( dur_ );
+ if ( simple_plet_b_s )
+ return name_str_ + Duration_convert::dur2_str( dur_ );
//ugh
String str;
// assert( command_mode_bo );
if ( !command_mode_bo )
return "";
- String str = "tempo 4:";
+ String str = "\\tempo 4:";
str += String( get_tempo_i( Moment( 1, 4 ) ) );
return str;
}
String
Midi_time::mudela_str( bool command_mode_bo )
{
- String str = "meter { "
- + String( num_i_ ) + "*" + String( 1 << den_i_ )
+ String str = "\\meter{ "
+ + String( num_i_ ) + "/" + String( 1 << den_i_ )
+ " }";
- if ( !command_mode_bo )
- str = String( '\\' ) + str;
+// if ( !command_mode_bo )
+// str = String( '\\' ) + str;
return str;
}
%%
{HEADER}/{INT32} { // using /{INT32}; longer match than {INT32}
- dtor << "lex: header" << endl;
+ tor( DEBUG_ver ) << "lex: header" << endl;
yy_push_state( int16 );
yy_push_state( int16 );
yy_push_state( int16 );
}
{TRACK}/{INT32} { // using /{INT32}; longer match than {INT32}
- dtor << "lex: track" << endl;
+ tor( DEBUG_ver ) << "lex: track" << endl;
yy_push_state( track );
yy_push_state( int32 );
return TRACK;
exit( 1 );
}
<int32>{INT32} { // really signed?
- dtor << "lex: int32" << endl;
+ tor( DEBUG_ver ) << "lex: int32" << endl;
assert( YYLeng() == 4 );
String str( (Byte const*)YYText(), YYLeng() );
yylval.i = String_convert::bin2_i( str );
return INT32;
}
<int16>{INT16} { // really signed?
- dtor << "lex: int16" << endl;
+ tor( DEBUG_ver ) << "lex: int16" << endl;
assert( YYLeng() == 2 );
String str( (Byte const*)YYText(), YYLeng() );
yylval.i = String_convert::bin2_i( str );
return INT16;
}
<i8>{I8} {
- dtor << "lex: i8" << endl;
+ tor( DEBUG_ver ) << "lex: i8" << endl;
assert( YYLeng() == 1 );
// yylval.byte = *(signed char*)YYText();
yylval.i = *(signed char*)YYText();
return I8;
}
<u8>{U8} {
- dtor << "lex: u8" << endl;
+ tor( DEBUG_ver ) << "lex: u8" << endl;
assert( YYLeng() == 1 );
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
<track>{VARINT} {
String str( (Byte const*)YYText(), YYLeng() );
yylval.i = My_midi_lexer::varint2_i( str );
- dtor << String( "lex: track: varint(" )
+ tor( DEBUG_ver ) << String( "lex: track: varint(" )
+ String( yylval.i ) + "): "
+ String_convert::bin2hex_str( str ) << endl;
yy_push_state( event );
<event>{RUNNING_STATUS} {
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
- dtor << String ( "lex: running status: " ) + String( yylval.i ) << endl;
+ tor( DEBUG_ver ) << String ( "lex: running status: " ) + String( yylval.i ) << endl;
yy_pop_state();
// yy_push_state( u8 );
yy_push_state( u8 );
<event>{DATA_ENTRY} {
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
- dtor << String ( "lex: undefined data entry: " ) + String( yylval.i ) << endl;
+ tor( DEBUG_ver ) << String ( "lex: undefined data entry: " ) + String( yylval.i ) << endl;
yy_pop_state();
yy_push_state( u8 );
return DATA_ENTRY;
}
<event>{ALL_NOTES_OFF} {
- dtor << "lex: all note off" << endl;
+ tor( DEBUG_ver ) << "lex: all note off" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
- dtor << String ( "lex: all notes off: " ) + String( yylval.i ) << endl;
+ tor( DEBUG_ver ) << String ( "lex: all notes off: " ) + String( yylval.i ) << endl;
yy_pop_state();
yy_push_state( u8 );
yy_push_state( u8 );
return ALL_NOTES_OFF;
}
<event>{NOTE_OFF} {
- dtor << "lex: note off" << endl;
+ tor( DEBUG_ver ) << "lex: note off" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return NOTE_OFF;
}
<event>{NOTE_ON} {
- dtor << "lex: note on" << endl;
+ tor( DEBUG_ver ) << "lex: note on" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return NOTE_ON;
}
<event>{POLYPHONIC_AFTERTOUCH} {
- dtor << "lex: polyphonic aftertouch" << endl;
+ tor( DEBUG_ver ) << "lex: polyphonic aftertouch" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return POLYPHONIC_AFTERTOUCH;
}
<event>{CONTROLMODE_CHANGE} {
- dtor << "lex: controlmode change" << endl;
+ tor( DEBUG_ver ) << "lex: controlmode change" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return CONTROLMODE_CHANGE;
}
<event>{PROGRAM_CHANGE} {
- dtor << "lex: program change" << endl;
+ tor( DEBUG_ver ) << "lex: program change" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return PROGRAM_CHANGE;
}
<event>{CHANNEL_AFTERTOUCH} {
- dtor << "lex: channel aftertouch" << endl;
+ tor( DEBUG_ver ) << "lex: channel aftertouch" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return CHANNEL_AFTERTOUCH;
}
<event>{PITCHWHEEL_RANGE} {
- dtor << "lex: pitchwheel range" << endl;
+ tor( DEBUG_ver ) << "lex: pitchwheel range" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return PITCHWHEEL_RANGE;
}
<event>{SYSEX_EVENT1} { // len data
- dtor << "lex: sysex1" << endl;
+ tor( DEBUG_ver ) << "lex: sysex1" << endl;
yy_pop_state();
yy_push_state( data );
return SYSEX_EVENT1;
}
<event>{SYSEX_EVENT2} { // len data
- dtor << "lex: sysex2" << endl;
+ tor( DEBUG_ver ) << "lex: sysex2" << endl;
yy_pop_state();
// yy_push_state( u8 ); //?
yy_push_state( data );
return SYSEX_EVENT2;
}
<event>{META_EVENT} {
- dtor << "lex: meta" << endl;
+ tor( DEBUG_ver ) << "lex: meta" << endl;
yy_push_state( meta_event );
return META_EVENT;
}
exit( 1 );
}
<meta_event>{SEQUENCE} { // ssss sequence number
- dtor << "lex: sequence" << endl;
+ tor( DEBUG_ver ) << "lex: sequence" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( int16 );
return SEQUENCE;
}
<meta_event>{YYTEXT} { // len data
- dtor << "lex: text" << endl;
+ tor( DEBUG_ver ) << "lex: text" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYTEXT;
}
<meta_event>{YYCOPYRIGHT} {
- dtor << "lex: copyright" << endl;
+ tor( DEBUG_ver ) << "lex: copyright" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYCOPYRIGHT;
}
<meta_event>{YYTRACK_NAME} {
- dtor << "lex: track name" << endl;
+ tor( DEBUG_ver ) << "lex: track name" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYTRACK_NAME;
}
<meta_event>{YYINSTRUMENT_NAME} {
- dtor << "lex: instrument name" << endl;
+ tor( DEBUG_ver ) << "lex: instrument name" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYINSTRUMENT_NAME;
}
<meta_event>{YYLYRIC} {
- dtor << "lex: lyric" << endl;
+ tor( DEBUG_ver ) << "lex: lyric" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYLYRIC;
}
<meta_event>{YYMARKER} {
- dtor << "lex: marker" << endl;
+ tor( DEBUG_ver ) << "lex: marker" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYMARKER;
}
<meta_event>{YYCUE_POINT} {
- dtor << "lex: cue point" << endl;
+ tor( DEBUG_ver ) << "lex: cue point" << endl;
// yylval.byte = *(Byte*)YYText();
yylval.i = *(Byte*)YYText();
yy_pop_state();
return YYCUE_POINT;
}
<meta_event>{TEMPO} { // tttttt usec
- dtor << "lex: tempo" << endl;
+ tor( DEBUG_ver ) << "lex: tempo" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( u8 );
return TEMPO;
}
<meta_event>{SMPTE_OFFSET} { // hr mn se fr ff
- dtor << "lex: smpte offset" << endl;
+ tor( DEBUG_ver ) << "lex: smpte offset" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( u8 );
return SMPTE_OFFSET;
}
<meta_event>{TIME} { // nn dd cc bb
- dtor << "lex: time" << endl;
+ tor( DEBUG_ver ) << "lex: time" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( u8 );
return TIME;
}
<meta_event>{KEY} { // sf mi
- dtor << "lex: key" << endl;
+ tor( DEBUG_ver ) << "lex: key" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( i8 );
return KEY;
}
<meta_event>{SSME} { // len data
- dtor << "lex: smme" << endl;
+ tor( DEBUG_ver ) << "lex: smme" << endl;
yy_pop_state();
yy_pop_state();
yy_push_state( data );
return SSME;
}
<meta_event>{END_OF_TRACK} {
- dtor << "lex: end of track" << endl;
+ tor( DEBUG_ver ) << "lex: end of track" << endl;
yy_pop_state();
yy_pop_state();
yy_pop_state();
}
<data>{VARINT} {
- dtor << "lex: data" << endl;
+ tor( DEBUG_ver ) << "lex: data" << endl;
String str( (Byte const*)YYText(), YYLeng() );
int i = My_midi_lexer::varint2_i( str );
String* str_p = new String;
}
<<EOF>> {
-// mtor << "<<EOF>>";
+// tor( NORMAL_ver ) << "<<EOF>>";
if ( !close_i() )
yyterminate(); // can't move this, since it actually rets a YY_NULL
track:
TRACK INT32 {
- mtor << "\ntrack " << midi_parser_l_g->track_i_ << ": " << flush;
+ tor( NORMAL_ver ) << "\ntrack " << midi_parser_l_g->track_i_ << ": " << flush;
$$ = new Midi_track( midi_parser_l_g->track_i_++,
// silly, cause not set yet!
midi_parser_l_g->copyright_str_,
if ( $2 ) {
String str = $2->mudela_str( false );
if ( str.length_i() )
- dtor << str << " " << flush;
+ tor( DEBUG_ver ) << str << " " << flush;
}
}
;
midi_parser_l_g->forward( $1 );
if ( $1 ) {
int bars_i = (int)( midi_parser_l_g->mom() / midi_parser_l_g->midi_time_p_->bar_mom() );
- if ( bars_i > midi_parser_l_g->bar_i_ )
- mtor << '[' << midi_parser_l_g->bar_i_++
- << ']' << flush;
+ if ( bars_i > midi_parser_l_g->bar_i_ ) {
+ tor( NORMAL_ver ) << '[' << midi_parser_l_g->bar_i_ << ']' << flush;
+ midi_parser_l_g->bar_i_ = bars_i;
+ }
}
}
;
$$ = new Midi_text( type, *$2 );
break;
}
- dtor << *$2 << endl;
+ tor( DEBUG_ver ) << *$2 << endl;
delete $2;
}
| END_OF_TRACK {
}
| TEMPO U8 U8 U8 {
$$ = new Midi_tempo( ( $2 << 16 ) + ( $3 << 8 ) + $4 );
- dtor << $$->mudela_str( false ) << endl;
+ tor( DEBUG_ver ) << $$->mudela_str( false ) << endl;
midi_parser_l_g->set_tempo( ( $2 << 16 ) + ( $3 << 8 ) + $4 );
}
| SMPTE_OFFSET U8 U8 U8 U8 U8 {
}
| TIME U8 U8 U8 U8 {
$$ = new Midi_time( $2, $3, $4, $5 );
- dtor << $$->mudela_str( true ) << endl;
+ tor( DEBUG_ver ) << $$->mudela_str( true ) << endl;
midi_parser_l_g->set_time( $2, $3, $4, $5 );
}
| KEY I8 I8 {
text_event:
YYTEXT {
- dtor << "\n% Text: ";
+ tor( DEBUG_ver ) << "\n% Text: ";
}
| YYCOPYRIGHT {
- dtor << "\n% Copyright: ";
+ tor( DEBUG_ver ) << "\n% Copyright: ";
}
| YYTRACK_NAME {
- dtor << "\n% Track name: ";
+ tor( DEBUG_ver ) << "\n% Track name: ";
}
| YYINSTRUMENT_NAME {
- dtor << "\n% Instrument name: ";
+ tor( DEBUG_ver ) << "\n% Instrument name: ";
}
| YYLYRIC {
- dtor << "\n% Lyric: ";
+ tor( DEBUG_ver ) << "\n% Lyric: ";
}
| YYMARKER {
- dtor << "\n% Marker: ";
+ tor( DEBUG_ver ) << "\n% Marker: ";
}
| YYCUE_POINT {
- dtor << "\n% Cue point: ";
+ tor( DEBUG_ver ) << "\n% Cue point: ";
}
;
int
Midi_score::output_mudela( String filename_str )
{
- mtor << "Lily output to " << filename_str << " ..." << endl;
+ tor( NORMAL_ver ) << "Lily output to " << filename_str << " ..." << endl;
int track_i = 0;
Lily_stream lily_stream( filename_str );
for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
- mtor << "track " << track_i++ << ": " << flush;
+ tor( NORMAL_ver ) << "track " << track_i++ << ": " << flush;
i->output_mudela( lily_stream );
lily_stream.newline();
- mtor << endl;
- }
-
- lily_stream << "score {";
- lily_stream.newline();
-
- for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
- lily_stream << "\tstaff { melodic music { ";
- lily_stream << i->name_str();
- lily_stream << " } }";
- lily_stream.newline();
+ tor( NORMAL_ver ) << endl;
}
+ lily_stream << "\\score{";
lily_stream.indent();
- lily_stream << "commands {";
- lily_stream.indent();
- // not use silly 0 track
- midi_track_p_list_.bottom()->midi_time_p_->output_mudela( lily_stream, true );
+ for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
+ lily_stream << "\\staff{ ";
+ lily_stream << i->name_str();
+ lily_stream << " }";
+ lily_stream.newline();
+ }
+ lily_stream.newline();
+ lily_stream << "\\paper{";
+ lily_stream.indent();
+ lily_stream << "\\unitspace 20\\mm";
lily_stream.tnedni();
lily_stream << "}";
- lily_stream.newline();
- lily_stream << "midi {";
+ lily_stream << "\\midi{";
lily_stream.indent();
// not use silly 0 track
midi_track_p_list_.bottom()->midi_tempo_p_->output_mudela( lily_stream, true );
{
int track_i = 0;
for ( PCursor<Midi_track*> i( midi_track_p_list_.top() ); i.ok(); i++ ) {
- mtor << "track " << track_i++ << ": " << flush;
+ tor( NORMAL_ver ) << "track " << track_i++ << ": " << flush;
i->process();
- mtor << endl;
+ tor( NORMAL_ver ) << endl;
}
}
{
for ( PCursor<Midi_voice*> i( midi_voice_p_list_.top() ); i.ok(); i++ )
if ( i->begin_mom() == mom ) {
- dtor << "open_voices (" << open_voices_r.size() << "): +1\n";
+ tor( DEBUG_ver ) << "open_voices (" << open_voices_r.size() << "): +1\n";
open_voices_r.bottom().add( *i );
}
}
for ( PCursor<Track_column*> i( tcol_p_list_.top() ); i.ok(); i++ ) {
int bars_i = (int)( i->mom() / bar_mom );
if ( bars_i > bar_i )
- mtor << '[' << bar_i << flush;
+ tor( NORMAL_ver ) << '[' << bar_i << flush;
while ( i->midi_event_p_list_.size() )
- // shit, where has the T* PCursor::remove() gone??
- // i don-t want to get and delete,
- // i want to (re)move!
- // is it renamed: get vs add/insert ?? (put/remove :-)
get_free_midi_voice_l( i->mom() )->add_event( i->midi_event_p_list_.top().remove_p() );
if ( bars_i > bar_i ) {
- bar_i++;
- mtor << ']' << flush;
+ bar_i = bars_i;
+ tor( NORMAL_ver ) << ']' << flush;
}
}
- dtor << "ends: " << endl;
+ tor( DEBUG_ver ) << "ends: " << endl;
int n = 0;
for ( PCursor<Midi_voice*> i( midi_voice_p_list_.top() ); i.ok(); i++ )
- vtor << "voice " << n++ << ": " << i->end_mom() << endl;
- dtor << ":sdne" << endl;
+ tor( VERBOSE_ver ) << "voice " << n++ << ": " << i->end_mom() << endl;
+ tor( DEBUG_ver ) << ":sdne" << endl;
}
void
Midi_track::output_mudela( Lily_stream& lily_stream_r )
{
- lily_stream_r << name_str_ << " = music { $";
+ lily_stream_r << name_str_ << " = \\melodic{";
lily_stream_r.indent();
lily_stream_r << "% midi copyright:" << copyright_str_;
lily_stream_r.newline();
lily_stream_r << "% instrument:" << instrument_str_;
lily_stream_r.newline();
- int bar_i = 1;
+ int bar_i = 0;
Moment bar_mom = midi_time_p_->bar_mom();
PointerList<Midi_voice*> open_voices;
Moment now_mom = 0.0;
Moment then_mom = 0.0;
while ( now_mom < end_mom() ) {
- int bars_i = (int)( now_mom / bar_mom );
+ int bars_i = (int)( now_mom / bar_mom ) + 1;
if ( bars_i > bar_i )
- mtor << '[' << bar_i << flush;
+ tor( NORMAL_ver ) << '[' << flush;
+
+ if ( bars_i > bar_i ) {
+ Moment into_bar_mom = now_mom - ( bars_i - 1 ) * bar_mom;
+ if ( bars_i > 1 ) {
+ if ( !into_bar_mom )
+ lily_stream_r << "|";
+ lily_stream_r.newline();
+ }
+ lily_stream_r << "% " << String_convert::i2dec_str( bars_i, 0, ' ' );
+ if ( into_bar_mom )
+ lily_stream_r << ":" << Duration_convert::dur2_str( Duration_convert::mom2_dur( into_bar_mom ) );
+ lily_stream_r.newline();
+ }
+
add_begin_at( open_voices, now_mom );
Moment begin_mom = next_begin_mom( now_mom );
+
+ if ( bars_i > bar_i )
+ tor( NORMAL_ver ) << bars_i << flush;
+
Moment end_mom = next_end_mom( now_mom );
if ( ( begin_mom > now_mom ) && ( begin_mom < end_mom ) )
then_mom = begin_mom;
else
then_mom = end_mom;
- dtor << "begin: " << begin_mom << " end: " << end_mom << endl;
- dtor << "slice: " << now_mom << ", " << then_mom << endl;
+ tor( DEBUG_ver ) << "begin: " << begin_mom << " end: " << end_mom << endl;
+ tor( DEBUG_ver ) << "slice: " << now_mom << ", " << then_mom << endl;
if ( open_voices.size() > 1 )
- lily_stream_r << "{ ";
+ lily_stream_r << "< ";
for ( PCursor<Midi_voice*> i( open_voices.top() ); i.ok(); i++ )
lily_stream_r << i->mudela_str( now_mom, then_mom, open_voices.size() - 1 );
if ( open_voices.size() > 1 )
- lily_stream_r << "} ";
+ lily_stream_r << "> ";
now_mom = then_mom;
remove_end_at( open_voices, now_mom );
if ( bars_i > bar_i ) {
- bar_i++;
- mtor << ']' << flush;
+ bar_i = bars_i;
+ tor( NORMAL_ver ) << ']' << flush;
}
}
+ bar_i++;
+ tor( NORMAL_ver ) << '[' << bar_i << ']' << flush;
+
lily_stream_r.tnedni();
- lily_stream_r << "$} % " << name_str_;
+ lily_stream_r << "} % " << name_str_;
lily_stream_r.newline();
}
for ( PCursor<Midi_voice*> i( open_voices_r.top() ); i.ok(); i++ )
// if ( i->end_mom() == mom ) {
if ( i->end_mom() <= mom ) {
- dtor << "open_voices (" << open_voices_r.size() << "): -1\n";
- i.remove_p(); // remove? // no delete; only a copy
+ tor( DEBUG_ver ) << "open_voices (" << open_voices_r.size() << "): -1\n";
+ i.remove_p();
if ( !i.ok() )
break;
}
Midi_voice::end_mom()
{
Moment now_mom = begin_mom_;
- dtor << now_mom << ", ";
+ tor( DEBUG_ver ) << now_mom << ", ";
for ( PCursor<Midi_event*> i( midi_event_p_list_.top() ); i.ok(); i++ ) {
- dtor << now_mom << ", ";
+ tor( DEBUG_ver ) << now_mom << ", ";
now_mom += i->mom();
}
- dtor << endl;
+ tor( DEBUG_ver ) << endl;
return now_mom;
}
}
if ( str.length_i() && multiple_bo )
- str = "\\music{ " + str + "} ";
+ str = "{ " + str + "} ";
return str;
}
My_midi_lexer::My_midi_lexer( String &filename_str, Sources * sources )
{
- source_file_p_ =sources->get_file_l(filename_str);
- switch_streams( source_file_p_->istream_l() );
+ source_file_l_ =sources->get_file_l(filename_str);
+ switch_streams( source_file_l_->istream_l() );
errorlevel_i_ = 0;
char_count_ = 0;
}
My_midi_lexer::~My_midi_lexer()
{
- delete source_file_p_;
+// delete source_file_p_;
}
void
My_midi_lexer::error( char const* sz_l )
{
- if ( !source_file_p_ ) {
+ if ( !source_file_l_ ) {
cerr << "error at EOF" << sz_l << '\n';
} else {
char const* ch_C = here_ch_C();
char const*
My_midi_lexer::here_ch_C()
{
- return source_file_p_->ch_C() + char_count_ ;
+ return source_file_l_->ch_C() + char_count_ ;
}
int
// assert( start_i64 != -1 ); // did we start?
Duration dur( 0 );
- if ( Duration_convert::be_blonde_b_s )
+ if ( Duration_convert::no_quantify_b_s )
dur = Duration_convert::ticks2_dur( (I64)now_i64_ - start_i64 );
else
dur = Duration_convert::ticks2standardised_dur( (I64)now_i64_ - start_i64 );
My_midi_parser::output_mudela( String filename_str )
{
assert( midi_score_p_ );
- mtor << "\nProcessing..." << endl;
+ tor( NORMAL_ver ) << "\nProcessing..." << endl;
midi_score_p_->process();
return midi_score_p_->output_mudela( filename_str );
}
int
My_midi_parser::parse()
{
- mtor << "\nParsing..." << flush;
+ tor( NORMAL_ver ) << "\nParsing..." << flush;
return ::yyparse();
}