+++ /dev/null
-# class name silence?
-
-My_flex_lexer 1
-yyFlexLexer 1
-PCol 1
-Score_column 1
-Ineq_constrained_qp 1
-Spacing_problem 1
-Colinfo 1
-Mixed_qp 1
-PScore 1
-Idealspacing 1
-
-# yydebug
-InitParser 1
-Parser 1
-InitDeclarations 1
-
-# FlexLexer debug
-InitLexer 1
-Lexer 1
-
-parse_duration 1
-parse_pitchmod 1
-Col_configuration 1
-Request 0
-Note_req 1
-Rhythmic_req 0
-Rest_req 1
-delete_identifiers 1
-Command 1
-Staff_commands 1
-Stem 1
-Staff 0
-Score 1
-Voice 0
-Voice_element 0
-Input_cursor 1
-Commands_at 1
-Input_command 1
-Time_description 1
-Melodic_req 0
-Midi_walker 0
-Stem_req 1
-Group_change_req 0
-Script_req 1
-Colinfo 1
-Word_wrap 1
-Text_req 1
-Script_def 1
-Text_def 1
-Paperdef 1
-Symtable 1
-Symtables 1
\ No newline at end of file
+++ /dev/null
-# Generate.make ?
-
-parsheadorig=$(CCDIR)/parser.tab.h
-parsheadnew=$(HEADERDIR)/parser.hh
-
-#
-# take some trouble to avoid overwriting the old y.tab.h,
-# because otherwise all dependants would be remade.
-$(CCDIR)/parser.cc: $(CCDIR)/parser.y
- $(BISON) -d $<
- mv $(CCDIR)/parser.tab.c $@
- (if diff $(parsheadorig) $(parsheadnew)>/dev/null; then \
- echo Ignoring $(parsheadorig); \
- else \
- mv $(parsheadorig) $(parsheadnew); \
- fi )
-
-$(parsheadnew): $(CCDIR)/parser.cc
-
-$(HEADERDIR)/version.hh: Variables.make make_version
- make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@
-
-$(CCDIR)/%.cc: $(CCDIR)/%.y
- $(BISON) -d $<
- mv $(CCDIR)/$(shell basename $@ .cc ).tab.h $(HEADERDIR)/$(shell basename $@ .cc).hh
- mv $(CCDIR)/$(shell basename $@ .cc ).tab.c $@
-
-$(CCDIR)/%.cc: $(CCDIR)/%.l
- $(FLEX) -t $< > $@
-
+++ /dev/null
-include Variables.make
-
-initdefault: $(CCDIR)/parser.cc $(CCDIR)/lexer.cc hdr/version.hh alldeps
-
-include Generate.make
-
-alldeps: #$(ALLDEPS)
- touch $(DEPDIR)/dummy.dep
-
-#$(DEPDIR)/%.dep: $(CCDIR)/%.cc
-# $(DODEP) $(CXX) -E $(CXXFLAGS) $^ > /dev/null
-
+++ /dev/null
-# Sources.make
-# sourcefiles to be shipped. Also used for dependencies
-
-hdr=bar.hh bar-reg.hh beam.hh\
- binary-source-file.hh\
- boxes.hh break.hh class-name.hh clef-reg.hh clef-item.hh\
- colhpos.hh commandrequest.hh \
- complex-walker.hh complex-staff.hh\
- const.hh debug.hh dimen.hh directional-spanner.hh\
- glob.hh grouping.hh headreg.hh idealspacing.hh\
- identifier.hh identparent.hh \
- input-music.hh input-score.hh input-staff.hh\
- input-file.hh\
- item.hh key.hh key-item.hh\
- key-reg.hh\
- keyword.hh leastsquares.hh lexer.hh linespace.hh \
- local-key-item.hh local-key-reg.hh lookup.hh \
- lyric-item.hh lyricstaff.hh lyricwalker.hh\
- main.hh meter.hh meter-reg.hh\
- midi-def.hh midi-item.hh midi-output.hh midi-stream.hh\
- midi-walker.hh\
- misc.hh\
- molecule.hh moment.hh musicalrequest.hh\
- notehead.hh notename.hh offset.hh paper-def.hh\
- parseconstruct.hh pcol.hh proto.hh\
- pscore.hh pstaff.hh qlp.hh\
- qlpsolve.hh register.hh registergroup.hh reqtodo.hh \
- request.hh rest.hh score-column.hh score.hh\
- scoreline.hh score-walker.hh script.hh script-def.hh script-reg.hh \
- slur.hh slur-reg.hh source.hh source-file.hh\
- spanner.hh staff.hh\
- staff-elem.hh staff-elem-info.hh staffline.hh staffsym.hh stem-beam-reg.hh\
- staff-column.hh stem.hh staff-walker.hh symbol.hh symtable.hh\
- tex.hh text-def.hh \
- textitem.hh text-reg.hh textspanner.hh time-description.hh \
- tex-stream.hh voice.hh\
- voice-element.hh voice-regs.hh voice-group-regs.hh walkregs.hh
-
-mycc=bar.cc bar-reg.cc beam.cc \
- binary-source-file.cc\
- boxes.cc break.cc calcideal.cc clef-reg.cc\
- clef-item.cc colhpos.cc commandrequest.cc\
- complex-staff.cc complex-walker.cc \
- debug.cc dimen.cc\
- directional-spanner.cc\
- grouping.cc groupregs.cc headreg.cc\
- idealspacing.cc identifier.cc\
- input-music.cc input-score.cc\
- input-staff.cc\
- input-file.cc\
- item.cc key.cc key-item.cc \
- key-reg.cc keyword.cc\
- leastsquares.cc lexerinit.cc linespace.cc \
- local-key-item.cc local-key-reg.cc lookup.cc\
- lyric-item.cc lyricstaff.cc lyricwalker.cc\
- main.cc meter.cc meter-reg.cc\
- midi-def.cc midi-item.cc midi-output.cc midi-stream.cc\
- midi-walker.cc misc.cc molecule.cc mylexer.cc note.cc\
- notehead.cc notename.cc\
- paper-def.cc pcol.cc pscore.cc pstaff.cc qlp.cc qlpsolve.cc\
- register.cc registergroup.cc request.cc rest.cc\
- score-column.cc score.cc\
- scoreline.cc scores.cc score-walker.cc script.cc\
- script-def.cc script-reg.cc slur.cc\
- slur-reg.cc source.cc source-file.cc\
- spanner.cc staff.cc\
- staff-elem.cc staffline.cc staffsym.cc\
- stem-beam-reg.cc staff-column.cc stem.cc\
- staff-elem-info.cc staff-walker.cc symbol.cc\
- symtable.cc tex.cc texbeam.cc\
- texslur.cc text-def.cc textitem.cc text-reg.cc textspanner.cc\
- time-description.cc tex-stream.cc voice.cc voiceelt.cc \
- voice-regs.cc voice-group-regs.cc\
- walkregs.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
-
-# a bit of a hack to keep exec size under control.
-stablecc=request.cc bar.cc boxes.cc break.cc \
- item.cc keyword.cc leastsquares.cc \
- molecule.cc meter.cc\
- paper-def.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 tex-stream.cc tex.cc\
- voice.cc wordwrap.cc spanner.cc
-
-
-# m2m headers
-#
-mym2mhh=\
- duration.hh\
- lily-stream.hh\
- midi-event.hh\
- midi-main.hh\
- midi-score.hh\
- midi-track.hh\
- my-midi-lexer.hh\
- my-midi-parser.hh\
- track-column.hh\
-
-#
-
-# m2m shared headers
-#
-mym2msharedhh=\
- binary-source-file.hh\
-
-#
-
-# m2m source
-#
-mym2mcc=\
- duration.cc\
- lily-stream.cc\
- midi-event.cc\
- midi-main.cc\
- midi-score.cc\
- midi-template.cc\
- midi-track.cc\
- my-midi-lexer.cc\
- my-midi-parser.cc\
- track-column.cc\
-
-#
-
-# m2m shared source
-#
-mym2msharedcc=\
- binary-source-file.cc\
- input-file.cc\
- source-file.cc\
- source.cc\
-
-#
-
+++ /dev/null
-# -*-Makefile-*-
-
-# version info
-MAJVER=0
-MINVER=0
-PATCHLEVEL=38
-
-
-
-####
-#### USER CONFIGURABLE
-####
-
-#PROFILEFLAG=-pg
-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 -DSTRING_UTILS_INLINED
-
-#
-# -lefence = ElectricFence.
-#
-# ElectricFence is a memory debugger which uses the
-# VM hardware to trap malloc/free errors.
-#
-
-EXTRALIB+= #-lefence
-
-####
-#### END USER CONFIGURABLE part.
-####
-
-ifdef PROFILEFLAG
- DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
- EXTRALIB+=-pg
-endif
-
-ifndef DEBUGFLAG
- DEFINES+=$(OPTIFLAG)
-else
- DEFINES+=$(DEBUGFLAG)
-endif
-
-
-
-VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
-CXXVER=`$(CXX) --version`
-
-# directories
-TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
-
-OBJECTDIR=objects
-HEADERDIR=hdr
-CCDIR=src
-INITDIR=init
-DEPDIR=deps
-INPUTDIR=input
-
-#
-#
-include Sources.make
-
-# UGH, this sux!
-gencc=parser.cc lexer.cc
-cc=$(mycc) $(gencc)
-mym2mgencc=midi-parser.cc midi-lexer.cc
-m2mcc=$(mym2mcc) $(mym2mgencc) $(mym2msharedcc)
-
-MY_CCSOURCE=$(addprefix $(CCDIR)/, $(mycc))
-CCSOURCE=$(addprefix $(CCDIR)/, $(cc))
-
-obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o))
-m2mobs=$(addprefix $(OBJECTDIR)/,$(m2mcc:.cc=.o))
-
-allcc=$(mycc) $(mym2mcc)
-allobs=$(obs) $(m2mobs)
-allexe=$(exe) $(m2m)
-M2MCCSOURCE=$(addprefix $(CCDIR)/, $(m2mcc))
-ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
-STABLEOBS=$(addprefix $(OBJECTDIR)/,$(stablecc:.cc=.o))
-allhdr=$(hdr) $(mym2mhh)
-HEADERS=$(addprefix $(HEADERDIR)/,$(allhdr))
-progdocs=$(HEADERS) $(MY_CCSOURCE)
-
-#dist
-.EXPORT_ALL_VARIABLES:
-
-DOCDIR=docxx
-
-PACKAGENAME=lilypond
-DNAME=$(PACKAGENAME)-$(VERSION)
-M2MNAME=m2m
-
-# distribution files.
-othersrc=lexer.l parser.y midi-lexer.l midi-parser.y
-SCRIPTS=make_version make_patch genheader clearlily
-MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
- configure
-OFILES=COPYING README NEWS TODO ANNOUNCE
-IFILES= titledefs.tex lilyponddefs.tex \
- ltest.tex test.tex .dstreamrc dimen.tex
-DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
-
-#compiling
-LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB) -lg++
-FLOWERDIR=../flower
-
-CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS)
-FLEX=flex
-BISON=bison
-exe=$(PACKAGENAME)
-m2m=$(M2MNAME)
-OUTPUT_OPTION=$< -o $@
-DDIR=$(TOPDIR)/$(DNAME)
-SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR) $(DEPDIR) \
- $(INPUTDIR)
-
-depfile=deps/$(subst .o,.dep,$(notdir $@))
-DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(OBJECTDIR)/$(notdir $@)"
-
-STRIPDEBUG=true #replace to do stripping of certain objects
-LINKER=$(CXX)
-include Site.make
-
-TAGSACTION=etags -l c++ --no-defines
-
--- /dev/null
+#!/bin/sh
+#
+# project LilyPond -- the musical typesetter
+# title (bash/sh/ksh) script to setup library and auto generated files
+# file bin/configure
+#
+# Copyright (c) 1997 by
+# Han-Wen Nienhuys <hanwen@stack.nl>
+# Jan Nieuwenhuizen <jan@digicash.com>
+#
+
+MAKE=${MAKE:-make}
+NEEDFLOWERVER=1.1.6
+PREFIX=${PREFIX:-.}
+
+
+#############
+#############
+
+# without "function" ok for ksh, bash
+setversion() {
+ eval `sed -n 's/^\([A-Z_]*\)[ ]*=[ ]*\([^ \#]*\).*$/\1=\2/p' $1`
+# NEWVER=$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL
+ NEWVER=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL$MY_PATCH_LEVEL
+ echo
+ echo "Current version ("`pwd`") is:"
+ echo " $NEWVER"
+ echo
+}
+
+do_outdir() {
+ if [ \! -d $1/out ]
+ then
+ mkdir $1/out
+ echo 0 > $1/.build
+ fi
+}
+
+echo using PREFIX=$PREFIX
+echo I need Flower version $NEEDFLOWERVER
+
+flowertar=flower-$NEEDFLOWERVER
+
+#ugh
+do_outdir flower/lib
+do_outdir Documentation
+do_outdir lib
+do_outdir lily
+do_outdir m2m
+
+# mmm
+if [ -x flower ]
+then
+ echo Found flowerdir
+else
+ if [ -d $flowertar ]
+ then
+ ln -fs $flowertar flower
+ elif [ -d ../$flowertar ]
+ then
+ ln -fs ../$flowertar flower
+ else
+ echo "can't find $flowertar"
+ exit 1;
+ fi
+fi
+
+echo Configuring Flower Library
+setversion ./flower/.version
+if [ $NEWVER != $NEEDFLOWERVER ]; then
+ echo "You seem to be having an incorrect version of the Flower library"
+else
+ echo "You got the correct Flower version."
+fi
+
+#ugh
+echo '#define LIBDIR "'$PREFIX'/"'> lib/out/config.hh
+touch flower/lib/out/flower-config.hh
+touch make/Site.make
+$MAKE -C make -f Initial.make
+
+echo "The sources are ready for compiling. "
+echo "To make sure that you don't have any stale dependencies: do"
+echo " make clean"
+
+++ /dev/null
-#!/bin/sh
-
-# unclobber current dir.
-rm -vf *.aux *.log `grep -li "^% Creator: LilyPond" *.out` *.orig *~
-
-# docxx mess
-rm -vf *.class HIER*.html dxxgifs.tex gifs.db icon?.gif logo.gif down.gif \
- aindex.html index.html
#!/bin/sh
+#
+# project LilyPond -- the musical typesetter
+# title (bash/sh/ksh) script to setup library and auto generated files
+# file bin/configure
+#
+# Copyright (c) 1997 by
+# Han-Wen Nienhuys <hanwen@stack.nl>
+# Jan Nieuwenhuizen <jan@digicash.com>
+#
-# script to setup library and auto generated files.
+MAKE=${MAKE:-make}
+NEEDFLOWERVER=1.1.6
+PREFIX=${PREFIX:-.}
+
+
+#############
+#############
-function setversion() {
- eval `sed -n 's/^\([A-Z]*\)=\([p0-9].*\)$/\1=\2/p' Variables.make`
- NEWVER=$MAJVER.$MINVER.$PATCHLEVEL
- echo
- echo "Current version ("`pwd`") is $NEWVER"
- echo
+# without "function" ok for ksh, bash
+setversion() {
+ eval `sed -n 's/^\([A-Z_]*\)[ ]*=[ ]*\([^ \#]*\).*$/\1=\2/p' $1`
+# NEWVER=$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL
+ NEWVER=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL$MY_PATCH_LEVEL
+ echo
+ echo "Current version ("`pwd`") is:"
+ echo " $NEWVER"
+ echo
}
-MAKE=${MAKE:-make}
-PREFIX=${PREFIX:-.}
-NEEDFLOWERVER=1.1.4
+do_outdir() {
+ if [ \! -d $1/out ]
+ then
+ mkdir $1/out
+ echo 0 > $1/.build
+ fi
+}
echo using PREFIX=$PREFIX
echo I need Flower version $NEEDFLOWERVER
flowertar=flower-$NEEDFLOWERVER
-here=`pwd`
-cd ..
+#ugh
+do_outdir flower/lib
+do_outdir Documentation
+do_outdir lib
+do_outdir lily
+do_outdir m2m
+
+# mmm
if [ -x flower ]
then
- echo Found flowerdir
+ echo Found flowerdir
else
-
- if [ ! -d $flowertar ]
- then
- echo "can't find $flowertar"
- exit 1;
- fi
- rm flower
- ln -s $flowertar flower
+ if [ -d $flowertar ]
+ then
+ ln -fs $flowertar flower
+ elif [ -d ../$flowertar ]
+ then
+ ln -fs ../$flowertar flower
+ else
+ echo "can't find $flowertar"
+ exit 1;
+ fi
fi
-echo Compiling Library
-{
- cd flower;
- setversion
- if [ $NEWVER != $NEEDFLOWERVER ]; then
+echo Configuring Flower Library
+setversion ./flower/.version
+if [ $NEWVER != $NEEDFLOWERVER ]; then
echo "You seem to be having an incorrect version of the Flower library"
- else
+else
echo "You got the correct Flower version."
- fi
- $MAKE
-}
-
-cd $here
+fi
-echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh
-touch Site.make
-$MAKE -f Initial.make
+#ugh
+echo '#define LIBDIR "'$PREFIX'/"'> lib/out/config.hh
+touch flower/lib/out/flower-config.hh
+touch make/Site.make
+$MAKE -C make -f Initial.make
echo "The sources are ready for compiling. "
echo "To make sure that you don't have any stale dependencies: do"
echo " make clean"
+
+++ /dev/null
-\font\musicfont=musixsps
-\font\slurfont=xslu16
-\def\thefont{\musicfont}
-
-\def\mb#1{{\thefont\char#1}}
-
-\newdimen\wid
-\newdimen\inc
-\newdimen\here
-\def\hruler#1{%
- \wid=#1pt
- \inc=\wid
- \divide\inc by #1
- \divide\wid by 2
- \here=-\wid
- \loop\ifdim\here<\wid\advance\here by\inc
- \hbox to0pt{\kern\here\vrule width0.05pt height 2pt\hss}%
- \repeat%
-}
-
-\def\vruler#1{%
- \wid=#1pt
- \inc=\wid
- \divide\inc by #1
- \divide\wid by 2
- \here=-\wid
- \loop\ifdim\here<\wid\advance\here by\inc
- \vbox to0pt{\vskip\here\vrule width2pt height 0.05pt\vss}%
- \repeat%
-}
-\def\twhrul{\hbox to 0pt{\hbox{\hruler{20}\vrule
- width0.1pt height 3ptdepth 1pt}}}
-\def\twvrul{\hbox{\vbox to 20pt{\vruler{20}\vrule
- width3pt height 0.1pt}}}
-
-\def\doitem#1{
- #1 %
- %\twvrul%doesn't work
- \hbox to 50pt{\qquad\twhrul\mb{#1}\hss}\setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
-
-\newcount\n
-\def\charn{\n=-1
- \loop\ifnum\n<255\advance\n by1
- \doitem{\number\n}\endgraf\repeat}
-
-
- \charn
-
-\bye
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/perl -w
-
-die "arg needed\n" if (!($#ARGV+1));
-my $fn = $ARGV[0];
-my $hh_q = ($fn =~ /hh$/ );
-my $MAILADRESS=$ENV{MAILADRESS};
-my @pw=(getpwuid($<));
-my $username=$pw[6];
-my $what="implement ";
-$what = "declare " if ($hh_q);
-my $headstr ="/*
- $fn -- $what
-
- source file of the LilyPond music typesetter
-
- (c) 1997 $username <$MAILADRESS>
-*/\n";
-
-my $startdef= $fn;
-$startdef =~ s/[\.-]/_/g;
-$startdef =~ tr/a-z/A-Z/;
-my $terminatestr="\n";
-if ($hh_q) {
- $headstr .= "\n\n#ifndef $startdef\n#define $startdef\n";
- $terminatestr .= "#endif // $startdef\n"
-}
-
-print $headstr, $terminatestr;
-
-
-
--- /dev/null
+/*
+ binary-source-file.cc -- implement Binary_source_file
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Jan Nieuwenhuizen
+*/
+
+
+#include <limits.h> // INT_MAX
+#include <assert.h>
+
+#include "proto.hh"
+#include "plist.hh"
+#include "string.hh"
+#include "debug.hh"
+#include "source-file.hh"
+#include "binary-source-file.hh"
+#include "string-convert.hh"
+
+Binary_source_file::Binary_source_file( String& filename_str )
+ : Source_file( filename_str )
+{
+}
+
+Binary_source_file::~Binary_source_file()
+{
+}
+
+String
+Binary_source_file::error_str( char const* pos_ch_c_l )
+{
+ assert( this );
+ if ( !in_b( pos_ch_c_l ) )
+ return "";
+
+ char const* begin_ch_c_l = pos_ch_c_l - 8 >? ch_c_l();
+ char const* end_ch_c_l = pos_ch_c_l + 7 <? ch_c_l() + length_off();
+
+ String pre_str( (Byte const*)begin_ch_c_l, pos_ch_c_l - begin_ch_c_l );
+ pre_str = String_convert::bin2hex_str( pre_str );
+ for ( int i = 2; i < pre_str.length_i(); i += 3 )
+ pre_str = pre_str.left_str( i ) + " " + pre_str.mid_str( i, INT_MAX );
+ String post_str( (Byte const*)pos_ch_c_l, end_ch_c_l - pos_ch_c_l );
+ post_str = String_convert::bin2hex_str( post_str );
+ for ( int i = 2; i < post_str.length_i(); i += 3 )
+ post_str = post_str.left_str( i ) + " " + post_str.mid_str( i, INT_MAX );
+
+ String str = pre_str
+ + String( '\n' )
+ + String( ' ', pre_str.length_i() + 1 )
+ + post_str;
+ return str;
+}
+
+int
+Binary_source_file::line_i( char const* pos_ch_c_l )
+{
+ if ( !in_b( pos_ch_c_l ) )
+ return 0;
+
+ return pos_ch_c_l - ch_c_l();
+}
+
--- /dev/null
+#define LIBDIR "./"
--- /dev/null
+/*
+ staff-column.cc -- implement Staff_column
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "proto.hh"
+#include "plist.hh"
+#include "staff.hh"
+#include "voice.hh"
+#include "time-description.hh"
+#include "score-column.hh"
+#include "staff-column.hh"
+#include "commandrequest.hh"
+#include "musicalrequest.hh"
+#include "interval.hh"
+#include "pscore.hh"
+#include "item.hh"
+#include "pcol.hh"
+#include "voice-element.hh"
+
+void
+Staff_column::OK() const
+{
+#ifndef NDEBUG
+ assert (command_column_l_->when() == musical_column_l_->when());
+#endif
+}
+
+Moment
+Staff_column::when() const
+{
+ return (command_column_l_)?
+ command_column_l_->when():
+ musical_column_l_->when();
+}
+
+void
+Staff_column::add(Voice_element*ve)
+{
+ for (iter_top(ve->reqs,j); j.ok(); j++) {
+ if (j->command()) {
+ Command_req * c_l = j->command();
+ if (c_l->timing()) {
+ timing_req_l_arr_.push(j->command()->timing());
+ }
+ if (c_l->groupchange())
+ creationreq_l_arr_.push(c_l);
+ else if (!c_l->barcheck() && !c_l->partial() &&
+ !c_l->measuregrouping())
+ setup_one_request(j); // no need to bother children
+ } else {
+ if (j->rhythmic()) {
+ musical_column_l_->add_duration(j->rhythmic()->duration());
+ }
+ if (!j->musical()->skip())
+ setup_one_request(j);
+ }
+ }
+}
+
+Staff_column::Staff_column()
+{
+ musical_column_l_ = 0;
+ command_column_l_ = 0;
+ staff_l_ = 0;
+}
+
+
+
+
+Staff_column::~Staff_column()
+{
+}
+
+void
+Staff_column::set_cols(Score_column*c1, Score_column*c2)
+{
+ command_column_l_ = c1;
+ musical_column_l_ = c2;
+}
+
+void
+Staff_column::setup_one_request(Request * j)
+{
+ if (j->command()) // ugh
+ commandreq_l_arr_.push(j);
+ else if (j->musical())
+ musicalreq_l_arr_.push(j);
+}
+
+void
+Staff_column::typeset_musical_item(Item*i)
+{
+ assert(i);
+ Score_column * scorecolumn_l = musical_column_l_;
+ musical_column_l_->pcol_l_->pscore_l_->typeset_item(i, scorecolumn_l->pcol_l_,
+ staff_l_->pstaff_l_);
+}
+
+/**
+ align items in #item_l_arr#,
+
+ @return the width of the items after aligning.
+ */
+Interval
+align_items(Array<Item*> item_l_arr)
+{
+ Interval wid(0,0);
+ for (int i =0; i < item_l_arr.size(); i++) {
+ Interval item_width= item_l_arr[i]->width();
+ Real dx =wid.right - item_width.left;
+ item_width += dx;
+ item_l_arr[i]->translate(Offset(dx ,0));
+ wid.unite(item_width);
+ }
+ return wid;
+}
+
+void
+translate_items(Real x, Array<Item*> item_l_arr)
+{
+ for (int i =0; i < item_l_arr.size(); i++)
+ item_l_arr[i]->translate(Offset(x, 0));
+}
+/*
+ UGR
+ This still sux
+ */
+void
+Staff_column::typeset_breakable_items(Array<Item *> &pre_p_arr,
+ Array<Item *> &nobreak_p_arr,
+ Array<Item *> &post_p_arr)
+{
+ PCol * c= command_column_l_->pcol_l_;
+ PScore *ps_l=command_column_l_->pcol_l_->pscore_l_;
+
+ if (!c->breakable_b()) {
+ for (int i =0; i < pre_p_arr.size(); i++)
+ delete pre_p_arr[i];
+ pre_p_arr.set_size(0);
+ for (int i =0; i < post_p_arr.size(); i++)
+ delete post_p_arr[i];
+ post_p_arr.set_size(0);
+ }
+
+
+ for (int i =0; i < pre_p_arr.size(); i++) {
+ ps_l->typeset_item(pre_p_arr[i], c, staff_l_->pstaff_l_,0);
+ }
+ for (int i =0; i < nobreak_p_arr.size(); i++) {
+ ps_l->typeset_item(nobreak_p_arr[i], c, staff_l_->pstaff_l_,1);
+ }
+ for (int i =0; i < post_p_arr.size(); i++) {
+ ps_l->typeset_item(post_p_arr[i], c, staff_l_->pstaff_l_,2);
+ }
+
+ Interval pre_wid= align_items(pre_p_arr);
+ translate_items( -pre_wid.right, pre_p_arr);
+ align_items(nobreak_p_arr);
+ Interval post_wid =align_items(post_p_arr);
+ translate_items (-post_wid.left , post_p_arr);
+
+ pre_p_arr.set_size(0);
+ post_p_arr.set_size(0);
+ nobreak_p_arr.set_size(0);
+}
--- /dev/null
+/*
+ staff-walker.cc -- implement Staff_walker
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "grouping.hh"
+#include "staff.hh"
+#include "musicalrequest.hh"
+#include "staff-walker.hh"
+#include "staff-column.hh"
+#include "score-column.hh"
+#include "debug.hh"
+#include "time-description.hh"
+#include "commandrequest.hh"
+#include "grouping.hh"
+#include "score-walker.hh"
+
+Staff_walker::~Staff_walker()
+{
+ do_pre_move();
+}
+
+Staff_walker::Staff_walker(Staff_walker const &s)
+ :PCursor<Staff_column*> (s)
+{
+ assert(false);
+}
+
+Staff_walker::Staff_walker(Staff * s, PScore*ps )
+ : PCursor<Staff_column*> (s->cols_)
+{
+ staff_l_ = s;
+ pscore_l_ = ps;
+
+ // should be in tdes. TODO
+ default_grouping = new Rhythmic_grouping(MInterval(0, 1), 4);
+ score_walk_l_ = 0;
+}
+
+Moment
+Staff_walker::when() const
+{
+ return ptr()->when();
+}
+
+
+void
+Staff_walker::process_timing_reqs()
+{
+ for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
+ Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
+ if (tr_l->meterchange()) {
+ int b_i=tr_l->meterchange()->beats_i_;
+ int o_i = tr_l->meterchange()->one_beat_i_;
+ time_.set_meter(b_i, o_i);
+
+ *default_grouping = Rhythmic_grouping(
+ MInterval(0,Moment(b_i, o_i)), b_i);
+ }
+ }
+
+ for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
+ Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
+ if (tr_l->partial()) {
+ time_.setpartial(tr_l->partial()->duration_);
+ } else if (tr_l->barcheck() && time_.whole_in_measure_) {
+ warning( "Barcheck failed", tr_l->defined_ch_c_l_ );
+ } else if (tr_l->cadenza()) {
+ time_.set_cadenza(tr_l->cadenza()->on_b_);
+ } else if (tr_l->measuregrouping()) {
+ *default_grouping = parse_grouping(
+ tr_l->measuregrouping()->beat_i_arr_,
+ tr_l->measuregrouping()->elt_length_arr_);
+ }
+ }
+ time_.OK();
+}
+
+void
+Staff_walker::operator++(int i)
+{
+ Moment last = when();
+
+ do_pre_move();
+ PCursor<Staff_column*>::operator++(i);
+ if (ok() ) {
+ Moment delta_t = when() - last;
+ assert(delta_t >Moment(0));
+ time_.add( delta_t );
+ }
+ do_post_move();
+}
+
+void
+Staff_walker::process()
+{
+ process_timing_reqs();
+ process_requests();
+}
+
+void
+Staff_walker::allow_break()
+{
+ score_walk_l_->allow_break(this);
+}
+
--- /dev/null
+#include "proto.hh"
+#include "plist.hh"
+#include "staff.hh"
+#include "score.hh"
+#include "voice.hh"
+#include "staff-walker.hh"
+#include "staff-column.hh"
+#include "score-column.hh"
+#include "voice-element.hh"
+#include "debug.hh"
+#include "musicalrequest.hh"
+#include "commandrequest.hh" // todo
+#include "midi-stream.hh"
+
+void
+Staff::add(PointerList<Voice*> const &l)
+{
+ for (iter_top(l,i); i.ok(); i++)
+ voice_list_.bottom().add(i);
+}
+
+Paper_def *
+Staff::paper() const
+{
+ return score_l_->paper_p_;
+}
+
+void
+Staff::clean_cols()
+{
+ iter_top(cols_,i);
+ for(; i.ok(); ){
+ if (!i->musical_column_l_->used_b())
+ i->musical_column_l_ = 0;
+ if (!i->command_column_l_->used_b())
+ i->command_column_l_ =0;
+
+ if (!i->command_column_l_&& !i->musical_column_l_)
+ delete i.remove_p();
+ else
+ i++;
+ }
+}
+
+Staff_column *
+Staff::get_col(Moment w, PCursor<Staff_column*> *last)
+{
+ iter_top(cols_,i);
+ if (last && last->ok() && (*last)->when() <= w)
+ i = *last;
+
+ for (; i.ok(); i++) {
+ if (i->when() == w) {
+ if (last)
+ *last = i;
+ return i;
+ } else if (i->when() > w)
+ break;
+ }
+
+
+ PCursor<Score_column*> scorecolumns(score_l_->find_col(w, false));
+ Staff_column* staffcolumn_p = new Staff_column;
+ staffcolumn_p->staff_l_ = this;
+ Score_column* comcol_l = scorecolumns++;
+ staffcolumn_p->set_cols(comcol_l, scorecolumns);
+
+ if (!i.ok()) {
+ cols_.bottom().add( staffcolumn_p);
+ i = cols_.bottom();
+ } else {
+ i.insert(staffcolumn_p);
+ i--;
+ }
+ if (last)
+ *last = i;
+ return i;
+}
+
+/**
+ put all stuff grouped vertically in the Staff_cols.
+ Do the preprarations for walking the cols. not virtual
+ */
+void
+Staff::setup_staffcols()
+{
+ for (iter_top(voice_list_,i); i.ok(); i++) {
+ PCursor<Staff_column*> last(cols_);
+ Moment now = i->start;
+ for (iter_top(i->elts,j); j.ok(); j++) {
+
+ Staff_column *s_l= get_col(now, &last);
+ assert(now == s_l->when());
+ s_l->add(j);
+ now += j->duration;
+ }
+
+ }
+ OK();
+}
+
+void
+Staff::OK() const
+{
+#ifndef NDEBUG
+ cols_.OK();
+ voice_list_.OK();
+ iter_top(cols_, i);
+ iter_top(cols_, j);
+ i++;
+ for (; i.ok(); j++,i++) {
+ assert(j->when () < i->when() );
+ }
+ assert(score_l_);
+#endif
+}
+
+
+Moment
+Staff::last() const
+{
+ Moment l = 0;
+ for (iter_top(voice_list_,i); i.ok(); i++) {
+ l = l >? i->last();
+ }
+ return l;
+}
+
+void
+Staff::print() const
+{
+#ifndef NPRINT
+ mtor << "Staff {\n";
+ for (iter_top(voice_list_,i); i.ok(); i++) {
+ i->print();
+ }
+ mtor <<"}\n";
+#endif
+}
+
+Staff::Staff()
+{
+ score_l_ =0;
+ pscore_l_ =0;
+ pstaff_l_ =0;
+}
--- /dev/null
+/*
+ time-description.cc -- implement Time_description
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "time-description.hh"
+#include "debug.hh"
+
+String
+Time_description::str()const
+{
+ String s( "Time_description { ");
+ if (cadenza_b_)
+ s+=String( " (cadenza) ");
+ s+= "at ";
+ s+=when_;
+ s+="\nmeter " + String(whole_per_measure_/one_beat_) +":" +
+ String(Rational(Rational(1)/one_beat_));
+ s+= "\nposition "+String( bars_i_) + ":"+ whole_in_measure_ +"\n}\n";
+ return s;
+}
+
+void
+Time_description::print() const
+{
+#ifndef NPRINT
+ mtor << str();
+#endif
+}
+void
+Time_description::OK() const
+{
+#ifndef NDEBUG
+ if (!cadenza_b_)
+ assert(whole_in_measure_ < whole_per_measure_);
+ assert(Moment(0) <= whole_in_measure_);
+ assert(one_beat_);
+#endif
+}
+
+void
+Time_description::set_cadenza(bool b)
+{
+ if (cadenza_b_ && !b) {
+ if (whole_in_measure_) {
+ bars_i_ ++;
+ whole_in_measure_ = 0;
+ }
+ }
+ cadenza_b_ = b ;
+}
+
+Time_description::Time_description()
+{
+ whole_per_measure_ = 1;
+ whole_in_measure_ =0;
+ one_beat_ = Moment(1,4);
+ when_ = 0;
+ bars_i_ = 0;
+ cadenza_b_ = false;
+}
+
+void
+Time_description::add(Moment dt)
+{
+ assert(dt >= Rational(0));
+ when_ += dt;
+ whole_in_measure_ += dt;
+
+ while ( !cadenza_b_ && whole_in_measure_ >= whole_per_measure_ ) {
+ whole_in_measure_ -= whole_per_measure_;
+ bars_i_ ++;
+ }
+}
+
+void
+Time_description::set_meter(int l, int o)
+{
+ assert(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);
+}
+
+void
+Time_description::setpartial(Moment p)
+{
+ if (when_)
+ error_t ("Partial measure only allowed at beginning.", *this);
+ if (p<Rational(0)||p > whole_per_measure_)
+ error_t ("Partial measure has incorrect size", *this);
+ whole_in_measure_ = whole_per_measure_ - p;
+}
+
+Moment
+Time_description::barleft()
+{
+ assert(!cadenza_b_);
+ return whole_per_measure_-whole_in_measure_;
+}
+
+int
+Time_description::compare(Time_description &t1, Time_description&t2)
+{
+ int i = sign(t1.when_-t2.when_);
+
+ if (!i) {
+ assert(t1.bars_i_==t2.bars_i_);
+ assert(t1.one_beat_ == t2.one_beat_);
+ assert(t1.whole_in_measure_ == t2.whole_in_measure_);
+ assert(t1.whole_per_measure_ == t2.whole_per_measure_);
+ }
+
+ return i;
+}
--- /dev/null
+/*
+ voiceelt.cc -- implement Voice_element
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "debug.hh"
+#include "voice.hh"
+#include "voice-element.hh"
+#include "musicalrequest.hh"
+#include "commandrequest.hh"
+
+
+void
+Voice_element::print() const
+{
+#ifndef NPRINT
+ mtor << "voice_element { dur :"<< duration <<"\n";
+ for (iter_top(reqs,rc); rc.ok(); rc++) {
+ rc->print();
+ }
+ mtor << "}\n";
+#endif
+}
+
+void
+Voice_element::add(Request*r)
+{
+ if (r->duration()) {
+ assert (!duration || duration == r->duration());
+ duration = r->duration();
+ }
+
+ r->elt_l_ = this;
+ reqs.bottom().add(r);
+}
+
+
+Voice_element::Voice_element()
+{
+ voice_l_ = 0;
+ duration = 0;
+ defined_ch_c_l_ = 0;
+}
+
+Voice_element::Voice_element(Voice_element const&src)
+{
+ defined_ch_c_l_ = src.defined_ch_c_l_;
+
+ voice_l_=0;
+ for (iter_top(src.reqs, i); i.ok(); i++)
+ add(i->clone());
+
+}
+bool
+Voice_element::find_plet_start_bo(char c, Moment& moment_r)
+{
+ assert( c == ']' );
+ moment_r += duration;
+ for ( PCursor<Request*> req_l_pcur( reqs.top() ); req_l_pcur.ok(); req_l_pcur++ ) {
+ if (req_l_pcur->beam() && req_l_pcur->beam()->spantype == Span_req::START )
+ return true;
+ }
+ return false;
+}
+
+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);
+}
+
+void
+Voice_element::set_plet_backwards(Moment& now_moment_r,
+ Moment until_moment, int num_i, int den_i)
+{
+ now_moment_r += duration;
+ if ( now_moment_r > until_moment )
+ return;
+ for ( PCursor<Request*> req_l_pcur( reqs.top() ); req_l_pcur.ok(); req_l_pcur++ ) {
+ if (req_l_pcur->beam() && req_l_pcur->beam()->spantype == Span_req::START )
+ req_l_pcur->beam()->nplet = den_i;
+ if (req_l_pcur->rhythmic())
+ req_l_pcur->rhythmic()->plet_factor = Moment(num_i, den_i);
+ if (req_l_pcur->stem())
+ req_l_pcur->stem()->plet_factor = Moment(num_i, den_i);
+ }
+}
--- /dev/null
+/*
+ voicegroup.cc -- implement Voice_group_registers
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "musicalrequest.hh"
+#include "voice-regs.hh"
+#include "voice-group-regs.hh"
+#include "register.hh"
+#include "text-reg.hh"
+#include "stem-beam-reg.hh"
+#include "script-reg.hh"
+#include "complex-walker.hh"
+#include "commandrequest.hh"
+#include "debug.hh"
+
+static int temp_id_count;
+
+Voice_group_registers::Voice_group_registers(String id)
+{
+ add(new Text_register);
+ add(new Stem_beam_register);
+ add(new Script_register);
+
+ if (id=="") // UGH
+ id = __FUNCTION__ + String(temp_id_count++);
+ group_id_str_ = id;
+}
+
+bool
+Voice_group_registers::try_request(Request*r_l)
+{
+ for (int i=0; i < voice_regs_l_.size(); i++) {
+ if (voice_regs_l_[i]->voice_l_ == r_l->voice_l())
+ goto gotcha;
+ }
+ return false;
+gotcha:
+ if (r_l->groupfeature()) {
+ set_feature(Features::dir(r_l->groupfeature()->stemdir_i_));
+ return true;
+ }
+ return Register_group_register::try_request(r_l);
+}
+
+
+bool
+Voice_group_registers::static_acceptable_request_b(Request*r)
+{
+ return (r->stem() || r->beam() || r->text() || r->script() ||
+ r->groupfeature());
+}
+
+void
+Voice_group_registers::terminate_register(Request_register*r_l)
+{
+ if (r_l->name() == Voice_registers::static_name()) {
+ for (int i=0; i <voice_regs_l_.size(); i++) {
+ if (r_l == voice_regs_l_[i])
+ voice_regs_l_.del(i);
+ Register_group_register::terminate_register(r_l);
+ return;
+ }
+ }
+ assert(false);
+}
+void
+Voice_group_registers::do_print() const
+{
+#ifndef NPRINT
+ mtor << "ID: " << group_id_str_<<"\n";
+ Register_group_register::do_print();
+#endif
+}
+void
+Voice_group_registers::add(Request_register*r_l)
+{
+ Register_group_register::add(r_l);
+ if (r_l->name() == Voice_registers::static_name())
+ voice_regs_l_.push( (Voice_registers*)r_l );
+}
--- /dev/null
+/*
+ voice-regs.cc -- implement Voice_registers
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "proto.hh"
+#include "plist.hh"
+#include "commandrequest.hh"
+#include "musicalrequest.hh"
+#include "voice-regs.hh"
+#include "register.hh"
+#include "slur-reg.hh"
+#include "headreg.hh"
+#include "walk-regs.hh"
+#include "debug.hh"
+
+Voice_registers::Voice_registers(Voice *v_p)
+{
+ voice_l_ = v_p;
+ add(new Notehead_register);
+ add(new Slur_register);
+}
+
+void
+Voice_registers::acknowledge_element(Staff_elem_info i)
+{
+ if (i.voice_l_ != voice_l_)
+ return;
+ Register_group_register::acknowledge_element(i);
+}
+
+bool
+Voice_registers::try_request(Request*r_l)
+{
+ if (r_l->voice_l() !=voice_l_)
+ return false;
+
+ Command_req *c=r_l->command();
+ if (c&&c->terminate()) {
+ daddy_reg_l_->terminate_register(this);
+ return true; // scary. We're deleted now..
+ } else if (c&&c->groupchange()) {
+
+ ((Walker_registers*)daddy_reg_l_->daddy_reg_l_)-> // scary.
+ change_group(c->groupchange(), this,
+ (Voice_group_registers*)daddy_reg_l_); // UGR!
+ return true;
+ }
+
+ return Register_group_register::try_request(r_l);
+}
+
+bool
+Voice_registers::acceptable_request_b(Request*r)
+{
+// return (r->rest() || r->note() || r->slur() || r->groupchange());
+ return r->groupchange()
+ || Register_group_register::acceptable_request_b(r);
+}
+void
+Voice_registers::do_print() const
+{
+ mtor << "Voice= " << voice_l_<<'\n';
+ Register_group_register::do_print();
+}
--- /dev/null
+/*
+ voice.cc -- implement Voice
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "proto.hh"
+#include "plist.hh"
+#include "debug.hh"
+#include "voice.hh"
+#include "musicalrequest.hh"
+#include "commandrequest.hh"
+#include "midi-item.hh"
+#include "midi-stream.hh"
+#include "voice-element.hh"
+
+void
+Voice::set_default_group(String s)
+{
+ elts.top()->set_default_group(s);
+}
+
+bool
+Voice::find_plet_start_bo(char c, Moment& moment_r)
+{
+ for (iter_bot(elts, i); i.ok(); i--)
+ if ( i->find_plet_start_bo(c, moment_r) )
+ return true;
+ return false;
+}
+
+void
+Voice::set_plet_backwards(Moment& now_moment_r, Moment until_moment,
+ int num_i, int den_i)
+{
+ for (iter_bot(elts, i); i.ok(); i--)
+ if ( now_moment_r <= until_moment )
+ i->set_plet_backwards(now_moment_r, until_moment, num_i, den_i);
+ else
+ return;
+}
+
+Voice::Voice(Voice const&src)
+{
+ for (iter_top(src.elts, i); i.ok(); i++)
+ add(new Voice_element(**i));
+
+ start = src.start;
+}
+
+Voice::Voice()
+{
+ start = 0;
+}
+
+void
+Voice::add(Voice_element*v)
+{
+ v->voice_l_ = this;
+ elts.bottom().add(v);
+}
+
+void
+Voice::print() const
+{
+#ifndef NPRINT
+ mtor << "Voice { start: "<< start<<eol;
+ for (iter_top(elts,i); i.ok(); i++)
+ i->print();
+ mtor << "}\n";
+#endif
+}
+
+Moment
+Voice::last() const
+{
+ Moment l =0;
+ if (elts.size())
+ l = start;
+
+ for (iter_top(elts,i); i.ok(); i++)
+ l += i->duration;
+ return l;
+}
+
+++ /dev/null
-%%
-%% include file for LilyPond
-
-\def\mdef#1#2{\def#1{\mchar{#2}}}
-\def\mchar#1{\musicfnt\char#1}
-\def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3}
-\def\maccentraise#1#2{\dimen0=\noteheight
- \rationalmultiply\dimen0*#2%
- \raise\dimen0\hbox{#1}}
-\def\maccentdef#1#2#3{\def#1{\maccentraise{\mchar{#2}}{#3}}}
-\def\vcenter#1{\vbox to 0pt{\vss #1\vss}}
-
-\def\topalign#1{\vbox to 0pt{#1\vss}}
-\def\botalign#1{\vbox to 0pt{\vss #1}}
-
-\def\centeralign#1{\hbox to 0pt{\hss#1\hss}}
-\def\leftalign#1{\hbox to 0pt{#1\hss}}
-\def\rightalign#1{\hbox to 0pt{\hss#1}}
-
-
-%% musix defs
-\parindent=0pt
-\newdimen\smallspace
-\newdimen\interlinedist
- \newcount\n
- \newdimen\balkhoog
- \newdimen\notewidth
- \newdimen\noteheight
- \newdimen\notewidthhalf
- \newdimen\notewidthdouble
- \newdimen\staffrulethickness
- \newdimen\interstaffrule
-\newdimen\balkhalf
-\def\musixtwentydefs{
- \font\textfont=cmr10
- \font\meterfont=cmbx12
- \font\slurufont=xslu20
- \font\slurdfont=xsld20
- \font\slurhfont=xslz20
- \font\hslurufont=xslhu20
- \font\hslurdfont=xslhd20
- \font\hslurhfont=xslhz20
- \font\musicfnt=musix20
- \font\italicfont=cmti10
- \font\dynfont=cmbxti10 scaled \magstep1
- \balkhoog=20pt
- \notewidth=6pt
- \noteheight=5pt
- \staffrulethickness=0.4pt
- \musixcalc
-}
-
-
-\def\musixsixteendefs{
- \font\textfont=cmr8
- \font\meterfont=cmbx12
- \font\italicfont=cmti8
- \font\slurufont=xslu16
- \font\slurdfont=xsld16
- \font\slurhfont=xslz20 % sigh
- \font\hslurufont=xslhu16
- \font\hslurdfont=xslhd16
- \font\hslurhfont=xslhz20
- \font\musicfnt=musix16
- \font\dynfont=cmbxti10
- \balkhoog=16pt
- \staffrulethickness=0.4pt
- \notewidth=5pt
- \noteheight=4pt
- \musixcalc
-}
-
-\def\musixcalc{
- \interlinedist=\fontdimen5\musicfnt
- \smallspace=.3\interlinedist
- \interstaffrule=\balkhoog
- \advance\interstaffrule by-\staffrulethickness
- \divide\interstaffrule by 4
- \advance\interstaffrule by -\staffrulethickness
- \notewidthhalf=\notewidth
- \notewidthdouble=\notewidth
- \rationalmultiply \notewidthhalf*1/2
- \multiply \notewidthdouble by 2
- \balkhalf=\balkhoog
- \rationalmultiply\balkhalf*1/2
-}
-% \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}}
-\def\slurchard#1{{\slurdfont\char#1}}
-\def\hslurcharh#1{{\hslurhfont\char#1}}
-\def\hslurcharu#1{{\hslurufont\char#1}}
-\def\hslurchard#1{{\hslurdfont\char#1}}
-
-\mdef\quartball{'007}
-\mdef\halfball{'010}
-\mdef\wholeball{'011}
-\mdef\halfrest{'074}
-\mdef\wholerest{'075}
-\mdef\quartrest{62}
-\mdef\eighthrest{63}
-\mdef\sixteenthrest{64}
-\mdef\thirtysecondrest{65}
-\mdef\sharp{52}
-\mdef\flat{50}
-\mdef\natural{54}
-\mdef\sharpsharp{53}
-\mdef\flatflat{51}
-
-\mdef\singledot{'00}
-\mdef\doubledot{'01}
-\mdef\tripledot{'02}
-\mdef\mussepline{155}
-
-\mdef\violinclef{71}
-\mdef\bassclef{73}
-\mdef\altoclef{75}
-\mdef\cviolinclef{72}
-\mdef\cbassclef{74}
-\mdef\caltoclef{76}
-
-\mdef\deigthflag{45}
-\mdef\dsixteenthflag{46}
-\mdef\dthirtysecondflag{47}
-
-% pointing up
-\mdef\ueigthflag{40}
-\mdef\usixteenthflag{41}
-\mdef\uthirtysecondflag{42}
-
-\maccentdef\repeatcolon{55}{2/1}
-\def\emptybar{}
-
-\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
- \vbox to \balkhalf{\vss\meterfont #2}}}
-\def\defaultlineseparator{\vbox{\mussepline\vskip -5pt\mussepline}}
-\def\lineseparator{\defaultlineseparator}
-\def\beauty{%
- \par\vskip 10pt plus 30pt minus 10pt\par
- \hskip -5pt\lineseparator
- \par\vskip 10pt plus 30pt minus 10pt\par
-}
-
-\def\interstaffline{%
- \vskip 10pt
-}
-\def\ugly{\nointerlineskip\par
-\vskip 40pt\par\vbox{\leftalign{\vrule width30pt height1pt}}\par\vskip 40pt
-}
-\def\interscoreline{\beauty}
-
-
-\def\lines#1#2{%
- \vbox{\kern-\interstaffrule
- \n=0\nointerlineskip%
- \loop\ifnum\n<#1\advance\n by1%
- \kern\interstaffrule
- \hrule height \staffrulethickness width#2
- \repeat
- }}
-
-\def\toplines#1{ % why space needed here?
- \topalign{\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}}}
-\def\botlines#1{ % idem ditto
- \botalign{\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}}}
-
-%
-% a staffsymbol with #1 lines, width #2
-% bottom at baseline
-\def\linestafsym#1#2{\leftalign{\botalign{\lines{#1}{#2}}}}
-
-\def\eigthflag{\topalign{\ueigthflag}}
-\def\sixteenthflag{\topalign{\usixteenthflag}}
-\def\thirtysecondflag{\topalign{\uthirtysecondflag}}
-
-\def\cquartrest{\vcenter\quartrest}
-\def\ceighthrest{\vcenter\eighthrest}
-\def\csixteenthrest{\vcenter\sixteenthrest}
-\def\cthirtysecondrest{\vcenter\thirtysecondrest}
-
-\def\lsingledot{\kern-\notewidth\singledot}
-\def\ldoubledot{\kern-\notewidth\doubledot}
-\def\ltripledot{\kern-\notewidth\tripledot}
-
-\maccentdef\sforzato{30}{-3/2}
-\maccentdef\marcato{20}{-1/1}
-\maccentdef\imarcato{21}{1/1}
-\maccentdef\staccato{24}{-1/1}
-\maccentdef\istaccato{25}{1/1}
-\maccentdef\staccatissimo{28}{-1/1}
-\maccentdef\istaccatissimo{29}{1/1}
-\maccentdef\portato{18}{-9/10}
-\maccentdef\iportato{19}{9/10}
-\maccentdef\tenuto{26}{0/1}
-\maccentdef\itenuto{27}{0/1}
-\maccentdef\fermata{80}{-1/1}
-\maccentdef\ifermata{81}{1/1}
-
-
-
-\mdef\spicato{28}
-\mdef\ispicato{29}
-\mdef\upbow{23}
-\mdef\downbow{22}
-\mdef\portato{26}
-
-\def\stem#1#2{\vrule height#2 depth-#1}
-
-\def\placebox#1#2#3{%
- \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}%
-}
-
-
-\def\beamslope#1#2{{\count0=#2\advance\count0 by#1\musicfnt\char\count0}}
-\def\rulesym#1#2{\vrule height #1 width #2}
-\def\crescendosym#1{\count0=84\advance\count0 by #1}
-\def\decrescendosym#1{\count0=116\advance\count0 by #1}
-\def\settext#1{\textfont #1}
-\def\setitalic#1{\italicfont #1}
+++ /dev/null
-% Mats Bengtsson
-\documentclass[a4paper, 10pt]{article}
-
-% Allow for 8-bit characters:
-\usepackage[latin1]{inputenc}
-\usepackage[T1]{fontenc}
-
-\begin{document}
-\input lilyponddefs
-\input titledefs
-
-\def\settext#1{\normalfont #1} % Allow for 8-bit characters
-
-\input lelie.out
-\end{document}
+++ /dev/null
-#!/bin/sh
-
-case $# in
-0) echo make_patch old new name
- exit 1;;
-esac
-
-old=$1
-new=$2
-nm=$3-
-
-newarc=../releases/$nm$new.tar.gz
-oldarc=../releases/$nm$old.tar.gz
-
-
-if [ ! -x $nm$new ]
-then
- echo untarring ..
- if [ ! -f $newarc ]
- then
- echo cant find $newarc
- exit
- fi
- tar zfxv $newarc
-fi
-if [ ! -x $nm$old ]
-then
- echo untarring
-
- if [ ! -f $oldarc ]
- then
- echo cant find oldarc
- exit
- fi
- tar zfxv $oldarc
-fi
-
-#(cd $nm$old; touch depend; make clean)
-#(cd $nm$new; touch depend; make clean)
-(cd $nm$new; diff -urP ../$nm$old . > ../patch-$new)
-rm -rf $nm$old $nm$new
+++ /dev/null
-#!/bin/sh
-echo '#ifndef VERSION_HH'
-echo '#define VERSION_HH'
-echo '#define MAJORVERSION ' $1
-echo '#define MINORVERSION ' $2
-echo '#define PATCHLEVEL ' $3
-echo '#define VERSIONSTR "'$1.$2.$3'"'
-echo '#define COMPILER "'$4'"'
-echo '#endif'
+++ /dev/null
-\input lilyponddefs
-\input lelie.out
-\vfil\bye
\ No newline at end of file
+++ /dev/null
-\def\thetitle{}
-\def\thecomposer{}
-\def\theinstrument{}
-\def\title#1{\def\thetitle{#1}}
-\def\composer#1{\def\thecomposer{#1}}
-\def\instrument#1{\def\theinstrument{#1}}
-
-\def\maketit{
- \begin{center}
- {\Large\bfseries\thetitle}\\
- \vskip12pt
- {\bfseries\theinstrument}\hfill{\scshape\thecomposer}
- \end{center}
- \bigskip
- }
\ No newline at end of file