=head1 NAME
-Lilypond - a music typesetter
+LilyPond - a music typesetter
=head1 SYNOPSIS
=item *
beams, slurs, chords, super/subscripts (accents and text),
-triplets, general n-plet (triplet,
-quadruplets, etc.), lyrics
+triplets, general n-plet (triplet, quadruplets, etc.), lyrics
+
+=item *
+multiple voices within one staff; beams optionally shared
+between voices.
=item *
multiple scores within one input file. Each score is output to
Show a summary of usage
+=item B<--init, -i>
+
+set init file (default: symbol.ini)
+
+=item B<--include, -I>
+add to file search path.
+
=back
=head1
Do:
tar zxf flower-1.11.9.tar.gz
- mv flower-1.11.9 flower
- cd flower; make; cd ..
tar zxf lilypond-1.2.13.tar.gz
cd lilypond-1.2.13
configure
Han-Wen Nienhuys <hanwen@stack.nl>, Main author
=item *
-Jan Nieuwenhuizen <jan@digicash.com>, Lyrics, bits of
-FlowerLib, general comments.
+Jan Nieuwenhuizen <jan@digicash.com>, Context errors, Lyrics,
+bits of FlowerLib, general comments.
=item *
Mats Bengtsson <matsb@s3.kth.se>, bugfixes, testing, general comments.
This is what the output looks like over here:
- hw:~/musix/spacer$ lilypond input/maartje
- LilyPond 0.0.23/FlowerLib 1.0.20. Compile: Jan 20 1997, 00:51:06 (g++ 2.7.2)
+ hw:~/musix/spacer$ lilypond input/maartje.ly
+ LilyPond 0.0.27/FlowerLib 1.0.23. Compile: Feb 5 1997, 00:28:13 (g++ 2.7.2)
Parsing ... [./init//symbol.ini[./init/dutch.ini][./init/script.ini][./init/table_sixteen.ini]][./input/maartje.ly]
- Processing music ... warning: process_requests(): beamed note should have a stem (t = 5/8)
- Preprocessing ... Calculating ... Postprocessing ...
+ Processing music ... Preprocessing ... Calculating ... Postprocessing ...
output to lelie.out...
hw:~/musix/spacer$ tex test
After long and hard thinking, I came up with an algorithm for the
horizontal spacing of multiple staffs (april 1996) I coded it (and did
not test it). After starting with this fundamental piece, I slowly
-added the stages which come before spacing, and after a few months, I
-had a first working version, (october 1996). I announced Patchlevel 0.0.7
-(or 8) to the mutex list after asking some technical details on
-spacing; it was downloaded approximately 4 times. Then I got the hang
-of it, and in the subsequent two months, I coded until it had
-doubled in size (pl 23).
+added the stages which come before spacing, and after. A half year
+later later, I had a first working version, (october 1996). I
+announced Patchlevel 0.0.7 (or 8) to the mutex list after asking some
+technical details on spacing; it was downloaded approximately 4 times.
+Then I got the hang of it, and in the subsequent two months, I coded
+until it had doubled in size (pl 23).
and in lyricmode, eg,
- Twink- le, twink- le litt- le star,2
+ Twin- kle, twin- kle lit- tle star,2
a lot of characters parse differently
than in "command" mode, eg,
$(exe): $(obs)
+ strip --strip-debug $(STABLEOBS)
$(CXX) -o $@ $^ $(LOADLIBES)
+
+.PHONY: clean
+
clean:
- rm -f $(exe) $(DOCDIR)/* core $(obs)
+ rm -f $(exe) $(DOCDIR)/* core $(obs) $(ALLDEPS)
for SUBDIR in $(SUBDIRS); \
do \
$(MAKE) SUBDIR=$$SUBDIR -C $$SUBDIR clean;\
+pl 27
+ - preliminary WIN32 support (JN)
+Features
+ - errors converted to warnings (JN)
+ - context errors (JN)
+ - As vs. as notename.
+ - WARNING: "melodic" stafftype will create the new Complex_staff!
+Examples
+ - Lohman's Viola Quartet (JN)
+ - JS Bach Solo Cello suite II menuet (JN)
+
+
+pl pre27
+
+Features
+ - option --init
+ - last_duration_mode: default_duration is last duration entered
+ (\duration{\last})
+ - syntax: grouping 2*4 3*8
+ - preliminary multivoice support
+Examples
+ - JS Bach's WTK example added.
+
+Internal:
+ - Text_reg and Script_reg
+
pl 26
- Documentation/lelie_logo.png
- 8-bit chars for input (see ltest.tex) (MB)
# -*- Makefile-*-
# sourcefiles to be shipped. Also for dependencies
-hdr= accidental.hh bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
+hdr= bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
command.hh complexwalker.hh complexstaff.hh\
const.hh debug.hh dimen.hh directionalspanner.hh\
- getcommand.hh glob.hh globvars.hh grouping.hh idealspacing.hh\
+ getcommand.hh glob.hh grouping.hh idealspacing.hh\
identifier.hh identparent.hh inputcommand.hh inputcommands.hh\
inputmusic.hh inputscore.hh inputstaff.hh item.hh key.hh keyitem.hh\
keyword.hh leastsquares.hh lexer.hh linespace.hh linepstaff.hh\
qlpsolve.hh register.hh request.hh rest.hh rhythmstaff.hh\
sccol.hh score.hh\
scoreline.hh script.hh scriptdef.hh simplestaff.hh simplewalker.hh\
- slur.hh spanner.hh staff.hh staffcommands.hh staffelem.hh staffline.hh\
+ slur.hh source.hh sourcefile.hh spanner.hh staff.hh staffcommands.hh\
+ staffelem.hh staffline.hh\
stcol.hh stem.hh staffwalker.hh symbol.hh symtable.hh\
tex.hh textdef.hh\
- textitem.hh textspanner.hh timedescription.hh tstream.hh voice.hh
+ textitem.hh textspanner.hh timedescription.hh tstream.hh voice.hh\
+ voicegroup.hh
mycc=bar.cc beam.cc boxes.cc break.cc calcideal.cc clef.cc\
clefitem.cc command.cc complexstaff.cc complexwalker.cc \
- complexmelodicstaff.cc complexprint.cc debug.cc dimen.cc\
+ complexprint.cc debug.cc dimen.cc\
directionalspanner.cc\
getcommands.cc grouping.cc groupregs.cc idealspacing.cc identifier.cc\
inputcommand.cc inputcommands.cc inputmusic.cc inputscore.cc\
paper.cc pcol.cc pscore.cc pstaff.cc qlp.cc qlpsolve.cc\
register.cc request.cc rest.cc rhythmstaff.cc sccol.cc score.cc\
scoreline.cc scores.cc script.cc scriptdef.cc simpleprint.cc\
- simplestaff.cc simplewalker.cc slur.cc spanner.cc staff.cc\
+ simplestaff.cc simplewalker.cc slur.cc source.cc sourcefile.cc\
+ spanner.cc staff.cc\
staffcommands.cc staffelem.cc staffline.cc stcol.cc stem.cc\
- staffwalker.cc symbol.cc symtable.cc table.cc tex.cc texbeam.cc\
+ staffwalker.cc symbol.cc symtable.cc tex.cc texbeam.cc\
texslur.cc textdef.cc textitem.cc textspanner.cc\
timedescription.cc tstream.cc voice.cc voiceregs.cc voicegroup.cc\
- warn.cc wordwrap.cc\
+ warn.cc windhoos-suck-suck-suck-thank-you-cygnus.cc wordwrap.cc\
template1.cc template2.cc template3.cc template4.cc\
- template5.cc template6.cc version.cc
\ No newline at end of file
+ template5.cc template6.cc version.cc
+
+# a bit of a hack to keep exec size under control.
+stablecc=request.cc bar.cc boxes.cc break.cc clef.cc getcommands.cc grouping.cc\
+ item.cc keyword.cc leastsquares.cc \
+ linepstaff.cc linespace.cc lookup.cc molecule.cc meter.cc\
+ paper.cc parser.cc lexer.cc pstaff.cc qlp.cc qlpsolve.cc\
+ template1.cc template2.cc template3.cc template4.cc\
+ template5.cc template6.cc version.cc tstream.cc tex.cc\
+ voice.cc wordwrap.cc spanner.cc
+
+ ./input/standchen.ly.rej
+
+ ./src/stem.cc.rej
+
+ * scrap simplestaff
+
BUGS
* first clef isn't printed
+ * accidental placement for other clefs
+
SEVERELY LACKING:
* grace notes
* transposition
- * voicegroups.
-
* rest name configurable
SMALLISH PROJECTS
* use (char *) iso. String for communication between lexer and
parser.
- * As vs. as notename.
-
* configure idealspacing: arithmetic spacing
* fix linking: `Warning: size of symbol'
BIGGISH PROJECT
* merge musical & non-musical column. Scrap Commands in favour
- of Requests, and do multiparralel meters
+ of Requests, and do multiparallel meters
DOC
* beam generation.
+ * Request_register
+
* all errors
FUTURE
- * syntax: grouping 2*4 3*8.
-
* put scripts on barcommands
* glissando
* implement better breaking algorithm
- * check out linux -> go32 crosscompiler: dos port
-
* Implement all requests
* merge key{item} & localkey{item}
IDEAS
- * voice terminate req.
-
- * keep input in mem, store char* to define spots
-
* enter Requests directly
* itemcolumns
- * check out PMX
-
* dependencies: -> implement children more elegantly. Handle
spanner with broken deps.
* use an embedded language: scheme, lisp, S-lang, Perl, ?
- * Broadcasts in Walker of Request and Item.
-
* y -dims in internote?
* hack up mf sources for decent spacing info (and then maybe
OPTIFLAG=-DNDEBUG -DNPRINT -O2
DEBUGFLAG=-g
+# uncomment for windhoos
+# CXX=g++
+
# turn off -pipe if linker doesn't support it
EXTRACXXFLAGS=-pipe -Wall -W -Wmissing-prototypes
# version info
MAJVER=0
MINVER=0
-PATCHLEVEL=26
+PATCHLEVEL=27
VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
CXXVER=`$(CXX) --version`
#
#
include Sources.make
-progdocs=$(hdr) $(mycc)
gencc=parser.cc lexer.cc
cc=$(mycc) $(gencc)
CCSOURCE=$(addprefix $(CCDIR)/, $(cc))
obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o))
ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
-
+STABLEOBS=$(addprefix $(OBJECTDIR)/,$(stablecc:.cc=.o))
+HEADERS=$(addprefix $(HEADERDIR)/,$(hdr))
+progdocs=$(HEADERS) $(addprefix $(CCDIR)/, $(mycc))
#dist
.EXPORT_ALL_VARIABLES:
MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
configure
OFILES=COPYING README NEWS TODO
-IFILES= standchen.tex titledefs.tex pavane.tex lilyponddefs.tex \
+IFILES= titledefs.tex lilyponddefs.tex \
ltest.tex test.tex .dstreamrc dimen.tex
DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
#compiling
-LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB)
+LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB) -lg++
FLOWERDIR=../flower
CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS)
#!/bin/sh
# unclobber current dir.
-rm -v *.aux *.log `grep -li "^% Creator: LilyPond" *.out` *.orig *~
\ No newline at end of file
+rm -v *.aux *.log `grep -li "^% Creator: LilyPond" *.out *.uit` *.orig *~
PREFIX=${PREFIX:-.}
echo using PREFIX=$PREFIX
-NEEDFLOWERVER=1.0.22
+NEEDFLOWERVER=1.0.2
flowertar=flower-$NEEDFLOWERVER
here=`pwd`
cd ..
ln $(DISTFILES) $(DDIR)/$(SUBDIR)
clean:
- rm -f *.dep
+ true
+pl 23
+ - win32 patches (JN)
pl 22:
- Array::add -> Array::push
\ No newline at end of file
+ * disable: const pointer->bool->string
* PointerVec ?
MAJVER=1
MINVER=0
-PATCHLEVEL=22
+PATCHLEVEL=23
PACKAGENAME=flower
#PROFILEFLAG=-pg
-DEBUGFLAG=-g -O2 -DNDEBUG
+DEBUGFLAG= -O2 -DNDEBUG # -g
OPTIFLAG=-DNDEBUG -DNPRINT -O2
#########################################
DFILES=$(ALLSOURCES) Makefile Variables.make make_version\
Sources.make TODO README NEWS
DDIR=$(DNAME)
+
r.message("not enough fields in Dstream init.");
continue;
}
- (*silent)[r[0]] = bool(Scalar(r[1]));
+ (*silent)[r[0]] = (bool)(int)(Scalar(r[1]));
}
}
if rcfile == 0, then do not read any rc file
*/
+ virtual ~Dstream();
Dstream &identify_as(String s);
Dstream &operator << (String s);
/****************/
- T center() { return (left + right) /2;}
+ T center() { return (left + right) / T(2);}
void translate(T t) {
left += t;
right += t;
#ifdef AIX
const Real INFTY = 1e8; // ARGh. AIX sucks
#else
-const Real INFTY = HUGE;
+const Real INFTY = HUGE_VAL;
#endif
template<class T>
File_path(String);
/// add to end of path.
- Array<String>:: push;
+ Array<String>::push;
+ void add(String str) { push(str); }
};
/**
#include <builtin.h>
#include <minmax.h>
-#include <std/cmath.h>
+#include <math.h>
typedef double Real;
*this = n;
if (r.denominator() != 1) {
char * d = Itoa(r.denominator());
- *this += '/' + String(d);
+ *this += String( '/' ) + String(d);
//delete d;
}
/* delete n;
/*
$1 -- part of LilyPond
- (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997 $USERNAME <$MAILADRESS>
*/
#ifndef $def
etags -CT $(hdr)
clean:
- rm -f parser.hh
\ No newline at end of file
+ rm -f parser.hh
+++ /dev/null
-/*
- accidental.hh -- part of LilyPond
-
- (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef ACCIDENTAL_HH
-#define ACCIDENTAL_HH
-#include "item.hh"
-
-struct Accidental : Item {
-const char * name() const;
- int type,pos;
-
- void preprocess();
- Accidental(int type, int position);
- void do_print()constt;
-private:
- void brew_molecule();
-};
-#endif // ACCIDENTAL_HH
-
/// column of Complex_staff: store one request
struct Complex_column : Staff_column {
- Array<Request*> todo_l_arr_;
+ Array<Request*> first_l_arr_;
+ Array<Request*> second_l_arr_;
+
Complex_staff* staff_l_;
/****************/
#ifndef COMPLEXWALKER_HH
#define COMPLEXWALKER_HH
+// this SUX
#include "proto.hh"
#include "grouping.hh"
#include "voicegroup.hh"
#include "staffwalker.hh"
#include "key.hh"
#include "clef.hh"
+#include "register.hh"
struct Complex_walker: Staff_walker {
Local_key local_key_;
IPointerList<Voice_registers *> voice_reg_list_;
-// Assoc<Voice*, Voice_registers*> voice_reg_map_;
- //IPointerList<Voice_group_registers *> voice_reg_list_;
- //Assoc<int, Voice_group_registers*> group_reg_map_;
- Voice_group_registers group_regs_;
+ IPointerList<Voice_group_registers*> group_reg_list_;
+ Assoc<const Voice *, Voice_group_registers *> voice_group_map_;
+
Local_key_register local_key_reg_;
Array<Staff_elem_info> announce_info_arr_;
/****************/
+ void do_change_group(const Voice * v, String group_id_str);
+
Voice_registers *find_voice_reg(Voice*v_l);
+ Voice_registers *get_voice_reg(Voice*v_l);
+
+ /// search and return. return 0 if not found.
+ Voice_group_registers *find_voice_group(Voice* v_l);
+ /// search. Create if necessary
+ Voice_group_registers *get_voice_group(Voice* v_l);
+ /// search and return. return 0 if not found
+ Voice_group_registers *find_voice_group(const char* id);
+ /// Create if necessary
+ Voice_group_registers *get_voice_group(const char*);
void regs_process_requests();
void do_announces();
virtual void do_post_move();
virtual void do_pre_move();
- void do_note(CNote_info);
Complex_walker(Complex_staff*);
Complex_column *col();
Complex_staff *staff();
-
- void do_local_key(Note_req*, Notehead*);
-
};
-#endif // SIMPLEWALKER_HH
+#endif // COMPLEXWALKER_HH
const Real EPS=1e-7; // qlpsolve.hh
const int MAXITER=100; // qlpsolve.hh
-const Real INFTY=HUGE;
+const Real INFTY=HUGE_VAL;
#endif
#include "real.hh"
#include "proto.hh"
+void message( String message_str, char const* context_ch_c_l );
+void warning( String message_str, char const* context_ch_c_l );
+void error( String message_str, char const* context_ch_c_l );
void error(String s); // errors
void error_t(const String& s, Time_description const & t_tdes);
void error_t(String const &s, const Moment &when);
struct Idclass : Identifier {\
virtual const char *classname() { return #Class; }\
Idclass(String s, Class*st):Identifier(s) { data = st; }\
- virtual Class* accessor(bool copy=false) {\
+ virtual Class* accessor(bool copy) {\
if (copy)\
return new Class(* (Class*) data);\
else\
return (Class*) data;\
}\
- ~Idclass() { delete accessor(); }\
+ ~Idclass() { delete accessor(false); }\
}\
-
+make_id_class(Real_id, Real, real);
make_id_class(Script_id, Script_def, script);
make_id_class(Lookup_id, Lookup, lookup);
make_id_class(Symtables_id, Symtables, symtables);
#include "proto.hh"
#include "string.hh"
+
+/* boolean argument to accesor is copy_b..*/
#define IDACCESSOR( Input_staff, staff)\
- virtual Input_staff * staff(bool = false) { error(#Input_staff); return 0; }
+ virtual Input_staff * staff(bool) { error(#Input_staff); return 0; }
struct Identifier {
void *data;
IDACCESSOR(Symtables, symtables)
IDACCESSOR(Music_general_chord, mchord)
IDACCESSOR(Lookup,lookup)
+ IDACCESSOR(Real,real)
IDACCESSOR(Notename_tab, notename_tab)
private:
Identifier(Identifier const&){}
Input_command *get_bar_command(String);
Input_command *get_newmeasure_command();
Input_command *get_goto_command(String);
-Array<int> get_default_grouping(int count);
+Array<int> get_default_grouping(int count, int onenote);
#endif // INPUTCOMMAND_HH
#ifndef INPUTCOMMANDS_HH
#define INPUTCOMMANDS_HH
-#include "pcursor.hh"
+//#include "pcursor.hh"
#include "proto.hh"
#include "plist.hh"
#include "real.hh"
/// ABC for input structures
struct Input_music {
- virtual Voice_list convert()=0;
- virtual Moment length()=0;
+ virtual Voice_list convert()const=0;
+ virtual Moment length()const=0;
virtual void translate_time(Moment dt)=0;
virtual ~Input_music(){}
virtual void print() const =0;
+ virtual void set_default_group(String)=0;
// virtual void transpose(...) const =0;
/****/
virtual Simple_music*simple() { return this; }
void add(Voice_element*);
- virtual Moment length();
- virtual Voice_list convert();
+ virtual void set_default_group(String g) { voice_.set_default_group(g); }
+ virtual Moment length()const;
+ virtual Voice_list convert()const;
virtual void translate_time(Moment dt);
virtual void print() const;
virtual Input_music *clone() const {
/// Complex_music consists of multiple voices
struct Complex_music : Input_music {
IPointerList<Input_music*> elts;
-
+ /****************/
+ virtual void set_default_group(String g);
void add(Input_music*);
Complex_music();
Complex_music(Complex_music const &);
/****************/
- Moment length();
+ Moment length()const;
virtual void translate_time(Moment dt);
- virtual Voice_list convert();
+ virtual Voice_list convert()const;
void add_elt(Voice_element*);
virtual Input_music *clone() const {
return new Music_voice(*this);
/// Multiple musicstuff stacked on top of each other
struct Music_general_chord : Complex_music {
- IPointerList<Input_music*> chord_;
+
/****************/
- virtual Moment length();
- virtual Voice_list convert();
+ virtual Moment length()const;
+ virtual Voice_list convert()const;
virtual void translate_time(Moment dt);
void add_elt(Voice_element*);
virtual Input_music *clone() const {
*/
+struct Multi_voice_chord : Music_general_chord {
+ void set_default_group(String);
+ virtual Input_music *clone() const {
+ return new Multi_voice_chord(*this);
+ }
+};
+struct Voice_group_chord : Music_general_chord {
-
+ virtual Input_music *clone() const {
+ return new Voice_group_chord(*this);
+ }
+};
#endif // INPUTMUSIC_HH
struct Input_score {
/// defined where?
String define_spot_str_;
+ int errorlevel_i_;
/// paper_, staffs_ and commands_ form the problem definition.
Paperdef *paper_;
void set_lexer();
struct Input_file {
- istream*is;
+ istream* is;
+ Source_file* sourcefile_l_;
int line;
String name;
Assoc<String, Identifier*> *the_id_tab;
Keyword_table * keytable;
Notename_tab * defaulttab;
-
+ char const* data_ch_c_l_m;
+ int errorlevel_i_;
/****************/
-
+ int ret_notename(int *p, String text, int octave_mod);
+ char const* here_ch_c_l();
void set(Notename_tab *n);
int lookup_keyword(String);
void lookup_notename(int &large, int &small, String s);
void do_scores();
void add_score(Input_score * s);
void set_default_output(String s);
+Input_score* current_iscore_l();
String find_file(String);
const char *get_version();
+extern Source* source_l;
#endif
#ifndef MISC_HH
#define MISC_HH
+#include "proto.hh"
#include "real.hh"
#include "moment.hh"
+#include "scalar.hh"
Moment wholes(int dur, int dots);
-
+
+Rhythmic_grouping parse_grouping(const Array<Scalar> &a);
double log_2(double x) ;
int intlog2(int d);
inline int
#ifndef MOLECULE_HH
#define MOLECULE_HH
+#include "proto.hh"
#include "plist.hh"
#include "boxes.hh"
#include "symbol.hh"
/// ball at the end of the stem
struct Notehead : Item {
const char * name() const;
+ const char* defined_ch_c_l_m; //sorry, trying to find error in martien.ly
int position;
/// -1 = lowest, 0 = inside, 1 = top
int extremal;
#include "proto.hh"
+extern char const* defined_ch_c_l;
+extern char const* req_defined_ch_c_l;
Voice_element*get_mark_element(String);
void set_default_duration(int *);
+void last_duration(int n);
+void set_duration_mode(String s);
void get_default_duration(int *);
void set_default_octave(String);
void set_plet(int,int);
Request*get_script_req(int d , Script_def*def);
Request*get_text_req(int d , Text_def*def);
Voice_element*get_command_element(Input_command*);
-Voice_element*get_barcheck_element();
+Voice_element* get_barcheck_element();
+Voice_element* get_stemdir_element(int);
+
+
+
#endif // PARSECONSTRUCT_HH
struct Cresc_req;
struct Decresc_req;
struct Dynamic;
+struct Group_change_req;
+struct Group_feature_req;
struct Idealspacing;
struct Identifier;
struct Input_command;
struct Score;
struct Score_column;
struct Script_def;
+struct Script;
struct Script_req;
struct Simple_music;
struct Slur;
struct Slur_req;
+class Source;
+class Source_file;
struct Span_req;
struct Spanner;
struct Staff;
struct Staff_walker;
struct Stem;
struct Stem_req;
+struct Stem_beam_register;
struct String;
struct Symbol;
struct Symtable;
struct Symtables;
struct Tex_stream;
+struct Terminate_voice_req;
+struct Text_item ;
struct Text_def;
struct Text_gob;
struct Text_req;
#ifndef PSTAFF_HH
#define PSTAFF_HH
+#include "proto.hh"
#include "plist.hh"
#include "item.hh"
#include "symbol.hh"
/// data container.
struct Staff_elem_info {
Staff_elem * elem_p_;
-// Array<const Request*> requestor_l_arr_;
Request*req_l_;
const Voice * voice_l_;
Voice_group_registers * group_regs_l_;
- int group;
+
Request_register * origin_reg_l_;
/****/
RETURN
false: request noted, but not taken.
- true: request swallowed, now owned by this
+ true: request swallowed. Don't try to put elsewhere
(may be we could use C++ exceptions.. :-)
*/
*/
struct Notehead_register : Request_register {
- Item* note_l_;
+ Item* note_p_;
/****************/
Notehead_register(Complex_walker*);
virtual bool try_request(Request *req_l) ;
};
struct Slur_register : Request_register {
+ sstack<Slur_req*> requests_arr_;
sstack<Slur *> slur_l_stack_;
Array<Slur*> end_slur_l_arr_;
-
-
+
/****************/
~Slur_register();
Slur_register(Complex_walker*);
Beam * beam_p_;
Beam_req * beam_req_l_;
Stem_req * stem_req_l_;
+ Beam_req * start_req_l_;
bool end_beam_b_;
Rhythmic_grouping *current_grouping;
-
+ int default_dir_i_;
+
/****************/
Stem_beam_register(Complex_walker*);
~Stem_beam_register();
+ void set_dir(int dir_i_);
virtual bool try_request(Request*);
virtual void process_request();
virtual void acknowledge_element(Staff_elem_info);
virtual void do_post_move_process();
};
-#if 0
struct Script_register : Request_register {
Script * script_p_;
+
/****************/
+ void set_dir(int dir_i_);
Script_register(Complex_walker*);
virtual bool try_request(Request*);
virtual void process_request();
virtual void do_pre_move_process();
};
-struct Text_register:Request_register{
+struct Text_register : Request_register{
Text_item * text_p_;
/****************/
+ void set_dir(int dir_i_);
Text_register(Complex_walker*);
virtual bool try_request(Request*);
virtual void process_request();
- virtual void acknowledge_element(Staff_elem_info);
virtual void do_pre_move_process();
};
-#endif
+
struct Local_key_register : Request_register {
Local_key_item* key_item_p_;
/// Hungarian postfix: req
struct Request {
Voice_element*elt_l_;
+ char const* defined_ch_c_l_m;
/****************/
Request();
virtual const char * name() const { return "Request";}
virtual Request* clone() const =0;
void print()const ;
-
+
virtual Moment duration() const { return 0; }
/* accessors for children */
virtual Melodic_req *melodic() { return 0; }
virtual Mark_req * mark() { return 0; }
virtual Staff_command_req* command() { return 0;}
+ virtual Terminate_voice_req *terminate() {return 0;}
+ virtual Group_change_req * groupchange() { return 0;}
+ virtual Group_feature_req * groupfeature() { return 0; }
protected:
virtual void do_print()const ;
};
#define REQUESTMETHODS(T,accessor) \
virtual T * accessor() { return this;}\
-virtual const char* name()const { return #T; }\
+virtual const char* name() const { return #T; }\
virtual Request *clone() const { return new T(*this); } \
virtual void do_print() const
REQUESTMETHODS(Barcheck_req,barcheck);
};
+struct Terminate_voice_req : Request {
+ REQUESTMETHODS(Terminate_voice_req,terminate);
+};
+
+struct Group_feature_req : Request {
+ int stemdir_i_;
+ Group_feature_req();
+ REQUESTMETHODS(Group_feature_req, groupfeature);
+};
+
+struct Group_change_req : Request {
+ String newgroup_str_;
+ REQUESTMETHODS(Group_change_req, groupchange);
+};
+
/// a request with a duration
struct Rhythmic_req : virtual Request {
int balltype;
static int compare(const Rhythmic_req &, const Rhythmic_req &);
Moment duration() const;
Rhythmic_req();
- Rhythmic_req(int,int);
+ Rhythmic_req(int,int);
REQUESTMETHODS(Rhythmic_req, rhythmic);
};
Text_req(int d, Text_def*);
~Text_req();
Text_req(Text_req const&);
+ static int compare(const Text_req&,const Text_req&);
REQUESTMETHODS(Text_req,text);
};
/// attach a stem to the noteball
struct Stem_req : Rhythmic_req {
+ int dir_i_;
Stem_req(int s, int dots);
REQUESTMETHODS(Stem_req,stem);
};
///Put a script above or below this ``note''
struct Script_req : Request {
- int dir;
- Script_def *scriptdef;
+ int dir_i_;
+ Script_def *scriptdef_p_;
/****************/
+ static int compare(const Script_req &, const Script_req &);
Script_req(int d, Script_def*);
REQUESTMETHODS(Script_req,script);
~Script_req();
struct Glissando_req : Span_req {
-};
-struct Stemdir_req : Request {
- int which;
-};
-struct Group_change_req : Request {
};
#endif
#endif
PScore *pscore_p_;
String define_spot_str_;
+ int errorlevel_i_;
Assoc<String, Moment> markers_assoc_;
/****************************************************************/
#ifndef SCORELINE_HH
#define SCORELINE_HH
-#include "plist.hh"
#include "proto.hh"
+#include "plist.hh"
#include "varray.hh"
/// the columns of a score that form one line.
/****************/
const char * name() const;
- void set_symdir();
- void set_default_dir();
- void set_default_pos();
- Symbol symbol()const;
Molecule* brew_molecule_p()const;
virtual void do_post_processing();
virtual void do_pre_processing();
- Script(Script_req*, int);
+ Script(Script_req*, int staffsize);
void set_support(Item*);
void set_stem(Stem*);
Interval support_height()const;
- virtual Interval width() const;
+ virtual Interval width() const;
+private:
+ void set_symdir();
+ void set_default_dir();
+ void set_default_pos();
+ Symbol symbol()const;
};
String symidx;
/****************/
+ int compare(Script_def const &);
void print() const;
Script_def(String, int, int ,bool);
};
#ifndef STAFFLINE_HH
#define STAFFLINE_HH
+#include "proto.hh"
#include "real.hh"
#include "plist.hh"
#include "varray.hh"
Real hpos()const;
void do_print() const;
void set_stemend(Real);
+ int get_default_dir();
void set_default_dir();
void set_default_stemlen();
void set_default_extents();
int align_i_;
String text_str_;
String style_str_;
-
+ char const* defined_ch_c_l_m;
+
/*****************/
-
+ virtual ~Text_def() {};
+ bool compare(const Text_def&);
Text_def();
virtual void print() const;
virtual Atom create_atom(Paperdef*) const;
#include "item.hh"
struct Text_item : Item {
- const char * name() const;
int pos_i_;
int staffsize_i_;
int dir_i_;
Text_def* tdef_l_;
/****************/
-
+ const char * name() const;
virtual void set_default_pos();
Molecule* brew_molecule_p() const;
void do_pre_processing();
Voice(Voice const&);
void add(Voice_element*);
void print() const;
+ void set_default_group(String id);
};
/**
/// one horizontal bit.
struct Voice_element {
Moment duration;
+ char const* defined_ch_c_l_m;
const Voice *voice_l_;
IPointerList<Request*> reqs;
Voice_element();
Voice_element(Voice_element const & src );
void print ()const;
+ void set_default_group(String id);
};
/** Apart from being a container for the requests, Voice_element is nothing
*/
--- /dev/null
+/*
+ voicegroup.hh -- part of LilyPond
+
+ (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#ifndef VOICEGROUP_HH
+#define VOICEGROUP_HH
+
+#include "proto.hh"
+#include "register.hh"
+#include "varray.hh"
+#include "string.hh"
+
+struct Voice_registers {
+ Notehead_register head_reg_;
+ Slur_register slur_reg_;
+ Voice *voice_l_;
+
+ /****************/
+ static bool acceptable_request(Request*);
+ void pre_move_processing();
+ void post_move_processing();
+ void announce_element(Staff_elem_info info);
+ Voice_registers(Complex_walker*,Voice*);
+ bool try_request(Request*);
+ void process_requests();
+};
+
+
+struct Voice_group_registers {
+ String group_id_str_;
+ Text_register text_reg_;
+ Stem_beam_register stem_beam_reg_;
+ Script_register script_reg_;
+ Complex_walker * walk_l_;
+ int dir_i_;
+
+ /****************/
+ static bool acceptable_request(Request*);
+ void pre_move_processing();
+ void post_move_processing();
+ void announce_element(Staff_elem_info info);
+ Voice_group_registers(Complex_walker*, String id = "");
+ void process_requests();
+ bool try_request(Request*);
+};
+
+#endif
DFILES=dutch.ini table_sixteen.ini table_twenty.ini\
- english.ini script.ini symbol.ini
+ english.ini script.ini symbol.ini bare.ini
default:
echo huh?
--- /dev/null
+
+% enough for the parsing step
+
+include "init/dutch.ini"
+include "init/table_sixteen.ini"
default: ;
DISTFILES=Makefile kortjakje.ly pavane.ly maartje.ly\
- cadenza.ly scales.ly standchen.ly twinkle.ly
+ cadenza.ly scales.ly standchen.ly twinkle.ly\
+ wohltemperirt.ly error.ly\
+ martien.ly mlalt.ly mlvio1.ly mlvio2.ly mlcello.ly\
+ standchen.tex pavane.tex scsii-menuetto.tex martien.tex
+
dist:
ln $(DISTFILES) $(DDIR)/$(SUBDIR)
cad = music { $
\duration { 8}
- \textstyle "italic"
+ \textstyle "italic"
+ \command { \clef \violin }
'c4._"f" g8
\textstyle "roman"
- ['e^"accel" ()'d 'c b]
+
+ ['e^"accel" ()'d 'c b]
[b()'c] g-\fermata
- \mark"br1"
+ \command { \bar \empty }
c [c_"rubato" e g 'c]
\octave{'}
e4. e [g ()f_"rit" e d]
\duration{16}
dis4()e4
- \mark"br2"
+ \command { \bar \empty }
r8 [c d] [e f g gis]
\duration{4}
a-> `f()`e g
f-> `d()`cis e
\duration{8}
d4^\fermata
- \mark"br3"
+ \command { \bar \empty }
r8 `a [`b cis]
\duration{16} [d cis d e]
\octave{} \plet{2/3} ['d8 'c8 a8]
\plet{1/1}
g2
- \mark "br4"
+ \command { \bar \empty }
[g c e g] ['c e g 'c]\octave{'}
[e `g c e] g4^\fermata %()% BUG!
- \mark "br5"
+ \command { \bar \empty }
[g8.(_"a tempo" e g8. )e]
a4. g8 [f8 e8 d8 c8]
`g2 d2^"tr"
score {
staff { melodic
music { cad }
+
}
commands {
meter 4*4
cadenza 1
- grouping 1
- goto "br1"
- bar "empty"
- goto "br2"
- bar "empty"
- goto "br3"
- bar "empty"
- goto "br4"
- bar "empty"
- goto "br5"
- bar "empty"
+ grouping 1*4
}
}
--- /dev/null
+mwa = music {
+ $
+ ab % ok, warning, still output?
+% \bla % ok, fatal
+% & % ok, fatal
+% c d ) ] % ok, fatal
+ c [ d
+% c ) d ] e % no location :-(
+
+ $
+}
+
+bla = music {
+ @
+ These Gates will open just like windows.
+ @
+}
+
+score {
+ staff {
+ lyric music { bla }
+ }
+ staff {
+ melodic music { mwa }
+ }
+ commands {
+ meter 2*4
+ }
+}
% for lyrics, see twinkle.ly
% the % is a comment.
-
+%
+% copyright: None
+%
% declare music (which will be in *one* staff ) for the lead voice
melodie = music {
}
melody=
-staff { melodic
-% complex
+staff {
+ melodic
music{$
c8
|r4 r4 r4 r4
--- /dev/null
+% martien.ly
+%
+% Viola Quartet
+% Martien Lohman (194x-????)
+%
+% quite alive at the time of writing;
+% copyright by ml
+%
+% lilypond: src/stem.cc:42: void Stem::set_stemend(double): Assertion `(dir > 0 && se >= maxnote) || (se <= minnote && dir <0)' failed.
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% respect the copyright.
+%
+% \barnumbering5
+% \barnumberstyle\boxed
+
+include "mlalt.ly"
+include "mlvio1.ly"
+include "mlvio2.ly"
+include "mlcello.ly"
+
+score {
+ staff {
+ melodic
+ music { alto }
+ commands {
+% meter 2*4
+ clef "alto"
+ key $fis$
+ skip 56:0
+ key $bes es as$
+ skip 8:0
+% meter 6*8
+ skip 8:0
+% meter 2*4
+ skip 16:0
+ key $fis$
+ }
+ }
+ staff {
+ melodic
+ music { violin1 }
+ commands {
+% meter 2*4
+ clef "violin"
+ key $fis$
+ skip 56:0
+ key $bes es as$
+ skip 8:0
+% meter 6*8
+ skip 8:0
+% meter 2*4
+ skip 16:0
+ key $fis$
+ }
+ }
+ staff {
+ melodic
+ music { violin2 }
+ commands {
+% meter 2*4
+ clef "violin"
+ key $fis$
+ skip 56:0
+ key $bes es as$
+ skip 8:0
+% meter 6*8
+ skip 8:0
+% meter 2*4
+ skip 16:0
+ key $fis$
+ }
+ }
+ staff {
+ melodic
+ music { cello }
+ commands {
+% meter 2*4
+ clef "bass"
+ key $fis$
+ skip 56:0
+ key $bes es as$
+ skip 8:0
+% meter 6*8
+ skip 8:0
+% meter 2*4
+ skip 16:0
+ key $fis$
+ }
+ }
+ commands {
+ meter 2*4
+ skip 56:0
+ bar "||"
+ skip 8:0
+ meter 6*8
+ bar "||"
+ skip 8:0
+ meter 2*4
+ bar "||"
+ skip 16:0
+ bar "||"
+ }
+ paper {
+% unitspace 16mm
+ unitspace 24mm
+ width 195mm
+ output "martien.out"
+ }
+}
--- /dev/null
+\documentclass{article} %UGH
+\usepackage{a4}
+\oddsidemargin-1in\advance\oddsidemargin7.5mm
+\evensidemargin\oddsidemargin
+\textwidth\hsize\advance\textwidth-15mm
+\topmargin-1in\advance\topmargin5mm
+\vsize297mm % so what does a4 do, anyway?
+\textheight\vsize\advance\textheight-30mm
+\pagestyle{empty}
+\begin{document}
+\input lilyponddefs
+\input titledefs
+%\def\interstaffline{\vskip10pt}
+%\def\interscoreline{\vskip12pt}
+\def\interstaffline{\vskip1mm}
+\def\interscoreline{\vskip2mm}
+\vbox to 10mm{\vss}
+\title{Viola Quartet}
+\composer{Martien Lohman}
+\instrument{}
+\maketit
+\input martien.out
+\end{document}
--- /dev/null
+% mlalt.ly
+%
+% Viola Quartet
+% Martien Lohman (194x-????)
+%
+% Alto I
+%
+% quite alive at the time of writing;
+% copyright by ml
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% respect the copyright.
+%
+alto = music {
+ $
+ \duration{16}
+ \octave{}
+%1
+ [ `b8. `a ] [ `g8 `b c ] |
+%2
+ [ d8 g8 ] d4 |
+%3
+ [ e fis g a ] d4 |
+%4
+ [ c `b `a `b ] `b4 |
+%5=1
+ [ `b8. `a ] [ `g8 `b c ] |
+%6=2
+ [ d8 g8 ] d4 |
+%7
+ [ c `b `a `g ] [ `fis `e `d `c ] |
+%8
+ [ `d8. `e ] [ `d `fis `a c ] |
+%9=1
+ [ `b8. `a ] [ `g8 `b c ] |
+%10
+ [ d8 `d8 ] d4 |
+%11=4
+ [ c `b `a `b ] `b4 |
+%12
+ [ `a8 d8 ] `b4 |
+%13
+ [ d8. c ] [ `b8 `a `g ] |
+%14=10
+ [ d8 `d8 ] d4 |
+%15
+ [ e8 fis8 ] [ g8 d8 ] |
+%16
+ \textstyle "italic"
+ [ c `a `fis `d ] `g4_"fine" |
+ \textstyle "roman"
+% \scoreverb{\mulooseness=-1}
+% \newline
+%17
+%=1
+ [ `b8. `a ] [ `g8 `b c ] |
+%18=2
+ [ d8 g8 ] d4 |
+%19=3
+ [ e fis g a ] d4 |
+%20=4
+ [ c `b `a `b ] `b4 |
+%21=5=1
+ [ `b8. `a ] [ `g8 `b c ] |
+%22=6=2
+ [ d8 g8 ] d4 |
+%23=20=4
+ [ c `b `a `b ] `b4 |
+%24
+ [ `a8. `g ] [ `a cis e g ] |
+%first modulation
+%25
+ [ fis8. e ] [ d8 fis g ] |
+%26
+ [ a8 `a8 ] a4 |
+%27
+ [ g fis e fis ] fis4 |
+%28
+ [ e8 a8 ] fis4 |
+%29
+ [ a8. g ] [ fis8 e d ] |
+%30
+ [ a8 `a8 ] a4 |
+%31
+ [ b8 'cis8 ] [ 'd8 a8 ] |
+%32
+ [ g e cis `a ] d4 |
+%variant a
+%33
+ [ `b8 `g `g ] [ `g8 `b c ] |
+%34
+ [ d8 `g `g ] `g4 |
+%35
+ [ e8 `g `g ] [ `g8 e fis ] |
+%36
+ [ g8. fis32 e32 ] d4 |
+%37
+ [ e8 c c ] [ c8 `b `a ] |
+%38
+ [ d8 `b `b ] [ `b8 `a `g ] |
+%39
+ [ c8 `a `a ] [ `a8 `b `a ] |
+%40
+ `a4 `g4 |
+%41
+ [ `g8 `a `g ] [ d8 e d ] |
+%42
+ [ `g8 `a `g ] [ g8 e8 ] |
+%43
+ [ d8 e d ] [ d8 c `b ] |
+%44
+ [ `b8. c32 `b32 ] `a4 |
+%45
+ \plet{ 4/6 } [ `g `a `g `a `g `a ] \plet{ 1/1 } \plet{ 4/6 } [ `g `b c d e fis ] \plet{ 1/1 } |
+%46
+ \plet{ 4/6 } [ g fis e d `b `g ] \plet{ 1/1 } [ `a8 `g8 ] |
+%47
+ \plet{ 4/6 } [ g fis e d c `b ] \plet{ 1/1 } \plet{ 4/6 } [ e d c `b `a `g ] \plet{ 1/1 } |
+%48
+ \plet{ 4/6 } [ d e d d `b `g ] \plet{ 1/1 } [ `a8 `g8 ] |
+%theme 2
+ \duration{8}
+%49
+ \plet{ 2/3 } [ f e d ] \plet{ 1/1 } f4 |
+%50
+ \plet{ 2/3 } [ e d c ] \plet{ 1/1 } e4 |
+%51
+ \plet{ 2/3 } [ d g `g ] \plet{ 1/1 } \plet{ 2/3 } [ `g `a `b ] \plet{ 1/1 } |
+%52
+ d4 e4 |
+%53
+ \plet{ 2/3 } [ f e d ] \plet{ 1/1 } f4 |
+%54
+ \plet{ 2/3 } [ e d c ] \plet{ 1/1 } e4 |
+%55
+ \plet{ 2/3 } [ d g `g ] \plet{ 1/1 } \plet{ 2/3 } [ `g `a `b ] \plet{ 1/1 } |
+%56
+ `b4 c4 | % || \key\Es
+%57
+ [ `b d ] [ `g `b ] |
+%58
+ [ c es ] [ `g c ] |
+%59
+ [ d f ] [ `g f ] |
+%60
+ [ es16 d16 es16 f16 ] g4 |
+%61
+ [ as f ] [ d as ] |
+%62
+ [ g es ] [ c `as ] |
+%63
+ [ `g `b ] [ es d ] |
+%64
+ [ c8. `g32 `es32 ] `c4 | % || \meter{6/8}
+%65
+ es4.( [ )es d c ] |
+%66
+ es2. |
+%67
+ d4.( [ )d c `b ] |
+%68
+ d2. |
+%69
+% g4.\stemdown( [ ) g as g ] |
+ g4.( [ ) g as g ] |
+%70
+% g4.\stemdown( [ ) g f es ] |
+ g4.( [ )g f es ] |
+%71
+ d2. |
+%72
+ c r4 r4. | % || \meter{2/4}
+%73
+ \duration{8}
+ [ `b d ] [ `g `b ] |
+%74
+ [ c es ] [ `g c ] |
+%75
+ [ d f ] [ `g f ] |
+%76
+ [ es16 d16 es16 f16 ] g4 |
+%77
+ [ as f ] [ d as ] |
+%78
+ [ g es ] [ c `as ] |
+%79
+ [ `g `b ] [ es d ] |
+%80
+ [ c8. `g32 `es32 ] `c4 |
+%81
+ g4 [ as g ] |
+%82
+ \duration{16}
+ [ g f es f ] g4 |
+%83
+ [ g f e f ] g4 |
+%84
+ [ as g f g ] as4 |
+%85
+ f4 [ f des c `bes ] |
+%86
+ `a2 |
+%87
+ `b2 |
+%88
+ \textstyle "italic"
+ c2_"dacapo" |
+ \textstyle "roman"
+%\scoreverb{\mulooseness=1}
+% \key\G ||
+ $
+}
--- /dev/null
+% mlcello.ly
+%
+% Viola Quartet
+% Martien Lohman (194x-????)
+%
+% Cello
+%
+% quite alive at the time of writing;
+% copyright by ml
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% respect the copyright.
+%
+cello = music {
+ $
+ \octave{`}
+ \duration{4}
+%%1
+ g `g |
+%%2
+ [ `g8. `a16 ] ``b |
+%%3
+ c d |
+%%4
+ g( [ ) g16 fis16 e16 fis16 ] |
+%%5=1
+ e2 |
+%%6=2
+ [ `g8. `a16 ] ``b |
+%%7
+ c d |
+%%8
+ `g d |
+%%9=1
+ `g2 |
+%%10
+ `g ``b |
+%%11=4
+ e [ g16 fis16 e16 d16( ] |
+%%12
+ ) d g |
+%%13
+ [ d8 'd8 ] g |
+%%14=10
+ [ d8 'd8 ] g |
+%%15
+ [ c8 e8 ] [ g8 `g8 ] |
+%%16
+ \textstyle "italic"
+ [ d8 'c8 ] b_"fine"
+ \textstyle "roman" |
+% \newline
+%%17=1
+ g `g |
+%%18=2
+ [ `g8. `a16 ] ``b |
+%%19=3
+ c d |
+%%20=4
+ g( [ ) g16 fis16 e16 fis16 ] |
+%%21=5=1
+ e2 |
+%%22=6=2
+ [ `g8. `a16 ] ``b |
+%%23=4
+ c g |
+%%24
+ a `a |
+%%25
+ d2 |
+%%first modulation
+%%26
+ d `fis |
+%%27
+ ``b [ dis16 c16 ``b16 `a16( ] |
+%%28
+ ) `a d |
+%%29
+ \duration{8}
+ [ `a a ] d4 |
+%%30
+ [ `a a ] d4 |
+%%31
+ [ `g ``b ] [ d `d ] |
+%%32
+ [ `a a ] d4 |
+%%variant a
+%%33
+ \duration{16}
+ [ `g8 `g `g ] [ `g8 `g `g ] |
+%%34
+ [ `g8 `g `g ] g4 |
+%%35
+ [ c8 c c ] [ c8 'c 'c ] |
+%%36
+ g4 b4 |
+%%37
+ [ a8 a a ] [ `a8 `a `a ] |
+%%38
+ [ ``b8 ``b ``b ] [ ``b8 ``b ``b ] |
+%%39
+ [ `a8 `a `a ] [ `a8 `a `a ] |
+%%40
+ `d4 `g4 |
+%%41
+ \duration{8}
+ \textstyle "italic"
+ r_"pizz"
+ \textstyle "roman"
+ g r `g |
+%%42
+ r g e4 |
+%%43
+ r b r ``b |
+%%44
+ r e a4 |
+%%45
+ r e r e |
+%%46
+ r ``b [ d g ] |
+%%47
+ r e r `a |
+%%48
+ r ``b
+ [ `d `g ] |
+%%theme 2
+%%49
+ \textstyle "italic"
+ r4_"arco"
+ \plet{ 2/3 } [ `g `g `g ] \plet{ 1/1 } |
+ \textstyle "roman"
+%%50
+ r4 \plet{ 2/3 } [ c c c ] \plet{ 1/1 } |
+%%51
+ g2 |
+%%52
+ c2 |
+%%53
+ r4 \plet{ 2/3 } [ `g `g `g ] \plet{ 1/1 } |
+%%54
+ r4 \plet{ 2/3 } [ c c c ] \plet{ 1/1 } |
+%%55
+ g2 |
+%%56
+ `g4 `c4 |
+% \key\`es ||
+%%57
+ g r g r |
+%%58
+ c r c r |
+%%59
+ `g r `g r |
+%%60
+ c r c r |
+%%61
+ d4. ``b |
+%%62
+ c2 |
+%%63
+ g4 `g4 |
+%%64
+ c4 `c4 |
+% \meter{6/8} ||
+%%65
+ [ c c c ] c4. |
+%%66
+ [ `c `c `c ] `c4. |
+%%67
+ [ `g `g `g ] `g4. |
+% \newline
+%%68
+ [ g g g ] g4. |
+%%69
+ c2. |
+%%70
+ c2. |
+%%71
+ g2. |
+%%72
+ 'c r4 r4. |
+%%73
+% \meter{2/4} ||
+ g r g r |
+%%74
+ c r c r |
+%%75
+ `g r `g r |
+%%76
+ c r c4 |
+%%77
+ d4. ``b |
+%%78
+ c2 |
+%%79
+ g4 `g4 |
+%%80
+ c4 `c4 |
+%%81
+ \duration{2}
+ `c |
+%%82
+ `c |
+%%83
+ `e |
+%%84
+ `f |
+%%85
+ `as |
+%%86
+ c |
+%%87
+ d |
+%%88
+ \textstyle "italic"
+ d_"dacapo"
+ \textstyle "roman"
+% \key\`g ||
+ $
+}
--- /dev/null
+% mlvio1.ly
+%
+% Viola Quartet
+% Martien Lohman (194x-????)
+%
+% Violin I
+%
+% quite alive at the time of writing;
+% copyright by ml
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% respect the copyright.
+%
+violin1 = music {
+ $
+ \octave{}
+ \duration{4}
+%1
+ g [ b8. a16 ] |
+%2
+ g2 |
+%3
+ g [ a16 b16 'c16 a16 ] |
+%4
+ g2 |
+%5=1
+ g [ b8. a16 ] |
+%6=2
+ g2 |
+%7
+ e fis |
+%8
+ d fis |
+%9=1
+ g [ b8. a16 ] |
+%10
+ g f |
+%11=4
+ e d |
+%12
+ [ fis8 a8 ] [ g8 'd8 ] |
+%13
+ [ 'd8 a8 ] [ 'd8 b8 ] |
+%14=10
+ a b |
+%15
+ 'c b |
+%16
+ \textstyle "italic"
+ a g_"fine"
+ \textstyle "roman" |
+%\newline
+%17=1
+ g [ b8. a16 ] |
+%18=2
+ g2 |
+%19=3
+ g [ a16 b16 'c16 a16 ] |
+%20=4
+ g2 |
+%21=5
+ g [ b8. a16 ] |
+%22=6
+ g2 |
+%23=4
+ e [ d16 c16 `b16 c16 ] |
+%24
+ cis 'cis |
+%25
+ 'd [ 'fis8. 'e16 ] |
+%first modulation
+%26
+ 'd 'c |
+%27
+ b a |
+%28
+ [ a8 b16 'cis16 ] 'd |
+%29
+ 'cis 'd |
+%30
+ 'cis a |
+%31
+ [ g8 'd8( ] ) 'd |
+%32
+ 'cis 'c |
+%variant 'a
+%33
+ \duration{16} [ b8 'd 'd ] [ 'd8 'd 'd ] |
+%34
+ [ 'g8 'd 'd ] b4 |
+%35
+ [ 'c8 'c 'c ] [ 'c8 'c 'c ] |
+%36
+ b2 |
+%37
+ [ 'c8 'e 'e ] [ 'e8 'd 'c ] |
+%38
+ [ b8 'd 'd ] [ 'd8 'd 'd ] |
+%39
+ [ 'e8 'c 'c ] [ 'c8 'd 'c ] |
+%40
+ 'c4 { b4 'd4 } |
+%41
+ \textstyle "italic"
+ \duration{8}
+ r_"pizz" d r g
+ \textstyle "roman" |
+%42
+ r d e4 |
+%43
+ r b r 'd |
+%44
+ r 'e 'c4 |
+%45
+ r b r b |
+%46
+ r b [ a b ] |
+%47
+ r b r 'c |
+%48
+ r 'd [ 'd b ] |
+%theme 2
+%49
+ \textstyle "italic"
+ r4_"arco" \plet{ 2/3 } [ b8 b b ] \plet{ 1/1 }
+ \textstyle "roman" |
+%50
+ r4 \plet{ 2/3 } [ g g g ] \plet{ 1/1 } |
+%51
+ b2 |
+%52
+ 'c2 |
+%53
+ r4 \plet{ 2/3 } [ b b b ] \plet{ 1/1 } |
+%54
+ r4 \plet{ 2/3 } [ g g g ] \plet{ 1/1 } |
+%55
+ b2 |
+%56
+ g2 |
+% \key\Es ||
+%57
+ f r f r |
+%58
+ es r 'c r |
+%59
+ b r b r |
+%60
+ 'c r 'c4 |
+%61
+ \duration{16}
+ \plet{ 4/6 } [ as f d f as 'd ] \plet{ 1/1 } \plet{ 4/6 } [ as f d `as d f ] \plet{ 1/1 } |
+%62
+ \plet{ 4/6 } [ g es c `g c es ] \plet{ 1/1 } \plet{ 4/6 } [ g 'c 'es 'c g es ] \plet{ 1/1 } |
+%63
+ \plet{ 4/6 } [ g d g bes 'd 'g ] \plet{ 1/1 } \plet{ 4/6 } [ 'f 'd bes g f d ] \plet{ 1/1 } |
+%64
+ \duration{8}
+ [ c g ] g4 |
+% \meter{6/8} ||
+%65
+ [ g g g ] g4. |
+%66
+ [ c c c ] c4. |
+%67
+ [ g g g ] g4. |
+%68
+ [ b8 b b ] b4. |
+%69
+ [ 'c g es ] 'c4. |
+%70
+ 'c4. 'es4. |
+%71
+ [ 'f 'd b ] [ g a8 b ] |
+%72
+ 'c r4 r4. |
+% \meter{2/4} ||
+%73
+ f r f r |
+%74
+ es r 'c r |
+%75
+ b r b r |
+%76
+ 'c r 'c4 |
+%77
+ \duration{16}
+ \plet{ 4/6 } [ as f d f as 'd ] \plet{ 1/1 } \plet{ 4/6 } [ as f d `as d f ] \plet{ 1/1 } |
+%78
+ \plet{ 4/6 } [ g es c `g c es ] \plet{ 1/1 } \plet{ 4/6 } [ f 'c 'es 'c g es ] \plet{ 1/1 } |
+%79
+ \plet{ 4/6 } [ g d f b 'd 'g ] \plet{ 1/1 } \plet{ 4/6 } [ 'f 'd b g f d ] \plet{ 1/1 } |
+%80
+ [ c8 g8 ] g4 |
+%81
+ \duration{2}
+ 'c |
+%82
+ 'c |
+%83
+ 'des |
+%84
+ 'c |
+%85
+ 'c |
+%86
+ es |
+%87
+ d |
+%88
+ \textstyle "italic"
+ a_"dacapo"
+ \textstyle "roman"
+% \key\G ||
+ $
+}
--- /dev/null
+% mlvio2.ly
+%
+% Viola Quartet
+% Martien Lohman (194x-????)
+%
+% Violin II
+%
+% quite alive at the time of writing;
+% copyright by ml
+%
+% The purpose of this file is to demonstrate features of LilyPond;
+% respect the copyright.
+%
+violin2 = music {
+ $
+ \octave{}
+ \duration{4}
+%1
+ d2 |
+%2
+ [ `b8. `a16 ] `g4 |
+%3
+ [ g8 e8 ] fis |
+%4
+ d2 |
+%5=1
+ e2 |
+%6=2
+ [ `b8. `a16 ] `g4 |
+%7
+ `g `a |
+%8
+ `b `a |
+%9=1
+ d2 |
+%10
+ `b `g |
+%11=4
+ `g2 |
+%12
+ [ d8 e16 fis16 ] g |
+%13
+ fis g |
+%14=10
+ fis d |
+%15
+ c d |
+%16
+ \textstyle "italic"
+ d2_"fine" |
+ \textstyle "roman"
+% \newline
+%17=1
+ d2 |
+%18=2
+ [ `b8. `a16 ] `g4 |
+%19=3
+ [ g8 e8 ] fis |
+%20=4
+ d2 |
+%21=5=1
+ e2 |
+%22=6=2
+ [ `b8. `a16 ] `g4 |
+%23=4
+ `g2 |
+%24
+ cis e |
+%25
+ a2 |
+%first modulation
+%26
+ fis d |
+%27
+ d2 |
+%28
+ [ cis8 e8 ] [ d8 a8 ] |
+%29
+ [ a8 e8 ] [ a8 fis8 ] |
+%30
+ e fis |
+%31
+ g fis |
+%32
+ a fis |
+%variant a
+%33
+ \duration{16}
+ [ g8 b b ] [ b8 g a ] |
+%34
+ [ b8 b b ] f4 |
+%35
+ [ g8 e e ] [ e8 g g ] |
+%36
+ b4 fis4 |
+%37
+ [ a8 a a ] [ a8 a a ] |
+%38
+ [ fis8 fis fis ] [ fis8 fis fis ] |
+%39
+ [ e8 e e ] [ e8 e e ] |
+%40
+ fis4 g4 |
+%41
+ \duration{8}
+ \textstyle "italic"
+ r_"pizz"
+ \textstyle "roman"
+ `b r `b |
+%42
+ r `b `g4 |
+%43
+ r fis r fis |
+%44
+ r g e4 |
+%45
+ r e r g |
+%46
+ r fis [ fis g ] |
+%47
+ r g r e |
+%48
+ r fis [ fis d ] |
+%theme 2
+%49
+ \textstyle "italic"
+ r4_"arco"
+ \textstyle "roman"
+ \plet{ 2/3 } [ d8 d d ] \plet{ 1/1 } |
+%50
+ r4 \plet{ 2/3 } [ g8 g g ] \plet{ 1/1 } |
+%51
+ d2 |
+%52
+ c2 |
+%53
+ r4 \plet{ 2/3 } [ d8 d d ] \plet{ 1/1 } |
+%54
+ r4 \plet{ 2/3 } [ e e e ] \plet{ 1/1 } |
+%55
+ d2 |
+%56
+ f4 e4 |
+% \key\Es ||
+%57
+ d r `b r |
+%58
+ `g r es r |
+%59
+ g r g r |
+%60
+ g r es4 |
+%61
+ f2 |
+%62
+ es2 |
+%63
+ `b d4. |
+%64
+ es2 |
+% \meter{6/8} ||
+%65
+ \duration{8}
+ [ c c c ] c4. |
+%66
+ [ `g `g `g ] `g4. |
+%67
+ [ `b8 `b `b ] `b4. |
+%68
+ [ g g g ] g4. |
+%69
+ es2. |
+%70
+ [ c es g ] 'c4. |
+%71
+ b4 g4 d4 |
+%72
+ es r4 r4. |
+%73
+% \meter{2/4} ||
+ d r `b r |
+%74
+ `g r es r |
+%75
+ g r g r |
+%76
+ g r es4 |
+%77
+ \duration{2}
+ f |
+%78
+ es |
+%79
+ `b8 d4. |
+%80
+ es |
+%81
+ es |
+%82
+ es |
+%83
+ bes |
+%84
+ f |
+%85
+ f |
+%86
+ ges |
+%87
+% = g |
+%88
+ \textstyle "italic"
+ fis_"dacapo" |
+ \textstyle "roman"
+% \key\G ||
+ $
+}
horn =
staff {
-% melodic
- complex
+ melodic
music{ $
\octave { ' }
- \duration { 8}
+ \duration { 8 }
% 1
d2(( [)d e cis `b] |
bar "|:"
skip 10:0
bar ":|"
- meter 4* 4
skip 13:0
bar "||"
}
--- /dev/null
+\documentclass{article} %UGH
+\usepackage{a4}
+\begin{document}
+\input lilyponddefs
+\input titledefs
+\def\interscoreline{\vskip12pt}
+\title{Pavane pour une Infante d\'efunte}
+\composer{Maurice Ravel}
+\instrument{Cor en Fa}
+\maketit
+\input pavane.out
+\end{document}
geometric 1.4
}
commands {
- meter 6* 8
+ meter 6*8
skip 6:0
- meter 4* 4
+ meter 4*4
skip 2:0
skip 11:0
}
-}
\ No newline at end of file
+}
--- /dev/null
+\documentclass{article} %UGH
+\usepackage{a4}
+\oddsidemargin-1in\advance\oddsidemargin7.5mm
+\evensidemargin\oddsidemargin
+\textwidth\hsize\advance\textwidth-15mm
+\begin{document}
+\input lilyponddefs
+\input titledefs
+\def\interscoreline{\vskip12pt}
+\title{Solo Cello Suites\normalsize\\[2ex]Suite II}
+% \subtitle{Suite II}
+\composer{J.\ S.\ Bach}
+% \lefttitle{Menuetto}
+% \tempo{Moderato}
+% \metron{4=120}
+\instrument{Menuetto I} % heu
+\maketit
+\input scsii-menuetto.out
+\end{document}
-% st\"andchen.lily
-% Franz Schubert (? - ?)
+% standchen.ly
+%
+% St\"andchen (Serenade) "Leise flehen meine Lieder" D.957 No.4
+% Franz Schubert (1797-1828)
+% Text by Ludwig Rellstab (1799-1860)
+%
+% Copyright (c) 1995,1996,1997 Jan Nieuwenhuizen <jan@digicash.com>
+%
+% The purpose of this file is to demonstrate features of LilyPond.
+% (there is an accompanying LaTeX file, standchen.tex)
%
% comments with # note missing stuff
% heu, make that %#%
%% LilyPond's naive idealspacing calc.
%%
-%
%#%%
%#%\title{St\"andchen}
%#%\subtitle{Serenade}
%#%%
-%#%\composer{`franz Schubert}
+%#%\composer{Franz Schubert}
%#%\tempo{M\"a\ss ig}
%#%%
%#%\meter{3/4}
-%#%\key\`f
+%#%\key\F
%#%\clef\treble
%#%%
%#%\barnumbering5
%%1
melodie = music { $
\duration{ 8 }
- r_"pp" { [ d `a-| } f-| { d `a-| } f-| { d `a-| ] }
+% r_"\pp" { [ d `a-| } f-| { d `a-| } f-| { d `a-| ] }
+ r { [ d `a-|_"\pp" } f-| { d `a-| } f-| { d `a-| ] }
%%2
r { [ d `bes-| } f-| { d `bes-| } f-| { d `bes-| ] }
%%3
+ \textstyle "italic"
r_"simile" { [ d `bes } e { d `bes } e { d `bes ] }
+ \textstyle "roman"
%%4
r { [ `a cis } e { `a cis } e { `a cis ] }
%#%:|
%%9
%#% { 'a4.( 'cis4.\stemdown_p } { ) 'g 'e_{dolce} }
%#% { 'g( 'e } 'f ) 'e
- 'a4.( )g \plet{ 2/3 } { 'g 'e } { 'f } { 'e } \plet{ 1/1 }
+ 'a4.( )'g \plet{ 2/3 } { 'g 'e } { 'f } { 'e } \plet{ 1/1 }
%%10
{ 'f2. 'd2. }
%%11
- \plet { 2/3 } [ a_"pp"( )bes a ] \plet { 1/1 } 'f4. a
+ \plet { 2/3 } [ a_"\pp"( )bes a ] \plet { 1/1 } 'f4. a
%%12
\plet { 2/3 } [ g( ) a g ] \plet { 1/1 } 'e4. 'd
%%13
'c4. bes \plet { 2/3 } [ bes( ) a g ] \plet { 1/1 }
%%14
%#% a2 r { 'd(^ f_p(v }
- a2 r { 'd f_"p" }
+ a2 r { 'd f_"\p" }
%%15
%#% { ) e4. ) 'c4.\stemup_{dolce} } { bes g }
{ e4. 'c4._"dolce" } { bes g }
%%16
{ a2. f2. }
%%17
+ \textstyle "italic"
[ a8._"cresc." 'cis16 ] 'f4. 'e
+ \textstyle "roman"
%%18
[ 'd8. a16 ] f4. d
%%19
%#% 'c\grace\stemup
- \plet { 2/3 } [ bes_"pp"( ) a bes ] \plet { 1/1 } 'd4. bes
+ \plet { 2/3 } [ bes_"\pp"( ) a bes ] \plet { 1/1 } 'd4. bes
%%20
a2.
%%21
%#% =f2.
f2.
%%23
- [ a8._"mf" 'cis16 ] 'f4. 'e
+ [ a8._"\mf" 'cis16 ] 'f4. 'e
%%24
[ 'd8. a16 ] fis4. d
%%25
%#% 'cis\grace\stemup
- \plet { 2/3 } [ b_"mf"( ) ais b ] \plet { 1/1 } 'd4. b
+ \plet { 2/3 } [ b_"\mf"( ) ais b ] \plet { 1/1 } 'd4. b
%%26
{ a2. fis2. }
%#%\tighten\newline
%%27
- \plet { 2/3 } [ 'e_"f"( )'dis 'e ] \plet { 1/1 } 'g4. 'cis
+ \plet { 2/3 } [ 'e_"\f"( )'dis 'e ] \plet { 1/1 } 'g4. 'cis
%%28
{ 'd2. fis2. }
%#%\volta1
%%29
%#% { bes2(^++++ g2_{mf} }
- { bes2 g2_"mf" }
+ { bes2 g2_"\mf" }
%#% [v { 'd8.( bes8. } { bes16 ) )++ g16 } ]
{ [ 'd8. bes8. } { bes16 g16 ] }
%%30
%#% [ { a cis_.( } { a e_. } { a )- g_. } ]
{ [ a cis_. } { a e_. } { a g_. ] }
%%32
- { a2 fis2_"pp" } { a4 fis4 }
+ { a2 fis2_"\pp" } { a4 fis4 }
%%33
%#% { b2(^ g2 } [v { 'd8.( b8. } { b16 ) ) g16 } ]
{ b2( g2 } { [ 'd8. b8. } { b16 g16 ] }
'cis2 r4
%%41
%#% { > 'fis4. 'cis4._f } 'e [ 'e( ) 'd >! 'cis ] \plet { 1/1 }
- { 'fis4. 'cis4._"f" } 'e \plet { 2/3 } [ 'e( )'d 'cis ] \plet { 1/1 }
+ { 'fis4. 'cis4._"\f" } 'e \plet { 2/3 } [ 'e( )'d 'cis ] \plet { 1/1 }
%%42
[ b8. 'cis16 ] 'd4^> b r
%%43
%#% [^ { b8._{ }_{ }_{ }_{ }_{ }_f g2. } 'cis16 ] 'd4^> b r
- [ b8._"f" 'cis16 ] 'd4^> b r
+ [ b8._"\f" 'cis16 ] 'd4^> b r
%%44
%#% [^ { > b8. fis2 } 'cis16 ] 'd4^> b >! r
-% typo?
[ b8. 'cis16 ] 'd4^> b r
%%45
%#% 'cis\grace\stemup
- \plet { 2/3 } [ b_"p"( )ais b ] \plet { 1/1 } 'd4. b
+ \plet { 2/3 } [ b_"\p"( )ais b ] \plet { 1/1 } 'd4. b
%%46
%#% { =a2. fis2. }
{ a2. fis2. }
%%47
- \plet { 2/3 } [ 'e_"f"( )'dis 'e ] \plet { 1/1 } 'g4.^> 'cis
+ \plet { 2/3 } [ 'e_"\f"( )'dis 'e ] \plet { 1/1 } 'g4.^> 'cis
%%48
%#% { fis2.(v ='d2.\stemup(^ }
{ fis2. 'd2. }
%%49
%#% { ) 'd4 ) =f2._> } { r4 s4_{decr} } 'd4\stemup
+ \textstyle "italic"
'd4 r4_"decresc." 'd4
+ \textstyle "roman"
%%50
{ bes2. e2. }
%%51
{ a2. cis2. }
%%52
- { fis2 d2 } { a4 f4_"pp" }
+ { fis2 d2 } { a4 f4_"\pp" }
%%53
%#% { bes2 g2 } [ { 'd8.^>( bes8. } { ) bes16 g16 } ]
{ bes2 g2 } { [ 'd8.^> bes8. } { bes16 g16 ] }
%#% { a4. g4. } [ { a cis_.( } { a e_. } { a )- g_. } ]
{ a4. g4. } { [ a cis_. } { a e_. } { a g_. ] }
%%56
+ \textstyle "italic"
{ a2. fis2._"dim." }
+ \textstyle "roman"
%%57
{ a2. fis2. }
%%58
output "standchen.uit"
unitspace 2.4 cm
% unitspace 4.0 cm % leaves all text stand free
-geometric 1.4
+ geometric 1.4
}
staff {
- melodic music { melodie }
+ melodic
+ music { melodie }
commands {
key $bes$
clef "violin"
music { tekst2 }
}
staff {
- melodic music { begeleiding }
+ melodic
+ music { begeleiding }
commands {
key $bes$
clef "bass"
skip 32:0
bar ":|"
skip 22:0
- bar "||"
+ bar "||"
+ }
+ paper {
+ symboltables { table_sixteen }
+ width 195mm
+ unitspace 20mm
+% unitspace 4.0 cm % leaves all text stand free
+% geometric 1.4
+ output "standchen.out"
}
}
--- /dev/null
+\documentclass{article} %UGH
+\usepackage{a4}
+\oddsidemargin-1in\advance\oddsidemargin7.5mm
+\evensidemargin\oddsidemargin
+\textwidth\hsize\advance\textwidth-15mm
+\topmargin-1in\advance\topmargin5mm
+\vsize297mm % so what does a4 do, anyway?
+\textheight\vsize\advance\textheight-30mm
+\pagestyle{empty}
+\begin{document}
+\input lilyponddefs
+\input titledefs
+%\def\interstaffline{\vskip10pt}
+%\def\interscoreline{\vskip12pt}
+\def\interstaffline{\vskip1mm}
+\def\interscoreline{\vskip2mm}
+\vbox to 10mm{\vss}
+\title{St\"andchen\normalsize\\[2ex](Serenade)}
+\composer{Franz Schubert (1797-1828)}
+\instrument{M\"a\ss ig} % heu
+%#%\tempo{M\"a\ss ig}
+\maketit
+\input standchen.out
+\end{document}
% "Altijd is Kortjakje ziek"
% "Twinkle twinkle little star"
%
-
+% Copyright: none
melodie = music {
$
}
mstaf = staff {
-% melodic
- complex
+ melodic
music { melodie }
commands { clef "violin" }
}
bass_staf = staff {
-% melodic
- complex
+ melodic
music { begeleiding }
commands { clef "bass" }
}
--- /dev/null
+% JS Bach, Das Wohltemperirtes Clavier I, Fuga II (c-minor)
+%
+% a 7 bar fragment
+%
+% Public Domain -- by HWN
+%
+
+dux = music { $
+ \duration { \last }
+ \stem{-1} r8 ['c16 b] ['c8 g] [as 'c16 b] ['c8 'd] |
+ [g 'c16 b] ['c8 'd] [f16 g] as4 [g16 f] |
+ [es 'c b a] [ g f es d] [c8 'es 'd 'c] |
+ [bes a bes 'c] [fis g a fis] |
+ g4 r16 [c d es] [f g as8(] [)as16 d es f ]|
+ [g a bes8(] [)bes16 es f g ] [as g f es] [d8 'c16 b]|
+ 'c4 r4 r8 ['f 'es 'd] |
+ r8 [as g f] [g f16 es] [f8 d] |
+$}
+
+comes = music { $
+ r1 r1
+ \stem{1}
+ \octave {'}
+ r8 [g16 fis] [g8 c] [es g16 f] [g8 a]|
+ [d8 g16 fis] [g8 a] [c16 d] es4 [d16 c] |
+ [`bes8 es16 d] [es8 `g8] [`as f16 es] [f8 `a] |
+ [`bes8 g16 f] [g8 `b] [c8 d16 es] f4( |
+ [) f8 es16 d] [c16 `bes `as `g] [`f8 as g f] |
+ [es d es f] [`b c d `b] |
+
+$}
+
+bassdux = music { $
+ r1 r1 r1 r1 r1 r1
+ \stem{1} \octave { }
+ r8 [c16 B] [c8 G] [As c16 Bes] [c8 d] |
+ [G c16 B] [c8 d] [F16 G] As4 [G16 F] | $
+}
+
+% will make it look even uglier
+basstaf = staff { melodic
+ music { bassdux }
+ commands {
+ clef bass
+ key $bes es as$
+ }
+}
+
+score {
+ staff { melodic
+ music { dux }
+ music { comes }
+
+ commands {
+ key $bes es as$
+ }
+ }
+ commands {
+ meter 4*4
+ skip 8:0
+ }
+ paper { unitspace 2.5cm
+ geometric 1.1
+ }
+}
\ No newline at end of file
%% musix defs
\parindent=0pt
+\newdimen\smallspace
\newdimen\interlinedist
\newcount\n
\newdimen\balkhoog
\font\hslurhfont=xslhz20
\font\musicfnt=musix20
\font\italicfont=cmti10
+ \font\dynfont=cmbxti10 scaled \magstep1
\balkhoog=20pt
\notewidth=6pt
\noteheight=5pt
\font\hslurdfont=xslhd16
\font\hslurhfont=xslhz20
\font\musicfnt=musix16
+ \font\dynfont=cmbxti10
\balkhoog=16pt
\staffrulethickness=0.4pt
\notewidth=5pt
}
\def\musixcalc{
+ \interlinedist=\fontdimen5\musicfnt
+ \smallspace=.3\interlinedist
\interstaffrule=\balkhoog
\advance\interstaffrule by-\staffrulethickness
\divide\interstaffrule by 4
\balkhalf=\balkhoog
\rationalmultiply\balkhalf*1/2
}
-\def\dyn{\italicfont}
+% \def\dyn{\italicfont}
+\def\dyn{\dynfont}
+\def\dynf{f\kern-.1ex}
+\def\dynm{f\kern-.15ex}
+\def\dynp{p\kern-.15ex}
+\def\ppp{\dynfont\dynp\dynp p}
+\def\pp{\dynfont\dynp p}
+\def\p{\dynfont p}
+\def\mp{\dynfont\dynm p}
+\def\mf{\dynfont\dynm f}
+\def\f{\dynfont f}
+\def\ff{\dynfont\dynf f}
+\def\fff{\dynfont\dynf\dynf f}
\def\slurcharh#1{{\slurhfont\char#1}}
\def\slurcharu#1{{\slurufont\char#1}}
\mdef\usixteenthflag{41}
\mdef\uthirtysecondflag{42}
-\def\maatstreep{\vrule height\balkhoog}
-\def\finishbar{\vrule height\balkhoog width 1pt}
\maccentdef\repeatcolon{55}{2/1}
\def\emptybar{}
-\def\repeatbar{\rightalign{\repeatcolon\kern 2pt\finishbar}}
-\def\startrepeat{\hbox{\finishbar\kern 2pt\repeatcolon}}
-\def\repeatbarstartrepeat{\hbox{\repeatbar\kern 1pt\startrepeat}}
+
+\def\thinbar{\vrule height\balkhoog}
+%? what-s wrong with rightalign?
+\def\thickbar{\vrule height\balkhoog width 2\smallspace}
+\def\maatstreep{\thinbar}
+% \def\finishbar{\rightalign{\thinbar\kern\smallspace\thickbar}}
+\def\finishbar{\hss\rightalign{\thinbar\kern\smallspace\thickbar}}
+% \def\repeatstopbar{\rightalign{\repeatcolon\hskip2\smallspace\thinbar\hskip\smallspace\thickbar}}
+\def\repeatstopbar{\hss\rightalign{\repeatcolon\hskip2\smallspace\thinbar\hskip\smallspace\thickbar}}
+% \def\repeatstopbar{\kern-3\smallspace\rightalign{\repeatcolon\kern2\smallspace\thinbar\kern\smallspace\thickbar}\kern3\smallspace}
+\def\repeatstartbar{\hbox{\thickbar\kern\smallspace\thinbar\kern2\smallspace\repeatcolon}}
+\def\repeatstopstart{\hbox{\repeatcolon\kern2\smallspace\thinbar\kern\smallspace\thickbar\kern\smallspace\thickbar\kern\smallspace\thinbar\kern2\smallspace\repeatcolon}}
+\def\doublebar{\hbox{\thinbar\hskip\smallspace\thinbar}}
+
+%compatability
+\def\repeatbar{\repeatstopbar}
+\def\startrepeat{\repeatstartbar}
+\def\repeatbarstartrepeat{\repeatstopstart}
\def\generalmeter#1#2{\botalign{\vbox to\balkhalf{\vss \meterfont#1}%
\nointerlineskip
+++ /dev/null
-\documentclass{article} %UGH
-\usepackage{a4}
-\begin{document}
-\input lilyponddefs
-\input titledefs
-\def\interscoreline{\vskip12pt}
-\title{Pavane pour une Infante d\'efunte}
-\composer{Maurice Ravel}
-\instrument{Cor en Fa}
-\maketit
-\input pavane.out
-\end{document}
etags -CT $(mycc)
clean:
- rm -f $(gencc)
\ No newline at end of file
+ rm -f $(gencc)
+#include "varray.hh"
+
#include "dimen.hh"
#include "beam.hh"
#include "misc.hh"
int dirs[2];
dirs[0]=0; dirs[1] =0;
for (iter_top(stems,i); i.ok(); i++) {
- i->set_default_dir();
- dirs[(i->dir+1)/2] ++;
+ int d = i->get_default_dir();
+ dirs[(d+1)/2] ++;
}
dir = (dirs[0] > dirs[1]) ? -1 : 1;
for (iter_top(stems,i); i.ok(); i++) {
+++ /dev/null
-#include "keyitem.hh"
-#include "stem.hh"
-#include "rest.hh"
-#include "notehead.hh"
-#include "paper.hh"
-#include "molecule.hh"
-#include "linepstaff.hh"
-#include "complexmelodicstaff.hh"
-#include "sccol.hh"
-#include "localkeyitem.hh"
-#include "request.hh"
-
-const int NO_LINES=5;
-
-
-void
-Complex_melodic_staff::set_output(PScore*ps)
-{
- theline_l_ = new Linestaff(NO_LINES,ps); // theline_l_ is added to pscore later.
- Complex_staff::set_output(ps);
-}
-
-Item *
-Complex_melodic_staff::get_TYPESET_item(Command*com)
-{
- if (com->args[0] == "KEY") {
- return new Keyitem(NO_LINES); // urgh. depends on clef.
- } else
- return Complex_staff::get_TYPESET_item(com);
-}
-
+#include "keyitem.hh"
+
#include "request.hh"
#include "pscore.hh"
#include "paper.hh"
#include "complexstaff.hh"
#include "sccol.hh"
#include "debug.hh"
-
+#include "linepstaff.hh"
#include "clefitem.hh"
#include "bar.hh"
#include "meter.hh"
+const NO_LINES = 5;
Item *
Complex_staff::get_TYPESET_item(Command *com)
Array<Scalar> arg( com->args);
String type =arg[0];
arg.del(0);
- if (type == "BAR" ) {
+ if (com->args[0] == "KEY") {
+ return new Keyitem(NO_LINES); // urgh. depends on clef.
+ } else if (type == "BAR" ) {
s = new Bar(com->args[1]);
} else if (type == "METER") {
s = new Meter(arg);
}
+
Interval
citemlist_width(const Array<Item*> &its)
{
void
Complex_staff::set_output(PScore* ps )
{
+ theline_l_ = new Linestaff(NO_LINES,ps); // theline_l_ is added to pscore later.
pscore_l_ = ps;
pscore_l_->add(theline_l_);
}
if (j->barcheck()) {
if (tdescription_->whole_in_measure) {
- error("Barcheck failed, " + tdescription_->str());
+ error( "Barcheck failed", j->defined_ch_c_l_m );
}
continue;
}
continue;
if (j->command())
continue;
- todo_l_arr_.push(j);
+ if (j->groupchange()) // ugh
+ first_l_arr_.push(j);
+ else
+ second_l_arr_.push(j);
}
}
#include "clef.hh"
#include "pscore.hh"
#include "complexstaff.hh"
-#include "complexwalker.hh"
#include "sccol.hh"
#include "debug.hh"
#include "keyitem.hh"
#include "clefitem.hh"
#include "voicegroup.hh"
#include "register.hh"
-
-Rhythmic_grouping
-cparse_grouping(Array<Scalar> a, Moment one_beat)
-{
- Array<int> r;
- for (int i= 0 ; i < a.size(); i++)
- r.push(a[i]);
- Moment here =0.0;
-
- Array<Rhythmic_grouping*> children;
- for (int i=0; i < r.size(); i++) {
-
- Moment last = here;
- here += one_beat * r[i];
- children.push(
- new Rhythmic_grouping(MInterval(last, here), r[i] )
- );
- }
- return Rhythmic_grouping(children);
-}
+#include "complexwalker.hh"
+#include "misc.hh"
void
Complex_walker::do_INTERPRET_command(Command*com)
Array<Scalar> args(com->args);
args.del(0);
if (com->args[0] == "GROUPING") {
- default_grouping = cparse_grouping(args,
- col()->tdescription_->one_beat);
+ default_grouping = parse_grouping(args);
}else if (com->args[0] == "NEWMEASURE") {
local_key_.reset(key_);
void
Complex_walker::announce_element(Staff_elem_info info)
{
+ info.group_regs_l_ = find_voice_group((Voice*)info.voice_l_);
announce_info_arr_.push(info);
}
void
Complex_walker::do_announces()
{
-
for (int i = 0; i < announce_info_arr_.size(); i++){
Staff_elem_info info = announce_info_arr_[i];
for (iter_top(voice_reg_list_,j); j.ok(); j++) {
j->announce_element(info);
}
- group_regs_.announce_element(info);
+ for (iter_top ( group_reg_list_, j); j.ok(); j++) {
+ j->announce_element(info);
+ }
local_key_reg_.acknowledge_element(info);
}
}
Voice_registers *
Complex_walker::find_voice_reg(Voice*v_l)
{
- for (iter_top(voice_reg_list_, i); i.ok(); i++) {
+ for (iter_top(voice_reg_list_, i); i.ok(); i++) {
if (i->voice_l_ == v_l)
return i;
- }
+ }
+ return 0;
+}
+
+Voice_registers*
+Complex_walker::get_voice_reg(Voice*v_l)
+{
+ Voice_registers *regs_p=find_voice_reg(v_l);
+ if (regs_p)
+ return regs_p;
- Voice_registers *regs_p=new Voice_registers(this,v_l);
+ regs_p = new Voice_registers(this,v_l);
voice_reg_list_.bottom().add (regs_p);
- //voice_reg_map_[v_l] = regs_p;
return regs_p;
}
+Voice_group_registers *
+Complex_walker::find_voice_group(Voice* v_l)
+{
+ if (!voice_group_map_.elt_query(v_l))
+ return 0;
+ else return voice_group_map_[v_l];
+}
+
+Voice_group_registers *
+Complex_walker::find_voice_group(const char *id)
+{
+ for (iter_top(group_reg_list_, i); i.ok(); i++)
+ if (i->group_id_str_ == id)
+ return i;
+ return 0;
+}
+
+
+Voice_group_registers *
+Complex_walker::get_voice_group(Voice *v_l)
+{
+ Voice_group_registers *group_p = find_voice_group(v_l);
+ if (group_p)
+ return group_p;
+
+ group_p = new Voice_group_registers(this);
+ group_reg_list_.bottom().add(group_p);
+ voice_group_map_[v_l] = group_p;
+ return group_p;
+}
+
+
+Voice_group_registers *
+Complex_walker::get_voice_group(const char* id)
+{
+ Voice_group_registers *group_p = find_voice_group(id);
+ if (group_p)
+ return group_p;
+ group_p = new Voice_group_registers(this,id);
+ group_reg_list_.bottom().add(group_p);
+ return group_p;
+}
+
+void
+Complex_walker::do_change_group(const Voice * v, String group_id_str)
+{
+ voice_group_map_[v] = get_voice_group(group_id_str);
+}
+
void
Complex_walker::try_request(Request*req)
{
- bool b;
- if (req->note() || req->rest()|| req->slur()) {
- Voice *v_l = req->elt_l_->voice_l_;
- Voice_registers *vregs_l = find_voice_reg(v_l);
-
+ bool b=false;
+ Voice *voice_l = req->elt_l_->voice_l_;
+
+ if (req->groupchange()) {
+ do_change_group(voice_l, req->groupchange()->newgroup_str_);
+ b = true;
+ } else if (Voice_registers::acceptable_request(req)) {
+ Voice_registers *vregs_l = get_voice_reg(voice_l);
b = vregs_l->try_request(req);
-
- } else {
- b = group_regs_.try_request(req);
- if (!b)
- b = local_key_reg_.try_request(req);
- }
+ } else if (Voice_group_registers::acceptable_request(req)){
+ Voice_group_registers* reg_l = get_voice_group(voice_l);
+ b = reg_l->try_request(req);
+#if 0
+ if (!b) {
+ bool please_b = get_voice_group("")->try_request(req);
+ b |= please_b;
+ }
+#endif
+ }
+
if (!b)
WARN<< "junking request: " <<req->name() <<"\n";
}
Complex_walker::process_requests()
{
Complex_column*c = col();
-// Complex_staff *s = staff();
- for (int i=0; i < c->todo_l_arr_.size(); i++) {
- try_request(c->todo_l_arr_[i]);
+ for (int i=0; i < c->first_l_arr_.size(); i++) {
+ try_request(c->first_l_arr_[i]);
+ }
+
+ for (int i=0; i < c->second_l_arr_.size(); i++) {
+ try_request(c->second_l_arr_[i]);
}
regs_process_requests();
void
Complex_walker::regs_process_requests()
{
- for (iter_top(voice_reg_list_,j); j.ok(); j++) {
+ for (iter_top(voice_reg_list_, j); j.ok(); j++) {
j->process_requests();
}
- group_regs_.process_requests();
+ for (iter_top(group_reg_list_, j); j.ok(); j++)
+ j->process_requests();
+
local_key_reg_.process_request();
}
void
Complex_walker::typeset_element(Staff_elem *elem_p)
{
+ if (!elem_p)
+ return;
if (elem_p->spanner())
pscore_l_->typeset_spanner(elem_p->spanner(), staff()->theline_l_);
else
Complex_walker::Complex_walker(Complex_staff*s)
: Staff_walker(s, s->theline_l_->pscore_l_),
- group_regs_(this),
local_key_reg_(this)
{
oldkey_undo = 0;
for (iter_top(voice_reg_list_,i); i.ok(); i++) {
i->pre_move_processing();
}
- group_regs_.pre_move_processing();
+ for (iter_top (group_reg_list_, j); j.ok(); j++)
+ j->pre_move_processing();
local_key_reg_.pre_move_processing();
}
void
Complex_walker::do_post_move()
{
- processed_clef =false;
+ processed_clef = false;
processed_key = false;
processed_bar_priority = 0;
i->post_move_processing();
}
announce_info_arr_.set_size(0);
- group_regs_.post_move_processing();
+ for (iter_top (group_reg_list_, j); j.ok(); j++)
+ j->post_move_processing();
local_key_reg_.post_move_processing();
}
for (int i=0; i < children.size(); i++) {
MInterval inter = intersection(t, children[i]->interval());
- if (inter.empty() || inter.length() <= 0) {
+ if (inter.empty() || inter.length() <= Rational( 0 )) {
delete children[i];
children[i] =0;
} else {
interval_ = new MInterval(t);
return;
}
- Moment dt = t.length()/n;
+ Moment dt = t.length()/Rational(n);
MInterval basic = MInterval(t.left, t.left+dt);
for (int i= 0; i < n; i++)
- children.push(new Rhythmic_grouping( dt*i + basic ));
+ children.push(new Rhythmic_grouping( dt*Rational(i) + basic ));
}
+#include "script.hh"
#include "request.hh"
#include "beam.hh"
#include "stem.hh"
#include "debug.hh"
#include "complexstaff.hh"
#include "textspanner.hh"
+#include "textitem.hh"
Stem_beam_register::Stem_beam_register(Complex_walker*w)
:Request_register(w)
do_post_move_process();
current_grouping = 0;
beam_p_ = 0;
+ set_dir(0);
+ start_req_l_ = 0;
}
bool
Stem_beam_register::process_request()
{
if (beam_req_l_) {
- if (beam_req_l_->spantype == Span_req::STOP)
+ if (beam_req_l_->spantype == Span_req::STOP) {
end_beam_b_ = true;
- else {
+ start_req_l_ = 0;
+ } else {
beam_p_ = new Beam;
+ start_req_l_ = beam_req_l_;
// walk_l_->announce_element(Staff_elem_info(beam_p_, ))
current_grouping = new Rhythmic_grouping;
if (beam_req_l_->nplet) {
stem_p_->flag = stem_req_l_->balltype;
if (beam_p_) {
- beam_p_->add(stem_p_);
+ if (stem_req_l_->balltype<= 4)
+ warning( "stem doesn't fit in Beam.",
+ stem_req_l_->defined_ch_c_l_m);
+ else
+ beam_p_->add(stem_p_);
stem_p_->print_flag = false;
} else {
stem_p_->print_flag = true;
Stem_beam_register::do_pre_move_process()
{
if (stem_p_) {
+ if (default_dir_i_)
+ stem_p_->dir = default_dir_i_;
+
walk_l_->typeset_element(stem_p_);
stem_p_ = 0;
}
Stem_beam_register::~Stem_beam_register()
{
if (beam_p_)
- error("unterminated beam");
+ warning("unterminated beam", start_req_l_->defined_ch_c_l_m);
+}
+
+void
+Stem_beam_register::set_dir(int i)
+{
+ default_dir_i_ = i;
+}
+/****************/
+
+Script_register::Script_register(Complex_walker*w)
+ : Request_register(w)
+{
+ script_p_ = 0;
+}
+
+bool
+Script_register::try_request(Request *r_l)
+{
+ if (!r_l->script())
+ return false ;
+
+ if (accepted_req_arr_.size()
+ && Script_req::compare(
+ *accepted_req_arr_[0]->script(), *r_l->script()))
+
+ return false;
+
+ accepted_req_arr_.push(r_l);
+
+ return true;
+}
+void
+Script_register::process_request()
+{
+ if (accepted_req_arr_.size() ) {
+ script_p_ = new Script(accepted_req_arr_[0]->script(), 10);
+ walk_l_->announce_element(
+ Staff_elem_info(script_p_, accepted_req_arr_[0], this));
+ }
+}
+
+void
+Script_register::acknowledge_element(Staff_elem_info info)
+{
+ if (!script_p_)
+ return;
+ if (info.elem_p_->name() == String("Stem"))
+ script_p_->set_stem((Stem*)info.elem_p_);
+ else if (info.req_l_->rhythmic())
+ script_p_->set_support(info.elem_p_->item());
+}
+
+void
+Script_register::do_pre_move_process()
+{
+ if (script_p_){
+ walk_l_->typeset_element(script_p_);
+ script_p_ = 0;
+ }
+}
+/******************/
+
+
+Text_register::Text_register(Complex_walker*w)
+ : Request_register(w)
+{
+ text_p_ = 0;
+}
+
+bool
+Text_register::try_request(Request*req_l)
+{
+ if (!req_l->text())
+ return false;
+ if (accepted_req_arr_.size() &&
+ Text_req::compare(*req_l->text(), *accepted_req_arr_[0]->text()))
+
+ return false;
+
+ accepted_req_arr_.push(req_l);
+ return true;
+}
+
+void
+Text_register::process_request()
+{
+
+ if (accepted_req_arr_.size()) {
+ text_p_ = new Text_item(accepted_req_arr_[0]->text(), 10);
+ walk_l_->announce_element(Staff_elem_info(text_p_,
+ accepted_req_arr_[0], this));
+ }
+}
+void
+Text_register::do_pre_move_process()
+{
+ if (text_p_) {
+ walk_l_->typeset_element(text_p_);
+ text_p_ = 0;
+ }
}
}
Array<int>
-get_default_grouping(int count)
+get_default_grouping(int count, int one_beat_note)
{
Array<int> s;
if (!(count % 3 )) {
- for (int i=0; i < count/3; i++)
+ for (int i=0; i < count/3; i++) {
s.push(3);
+ s.push(one_beat_note);
+ }
} else if (!(count %2)) {
- for (int i=0; i < count/2; i++)
+ for (int i=0; i < count/2; i++) {
s.push(2);
+ s.push(one_beat_note);
+ }
+
}else {
s.push(2);
- s.concat(get_default_grouping(count-2));
+ s.push(one_beat_note);
+ s.concat(get_default_grouping(count-2, one_beat_note));
}
return s;
}
int l = i->args[1];
int o = i->args[2];
tdescription_.set_meter(l,o);
- bottom().add(get_grouping_command( get_default_grouping(l)));
+ bottom().add(get_grouping_command( get_default_grouping(l,o)));
}
}
#include "debug.hh"
#include "inputmusic.hh"
#include "voice.hh"
+#include "request.hh"
void
Simple_music::add(Voice_element*v)
}
Moment
-Simple_music::length()
+Simple_music::length()const
{
return voice_.last();
}
}
Voice_list
-Simple_music::convert()
+Simple_music::convert()const
{
Voice_list l;
l.bottom().add(new Voice(voice_));
for (iter_top(s.elts,i); i.ok(); i++)
add(i->clone());
}
-
+void
+Complex_music::set_default_group(String g)
+{
+ for (iter_top(elts,i); i.ok(); i++)
+ i->set_default_group(g);
+}
/****************************************************************/
void
}
Moment
-Music_voice::length()
+Music_voice::length()const
{
- Moment l = 0.0;
+ Moment l = 0;
for (iter_top(elts,i); i.ok(); i++)
l += i->length();
Voice_list
-Music_voice::convert()
+Music_voice::convert()const
{
Voice_list l;
- Moment here = 0.0;
+ Moment here = 0;
for (iter_top(elts,i); i.ok(); i++) {
Moment len = i->length();
}
Moment
-Music_general_chord::length()
+Music_general_chord::length()const
{
Moment l =0.0;
}
Voice_list
-Music_general_chord::convert()
+Music_general_chord::convert()const
{
Voice_list l;
for (iter_top(elts,i); i.ok(); i++) {
return l;
}
+/****************/
+
+void
+Multi_voice_chord::set_default_group(String g)
+{
+ int j=0;
+ for (iter_top(elts, i); i.ok(); i++) {
+ i->set_default_group(g + String(j));
+ j++;
+ }
+}
+
/****************/
Paperdef* paper_p=new Paperdef(*paper_);
Score *s_p = new Score(paper_p);
s_p->define_spot_str_ = define_spot_str_;
+ s_p->errorlevel_i_ = errorlevel_i_;
Array<Staff*> parsed_staffs;
for (iter_top(staffs_,i); i.ok(); i++) {
Staff* staf_p=i->parse(s_p);
Input_score::Input_score()
{
paper_= 0;
+ errorlevel_i_ = 0;
}
void
#include "melodicstaff.hh"
#include "rhythmstaff.hh"
#include "lyricstaff.hh"
-#include "complexmelodicstaff.hh"
#include "staff.hh"
+#include "complexstaff.hh"
void
Input_staff::add(Array<Input_command*> &s)
{
Staff *p=0;
- if (type == "complex")
- p = new Complex_melodic_staff;
- else if (type == "melodic")
+ if (type == "simple")
p = new Melodic_staff;
+ else if (type == "melodic")
+ p = new Complex_staff;
else if (type == "rhythmic")
p = new Rhythmic_staff;
else if (type == "lyric")
#include "varray.hh"
#include "parser.hh"
#include "debug.hh"
+#include "inputscore.hh"
+#include "main.hh"
%}
PITCHMOD ['`]*{OPTSIGN}
RESTNAME r|s|p
NOTECOMMAND \\{WORD}
-NOTENAME {ALPHAWORD}
+NOTENAME [a-z]+
+UNOTENAME [A-Z][a-z]*
DOTS \.+
LYRICS {TEX}+
COMMENT [%#].*\n
mtor << "rest:"<< yylval.string;
return RESTNAME;
}
+<notes>{UNOTENAME} {
+ int *p=yylval.ii;
+ return ret_notename(p, YYText(), -1);
+}
<notes>{NOTENAME} {
int *p=yylval.ii;
- lookup_notename(p[0], p[1], YYText());
- mtor << "notename: "<< YYText()<<eol;
- if (p[0] < 0) {
- String e("notename does not exist: ");
- error(e + YYText());
- }
- return NOTENAME;
+ return ret_notename(p, YYText(), 0);
}
<notes>{NOTECOMMAND} {
//ignore
}
. {
- error("lexer error: illegal character '"+String(YYText()[0])+
- "' encountered");
+// error( "lexer error: illegal character '"+String(YYText()[0])+ "' encountered");
+ error( String( "illegal character: " ) + String( YYText()[0] ) + ": ",
+ here_ch_c_l() );
return YYText()[0];
}
-#include <fstream.h>
+#include <iostream.h>
+#include <strstream.h>
+#include "proto.hh"
+#include "plist.hh"
#include "lexer.hh"
#include "debug.hh"
#include "main.hh"
+#include "sourcefile.hh"
+#include "source.hh"
My_flex_lexer *lexer=0;
name = s;
line = 1;
String pf(s);
- if (pf=="")
+ if (pf=="") {
is = &cin;
+ sourcefile_l_ = 0;
+ }
else {
- pf =find_file(pf);
- if (pf=="") {
- String e("can\'t open `" + s+"\'");
- error(e);
- }
- is = new ifstream( pf);
+ Source_file* sourcefile_p = new Source_file( pf );
+ source_l->add( sourcefile_p );
+ sourcefile_l_ = sourcefile_p;
+ is = sourcefile_l_->istream_l();
}
cout << "["<<pf<<flush;
}
Input_file::~Input_file()
{
- if (is != &cin)
- delete is;
cout << "]" << flush;
}
#include "tex.hh"
#include "scalar.hh"
-
Lookup::Lookup()
{
texsetting = "\\unknowntexsetting";
#include "staffwalker.hh"
#include "debug.hh"
#include "staff.hh"
-//#include "command.hh"
#include "lyricstaff.hh"
#include "lyriccolumn.hh"
#include "sccol.hh"
#include "pscore.hh"
-//#include "paper.hh"
Lyric_column::Lyric_column(Score_column*s, Lyric_staff* lstaff_l)
Request* req_l = j;
if (req_l->barcheck()) {
if (tdescription_->whole_in_measure) {
- error("Barcheck failed, " + tdescription_->str());
+ error( "Barcheck failed ", req_l->defined_ch_c_l_m );
}
}
if (req_l->lreq_l()) {
#include "molecule.hh"
#include "lookup.hh"
#include "textdef.hh"
+#include "sourcefile.hh"
+#include "source.hh"
+#include "debug.hh"
+#include "main.hh"
Lyric_item::Lyric_item(Lyric_req* lreq_l, int voice_count_i)
: Text_item(lreq_l,0)
Lyric_item::do_pre_processing()
{
// override Text_item
+
+ // test context-error
+ if ( tdef_l_->text_str_.pos( "Gates" ) )// :-)
+ warning( "foul word", tdef_l_->defined_ch_c_l_m );
}
#include <iostream.h>
#include <assert.h>
+#include "proto.hh"
+#include "plist.hh"
#include "lgetopt.hh"
#include "misc.hh"
#include "string.hh"
#include "main.hh"
#include "path.hh"
#include "config.hh"
+#include "sourcefile.hh"
+#include "source.hh"
-extern void parse_file(String s);
+Source source;
+Source* source_l = &source;
+
+extern void parse_file(String,String);
void
0, "warranty", 'w',
0, "help", 'h',
0, "debug", 'd',
+ 1, "init", 'i',
1, "include", 'I',
0,0,0
};
"--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"
;
"Copyright (C) 1996,97 by\n"
" Han-Wen Nienhuys <hanwen@stack.nl>\n"
"Contributors\n"
- " Jan-Nieuwenhuizen <jan@digicash.com>\n"
+ " Jan Nieuwenhuizen <jan@digicash.com>\n"
" Mats Bengtsson <matsb@s3.kth.se>\n"
"\n"
" This program is free software; you can redistribute it and/or\n"
{
Getopt_long oparser(argc, argv,theopts);
cout << get_version();
+ String init_str("symbol.ini");
while (long_option_init * opt = oparser()) {
switch ( opt->shortname){
case 'I':
path->push(oparser.optarg);
break;
+ case 'i':
+ init_str = oparser.optarg;
+ break;
case 'h':
help();
exit(0);
while ( (arg= oparser.get_next_arg()) ) {
String f(arg);
destill_inname(f);
- parse_file(f);
+ parse_file(init_str,f);
do_scores();
p++;
}
if (!p) {
- parse_file("");
+ parse_file(init_str, "");
do_scores();
}
Notehead *n =new Notehead((NO_LINES-1)*2);
n->set_rhythmic(rq->rhythmic());
n->position = rq->note()->height() + bottom;
+ n->defined_ch_c_l_m = rq->defined_ch_c_l_m;
return n;
}
return 0.0;
// stupid Intel: doesn't crash if !dur
- Moment f = 1/Moment(dur);
+ Moment f = Rational(1)/Moment(dur);
Moment delta = f;
while (dots--) {
+#include <strstream.h>
#include "interval.hh"
#include "identparent.hh"
#include "associter.hh"
#include "sstack.hh"
#include "debug.hh"
#include "notename.hh"
+#include "sourcefile.hh"
static Keyword_ent the_key_tab[]={
"bar", BAR,
"mark", MARK,
"meter", METER,
"mm", MM,
+ "multivoice", MULTIVOICE,
"octave", OCTAVECOMMAND,
"output", OUTPUT,
"partial", PARTIAL,
"skip", SKIP,
"staff", STAFF,
"start", START_T,
+ "stem", STEM,
"table", TABLE,
"symboltables", SYMBOLTABLES,
"notenames", NOTENAMES,
"texid", TEXID,
"textstyle", TEXTSTYLE,
- "chord", CHORD,
- "multi", MULTI,
"unitspace", UNITSPACE,
"voice", VOICE,
"voices", VOICES,
0,0
};
+int
+My_flex_lexer::ret_notename(int *p, String text, int octave_mod)
+{
+ text.lower();
+ char const* ch_c_l = here_ch_c_l();
+ ch_c_l--;
+ while ( ( *ch_c_l == ' ' ) || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) )
+ ch_c_l--;
+ ch_c_l++;
+
+ lookup_notename(p[0], p[1], text);
+ p[2] = octave_mod;
+ mtor << "notename: "<< text <<eol;
+ if (p[0] < 0) {
+
+ errorlevel_i_ |= 1;
+ warning( String( "notename does not exist: " ) +YYText() + ": ", ch_c_l );
+ p[0] = p[1] = 0;
+ }
+ return NOTENAME;
+}
+
My_flex_lexer::My_flex_lexer()
{
keytable = new Keyword_table(the_key_tab);
the_id_tab = new Assoc<String, Identifier*>;
defaulttab = 0;
+ data_ch_c_l_m = 0;
+ errorlevel_i_ = 0;
}
int
return (*the_id_tab)[s];
}
+char const*
+My_flex_lexer::here_ch_c_l()
+{
+ return data_ch_c_l_m + yyin->tellg();
+}
+
void
My_flex_lexer::add_identifier(Identifier*i)
{
String
My_flex_lexer::spot()const
{
- return include_stack.top()->name + ": " + lineno();
+ return include_stack.top()->name + ": " + String( lineno() );
}
void
{
if (lexer->include_stack.empty()) {
*mlog << "error at EOF" << s << '\n';
- }else
- *mlog << spot() << ": error:" << s << '\n';
- exit(1);
+ } else {
+ char const* ch_c_l = here_ch_c_l();
+ ch_c_l--;
+ while ( ( *ch_c_l == ' ' ) || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) )
+ ch_c_l--;
+ ch_c_l++;
+ error( s, ch_c_l );
+ }
}
+
// set the new input to s, remember old file.
void
My_flex_lexer::new_input(String s)
Input_file *newin = new Input_file(s);
include_stack.push(newin);
switch_streams(newin->is);
+ data_ch_c_l_m = newin->sourcefile_l_->ch_c_l();
yylineno = 1;
}
-#include <ctype.h>
+/*
+ could use cleanup
+ */
+ #include <ctype.h>
#include "lexer.hh"
#include "string.hh"
#include "real.hh"
#include "identparent.hh"
#include "varray.hh"
#include "textdef.hh"
-
+#include "parseconstruct.hh"
int default_duration = 4, default_dots=0, default_octave=0;
int default_plet_type = 1, default_plet_dur = 1;
String textstyle="roman"; // in lexer?
+bool last_duration_mode = false;
+
+void
+set_duration_mode(String s)
+{
+ s.upper();
+ last_duration_mode = (s== "LAST");
+}
+
+void
+last_duration(int n)
+{
+ if (last_duration_mode)
+ default_duration = n;
+}
+
/* triplet is '2/3' */
void set_plet(int num,int den)
{
t= new Text_def;
t->text_str_= s;
t->style_str_ = textstyle;
+ t->defined_ch_c_l_m = defined_ch_c_l;
return t;
}
v->add(st);
}
+ if ( !defined_ch_c_l )
+ defined_ch_c_l = lexer->here_ch_c_l();
+
Note_req * rq = new Note_req;
int oct;
rq->balltype = dur;
rq->dots = dots;
rq->plet_factor = Moment(default_plet_dur, default_plet_type);
+ rq->defined_ch_c_l_m = defined_ch_c_l;
rq->print();
v->add(rq);
+ v->defined_ch_c_l_m = defined_ch_c_l;
return v;
}
int dur = duration[0];
int dots=duration[1];
+ tdef_p->defined_ch_c_l_m = defined_ch_c_l;
+#if 0
+ char buf[ 21 ];
+ strncpy( buf, tdef_p->defined_ch_c_l_m, 20 );
+ buf[ 20 ] = 0;
+ cout << hex << (void*)tdef_p->defined_ch_c_l_m << dec << buf << endl;
+#endif
Lyric_req* lreq_p = new Lyric_req(tdef_p);
lreq_p->balltype = dur;
void
get_default_duration(int *p)
{
- *p++ = default_duration;
+ *p++ = default_duration;
*p = default_dots;
}
Request*
get_request(char c)
{
- Request* ret=0;
+ Request* req_p=0;
switch (c) {
case '|':
- ret = new Barcheck_req;
+ req_p = new Barcheck_req;
break;
case '[':
Beam_req*b = new Beam_req;
if (default_plet_type != 1)
b->nplet = default_plet_type;
- ret = b;
+ req_p = b;
}
break;
case ')':
case '(':
- ret = new Slur_req;
+ req_p = new Slur_req;
break;
default:
assert(false);
switch (c) {
case '(':
case '[':
- ret->span()->spantype = Span_req::START;
+ req_p->span()->spantype = Span_req::START;
break;
case ')':
case ']':
- ret->span()->spantype = Span_req::STOP;
+ req_p->span()->spantype = Span_req::STOP;
break;
default:
break;
}
- return ret;
+ req_p->defined_ch_c_l_m = req_defined_ch_c_l;
+ return req_p;
}
void
return v_p;
}
+
+Voice_element*
+get_stemdir_element(int d)
+{
+ Voice_element*v_p = new Voice_element;
+ Group_feature_req * gfreq_p = new Group_feature_req;
+ gfreq_p->stemdir_i_ =d;
+ v_p->add(gfreq_p);
+ return v_p;
+}
balltype = 0;
dots = 0;
extremal = 0;
+ defined_ch_c_l_m = 0;
}
void
Notehead::set_rhythmic(Rhythmic_req*r_req_l)
{
balltype = r_req_l->balltype;
dots = r_req_l->dots;
+ if ( r_req_l->defined_ch_c_l_m )
+ defined_ch_c_l_m = r_req_l->defined_ch_c_l_m;
}
void
Array<Request*> pre_reqs, post_reqs;
sstack<String> define_spots;
-extern bool want_beam;
Paperdef*default_paper();
+char const* defined_ch_c_l;
+char const* req_defined_ch_c_l;
%}
Text_def * textdef;
}
-%token VOICE STAFF SCORE TITLE BAR NOTENAME OUTPUT
+%token VOICE STAFF SCORE TITLE BAR OUTPUT MULTIVOICE
%token CM IN PT MM PAPER WIDTH METER UNITSPACE SKIP COMMANDS COMMAND
%token GEOMETRIC START_T DURATIONCOMMAND OCTAVECOMMAND
-%token KEY CLEF MULTI TABLE CHORD VOICES
+%token KEY CLEF TABLE VOICES STEM
%token PARTIAL MUSIC GROUPING CADENZA
%token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET
%token MARK GOTO
%token <id> IDENTIFIER
%token <string> PITCHMOD DURATION RESTNAME
%token <ii> NOTENAME
-%token <real> REAL
+%token <real> REAL
%token <string> STRING
%token <i> DOTS INT
%type <consstr> unit
-%type <intvec> pitch_list
+%type <intvec> pitch_list
%type <c> open_request_parens close_request_parens
%type <id> declaration
%type <string> declarable_identifier
%type <paper> paper_block paper_body
-%type <real> dim
-%type <ii> duration
+%type <real> dim real
+%type <ii> default_duration explicit_duration notemode_duration mudela_duration
+%type <ii> notename
%type <moment> duration_length
%type <el> voice_elt full_element lyrics_elt
%type <command> score_command staff_command position_command
%type <score> score_block score_body
%type <staff> staff_block staff_init staff_body
%type <i> int
-%type <intvec> int_list
+%type <intvec> int_list intastint_list
%type <commandvec> score_commands_block score_commands_body
%type <commandvec> staff_commands_block staff_commands_body
%type <request> post_request pre_request
%%
mudela: /* empty */
- | mudela score_block {
- add_score($2);
+ | mudela score_block {
+ add_score($2);
}
| mudela add_declaration { }
| mudela mudela_command {}
$$ = new Notetab_id(*$1, $3);
delete $1;
}
+ | declarable_identifier '=' real {
+ $$ = new Real_id(*$1, new Real($3));
+ delete $1;
+ }
+ | declarable_identifier error '}' {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
notename_tab:
$$->define_spot_str_ = define_spots.pop();
if (!$$->paper_)
$$->paper_ = default_paper();
+
+ /* handle error levels. */
+ $$->errorlevel_i_ = lexer->errorlevel_i_;
+ lexer->errorlevel_i_ = 0;
}
;
-score_body: { $$ = new Input_score; }
+score_body: {
+ $$ = new Input_score;
+ }
| score_body staff_block { $$->add($2); }
| score_body score_commands_block {
$$->add(*$2);
*/
score_commands_block:
COMMANDS '{' score_commands_body '}' { $$ =$3;}
+ | COMMANDS '{' error '}' {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
score_commands_body: { $$ = new Array<Input_command*>; }
}
;
-duration_length:
- duration {
- $$ = new Moment(wholes($1[0], $1[1]));
- }
- |int '*' duration {
- $$ = new Moment($1 * wholes($3[0], $3[1]));
- }
- ;
-
position_command:
SKIP int ':' duration_length {
$$ = get_skip_command($2, *$4);
}
;
+
+intastint_list:
+ /* */ { $$ =new Array<int>; }
+ | intastint_list int '*' int {
+ $$->push($2); $$->push($4);
+ }
+ ;
+
score_command:
BAR STRING {
$$ = get_bar_command(*$2);
$$ = get_partial_command(*$2);
delete $2;
}
- | GROUPING int_list {
+ | GROUPING intastint_list {
$$ = get_grouping_command(*$2);
delete $2;
}
| paper_body symtables { $$->set($2); }
| paper_body UNITSPACE dim { $$->whole_width = $3; }
| paper_body GEOMETRIC REAL { $$->geometric_ = $3; }
+ | paper_body error {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
/*
staff_body:
staff_init
| staff_body music {
+ $2->set_default_group( "staff_music" + String($$->music_.size()));
$$->add($2);
}
| staff_body staff_commands_block {
$$->add(*$2);
delete $2;
}
+ | staff_body error {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
/*
music_voice: MUSIC '{' music_voice_body '}' { $$ = $3; }
;
-music_voice_body: {
+music_voice_body:
+ /* */ {
$$ = new Music_voice;
}
| music_voice_body IDENTIFIER {
- $$->concatenate($2->mvoice());
+ $$->concatenate($2->mvoice(true));
}
| music_voice_body full_element {
$$->add_elt($2);
| music_voice_body music {
$$->add($2);
}
+ | music_voice_body error {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
music_chord: '{' music_chord_body '}' { $$ = $2; }
;
-music_chord_body: {
- $$ = new Music_general_chord;
+music_chord_body:
+ /* */ {
+ $$ = new Voice_group_chord;
+ }
+ | MULTIVOICE {
+ $$ = new Multi_voice_chord;
}
| music_chord_body IDENTIFIER {
- $$->concatenate($2->mchord());
+ $$->concatenate($2->mchord(true));
}
| music_chord_body music {
$$ -> add($2);
| music_chord_body full_element {
$$ ->add_elt($2);
}
+ | music_chord_body error {
+ warning( "parse error", lexer->here_ch_c_l() );
+ }
;
| COMMAND '{' staff_command '}' { $$=get_command_element($3); }
| COMMAND '{' score_command '}' { $$=get_command_element($3); }
| '|' { $$ = get_barcheck_element(); }
+ | STEM '{' int '}' {
+ $$ = get_stemdir_element($3);
+ }
| lyrics_elt
+/*
++ | pre_requests voice_elt post_requests error '|' {
++ warning( "parse error", lexer->here_ch_c_l() );
++ }
++ */
;
post_requests:
;
post_request:
- close_request_parens { $$ = get_request($1); }
+ close_request_parens {
+ $$ = get_request($1);
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ }
| script_req
| textscript_req
;
close_request_parens:
- '(' { $$='('; }
- |']' { $$=']'; }
+ '(' {
+ $$='(';
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ }
+ | ']' {
+ $$ = ']';
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ }
;
-
+
open_request_parens:
- ')' { $$=')'; }
- |'[' { $$='['; }
+ ')' {
+ $$=')';
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ }
+ | '[' {
+ $$='[';
+ req_defined_ch_c_l = lexer->here_ch_c_l();
+ }
;
script_definition:
;
mudela_text:
- STRING { $$ = get_text(*$1); delete $1; }
+ STRING {
+ $$ = get_text(*$1);
+ delete $1;
+ defined_ch_c_l = lexer->here_ch_c_l();
+ }
;
script_req:
| '>' { $$ = get_scriptdef('>'); }
| '.' { $$ = get_scriptdef('.'); }
| DOTS {
- if ($1>1) error("too many staccato reqs");
+ if ( $1 > 1 )
+ warning( "too many staccato dots", lexer->here_ch_c_l() );
$$ = get_scriptdef('.');
}
;
;
pre_request:
- open_request_parens { $$ = get_request($1); }
+ open_request_parens {
+ $$ = get_request($1);
+ defined_ch_c_l = lexer->here_ch_c_l();
+ }
;
-
-
voice_command:
PLET '{' INT '/' INT '}' {
set_plet($3,$5);
}
- | DURATIONCOMMAND '{' duration '}' {
+ | DURATIONCOMMAND '{' STRING '}' {
+ set_duration_mode(*$3);
+ delete $3;
+ }
+ | DURATIONCOMMAND '{' notemode_duration '}' {
set_default_duration($3);
}
| OCTAVECOMMAND '{' pitchmod '}' {
}
;
-duration: {
- get_default_duration($$);
+duration_length:
+ mudela_duration {
+ $$ = new Moment(wholes($1[0], $1[1]));
}
- | int {
- get_default_duration($$);
+ |int '*' mudela_duration {
+ $$ = new Moment(Rational($1) * wholes($3[0], $3[1]));
+ }
+ ;
+
+notemode_duration:
+ explicit_duration
+ | default_duration
+ ;
+
+mudela_duration:
+ int {
$$[0] = $1;
$$[1] = 0;
}
$$[0] = $1;
$$[1] = $2;
}
+ ;
+
+
+explicit_duration:
+ INT {
+ last_duration($1);
+ $$[0] = $1;
+ $$[1] = 0;
+ }
+ | INT DOTS {
+ last_duration($1);
+ $$[0] = $1;
+ $$[1] = $2;
+ }
| DOTS {
get_default_duration($$);
$$[1] = $1;
}
;
-pitchmod: { $$ = new String; }
- |PITCHMOD
+default_duration:
+ {
+ get_default_duration($$);
+ }
+ ;
+
+pitchmod: {
+ $$ = new String;
+ defined_ch_c_l = lexer->here_ch_c_l();
+ }
+ | PITCHMOD {
+ $$ = $1;
+ defined_ch_c_l = lexer->here_ch_c_l();
+ }
+ ;
+
+notename:
+ NOTENAME
;
voice_elt:
- pitchmod NOTENAME duration {
+ pitchmod notename notemode_duration {
$$ = get_note_element(*$1, $2, $3);
delete $1;
}
- | RESTNAME duration {
+ | RESTNAME notemode_duration {
$$ = get_rest_element(*$1, $2);
delete $1;
;
lyrics_elt:
- mudela_text duration {
+ mudela_text notemode_duration {
$$ = get_word_element($1, $2);
};
;
int:
- REAL {
+ real {
$$ = int($1);
if ( distance($1,Real(int($$)) ) > 1e-8)
- error("expecting integer number");
+ error( "integer expected", lexer->here_ch_c_l() );
}
- | INT
;
-int_list:
- /* */ {
+real:
+ INT {
+ $$ = Real($1);
+ }
+ | REAL {
+ $$ = $1;
+ }
+ | IDENTIFIER {
+ $$ = * $1->real(0);
+ }
+ ;
+
+
+int_list: {
$$ = new Array<int>;
}
| int_list int {
}
;
+
dim:
- REAL unit { $$ = convert_dimen($1,$2); }
+ real unit { $$ = convert_dimen($1,$2); }
;
%%
void
-parse_file(String s)
+parse_file(String init, String s)
{
*mlog << "Parsing ... ";
lexer = new My_flex_lexer;
lexer->set_debug( !monitor.silence("InitLexer") && check_debug);
#endif
- lexer->new_input("symbol.ini");
+ lexer->new_input(init);
yyparse();
#ifdef YYDEBUG
elem_p_ = s_l;
voice_l_ = r_l->elt_l_->voice_l_;
req_l_ = r_l;
- group = 0;
+ group_regs_l_ = 0;
origin_reg_l_ = reg_l;
}
Staff_elem_info::Staff_elem_info()
{
elem_p_ = 0;
voice_l_ = 0;
- group = 0;
+
+ group_regs_l_ = 0;
origin_reg_l_ = 0;
req_l_ = 0;
}
if (!key_item_p_) {
- key_item_p_ = new Local_key_item(-2);
+ key_item_p_ = new Local_key_item(walk_l_->clef_.c0_pos);
key_item_p_->c0_position = walk_l_->clef_.c0_pos;
}
void
Stem_req::do_print() const
{
- Rhythmic_req::do_print();
+ Rhythmic_req::do_print();
+ mtor << "dir : " << dir_i_;
}
Stem_req::Stem_req(int s, int d)
: Rhythmic_req(s,d)
{
+ dir_i_ = 0;
}
/****************/
Request::Request()
{
elt_l_ = 0;
+ defined_ch_c_l_m = 0;
}
Request::Request(Request const&)
{
elt_l_ = 0;
+ defined_ch_c_l_m = 0;
}
/****************/
Melodic_req::Melodic_req()
spantype = NOSPAN;
}
/****************/
+void
+Group_feature_req::do_print() const
+{
+ mtor << "stemdir " << stemdir_i_;
+}
+Group_feature_req::Group_feature_req()
+{
+ stemdir_i_ = 0;
+}
+void
+Group_change_req::do_print()const
+{
+ mtor << "id : " << newgroup_str_;
+}
+void
+Terminate_voice_req::do_print()const
+{
+}
+/****************/
Script_req::Script_req(int d , Script_def*def)
{
- dir = d;
- scriptdef = def;
+ dir_i_ = d;
+ scriptdef_p_ = def;
+}
+
+int
+Script_req::compare(const Script_req &d1, const Script_req &d2)
+{
+ return d1.dir_i_ == d2.dir_i_ &&
+ d1.scriptdef_p_->compare(*d2.scriptdef_p_);
}
Script_req::Script_req(Script_req const &s)
{
- dir = s.dir;
- scriptdef = new Script_def(*s.scriptdef);
+ dir_i_ = s.dir_i_;
+ scriptdef_p_ = new Script_def(*s.scriptdef_p_);
}
void
Script_req::do_print() const
{
- mtor << " dir " << dir ;
- scriptdef->print();
+ mtor << " dir " << dir_i_ ;
+ scriptdef_p_->print();
}
Script_req::~Script_req()
{
- delete scriptdef;
+ delete scriptdef_p_;
}
/****************/
-
+int
+Text_req:: compare(const Text_req &r1, const Text_req &r2)
+{
+ bool b1 = (r1.dir_i_ == r2.dir_i_);
+ bool b2 = (r1.tdef_p_ ->compare(*r2.tdef_p_));
+ return b1 && b2;
+}
Text_req::~Text_req()
{
delete tdef_p_;
{
pscore_p_=0;
paper_p_ = p; // ?? safe?
+ errorlevel_i_ = 0;
}
Score::~Score()
if (paper_p_->outfile=="")
paper_p_->outfile = s;
+ if ( errorlevel_i_ ) {
+ *mlog << "lilypond: warning: no output to: " << paper_p_->outfile
+ << " (errorlevel=" << errorlevel_i_ << ")" << endl;
+ return;
+ }
+
*mlog << "output to " << paper_p_->outfile << "...\n";
Tex_stream the_output(paper_p_->outfile);
score_array_global.push(s);
}
+#if 0
+Input_score*
+current_iscore_l()
+{
+ if ( score_array_global.size() )
+ return score_array_global.last(); // UGH
+ else
+ return 0;
+}
+#endif
void
set_default_output(String s)
Script::Script(Script_req* rq, int staflen)
{
staffsize =staflen;
- specs_l_ = rq->scriptdef;
+ specs_l_ = rq->scriptdef_p_;
stem_l_ = 0;
pos = 0;
symdir=1;
- dir =rq->dir;
+ dir =rq->dir_i_;
}
void
mtor << "idx: " << symidx;
mtor << "direction, stem: " << stemdir << " staff : " << staffdir;
}
+int
+Script_def::compare(Script_def const & c)
+{
+ return (symidx == c.symidx &&
+ stemdir == c.stemdir&&
+ staffdir == c.staffdir&&
+ invertsym == c.invertsym);
+}
Request *rq= j;
if (rq->barcheck()) {
if (tdescription_->whole_in_measure) {
- error("Barcheck failed, " + tdescription_->str());
+// error("Barcheck failed, " + tdescription_->str());
+ error( "Barcheck failed", rq->defined_ch_c_l_m );
}
}
if (rq->rhythmic()){
#include "slur.hh"
#include "localkeyitem.hh"
#include "textitem.hh"
-
+#include "misc.hh"
Rhythmic_grouping
-parse_grouping(Array<Scalar> a, Moment one_beat)
+parse_grouping(Array<Scalar> const &a)
{
Array<int> r;
- for (int i= 0 ; i < a.size(); i++)
- r.push(a[i]);
- Moment here =0.0;
+ Array<Moment> grouplen_arr;
+ for (int i= 0 ; i < a.size()/2; ) {
+ r.push(a[i++]);
+ grouplen_arr.push(Moment(1,(int) a[i++]));
+ }
+ Moment here =0;
Array<Rhythmic_grouping*> children;
for (int i=0; i < r.size(); i++) {
Moment last = here;
- here += one_beat * r[i];
+ here += grouplen_arr[i] * Rational(r[i]);
children.push(
- new Rhythmic_grouping(MInterval(last, here), r[i] )
- );
+ new Rhythmic_grouping(MInterval(last, here), r[i] ));
}
return Rhythmic_grouping(children);
}
+
+
void
Simple_walker::do_INTERPRET_command(Command*com)
{
Array<Scalar> args(com->args);
args.del(0);
if (com->args[0] == "GROUPING") {
- default_grouping = parse_grouping(args,
- col()->tdescription_->one_beat);
+ default_grouping = parse_grouping(args);
}else if (com->args[0] == "NEWMEASURE") {
local_key_.reset(key_);
if (c->beam_ && c->beam_->spantype == Span_req::START) {
if (beam_)
- error("Too many beams (t = "
- +String(c->when())+")");
+ error("Too many beams (t = " +String(c->when())+")");
beam_ = new Beam;
assert(!current_grouping);
current_grouping = new Rhythmic_grouping;
if (sl->spantype == Span_req::START) {
if (find_slur(sl->elt_l_->voice_l_)>=0)
- error_t("Too many slurs in voice", *col()->tdescription_);
+ error( "Too many slurs in voice", sl->defined_ch_c_l_m );
pending_slur_reqs.push(sl);
pending_slurs.push(new Slur);
}
if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
if (!beam_) {
- error_t("No beam to end", *col()->tdescription_);
+ error( "No beam to end", c->beam_->defined_ch_c_l_m );
}
default_grouping.extend(current_grouping->interval());
beam_->set_grouping(default_grouping, *current_grouping);
if (sl->spantype == Span_req::STOP) {
int idx = find_slur(sl->elt_l_->voice_l_);
if (idx < 0)
- error_t("can't find slur to end; ", *c->tdescription_);
+ error( "can't find slur end", sl->defined_ch_c_l_m );
pscore_l_->typeset_spanner(pending_slurs[idx],
s->theline_l_);
--- /dev/null
+//
+// source.cc
+//
+
+#include <assert.h>
+
+#include "string.hh"
+#include "proto.hh"
+#include "plist.hh"
+
+#include "sourcefile.hh"
+#include "source.hh"
+
+Source::Source()
+{
+}
+
+Source::~Source()
+{
+}
+
+void
+Source::add( Source_file* sourcefile_p )
+{
+ sourcefile_p_iplist_m.bottom().add( sourcefile_p );
+}
+
+Source_file*
+Source::sourcefile_l( char const* ch_c_l )
+{
+ PCursor<Source_file*> sourcefile_p_pcur( sourcefile_p_iplist_m.top() );
+ for ( ; sourcefile_p_pcur.ok(); sourcefile_p_pcur++ )
+ if ( sourcefile_p_pcur->in_b( ch_c_l ) )
+ return *sourcefile_p_pcur;
+ return 0;
+}
--- /dev/null
+//
+// sourcefile.cc
+//
+
+#include <sys/types.h> // open, mmap
+#include <sys/stat.h> // open
+#include <sys/mman.h> // mmap
+#include <limits.h> // INT_MAX
+#include <fcntl.h> // open
+#include <unistd.h> // close, stat
+#include <stdio.h> // fdopen
+#include <string.h> // strerror
+#include <errno.h> // errno
+#include <assert.h>
+#include <strstream.h>
+
+#include "string.hh"
+#include "proto.hh"
+#include "plist.hh"
+#include "main.hh" // find_file
+
+#include "sourcefile.hh"
+
+Source_file::Source_file( String &filename_str )
+{
+ data_caddr_m = 0;
+ fildes_i_m = 0;
+ size_off_m = 0;
+ name_str_m = filename_str;
+ istream_p_m = 0;
+
+ open();
+ map();
+ filename_str = name_str_m;
+}
+
+Source_file::~Source_file()
+{
+ delete istream_p_m;
+ istream_p_m = 0;
+ unmap();
+ close();
+}
+
+char const*
+Source_file::ch_c_l()
+{
+ return (char const*)data_caddr_m;
+}
+
+void
+Source_file::close()
+{
+ if ( fildes_i_m ) {
+ ::close( fildes_i_m );
+ fildes_i_m = 0;
+ }
+}
+
+String
+Source_file::error_str( char const* pos_ch_c_l )
+{
+ if ( !in_b( pos_ch_c_l ) )
+ return "";
+
+ char const* begin_ch_c_l = pos_ch_c_l;
+ char const* data_ch_c_l = ch_c_l();
+ while ( begin_ch_c_l > data_ch_c_l )
+ if ( *--begin_ch_c_l == '\n' ) {
+ begin_ch_c_l++;
+ break;
+ }
+
+ char const* end_ch_c_l = pos_ch_c_l;
+ while ( end_ch_c_l < data_ch_c_l + size_off_m )
+ if ( *end_ch_c_l++ == '\n' ) {
+ break;
+ }
+ end_ch_c_l--;
+
+// String( char const* p, int size ) is missing!?
+// String line_str( begin_ch_c_l, end_ch_c_l - begin_ch_c_l );
+
+ int size_i = end_ch_c_l - begin_ch_c_l;
+ char* ch_p = new char[ size_i ];
+ strncpy( ch_p, begin_ch_c_l, size_i );
+ ch_p[ size_i ] = 0;
+ String line_str( ch_p );
+ delete ch_p;
+
+ int error_col_i = 0;
+ char const* scan_ch_c_l = begin_ch_c_l;
+ while ( scan_ch_c_l < pos_ch_c_l )
+ if ( *scan_ch_c_l++ == '\t' )
+ error_col_i = ( error_col_i / 8 + 1 ) * 8;
+ else
+ error_col_i++;
+
+ String str = line_str.left( pos_ch_c_l - begin_ch_c_l )
+ + String( '\n' )
+ + String( ' ', error_col_i )
+ + line_str.mid( pos_ch_c_l - begin_ch_c_l + 1, INT_MAX ); // String::mid should take 0 arg..
+ return str;
+}
+
+bool
+Source_file::in_b( char const* pos_ch_c_l )
+{
+ return ( pos_ch_c_l >= ch_c_l() ) && ( pos_ch_c_l < ch_c_l() + size_off_m );
+}
+
+istream*
+Source_file::istream_l()
+{
+ assert( fildes_i_m );
+ if ( !istream_p_m )
+ istream_p_m = new istrstream( ch_c_l(), size_off_m );
+ return istream_p_m;
+}
+
+int
+Source_file::line_i( char const* pos_ch_c_l )
+{
+ if ( !in_b( pos_ch_c_l ) )
+ return 0;
+
+ int i = 0;
+ char const* scan_ch_c_l = ch_c_l();
+ while ( scan_ch_c_l < pos_ch_c_l )
+ if ( *scan_ch_c_l++ == '\n' )
+ i++;
+ return i;
+}
+
+void
+Source_file::map()
+{
+ data_caddr_m = (caddr_t)mmap( (void*)0, size_off_m, PROT_READ, MAP_FILE | MAP_SHARED, fildes_i_m, 0 );
+
+ if ( (int)data_caddr_m == -1 ) {
+ cerr << "lilypond: can't map: " << name_str_m << ": " << strerror( errno ) << endl;
+ assert( 0 );
+ }
+}
+
+String
+Source_file::name_str()
+{
+ return name_str_m;
+}
+
+void
+Source_file::open()
+{
+ name_str_m = find_file( name_str_m );
+ fildes_i_m = ::open( name_str_m, O_RDONLY );
+
+ if ( fildes_i_m == -1 ) {
+ cerr << "lilypond: can't open: " << name_str_m << ": " << strerror( errno ) << endl;
+ assert( 0 );
+ }
+
+ struct stat file_stat;
+ fstat( fildes_i_m, &file_stat );
+ size_off_m = file_stat.st_size;
+}
+
+void
+Source_file::unmap()
+{
+ if ( data_caddr_m ) {
+ munmap( data_caddr_m, size_off_m );
+ data_caddr_m = 0;
+ size_off_m = 0;
+ }
+}
Staff_column *s_l=get_col(now,true);
s_l->add(j);
now += j->duration;
- }
+ }
+
}
set_time_descriptions();
}
PCursor<Command*> last)
{
PCursor<Command*> c(firstc+1);
- assert(firstc < last&&last.ok());
+// assert(firstc < last&&last.ok());
+ assert(firstc->code < last->code && last.ok());
- while (c < last) {
+// while (c < last) {
+ while (c->code < last->code ) {
if (c->priority <= victim.priority) {
c.insert(new Command(victim));
return;
{
// todo: margins
- assert((dir > 0 && se >= maxnote) || (se <= minnote && dir <0));
+ if (! ((dir > 0 && se >= maxnote) || (se <= minnote && dir <0)) )
+ WARN << "Weird stem size; check for narrow beams.\n";
top = (dir < 0) ? maxnote : se;
bot = (dir < 0) ? se : minnote;
}
+int
+Stem::get_default_dir()
+{
+ if (dir)
+ return dir;
+ Real mean = (minnote+maxnote)/2;
+ return (mean > staff_center) ? -1: 1;
+}
void
Stem::set_default_dir()
{
- Real mean = (minnote+maxnote)/2;
- dir = (mean > staff_center) ? -1: 1;
+ dir = get_default_dir();
}
-
void
Stem::set_default_stemlen()
{
#include "inputcommands.hh"
#include "molecule.hh"
#include "staffcommands.hh"
+#include "sourcefile.hh"
#include "plist.tcc"
IPL_instantiate(Staff_commands_at);
IPL_instantiate(Input_staff);
IPL_instantiate(Input_music);
+IPL_instantiate(Source_file);
+#include "proto.hh"
#include "list.tcc"
#include "cursor.tcc"
#include "plist.tcc"
IPL_instantiate(Voice_registers);
+IPL_instantiate(Voice_group_registers);
slope_index(Real &s)
{
if (abs(s) > 0.5) {
- WARN << "beam steeper than 0.5";
+ WARN << "beam steeper than 0.5\n";
s = sign(s) * 0.5;
}
idx += 128;
- f+=String( "{" ) + idx + "}";
+ f+=String( "{" ) + String( idx ) + "}";
s.tex = f;
Atom a(s);
a.translate(Offset(dx/2,0));
if (xpart < 0)
idx += 128;
- f+=String( "{" ) + idx + "}";
+ f+=String( "{" ) + String( idx ) + "}";
s.tex = f;
s.dim.x = Interval(0,dx);
s.dim.y = Interval(min(0,dy), max(0,dy));
- String f = String("\\slurchar") + direction_char(y_sign);
+ String f = String("\\slurchar") + String( direction_char(y_sign) );
int idx=-1;
if (y_sign) {
idx += 54;
}
- f+=String( "{" ) + idx + "}";
+ f+=String( "{" ) + String( idx ) + "}";
s.tex = f;
Atom a(s);
{
align_i_ = 1; // right
style_str_ = "roman";
+ defined_ch_c_l_m = 0;
+}
+bool
+Text_def::compare(const Text_def&def)
+{
+ return align_i_ == def.align_i_ && text_str_ == def.text_str_
+ && style_str_ == def.style_str_;
}
Atom
Time_description::str()const
{
String s( "Time_description { ");
- s+=String( " cadenza: ") + cadenza_b_ + " at ";
+ if (cadenza_b_)
+ s+=String( " (cadenza) ");
+ s+= "at ";
s+=when;
- s+="\nmeter " + String(whole_per_measure/one_beat) +":" +(1/one_beat);
+ s+="\nmeter " + String(whole_per_measure/one_beat) +":" +
+ String(Rational(1/one_beat));
s+= "\nposition "+String( bars) + ":"+ whole_in_measure +"\n}\n";
return s;
}
Time_description::Time_description(Moment dt, Time_description const *prev)
{
if (prev) {
- assert(dt >= 0);
+ assert(dt >= Rational(0));
*this = *prev;
when += dt;
whole_in_measure += dt;
Time_description::set_meter(int l, int o)
{
assert(o);
- one_beat = 1/Moment(o);
+ one_beat = Rational(1)/Moment(o);
whole_per_measure = Moment(l) * one_beat;
if(whole_in_measure)
error_t("Meterchange should be at start of measure", *this);
{
if (when)
error_t ("Partial measure only allowed at beginning.", *this);
- if (p<0||p > whole_per_measure)
+ if (p<Rational(0)||p > whole_per_measure)
error_t ("Partial measure has incorrect size", *this);
whole_in_measure = whole_per_measure - p;
}
#include "voice.hh"
#include "request.hh"
+void
+Voice::set_default_group(String s)
+{
+ elts.top()->set_default_group(s);
+}
+
Voice::Voice(Voice const&src)
{
for (iter_top(src.elts, i); i.ok(); i++)
Voice_element::Voice_element()
{
voice_l_ = 0;
-// group = 0;
- duration = 0.0;
+ duration = 0;
+ defined_ch_c_l_m = 0;
}
Voice_element::Voice_element(Voice_element const&src)
{
+ defined_ch_c_l_m = src.defined_ch_c_l_m;
+ // are you sure? They can be modified after copying.
voice_l_=0;
for (iter_top(src.reqs, i); i.ok(); i++)
add(i->clone());
-// group=src.group;
+
+}
+void
+Voice_element::set_default_group(String s)
+{
+ for (iter_top(reqs, i); i.ok(); i++)
+ if (i->groupchange())
+ return ;
+ Group_change_req *greq = new Group_change_req;
+ greq->newgroup_str_ = s;
+ add(greq);
}
#include "voicegroup.hh"
#include "register.hh"
-Voice_group_registers::Voice_group_registers(Complex_walker*w_l)
- : //text_reg_(w_l),
- stem_beam_reg_(w_l)
-//, script_reg_(w_l),
- // stem_reg_(w_l)
+static int temp_id_count;
+
+Voice_group_registers::Voice_group_registers(Complex_walker*w_l, String id)
+ : text_reg_(w_l),
+ stem_beam_reg_(w_l),
+ script_reg_(w_l)
{
walk_l_ = w_l;
+ if (id=="")
+ id = __FUNCTION__ + String(temp_id_count++);
+ group_id_str_ = id;
+ dir_i_ = 0;
}
void
Voice_group_registers::pre_move_processing()
{
stem_beam_reg_.pre_move_processing();
-// script_reg_.pre_move_processing();
-// text_reg_.pre_move_processing();
+ script_reg_.pre_move_processing();
+ text_reg_.pre_move_processing();
}
+
void
Voice_group_registers::post_move_processing()
{
stem_beam_reg_.post_move_processing();
+ text_reg_.post_move_processing();
+ script_reg_.post_move_processing();
}
+
bool
Voice_group_registers::try_request(Request*r_l)
{
+ if (r_l->groupfeature()) {
+ dir_i_ = r_l->groupfeature()->stemdir_i_;
+ return true;
+ }
bool b = stem_beam_reg_.try_request(r_l);
-/* if (!b)
- b|= beam_reg_.try_request(r_l);
if (!b)
b|= script_reg_.try_request(r_l);
if (!b)
b|= text_reg_.try_request(r_l);
- */
+
return b;
}
void
Voice_group_registers::announce_element(Staff_elem_info i)
{
-/*
- if (i.group_regs_l_!= this)
+ if (i.group_regs_l_!= this)
return;
- */
+
stem_beam_reg_.acknowledge_element(i);
-// text_reg_.announce_element(i);
- // script_reg_.announce_element(i);
+ script_reg_.acknowledge_element(i);
+ text_reg_.acknowledge_element(i);
}
Voice_group_registers::process_requests()
{
stem_beam_reg_.process_request();
+ if (dir_i_)
+ stem_beam_reg_.set_dir (dir_i_);
+
+ script_reg_.process_request();
+ text_reg_.process_request();
}
+
+bool
+Voice_group_registers::acceptable_request(Request*r)
+{
+ return (r->stem() || r->beam() || r->text() || r->script() ||
+ r->groupfeature());
+}
slur_reg_.process_request();
}
+bool
+Voice_registers::acceptable_request(Request*r)
+{
+ return (r->rest() || r->note() || r->slur());
+
+}
/****************/
Notehead_register::Notehead_register(Complex_walker*w_l)
:Request_register(w_l)
{
- note_l_ = 0;
+ note_p_ = 0;
}
bool
void
Notehead_register::process_request()
{
+ if (!accepted_req_arr_.size())
+ return;
+
Request* req_l = accepted_req_arr_.last();
if (req_l->note()) {
Notehead*n_p = new Notehead(8); // ugh
- note_l_ = n_p;
+ note_p_ = n_p;
n_p->set_rhythmic(req_l->rhythmic());
n_p->position = req_l->note()->height() + -2;
} else {
- note_l_ = new Rest ( req_l->rhythmic()->balltype,
+ note_p_ = new Rest ( req_l->rhythmic()->balltype,
req_l->rhythmic()->dots);
if (req_l->rhythmic()->balltype <= 2)
- note_l_->translate(
+ note_p_->translate(
Offset(0,
- 5 * walk_l_->staff()->paper()->internote()));
+ 6 * walk_l_->staff()->paper()->internote()));
}
- Staff_elem_info itinf(note_l_,req_l,this);
+ Staff_elem_info itinf(note_p_,req_l,this);
walk_l_->announce_element(itinf);
}
void
Notehead_register::do_pre_move_process()
{
- if (note_l_) {
- walk_l_->typeset_element(note_l_);
- note_l_ = 0;
+ if (note_p_) {
+ walk_l_->typeset_element(note_p_);
+ note_p_ = 0;
}
}
-/****************/
/****************/
Slur_register::Slur_register(Complex_walker* w)
end_slur_l_arr_[i]->add(head_p);
}
}
-
+/*
+ abracadabra
+ */
void
Slur_register::process_request()
{
Array<Slur*> start_slur_l_arr_;
for (int i=0; i< accepted_req_arr_.size(); i++) {
Slur_req* slur_req_l = accepted_req_arr_[i]->slur();
+ // end slur: move the slur to other array
if (slur_req_l->spantype == Span_req::STOP) {
if (slur_l_stack_.empty())
- error_t("can't find slur to end; ",
- *walk_l_->col()->tdescription_);
- end_slur_l_arr_.push(slur_l_stack_.pop());
-
+ warning("can't find slur to end; ",
+ slur_req_l->defined_ch_c_l_m);
+ else {
+ end_slur_l_arr_.push(slur_l_stack_.pop());
+ requests_arr_.pop();
+ }
} else if (slur_req_l->spantype == Span_req::START) {
+ // push a new slur onto stack.
+ //(use temp. array to wait for all slur STOPs)
Slur * s_p =new Slur;
+ requests_arr_.push(slur_req_l);
start_slur_l_arr_.push(s_p);
walk_l_->announce_element(Staff_elem_info(s_p, slur_req_l, this));
}
Slur_register::~Slur_register()
{
- if (slur_l_stack_.size())
- error("unterminated slur");
+ for (int i=0; i < requests_arr_.size(); i++) {
+ warning("unterminated slur: ", requests_arr_[i]->defined_ch_c_l_m);
+ }
}
#include "lexer.hh"
#include "moment.hh"
#include "timedescription.hh"
+#include "proto.hh"
+#include "plist.hh"
+#include "sourcefile.hh"
+#include "source.hh"
+#include "main.hh"
ostream &warnout (cerr);
ostream *mlog(&cerr);
error(e);
}
-
void
error_t(const String& s, Time_description const &t_tdes)
{
- String e=s+ " (at t=" + t_tdes.bars + ": " + t_tdes.whole_in_measure + ")\n";
+ String e=s+ " (at t=" + String(t_tdes.bars) + ": " + String(t_tdes.whole_in_measure) + ")\n";
error(e);
}
+
+void
+message( String message_str, char const* context_ch_c_l )
+{
+ String str = "lilypond: ";
+ Source_file* sourcefile_l = source_l->sourcefile_l( context_ch_c_l );
+ if ( sourcefile_l ) {
+ str += sourcefile_l->name_str() + ": ";
+ str += String( sourcefile_l->line_i( context_ch_c_l ) ) + ": ";
+ }
+ str += message_str;
+ if ( sourcefile_l ) {
+ str += "\n";
+ str += sourcefile_l->error_str( context_ch_c_l );
+ }
+ cerr << endl << str << endl;
+}
+
+void
+warning( String message_str, char const* context_ch_c_l )
+{
+ message( "warning: " + message_str, context_ch_c_l );
+}
+
+void
+error( String message_str, char const* context_ch_c_l )
+{
+ message( message_str, context_ch_c_l );
+ exit( 1 );
+}
--- /dev/null
+//
+// windhoos.cc
+//
+#ifdef _WIN32
+
+#include <sys/types.h>
+#include <winbase.h>
+
+/*
+HANDLE CreateFileMapping(
+ HANDLE hFile, // handle to file to map
+ LPSECURITY_ATTRIBUTES lpFileMappingAttributes, // optional security attributes
+ DWORD flProtect, // protection for mapping object
+ DWORD dwMaximumSizeHigh, // high-order 32 bits of object size
+ DWORD dwMaximumSizeLow, // low-order 32 bits of object size
+ LPCTSTR lpName // name of file-mapping object
+ );
+
+
+LPVOID MapViewOfFile(
+ HANDLE hFileMappingObject, // file-mapping object to map into address space
+ DWORD dwDesiredAccess, // access mode
+ DWORD dwFileOffsetHigh, // high-order 32 bits of file offset
+ DWORD dwFileOffsetLow, // low-order 32 bits of file offset
+ DWORD dwNumberOfBytesToMap // number of bytes to map
+ );
+
+*/
+
+caddr_t
+mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+{
+ (void)flags;
+ (void)prot;
+ HANDLE file_handle = CreateFileMapping( fd, (void*)0, PAGE_READONLY,
+ 0, len, 0 );
+ return (caddr_t)MapViewOfFile( file_handle, addr, 0, offset, len );
+}
+
+
+int
+munmap(caddr_t addr, size_t len)
+{
+ (void)len;
+ return UnmapViewOfFile( addr );
+}
+
+#endif // _WIN32 //
+++ /dev/null
-\documentclass{article} %UGH
-\usepackage{a4}
-\begin{document}
-\input lilyponddefs
-\input titledefs
-\def\interscoreline{\vskip12pt}
-\title{St\"andchen}
-\composer{Franz Schubert}
-\instrument{M\"a\ss ig} % heu
-%#%\tempo{M\"a\ss ig}
-\maketit
-\input standchen.uit
-\end{document}