From 0d2593e4ef1f3d1eb6994223f1de8f6c8fbcd066 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 2 Jun 1997 12:57:42 +0200 Subject: [PATCH] release: 0.0.67 --- .version | 2 +- AUTHORS.text | 2 +- Documentation/INSTALL.pod | 22 ++- Documentation/faq.pod | 13 +- Documentation/index.pod | 23 ++- Documentation/lilyliterature.pod | 11 +- Documentation/mudela.pod | 14 +- INSTALL.text | 28 ++-- NEWS | 27 ++++ TODO | 20 +-- bin/convert-mudela | 8 +- bin/make_website | 18 ++- configure | 92 +++++++----- configure.in | 35 +++-- flower/include/full-storage.hh | 2 +- flower/include/matrix-storage.hh | 2 +- flower/include/virtual-methods.hh | 4 +- init/symbol.ini | 2 +- init/table_sixteen.ini | 5 +- input/cadenza.ly | 4 +- input/collisions.ly | 2 +- input/coriolan-alto.ly | 2 +- input/error.ly | 2 +- input/header.ly | 2 +- input/keys.ly | 2 +- input/kortjakje.ly | 2 +- input/pedal.ly | 2 +- input/rhythm.ly | 6 +- input/scales.ly | 28 ++-- input/scripts.ly | 2 +- input/scsii-menuetto.ly | 2 +- input/slurs.ly | 2 +- input/standchen.ly | 75 +++++----- input/toccata-fuga-E.ly | 34 +++-- input/twinkle.ly | 2 +- input/wohltemperirt.ly | 2 +- lib/Makefile | 9 +- lib/include/input.hh | 2 + ...indhoos-suck-suck-suck-thank-you-cygnus.hh | 6 +- ...indhoos-suck-suck-suck-thank-you-cygnus.cc | 6 +- lily/.version | 5 +- lily/atom.cc | 52 +++++++ lily/beam.cc | 6 - lily/bow.cc | 1 + lily/command-request.cc | 7 +- lily/crescendo.cc | 1 + lily/general-script-def.cc | 70 ++++++++++ lily/head-reg.cc | 4 +- lily/include/atom.hh | 17 +++ lily/include/bar-reg.hh | 2 +- lily/include/bar.hh | 2 +- lily/include/beam.hh | 3 +- lily/include/bow.hh | 2 +- lily/include/clef-item.hh | 2 +- lily/include/clef-reg.hh | 2 +- lily/include/collision-reg.hh | 2 +- lily/include/collision.hh | 2 +- lily/include/command-request.hh | 9 +- lily/include/crescendo.hh | 2 +- lily/include/dynamic-reg.hh | 2 +- lily/include/elem-group.hh | 2 +- lily/include/general-script-def.hh | 37 +++++ lily/include/grouping.hh | 5 +- lily/include/head-reg.hh | 2 +- lily/include/input-music.hh | 7 - lily/include/item.hh | 2 +- lily/include/key-item.hh | 2 +- lily/include/key-reg.hh | 2 +- lily/include/lily-proto.hh | 4 +- lily/include/local-key-item.hh | 4 +- lily/include/local-key-reg.hh | 2 +- lily/include/lyric-register.hh | 2 +- lily/include/meter-reg.hh | 2 +- lily/include/meter.hh | 2 +- lily/include/minterval.hh | 18 +++ lily/include/molecule.hh | 25 +--- lily/include/music.hh | 70 ++++++++++ lily/include/musical-request.hh | 40 ++---- lily/include/note-column-reg.hh | 2 +- lily/include/note-column.hh | 2 +- lily/include/note-head.hh | 3 +- lily/include/parseconstruct.hh | 1 - lily/include/register-group.hh | 2 +- lily/include/register.hh | 2 +- lily/include/request.hh | 33 +++-- lily/include/rest-collision-reg.hh | 2 +- lily/include/rest-collision.hh | 2 +- lily/include/rest-column.hh | 2 +- lily/include/score-elem.hh | 3 +- lily/include/scoreline.hh | 2 +- lily/include/script-column.hh | 2 +- lily/include/script-def.hh | 29 +++- lily/include/script-reg.hh | 2 +- lily/include/script.hh | 10 +- lily/include/slur-reg.hh | 3 +- lily/include/slur.hh | 3 +- lily/include/spanner-elem-group.hh | 3 +- lily/include/spanner.hh | 2 +- lily/include/staff-regs.hh | 2 +- lily/include/staff-sym-reg.hh | 2 +- lily/include/staff-sym.hh | 2 +- lily/include/staffline.hh | 2 +- lily/include/stem-beam-reg.hh | 2 +- lily/include/stem.hh | 2 +- lily/include/super-elem.hh | 2 +- lily/include/swallow-reg.hh | 2 +- lily/include/symbol.hh | 28 ++++ lily/include/text-def.hh | 14 +- lily/include/text-item.hh | 9 +- lily/include/text-reg.hh | 2 +- lily/include/text-spanner.hh | 6 +- lily/include/tie-reg.hh | 2 +- lily/include/tie.hh | 2 +- lily/include/voice-element.hh | 2 - lily/include/voice-group-regs.hh | 2 +- lily/include/voice-regs.hh | 2 +- lily/include/voice.hh | 10 +- lily/input-music.cc | 48 ------- lily/local-key-item.cc | 2 +- lily/local-key-reg.cc | 40 +++--- lily/lookup.cc | 2 +- lily/midi-walker.cc | 5 +- lily/molecule.cc | 50 ++----- lily/music-list.cc | 76 ++++++++++ lily/music.cc | 47 +++++++ lily/musical-request.cc | 42 +++--- lily/note.cc | 16 +-- lily/notehead.cc | 18 ++- lily/p-score.cc | 18 ++- lily/parser.y | 31 +++-- lily/script-def.cc | 76 +++++++++- lily/script-reg.cc | 3 +- lily/script.cc | 33 ++--- lily/slur-reg.cc | 9 +- lily/slur.cc | 12 -- lily/spanner-elem-group.cc | 12 -- lily/staff-column.cc | 7 +- lily/staff-side.cc | 1 + lily/staff-sym.cc | 1 + lily/stem-beam-reg.cc | 36 +++-- lily/super-elem.cc | 1 + lily/template1.cc | 1 - lily/template2.cc | 2 + lily/template3.cc | 9 ++ lily/text-def.cc | 20 ++- lily/text-item.cc | 23 ++- lily/text-spanner.cc | 24 ++-- lily/voice-element.cc | 28 ---- lily/voice.cc | 20 --- make/Configure_variables.make.in | 5 +- make/Files.make | 2 +- make/Rules.make | 2 + make/Targets.make | 21 +-- make/Variables.make | 4 +- make/lilypond.lsm | 6 +- make/lilypond.spec | 9 +- make/lilypond.spec.in | 5 +- mi2mu/TODO | 4 + mi2mu/lily-stream.cc | 2 +- mi2mu/main.cc | 2 +- tex/dimen.tex | 2 +- tex/lilyponddefs.tex | 131 +++--------------- tex/taupindefs.tex | 82 +++++++++++ 163 files changed, 1304 insertions(+), 836 deletions(-) create mode 100644 lily/atom.cc create mode 100644 lily/general-script-def.cc create mode 100644 lily/include/atom.hh create mode 100644 lily/include/general-script-def.hh create mode 100644 lily/include/minterval.hh create mode 100644 lily/include/music.hh create mode 100644 lily/music-list.cc create mode 100644 lily/music.cc create mode 100644 tex/taupindefs.tex diff --git a/.version b/.version index e8e755d92b..7d6ac5a0ec 100644 --- a/.version +++ b/.version @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 66 +TOPLEVEL_PATCH_LEVEL = 67 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/AUTHORS.text b/AUTHORS.text index 672b6556be..8a086d315e 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -61,6 +61,6 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS -19/May/97 LilyPond 0.0.66 1 +19/May/97 LilyPond 0.0.67 1 diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index 000411ef18..23a464b0a4 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -23,17 +23,16 @@ For compilation you need. =item * -A Unix system with GNU tools. GNU LilyPond is known to run on Linux, -AIX, Digital Unix and Solaris. +A Unix system with GNU tools. GNU LilyPond is known to run on these +unices: Linux, AIX, Digital Unix and Solaris. -If you have the Cygnus WINDOWS32 port of the GNU utils, it will -even work in Lose NT/95, but don't promise to support it. +If you have the Cygnus WINDOWS32 port of the GNU utils, it will even +work in Windows NT/95, but don't promise to support it. =item * GNU C++ v2.7 or better, with libg++ installed. Version 2.7.2 -or better recommended. I almost positive that it will not compile with -AT&T CC. +or better recommended. =item * @@ -64,8 +63,6 @@ with the perl's Plain Old Documentation. =back - - =head1 CONFIGURING and COMPILING to install GNU LilyPond, simply type: @@ -119,7 +116,7 @@ other options include: =item --enable-shared -Make a shared library (linux, solaris (?) only ) +Make a shared library (gnu/linux, solaris (?) only ) =item --enable-printing @@ -265,7 +262,7 @@ at http://www.cygnus.com/gnu-win32. to make GNU LilyPond under, brr, aargh, well, simply type: bash configure - make win32 + make windows32 =head1 PLATFORMS @@ -273,13 +270,14 @@ GNU LilyPond (pl 0.0.39) is known to compile on the following platforms: Unix: - * linux 2.0.x, g++ 2.7.2[.1] + * gnu/linux 2.0.x, g++ 2.7.2[.1] * aix 4.1, g++ 2.7.2 + * solaris 2.5, g++ 2.7.2 Other: * windows-nt 4.0, cygnus gnu-windows32 beta17.1 (~=g++ 2.7.2) - * linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested] + * gnu/linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested] =head1 AUTHORS diff --git a/Documentation/faq.pod b/Documentation/faq.pod index 2935fe4a02..873b66b850 100644 --- a/Documentation/faq.pod +++ b/Documentation/faq.pod @@ -16,6 +16,17 @@ clean" after installing it If the problem persists, then please mail me. +Q: Some of your neat scripts fail, what directories do you use: + +A: + + ~/something + lilypond # the directory as unpacked from the tarball + releases # directory for .tar.gz releases + patches # directory for patches between different releases + +~/something/lilypond/bin is in the PATH, and contains symlinks to the +compiled executables. =head2 Language: mudela @@ -196,7 +207,7 @@ LD_LIBRARY_PATH to a directory containing F Q: I want a DOS/NT/W95 port. -A.0: Reconsider. Try Linux/GNU. It's fun! +A.0: Reconsider. Try Linux. It's fun! A.1: Currently (patchlevel 27), GNU LilyPond (and flowerLib) compiles, links and runs on windhoos-nt, using the cygnus gnu port (release b17.1). diff --git a/Documentation/index.pod b/Documentation/index.pod index d650acee2c..93ba7ed857 100644 --- a/Documentation/index.pod +++ b/Documentation/index.pod @@ -6,20 +6,20 @@ Excuse me for this poor page. I don't really have time for doing this.. =head1 DESCRIPTION -Technically GNU LilyPond is a preprocessor which generates TeX -(or LaTeX) output which contains information to typeset a musical -score. Practically it is a typesetter, which only uses TeX as an -output medium. (this is handy because there exist music fonts for TeX) +GNU LilyPond is a program to typeset music: it generates TeX (or +LaTeX) output from file input. As a bonus, you can also output a MIDI file of what you typed. -It translates script files (mudela files or F<*.ly>'s) into TeX input. -Typesetting music is a complex task, whereas the message that printed -music conveys is usually a simple one. GNU LilyPond is a try at providing -a simple interface for setting music. + +examples of what LilyPond can do: MIDI, PS, .gif and input. + =head1 DOCUMENTATION + =item * @@ -113,13 +113,6 @@ The lilypond logo (medium size, format: .gif) -=item * - -examples: MIDI, PS, .gif and input. - - =item * ] -Herbert Chlapik, Die Praxis des Notengraphikers. Doblinger, 1987. +Chlapik, Herbert. ``Die Praxis des Notengraphikers''. Doblinger, 1987. +ISBN 3-9000 035-96-2. -Helene Wanske, ?, Schott-Verlag Mainz. +Wanske, Helene. ``Musiknotation --- Von der Syntax des Notenstichs +zum EDV-gesteuerten-1 Notensatz'', Schott-Verlag, Mainz 1988. ISBN +3-7957-2886-x. 1) e(lektronischen) D(aten)v(erarbeitung). Maxwell Weaner and Walter Boelke, Standard Music Notation Practice, revised edition by Arnold Broido and Daniel Dorff. Music Publisher's diff --git a/Documentation/mudela.pod b/Documentation/mudela.pod index 29c37bcc11..cc82896924 100644 --- a/Documentation/mudela.pod +++ b/Documentation/mudela.pod @@ -53,7 +53,7 @@ A perl-script which tries to convert to newer versions =head2 Words -Keywords are preceded by a backslash "\". They contain alphabetic +Keywords are preceded by a backslash: '\'. They contain alphabetic characters only. Identifiers in their normal form consist start with a alpha character, @@ -74,6 +74,16 @@ Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To aid the eye in reading, for chords the < and the > are used as nesting braces. +=head2 Constants + +Please note that -.5 is no Real. + + "I am a string" + -1.2e3 % a real + 12 % an int + + + =head2 Identifiers =head2 Hierarchical structures @@ -238,7 +248,7 @@ error for this reason. [c8 e8(] [)g8 % NO nesting! - [c8 c8 c8]2/3 % a triplet + [2/3 c8 c8 c8]1/1 % a triplet =head2 Slurs and Ties diff --git a/INSTALL.text b/INSTALL.text index 1ed0bd2d39..5f6c2a4ece 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -24,15 +24,15 @@ PPPPRRRREEEERRRREEEEQQQQUUUUIIIISSSSIIIITTTTEE For compilation you need. +o A Unix system with GNU tools. GNU LilyPond is known - to run on Linux, AIX, Digital Unix and Solaris. + to run on these unices: Linux, AIX, Digital Unix and + Solaris. If you have the Cygnus WINDOWS32 port of the GNU - utils, it will even work in Lose NT/95, but don't + utils, it will even work in Windows NT/95, but don't promise to support it. +o GNU C++ v2.7 or better, with libg++ installed. - Version 2.7.2 or better recommended. I almost - positive that it will not compile with AT&T CC. + Version 2.7.2 or better recommended. +o GNU make. @@ -61,7 +61,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a -28/May/97 LilyPond 0.0.66 1 +28/May/97 LilyPond 0.0.67 1 @@ -116,7 +116,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) other options include: --enable-shared - Make a shared library (linux, solaris (?) only ) + Make a shared library (gnu/linux, solaris (?) only ) --enable-printing Enable debugging print routines (lilypond ----dddd option) @@ -127,7 +127,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) -28/May/97 LilyPond 0.0.66 2 +28/May/97 LilyPond 0.0.67 2 @@ -193,7 +193,7 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG -28/May/97 LilyPond 0.0.66 3 +28/May/97 LilyPond 0.0.67 3 @@ -259,7 +259,7 @@ WWWWIIIINNNNDDDDOOOOZZZZEEEE -28/May/97 LilyPond 0.0.66 4 +28/May/97 LilyPond 0.0.67 4 @@ -274,7 +274,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) to make GNU LilyPond under, brr, aargh, well, simply type: bash configure - make win32 + make windows32 PPPPLLLLAAAATTTTFFFFOOOORRRRMMMMSSSS @@ -283,13 +283,14 @@ PPPPLLLLAAAATTTTFFFFOOOORRRRMMMMSSSS Unix: - * linux 2.0.x, g++ 2.7.2[.1] + * gnu/linux 2.0.x, g++ 2.7.2[.1] * aix 4.1, g++ 2.7.2 + * solaris 2.5, g++ 2.7.2 Other: * windows-nt 4.0, cygnus gnu-windows32 beta17.1 (~=g++ 2.7.2) - * linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested] + * gnu/linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested] AAAAUUUUTTTTHHHHOOOORRRRSSSS @@ -324,7 +325,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS - -28/May/97 LilyPond 0.0.66 5 +28/May/97 LilyPond 0.0.67 5 diff --git a/NEWS b/NEWS index cc0f07c315..d514afe7b5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,29 @@ +pl 67 + - sketch of Music classes + - General_script_def as baseclass for Text_def and Script_def + - bf: clean lib/out/liblily.a + - bf: rests shorter than 1/4 + +pl 66.jcn3 + - bf: make uninstall + - conflily + - f: some pedaling + - plet hack removed :-( [ c c c ]2/3 -> [2/3 c c c ]1/1 + +pl 66.jcn2 + - bf: bar, Hilfslinie + - bf: configure for mingw32 + +pl 66.jcn1 + - WIN32 -> WINDOWS32, more win32->windows32 + - some GNU/Linux changes + - cygnus b18 / mingw update + - doze compile; bf: p-score.cc compares + - reincluded toccata fixes + - small stuff: vi tags, typos, bibl + +****** +may 27 pl 66 - make_website --jpeg, --png and --gif - win32 -> windows32 @@ -11,6 +37,7 @@ pl 66 ****** may 26 + pl 65 - bf pathfind /root/file - massive Score_elem rewrite: diff --git a/TODO b/TODO index 5af191f9f2..8d3e7c344f 100644 --- a/TODO +++ b/TODO @@ -8,7 +8,6 @@ grep for TODO and ugh/ugr IMPORTANT - * add mi2mu example output (.midi.ly and .gif) to website * piano staff @@ -22,8 +21,6 @@ IMPORTANT * decent TeX page layout - * per staff item-widths [JCN] - * script priority * a Hands on tutorial [HKN] @@ -109,11 +106,8 @@ PROJECTS PARSER * Duration -> Musical_duration, typedef Rational Duration? -********************** HKN buglist: -noten staan vaak te dicht aan de rechterkant van de maatstreep. - tekst staat erg ver van notenbalken af waarom geen ; achter dingen in \paper? (\textwidth 180\mm) @@ -122,12 +116,8 @@ waarom geen ; achter dingen in \paper? (\textwidth 180\mm) Onduidelijk wanneer wel en geen \ voor een woord. Maak liever verplichte regels -**************** - BUGS - * RPM permissions -> redhat! - * spurious Weird stem size warnings * staccato dot positions. @@ -137,7 +127,9 @@ BUGS * lilypond - -> crash * standchen triool beam up/down - + + * (where are the) gcc compile warnings on linux + SEVERELY LACKING: * SPEED! @@ -153,8 +145,6 @@ FURTHER FOR ORCHESTRAL SCORE: * abbreviations c4=16 - * doublebar "||", finishbar "|||" (or "||." ?) - INPUTLANGUAGE * should have \require{package.ly} to read req'd packages. @@ -183,6 +173,10 @@ PROJECTS SMALLISH PROJECTS + * A range for context errors (eg. mark both { and }. ) + + * text in staff (sharpsharp in staff, text below) + * replace Score_elem member access by get()/set() methods, to enable future embedded code. diff --git a/bin/convert-mudela b/bin/convert-mudela index d728b1fed3..00ad900cd5 100755 --- a/bin/convert-mudela +++ b/bin/convert-mudela @@ -62,6 +62,11 @@ sub convert_0_0_56_to_0_0_57 s/\(([ \]\[|\t-\.>]|\\[a-z]+)*\)/\~ $1/g; } +sub convert_0_0_57_to_0_0_58 +{ + s/\[ *([^\[\]]*)\] *([1-9]*) *\/ *([1-9]*)/[$2\/$3 $1]1\/1/g; +} + ############################################################### sub last_conversion @@ -97,7 +102,8 @@ my %minor_conversions = (50 => \&no_conv, 54 => \&convert_0_0_53_to_0_0_54, 55 => \&convert_0_0_54_to_0_0_55, 56 => \&convert_0_0_55_to_0_0_56, - 57 => \&convert_0_0_56_to_0_0_57 + 57 => \&convert_0_0_56_to_0_0_57, + 58 => \&convert_0_0_57_to_0_0_58 ); diff --git a/bin/make_website b/bin/make_website index f5d540306e..219fcbd5a2 100755 --- a/bin/make_website +++ b/bin/make_website @@ -58,16 +58,20 @@ sub my_system } my $ret = ( system ($cmd)); - if (!$ignoreret && $ret) { - print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n"; - exit 2; + if ($ret) { + if ($ignoreret) { + print STDERR "ignoring failed command \`$cmd\' (status $ret)\n"; + }else { + print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n"; + exit 2; + } } } } local $base="lilypond/"; -local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "collisions"); +local @examples=("wohltemperirt" ,"standchen", "toccata-fuga-E", "scsii-menuetto", "rhythm", "collisions"); sub gen_html @@ -134,7 +138,11 @@ sub gen_list { print "generating HTML list\n"; open HTMLLIST, ">example_output.html"; - print HTMLLIST "LilyPond examples\n"; + print HTMLLIST "LilyPond examples\n +These example files are taken from the LilyPond distribution.\n +LilyPond currently only outputs TeX and MIDI. The pictures and\n + PostScript files were generated using TeX, Ghostscript and some graphics tools. \n +The GIF files have been scaled to eliminate aliasing."; foreach $a (@examples) { $name=$a; print HTMLLIST "

example file: $name

\n\n"; diff --git a/configure b/configure index 9db40e5757..c333bafab2 100755 --- a/configure +++ b/configure @@ -12,21 +12,23 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - enable-printing turn on debug printing" + enable-printing turn on debug printing" ac_help="$ac_help - disable-checking set runtime checks (assert calls)" + disable-checking set runtime checks (assert calls)" ac_help="$ac_help - disable-debugging set debug info " + disable-debugging set debug info " ac_help="$ac_help - enable-optimise use maximal speed optimisations" + enable-optimise use maximal speed optimisations" ac_help="$ac_help - enable-profiling compile with gprof support" + enable-profiling compile with gprof support" ac_help="$ac_help - tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)" + mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)" ac_help="$ac_help - tex-dir=DIR set the directory to put LilyPond TeX files in. " + tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)" ac_help="$ac_help - mf-dir=DIR set the directory to put LilyPond MetaFont files in." + tex-dir=DIR set the directory to put LilyPond TeX files in. " +ac_help="$ac_help + mf-dir=DIR set the directory to put LilyPond MetaFont files in." # Initialize some variables set by options. # The variables have the same names as the options, with @@ -535,6 +537,7 @@ fi + # if given here, these vars are initted at the checking point. printing_b=no checking_b=yes @@ -579,7 +582,6 @@ if test "${enable_optimise+set}" = set; then fi - # Check whether --enable-profiling or --disable-profiling was given. if test "${enable_profiling+set}" = set; then enableval="$enable_profiling" @@ -587,6 +589,15 @@ if test "${enable_profiling+set}" = set; then fi +# Check whether --enable-mingw32 or --disable-mingw32 was given. +if test "${enable_mingw32+set}" = set; then + enableval="$enable_mingw32" + MINGWPREFIX=$enableval +else + MINGWPREFIX=$enableval +fi + + # Check whether --enable-tex-prefix or --disable-tex-prefix was given. if test "${enable_tex_prefix+set}" = set; then enableval="$enable_tex_prefix" @@ -604,6 +615,7 @@ else TEXDIR=auto fi + # Check whether --enable-mf-dir or --disable-mf-dir was given. if test "${enable_mf_dir+set}" = set; then enableval="$enable_mf_dir" @@ -629,18 +641,26 @@ if test $checking_b = no; then DEFINES="$DEFINES -DNDEBUG=1" fi +# however, C++ support in mingw32 v 0.1.4 is still flaky +if test $MINGWPREFIX != no; then // huh? + ICFLAGS="-I$MINGWPREFIX/include" + ILDFLAGS="-$MINGWPREFIX/lib" +fi + if test $optimise_b = yes; then DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED" fi AUTOHEADER="This file was automatically generated by configure" +CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk + for ac_prog in $CCC c++ g++ gcc CC cxx cc++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:644: checking for $ac_word" >&5 +echo "configure:664: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -671,7 +691,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:695: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -681,11 +701,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <<EOF -#line 685 "configure" +#line 705 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -705,12 +725,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:709: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:714: checking whether we are using GNU C++" >&5 +echo "configure:734: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -719,7 +739,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -734,7 +754,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:738: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:758: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -764,7 +784,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:768: checking for $ac_word" >&5 +echo "configure:788: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -820,7 +840,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:824: checking for a BSD compatible install" >&5 +echo "configure:844: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -874,7 +894,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:878: checking for $ac_word" >&5 +echo "configure:898: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -919,12 +939,14 @@ fi + + for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:928: checking for $ac_word" >&5 +echo "configure:950: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -958,7 +980,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:962: checking for $ac_word" >&5 +echo "configure:984: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -992,7 +1014,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:996: checking for $ac_word" >&5 +echo "configure:1018: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1026,7 +1048,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1030: checking for $ac_word" >&5 +echo "configure:1052: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1062,7 +1084,7 @@ if test "x$TEXPREFIX" = xauto ; then echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6 -echo "configure:1066: checking TeX/MF root dir directory" >&5 +echo "configure:1088: checking TeX/MF root dir directory" >&5 find_root_prefix="$prefix" @@ -1100,7 +1122,7 @@ if test "x$TEXDIR" = xauto ; then echo $ac_n "checking TeX input directory""... $ac_c" 1>&6 -echo "configure:1104: checking TeX input directory" >&5 +echo "configure:1126: checking TeX input directory" >&5 find_dirdir=`(cd $find_texprefix; $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')` @@ -1122,7 +1144,7 @@ if test "x$MFDIR" = xauto; then echo $ac_n "checking MF input directory""... $ac_c" 1>&6 -echo "configure:1126: checking MF input directory" >&5 +echo "configure:1148: checking MF input directory" >&5 find_dirdir=`(cd $find_texprefix; $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')` @@ -1178,7 +1200,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1182: checking how to run the C++ preprocessor" >&5 +echo "configure:1204: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1191,12 +1213,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext <<EOF -#line 1195 "configure" +#line 1217 "configure" #include "confdefs.h" #include <stdlib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1216,17 +1238,17 @@ echo "$ac_t""$CXXCPP" 1>&6 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 -echo "configure:1220: checking for FlexLexer.h" >&5 +echo "configure:1242: checking for FlexLexer.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1225 "configure" +#line 1247 "configure" #include "confdefs.h" #include <FlexLexer.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1398,6 +1420,8 @@ s%@RANLIB@%$RANLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@FIND@%$FIND%g +s%@ICFLAGS@%$ICFLAGS%g +s%@ILDFLAGS@%$ILDFLAGS%g s%@DEFINES@%$DEFINES%g s%@COMPILEINFO@%$COMPILEINFO%g s%@AUTOHEADER@%$AUTOHEADER%g @@ -1626,7 +1650,7 @@ fi eval "DIR_DATADIR=$datadir" DIR_DATADIR="$DIR_DATADIR/lilypond" echo $ac_n "checking ""... $ac_c" 1>&6 -echo "configure:1630: checking " >&5 +echo "configure:1654: checking " >&5 cat << EOF > lib/out/config.hh diff --git a/configure.in b/configure.in index 81a99752dd..570f8866d2 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,6 @@ dnl Process this file with autoconf to produce a configure script. dnl should cache result. dnl should look in $prefix first. - AC_DEFUN(AC_TEX_PREFIX, [ @@ -74,6 +73,7 @@ dnl AC_REQUIRE([AC_TEX_PREFIX]) AC_INIT(flower/choleski.cc) + # if given here, these vars are initted at the checking point. printing_b=no checking_b=yes @@ -84,38 +84,43 @@ profile_b=no AC_LANG_CPLUSPLUS AC_ARG_ENABLE(printing, - [ enable-printing turn on debug printing], + [ enable-printing turn on debug printing], [printing_b=$enableval]) AC_ARG_ENABLE(checking, - [ disable-checking set runtime checks (assert calls)], + [ disable-checking set runtime checks (assert calls)], [checking_b=$enableval] ) AC_ARG_ENABLE(debugging, - [ disable-debugging set debug info ], + [ disable-debugging set debug info ], [debug_b=$enableval]) AC_ARG_ENABLE(optimise, - [ enable-optimise use maximal speed optimisations], + [ enable-optimise use maximal speed optimisations], [optimise_b=$enableval]) - AC_ARG_ENABLE(profiling, - [ enable-profiling compile with gprof support], + [ enable-profiling compile with gprof support], [profile_b=$enableval]) +AC_ARG_ENABLE(mingw32, + [ mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)], + [MINGWPREFIX=$enableval], + [MINGWPREFIX=$enableval]) + AC_ARG_ENABLE(tex-prefix, - [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)], + [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)], [TEXPREFIX=$enableval], [TEXPREFIX=auto] ) AC_ARG_ENABLE(tex-dir, - [ tex-dir=DIR set the directory to put LilyPond TeX files in. ], + [ tex-dir=DIR set the directory to put LilyPond TeX files in. ], [TEXDIR=$enableval], [TEXDIR=auto] ) + AC_ARG_ENABLE(mf-dir, - [ mf-dir=DIR set the directory to put LilyPond MetaFont files in.], + [ mf-dir=DIR set the directory to put LilyPond MetaFont files in.], [MFDIR=$enableval], [MFDIR=auto] ) @@ -135,13 +140,21 @@ if test $checking_b = no; then DEFINES="$DEFINES -DNDEBUG=1" fi +# however, C++ support in mingw32 v 0.1.4 is still flaky +if test $MINGWPREFIX != no; then // huh? + ICFLAGS="-I$MINGWPREFIX/include" + ILDFLAGS="-$MINGWPREFIX/lib" +fi + if test $optimise_b = yes; then DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED" fi dnl COMPILEINFO="$HOST $host $TARGET $target" AUTOHEADER="This file was automatically generated by configure" +CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk + AC_PROG_CXX AC_PROG_RANLIB AC_PROG_INSTALL @@ -153,6 +166,8 @@ if test FIND = error; then fi AC_SUBST(CXX) +AC_SUBST(ICFLAGS) +AC_SUBST(ILDFLAGS) AC_SUBST(DEFINES) AC_SUBST(COMPILEINFO) AC_SUBST(AUTOHEADER) diff --git a/flower/include/full-storage.hh b/flower/include/full-storage.hh index e409415645..bcd778a994 100644 --- a/flower/include/full-storage.hh +++ b/flower/include/full-storage.hh @@ -99,7 +99,7 @@ public: virtual bool trans_ok(int i, int j) const; virtual void trans_next(int &i, int &j) const; virtual Matrix_storage * clone(); - NAME_MEMBERS(Full_storage); + NAME_MEMBERS(); virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const * ); }; diff --git a/flower/include/matrix-storage.hh b/flower/include/matrix-storage.hh index 933cdbbb6e..d7e9310acf 100644 --- a/flower/include/matrix-storage.hh +++ b/flower/include/matrix-storage.hh @@ -153,7 +153,7 @@ public: /** RTTI. */ - NAME_MEMBERS(Matrix_storage); + NAME_MEMBERS(); }; diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index e5c807e8a9..fa6b5df9d4 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -14,9 +14,9 @@ The static_name() can *not* be inlined (this might have the effect that s->name() != S::static_name(). Overlapping strings need not be merged in C++ */ -#define NAME_MEMBERS(c) \ +#define NAME_MEMBERS() \ static char const *static_name();\ -virtual char const *name() const{ return c::static_name(); } \ +virtual char const *name() const{ return static_name(); } \ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() #define IMPLEMENT_STATIC_NAME(c)\ diff --git a/init/symbol.ini b/init/symbol.ini index 898ca8f419..9bab84d8af 100644 --- a/init/symbol.ini +++ b/init/symbol.ini @@ -1,4 +1,4 @@ -\version "0.0.57"; +\version "0.0.58"; \include "register.ini" \include "dynamic.ini" diff --git a/init/table_sixteen.ini b/init/table_sixteen.ini index abcdeab3ef..58f2ef25a7 100644 --- a/init/table_sixteen.ini +++ b/init/table_sixteen.ini @@ -3,6 +3,7 @@ % It has a lot of hard-wired stringconstants % + table_sixteen= \symboltables { @@ -26,9 +27,7 @@ table_sixteen= "upbow" "\upbow" -1\pt 6\pt 0\pt 5\pt "downbow" "\downbow" 0\pt 5\pt 0\pt 7.5\pt "back" "\backorfront" 0\pt 6\pt 0\pt 3\pt - "-front" "\backorfront" -3\pt 5\pt 0\pt 3\pt -% oeps, segfault -% "heel" "\heel" 0\pt 6\pt -.5\pt 2\pt + "-front" "\backorfront" 0\pt 6\pt 0\pt 3\pt "heel" "\heel" 0\pt 6\pt -1\pt 5\pt "toe" "\toe" 0\pt 6\pt -1\pt 5\pt "bheel" "\bheel" 0\pt 6\pt -1\pt 5\pt diff --git a/input/cadenza.ly b/input/cadenza.ly index 158ee16b14..d8d758be8b 100644 --- a/input/cadenza.ly +++ b/input/cadenza.ly @@ -10,7 +10,7 @@ EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; cad = \melodic { @@ -43,7 +43,7 @@ cad = \melodic { \duration 16; [d cis d e] f4~ [f e d c] 'b4 - \octave c'; [d'8 c'8 a8]2/3 + \octave c'; [2/3 d'8 c'8 a8]1/1 g2 \bar \empty ; [g c e g] [c' e g c']\octave c''; diff --git a/input/collisions.ly b/input/collisions.ly index 14df3bc58f..65057eb784 100644 --- a/input/collisions.ly +++ b/input/collisions.ly @@ -10,7 +10,7 @@ Tested Features:test the Collision resolution EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; diff --git a/input/coriolan-alto.ly b/input/coriolan-alto.ly index 4afddd6614..87b22fc1ba 100644 --- a/input/coriolan-alto.ly +++ b/input/coriolan-alto.ly @@ -16,7 +16,7 @@ EndMudelaHeader % (maybe even sooner :-) % -\version "0.0.57"; +\version "0.0.58"; alto = \melodic{ diff --git a/input/error.ly b/input/error.ly index c68205f0be..118dba144d 100644 --- a/input/error.ly +++ b/input/error.ly @@ -1,4 +1,4 @@ -\version "0.0.57"; +\version "0.0.58"; \include "this-is-hopefully-a-nonexisting-file" diff --git a/input/header.ly b/input/header.ly index af02e8ab9d..9e01bf0d40 100644 --- a/input/header.ly +++ b/input/header.ly @@ -10,4 +10,4 @@ Tested Features: EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; diff --git a/input/keys.ly b/input/keys.ly index f46fc86f3a..076ea00fe7 100644 --- a/input/keys.ly +++ b/input/keys.ly @@ -10,7 +10,7 @@ Tested Features: local key, key, forced accidentals EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; blah = \melodic{ diff --git a/input/kortjakje.ly b/input/kortjakje.ly index 6cc689c326..409fe49eba 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -10,7 +10,7 @@ Tested Features: example file with comments EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; % the % is a comment. diff --git a/input/pedal.ly b/input/pedal.ly index 5e760771fe..caa9905430 100644 --- a/input/pedal.ly +++ b/input/pedal.ly @@ -24,7 +24,7 @@ % \lbheel \lbheel \lfheel \lftoe % \rbheel \rbtoe \rfheel \rftoe -\version "0.0.57"; +\version "0.0.58"; \score{ \staff{ melodicregs diff --git a/input/rhythm.ly b/input/rhythm.ly index 042d9cddc0..530fc74a98 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -11,14 +11,14 @@ unsynced bars EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; % % Ive' got rhythm! % % add any impressive examples here, please -\version "0.0.57"; +\version "0.0.58"; ritme = \staff { melodicregs @@ -35,7 +35,7 @@ ritme = \staff { % divide measure in 5 equal parts. Usually it 2+3 or 3+2 \grouping 16*5 ; [c8 c16 c8 ] | % watch THIS! - [c16 c16 c16 c16]5/4 | + [5/4 c16 c16 c16 c16]1/1 | \meter 2/8; c4 | c4 c4 c4 c4 diff --git a/input/scales.ly b/input/scales.ly index 1a46c21337..2ccad6c895 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -2,7 +2,7 @@ % scales with accents. % -\version "0.0.57"; +\version "0.0.58"; blah = \staff{ melodicregs \melodic { \meter 6/8; @@ -19,30 +19,30 @@ blah = \staff{ melodicregs c d \duration 8 ; %ugr - |[ a \< a a a a a a \! a a \ff \> ]6/9 + |[6/9 a \< a a a a a a \! a a \ff \> ]1/1 \octave c' ; - |[ a a a a a a a a \! a ]6/9 + |[6/9 a a a a a a a a \! a ]1/1 \octave c'' ; ['c->-.-\fermata \< 'g->-.-\fermata d->-.-\fermata a->-.-\fermata e'->-.-\fermata b'-. f''-. c'''->-.-\fermata \! g'''->-.-\fermata \> ]6/9 - [g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]6/9 + [6/9 g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]1/1 \octave c; ['c->-.-\fermata \< 'g->-.-\fermata d->-.-\fermata a->-.-\fermata e'->-.-\fermata b'-. f''-. c'''->-.-\fermata \! g'''->-.-\fermata \> ]6/9 - [g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]6/9 + [6/9 g'''->-.-\fermata c'''->-.-\fermata f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata a->-.-\fermata d->-.-\fermata 'g->-.-\fermata \! 'c->-.-\fermata ]1/1 \octave c' ; \octave c' ; - [ c g d' ]2/3 - [ d' g c ]2/3 - [ f c' g' ]2/3 - [ g' c' f ]2/3 + [2/3 c g d' ]1/1 + [2/3 d' g c ]1/1 + [2/3 f c' g' ]1/1 + [2/3 g' c' f ]1/1 \octave c ; - [ c g d' ]2/3 - [ d' g c ]2/3 - [ f c' g' ]2/3 - [ g' c' f ]2/3 - [ g' c' f ]2/3 + [2/3 c g d' ]1/1 + [2/3 d' g c ]1/1 + [2/3 f c' g' ]1/1 + [2/3 g' c' f ]1/1 + [2/3 g' c' f ]1/1 \meter 4/4; c1 diff --git a/input/scripts.ly b/input/scripts.ly index 4890522195..42b1fa1731 100644 --- a/input/scripts.ly +++ b/input/scripts.ly @@ -10,7 +10,7 @@ Tested Features: scripts, text. EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; blah = \staff{ melodicregs diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index b40697e5b6..9ff18deb97 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -12,7 +12,7 @@ EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; %% Stuff from MPP version % \lefttitle{Menuetto} % \tempo{Moderato} diff --git a/input/slurs.ly b/input/slurs.ly index a97f5faa6c..cddf943902 100644 --- a/input/slurs.ly +++ b/input/slurs.ly @@ -11,7 +11,7 @@ EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; \score{\staff{ melodicregs diff --git a/input/standchen.ly b/input/standchen.ly index 03b8a1e7c3..09bbcd2414 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -12,9 +12,8 @@ EndMudelaHeader %} -\version "0.0.57"; -\version "0.0.57"; +\version "0.0.58"; commands = \melodic{ \skip 2.*4; @@ -45,29 +44,29 @@ melodie = \melodic{ %%4 r < [ 'a cis > e < 'a cis > e < 'a cis ] > | %%5 - [ a~ bes a ]2/3 d'4. a | + [2/3 a~ bes a ]1/1 d'4. a | %%6 - [ g~ a g ]2/3 d'4 g r | + [2/3 g~ a g ]1/1 d'4 g r | %%7 - a4.^> g [ g~ f e ]2/3 | + a4.^> g [2/3 g~ f e ]1/1 | %%8 f2 r4 | %%9 - < { a'4.~ g' [ g'( f' )e' ]2/3 } + < { a'4.~ g' [2/3 g'( f' )e' ]1/1 } { cis'4. e'_"dolce" \plet 2/3; e' \plet 1/1; } > | %%10 < f'2. d'2. > | %%11 - [ a ~ bes a ]2/3 f'4. a | + [2/3 a ~ bes a ]1/1 f'4. a | %%12 - [ g~ a g ]2/3 e'4. d' | + [2/3 g~ a g ]1/1 e'4. d' | %%13 - c'4. bes [ bes~ a g ]2/3 | + c'4. bes [2/3 bes~ a g ]1/1 | %%14 a2 r - < { d'~ c'4. g [ bes a g ]2/3 } + < { d'~ c'4. g [2/3 bes a g ]1/1 } { f \p ~ e4._"dolce" bes \plet 2/3; g \plet 1/1; @@ -82,12 +81,12 @@ melodie = \melodic{ [ d'8. a16 ] f4. d | %%19 %#% c'\grace\stemup - [ bes ~ a bes ]2/3 d'4. bes | + [2/3 bes ~ a bes ]1/1 d'4. bes | %%20 a2. | %%21 %#% a\grace - [ g~ fis g ]2/3 bes4.^> g | + [2/3 g~ fis g ]1/1 bes4.^> g | %%22 f!2. | %%23 @@ -95,17 +94,17 @@ melodie = \melodic{ %%24 [ d'8. a16 ] fis4. d | %%25 - [ b \mf~ ais b ]2/3 d'4. b | + [2/3 b \mf~ ais b ]1/1 d'4. b | %%26 < a2. fis2. > | %%27 - [ e' \f~ dis' e' ]2/3 g'4. cis' | + [2/3 e' \f~ dis' e' ]1/1 g'4. cis' | %%28 < d'2. fis2. > | %#%\volta1 %%29 - < { bes2( [ d'8.~ )g16 ] } - { g2 \mf [ bes8. bes16 ] } > | + < { bes2( [ d'8.~ )bes16 ] } + { g2 \mf [ bes8. g16 ] } > | %%30 < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-. ] } > | @@ -115,8 +114,8 @@ melodie = \melodic{ %%32 < a2 fis2 \pp > < a4 fis4 > | %%33 - < { b2( [ d'8.~ g16 ] } - { g2 [ b8. b16 ] } > | + < { b2( [ d'8.~ )b16 ] } + { g2 [ b8. g16 ] } > | %%34 < { a4. [ a-. a-. a-. ] } { fis4. [ fis-.( fis-. )fis-. ] } > | @@ -136,7 +135,7 @@ melodie = \melodic{ %%40 cis'2 r4 | %%41 - < fis'4. \> cis'4. \f > e' [ e'~ d' \! cis' ]2/3 | + < fis'4. \> cis'4. \f > e' [2/3 e'~ d' \! cis' ]1/1 | %%42 [ b8. cis'16 ] d'4^> b r | %%43 @@ -145,11 +144,11 @@ melodie = \melodic{ %%44 [ b8. \> cis'16 ] d'4^> b \! r | %%45 - [ b \p ~ ais b ]2/3 d'4. b | + [2/3 b \p ~ ais b ]1/1 d'4. b | %%46 <a!2. fis2. > | %%47 - [ e' \f~ dis' e' ]2/3 g'4.^> cis' | + [2/3 e' \f~ dis' e' ]1/1 g'4.^> cis' | %%48 \textstyle "italic"; < @@ -343,16 +342,16 @@ tekstI = \lyric{ _ _ _ _ _ _ % 5 - [ Lei- se8 ]2/3 fleh-4. en8 - [ mei- ne8 ]2/3 Lie- der8 _8 - Durch4. die8 [ Nacht zu8 ]2/3 + [2/3 Lei- se8 ]1/1 fleh-4. en8 + [2/3 mei- ne8 ]1/1 Lie- der8 _8 + Durch4. die8 [2/3 Nacht zu8 ]1/1 dir;2 _ _ _ _ _ _ _ % 11 - [ In den8 ]2/3 stil-4. len8 - [ Hain her-8 ]2/3 nie-4. der,8 - Lieb4. chen,8 [ komm zu8 ]2/3 + [2/3 In den8 ]1/1 stil-4. len8 + [2/3 Hain her-8 ]1/1 nie-4. der,8 + Lieb4. chen,8 [2/3 komm zu8 ]1/1 mir!2 _ _ _ _ _ _ _ @@ -360,7 +359,7 @@ tekstI = \lyric{ % 17 Fl\"us-8. ternd16 schlan-4. ke8 Wip-8. fel16 rau-4. schen8 - [ In des8 ]2/3 Mon-4. des8 + [2/3 In des8 ]1/1 Mon-4. des8 Licht;2. _ _ _ _ _ _ @@ -368,7 +367,7 @@ tekstI = \lyric{ % 23 Des8. Ver-16 r\"a-4. ters8 feind-8. lich16 Lau-4. schen8 - [ F\"urch- te,8 ]2/3 Hol-4. de,8 + [2/3 F\"urch- te,8 ]1/1 Hol-4. de,8 nicht.2. _ _ _ _ _ _ @@ -388,7 +387,7 @@ tekstI = \lyric{ mich!2 _ Be-8. bend16 harr' ich8 _8 dir8. ent-16 ge- gen!8 _8 - [ Komm, be-8 ]2/3 gl\"u4. cke8 + [2/3 Komm, be-8 ]1/1 gl\"u4. cke8 mich!2. _ _ _ _ _ _ % 47 @@ -410,17 +409,17 @@ tekstII = \lyric{ _ _ _ _ _ _ % 5 - [ H\"orst die8 ]2/3 Nach-4. ti-8 - [ gal- len8 ]2/3 schla- gen?8 _8 - Ach!4. sie8 [ fleh- en8 ]2/3 + [2/3 H\"orst die8 ]1/1 Nach-4. ti-8 + [2/3 gal- len8 ]1/1 schla- gen?8 _8 + Ach!4. sie8 [2/3 fleh- en8 ]1/1 dich,2 _ _ _ _ _ _ _ % 11 - [ Mit der8 ]2/3 T\"o-4. ne8 - [ s\"u\ss- en8 ]2/3 Kla-4. gen8 - Fleh-4. en8 [ sie f\"ur8 ]2/3 + [2/3 Mit der8 ]1/1 T\"o-4. ne8 + [2/3 s\"u\ss- en8 ]1/1 Kla-4. gen8 + Fleh-4. en8 [2/3 sie f\"ur8 ]1/1 mich.2 _ _ _ _ _ _ _ @@ -428,7 +427,7 @@ tekstII = \lyric{ % 17 Sie-8. ver-16 stehn4. des8 Bus-8. ens16 Seh-4. nen,8 - [ Ken- nen8 ]2/3 Lieb-4. es-8 + [2/3 Ken- nen8 ]1/1 Lieb-4. es-8 schmerz,2. _ _ _ _ _ _ @@ -436,7 +435,7 @@ tekstII = \lyric{ % 23 R\"uh-8. ren16 mit4. den8 Sil-8. ber-16 t\"o-4. nen8 - [ Jed- es8 ]2/3 wei-4. che8 + [2/3 Jed- es8 ]1/1 wei-4. che8 Herz.2. _ _ _ _ _ _ diff --git a/input/toccata-fuga-E.ly b/input/toccata-fuga-E.ly index dade648ae5..19c862d90e 100644 --- a/input/toccata-fuga-E.ly +++ b/input/toccata-fuga-E.ly @@ -20,7 +20,7 @@ EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; toccata_commands = \melodic{ \meter 4/4; @@ -33,9 +33,9 @@ toccata_right = \melodic{ % 13 -- how to type -- where to split -- this more neatly ? \octave c'; <\multivoice - { \stem 1; \hshift 1; r4 dis'4 e'4.-. e'8~ e'4 [d'8 fis'8] gis'4 [gis'8 fis'16 e'16] | fis'4~ [fis'8 e'16 dis'16] e'4 r8 e'8 } - { \stem 1; r4 bis4 cis'4-. cis'4 | ais'4~ [ais'16 gis'16 ais'16 b'16] dis'4 cis'4~ [cis'8 dis'16 ais16] bis4 cis'4 r8 b8 } - { \stem -1; r4 < gis4 fis4 dis4 > gis4-. gis4 | ais4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 } + { \stem 1; r4 dis'4 e'4.-. e'8( | \hshift 1; )e'4 [d'8 fis'8] \hshift 0; gis'4 [gis'8 fis'16 e'16] | fis'4~ [fis'8 e'16 dis'16] e'4 r8 e'8 } + { \stem 1; \hshift 1; r4 bis4 cis'4-. cis'4 | \hshift 0; a'4~ [a'16 gis'16 a'16 b'16] \hshift 1; dis'4 cis'4~ [cis'8 dis'16 a16] bis4 cis'4 r8 b8 } + { \stem -1; r4 < gis4 fis4 dis4 > gis4-. gis4 | a4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 } > | % 16 } @@ -46,8 +46,8 @@ toccata_left = \melodic{ \clef bass; % 13 <\multivoice - { \stem 1; bis2 cis'4-. cis'4~ [cis'8 ais'8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 } - { \stem 1; \hshift 1; r4 gis4. gis8~ gis4 | \stem -1; \hshift 0; ais4. fis8 gis4. ais8~ ais4 gis4-. gis4 r8 gis8 } + { \stem 1; bis2 cis'4-. cis'4~ [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 } + { \stem 1; \hshift 1; r4 gis4. gis8~ gis4 | \stem -1; \hshift 0; a4. fis8 gis4. a8~ a4 gis4-. gis4 r8 gis8 } { \stem -1; r4 < dis4 fis4 > < cis4 e4 > } > | % 16 @@ -76,19 +76,27 @@ fuga2_right = \melodic{ % 15 \octave c'; <\multivoice - { \stem 1; b8 fis8 b4 } + { \stem 1; [b8 fis8] b4 } { \stem -1; fis2 } > - <% \multivoice % heu? - { e'4 } - { cis'4 } - { ais4 } - { fis4 } + %{ this chord is usually set like this: + | + x|| + x|| + x| + |x + | + %} + < \multivoice + { \stem 1; \hshift 0; e'4 } + { \stem 1; \hshift 1; cis'4 } + { \stem 1; \hshift 2; ais4 } + { \stem -1; fis4 } > | % 16 <\multivoice { \stem 1; dis'2 dis'4 | cis'2 cis'4 | b4~ [b8 cis'8 dis'8 e'8] } - { \stem 1; \hshift 1; b8 fis8 b2~ [b8 a16 g16] a2 | a4 gis2 } + { \stem 1; \hshift 1; [b8 fis8] b2~ [b8 a16 g16] a2 | a4 gis2 } { \stem -1; fis2.~ fis2.~ fis4 e2 } > | % 19 diff --git a/input/twinkle.ly b/input/twinkle.ly index df4cf9a0cd..8a17727959 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -14,7 +14,7 @@ Tested Features: lyrics EndMudelaHeader %} -\version "0.0.57"; +\version "0.0.58"; melody = \melodic{ \clef\violin; diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly index 6b15eaae4c..eb6b0278f6 100644 --- a/input/wohltemperirt.ly +++ b/input/wohltemperirt.ly @@ -14,7 +14,7 @@ %} -\version "0.0.57"; +\version "0.0.58"; % should add \need{dutch.ini} for % correct parsing of note names diff --git a/lib/Makefile b/lib/Makefile index b156a10b1a..280af9ce06 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -55,16 +55,13 @@ MAINTARGET = $(outdir)/$(LIBRARY)# huh? default: $(MAINTARGET) # +localclean: + rm -f $(MAINTARGET) + # generic targets and rules: # include ./$(depth)/make/Targets.make include ./$(depth)/make/Rules.make -# - -# list of depend files: -# - -# # auto dependencies: # diff --git a/lib/include/input.hh b/lib/include/input.hh index f87385c428..e68940257c 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -10,6 +10,8 @@ #ifndef INPUT_HH #define INPUT_HH +#include "proto.hh" + /** Base class for anything that records its poisition in the parse file. */ diff --git a/lib/include/windhoos-suck-suck-suck-thank-you-cygnus.hh b/lib/include/windhoos-suck-suck-suck-thank-you-cygnus.hh index 540be21682..cabfd3c5c4 100644 --- a/lib/include/windhoos-suck-suck-suck-thank-you-cygnus.hh +++ b/lib/include/windhoos-suck-suck-suck-thank-you-cygnus.hh @@ -1,7 +1,9 @@ // // windhoos-suck-suck-suck-thank-you-cygnus.hh // -#ifdef _WIN32 +// mmap() should work now (cygnus beta 18), but let's keep it here +// for people using old cygnus releases +#if 0 //def _WINDOWS32 #ifndef WINDHOOS_SUCK_SUCK_SUCK_HH #define WINDHOOS_SUCK_SUCK_SUCK_HH @@ -10,4 +12,4 @@ caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset int munmap(caddr_t addr, size_t len); #endif // WINDHOOS_SUCK_SUCK_SUCK_HH -#endif // _WIN32 // +#endif // _WINDOWS32 // diff --git a/lib/windhoos-suck-suck-suck-thank-you-cygnus.cc b/lib/windhoos-suck-suck-suck-thank-you-cygnus.cc index 15db908eab..b2681e4826 100644 --- a/lib/windhoos-suck-suck-suck-thank-you-cygnus.cc +++ b/lib/windhoos-suck-suck-suck-thank-you-cygnus.cc @@ -1,7 +1,9 @@ // // windhoos.cc // -#ifdef _WIN32 +// mmap() should work now (cygnus beta 18), but let's keep it here +// for people using old cygnus releases +#if 0 // def _WINDOWS32 #include <sys/types.h> #include <sys/mman.h> @@ -100,4 +102,4 @@ munmap(caddr_t addr, size_t len) #endif // !HAVE_GET_OSFHANDLE // -#endif // _WIN32 // +#endif // _WINDOWS32 // diff --git a/lily/.version b/lily/.version index de91678501..1f39e39a1d 100644 --- a/lily/.version +++ b/lily/.version @@ -1,8 +1,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 66 - +PATCH_LEVEL = 67 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -MY_PATCH_LEVEL = +MY_PATCH_LEVEL = diff --git a/lily/atom.cc b/lily/atom.cc new file mode 100644 index 0000000000..0ca9649b35 --- /dev/null +++ b/lily/atom.cc @@ -0,0 +1,52 @@ +/* + atom.cc -- implement Atom + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ +#include "symbol.hh" +#include "tex.hh" +#include "interval.hh" +#include "dimen.hh" +#include "string.hh" +#include "varray.hh" +#include "debug.hh" + + + +void +Atom::print() const +{ + mtor << "texstring: " <<sym.tex<<"\n"; +} + +Box +Atom::extent() const +{ + Box b( sym.dim); + b.translate(off); + return b; +} + +Atom::Atom(Symbol s) +{ + sym=s; +} + + +String +Atom::TeX_string() const +{ + /* infinity checks. */ + assert( abs(off.x) < 100 CM); + assert( abs(off.y) < 100 CM); + + // whugh.. Hard coded... + String s("\\placebox{%}{%}{%}"); + Array<String> a; + a.push(print_dimen(off.y)); + a.push(print_dimen(off.x)); + a.push(sym.tex); + return substitute_args(s, a); +} diff --git a/lily/beam.cc b/lily/beam.cc index 9fcd49f705..3d16d96518 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -13,7 +13,6 @@ */ #include "varray.hh" - #include "proto.hh" #include "dimen.hh" #include "beam.hh" @@ -52,11 +51,6 @@ Stem_info::Stem_info(Stem const *s) /* *************** */ -void -Beam::do_break_at(PCol*l, PCol*r) -{ - assert (l->line_l_ == r->line_l_); -} diff --git a/lily/bow.cc b/lily/bow.cc index 2de418ebdf..e24f79d067 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -8,6 +8,7 @@ #include "bow.hh" #include "paper-def.hh" +#include "molecule.hh" #include "lookup.hh" Bow::Bow() diff --git a/lily/command-request.cc b/lily/command-request.cc index 83cb258ffb..7a70fced2e 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -10,7 +10,10 @@ #include "debug.hh" #include "musical-request.hh" - +void +Command_script_req::do_print() const +{} +IMPLEMENT_STATIC_NAME(Command_script_req); IMPLEMENT_STATIC_NAME(Cadenza_req); void @@ -193,7 +196,7 @@ Key_change_req::Key_change_req() Key_change_req::Key_change_req(Key_change_req const&c) { for (int i=0; i < c.melodic_p_arr_.size(); i++) - melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() ); + melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->musical()->melodic() ); minor_b_ = c.minor_b_; multi_octave_b_ = c.multi_octave_b_; } diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 98317f85e2..4ca1196b09 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -6,6 +6,7 @@ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> */ +#include "molecule.hh" #include "dimen.hh" #include "crescendo.hh" #include "lookup.hh" diff --git a/lily/general-script-def.cc b/lily/general-script-def.cc new file mode 100644 index 0000000000..e35a56cc2e --- /dev/null +++ b/lily/general-script-def.cc @@ -0,0 +1,70 @@ +/* + general-script-def.cc -- implement General_script_def + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#include "general-script-def.hh" +#include "debug.hh" +#include "symbol.hh" +int +General_script_def::staff_dir_i()const +{ + return -1; +} +int +General_script_def::rel_stem_dir_i()const +{ + return 0; +} +int +General_script_def::priority_i()const +{ + return 1000; +} + +bool +General_script_def::inside_b()const +{ + return false; +} + +bool +General_script_def::equal_b(General_script_def const&g)const +{ + if (name() != g.name()) + return false; + + return do_equal_b(g); +} + +bool +General_script_def::do_equal_b(General_script_def const&)const +{ + return true; +} + + +void +General_script_def::print() const +{ + mtor << name() << "{"; + do_print(); + mtor << "}"; +} + +void +General_script_def::do_print() const +{ +} + +Atom +General_script_def::get_atom(Paper_def*, int)const +{ + Symbol s; + return Atom(s); +} +IMPLEMENT_STATIC_NAME(General_script_def); diff --git a/lily/head-reg.cc b/lily/head-reg.cc index b704f1803e..8a144ad142 100644 --- a/lily/head-reg.cc +++ b/lily/head-reg.cc @@ -19,8 +19,8 @@ Note_head_register::Note_head_register() bool Note_head_register::try_request(Request *req_l) { - if (req_l->note() || req_l->rest()) - note_req_l_=req_l->rhythmic(); + if (req_l->musical() && (req_l->musical()->note() || req_l->musical()->rest())) + note_req_l_=req_l->musical()->rhythmic(); else return false; diff --git a/lily/include/atom.hh b/lily/include/atom.hh new file mode 100644 index 0000000000..5e9f2601ff --- /dev/null +++ b/lily/include/atom.hh @@ -0,0 +1,17 @@ +/* + atom.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#ifndef ATOM_HH +#define ATOM_HH + +#include "symbol.hh" +#error + + +#endif // ATOM_HH diff --git a/lily/include/bar-reg.hh b/lily/include/bar-reg.hh index 5879cb948b..f871915a01 100644 --- a/lily/include/bar-reg.hh +++ b/lily/include/bar-reg.hh @@ -25,7 +25,7 @@ public: virtual void pre_move_processing(); virtual void post_move_processing(); Bar_register(); - NAME_MEMBERS(Bar_register); + NAME_MEMBERS(); }; #endif // BARREG_HH diff --git a/lily/include/bar.hh b/lily/include/bar.hh index ea23bd07bc..eecc32f51f 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -14,7 +14,7 @@ class Bar:public Item { public: String type; - NAME_MEMBERS(Bar); + NAME_MEMBERS(); Bar(String type); private: void do_print() const; diff --git a/lily/include/beam.hh b/lily/include/beam.hh index d9c7a0a9b0..d1e28ee4f6 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -24,7 +24,7 @@ public: /* *************** */ - NAME_MEMBERS(Beam); + NAME_MEMBERS(); Beam(); void add(Stem*); @@ -35,7 +35,6 @@ public: protected: virtual Interval do_width()const; virtual Offset center() const; - virtual void do_break_at(PCol *, PCol *); virtual void set_default_dir(); virtual void do_pre_processing(); virtual void do_post_processing(); diff --git a/lily/include/bow.hh b/lily/include/bow.hh index 76330c079c..c69214a542 100644 --- a/lily/include/bow.hh +++ b/lily/include/bow.hh @@ -25,7 +25,7 @@ protected: Molecule*brew_molecule_p()const; public: Bow(); - NAME_MEMBERS(Bow); + NAME_MEMBERS(); Offset center() const; }; #endif // BOW_HH diff --git a/lily/include/clef-item.hh b/lily/include/clef-item.hh index d0e29994ef..23e346c083 100644 --- a/lily/include/clef-item.hh +++ b/lily/include/clef-item.hh @@ -24,7 +24,7 @@ public: bool change; /* *************** */ -NAME_MEMBERS(Clef_item); +NAME_MEMBERS(); Clef_item(); void read(Clef_register const&); void read(String); diff --git a/lily/include/clef-reg.hh b/lily/include/clef-reg.hh index 28cbd4643c..b78f3dd682 100644 --- a/lily/include/clef-reg.hh +++ b/lily/include/clef-reg.hh @@ -31,7 +31,7 @@ public: /* ************** */ Clef_register(); - NAME_MEMBERS(Clef_register); + NAME_MEMBERS(); }; #endif // CLEF_HH diff --git a/lily/include/collision-reg.hh b/lily/include/collision-reg.hh index b0b3b6dc8a..5eef92a9e9 100644 --- a/lily/include/collision-reg.hh +++ b/lily/include/collision-reg.hh @@ -20,6 +20,6 @@ protected: virtual void pre_move_processing(); public: Collision_register(); - NAME_MEMBERS(Collision_register); + NAME_MEMBERS(); }; #endif // COLLISION_REG_HH diff --git a/lily/include/collision.hh b/lily/include/collision.hh index be8d6bd506..62cee06041 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -23,7 +23,7 @@ protected: virtual void do_pre_processing(); public: Link_array<Note_column> clash_l_arr_; - NAME_MEMBERS(Collision); + NAME_MEMBERS(); void add (Note_column*ncol_l); Collision(); diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index d1b99f9a6c..c4676c76af 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -21,7 +21,6 @@ public: virtual Terminate_voice_req *terminate() {return 0;} virtual Group_change_req * groupchange() { return 0;} virtual Group_feature_req * groupfeature() { return 0; } - virtual Measure_grouping_req * measuregrouping() { return 0; } virtual Clef_change_req * clefchange() { return 0; } virtual Key_change_req * keychange() { return 0; } @@ -30,9 +29,17 @@ public: virtual Bar_req *bar() { return 0; } virtual Cadenza_req *cadenza() { return 0; } virtual Timing_req*timing() { return 0; } + virtual Command_script_req*commandscript() { return 0;} }; +class Command_script_req : public Command_req, public Script_req { +public: + REQUESTMETHODS(Command_script_req, commandscript); +}; + + + /** Baseclass for meter/partial req. It has to be handled by Staff_{walker,column} baseclass. */ class Timing_req : public Command_req { diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index 72ff2c1d1b..56a3e1a921 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -28,7 +28,7 @@ public: protected: SPANNER_CLONE(Crescendo) virtual Molecule*brew_molecule_p()const; - NAME_MEMBERS(Crescendo); + NAME_MEMBERS(); private: diff --git a/lily/include/dynamic-reg.hh b/lily/include/dynamic-reg.hh index 17f769053c..72823a79a1 100644 --- a/lily/include/dynamic-reg.hh +++ b/lily/include/dynamic-reg.hh @@ -23,7 +23,7 @@ class Dynamic_register : public Request_register { public: Dynamic_register(); ~Dynamic_register(); - NAME_MEMBERS(Dynamic_register); + NAME_MEMBERS(); protected: virtual void acknowledge_element(Score_elem_info); virtual bool try_request(Request *req_l); diff --git a/lily/include/elem-group.hh b/lily/include/elem-group.hh index 0e544adbc0..c0a23ccbcb 100644 --- a/lily/include/elem-group.hh +++ b/lily/include/elem-group.hh @@ -28,7 +28,7 @@ protected: public: Element_group(); Element_group(Element_group const&); - NAME_MEMBERS(Element_group); + NAME_MEMBERS(); virtual void translate(Offset); virtual void add_element(Score_elem*); virtual String TeX_string()const; diff --git a/lily/include/general-script-def.hh b/lily/include/general-script-def.hh new file mode 100644 index 0000000000..c7c7207d74 --- /dev/null +++ b/lily/include/general-script-def.hh @@ -0,0 +1,37 @@ +/* + general-script-def.hh -- declare General_script_def + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#ifndef GENERAL_SCRIPT_DEF_HH +#define GENERAL_SCRIPT_DEF_HH + +#include "lily-proto.hh" +#include "input.hh" +#include "virtual-methods.hh" +/** + Definition of anything that is put aside staff/notes. + */ +class General_script_def : public Input { +public: + VIRTUAL_COPY_CONS(General_script_def,General_script_def) + NAME_MEMBERS(); + virtual int staff_dir_i()const; + void print() const; + virtual int rel_stem_dir_i()const; + virtual int priority_i()const; + virtual bool inside_b()const; + virtual Atom get_atom(Paper_def* p, int dir_i_)const; + bool equal_b(General_script_def const&)const; + virtual ~General_script_def() {} + +protected: + virtual bool do_equal_b(General_script_def const &)const; + virtual void do_print()const; +}; + +#endif // GENERAL_SCRIPT_DEF_HH diff --git a/lily/include/grouping.hh b/lily/include/grouping.hh index 428978249e..583f5d4529 100644 --- a/lily/include/grouping.hh +++ b/lily/include/grouping.hh @@ -7,12 +7,9 @@ #ifndef GROUPING_HH #define GROUPING_HH -#include "moment.hh" -#include "interval.hh" +#include "minterval.hh" #include "varray.hh" -typedef Interval_t<Moment> MInterval; - /** data structure which represents rhythmic units this is a tree. It groupes notes according to rules TODO Documentation. Unhairing diff --git a/lily/include/head-reg.hh b/lily/include/head-reg.hh index 5e47743db1..82487b6882 100644 --- a/lily/include/head-reg.hh +++ b/lily/include/head-reg.hh @@ -19,7 +19,7 @@ struct Note_head_register : Request_register { virtual void process_requests(); virtual void pre_move_processing(); virtual void post_move_processing(); - NAME_MEMBERS(Note_head_register); + NAME_MEMBERS(); }; diff --git a/lily/include/input-music.hh b/lily/include/input-music.hh index 52fb654352..31c60c2fc8 100644 --- a/lily/include/input-music.hh +++ b/lily/include/input-music.hh @@ -29,14 +29,11 @@ struct Voice_list : public Link_list<Voice*> { */ struct Input_music { virtual Voice_list convert()const=0; - void check_plet(Voice_element* velt_l); 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 bool find_plet_start_b(char c, Moment& moment_r) = 0; - virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i) = 0; virtual void transpose(Melodic_req const&) const =0; @@ -58,8 +55,6 @@ struct Simple_music : Input_music { virtual Voice_list convert()const; virtual void translate_time(Moment dt); virtual void print() const; - virtual bool find_plet_start_b(char c, Moment& moment_r); - virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i); virtual Input_music *clone() const { return new Simple_music(*this); } @@ -76,8 +71,6 @@ struct Complex_music : Input_music { Complex_music(Complex_music const &); virtual void print() const ; void concatenate(Complex_music*); - virtual bool find_plet_start_b(char c, Moment& moment_r); - virtual void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i); }; diff --git a/lily/include/item.hh b/lily/include/item.hh index 3c030d122c..4ddc3ebd6c 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -31,7 +31,7 @@ public: virtual Item *item() { return this; } Item(); Real hpos_f() const; - NAME_MEMBERS(Item); + NAME_MEMBERS(); virtual Line_of_score * line_l() const; protected: virtual void do_print()const; diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index 1e2207beab..4b4c347eef 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -19,7 +19,7 @@ struct Key_item : Item { /* *************** */ -NAME_MEMBERS(Key_item); +NAME_MEMBERS(); Key_item(int cposition); void add(int pitch, int acc); void read(const Key_register&); diff --git a/lily/include/key-reg.hh b/lily/include/key-reg.hh index b6e21224d9..bfa5fd0514 100644 --- a/lily/include/key-reg.hh +++ b/lily/include/key-reg.hh @@ -27,7 +27,7 @@ struct Key_register : Request_register { virtual void post_move_processing(); virtual void acknowledge_element(Score_elem_info); Key_register(); - NAME_MEMBERS(Key_register); + NAME_MEMBERS(); private: void read_req(Key_change_req * r); diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 7df7542482..b54fd5623e 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -33,6 +33,7 @@ struct Colinfo; struct Collision; struct Collision_register; struct Command_req; +struct Command_script_req; struct Complex_music; struct Complex_walker; struct Cresc_req; @@ -44,6 +45,7 @@ struct Dynamic; struct Dynamic_req; struct Element_group; struct Feature; +struct General_script_def; struct Group_change_req; struct Group_feature_req; struct Idealspacing; @@ -90,6 +92,7 @@ struct Midi_walker; struct Mixed_qp; struct Molecule; struct Music_general_chord; +struct Musical_script_req; struct Music_voice; struct Musical_req; struct My_lily_parser; @@ -106,7 +109,6 @@ struct PScore; struct Paper_def; struct Partial_measure_req; struct Plet; -struct Plet_req; struct Pulk_voice; struct Pulk_voices; struct Rational; diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 24f48e3115..a80e44196e 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -23,7 +23,7 @@ struct Local_acc { update item if Items are removed */ struct Local_key_item : Item { - NAME_MEMBERS(Local_key_item); + NAME_MEMBERS(); Array<Local_acc> accs; Link_array<Item> support_items_; int c0_position; @@ -31,7 +31,7 @@ struct Local_key_item : Item { /* *************** */ Local_key_item(int c0position); - void add(Item*); + void add_support(Item*); void add(int oct, int pitch, int acc); void add(Melodic_req*); public: diff --git a/lily/include/local-key-reg.hh b/lily/include/local-key-reg.hh index e127801917..98abf99ccd 100644 --- a/lily/include/local-key-reg.hh +++ b/lily/include/local-key-reg.hh @@ -24,7 +24,7 @@ struct Local_key_register : Request_register { virtual void acknowledge_element(Score_elem_info); virtual void pre_move_processing(); Local_key_register(); - NAME_MEMBERS(Local_key_register); + NAME_MEMBERS(); }; #endif // LOCALKEYREG_HH diff --git a/lily/include/lyric-register.hh b/lily/include/lyric-register.hh index 304bf5c6cf..083654e66f 100644 --- a/lily/include/lyric-register.hh +++ b/lily/include/lyric-register.hh @@ -21,7 +21,7 @@ class Lyric_register : public Request_register { virtual void process_requests(); virtual void post_move_processing(); public: - NAME_MEMBERS(Lyric_register); + NAME_MEMBERS(); Lyric_register(); }; #endif // LYRIC_REGISTER_HH diff --git a/lily/include/meter-reg.hh b/lily/include/meter-reg.hh index 300c72da9f..5930ea08d9 100644 --- a/lily/include/meter-reg.hh +++ b/lily/include/meter-reg.hh @@ -24,6 +24,6 @@ public: virtual void pre_move_processing(); virtual void post_move_processing(); Meter_register(); - NAME_MEMBERS(Meter_register); + NAME_MEMBERS(); }; #endif // METERREG_HH diff --git a/lily/include/meter.hh b/lily/include/meter.hh index b923785256..7cd1d40ac3 100644 --- a/lily/include/meter.hh +++ b/lily/include/meter.hh @@ -23,7 +23,7 @@ protected: Molecule*brew_molecule_p() const; public: Meter(Array<Scalar> args) ; - NAME_MEMBERS(Meter); + NAME_MEMBERS(); }; #endif // METER_HH diff --git a/lily/include/minterval.hh b/lily/include/minterval.hh new file mode 100644 index 0000000000..f1c1e1677d --- /dev/null +++ b/lily/include/minterval.hh @@ -0,0 +1,18 @@ +/* + minterval.hh -- declare MInterval + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#ifndef MINTERVAL_HH +#define MINTERVAL_HH + +#include "interval.hh" +#include "moment.hh" + +typedef Interval_t<Moment> MInterval; + +#endif // MINTERVAL_HH diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 0ccb399a03..37021a214e 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -4,27 +4,6 @@ #include "lily-proto.hh" #include "plist.hh" #include "boxes.hh" -#include "symbol.hh" - -/// a symbol which can be translated, and freely copied -struct Atom { - Offset off; - Symbol sym; - - /* *************** */ - - void translate(Offset o) { - off += o; - } - - /// how big is #this#? - Box extent() const; - Atom(Symbol s); - - void print() const; - - String TeX_string() const; -}; /** a group of individually translated symbols. You can add molecules @@ -35,7 +14,7 @@ struct Molecule { /* *************** */ Molecule() { } - Molecule(Atom a) { add(a) ; } + Molecule(Atom const &a) { add(a) ;} void add_right(const Molecule &m); void add_left(const Molecule &m); @@ -43,7 +22,7 @@ struct Molecule { void add_bottom(const Molecule &m); void add(Molecule const &m); void translate(Offset); - void add(Atom a) { ats.bottom().add(new Atom(a)); } + void add(Atom const & a) ; /// how big is #this#? Box extent() const; diff --git a/lily/include/music.hh b/lily/include/music.hh new file mode 100644 index 0000000000..06fbcd7395 --- /dev/null +++ b/lily/include/music.hh @@ -0,0 +1,70 @@ +/* + music.hh -- declare Music + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + + +#ifndef MUSIC_HH +#define MUSIC_HH + +#include "plist.hh" +#include "virtual-methods.hh" +#include "input.hh" +#include "minterval.hh" +#include "lily-proto.hh" + +class Music:public Input { +public: + virtual MInterval time_int()const; + virtual ~Music(){} + void print() const; + virtual void transpose(Melodic_req const *); + virtual void translate(Moment dt); + VIRTUAL_COPY_CONS(Music,Music) + NAME_MEMBERS(); + Music(); +protected: + virtual void do_print() const; + +}; + +class Music_list : public Music { +public: + Music_list(Music_list const&); + Music_list(); + NAME_MEMBERS(); + VIRTUAL_COPY_CONS(Music_list,Music) + virtual void add(Music*); + virtual void transpose(Melodic_req const *); +protected: + Pointer_list<Music*> music_p_list_; + + virtual void do_print() const; +}; + + +class Chord : public Music_list { +public: + NAME_MEMBERS(); + VIRTUAL_COPY_CONS(Chord,Music) + virtual void translate(Moment dt); + virtual MInterval time_int()const; +}; + + +class MVoice : public Music_list { +public: + NAME_MEMBERS(); + VIRTUAL_COPY_CONS(MVoice, Music) + virtual void translate(Moment dt); + virtual MInterval time_int()const; +}; + +#endif // MUSIC_HH + + + diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index ae4a935939..84d1da4440 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -22,6 +22,14 @@ class Musical_req : public virtual Request { public: + virtual Lyric_req* lreq_l() { return 0; } + virtual Note_req *note() { return 0;} + virtual Stem_req *stem() { return 0;} + virtual Melodic_req *melodic() { return 0; } + virtual Slur_req *slur() { return 0 ; } + virtual Beam_req *beam() { return 0 ; } + virtual Rhythmic_req*rhythmic() { return 0; } + virtual Musical_script_req*musicalscript() { return 0; } virtual Skip_req* skip() { return 0; } virtual Dynamic_req* dynamic() { return 0; } virtual Absolute_dynamic_req * absdynamic() { return 0; } @@ -167,21 +175,6 @@ public: }; -/** - request for backward plet generation. - - ugr. Place in hierarchy? - */ -class Plet_req : public virtual Request { -public: - char type_c_; - int dur_i_; - int type_i_; - Plet_req(); - - REQUESTMETHODS(Plet_req,plet); -}; - /** Start / stop a beam at this note. if #nplet# is set, the staff will try to put an appropriate number over the beam */ class Beam_req : public Span_req { @@ -209,23 +202,12 @@ public: }; - -/** Put a script above or below this ``note''. eg upbow, downbow. Why - a request? These symbols may conflict with slurs and brackets, so - this also a request */ -class Script_req : public Musical_req { +class Musical_script_req : public Musical_req, public Script_req { public: - 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(); - Script_req(Script_req const&); + REQUESTMETHODS(Musical_script_req, musicalscript); }; + /** A helper in the hierarchy. Each dynamic is bound to one note ( a crescendo spanning multiple notes is thought to be made of two "dynamics": a start and a stop). Dynamic changes can occur in a diff --git a/lily/include/note-column-reg.hh b/lily/include/note-column-reg.hh index 7925621e65..45b8d4d4fb 100644 --- a/lily/include/note-column-reg.hh +++ b/lily/include/note-column-reg.hh @@ -32,6 +32,6 @@ protected: virtual void post_move_processing(); public: Note_column_register(); - NAME_MEMBERS(Note_column_register); + NAME_MEMBERS(); }; #endif // NOTE_COLUMN_REG_HH diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index 32b1a18e11..805b969bbc 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -33,7 +33,7 @@ public: int dir_i_; - NAME_MEMBERS(Note_column); + NAME_MEMBERS(); Note_column(); void add(Note_head *); void add(Stem *); diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index 4a1bf349eb..c93c1ad205 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -20,7 +20,7 @@ class Note_head : public Item { public: - NAME_MEMBERS(Note_head); + NAME_MEMBERS(); bool rest_b_; int position_i_; @@ -45,6 +45,7 @@ public: static int compare(Note_head * const &a, Note_head *const &b) ; protected: virtual void do_print()const; + virtual void do_pre_processing(); virtual Molecule* brew_molecule_p()const; }; #endif // NOTEHEAD_HH diff --git a/lily/include/parseconstruct.hh b/lily/include/parseconstruct.hh index 4bab4e9083..2059719880 100644 --- a/lily/include/parseconstruct.hh +++ b/lily/include/parseconstruct.hh @@ -11,7 +11,6 @@ String * get_scriptdef(char c); Request* get_script_req(char); -Request* get_plet_request( char c, int dur_i, int type_i ); Request*get_script_req(int d , Script_def*def); Request*get_text_req(int d , Text_def*def); Request* get_stemdir_req(int); diff --git a/lily/include/register-group.hh b/lily/include/register-group.hh index 5e91ae4621..9d13c292f9 100644 --- a/lily/include/register-group.hh +++ b/lily/include/register-group.hh @@ -33,7 +33,7 @@ public: */ virtual void terminate_register(Request_register * reg_l); - NAME_MEMBERS(Register_group_register); + NAME_MEMBERS(); /** Remove #reg_l# from the list, and return it. diff --git a/lily/include/register.hh b/lily/include/register.hh index 641d033112..8ede14b1d3 100644 --- a/lily/include/register.hh +++ b/lily/include/register.hh @@ -111,7 +111,7 @@ public: Request_register(); virtual ~Request_register(){} - NAME_MEMBERS(Request_register); + NAME_MEMBERS(); void print() const; }; diff --git a/lily/include/request.hh b/lily/include/request.hh index f045b36204..6d9343a065 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -31,7 +31,7 @@ public: Request(Request const&); virtual ~Request(){} - NAME_MEMBERS(Request); + NAME_MEMBERS(); virtual Request* clone() const { return new Request(*this); } void print()const ; @@ -42,19 +42,11 @@ public: maybe checkout RTTI */ virtual Barcheck_req *barcheck() { return 0; } - virtual Note_req *note() { return 0;} virtual Script_req *script() { return 0;} - virtual Stem_req *stem() { return 0;} virtual Text_req*text() { return 0; } virtual Rest_req *rest() { return 0; } virtual Span_req *span() { return 0; } - virtual Beam_req *beam() { return 0 ; } - virtual Plet_req* plet() { return 0; } - virtual Slur_req *slur() { return 0 ; } - virtual Rhythmic_req*rhythmic() { return 0; } - virtual Lyric_req* lreq_l() { return 0; } - virtual Melodic_req *melodic() { return 0; } - virtual Spacing_req * spacing() { return 0; } + virtual Spacing_req * spacing() { return 0; } virtual Blank_req * blank() { return 0; } virtual Musical_req *musical() { return 0; } virtual Command_req * command() { return 0; } @@ -64,8 +56,27 @@ protected: #define REQUESTMETHODS(T,accessor) \ virtual T * accessor() { return this;}\ -NAME_MEMBERS(T);\ +NAME_MEMBERS();\ VIRTUAL_COPY_CONS(T, Request)\ virtual void do_print() const + + +/** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why + a request? These symbols may conflict with slurs and brackets, so + this also a request */ +class Script_req : public virtual Request { +public: + int dir_i_; + General_script_def *scriptdef_p_; + + /* *************** */ + static int compare(const Script_req &, const Script_req &); + Script_req(); + REQUESTMETHODS(Script_req,script); + ~Script_req(); + Script_req(Script_req const&); +}; + + #endif diff --git a/lily/include/rest-collision-reg.hh b/lily/include/rest-collision-reg.hh index 39b0b2d10e..a1e1395735 100644 --- a/lily/include/rest-collision-reg.hh +++ b/lily/include/rest-collision-reg.hh @@ -21,6 +21,6 @@ protected: virtual void pre_move_processing(); public: Rest_collision_register(); - NAME_MEMBERS(Rest_collision_register); + NAME_MEMBERS(); }; #endif // REST_COLLISION_REG_HH diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index d470e4178e..8482d66882 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -19,7 +19,7 @@ class Rest_collision : public Item { public: void add(Rest_column*); void add(Collision*); - NAME_MEMBERS(Rest_collision); + NAME_MEMBERS(); protected: virtual void do_post_processing(); virtual void do_substitute_dependency(Score_elem*,Score_elem*); diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh index 803e00a294..4e54241d01 100644 --- a/lily/include/rest-column.hh +++ b/lily/include/rest-column.hh @@ -21,7 +21,7 @@ class Rest_column : public Script_column { public: int dir_i_; void add(Note_head *); - NAME_MEMBERS(Rest_column); + NAME_MEMBERS(); void translate_y(Real dy); Rest_column(); protected: diff --git a/lily/include/score-elem.hh b/lily/include/score-elem.hh index 463c8e2352..d567f8ef02 100644 --- a/lily/include/score-elem.hh +++ b/lily/include/score-elem.hh @@ -10,7 +10,6 @@ #include "parray.hh" #include "lily-proto.hh" #include "offset.hh" -#include "molecule.hh" #include "virtual-methods.hh" #include "directed-graph.hh" @@ -66,7 +65,7 @@ public: virtual ~Score_elem(); Score_elem(); - NAME_MEMBERS(Score_elem); + NAME_MEMBERS(); virtual bool is_type_b(const char *); Interval width() const; diff --git a/lily/include/scoreline.hh b/lily/include/scoreline.hh index 688d95b564..1aa02fa7dd 100644 --- a/lily/include/scoreline.hh +++ b/lily/include/scoreline.hh @@ -20,7 +20,7 @@ public: virtual String TeX_string() const; /* *************** */ - NAME_MEMBERS(Line_of_score); + NAME_MEMBERS(); Line_of_score(); void add_line(Spanner_elem_group *); diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh index 22564d4805..3b94feda7a 100644 --- a/lily/include/script-column.hh +++ b/lily/include/script-column.hh @@ -24,7 +24,7 @@ protected: public: Link_array<Script> script_l_arr_; Link_array<Item> support_l_arr_; - NAME_MEMBERS(Script_column); + NAME_MEMBERS(); void add(Script *); void add_support(Item*); diff --git a/lily/include/script-def.hh b/lily/include/script-def.hh index d45e459d84..8313abad46 100644 --- a/lily/include/script-def.hh +++ b/lily/include/script-def.hh @@ -7,10 +7,15 @@ #ifndef SCRIPTDEF_HH #define SCRIPTDEF_HH #include "string.hh" +#include "general-script-def.hh" /** The characteristics of a certain kind of accent. It is not the accent itself. */ -struct Script_def { +class Script_def : public General_script_def { + /// invert if below staff? + bool invertsym_b_; + String symidx; + /// on the other side of the stem? int rel_stem_dir_i_; @@ -24,16 +29,26 @@ struct Script_def { /// follow the ball inside staff? bool inside_staff_b_; - /// invert if below staff? - bool invertsym_b_; - String symidx; +public: + virtual int staff_dir_i()const; + virtual int rel_stem_dir_i()const; + virtual int priority_i()const; + virtual bool inside_b()const; + virtual Atom get_atom(Paper_def* p, int dir_i_)const; + NAME_MEMBERS(); - /* *************** */ - int compare(Script_def const &); + virtual bool do_equal_b(General_script_def const &)const; void print() const; - Script_def(String, bool, int, int ,bool); + Script_def(); + void set_from_input(String, bool, int, int ,bool); +protected: + VIRTUAL_COPY_CONS(Script_def,General_script_def) + }; + + + #endif // SCRIPTDEF_HH diff --git a/lily/include/script-reg.hh b/lily/include/script-reg.hh index d5a860f378..7fa5294814 100644 --- a/lily/include/script-reg.hh +++ b/lily/include/script-reg.hh @@ -18,7 +18,7 @@ class Script_register : public Request_register { /* *************** */ bool acceptable_elem_b(Score_elem*); public: - NAME_MEMBERS(Script_register); + NAME_MEMBERS(); Script_register(); protected: virtual bool try_request(Request*); diff --git a/lily/include/script.hh b/lily/include/script.hh index e55d252ff1..b48ea8ebd6 100644 --- a/lily/include/script.hh +++ b/lily/include/script.hh @@ -15,14 +15,10 @@ Accents that are put over a note-group. */ class Script : public Item, public Staff_side { - /** - Vertical dir of symbol. -1 means invert the symbol. - */ - int symdir_i_; int pos_i_; - Script_def *specs_l_; + General_script_def *specs_l_; Stem *stem_l_; /* *************** */ @@ -32,7 +28,7 @@ protected: virtual void do_pre_processing(); virtual Interval do_width() const; private: - void set_symdir(); + void set_default_dir(); void set_default_index(); Symbol symbol()const; @@ -40,7 +36,7 @@ public: static int compare(Script *const&, Script *const&) ; Script(Script_req*); void set_stem(Stem*); - NAME_MEMBERS(Script); + NAME_MEMBERS(); }; diff --git a/lily/include/slur-reg.hh b/lily/include/slur-reg.hh index 9ac27e5916..a18d7234b6 100644 --- a/lily/include/slur-reg.hh +++ b/lily/include/slur-reg.hh @@ -27,7 +27,8 @@ protected: virtual void pre_move_processing(); virtual void post_move_processing(); public: - NAME_MEMBERS(Slur_register); + Slur_reg(); + NAME_MEMBERS(); }; #endif // SLURREG_HH diff --git a/lily/include/slur.hh b/lily/include/slur.hh index 98cf4334f2..5731317866 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -21,12 +21,11 @@ public: void add(Note_column*); protected: virtual void set_default_dir(); - virtual void do_break_at( PCol*, PCol*) ; virtual void do_post_processing(); virtual void do_substitute_dependency(Score_elem*, Score_elem*); virtual void do_pre_processing(); SPANNER_CLONE(Slur) - NAME_MEMBERS(Slur); + NAME_MEMBERS(); }; #endif // SLUR_HH diff --git a/lily/include/spanner-elem-group.hh b/lily/include/spanner-elem-group.hh index a23819ac6d..0d91319b63 100644 --- a/lily/include/spanner-elem-group.hh +++ b/lily/include/spanner-elem-group.hh @@ -16,10 +16,9 @@ class Spanner_elem_group : public Spanner, public Element_group { protected: - void do_break_at(PCol*,PCol*); virtual Interval do_width()const; virtual void do_print() const; SPANNER_CLONE(Spanner_elem_group) - NAME_MEMBERS(Spanner_elem_group); + NAME_MEMBERS(); }; #endif // SPANNER_ELEM_GROUP_HH diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 074a555da2..84c85f3e98 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -38,7 +38,7 @@ public: PCol *left_col_l_, *right_col_l_; /* *************** */ - NAME_MEMBERS(Spanner); + NAME_MEMBERS(); virtual Spanner* spanner() { return this; } Spanner(); bool broken_b() const; diff --git a/lily/include/staff-regs.hh b/lily/include/staff-regs.hh index 34138fadf2..8f7bba3485 100644 --- a/lily/include/staff-regs.hh +++ b/lily/include/staff-regs.hh @@ -29,7 +29,7 @@ protected: public: /* *************** */ - NAME_MEMBERS(Staff_registers); + NAME_MEMBERS(); void change_group(Group_change_req * greq_l, Voice_registers *voice_regs_l, Voice_group_registers * old_group); diff --git a/lily/include/staff-sym-reg.hh b/lily/include/staff-sym-reg.hh index b4c6f66173..06303c0aa4 100644 --- a/lily/include/staff-sym-reg.hh +++ b/lily/include/staff-sym-reg.hh @@ -20,7 +20,7 @@ class Staff_sym_register : public Request_register { Moment last_mom_; public: Staff_sym_register(); - NAME_MEMBERS(Staff_sym_register); + NAME_MEMBERS(); protected: virtual void process_requests(); ~Staff_sym_register(); diff --git a/lily/include/staff-sym.hh b/lily/include/staff-sym.hh index c3a49dfc57..dc50a37e0a 100644 --- a/lily/include/staff-sym.hh +++ b/lily/include/staff-sym.hh @@ -23,7 +23,7 @@ public: void set_extent(PCol* p1, PCol* p2); - NAME_MEMBERS(Staff_symbol); + NAME_MEMBERS(); Staff_symbol(int lines); Real inter_note_f()const; int steps_i()const; diff --git a/lily/include/staffline.hh b/lily/include/staffline.hh index f059a1418f..9d9174e688 100644 --- a/lily/include/staffline.hh +++ b/lily/include/staffline.hh @@ -14,7 +14,7 @@ struct Line_of_staff : public Spanner_elem_group{ SPANNER_CLONE(Line_of_staff) public: - NAME_MEMBERS(Line_of_staff); + NAME_MEMBERS(); /* *************** */ /** diff --git a/lily/include/stem-beam-reg.hh b/lily/include/stem-beam-reg.hh index 77729ed1ac..f6b1b5317e 100644 --- a/lily/include/stem-beam-reg.hh +++ b/lily/include/stem-beam-reg.hh @@ -25,7 +25,7 @@ class Stem_beam_register : public Request_register { int default_dir_i_; public: /* *************** */ - NAME_MEMBERS(Stem_beam_register); + NAME_MEMBERS(); Stem_beam_register(); protected: diff --git a/lily/include/stem.hh b/lily/include/stem.hh index dad7e1660f..34cb868d56 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -66,7 +66,7 @@ public: /// ensure that this Stem also encompasses the Notehead #n# void add(Note_head*n); - NAME_MEMBERS(Stem); + NAME_MEMBERS(); Real hpos_f()const; diff --git a/lily/include/super-elem.hh b/lily/include/super-elem.hh index db81347148..e51e1181df 100644 --- a/lily/include/super-elem.hh +++ b/lily/include/super-elem.hh @@ -26,7 +26,7 @@ protected: virtual void handle_broken_dependencies(); virtual void do_add_processing(); - NAME_MEMBERS(Super_elem); + NAME_MEMBERS(); }; #endif // SUPER_ELEM_HH diff --git a/lily/include/swallow-reg.hh b/lily/include/swallow-reg.hh index 2f110866ef..391d0b6472 100644 --- a/lily/include/swallow-reg.hh +++ b/lily/include/swallow-reg.hh @@ -21,6 +21,6 @@ protected: bool acceptable_request_b(Request*) const; bool try_request(Request*) ; public: - NAME_MEMBERS(Swallow_register); + NAME_MEMBERS(); }; #endif // SWALLOW_REG_HH diff --git a/lily/include/symbol.hh b/lily/include/symbol.hh index 6e04d049cf..96fbd7c9b8 100644 --- a/lily/include/symbol.hh +++ b/lily/include/symbol.hh @@ -1,3 +1,11 @@ +/* + symbol.hh -- declare Symbol, Atom + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #ifndef SYMBOL_HH #define SYMBOL_HH @@ -14,4 +22,24 @@ struct Symbol { String str()const; // for printing. }; + +/// a symbol which can be translated, and freely copied +struct Atom { + Offset off; + Symbol sym; + + /* *************** */ + + void translate(Offset o) { + off += o; + } + + /// how big is #this#? + Box extent() const; + Atom(Symbol s); + + void print() const; + + String TeX_string() const; +}; #endif diff --git a/lily/include/text-def.hh b/lily/include/text-def.hh index 0d792590c6..0cc584f742 100644 --- a/lily/include/text-def.hh +++ b/lily/include/text-def.hh @@ -7,11 +7,16 @@ #ifndef TEXT_DEF_HH #define TEXT_DEF_HH +#include "general-script-def.hh" #include "string.hh" #include "lily-proto.hh" #include "input.hh" -class Text_def : public Input { +class Text_def : public General_script_def { +protected: + virtual Atom get_atom(Paper_def* p, int dir_i_)const; + NAME_MEMBERS(); + VIRTUAL_COPY_CONS(Text_def,General_script_def) public: /** centered , or aligned? @@ -19,17 +24,16 @@ public: -1 = raggedright, 0 = center, 1 = raggedleft */ int align_i_; - Paper_def* pdef_l_; + String text_str_; String style_str_; /* *************** */ virtual ~Text_def() {}; - bool compare(const Text_def&); + bool do_equal_b(const Text_def&)const; Text_def(); virtual void print() const; - Atom create_atom() const; - Interval width() const; + Interval width(Paper_def*) const; }; #endif // TEXT_DEF_HH diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index 041db0f26e..16bffcd0d8 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -18,8 +18,7 @@ class Text_item : public Item ,public Staff_side{ void init(Text_def* tdef_l); public: - Text_def * tdef_l(); - Text_def const* tdef_c_l(); + int pos_i_; /// do I have width? @@ -27,12 +26,12 @@ public: /* ***************/ - Text_item(Text_def*,int dir=0); + Text_item(General_script_def*,int dir=0); virtual ~Text_item(); - NAME_MEMBERS(Text_item); + NAME_MEMBERS(); protected: - Text_def* tdef_p_; + General_script_def * tdef_p_; virtual void set_default_index(); virtual Molecule* brew_molecule_p() const; diff --git a/lily/include/text-reg.hh b/lily/include/text-reg.hh index 3bab1d5639..c1f4929044 100644 --- a/lily/include/text-reg.hh +++ b/lily/include/text-reg.hh @@ -23,7 +23,7 @@ protected: virtual void acknowledge_element(Score_elem_info); public: Text_register(); - NAME_MEMBERS(Text_register); + NAME_MEMBERS(); }; #endif // TEXTREG_HH diff --git a/lily/include/text-spanner.hh b/lily/include/text-spanner.hh index a91d8d9691..c7e6ca9a92 100644 --- a/lily/include/text-spanner.hh +++ b/lily/include/text-spanner.hh @@ -16,15 +16,15 @@ class Text_spanner : public Spanner { public: Directional_spanner * support; - Text_def spec; + General_script_def * spec_p_; Offset text_off_; - NAME_MEMBERS(Text_spanner); + NAME_MEMBERS(); void set_support(Directional_spanner*); Text_spanner(); protected: SPANNER_CLONE(Text_spanner) - + ~Text_spanner(); virtual void do_substitute_dependency(Score_elem*,Score_elem*); virtual void do_pre_processing(); virtual void do_post_processing(); diff --git a/lily/include/tie-reg.hh b/lily/include/tie-reg.hh index 9ad241ada1..eb4772b500 100644 --- a/lily/include/tie-reg.hh +++ b/lily/include/tie-reg.hh @@ -34,7 +34,7 @@ protected: virtual void set_feature(Feature); public: Tie_register(); - NAME_MEMBERS(Tie_register); + NAME_MEMBERS(); }; #endif // TIE_REG_HH diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 81c356dd7f..dc3b812f5e 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -28,7 +28,7 @@ public: void set_head(int, Note_head*head_l); Tie(); - NAME_MEMBERS(Tie); + NAME_MEMBERS(); SPANNER_CLONE(Tie) }; #endif // TIE_HH diff --git a/lily/include/voice-element.hh b/lily/include/voice-element.hh index 00e72618c1..6bc85597af 100644 --- a/lily/include/voice-element.hh +++ b/lily/include/voice-element.hh @@ -33,10 +33,8 @@ public: Voice_element(Voice_element const & src ); void add(Request*); - bool find_plet_start_b(char c, Moment& moment_r); void print ()const; void set_default_group(String id); - void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i); }; #endif // VOICE-ELEMENT_HH diff --git a/lily/include/voice-group-regs.hh b/lily/include/voice-group-regs.hh index 243965a191..187b6c147e 100644 --- a/lily/include/voice-group-regs.hh +++ b/lily/include/voice-group-regs.hh @@ -36,7 +36,7 @@ public: Array<Voice_registers*> voice_reg_l_arr_; /* *************** */ - NAME_MEMBERS(Voice_group_registers); + NAME_MEMBERS(); static bool static_acceptable_request_b(Request*); virtual void add(Request_register*); Voice_group_registers(String id, Input_register const *); diff --git a/lily/include/voice-regs.hh b/lily/include/voice-regs.hh index c6e75b7505..5f99de381f 100644 --- a/lily/include/voice-regs.hh +++ b/lily/include/voice-regs.hh @@ -20,7 +20,7 @@ public: /* *************** */ Voice_registers(Voice*, Input_register const*); - NAME_MEMBERS(Voice_registers); + NAME_MEMBERS(); protected: virtual void pre_move_processing(); diff --git a/lily/include/voice.hh b/lily/include/voice.hh index 85c41f72f6..a40142d56f 100644 --- a/lily/include/voice.hh +++ b/lily/include/voice.hh @@ -1,3 +1,11 @@ +/* + voice.hh -- declare Voice + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #ifndef VOICE_HH #define VOICE_HH @@ -29,10 +37,8 @@ struct Voice { Moment last() const; void transpose(Melodic_req const &)const; void add(Voice_element*); - bool find_plet_start_b(char c, Moment& moment_r); void print() const; void set_default_group(String id); - void set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i); }; #endif diff --git a/lily/input-music.cc b/lily/input-music.cc index 840b180c34..2d4527c44a 100644 --- a/lily/input-music.cc +++ b/lily/input-music.cc @@ -5,23 +5,6 @@ #include "command-request.hh" #include "voice-element.hh" -void -Input_music::check_plet(Voice_element* velt_l) -{ - for (iter_top(velt_l->req_p_list_,i); i.ok(); i++) - if ( i->plet() ) { - Moment start_moment = 0; - if ( !find_plet_start_b( i->plet()->type_c_, start_moment ) ) { - i ->error( "begin of plet not found"); - break; - } - Moment moment = 0; - set_plet_backwards( moment, start_moment, i->plet()->dur_i_, i->plet()->type_i_ ); - i.del(); - break; - } -} - void Simple_music::transpose(Melodic_req const &d)const { @@ -73,17 +56,6 @@ Simple_music::print() const mtor << "}\n"; #endif } -bool -Simple_music::find_plet_start_b(char c, Moment& moment_r) -{ - return voice_.find_plet_start_b(c, moment_r); -} -void -Simple_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, - int num_i, int den_i) -{ - voice_.set_plet_backwards(now_moment_r, until_moment, num_i, den_i); -} /* *************** */ @@ -128,22 +100,6 @@ Complex_music::set_default_group(String g) for (iter_top(elts,i); i.ok(); i++) i->set_default_group(g); } -bool -Complex_music::find_plet_start_b(char c, Moment& moment_r) -{ - for (iter_bot(elts,i); i.ok(); i--) { - if ( i->find_plet_start_b(c, moment_r) ) - return true; - } - return false; -} -void -Complex_music::set_plet_backwards(Moment& now_moment_r, Moment until_moment, int num_i, int den_i) -{ - for (iter_bot(elts,i); i.ok(); i--) { - i->set_plet_backwards(now_moment_r, until_moment, num_i, den_i); - } -} /* *************************************************************** */ void @@ -167,8 +123,6 @@ Music_voice::add_elt(Voice_element*v) c = elts.bottom(); Simple_music *s = c->simple(); s->add(v); - - check_plet(v); } Moment @@ -214,8 +168,6 @@ Music_general_chord::add_elt(Voice_element*v) Simple_music*vs = new Simple_music; vs->add(v); elts.bottom().add(vs); - - check_plet(v); } void diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 50aba0bf41..d53299c9e9 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -23,7 +23,7 @@ Local_key_item::Local_key_item(int i) } void -Local_key_item::add(Item*head_l) +Local_key_item::add_support(Item*head_l) { support_items_.push(head_l); add_dependency(head_l); diff --git a/lily/local-key-reg.cc b/lily/local-key-reg.cc index 9569ab10a4..8ce3577f6c 100644 --- a/lily/local-key-reg.cc +++ b/lily/local-key-reg.cc @@ -23,26 +23,39 @@ Local_key_register::Local_key_register() void Local_key_register::pre_move_processing() { + Local_key_item *key_item_p = 0; if (mel_l_arr_.size()) { - Local_key_item *key_item_p = 0; for (int i=0; i < mel_l_arr_.size(); i++) { Item * support_l = support_l_arr_[i]; - Note_req * note_l = mel_l_arr_[i]; + if (tied_l_arr_.find_l(support_l) && - !forced_l_arr_.find_l(support_l)) + !note_l->forceacc_b_) continue; + if( !note_l->forceacc_b_ && + local_key_.oct(note_l->octave_i_).acc(note_l->notename_i_) + == note_l->accidental_i_) + continue; + + + if (!key_item_p) key_item_p = new Local_key_item(*get_staff_info().c0_position_i_l_); key_item_p->add(note_l); - key_item_p->add(support_l); + key_item_p->add_support(support_l); local_key_.oct(note_l->octave_i_) .set(note_l->notename_i_, note_l->accidental_i_); } - if (key_item_p) - typeset_element(key_item_p); + + } + if (key_item_p) { + for(int i=0; i < support_l_arr_.size(); i++) + key_item_p->add_support(support_l_arr_[i]); + + typeset_element(key_item_p); } + mel_l_arr_.set_size(0); tied_l_arr_.set_size(0); support_l_arr_.set_size(0); @@ -53,18 +66,13 @@ void Local_key_register::acknowledge_element(Score_elem_info info) { Score_elem * elem_l = info.elem_l_; - if (info.req_l_->note()) { - Note_req * note_l = info.req_l_->note(); + if (info.req_l_->musical() && info.req_l_->musical()->note()) { + Note_req * note_l = info.req_l_->musical()->note(); Item * item_l = info.elem_l_->item(); - if( note_l->forceacc_b_ || - local_key_.oct(note_l->octave_i_).acc(note_l->notename_i_) - != note_l->accidental_i_) { - mel_l_arr_.push(note_l ); - support_l_arr_.push(item_l); - if (note_l->forceacc_b_) - forced_l_arr_.push(item_l); - } + mel_l_arr_.push(note_l ); + support_l_arr_.push(item_l); + } else if (info.req_l_->command() && info.req_l_->command()->keychange()) { Key_register * key_reg_l = diff --git a/lily/lookup.cc b/lily/lookup.cc index bc6af68d60..dae5ad37b5 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -248,7 +248,7 @@ Lookup::vbrace(Real &y) const y = 67 *2 PT; } - int idx = (y/2.0 - 20 ) + 148; + int idx = int(rint((y/2.0 - 20 ) + 148)); Symbol s = (*symtables_)("param")->lookup("brace"); diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index f8b3de1738..b6d25ea43a 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -106,7 +106,10 @@ Midi_walker::process_requests() } for ( int i = 0; i < ptr()->musicalreq_l_arr_.size(); i++ ) { - Rhythmic_req *n = ptr()->musicalreq_l_arr_[i]->rhythmic(); + Musical_req *m = ptr()->musicalreq_l_arr_[i]->musical(); + if (!m) + return; + Rhythmic_req *n = m->rhythmic(); if ( !n) continue; Note_req * note_l = n->note(); diff --git a/lily/molecule.cc b/lily/molecule.cc index ff047f2c77..c39082ab92 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -1,4 +1,11 @@ -#include "varray.hh" +/* + molecule.cc -- implement Molecule + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #include "interval.hh" #include "dimen.hh" #include "string.hh" @@ -7,41 +14,6 @@ #include "debug.hh" #include "tex.hh" -void -Atom::print() const -{ - mtor << "texstring: " <<sym.tex<<"\n"; -} - -Box -Atom::extent() const -{ - Box b( sym.dim); - b.translate(off); - return b; -} - -Atom::Atom(Symbol s) -{ - sym=s; -} - - -String -Atom::TeX_string() const -{ - /* infinity checks. */ - assert( abs(off.x) < 100 CM); - assert( abs(off.y) < 100 CM); - - // whugh.. Hard coded... - String s("\\placebox{%}{%}{%}"); - Array<String> a; - a.push(print_dimen(off.y)); - a.push(print_dimen(off.x)); - a.push(sym.tex); - return substitute_args(s, a); -} /* *************** */ @@ -148,3 +120,9 @@ Molecule::print() const for (iter_top(ats,c); c.ok(); c++) c->print(); } + +void +Molecule::add(Atom const &a) +{ + ats.bottom().add(new Atom(a)); +} diff --git a/lily/music-list.cc b/lily/music-list.cc new file mode 100644 index 0000000000..3d8f965b8b --- /dev/null +++ b/lily/music-list.cc @@ -0,0 +1,76 @@ +/* + music-list.cc -- implement Music_list, + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#include "music.hh" +#include "debug.hh" + +Music_list::Music_list(Music_list const&s) +{ + for (iter(s.music_p_list_.top(), i); i.ok(); i++) + add(i->clone()); +} + + +IMPLEMENT_STATIC_NAME(Music_list); + +void +Music_list::add(Music*mus_p) +{ + music_p_list_.bottom().add(mus_p); +} + +void +Music_list::transpose(Melodic_req const*m) +{ + for (iter(music_p_list_.top(), i); i.ok(); i++) + i->transpose(m); +} + +void +Music_list::do_print() const +{ + for (iter(music_p_list_.top(), i); i.ok(); i++) + i->print(); +} + +IMPLEMENT_STATIC_NAME(Chord); + +void +Chord::translate(Moment dt) +{ + for (iter(music_p_list_.top(), i); i.ok(); i++) + i->translate(dt); +} + +MInterval +Chord::time_int()const +{ + MInterval m; + for (iter(music_p_list_.top(), i); i.ok(); i++) + m.unite(i->time_int()); + return m; +} + +MInterval +MVoice::time_int() const +{ + Moment last=0; + for (iter(music_p_list_.top(), i); i.ok(); i++) + last += i->time_int().length(); + return MInterval (0,last); +} + +void +MVoice::translate(Moment dt) +{ + for (iter(music_p_list_.top(), i); i.ok(); i++) + i->translate(dt); +} + +IMPLEMENT_STATIC_NAME(MVoice); diff --git a/lily/music.cc b/lily/music.cc new file mode 100644 index 0000000000..155c7e31ff --- /dev/null +++ b/lily/music.cc @@ -0,0 +1,47 @@ +/* + music.cc -- implement Music + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + + +#include "music.hh" +#include "debug.hh" + +MInterval +Music::time_int() const +{ + return MInterval(0,0); +} +void +Music::print()const +{ + #ifndef NPRINT + mtor << name() << "{" ; + do_print(); + mtor << "}\n"; + #endif +} +void +Music::transpose(Melodic_req const*) +{ + +} + +void +Music::translate(Moment ) +{ +} + +void +Music::do_print()const +{ +} + +IMPLEMENT_STATIC_NAME(Music); + + + +Music::Music(){} diff --git a/lily/musical-request.cc b/lily/musical-request.cc index f442db5f9b..bee66ea327 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -164,23 +164,6 @@ Melodic_req::pitch() const return pitch_byte_a[ notename_i_ % 7 ] + accidental_i_ + octave_i_ * 12; } -Plet_req::Plet_req() -{ - type_c_ = ']'; - dur_i_ = 1; - type_i_ = 1; -} - -IMPLEMENT_STATIC_NAME(Plet_req); - -void -Plet_req::do_print() const -{ -#ifndef NPRINT - mtor << "plet: " << type_c_ << ": " << dur_i_ << "/" << type_i_; -#endif -} - /* *************** */ int Rhythmic_req::compare(Rhythmic_req const &r1, Rhythmic_req const &r2) @@ -283,24 +266,23 @@ Span_req::Span_req() } /* *************** */ -Script_req::Script_req(int d , Script_def*def) +Script_req::Script_req(Script_req const&s) { - dir_i_ = d; - scriptdef_p_ = def; + dir_i_ = s.dir_i_; + scriptdef_p_ = s.scriptdef_p_ ? s.scriptdef_p_->clone() : 0; } int Script_req::compare(Script_req const &d1, Script_req const &d2) { return d1.dir_i_ == d2.dir_i_ && - d1.scriptdef_p_->compare(*d2.scriptdef_p_); + d1.scriptdef_p_->equal_b(*d2.scriptdef_p_); } -Script_req::Script_req(Script_req const &s) - : Request( s ) +Script_req::Script_req() { - dir_i_ = s.dir_i_; - scriptdef_p_ = new Script_def(*s.scriptdef_p_); + dir_i_ = 0; + scriptdef_p_ = 0; } IMPLEMENT_STATIC_NAME(Script_req); @@ -312,6 +294,12 @@ Script_req::do_print() const scriptdef_p_->print(); } +void +Musical_script_req::do_print() const +{} + +IMPLEMENT_STATIC_NAME(Musical_script_req); + Script_req::~Script_req() { @@ -322,7 +310,7 @@ int Text_req:: compare(Text_req const &r1, Text_req const &r2) { bool b1 = (r1.dir_i_ == r2.dir_i_); - bool b2 = (r1.tdef_p_ ->compare(*r2.tdef_p_)); + bool b2 = (r1.tdef_p_ ->equal_b(*r2.tdef_p_)); return b1 && b2; } Text_req::~Text_req() @@ -451,3 +439,5 @@ Span_dynamic_req::do_print()const } IMPLEMENT_STATIC_NAME(Tie_req); + + diff --git a/lily/note.cc b/lily/note.cc index 6b00620958..e0c974aa9a 100644 --- a/lily/note.cc +++ b/lily/note.cc @@ -9,7 +9,7 @@ #include "musical-request.hh" #include "command-request.hh" #include "voice.hh" - +#include "script.hh" #include "identifier.hh" #include "varray.hh" #include "text-def.hh" @@ -18,16 +18,6 @@ #include "voice-element.hh" -Request* -get_plet_request( char c, int dur_i, int type_i ) -{ - Plet_req* plet_req_p = new Plet_req; - plet_req_p->dur_i_ = dur_i; - plet_req_p->type_i_ = type_i; - plet_req_p->type_c_ = c; - return plet_req_p; -} - String * get_scriptdef(char c) { @@ -58,7 +48,9 @@ get_scriptdef(char c) Request* get_script_req(int d , Script_def*def) { - Script_req* script_req_p = new Script_req(d, def); + Musical_script_req* script_req_p = new Musical_script_req; + script_req_p->dir_i_ =d; + script_req_p->scriptdef_p_=def; return script_req_p; } diff --git a/lily/notehead.cc b/lily/notehead.cc index ccfffcc2b5..0e55a26a7f 100644 --- a/lily/notehead.cc +++ b/lily/notehead.cc @@ -1,3 +1,11 @@ +/* + notehead.cc -- implement Note_head + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #include "misc.hh" #include "note-head.hh" #include "dimen.hh" @@ -20,12 +28,18 @@ Note_head::Note_head(int ss) rest_b_ = false; } +void +Note_head::do_pre_processing() +{ + // 8 ball looks the same as 4 ball: + if (balltype_i_ > 4 && !rest_b_) + balltype_i_ = 4; +} + void Note_head::set_rhythmic(Rhythmic_req*r_req_l) { balltype_i_ = r_req_l->duration_.type_i_; - if (balltype_i_ > 4) - balltype_i_ = 4; dots_i_ = r_req_l->duration_.dots_i_; } diff --git a/lily/p-score.cc b/lily/p-score.cc index 6bec375634..d6c4a63940 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -243,8 +243,11 @@ PScore::breakable_col_range(PCol*l,PCol*r)const PCursor<PCol*> start(l ? find_col(l)+1 : cols.top() ); PCursor<PCol*> stop(r ? find_col(r) : cols.bottom()); - - while ( start < stop ) { + + /* + ugh! windows-suck-suck-suck. + */ + while ( PCursor<PCol*>::compare(start,stop) < 0 ) { if (start->breakable_b()) ret.push(start); start++; @@ -260,7 +263,11 @@ PScore::col_range(PCol*l,PCol*r)const PCursor<PCol*> start(l ? find_col(l)+1 : cols.top() ); PCursor<PCol*> stop(r ? find_col(r) : cols.bottom()); ret.push(l); - while ( start < stop ) + + /* + ugh! windows-suck-suck-suck. + */ + while ( PCursor<PCol*>::compare(start,stop) < 0 ) ret.push(start++); ret.push(r); return ret; @@ -274,7 +281,10 @@ PScore::broken_col_range(PCol*l,PCol*r)const PCursor<PCol*> start(l ? find_col(l)+1 : cols.top() ); PCursor<PCol*> stop(r ? find_col(r) : cols.bottom()); - while ( start < stop ) { + /* + ugh! windows-suck-suck-suck. + */ + while ( PCursor<PCol*>::compare(start,stop) < 0 ) { if (start->breakable_b() && !start->line_l_ ) ret.push(start); start++; diff --git a/lily/parser.y b/lily/parser.y index 539148422c..532380bc10 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -1,7 +1,7 @@ %{ // -*-Fundamental-*- #include <iostream.h> -#define MUDELA_VERSION "0.0.57" +#define MUDELA_VERSION "0.0.58" #include "script-def.hh" #include "symtable.hh" @@ -174,7 +174,8 @@ yylex(YYSTYPE *s, void * v_l) %type <box> box -%type <c> open_request_parens close_request_parens close_plet_parens +%type <c> open_request_parens close_request_parens +%type <c> open_plet_parens close_plet_parens %type <chord> music_chord music_chord_body init_music_chord %type <el> voice_elt full_element lyrics_elt command_elt %type <i> int @@ -718,10 +719,6 @@ post_requests: $2->set_spot( THIS->here_input()); THIS->post_reqs.push($2); } - | post_requests close_plet_parens INT '/' INT { - THIS->post_reqs.push( THIS->get_parens_request($2) ); - THIS->post_reqs.push( get_plet_request( $2, $3, $5 ) ); - } ; post_request: @@ -737,6 +734,7 @@ pure_post_request: $$->set_spot( THIS->here_input()); } ; + pure_post_request_choice: close_request_parens { $$ = THIS->get_parens_request($1); @@ -753,7 +751,7 @@ pure_post_request_choice: */ steno_melodic_req: NOTENAME_ID { - $$ = $1->clone()->melodic(); + $$ = $1->clone()->musical()->melodic(); $$->octave_i_ += THIS->default_octave_i_; } | steno_melodic_req POST_QUOTES { @@ -801,8 +799,9 @@ dynamic_req: ; close_plet_parens: - ']' { + ']' INT '/' INT { $$ = ']'; + THIS->default_duration_.set_plet($2,$4); } ; @@ -816,6 +815,8 @@ close_request_parens: | ']' { $$ = ']'; } + | close_plet_parens { + } | E_SMALLER { $$ = '<'; } @@ -824,6 +825,13 @@ close_request_parens: } ; +open_plet_parens: + '[' INT '/' INT { + $$ = '['; + THIS->default_duration_.set_plet($2,$4); + } + ; + open_request_parens: E_EXCLAMATION { $$ = '!'; @@ -834,6 +842,8 @@ open_request_parens: | '[' { $$='['; } + | open_plet_parens { + } ; @@ -844,7 +854,8 @@ script_definition: script_body: STRING int int int int { - $$ = new Script_def(*$1,$2, $3,$4,$5); + $$ = new Script_def; + $$->set_from_input(*$1,$2, $3,$4,$5); delete $1; } ; @@ -1014,7 +1025,7 @@ pitch_list: { $$ = new Array<Melodic_req*>; } | pitch_list NOTENAME_ID { - $$->push($2->clone()->melodic()); + $$->push($2->clone()->musical()->melodic()); } ; diff --git a/lily/script-def.cc b/lily/script-def.cc index 2ec888ef65..7d1b09d4af 100644 --- a/lily/script-def.cc +++ b/lily/script-def.cc @@ -1,7 +1,29 @@ +/* + script-def.cc -- implement + + source file of the GNU LilyPond music typesetter + + (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #include "debug.hh" #include "script-def.hh" +#include "symbol.hh" +#include "paper-def.hh" +#include "lookup.hh" + +Script_def::Script_def() +{ + inside_staff_b_ = false; + symidx = "unknown" ; + rel_stem_dir_i_ =0; + staff_dir_i_ = -1; + invertsym_b_ = 0; + priority_i_ =0; +} -Script_def::Script_def(String idx, bool follow, int stem, int staff ,bool invert) +void +Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert) { inside_staff_b_ = follow; symidx = idx ; @@ -11,17 +33,59 @@ Script_def::Script_def(String idx, bool follow, int stem, int staff ,bool inver priority_i_ =0; } + void Script_def::print() const { mtor << "Script_def{ idx: " << symidx << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n"; } -int -Script_def::compare(Script_def const & c) + +bool +Script_def::do_equal_b(General_script_def const &g)const { + Script_def const & c = (Script_def const&) g; return !(symidx == c.symidx && - rel_stem_dir_i_ == c.rel_stem_dir_i_&& - staff_dir_i_ == c.staff_dir_i_&& - invertsym_b_ == c.invertsym_b_); + rel_stem_dir_i_ == c.rel_stem_dir_i_&& + staff_dir_i_ == c.staff_dir_i_&& + invertsym_b_ == c.invertsym_b_); +} + +int +Script_def::staff_dir_i() const +{ + return staff_dir_i_; +} + +int +Script_def::rel_stem_dir_i() const +{ + return rel_stem_dir_i_; +} + +bool +Script_def::inside_b() const +{ + return inside_staff_b_; +} + +Atom +Script_def::get_atom(Paper_def *p , int d)const +{ + String preidx_str =""; + if (invertsym_b_&& d < 0) + preidx_str = "-"; + + return p->lookup_l()->script(preidx_str + symidx); +} + +IMPLEMENT_STATIC_NAME(Script_def); + +int +Script_def::priority_i()const +{ + return priority_i_; } + + + diff --git a/lily/script-reg.cc b/lily/script-reg.cc index be12028c17..b73a6a5fe2 100644 --- a/lily/script-reg.cc +++ b/lily/script-reg.cc @@ -19,8 +19,9 @@ Script_register::Script_register() bool Script_register::try_request(Request *r_l) { - if (!r_l->script()) + if (!r_l->musical() || ! r_l->musical()->musicalscript()) return false ; + for (int i=0; i < script_req_l_arr_.size(); i++) if ( !Script_req::compare(*script_req_l_arr_[i], *r_l->script())) { return true; diff --git a/lily/script.cc b/lily/script.cc index 9ade2eddef..578a885320 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -26,48 +26,32 @@ Script::set_stem(Stem*st_l) Script::Script(Script_req* rq) { specs_l_ = rq->scriptdef_p_; - inside_staff_b_ = specs_l_->inside_staff_b_; + inside_staff_b_ = specs_l_->inside_b(); stem_l_ = 0; pos_i_ = 0; - symdir_i_=1; dir_i_ =rq->dir_i_; } - -void -Script::set_symdir() -{ - if (specs_l_->invertsym_b_) - symdir_i_ = (dir_i_ < 0) ? -1:1; -} - void Script::set_default_dir() { - int s_i=specs_l_->rel_stem_dir_i_; + int s_i=specs_l_->rel_stem_dir_i(); if (s_i && stem_l_) dir_i_ = stem_l_->dir_i_ * s_i; else { - dir_i_ =specs_l_->staff_dir_i_; + dir_i_ =specs_l_->staff_dir_i(); } } void Script::set_default_index() { - pos_i_ = get_position_i(symbol().dim.y); + pos_i_ = get_position_i(specs_l_->get_atom(paper(), dir_i_).extent().y); } Interval Script::do_width() const { - return symbol().dim.x; -} - -Symbol -Script::symbol()const -{ - String preidx_str = (symdir_i_ < 0) ?"-" :""; - return paper()->lookup_l()->script(preidx_str + specs_l_->symidx); + return specs_l_->get_atom(paper(), dir_i_).extent().x; } void @@ -75,7 +59,7 @@ Script::do_pre_processing() { if (!dir_i_) set_default_dir(); - set_symdir(); + } void @@ -89,15 +73,16 @@ Script::brew_molecule_p() const { Real dy = paper()->internote_f(); - Molecule*out = new Molecule(Atom(symbol())); + Molecule*out = new Molecule(specs_l_->get_atom(paper(), dir_i_)); out->translate(Offset(0,dy * pos_i_)); return out; } + IMPLEMENT_STATIC_NAME(Script); int Script::compare(Script *const&l1, Script *const&l2) { - return l1->specs_l_->priority_i_ - l2->specs_l_->priority_i_; + return l1->specs_l_->priority_i() - l2->specs_l_->priority_i(); } diff --git a/lily/slur-reg.cc b/lily/slur-reg.cc index d08488e371..992889d94e 100644 --- a/lily/slur-reg.cc +++ b/lily/slur-reg.cc @@ -16,16 +16,19 @@ bool Slur_register::acceptable_request_b(Request*req_l) { - return req_l->musical() && req_l->musical()->slur(); + Musical_req *mus_l = req_l->musical(); + + return mus_l && mus_l->slur(); } bool Slur_register::try_request(Request *req_l) { - if(!req_l->slur()) + Musical_req *mus_l = req_l->musical(); + if(!mus_l || !mus_l->slur()) return false; - new_slur_req_l_arr_.push(req_l->slur()); + new_slur_req_l_arr_.push(mus_l->slur()); return true; } diff --git a/lily/slur.cc b/lily/slur.cc index 57f6ab649f..3250dc26c9 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -53,18 +53,6 @@ Slur::do_pre_processing() left_col_l_ = encompass_arr_[0]->pcol_l_; } -void -Slur::do_break_at(PCol*l, PCol*r) -{ - assert(l->line_l_ == r->line_l_); - - Array<Note_column*> old_encompass_arr = encompass_arr_; - encompass_arr_.set_size(0); - for (int i =0; i < old_encompass_arr.size(); i++) { - if (old_encompass_arr[i]->pcol_l_->line_l_==l->line_l_) - encompass_arr_.push(old_encompass_arr[i]); - } -} void Slur::do_substitute_dependency(Score_elem*o, Score_elem*n) diff --git a/lily/spanner-elem-group.cc b/lily/spanner-elem-group.cc index 1baf0a61b1..26b5f9fd33 100644 --- a/lily/spanner-elem-group.cc +++ b/lily/spanner-elem-group.cc @@ -9,18 +9,6 @@ #include "p-col.hh" #include "spanner-elem-group.hh" -void -Spanner_elem_group::do_break_at(PCol*c1, PCol*c2 ) -{ - Line_of_score * line_C = c1->line_l_; - Array<Score_elem*> old_elems=elem_l_arr_; - elem_l_arr_.set_size(0); - for (int i=0; i < old_elems.size(); i++) { - if (old_elems[i]->line_l() == line_C) { - add_element(old_elems[i]); - } - } -} IMPLEMENT_STATIC_NAME(Spanner_elem_group); diff --git a/lily/staff-column.cc b/lily/staff-column.cc index 750dd9d00d..55871e0761 100644 --- a/lily/staff-column.cc +++ b/lily/staff-column.cc @@ -51,11 +51,12 @@ Staff_column::add_reqs(Array<Request*> req_l_arr) !c_l->measuregrouping()) setup_one_request(j); } else { - if (j->rhythmic()) { - req_col_l_->musical_column_l_->add_duration(j->rhythmic()->duration()); - } if (j->musical()) { + Musical_req*m = j->musical(); + if (m->rhythmic()) { + req_col_l_->musical_column_l_->add_duration(m->rhythmic()->duration()); + } if(m->skip()) continue; } diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 562b6c3d27..3491b2f20d 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -6,6 +6,7 @@ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> */ +#include "interval.hh" #include "paper-def.hh" #include "dimen.hh" #include "staff-side.hh" diff --git a/lily/staff-sym.cc b/lily/staff-sym.cc index ea17b178f6..8624878496 100644 --- a/lily/staff-sym.cc +++ b/lily/staff-sym.cc @@ -8,6 +8,7 @@ #include "staff-sym.hh" #include "lookup.hh" #include "paper-def.hh" +#include "molecule.hh" #include "debug.hh" diff --git a/lily/stem-beam-reg.cc b/lily/stem-beam-reg.cc index 9fed099da2..8f85238abf 100644 --- a/lily/stem-beam-reg.cc +++ b/lily/stem-beam-reg.cc @@ -28,26 +28,37 @@ Stem_beam_register::Stem_beam_register() bool Stem_beam_register::try_request(Request*req_l) { - if ( req_l->beam() ) { - if (bool(beam_p_ ) == bool(req_l->beam()->spantype == Span_req::START)) + + Musical_req* mus_l = req_l->musical(); + /* Debiele puntkomma's. Laat je er eentje per ongeluk achter een + if(..) staan, lijkt het net op een luis in gcc. + + (ofwel Python rules) + */ + if (!mus_l) + return false; + + + if ( mus_l->beam() ) { + if (bool(beam_p_ ) == bool(mus_l->beam()->spantype == Span_req::START)) return false; - if (beam_req_l_ && Beam_req::compare(*beam_req_l_ , *req_l->beam())) + if (beam_req_l_ && Beam_req::compare(*beam_req_l_ , *mus_l->beam())) return false; - beam_req_l_ = req_l->beam(); + beam_req_l_ = mus_l->beam(); return true; } - if ( req_l->stem() ) { + if ( mus_l->stem() ) { if (current_grouping && !current_grouping->child_fit_b( get_staff_info().time_C_->whole_in_measure_)) return false; - if (stem_req_l_ && Stem_req::compare(*stem_req_l_, *req_l->stem())) + if (stem_req_l_ && Stem_req::compare(*stem_req_l_, *mus_l->stem())) return false; - stem_req_l_ = req_l->stem(); + stem_req_l_ = mus_l->stem(); return true; } return false; @@ -67,10 +78,12 @@ Stem_beam_register::process_requests() current_grouping = new Rhythmic_grouping; if (beam_req_l_->nplet) { Text_spanner* t = new Text_spanner(); + Text_def *defp = new Text_def; t->set_support(beam_p_); - t->spec.align_i_ = 0; - t->spec.text_str_ = beam_req_l_->nplet; - t->spec.style_str_="italic"; + defp->align_i_ = 0; + defp->text_str_ = beam_req_l_->nplet; + defp->style_str_="italic"; + t->spec_p_ = defp; typeset_element(t); } @@ -107,7 +120,8 @@ Stem_beam_register::acknowledge_element(Score_elem_info info) return; if (info.elem_l_->name() == Note_head::static_name() && - stem_req_l_->duration() == info.req_l_->rhythmic()->duration()){ + stem_req_l_->duration() + == info.req_l_->musical()->rhythmic()->duration()){ Note_head * n_l= (Note_head*)info.elem_l_->item(); stem_p_->add(n_l); } diff --git a/lily/super-elem.cc b/lily/super-elem.cc index 4db5cff606..792f97f503 100644 --- a/lily/super-elem.cc +++ b/lily/super-elem.cc @@ -9,6 +9,7 @@ #include "super-elem.hh" #include "scoreline.hh" #include "p-score.hh" +#include "string.hh" String Super_elem::TeX_string()const diff --git a/lily/template1.cc b/lily/template1.cc index 875c711482..676fb4b7fb 100644 --- a/lily/template1.cc +++ b/lily/template1.cc @@ -15,7 +15,6 @@ #include "spanner.hh" #include "scoreline.hh" #include "staffline.hh" - #include "pcursor.tcc" #include "plist.tcc" diff --git a/lily/template2.cc b/lily/template2.cc index d9d3f99cda..1115253ce5 100644 --- a/lily/template2.cc +++ b/lily/template2.cc @@ -6,6 +6,7 @@ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> */ +#include "music.hh" #include "symbol.hh" #include "voice.hh" #include "voice-element.hh" @@ -25,3 +26,4 @@ IPL_instantiate(Voice_element); IPL_instantiate(Voice); +IPL_instantiate(Music); diff --git a/lily/template3.cc b/lily/template3.cc index 50208175e5..42a48125f0 100644 --- a/lily/template3.cc +++ b/lily/template3.cc @@ -1,3 +1,12 @@ +/* + template3.cc -- instantiate Atom + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + +#include "symbol.hh" #include "request.hh" #include "input-score.hh" #include "input-staff.hh" diff --git a/lily/text-def.cc b/lily/text-def.cc index a601d4367c..a9e95ef68d 100644 --- a/lily/text-def.cc +++ b/lily/text-def.cc @@ -1,3 +1,11 @@ +/* + text-def.cc -- implement Text_def + + source file of the GNU LilyPond music typesetter + + (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl> +*/ + #include "debug.hh" #include "lookup.hh" #include "paper-def.hh" @@ -6,9 +14,9 @@ #include "dimen.hh" Interval -Text_def::width() const +Text_def::width(Paper_def * p) const { - Atom a = create_atom(); + Atom a = get_atom(p,0); Real guess_width_f = text_str_.length_i() * a.sym.dim.x.length(); // ugh Interval i(0, guess_width_f); @@ -20,20 +28,19 @@ Text_def::width() const Text_def::Text_def() { align_i_ = 1; // right - pdef_l_ = 0; style_str_ = "roman"; } bool -Text_def::compare(Text_def const &def) +Text_def::do_equal_b(Text_def const &def)const { return align_i_ == def.align_i_ && text_str_ == def.text_str_ && style_str_ == def.style_str_; } Atom -Text_def::create_atom() const +Text_def::get_atom(Paper_def *p, int ) const { - return pdef_l_->lookup_l()->text(style_str_, text_str_, -align_i_); + return p->lookup_l()->text(style_str_, text_str_, -align_i_); } void @@ -42,3 +49,4 @@ Text_def::print() const mtor << "Text `" << text_str_ << "\', style " << style_str_ << "align " << align_i_ << '\n'; } +IMPLEMENT_STATIC_NAME(Text_def); diff --git a/lily/text-item.cc b/lily/text-item.cc index cc6f7f9b13..9d661f405f 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -14,20 +14,14 @@ #include "molecule.hh" #include "lookup.hh" -Text_item::Text_item(Text_def *tdef_l, int d) +Text_item::Text_item(General_script_def*tdef_l, int d) { dir_i_ = d; fat_b_ = false; - tdef_p_ = new Text_def(*tdef_l); + tdef_p_ = tdef_l->clone(); pos_i_ =0; } -Text_def* -Text_item::tdef_l() -{ - return tdef_p_; -} - Text_item::~Text_item() { delete tdef_p_; @@ -36,7 +30,8 @@ Text_item::~Text_item() void Text_item::set_default_index() { - pos_i_ = get_position_i(tdef_p_->create_atom().extent().y ); + pos_i_ = get_position_i( + tdef_p_->get_atom(paper(), dir_i_).extent().y ); } void @@ -44,7 +39,6 @@ Text_item::do_pre_processing() { if (!dir_i_) dir_i_ = -1; - tdef_p_->pdef_l_ = paper(); } void @@ -57,11 +51,12 @@ Text_item::do_post_processing() Molecule* Text_item::brew_molecule_p() const { - Atom a(tdef_p_->create_atom()); - - if ( fat_b_) - a.sym.dim.x = tdef_p_->width(); + Atom a(tdef_p_->get_atom(paper(), dir_i_)); +/* + if ( fat_b_) + a.sym.dim.x = tdef_p_->width(paper()); + */ Molecule* mol_p = new Molecule(a); if(dir_i_<0 ) // should do something better anyway. diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 6883dab0b0..ceaacd8793 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -12,7 +12,7 @@ #include "text-def.hh" #include "debug.hh" #include "paper-def.hh" - +#include "symbol.hh" void @@ -27,6 +27,7 @@ Text_spanner::set_support(Directional_spanner*d) Text_spanner::Text_spanner() { + spec_p_ = 0; support = 0; } @@ -35,27 +36,20 @@ IMPLEMENT_STATIC_NAME(Text_spanner); void Text_spanner::do_print() const { - spec.print(); + spec_p_->print(); } void Text_spanner::do_post_processing() { - switch(spec.align_i_) { - case 0: - text_off_ = support->center() + - Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo - break; - default: - assert(false); - break; - } + text_off_ = support->center() + + Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo } Molecule* Text_spanner::brew_molecule_p() const { - Atom tsym (spec.create_atom()); + Atom tsym (spec_p_->get_atom(paper(),0)); tsym.translate(text_off_); Molecule*output = new Molecule; @@ -69,7 +63,6 @@ Text_spanner::do_pre_processing() right_col_l_ = support->right_col_l_; left_col_l_ = support->left_col_l_; assert(left_col_l_ && right_col_l_); - spec.pdef_l_ = paper(); } Interval @@ -86,3 +79,8 @@ Text_spanner::do_substitute_dependency(Score_elem* o, Score_elem*n) support = (Directional_spanner*) n->spanner(); } + +Text_spanner::~Text_spanner() +{ + delete spec_p_; +} diff --git a/lily/voice-element.cc b/lily/voice-element.cc index cb806831a4..f08aa773ef 100644 --- a/lily/voice-element.cc +++ b/lily/voice-element.cc @@ -69,17 +69,6 @@ Voice_element::Voice_element(Voice_element const&src) add(i->clone()); } -bool -Voice_element::find_plet_start_b(char c, Moment& moment_r)// b unused? -{ - assert( c == ']' ); - moment_r += duration_; - for ( PCursor<Request*> i( req_p_list_.top() ); i.ok(); i++ ) { - if (i->beam() && i->beam()->spantype == Span_req::START ) - return true; - } - return false; -} void Voice_element::set_default_group(String s) @@ -92,20 +81,3 @@ Voice_element::set_default_group(String 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*> i( req_p_list_.top() ); i.ok(); i++ ) { - if (i->beam() && i->beam()->spantype == Span_req::START ) - i->beam()->nplet = den_i; - if (i->rhythmic()) { - i->rhythmic()->duration_.plet_.type_i_ = den_i; - i->rhythmic()->duration_.plet_.iso_i_ = num_i; - - } - } -} diff --git a/lily/voice.cc b/lily/voice.cc index 536715d0cb..f248f3aa0e 100644 --- a/lily/voice.cc +++ b/lily/voice.cc @@ -29,26 +29,6 @@ Voice::set_default_group(String s) elts_.top()->set_default_group(s); } -bool -Voice::find_plet_start_b(char c, Moment& moment_r) -{ - for (iter_bot(elts_, i); i.ok(); i--) - if ( i->find_plet_start_b(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++) diff --git a/make/Configure_variables.make.in b/make/Configure_variables.make.in index 1eb6747788..3a4b0fe668 100644 --- a/make/Configure_variables.make.in +++ b/make/Configure_variables.make.in @@ -3,9 +3,12 @@ # @configure_input@ INSTALL = @INSTALL@ -USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ +USER_CXXFLAGS = +USER_LDFLAGS = CXX = @CXX@ +ICFLAGS = @ICFLAGS@ +ILDFLAGS = @ILDFLAGS@ libdir = @libdir@ prefix = @prefix@ TEXPREFIX = @TEXPREFIX@ diff --git a/make/Files.make b/make/Files.make index 476aa2b462..ee10f99371 100644 --- a/make/Files.make +++ b/make/Files.make @@ -32,4 +32,4 @@ DEPFILES = $(wildcard $(depdir)/*.dep) build = $(outdir)/.build -all-tag-sources=$(CCFILES) $(HHFILES) +all-tag-sources=$(CCFILES) $(HHFILES) $(TCCFILES) diff --git a/make/Rules.make b/make/Rules.make index 36986881e5..d9e51b11c0 100644 --- a/make/Rules.make +++ b/make/Rules.make @@ -76,3 +76,5 @@ $(depth)/%.text: check-doc-deps rm -f $@ ln `find ${depth}/Documentation -name $@|head -1` . +$(outdir)/%.xpm: %.gif + giftopnm $< | ppmtoxpm > $@ diff --git a/make/Targets.make b/make/Targets.make index 4c29b154a8..d196e1679f 100644 --- a/make/Targets.make +++ b/make/Targets.make @@ -100,17 +100,19 @@ config: dummydep: $(DUMMYDEPS) # -# value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-) +# value of $(OSTYPE) on windhoos...; "make $OSTYPE" if you use bash :-) # -win32: - $(MAKE) -C . CXX=g++ +win32: windows32 # win/lose? +# +windows32: + $(MAKE) -C . "CXX=g++ -D_WINDOWS32" # # xcompile to doze: # doze: dos dos: - $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WIN32 -Dcaddr_t=char* -DMAP_SHARED=0" + $(MAKE) -C . CXX="gcc-go32 -I/usr/i386-go32/include -I/usr/i386-go32/include/g++ -D_WINDOWS32 -Dcaddr_t=char* -DMAP_SHARED=0" # # target help: @@ -123,7 +125,7 @@ help: @echo " all clean config dist distclean doc doc++" @echo " exe help lib moduledist TAGS" @echo " dos: xcomplile to dos" - @echo " win32: native cygnus-win32 compile" + @echo " windows32: native cygnus-gnu compile" # doc: @@ -165,7 +167,8 @@ endif TAGS:$(all-tag-sources) ifdef all-tag-sources - -etags -CT $(all-tag-sources) /dev/null + -etags -CT $(all-tag-sources) $(ERROR_LOG) + -ctags -CT $(all-tag-sources) $(ERROR_LOG) endif ifdef SUBDIRS set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done @@ -220,9 +223,9 @@ $(LIBLILY): dummy # RedHat rpm package: # -rpm: +rpm: $(doc-dir)/$(outdir)/lelie_icon.xpm -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources) - -cp $(doc-dir)/*.gif $(rpm-sources) + -cp $< $(rpm-sources) $(MAKE) -C $(make-dir) spec rpm -ba $(makeout)/lilypond.spec # @@ -232,7 +235,7 @@ installexe: $(INSTALL) -m 755 $(EXECUTABLES) $(bindir) uninstallexe: - for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $a`; done + for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $$a`; done ifneq ($(DEPFILES),) include $(DEPFILES) diff --git a/make/Variables.make b/make/Variables.make index 9ddf1d5691..fb02450501 100644 --- a/make/Variables.make +++ b/make/Variables.make @@ -118,7 +118,7 @@ LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX) # compile and link options: # ARFLAGS = ru -CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS) +CFLAGS = $(ICFLAGS) $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS) # added two warnings that are treated by cygwin32's gcc 2.7.2 as errors. # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1? @@ -130,7 +130,7 @@ EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversio CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS) INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) CXX_OUTPUT_OPTION = $< -o $@ -LDFLAGS = $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/out -L$(depth)/flower/out +LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/out -L$(depth)/flower/out LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ # need lg++ for win32, really! # diff --git a/make/lilypond.lsm b/make/lilypond.lsm index 4450e5f0fc..be27647870 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -2,8 +2,8 @@ Begin3 Title: LilyPond -Version: 0.0.66 -Entered-date: 05/28/97 +Version: 0.0.67 +Entered-date: 05/29/97 Description: LilyPond is a program which converts a music-script (mudela) into TeX output, or MIDI to produce multi-staff scores. Features include multiple meters, clefs, keys, lyrics, versatile input-language, cadenzas @@ -13,7 +13,7 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: pcnov095.win.tue.nl /pub/lilypond/ - 300k lilypond-0.0.66.tar.gz + 300k lilypond-0.0.67.tar.gz Alternate-site: Original-site: Platform: unix/win32, GNU C++ diff --git a/make/lilypond.spec b/make/lilypond.spec index 6b06b219e6..1c1010ca7f 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,13 +1,13 @@ Name: lilypond -Version: 0.0.66 +Version: 0.0.67 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.66.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.67.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys <hanwen@stack.nl> -Icon: lelie_icon.gif +Icon: lelie_icon.xpm Buildroot: /tmp/lilypond_build %description @@ -39,7 +39,6 @@ make prefix="$RPM_BUILD_ROOT/usr" install /usr/lib/texmf/texmf/tex/lilypond/ /usr/lib/texmf/texmf/fonts/source/lilypond/ /usr/share/lilypond/ - %post -echo please run texhash to update TeX directory listings +echo please run texhash to update TeX directory listings 1>&2 diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index 994215d0f3..9eb34ddb3c 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -7,7 +7,7 @@ Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-@TOPLEVEL_VERSION@.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys <hanwen@stack.nl> -Icon: lelie_icon.gif +Icon: lelie_icon.xpm Buildroot: /tmp/lilypond_build %description @@ -39,7 +39,6 @@ make prefix="$RPM_BUILD_ROOT/usr" install /usr/lib/texmf/texmf/tex/lilypond/ /usr/lib/texmf/texmf/fonts/source/lilypond/ /usr/share/lilypond/ - %post -echo please run texhash to update TeX directory listings +echo please run texhash to update TeX directory listings 1>&2 diff --git a/mi2mu/TODO b/mi2mu/TODO index 5fb343a0ca..01de76df27 100644 --- a/mi2mu/TODO +++ b/mi2mu/TODO @@ -6,6 +6,10 @@ grep for TODO and ugh/ugr IMPORTANT + * remove silly #warning using midi_voice list + + * add mi2mu example output (.midi.ly and .gif) to website + * important? lily is important, go work on lily! * faq about mi2mu midi t1. ? diff --git a/mi2mu/lily-stream.cc b/mi2mu/lily-stream.cc index 5bae914fec..8e6806564b 100644 --- a/mi2mu/lily-stream.cc +++ b/mi2mu/lily-stream.cc @@ -107,7 +107,7 @@ Lily_stream::header() *os_p_ << "% from input file: "; *os_p_ << midi_parser_l_g->filename_str_; *os_p_ << "\n\n"; - *os_p_ << "\\version \"0.0.57\";\n"; + *os_p_ << "\\version \"0.0.58\";\n"; } /* snapnie: dit kan toch automaties? Zie ook dstream. diff --git a/mi2mu/main.cc b/mi2mu/main.cc index 43951e41c2..f447a181db 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -77,7 +77,7 @@ int main( int argc_i, char* argv_sz_a[] ) { Long_option_init long_option_init_a[] = { - {0, "be-blonde", 'b'}, + {0, "no-quantify", 'b'}, {0, "debug", 'd'}, {0, "help", 'h'}, {0, "no-silly", 'n'}, diff --git a/tex/dimen.tex b/tex/dimen.tex index 35b7e4df43..093956cca9 100644 --- a/tex/dimen.tex +++ b/tex/dimen.tex @@ -1,7 +1,7 @@ % % A tex file to help determine dims. % -\font\musicfont=musixsps +\font\musicfont=musix20 \font\slurfont=xslu16 \def\thefont{\musicfont} diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 5bc96a07a6..30d2d34c1a 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -13,7 +13,7 @@ \def\SkipLilydefs{} \fi \SkipLilydefs -% should use \endinput + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % macros to shorten other definitions @@ -44,15 +44,11 @@ \newdimen\smallspace \newdimen\interlinedist \newcount\n -\newdimen\balkhoog +\newdimen\balkheight \newdimen\notewidth \newdimen\noteheight -\newdimen\notewidthhalf -\newdimen\notewidthdouble -\newdimen\notewidthquart \newdimen\staffrulethickness \newdimen\interstaffrule -\newdimen\balkhalf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set fonts and primary dimensions @@ -70,7 +66,7 @@ \font\italicfont=cmti10 \font\dynfont=cmbxti10 scaled \magstep1 \font\mathfont=cmsy10 - \balkhoog=20pt + \balkheight=20pt \notewidth=6pt \noteheight=5pt \staffrulethickness=0.4pt @@ -92,7 +88,7 @@ \font\dynfont=cmbxti12 \font\musicdraw=musixsps \font\mathfont=cmsy8 - \balkhoog=16pt + \balkheight=16pt \staffrulethickness=0.4pt \notewidth=5pt \noteheight=4pt @@ -105,16 +101,8 @@ \def\musixcalc{ \interlinedist=\fontdimen5\musicfnt \smallspace=.3\interlinedist - \interstaffrule=\balkhoog + \interstaffrule=\balkheight \divide\interstaffrule by 4 - \notewidthhalf=\notewidth - \notewidthquart=\notewidth - \notewidthdouble=\notewidth - \rationalmultiply \notewidthhalf*1/2 - \rationalmultiply\notewidthquart*1/4 - \multiply \notewidthdouble by 2 - \balkhalf=\balkhoog - \rationalmultiply\balkhalf*1/2 } % dynamics take extra kerning @@ -134,96 +122,19 @@ \def\dynfff{\dynff\kdynf} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% provide interface to musixtex fonts -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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\sixtyfourthrest{66} -\mdef\hundredtwentyeighthrest{67} -\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\deighthflag{45} -\mdef\dsixteenthflag{46} -\mdef\dthirtysecondflag{47} -\mdef\dsixtyfourthflag{48} -\mdef\dhundredtwentyeighthflag{49} - -% pointing up -\mdef\ueighthflag{40} -\mdef\usixteenthflag{41} -\mdef\uthirtysecondflag{42} -\mdef\usixtyfourthflag{43} -\mdef\uhundredtwentyeighthflag{44} - -\maccentdef\repeatcolon{55}{2/1} -\def\eighthflag{\topalign{\ueighthflag}} -\def\sixteenthflag{\topalign{\usixteenthflag}} -\def\thirtysecondflag{\topalign{\uthirtysecondflag}} -\def\sixtyfourthflag{\topalign{\usixtyfourthflag}} -\def\hundredtwentyeighthflag{\topalign{\uhundredtwentyeighthflag}} - -\def\cquartrest{\vertcenter\quartrest} -\def\ceighthrest{\vertcenter\eighthrest} -\def\csixteenthrest{\vertcenter\sixteenthrest} -\def\cthirtysecondrest{\vertcenter\thirtysecondrest} -\def\csixtyfourthrest{\vertcenter\sixtyfourthrest} -\def\chundredtwentyeighthrest{\vertcenter\hundredtwentyeighthrest} - -\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/3} -\maccentdef\istaccato{25}{1/3} -\maccentdef\staccatissimo{28}{-5/5} -\maccentdef\istaccatissimo{29}{2/5} -\maccentdef\portato{18}{-6/5} -\maccentdef\iportato{19}{3/5} -\maccentdef\tenuto{26}{-1/1} -\maccentdef\itenuto{27}{1/1} -\maccentdef\fermata{80}{-1/1} -\maccentdef\ifermata{81}{1/1} - -\mdef\spicato{28} -\mdef\ispicato{29} -\mdef\upbow{23} -\mdef\downbow{22} +\input taupindefs \mathdef\cup{91} % \cup \mathdef\wedge{94} % \wedge \mathdef\striepke{0} % heu? %% custom characters --- this should go: add to (meta!) font -\def\myheel{\kern-.5ex\vbox{\cup}\kern-.5ex} -\def\mytoe{\kern-.5ex\vbox{\wedge}\kern-.5ex} -\def\mystriepke{\kern-1.1ex\vbox{\hbox{\kern-.05em\striepke}}\kern-1.1ex} +% \def\myheel{\kern-.5ex\vbox{\cup}\kern-.5ex} +% \def\mytoe{\kern-.5ex\vbox{\wedge}\kern-.5ex} +\def\myheel{\vbox{\cup}} +\def\mytoe{\vbox{\wedge}} +% \def\mystriepke{\kern-1.1ex\vbox{\hbox{\kern-.05em\striepke}}\kern-1.1ex} +\def\mystriepke{\kern-1.8ex\vbox{\hbox{\kern-.05em\striepke}}\kern-1.8ex} \def\heel{\vbox{\myheel}} \def\toe{\vbox{\mytoe}} @@ -239,8 +150,8 @@ \def\emptybar{} -\def\thinbar{\vrule height\balkhoog width0.8pt} % TODO parametric. -\def\thickbar{\vrule height\balkhoog width 2\smallspace} +\def\thinbar{\vrule height\balkheight width 1.6\staffrulethickness} % TODO parametric. +\def\thickbar{\vrule height\balkheight width 2\smallspace} \def\maatstreep{\thinbar} %? what-s wrong with rightalign? @@ -267,18 +178,18 @@ \def\hslurcharu#1{{\hslurufont\char#1}} \def\hslurchard#1{{\hslurdfont\char#1}} % stacked numbers -\def\generalmeter#1#2{\botalign{\vbox to\balkhalf{\vss \meterfont#1}% +\def\generalmeter#1#2{\botalign{\vbox to0.5\balkheight{\vss \meterfont#1}% \nointerlineskip - \vbox to \balkhalf{\vss\meterfont #2}}} + \vbox to 0.5\balkheight{\vss\meterfont #2}}} % stacked horizontal lines -\def\lines#1#2{% +\def\lines#1#2#3{% \vbox{\kern-\interstaffrule \n=0\nointerlineskip% \loop\ifnum\n<#1\advance\n by1% \kern\interstaffrule \nointerlineskip - \vbox to 0pt{\hrule height \staffrulethickness width#2% + \vbox to 0pt{\hrule height #3 width#2% \vss}\nointerlineskip \repeat }} @@ -287,15 +198,15 @@ % Ugh. Need to redo this. Wish we had PS. % \def\toplines#1{ % why space needed here? - \topalign{\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}}} + \topalign{\hbox{\kern-\notewidth\lines{#1}{1.6\notewidth}{1.6\staffrulethickness}}}} \def\botlines#1{ % idem ditto - \botalign{\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}}} + \botalign{\hbox{\kern-\notewidth\lines{#1}{1.6\notewidth}{1.6\staffrulethickness}}}} % % a staffsymbol with #1 lines, width #2 % bottom at baseline -\def\linestafsym#1#2{\leftalign{\botalign{\lines{#1}{#2}}}} +\def\linestafsym#1#2{\leftalign{\botalign{\lines{#1}{#2}{\staffrulethickness}}}} \def\stem#1#2{\vrule height#2 depth-#1} diff --git a/tex/taupindefs.tex b/tex/taupindefs.tex new file mode 100644 index 0000000000..f1cda10fcb --- /dev/null +++ b/tex/taupindefs.tex @@ -0,0 +1,82 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% provide interface to musixtex fonts +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\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\sixtyfourthrest{66} +\mdef\hundredtwentyeighthrest{67} +\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\deighthflag{45} +\mdef\dsixteenthflag{46} +\mdef\dthirtysecondflag{47} +\mdef\dsixtyfourthflag{48} +\mdef\dhundredtwentyeighthflag{49} + +% pointing up +\mdef\ueighthflag{40} +\mdef\usixteenthflag{41} +\mdef\uthirtysecondflag{42} +\mdef\usixtyfourthflag{43} +\mdef\uhundredtwentyeighthflag{44} + +\maccentdef\repeatcolon{55}{2/1} +\def\eighthflag{\topalign{\ueighthflag}} +\def\sixteenthflag{\topalign{\usixteenthflag}} +\def\thirtysecondflag{\topalign{\uthirtysecondflag}} +\def\sixtyfourthflag{\topalign{\usixtyfourthflag}} +\def\hundredtwentyeighthflag{\topalign{\uhundredtwentyeighthflag}} + +\def\cquartrest{\vertcenter\quartrest} +\def\ceighthrest{\vertcenter\eighthrest} +\def\csixteenthrest{\vertcenter\sixteenthrest} +\def\cthirtysecondrest{\vertcenter\thirtysecondrest} +\def\csixtyfourthrest{\vertcenter\sixtyfourthrest} +\def\chundredtwentyeighthrest{\vertcenter\hundredtwentyeighthrest} + +\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/3} +\maccentdef\istaccato{25}{1/3} +\maccentdef\staccatissimo{28}{-5/5} +\maccentdef\istaccatissimo{29}{2/5} +\maccentdef\portato{18}{-6/5} +\maccentdef\iportato{19}{3/5} +\maccentdef\tenuto{26}{-1/1} +\maccentdef\itenuto{27}{1/1} +\maccentdef\fermata{80}{-1/1} +\maccentdef\ifermata{81}{1/1} + +\mdef\spicato{28} +\mdef\ispicato{29} +\mdef\upbow{23} +\mdef\downbow{22} -- 2.39.5