From 068b30ff4bfe81e6dd41ac3736bbc52980e79a1f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 9 Oct 1998 17:17:39 +0200 Subject: [PATCH] release: 1.0.14 --- AUTHORS.txt | 75 +++ Documentation/tex/refman.yo | 6 +- Documentation/tex/tutorial.yo | 358 +++++++------- INSTALL.txt | 488 +++++++++++++++++++ NEWS | 48 +- PATCHES.txt | 224 +++++++++ README.txt | 92 ++++ TODO | 56 +++ VERSION | 4 +- buildscripts/mf-to-xpms.sh | 2 +- debian/control | 6 + flower/include/interval.tcc | 18 +- flower/interval.cc | 6 +- init/book-fragment.ly | 10 +- init/center-fragment.ly | 11 +- init/engraver.ly | 24 +- init/fragment.ly | 13 +- init/paper16.ly | 3 +- init/paper20.ly | 2 +- init/performer.ly | 18 +- init/table11.ly | 78 +-- init/table13.ly | 78 +-- init/table16.ly | 86 ++-- init/table20.ly | 90 ++-- init/table26.ly | 78 +-- lib/include/duration-convert.hh | 2 +- lib/include/moment.hh | 12 +- lily/abbrev.cc | 1 - lily/abbreviation-beam.cc | 1 - lily/atom.cc | 8 +- lily/bar-number-engraver.cc | 1 - lily/beam.cc | 2 +- lily/bezier.cc | 2 +- lily/break-align-item.cc | 2 +- lily/crescendo.cc | 2 +- lily/dimen.cc | 46 -- lily/header.cc | 4 +- lily/include/{dimension.hh => dimensions.hh} | 9 +- lily/include/direction.hh | 2 +- lily/include/lookup.hh | 21 +- lily/include/main.hh | 2 +- lily/include/p-score.hh | 8 +- lily/include/ps-lookup.hh | 20 +- lily/include/tex-lookup.hh | 9 + lily/include/tex.hh | 35 -- lily/line-of-score.cc | 1 - lily/local-key-item.cc | 1 - lily/lookup.cc | 85 +++- lily/main.cc | 9 +- lily/molecule.cc | 2 - lily/multi-measure-rest.cc | 1 - lily/my-lily-lexer.cc | 7 +- lily/note-head.cc | 1 - lily/p-score.cc | 107 +--- lily/paper-def.cc | 6 +- lily/paper-outputter.cc | 11 +- lily/paper-stream.cc | 6 +- lily/parser.yy | 25 +- lily/ps-lookup.cc | 96 +++- lily/ps-outputter.cc | 17 +- lily/ps-stream.cc | 15 +- lily/rod.cc | 2 +- lily/score-element.cc | 2 - lily/scores.cc | 11 + lily/span-bar.cc | 2 +- lily/spring-spacer.cc | 2 +- lily/staff-side.cc | 2 +- lily/staff-sym.cc | 2 +- lily/stem-info.cc | 1 - lily/stem.cc | 1 - lily/symtable.cc | 1 - lily/template5.cc | 5 +- lily/tex-lookup.cc | 98 +++- lily/tex-outputter.cc | 2 - lily/tex-stream.cc | 10 +- lily/tex.cc | 49 -- lily/text-def.cc | 1 - make/STATE-VECTOR | 7 +- make/out/lelievijver.lsm | 8 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- mf/GNUmakefile | 5 +- mf/feta.mp | 48 ++ mf/mfmp.ini | 4 + mf/out/feta11.afm | 14 +- mf/out/feta13.afm | 14 +- mf/out/feta16.afm | 14 +- mf/out/feta19.afm | 14 +- mf/out/feta20.afm | 14 +- mf/out/feta23.afm | 14 +- mf/out/feta26.afm | 14 +- mi2mu/include/mudela-item.hh | 2 +- mi2mu/mudela-item.cc | 6 +- stepmake/NEWS | 3 + stepmake/VERSION | 2 +- stepmake/make/out/stepmake.lsm | 8 +- stepmake/make/out/stepmake.spec | 4 +- stepmake/stepmake/documentation-targets.make | 2 +- stepmake/stepmake/executable-rules.make | 1 + stepmake/stepmake/generic-targets.make | 6 +- stepmake/stepmake/metapost-rules.make | 15 + stepmake/stepmake/metapost-targets.make | 3 + stepmake/stepmake/metapost-vars.make | 7 + stepmake/stepmake/yolily-debian-targets.make | 1 - tex/GNUmakefile | 3 +- tex/lilyponddefs.ps | 304 ++++++++++++ tex/lilyponddefs.tex | 20 +- 107 files changed, 2326 insertions(+), 887 deletions(-) delete mode 100644 lily/dimen.cc rename lily/include/{dimension.hh => dimensions.hh} (66%) delete mode 100644 lily/include/tex.hh delete mode 100644 lily/tex.cc create mode 100644 mf/feta.mp create mode 100644 mf/mfmp.ini create mode 100644 stepmake/stepmake/metapost-rules.make create mode 100644 stepmake/stepmake/metapost-targets.make create mode 100644 stepmake/stepmake/metapost-vars.make create mode 100644 tex/lilyponddefs.ps diff --git a/AUTHORS.txt b/AUTHORS.txt index e69de29bb2..e17ad4f902 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -0,0 +1,75 @@ + + + + + + + + + + AUTHORS - who did what on GNU LilyPond? + + +Contents + + +This file lists authors of GNU LilyPond, and what they +wrote. This list is alphabetically ordered. + + +o Tom Cato Amundsen , cembalo-par- + tita in mudela. + +o Mats Bengtsson , + http://www.s3.kth.se/~matsb clef stuff, key stuff, + swedish notenames, testing, general comments. + +o Eric Bullinger , accidental trans- + position. + +o Jan Arne Fagertun , + TeX titling and lytodvi.sh + +o Anthony Fok , debian package: debian/* + +o Neil Jerram . parts of Documenta- + tion/Vocab* + +o Donald Ervin Knuth, http://www.cs-staff.stan- + ford.edu/~knuth mf/ital-*.mf (these were taken from the + CM fonts) + +o Werner Lemberg , misc + bugfixes, some Beam and Stem code. + +o David R. Linn , Mailing list + maintenance. + +o Adrian Moriano <> Documentation fixes, glossary. + +o Han-Wen Nienhuys , + http://www.cs.uu.nl/~hanwen + Main author (initials: HWN). + +o Jan Nieuwenhuizen , + http://www.xs4all.nl/~jantien + Main author (initials: JCN). + +o Alexandre Oliva , http://sun- + site.unicamp.br/~oliva testing + +o Franc,ois Pinard , parts of + Documentation/Vocab*, started internationalization + stuff + +o Jeffrey B. Reed , Windows-NT support. + +o Shay Rojanski Some mudela source. + + +Your name could be here! If you want to help, then take a +look at the SMALLISH PROJECTS section of in the file TODO. +Some do not involve coding C++ + +[And of course we sincerely thank J.S.Bach, F.Schubert, T. +Merula and W.A.Mozart for their beautiful music] diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index c4be31e720..7bd5053e33 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -4,7 +4,7 @@ redef(var)(1)(whenlatex(latexcommand({\normalfont\scshape )ARG1+latexcommand(})) whenhtml(sc(ARG1))) -redef(mycode)(1)(tt(ARG1)) +redef(code)(1)(tt(ARG1)) COMMENT( This document contains Mudela fragments. You need at least @@ -31,7 +31,7 @@ COMMENT(whenlatex(notableofcontents())) whentexinfo(notableofcontents()) article(Mudela Reference Manual) - (Andrew Moriano, Han-Wen Nienhuys and Jan Nieuwenhuizen) + (Adrian Moriano, Han-Wen Nienhuys and Jan Nieuwenhuizen) (nop()PIPETHROUGH(date "+%B %d, %Y")()()nop()) COMMENT( @@ -860,7 +860,7 @@ If var(bartype) is set to code("empty") then nothing is printed, but a line break is allowed at that spot. Note that the printing of special bars has no effect on the MIDI output. -dit(mycode(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation +dit(code(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation of bar lines. If var(togglevalue) is 0 then bar line generation is turne off. If var(togglevalue) is 1 then a bar is immediately printed and bar generation is turned on. diff --git a/Documentation/tex/tutorial.yo b/Documentation/tex/tutorial.yo index fbaf68ea12..b213777cb9 100644 --- a/Documentation/tex/tutorial.yo +++ b/Documentation/tex/tutorial.yo @@ -58,7 +58,7 @@ article(Mudela, the Music-Definition Language) latexcommand(\def\interexample{}) latexcommand(\def\preexample{\par}) latexcommand(\def\postexample{\par\medskip}) -latexcommand(\def\file#1{{mycode(#1)}}) +latexcommand(\def\file#1{{code(#1)}}) COMMENT(urg, texinfo include breaks) whenhtml( @@ -138,13 +138,13 @@ verb( This data is what we consider the musical em(definition). Mudela has a special entry mode where you can conveniently abbreviate this to -`mycode(d''4.)'. There are some features that also make the quotes and -numbers in `mycode(d''4.)' superfluous in some cases. +`code(d''4.)'. There are some features that also make the quotes and +numbers in `code(d''4.)' superfluous in some cases. For those who are curious, the numbers in -`mycode(\musicalpitch { 1 2 0 })' +`code(\musicalpitch { 1 2 0 })' example mean octave, notename, and accidental respectively. The -numbers in `mycode(\duration { 2 1 })' are the (negative) logarithm of the +numbers in `code(\duration { 2 1 })' are the (negative) logarithm of the duration (2 is a quarter note, 3 is an eighth note, etc.) and the number of augmention dots respectively. @@ -152,9 +152,9 @@ sect(When you know the notes to nop(print)ellipsis()) The basic building block of music is the note. You can have LilyPond print a note by specifying its pitch and duration. The pitch of the -central C is written as mycode(c'). This is in line with musicological +central C is written as code(c'). This is in line with musicological notation; there this pitch is transcribed as nop(c)sups(1) or c'. A -quarter-note duration is written as mycode(4). So, to print a quarter +quarter-note duration is written as code(4). So, to print a quarter note whose pitch is central C, you enter the following: mudela(fragment,verbatim,center)( c'4 ) @@ -172,18 +172,18 @@ mudela(fragment,verbatim)( subsect(Basic pitches) -The pitch mycode(c') actually consists of two parts: one part for the +The pitch code(c') actually consists of two parts: one part for the note name, and one for the octave. The letter specifies which note -name to use: note names simply are the letters mycode(a) to mycode(g). +name to use: note names simply are the letters code(a) to code(g). The number of apostrophes specifies the octave to use: the central C -is denoted by mycode(c').footnote(By convention, the A above central C +is denoted by code(c').footnote(By convention, the A above central C at concert pitch is the tone that is used to tune instruments. Its frequency is about 440 Hz.) The C which is an eighth higher (the C in -the ``two-line octave'') is denoted by mycode(c''): every octave adds a -quote. A note name without quotes designates the pitch below mycode(c') +the ``two-line octave'') is denoted by code(c''): every octave adds a +quote. A note name without quotes designates the pitch below code(c') (the C in the ``small octave''). If you want to go down even further, commas should be added, e.g., the C in the ``contra octave'' is -expressed as mycode(c,,).footnote(The comma is meant to represent a +expressed as code(c,,).footnote(The comma is meant to represent a sunken apostrophe.) @@ -197,7 +197,7 @@ mudela(center,fragment,verbatim)( c'4 d'4 e'4 f'4 g'4 a'4 b'4 c''4 ) -A rest can be entered as a note with the special name mycode(r), e.g., +A rest can be entered as a note with the special name code(r), e.g., mudela(fragment,verbatim,center)(r4) This already gives us enough material to make simple songs. In @@ -250,18 +250,18 @@ latexcommand(\end{table}) Variations on this convention are used in a number of germanic languages, notably Dutch, German, Swedish, and Norwegian. To be precise, LilyPond actually defaults to Dutch notenames, with -mycode(aes), mycode(aeses), mycode(ees) and mycode(eeses) added for +code(aes), code(aeses), code(ees) and code(eeses) added for consistency. Throughout this document we will continue to use the Dutch names. To make (Dutch) pronunciation easier, the a-flat and e-flat are contracted to -mycode(as) and mycode(es). Similarly, the a double flat and e double flat are -contracted to mycode(ases) and mycode(eses). +code(as) and code(es). Similarly, the a double flat and e double flat are +contracted to code(ases) and code(eses). If you are not comfortable with these names, you can make your own. Note names for different languages are included with the example initialisation files, amongst others English (C sharp is abbreviated -to mycode(cs)), Italian, Swedish and Norwegian. If you want to use +to code(cs)), Italian, Swedish and Norwegian. If you want to use these names, you should look at bind(Section)ref(subsect:include) for information on how to use include files. @@ -272,7 +272,7 @@ In the previous section some basic elements of Mudela were presented. We didn't want to bore you too much with repetitive details, so we left out some red tape that's needed for a of Mudela in a form that is accepted by LilyPond. To -be precise, we wrote mycode(X Y Z), when we really meant +be precise, we wrote code(X Y Z), when we really meant verb(\score { \notes { X Y Z } \paper {} @@ -284,7 +284,7 @@ it means. Because LilyPond uses a language, it is a so called em(batch) program. This means, that you use a -text editor (such as mycode(emacs) or mycode(vi)) to create an input +text editor (such as code(emacs) or code(vi)) to create an input file. When you are done editing your input file, you save it, and you run LilyPond on the file. If LilyPond finds any errors in your input file then nop(she)footnote(We're sure that if computer programs could have @@ -306,7 +306,7 @@ To get you started we'll run down the full procedure for you. enumerate( it() Fire up your favourite editor (if you don't -know any editors, try mycode(joe silly.ly)), +know any editors, try code(joe silly.ly)), and key in the example from bind(Figure)ref(fig:twinkle1), with red tape: verb( \score { @@ -322,7 +322,7 @@ Save your file as file(twinkle.ly).footnote(The default extension for Mudela files is file(.ly).) it() -Run LilyPond on your newly created file: enter mycode(lilypond twinkle). +Run LilyPond on your newly created file: enter code(lilypond twinkle). LilyPond will then print all kinds of mumbo jumbo that can safely be ignored. You might see something like this: verb( @@ -357,7 +357,7 @@ produced with TeX().) COMMENT(ugh.) it() To do something useful with the output you have to run TeX() on it - first. Run the command mycode(tex twinkle). The output should resemble this: + first. Run the command code(tex twinkle). The output should resemble this: verb( This is TeX, Version 3.14159 (C version 6.1) (twinkle.tex @@ -391,7 +391,7 @@ mudela()( it() If you want to print file(twinkle.dvi), you should invoke the command -mycode(dvips twinkle). Running this command should generate a +code(dvips twinkle). Running this command should generate a PostScript file called file(twinkle.ps). This file can be printed on any PostScript compatible printer. You should not use any other tools: the output from LilyPond contains fragments of PostScript which @@ -436,9 +436,9 @@ expressed conveniently. Of course we did not leave out chords. In Mudela you can form a chord of several notes by enclosing them in pointed parentheses, bind(i.e.)bind(langle())bind(and)rangle(). ASCII doesn't really have these delimiters, so Mudela uses the larger-than -(mycode(>)) and smaller-than (mycode(<)) signs instead. For example, a +(code(>)) and smaller-than (code(<)) signs instead. For example, a D-major nop(chord)footnote(Recall what was said in the previous -section about flats and sharps: the word mycode(fis) means an f sharp.) +section about flats and sharps: the word code(fis) means an f sharp.) can be described by the following fragment: mudela(fragment,verbatim,center)( @@ -501,7 +501,7 @@ verb( c''4 % shouldn't this be a different pitch? ) -Block comments are enclosed in mycode(%{) and mycode(%}). +Block comments are enclosed in code(%{) and code(%}). verb( c''4 @@ -555,7 +555,7 @@ note.'' This is not in line with our goal to em(define) music with Mudela. We hope that this will be fixed in a future version of the language. In the meantime you can abuse this: the super- and subscripts can be forced into up or down position respectively by entering an -a caret (mycode(^)) or an underscore, mycode(_) instead of the dash: +a caret (code(^)) or an underscore, code(_) instead of the dash: mudela(fragment,verbatim,center)( c'4-^ c'4^^ c'''4-^ c'''4_^ ) @@ -621,8 +621,8 @@ beam can be derived from the structure of the time signature and the durations of the notes. It is merely a device that helps you understand the rhythms notated. Unfortunately, LilyPond is not smart enough to insert beams into your music on her own. You will have to instruct her by -marking the starting and stopping point of the beam with `mycode([)' and -`mycode(])' respectively, e.g. +marking the starting and stopping point of the beam with `code([)' and +`code(])' respectively, e.g. mudela(fragment,verbatim,center)( [g'8 g'8] @@ -631,7 +631,7 @@ mudela(fragment,verbatim,center)( LilyPond has code that guesses what the pattern should look like, so that you don't have to specify the beaming for complicated patterns.footnote(Unfortunately the algorithm used is not foolproof yet: - mycode([c8. c32 c32]) will produce incorrect results.) + code([c8. c32 c32]) will produce incorrect results.) Again, it is your responsibility to make sure that you end every beam that you start. @@ -647,7 +647,7 @@ The input convention for the tilde is somewhat peculiar when used in conjunction with chords. Internally, the extra information that is represented by the tilde has to be attached to a note (or to a rest, for that matter). For this reason, you can't put the tilde between -two chords (as in mycode( ~ )). The tilde sign must be +two chords (as in code( ~ )). The tilde sign must be directly after a note of the chords. It does not matter which one. The following example demonstrates this: mudela(fragment,verbatim,center)( @@ -677,17 +677,17 @@ center( em(keyword)s are words that have a special meaning to the parser of Mudela. Because the parser must be able to distinguish the keywords from note names, they have to be preceded by a so-called escape -character, the backslash, `mycode(\)'. To separate the arguments from +character, the backslash, `code(\)'. To separate the arguments from any notes that might follow the arguments, you have to end your command with a semicolon. An added benefit of this construction is that the commands stand out between your notes, because of the backslashes. -So the general form actually is `mycode(\keyword argument argument ... ;)' +So the general form actually is `code(\keyword argument argument ... ;)' Let us review these commands: description( -dit(mycode(\clef) var(clefname)) This command sets the current clef for notation, +dit(code(\clef) var(clefname)) This command sets the current clef for notation, i.e., a clef symbol is printed and the notes following this command are shifted vertically. The argument is a string, the name of the new clef. The default clef is the treble clef. @@ -696,25 +696,25 @@ dit(mycode(\clef) var(clefname)) This command sets the current clef for notation \clef "treble"; c'4 \clef "alto"; c'4 ) -dit(mycode(\key) var(pitch)) This command changes the current key signature. The +dit(code(\key) var(pitch)) This command changes the current key signature. The key signature is printed at the start of every line. The argument is the name of the corresponding major key. The key of C-minor can - thus be specified as `mycode(\key es)'. + thus be specified as `code(\key es)'. -dit(mycode(\keysignature) var(pitchlist)) +dit(code(\keysignature) var(pitchlist)) This command changes the current key signature. Unlike the -`mycode(\key)' command, this command can produce arbitrary key +`code(\key)' command, this command can produce arbitrary key signatures, which can be useful for unconventional keys or modes. The key signature is given in the form of a list of notes. The notes will be printed in the key signature in the order that they appear on the list. For example, the key -of C-minor can be specified as `mycode(\keysignature bes es as)'. The -command `mycode(\keysignature fis es bis)' provides a more exotic +of C-minor can be specified as `code(\keysignature bes es as)'. The +command `code(\keysignature fis es bis)' provides a more exotic example. -dit(mycode(\time) var(numerator)mycode(/)var(denominator)) +dit(code(\time) var(numerator)code(/)var(denominator)) This command changes the current time signature. LilyPond uses the time signature to calculate where to place the bars that start a measure. These bars @@ -730,17 +730,17 @@ song actually has a 2/4 time signature, so a metrically more correct ) -dit(mycode(\cadenza) var(togglevalue)) When typesetting music without a +dit(code(\cadenza) var(togglevalue)) When typesetting music without a regular meter (such as an ad libitum cadenza), no bar lines should be printed. In LilyPond you can achieve this by issuing the command -`mycode(\cadenza 1)': it turns off the automatically +`code(\cadenza 1)': it turns off the automatically generated bar lines. -You switch them on again with `mycode(\cadenza 0)', and then a bar line +You switch them on again with `code(\cadenza 0)', and then a bar line is printed. LilyPond will act as if you are again at the start of a measure. -dit(mycode(\bar) var(bartype)) +dit(code(\bar) var(bartype)) This command lets you print special bar lines and repeat symbols. You can also use it to allow line breaks when entering cadenzas. The argument var(bartype) is a string that @@ -750,22 +750,22 @@ mudela(fragment,verbatim)( \bar "|:"; c'4 \bar ":|:"; c'4 \bar ":|"; c'4 \bar "||"; c'4 \bar "empty"; c'4 \bar "|."; ) - The command `mycode(\bar "empty")' does not create any visible bar + The command `code(\bar "empty")' does not create any visible bar line, but it does tells LilyPond to allow a linebreak - at that position. The `mycode(\bar)' command prints the specified - symbol immediately. If you give a `mycode(\bar)' command at the end + at that position. The `code(\bar)' command prints the specified + symbol immediately. If you give a `code(\bar)' command at the end of a measure then the specified symbol replaces the automatic bar line; otherwise the specified symbol appears in the middle of the measure. The - mycode(\bar) command does not affect metric structure. + code(\bar) command does not affect metric structure. -dit(mycode(\partial) var(duration)) some music starts with a measure that -isn't fully filled, a so-called upstep. The mycode(\partial) command +dit(code(\partial) var(duration)) some music starts with a measure that +isn't fully filled, a so-called upstep. The code(\partial) command allows you to make upsteps. The argument is a duration similar to the duration of a note. -The `mycode(\partial)' command cannot be used to generate partial +The `code(\partial)' command cannot be used to generate partial measures in the middle of the music. Example: mudela(fragment,verbatim)( @@ -774,7 +774,7 @@ Example: [d'8 dis'] e' c''4 e'8 c''4 ) - dit(mycode(\grouping) var(durationslist)) sets the metric structure of the measure. + dit(code(\grouping) var(durationslist)) sets the metric structure of the measure. Its effect can best be shown by an example: mudela(fragment,verbatim)( \time 5/16; @@ -787,7 +787,7 @@ Example: ) In practice, you won't be needing this command very often: the -grouping is switched automatically when you issue a mycode(\time) +grouping is switched automatically when you issue a code(\time) command. It is set to a combination of groups of 2 and 3 beats, with as many groups of 3 as possible (in other words: 4/4 is divided in two times two beats @@ -835,7 +835,7 @@ does not represent notes stacked together, but staffs stacked together. If a piece of music is to be interpreted as a staff, then this can be -expressed with the mycode(\type) construct. The following input says +expressed with the code(\type) construct. The following input says ``the quarter note with pitch e should be put on a staff.'' verb( @@ -859,13 +859,13 @@ verb( This looks reasonable, but the effect of this input is not what you might expect (try it!). When interpreting this chord LilyPond will start with the first entry. She'll look for a (nameless) staff. Such a -staff is not found, so it is created. On this staff the mycode(e) note -is put. When the second mycode(\type) entry is read, LilyPond will +staff is not found, so it is created. On this staff the code(e) note +is put. When the second code(\type) entry is read, LilyPond will start looking for a nameless staff. The staff that contains the -mycode(e) is found, and the mycode(g) is put there as well. +code(e) is found, and the code(g) is put there as well. -The correct solution is to label both mycode(\type) constructs with -different names, for example mycode(trebleStaff) and mycode(bassStaff). +The correct solution is to label both code(\type) constructs with +different names, for example code(trebleStaff) and code(bassStaff). This makes LilyPond distinguish between them, and create two staffs: mudela(verbatim,fragment)( @@ -879,7 +879,7 @@ different. This is almost right, except for the brace at the left and the clef of the second staff. The bass clef will be taken care of in the next section. If you want a brace, then you have to tell LilyPond that the chord you just formed is to be interpreted as a so-called -grand staff. This is also done with the mycode(\type) command. +grand staff. This is also done with the code(\type) command. mudela(verbatim,fragment)( \type GrandStaff < \type Staff = treblestaff e'4 @@ -924,7 +924,7 @@ red tape in bind(Section)ref(tutorial:introduction). If we want to put whole voices onto a staff, then we have to substitute sequential music for the single notes in the example from -the previous section. A mycode(\clef) command in the second piece of +the previous section. A code(\clef) command in the second piece of sequential music will also set the clef in the bass staff. @@ -978,7 +978,7 @@ mudela()(\score{ linewidth = -1.; \translator { \type "Line_group_engraver_group"; - Staff ; + \name Staff ; defaultclef = violin; \consists "Timing_engraver"; @@ -1002,7 +1002,7 @@ mudela()( linewidth = -1.; \translator { \type "Line_group_engraver_group"; - defaultclef = violin;Staff; + defaultclef = violin;\name Staff; \consists "Time_signature_engraver"; \consists "Separating_line_group_engraver"; \accepts "Voice"; @@ -1020,7 +1020,7 @@ mudela()( linewidth = -1.; \translator { \type "Line_group_engraver_group"; - defaultclef = violin;Staff ; + defaultclef = violin;\name Staff ; \consists "Bar_engraver"; \consists "Time_signature_engraver"; \consists "Separating_line_group_engraver"; @@ -1038,7 +1038,7 @@ a'4 f4 e c d2 } \paper { linewidth = -1.; \translator { \type "Line_group_engraver_group"; - Staff ; + \name Staff ; defaultclef = violin; \consists "Bar_engraver"; \consists "Time_signature_engraver"; @@ -1059,7 +1059,7 @@ mudela()(\score { linewidth = -1.; \translator { \type "Line_group_engraver_group"; - Staff; + \name Staff; defaultclef = violin; \consists "Bar_engraver"; \consists "Time_signature_engraver"; @@ -1093,56 +1093,56 @@ A bf(notation context) is a conversion from music to notation. The example focused mainly on on staffs, but a staff is not the only type of notation context. Notation contexts may be nested: you can print polyphonic music by putting multiple `Voice' contexts in one -`Staff' context. The arguments of the mycode(\type) command (Staff, +`Staff' context. The arguments of the code(\type) command (Staff, GrandStaff) were in fact all names of different contexts. The notions of ``current clef'' and ``current position within the measure'' are all properties of notation contexts. Commands like -mycode(\clef) and mycode(\cadenza) change these properties. +code(\clef) and code(\cadenza) change these properties. The following is a list of the contexts that are supported by LilyPond: description( -dit(Voice) The mycode(Voice) context is a context that corresponds to a +dit(Voice) The code(Voice) context is a context that corresponds to a voice on a staff. This context handles the conversion of noteheads, dynamic signs, stems, beams, super- and subscripts, slurs, ties and rests -dit(Staff) The mycode(Staff) context handles clefs, bar lines, keys, - accidentals. A mycode(Staff) context can contain multiple mycode(Voice) +dit(Staff) The code(Staff) context handles clefs, bar lines, keys, + accidentals. A code(Staff) context can contain multiple code(Voice) contexts. -dit(RhythmicStaff) The mycode(RhythmicStaff) context is like the staff, +dit(RhythmicStaff) The code(RhythmicStaff) context is like the staff, but much simpler: the notes are printed on one line, and pitches are - ignored. mycode(RhythmicStaff) can contain mycode(Voice) contexts. + ignored. code(RhythmicStaff) can contain code(Voice) contexts. -dit(GrandStaff) A mycode(GrandStaff) context contains mycode(Staff) +dit(GrandStaff) A code(GrandStaff) context contains code(Staff) contexts, and it adds a brace to the output at the nop(left.)footnote(This is a major deficiency in the current implementation. Currently stems, slurs and beams cannot be printed across two staffs. In reality, a grand staff is a hybrid of one big staff and two stacked staffs.) - A mycode(GrandStaff) context can contain multiple - mycode(Staff)s. Typically, it will contain two mycode(Staff)s, one + A code(GrandStaff) context can contain multiple + code(Staff)s. Typically, it will contain two code(Staff)s, one treble staff, and one bass staff. The bar lines of the contained staffs are connected vertically. -dit(StaffGroup) A mycode(StaffGroup) context contains mycode(Staff) or - mycode(Lyrics) contexts, and prints a bracket at the left. The bar +dit(StaffGroup) A code(StaffGroup) context contains code(Staff) or + code(Lyrics) contexts, and prints a bracket at the left. The bar lines in the participating staffs are connected. -dit(Lyrics) As its name suggests, The mycode(Lyrics) context deals with +dit(Lyrics) As its name suggests, The code(Lyrics) context deals with typesetting lyrics. This topic will be covered in bind(Section)ref(tutorial:lyrics). -dit(Score) The mycode(Score) context is the toplevel context: no context can - contain a mycode(Score) context. The mycode(Score) context handles the +dit(Score) The code(Score) context is the toplevel context: no context can + contain a code(Score) context. The code(Score) context handles the administration of time signatures. It also makes sure that items such as clefs, time signatures, and key-signatures are aligned across staffs. - The mycode(Score) can contain mycode(Staff), mycode(StaffGroup), mycode(Lyrics), mycode(GrandStaff) and - mycode(RhythmicStaff) contexts. + The code(Score) can contain code(Staff), code(StaffGroup), code(Lyrics), code(GrandStaff) and + code(RhythmicStaff) contexts. COMMENT(do ChoireStaff) ) @@ -1168,8 +1168,8 @@ In the last section we explained that a notation context can have properties that influence the conversion from music to notation. A simple example of such a property is the clef: the type of clef partially determines the vertical position of note heads in a staff. Some of -these properties can be modified by commands such as mycode(\clef) and -mycode(\time). But there is more: notation contexts also have +these properties can be modified by commands such as code(\clef) and +code(\time). But there is more: notation contexts also have properties are settable in a generic fashion. We will demonstrate this feature by printing multiple voices on a staff. @@ -1212,11 +1212,11 @@ Surely the direction of a single stem is a property of the stem as a graphical object. But the fact that all of the stems in a voice point in the same direction is not directly graphical. Since this is a property shared by all the stems in the voice, it is logical to -consider this property to be a property of the context mycode(Voice). -And this is how it's done in LilyPond: the context mycode(Voice) has an +consider this property to be a property of the context code(Voice). +And this is how it's done in LilyPond: the context code(Voice) has an attribute whose value is the direction to use for stems. You can change it to `up' -by issuing the following phrase:footnote(The name mycode(ydirection) is +by issuing the following phrase:footnote(The name code(ydirection) is no mistake. The property also controls the up/down directions of super-/subscripts, slurs, ties, etc.) @@ -1225,9 +1225,9 @@ verb( ) This command should be read as ``change the property called -mycode(ydirection) within the current mycode(Voice) context to the value -mycode(-1).'' For the property mycode(ydirection) the value mycode(1) means -`up', and mycode(-1) means `down'. The proper way to code the +code(ydirection) within the current code(Voice) context to the value +code(-1).'' For the property code(ydirection) the value code(1) means +`up', and code(-1) means `down'. The proper way to code the polyphonic example is given in bind(Figure)ref(tutorial:multi-voice-fig). latexcommand(\begin{figure}[h]) @@ -1247,7 +1247,7 @@ latexcommand(\end{figure}) Other properties can also be set, and they can be within different contexts. In general, you can set a property by specifying -mycode(\property) var(contexttype)mycode(.)var(propertyname) mycode(=) +code(\property) var(contexttype)code(.)var(propertyname) code(=) var(value). Both var(ContextType), var(PropertyName) and var(Value) should be strings. @@ -1263,8 +1263,8 @@ simply changing the directions of the stems for each voice, obviously. Traditionally, some chords are shifted horizontally to print if this many voices have to be printed. LilyPond can also do this, and the property that controls the -horizontal shifting is called mycode(hshift). The notes in a -mycode(Voice) context that has mycode(hshift) set to a true value (i.e., +horizontal shifting is called code(hshift). The notes in a +code(Voice) context that has code(hshift) set to a true value (i.e., non-zero or non-empty), will be shifted horizontally in the case of a collision. The following example demonstrates the effect. @@ -1297,13 +1297,13 @@ Lyrics consist of syllables, which are strings together with durations. Previously we only entered note names, so for entering lyrics we have to instruct LilyPond that what we enter are not note names but words---or rather: strings. This instruction is the keyword -mycode(\lyric). After entering this keyword you can enter a musical -construct---sequential music, simultaneous music, mycode(\type) +code(\lyric). After entering this keyword you can enter a musical +construct---sequential music, simultaneous music, code(\type) entries, etc.--- but with syllables in stead of pitches. For example: verb( \lyric { 'got8 me on my knees4, Le-8 lie! }) -The effect of mycode(\lyric) can be compared with the effect of the -doublequote character, mycode("), for it also changes the lexical +The effect of code(\lyric) can be compared with the effect of the +doublequote character, code("), for it also changes the lexical meaning of spaces and characters. This mode is another example of a handy input feature of the language. @@ -1311,9 +1311,9 @@ Next comes the conversion to notation. LilyPond can't (yet) figure out that lyrics need different treatment than notes. As a result, the default conversion will try to put the text you entered as note heads onto a staff, and this will fail. This default must be overriden with -a mycode(\type) keyword. Printing syllables of text in a line is done -by a context called mycode(Lyrics). You can select this context with -the mycode(\type) keyword. Here is a simple example: +a code(\type) keyword. Printing syllables of text in a line is done +by a context called code(Lyrics). You can select this context with +the code(\type) keyword. Here is a simple example: mudela(fragment,verbatim)( \type Lyrics \lyric { 'got8 me on my knees,4 Le-8 lie! }) @@ -1330,8 +1330,8 @@ mudela(fragment,verbatim)( The strings that makes up each syllable in the lyrics block are passed along to TeX() verbatim, so if you are proficient with TeX() you can do various nifty things. Just keep in mind that a syllable either -starts with a letter (a character in the range `mycode(a)' to `mycode(z)' -or `mycode(A)' to `mycode(Z)'), or it is a string enclosed quotes. It ends +starts with a letter (a character in the range `code(a)' to `code(z)' +or `code(A)' to `code(Z)'), or it is a string enclosed quotes. It ends with either a number for the duration, or a space. A last feature that should be mentioned is the space-lyric: if you want to enter a single ``syllable'' that consists of multiple words, i.e., words @@ -1367,13 +1367,13 @@ Now the time has come to unravel the red tape that we have hidden from you in the introduction. Mudela has a hierarchical structure for we have seen that sequential and simultaneous music can be nested. Mudela also has other `blocks' that can be nested. The general syntax -for a block is mycode(\keyword { ... }). +for a block is code(\keyword { ... }). When you run LilyPond, what happens is that you define music, and specify one (or more) conversions to apply to that music, for example a conversion to notation. This is done by putting the definition of the music and the definition of the conversion together in a -mycode(\score) block, e.g., +code(\score) block, e.g., verb( \score { % ... music ... @@ -1389,21 +1389,21 @@ verb( }) On the ellipsis, you entered what shown as the example input. You can see that in the -above example, the mycode(\notes { ... }) forms the music, the -mycode(\paper {}) is a conversion to paper (notation, that is). The -mycode(\paper) definition is copied from a default definition +above example, the code(\notes { ... }) forms the music, the +code(\paper {}) is a conversion to paper (notation, that is). The +code(\paper) definition is copied from a default definition (which is in the initialisation file file(paper16.ly)). The paper part also contains the definition of the contexts. -The keyword mycode(\notes) is analogous to the mycode(\lyric) keyword. It +The keyword code(\notes) is analogous to the code(\lyric) keyword. It will switch the tokenizer into a mode that interprets plain words as note names. If it can't recognize the words as a note name, it will assume that they are strings. That is the reason why you can write -mycode(\clef bass) in stead of mycode(\clef "bass"); most of the strings -in mycode(\notes) mode can be written without quotes. +code(\clef bass) in stead of code(\clef "bass"); most of the strings +in code(\notes) mode can be written without quotes. -The braces that you see after the mycode(\notes) keyword are the +The braces that you see after the code(\notes) keyword are the braces that are around sequential music. Because of these braces, the sequences of notes in our simple examples were sequential (and not simultaneous). As a result the notes were printed from left to right, @@ -1415,15 +1415,15 @@ sect(Identifiers) Now that we are comfortable with the toplevel entries in a mudela file, we can investigate some more of the recreations on toplevel, in particular em(identifiers). Generally you can define an identifier by -entering mycode(identifierName = ... ) +entering code(identifierName = ... ) where there can be a variety of things on the ellipsis. Here is a (partial) list of what you can abbreviate with identifiers at top-level. itemize( -it()The mycode(\score) block -it()The mycode(\paper) block -it()The mycode(\midi) block (to be explained in +it()The code(\score) block +it()The code(\paper) block +it()The code(\midi) block (to be explained in bind(Section)ref(tutorial:sound)) it()Music (sequential music, simultaneous music etc.) it()Durations @@ -1434,8 +1434,8 @@ it()Reals ) When you refer -to the abbreviated entity, you must precede mycode(identifierName) -with a backslash, i.e., mycode(\identifierName). For example: +to the abbreviated entity, you must precede code(identifierName) +with a backslash, i.e., code(\identifierName). For example: mudela(verbatim)( czerny = \notes { [c16 g e g] } \score { @@ -1453,8 +1453,8 @@ mudela(verbatim)( Another interesting feature of this example are the assignments within -the paper block. Some blocks, such as mycode(\paper), have a scope of -their own. In the case of the mycode(\paper) block, these variables +the paper block. Some blocks, such as code(\paper), have a scope of +their own. In the case of the code(\paper) block, these variables influence the characteristics of the output. As is shown, you can tune quantities like the stemlength, and enter simple expressions. The purpose of the negative linewidth is to prevent the music from @@ -1464,12 +1464,12 @@ listed here. Moreover, since most of the values are predefined to sensible defaults, there usually is no need to tune these values. Recall the properties of a context, that could be set with -mycode(\property). It is a very general mechanism to tune the output of +code(\property). It is a very general mechanism to tune the output of the music, that is neatly separated from the real music. Unfortunately, it is not convenient to type or read, and the precise effect of a setting property isn't always apparent from its definition. To remedy this, we can use an identifier to capture the -meaning of a mycode(\property). +meaning of a code(\property). mudela(verbatim)( stemup = \property Voice.ydirection = "1" @@ -1493,7 +1493,7 @@ shift = \property Voice.hshift = "1" } ) -Several abbreviations like mycode(\stemup) are defined in the +Several abbreviations like code(\stemup) are defined in the standard initialisation file file(property.ly). Setting or changing context properties can have a similar effect as the commands that were discussed in bind(Section)ref(sec:commands). Don't be fooled by the @@ -1502,9 +1502,9 @@ and a real command. Real commands are hardcoded into the language and they have to be terminated by semicolons. You can also use identifiers to break up the heavy nesting that can occur -in the mycode(\score) block. Another useful application is +in the code(\score) block. Another useful application is parametrisation of the music: if you use identifiers in the -mycode(\score) block, you can make variations of the music by simply +code(\score) block, you can make variations of the music by simply redefining those identifiers. One particular application of this is part extraction: by using identifiers and redefining them, one can print extracted parts and a full orchestral score from the same @@ -1528,7 +1528,7 @@ The only information that you need to enter is the this the only thing that can be tuned at this time. This is a limitation: the tempo of music can vary throughout the music.) for the performance. The syntax for the tempo is -mycode(\tempo )var(duration) = var(beatsperminute);), for example: +code(\tempo )var(duration) = var(beatsperminute);), for example: verb( \score { ...music... @@ -1559,7 +1559,7 @@ This characterization almost automatically explains what the definition of a context should look like: itemize( it()It should be part of the ``notation output definition,'' i.e., the - mycode(\paper) block + code(\paper) block it() It should contain a specification of what other contexts may be contained in the context we're defining. @@ -1575,7 +1575,7 @@ verb( { \type "Engraver_group_engraver"; - "ContextName" + \name "ContextName"; \accepts "..."; \accepts "..."; @@ -1594,29 +1594,29 @@ verb( This is encoded by the -The mycode(\translator) keyword opens the block for translation (or -context) definition. The mycode(\type) keyword explains to Lily that +The code(\translator) keyword opens the block for translation (or +context) definition. The code(\type) keyword explains to Lily that the context should be formed by taking an (empty) instance of -mycode(Engraver_group_engraver). The mycode(Engraver_group_engraver) is a -C++ class from the source code to Lily. The mycode(\accepts) entries +code(Engraver_group_engraver). The code(Engraver_group_engraver) is a +C++ class from the source code to Lily. The code(\accepts) entries explain what kind of contexts this context could contain. If we were to define a context for a staff, the definition would typically -contain mycode(\accepts "Voice";). +contain code(\accepts "Voice";). -The mycode(\consists) entries specify which notation constructs should +The code(\consists) entries specify which notation constructs should be handled. This needs a little explanation: LilyPond contains the code for quite a large number of basic building blocks for notation generation, and each building block handles only one notation construct. The name of such a building block is `engraver'. You can specify which notation construct a context should handle by specifying -which engravers should be part of the context. The mycode(\consists -"Foobar") entry really means ``add an instance of mycode(Foobar) to the +which engravers should be part of the context. The code(\consists +"Foobar") entry really means ``add an instance of code(Foobar) to the translation group.'' For example if this context should print time signatures, the definition -should include `mycode(\consists "Time_signature_engraver";)'. Again -mycode(Time_signature_engraver) is a class from the source code of LilyPond. +should include `code(\consists "Time_signature_engraver";)'. Again +code(Time_signature_engraver) is a class from the source code of LilyPond. @@ -1628,14 +1628,14 @@ solution is not very complicated: normally all timing information (time signature, rhythmic grouping) is synchronised across each staff. In LilyPond this is expressed by having only one registration for timing information for all staffs. To be precise, there is only one -mycode(Timing_engraver), and it is located in the top level context, the -mycode(Score) context. +code(Timing_engraver), and it is located in the top level context, the +code(Score) context. -All staffs use the information in the global mycode(Timing_engraver) +All staffs use the information in the global code(Timing_engraver) for generating bar lines and time signatures. In polymetric music, this timing information can be different for every staff, so we should redefine -the mycode(Staff) context to include and the mycode(Score) context to exclude the -mycode(Timing_engraver). +the code(Staff) context to include and the code(Score) context to exclude the +code(Timing_engraver). mudela(verbatim)( polymetricpaper = \paper { @@ -1660,7 +1660,7 @@ polymetricpaper = \paper { } ) -As you can see, we used the identifier mycode(polymetricpaper) to break +As you can see, we used the identifier code(polymetricpaper) to break up the large score block. More of these context definitions appear in the standard initialisation file file(engraver.ly). @@ -1675,8 +1675,8 @@ mechanism will unveiled. By naming other contexts that you create, you can reference other contexts than the current context from within the music. For example, from within the music that you -enter for staff mycode(One), one could enter a small piece of music, -and send it to staff mycode(Two), e.g., +enter for staff code(One), one could enter a small piece of music, +and send it to staff code(Two), e.g., mudela(fragment,verbatim)( < \type Staff = one { c''4 \type Staff = two { c4 c4 } c''4 } @@ -1702,7 +1702,7 @@ bars of bind(J.)bind(S.)Bach's lovely Cello suite bind(no.)I to demonstrate this. The example makes heavy use of space rests: a space rest takes up time, like a rest does, but it doesn't print anything. It can be used as a placeholder, to attach articulation marks to. It -is entered as a note with the name mycode(s). +is entered as a note with the name code(s). mudela(verbatim)( bach = \notes { [c16 g e' d'] [e' g e' g] } @@ -1728,8 +1728,8 @@ mudela(verbatim)( ) The slurs that you define should be put on the music that is defined -by the mycode(\bach) identifier. By labeling a mycode(Voice) context, and -directing both the articulation and the notes to that same mycode(Voice) +by the code(\bach) identifier. By labeling a code(Voice) context, and +directing both the articulation and the notes to that same code(Voice) context, the articulation is put over the right notes. @@ -1740,10 +1740,10 @@ COMMENT(In this section, we will complete the grammar for Music that was sketched earlier. ) One of the things that you can do with music is em(transposing) it. If you want to transpose a piece of music, then -you should prefix the keyword mycode(\transpose) along with the pitch +you should prefix the keyword code(\transpose) along with the pitch (relative to the central C) for the transposition.footnote(the -mycode(\type Staff) is to make sure that no separate staffs are created -for the mycode(\scale) and mycode(\transpose cis' \scale) part.) +code(\type Staff) is to make sure that no separate staffs are created +for the code(\scale) and code(\transpose cis' \scale) part.) mudela(verbatim)( @@ -1759,14 +1759,14 @@ scale = \notes \relative c' { [c8 d e f] } sect(Staff switching) We have seen that contexts can be nested. This means that they form a -tree. It is possible to edit this tree: for example, a mycode(Voice) -context can be taken out of a mycode(Staff) context, and put into +tree. It is possible to edit this tree: for example, a code(Voice) +context can be taken out of a code(Staff) context, and put into another. This has the effect of the voice switching staffs (something that often happens in keyboard music). The syntax for this operation -with these particular contexts is mycode(\translator Staff = newStaffName). +with these particular contexts is code(\translator Staff = newStaffName). The effect is analogous to the first example in section -ref(tutorial:urtext), but with the mycode(\translator) construction it +ref(tutorial:urtext), but with the code(\translator) construction it is possible to split the real music and the commands that determine in which staff the music is printed. For example: @@ -1804,8 +1804,8 @@ mudela(fragment)( ) To support this notion, Mudela allows you to modify the duration of a -note by multiplication or division. A mycode(c'4) note that would be in a -triplet is written as mycode(c'4*2/3). If you sequence a few of these +note by multiplication or division. A code(c'4) note that would be in a +triplet is written as code(c'4*2/3). If you sequence a few of these notes, you get a triplet.footnote(We added a normal staff in the example to show the difference.) mudela(fragment,verbatim)( @@ -1814,10 +1814,10 @@ mudela(fragment,verbatim)( LilyPond knows that these notes are no normal eighth notes, but the reader doesn't yet. To help the reader a beam or a bracket with a `3' -should be printed. The special beam command `mycode([2/3)' and the -matching close beam `mycode(]1/1)' will take care of that, and -they also abbreviate the mycode(*2/3) part. If you want brackets in -stead of beams, you can use `mycode(\[2/3])' and `mycode(\]1/1)'. +should be printed. The special beam command `code([2/3)' and the +matching close beam `code(]1/1)' will take care of that, and +they also abbreviate the code(*2/3) part. If you want brackets in +stead of beams, you can use `code(\[2/3])' and `code(\]1/1)'. mudela(fragment,verbatim)( < \type Staff = staffA { [2/3 c'8 c'8 c'8 ]1/1 @@ -1837,8 +1837,8 @@ mudela(fragment,verbatim)( [c''8 c''8 c''8 c''8 c''8 c''8 c''8] } > ) -For your convenience, mycode([2/3) can be further abbreviated to mycode([/3), and -you can abbreviate mycode(]1/1) on the closing beam marker to mycode(]/1). +For your convenience, code([2/3) can be further abbreviated to code([/3), and +you can abbreviate code(]1/1) on the closing beam marker to code(]/1). mudela(fragment,verbatim)( < \type Staff = staffA { @@ -1848,8 +1848,8 @@ mudela(fragment,verbatim)( ) -bf(Important) the construct with mycode([/3) and -mycode([/1) is a hack that sets a mode in the parser. This means that +bf(Important) the construct with code([/3) and +code([/1) is a hack that sets a mode in the parser. This means that verb(id = \notes { c8 c8 c8 } notATriplet =\notes { [2/3 \id ]1/1 }) does not produce a triplet. It will hopefully @@ -1865,7 +1865,7 @@ need for quotes can be reduced: most of the pitch intervals in conventional music are small. Therefore, it makes sense to leave out the quotes when the interval is small. We have built a mode that does exactly this. It is called the relative mode for octaves. You can -switch it on by entering mycode(\relative). Then LilyPond will +switch it on by entering code(\relative). Then LilyPond will interpret every note as if they mean the note with the same name closest to the previous. You have to specify the first pitch because the first note of a list obviously has no predecessor. So, you can @@ -1887,7 +1887,7 @@ verb( } ) -LilyPond converts any music with mycode(\relative) prepended to absolute +LilyPond converts any music with code(\relative) prepended to absolute music immediately when it is read. Internally it is stored it in absolute pitches. Since the tutorial mainly deals with how to specify musical information, and not how to enter it conveniently, the @@ -1920,7 +1920,7 @@ In short, it will look like this: verb( violoncello = \notes \relative c { .. } ) -The mycode(\global) part contains everything that is global, i.e., the +The code(\global) part contains everything that is global, i.e., the same, for each instrument. This may include time signature, key, repeat signs, different bar types, time signature- and key changes, rehearsal marks, etc. @@ -1942,7 +1942,7 @@ For each instrument, you'll have something vaguely resembling verb( subsect(Including Mudela files) ref(subsect:include) -You can include other Mudela files with the command mycode(\include): +You can include other Mudela files with the command code(\include): verb( \include "paper13.ly" \score { @@ -1965,7 +1965,7 @@ closing titles. LilyPond does not have any real support for setting text: that is a job best left to TeX(). But you can pass messages to TeX() from the input file. You can write TeX() macros to handle these messages. -To do this, you add a mycode(\header) block +To do this, you add a code(\header) block to your input file. The format is quite simple, verb( @@ -1977,15 +1977,15 @@ verb( }) When the results of the music typesetting are output, the contents of -mycode(\header) are also up into the TeX() file. Tools like -mycode(ly2dvi) can use this information to generate pretty titling for -your input file. Consult the manual page of mycode(ly2dvi) for more +code(\header) are also up into the TeX() file. Tools like +code(ly2dvi) can use this information to generate pretty titling for +your input file. Consult the manual page of code(ly2dvi) for more details. -The mycode(\header) block should be at toplevel in mudela, and +The code(\header) block should be at toplevel in mudela, and preferably at the top of the file. If you have an input file with -multiple mycode(\score) blocks, you should add a header to every score, +multiple code(\score) blocks, you should add a header to every score, describing the different sub parts of the music piece, eg. @@ -2005,7 +2005,7 @@ verb(\header { } ) -If you want you can also put the mycode(\header) block at the top of the +If you want you can also put the code(\header) block at the top of the input file; it will then be put into every output file automatically. This will make it clear what the file contains as soon as you open it. diff --git a/INSTALL.txt b/INSTALL.txt index e69de29bb2..c62032bee9 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -0,0 +1,488 @@ + + + + + + + + + + INSTALL - compiling and installing GNU LilyPond + + HWN & JCN + + +Contents + + 1: ABSTRACT +2: PREREQUISITES +3: RUNNING +4: RECOMMENDED +5: WEBSITE +6: CONFIGURING and COMPILING +7: CONFIGURING FOR MULTIPLE PLATFORMS +8: INSTALLING +9: REDHAT LINUX +10: DEBIAN GNU/LINUX +11: WINDOWS NT/95 +12: AUTHORS + + +1: ABSTRACT + + +You do something which looks remotely like + + + + + + configure # Check out the buildscripts/set-lily.sh script + make + make install + + + + + +The detailed instructions follow here. The build- +scripts/set-lily.sh script sets some environment variables +and symlinks, which comes in handly when you have to compile +LilyPond very often. It is aimed at people who run (or +debug) LilyPond without installing. + + +2: PREREQUISITES + + +For compilation you need: + + +o A GNU system: GNU LilyPond is known to run on these GNU + systems: Linux (PPC, intel), FreeBSD, AIX, NeXTStep, + IRIX, Digital Unix and Solaris. + + +o Lots of disk space: LilyPond takes between 50 and 100 + mb to compile if you use debugging information. If you + are short on disk-space run configure with --disable- + debugging. + + Although we recommend to use Unix, LilyPond is known to + run on Windows NT/95/98 as well. See Section 11. + + +o GNU C++ version 2.7 or newer (2.8 and egcs are also + fine). + +o Python 1.5 (Strictly speaking, you shouldn't need + Python for compiling and installing, but you'll need it + to regenerate the font tables, e.g.). + + +3: RUNNING + + +GNU LilyPond does use a lot of resources. For operation you +need the following: + + +o TeX + +o A PostScript printer and/or viewer (such as + Ghostscript) is strongly recommended. Xdvi will show + all embedded PostScript too if you have Ghostscript + installed. + + +4: RECOMMENDED + + +Although not strictly necessary, these are recommended to +have. + + +o GNU make. Check out ftp://ftp.gnu.org or any mirror of + this site. + + +o Flex (version 2.5.4 or newer). Check out + ftp://ftp.gnu.org or any mirror of this site. + +o Bison (version 1.25 or newer). Check out + ftp://ftp.gnu.org or any mirror of this site. + + +o Python (version 1.5 or newer). Check out + ftp://ftp.python.org or ftp://ftp.cwi.nl/pub/python. + + +o Yodl. All documentation will be in Yodl. (1.30.17) + ftp://pcnov095.win.tue.nl/pub/yodl + http://www.cs.uu.nl/~hanwen/yodl + +o Texinfo. (version 3.12 or newer) + + +o GNU find Check out ftp://ftp.gnu.org or any mirror of + this site. + + +o The geometry package for LaTeX is needed to use ly2dvi. + Available at ftp://ftp.ctan.org/tex- + archive/macros/latex/contrib/supported/geometry or at + mirror site ftp://ftp.dante.de + + +o A fast computer (a full page of music typically takes 1 + minute on my 486/133, using the --enable-checking com- + pile. It's lot slower than most MusiXTeX preprocessors) + + +5: WEBSITE + + +If you want to auto-generate Lily's website, you'll need +some additional conversion tools. + + +o xpmtoppm (from the Portable Bitmap Utilities) (For Red- + Hat Linux users: it is included within the package + libgr-progs). + +o Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html. + Which, in turn depends on man2html for proper installa- + tion. man2html can be had from http://askdon- + ald.ask.uni-karlsruhe.de/hppd/hpux/Network- + ing/WWW/Man2html-1.05. + + TeTeX users should not forget to rerun texhash. + + +6: CONFIGURING and COMPILING + + +to install GNU LilyPond, simply type: + + + + + + configure --enable-tex-dir=XXXX --enable-mf-dir=YYYY + make + make install + + + + + +This will install a number of files, something close to: + + + /usr/local/man/man1/mi2mu.1 + /usr/local/man/man1/convert-mudela.1 + /usr/local/man/man1/mudela-book.1 + /usr/local/man/man1/lilypond.1 + /usr/local/bin/lilypond + /usr/local/bin/mi2mu + /usr/local/share/lilypond/* + /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo + /usr/lib/texmf/texmf/tex/lilypond/* + + + + + +You should specify directories that are in 's and MetaFont's +include path with the options (--enable-tex-dir) and +--enable-mf-dir. If you don't specify any directories, the +include directory is detected dynamically, which is unreli- +able. The above assumes that you are root and have the GNU +development tools, and your make is GNU make. If this is +not the case, you can adjust your environment variables to +your taste: + + + + + + + export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" + configure + + + + + +CPPFLAGS are the preprocessor flags. + +The configure script is Cygnus configure, and it will accept +--help. If you are not root, you will probably have to make +it with a different --prefix option. Our favourite location +is + + + + + + + configure --prefix=$HOME/usr + + +In this case, you will have to set up MFINPUTS, and TEXIN- +PUTS accordingly. + +If you want to install GNU LilyPond in /usr/local, and your +TeX has no default hooks for local stuff, you can do: + + + + + + + configure --prefix=/usr/local --enable-tex-prefix=/usr/lib/texmf + + + + + +Since GNU LilyPond currently is beta, you are advised to +also use + + + + + + + --enable-debugging + --enable-checking + + + + + +Other options include: + + +--enable-shared + Make a shared library (gnu/linux, solaris (?) only ) + (TEMPORARILY OUT OF ORDER) + + +--enable-printing + Enable debugging print routines (lilypond -D option) + +--enable-optimise + Set maximum optimisation: compile with -O2 + +--enable-profiling + Compile with support for profiling. + +--enable-tex-prefix + Set the directory where TeX and Metafont live. + +--enable-tex-dir + Set then directory TeX input is in (detected as a + + + subdir of tex-prefix). This should be a directory that + is reachable both for tex and latex. On my system the + best choice would be + /usr/lib/texmf/texmf/tex/generic//. + +--enable-mf-dir + Set the directory metafont input is in (idem). On my + system the best choice would be + /usr/lib/texmf/texmf/fonts/source/public/. + +--enable-config + Output to a different configuration file. Needed for + multi-platform builds + +All options are documented in the configure help The option +--enable-optimise is recommended for Real Life usage. + +If you do + + + + + + + make all + + + + + +everything will be compiled, but nothing will be installed. +The resulting binaries can be found in the subdirectories +out/ (which contain all files generated during compilation). + + +7: CONFIGURING FOR MULTIPLE PLATFORMS + + +If you want to compile LilyPond with different configuration +settings, then, you can use the --enable-config option. +Example: suppose I want to build with and without profil- +ing. Then I'd use the following for the normal build, + + + + + + + configure --prefix=~ --disable-optimise --enable-checking + make + make install + + +and for the profiling version, I specify a different config- +uration. + + + + + + + configure --prefix=~ --enable-profiling --enable-config=optprof --enable-optimise --disable-checking + make config=optprof + make config=optprof install + + + + + + +8: INSTALLING + + +If you have done a successful make, then a simple + + + + + + + make install + + + + + +should do the trick. + +If you are doing an upgrade, please remember to remove obso- +lete .pk and .tfm files of the fonts. A script has been +provided to do the work for you, see bin/clean-fonts.sh. + + +CAVEATS + + + +o The -O2 option to gcc triggers a gcc bug on DEC Alpha + in dstream.cc. You should turn off this flag for this + file. + + +EXAMPLE + + +This is what I type in my xterm: + + + lilypond someinput.ly + tex someinput.tex + xdvi someinput& + + + + + +This is what the output looks like over here: + + + + + + + GNU LilyPond 0.0.78 #4/FlowerLib 1.1.24 #0 + Parsing ... [/home/hw/share/lilypond/init// + <..etc..> + init//performer.ly]]][input/kortjakje.ly] + Creating elements ...[8][16][24][25] + Preprocessing elements... + Calculating column positions ... [14][25] + Postprocessing elements... + TeX output to someinput.tex ... + Creating MIDI elements ...MIDI output to someinput.midi ... + + + hw:~/musix/spacer$ xdvi someinput& + [1] 855 + + + + + +Check out the input files, some of them have comments Please +refer to the man page for more information. + + +9: REDHAT LINUX + + +RedHat Linux users can compile an RPM. A spec file is in +make/out/lilypond.spec. You should install a gif file +called lelie_icon.gif along with the sources. You can gen- +erate this gif file by typing + + + + + + + make gifs + + +in the directory Documentation. + +You can make the rpm by issuing + + + + + + + make rpm + + + + + + +10: DEBIAN GNU/LINUX + + +A Debian package is also available; contact Anthony Fok +foka@debian.org . The build scripts are in +the subdirectory debian/ + + +11: WINDOWS NT/95 + + +Separate instructions on building for W32 are avaible in the +file README-W32.yo. + + +12: AUTHORS + + +Han-Wen Nienhuys + +Jan Nieuwenhuizen + +Have fun! diff --git a/NEWS b/NEWS index 036c700d18..c615f4cf69 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,53 @@ +pl 13.uu1 + - bfs for footer + - bf: init/{book,center}-fragment.ly, YODL nofooter stuff. + - bf: redeclaration + - bf: doc fixes + - bfs: egcs 1.1 + pl 13.mb1 - bf: Lookup::afm_find, the width was undefined for the feta fonts. - bf: refman.yo - - The time signature warnings still remain, will be fixed later. + +pl 13.jcn5 + - bf: init/paper* missing `;' + - lilyponddefs.ps fixes + - crude output name fix, see scores.cc + +pl 13.jcn4 + - some ps output fixes + - lilyponddefs.ps: some sane implemenations + - removed (some) ghostscript internals + +pl 13.jcn3 + - PostScript output version 0.0; do + export GS_LIB=$HOME/usr/src/lilypond/tex + export GS_FONTPATH=$HOME/usr/src/lilypond/mf/out + make -C mf pfa + lilypond -t example-1 # or try: lilypond -t twinkle :-) + gv lelie.ps + - ps: + * lots of output fixes, chars, strings + * tex/lilyponddefs.ps: added rather braindead defs + +pl 13.jcn2 + - tex/lily-ps-defs.ps (./tex?) + - grand output rehack + * dropped {dimen,tex}.{cc,hh} + * {ps,tex} stuf to {Ps,Tex}_lookup + * init/table*.ly: added #parameters + - ps fonts: + * ps-to-pfa.py generates valid type-3 fonts + * do: make -C mf pfa + * set: GS_FONT=GS_FONTPATH=$HOME/usr/src/lilypond/mf/out + +pl 13.jcn1 + - crude postscript type 3 font: + make sure to have mfplain.mem metapost precompiled macros + make -C mf ps + gv out/feta20.sp + +******** pl 12.mb1 - bf: feta-timesig.mf Added horizontal space, minor corrections. diff --git a/PATCHES.txt b/PATCHES.txt index e69de29bb2..2f32fb9487 100644 --- a/PATCHES.txt +++ b/PATCHES.txt @@ -0,0 +1,224 @@ + + + + + + +NAME + + PATCHES - track and distribute your code changes + +DESCRIPTION + + This page documents how to distribute your changes to +GNU lilypond (or in fact any other StepMake package). + +ABSTRACT + + Distributing a change normally goes like this: + +o make your fix/add your code + +o Add changes to NEWS, and add yourself to Documenta- + tion/AUTHORS.yo + +o generate a patch, + +o e-mail your patch to one of the mailing lists gnu- + music-discuss@gnu.org or bug-gnu-music@gnu.org + +GENERATING A PATCH + + In VERSION, set MY_PATCH_LEVEL: + + + + + + VERSION: + ... + MY_PATCH_LEVEL=jcn1 + + + + + +In NEWS, enter a summary of changes: + + + + + + + NEWS: + pl 0.1.73.jcn1 + - added PATCHES.yo + + +Then, from the top of Lily's source tree, type + + + + + + + make diff + + + + + +which leaves your patch as ./lilypond-0.1.73.jcn1.diff. + +If you didn't configure Lily using --srcdir, you can do: + + + + + + + make release + + tar-ball: ../patches/lilypond-0.1.73.jcn1.gz + patch: ../patches/lilypond-0.1.73.jcn1.gz + updeet: ../test/updeet + + + + + + +PREREQUISITES + + +For creating a patch you need + + +o All items mentioned in INSTALL. You're not going to + send a patch that you haven't even built, right? + +o GNU diff + +o Python (version 1.5 or newer). You can of course make + a patch by hand, which would go something like: + + + make distclean + cd .. + diff -urN lilypond-0.1.73 lilypond-0.1.73.jcn1 > lilypond-0.1.73.jcn1 + + + + + + but there are handy python scripts available. If + you're doing development, you'll need Python for other + LilyPond scripts anyway. + + +o The Lily directory structure, which looks like: + + + + + + + doos/ # gnu/windows32 build and binary releases + harmonia -> harmonia-x.y.z + harmonia-x.y.z/ + lilypond -> lilypond-x.y.z # symlink to development directory + lilypond-x.y.z/ # current development + patches/ # patches between different releases + RedHat/BUILD # RedHat build and binary releases + RedHat/RPMS + RedHat/SPECS + releases/ # .tar.gz releases + test/ # tarballs and diffs from current version + yodl -> yodl-1.30.17 + yodl-1.30.17 + + + + + with prefix $HOME/usr/src and (for building rpms only) + in $HOME/.rpmrc: + + + + + + topdir: /home/fred/usr/src/RedHat + + +APPLYING PATCHES + + +If you're following LilyPond development regularly, you +probably want to download just the patch for each subsequent +release. After downloading the patch (into the patches +directory, of course), simply apply it: + + + + + + + gzip -dc ../patches/lilypond-0.1.74.diff.gz | patch -p1 -E + + + + + +and don't forget to make automatically generated files: + + + + + + + autoconf footnote(patches don't include automatically generated files, + i.e. file(configure) and files generated by file(configure).) + + configure + + + + + + +SYNCHRONISE + + +If you're not very quick with sending your patch, there's a +good chance that an new release of LilyPond comes available. +In such a case (and sometimes for other unkown reasons :-), +the maintainer will probably ask you to make a new patch +against the latest release. Your best bet is to download +the latest release, and apply your patch against this new +source tree: + + + cd lilypond-0.1.74 + gzip -dc ../patches/lilypond-0.1.73.jcn1.diff.gz | patch -p1 -E + autoconf + configure + + + + + +Then, make a patch as shown above. + + +SEE ALSO + + +stepmake/INSTALL.txt + + +MAINTAINER + + +Han-Wen Nienhuys + +Just keep on sending those patches! diff --git a/README.txt b/README.txt index e69de29bb2..f2f69ed235 100644 --- a/README.txt +++ b/README.txt @@ -0,0 +1,92 @@ + + + + + + +This is the toplevel README to LilyPond LilyPond is the GNU +Project music typesetter. This program can print beautiful +sheet music from a music definition file. It can also play +mechanical performances to a MIDI file. Features include +multiple staffs, meters, clefs, keys, lyrics, versatile +input language, cadenzas, beams, slurs, triplets, formatting +scores, part extraction. It includes a nice font of musical +symbols. + +1: VERSIONING + + if you have downloaded a *.pre* version, then this is +version is *not* meant for producing nice output (but to +keep your patchsets up to date). It might not even compile. +The same goes for a version with a 4th version number, eg +1.2.3.mypatch2 It will be safer if you download 1.2.3 or +wait for 1.2.4. + +2: REQUIREMENTS + + For the compilation and running of LilyPond you need +some additional packages. Please refer to the installation +instructions. NOTE: If you downloaded a binary (.rpm or a +W95/NT .zip file), then you don't have to compile LilyPond. + +3: INSTALLATION + + For your convenience, a formatted copy of the INSTALL +instructions are in the toplevel directory, as INSTALL.txt +The process is fairly straightforward, but chances are that +you have to specify directories for to configure: this is +done with the options --enable-tex-dir and --enable-mf-dir + +4: DOCUMENTATION + + The real documentation is the directory Documentation/ +To generate the pretty-printed docs, you have to run config- +ure first, and then do this: make doc You can also simply +read the .yo sources. They are ASCII text. The complete +documentation is accessible in formatted form at the website +http://www.cs.uu.nl/people/hanwen/lilypond/index.html + +5: COMMENTS + + LilyPond is a long way from finished and polished. We +do appreciate criticism, comments, bugreports, patches, etc. +Please send your e-mail to one of the MAILING LISTS and not +to us personally. See Documentation/links.yo for more info. + +6: DOZE + + If you have received this file as part of a DOS/Win- +dow32 distribution (lilypond-*.zip), then it is advisable to +also download the source package, since it might contain + + +more documentation ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/ If +you decide to build LilyPond from source, please read the +INSTALL.txt document first, especially the Windows NT/95 +section. + +7: CAVEATS + + * Please read the file BUGS for some ugly bugs. This +especially applies Linux-Intel unix users. * If you have +installed a previous version, be sure to remove old font +files, eg + + + + + rm `find /var/lib/texmf/fonts -name 'feta*'` + + + + +a script to do this for you is in bin/cleanfonts.sh + + +8: CDROM DISTRIBUTIONS + + +If you have received LilyPond on a cdrom, chances are that +development has moved a some patchlevels up. If possible, +please check the latest version of LilyPond before reporting +bugs. diff --git a/TODO b/TODO index 0ff8de840f..275774c463 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,39 @@ grep for TODO and ugh/ugr/urg BUGS: + + + > \notes{ a \< b \cr } + > + > work but + > + > \notes{ a \< b \! } + > + > give a parse error? + + + * if possible, it might be nice for a warning to appear if someone does + > \translator with no name and without assigning it to an +identifier. possible, it might be nice for a warning to appear if +someone does + > \translator with no name and without assigning it to an +identifier. + + * space after bars? + + * [/3 c8 c16 c c c]/1 + + * I see that \prallprall and \prallmordent are identical. I think this is a + mistake, that \prallprall should not have the vertical line. + This can be fixex by removing the line + > draw_mordent(twidth-0.5toverlap); + from the definition of \prallprall in mf/feta-slag.mf (see below) + + * fix singleStaffBracket + + * repeat bars: need distance after ":|" and before "|:" + + - The time signature warnings still remain, will be fixed later. + * fix \n after proccing Summary of minor spelling irregularities: @@ -26,6 +59,29 @@ BUGS: **** + > lbheel = \script { "bheel" 0 0 -1 0 0 } +> rbheel = \script { "bheel" 0 0 1 0 0 } +> lbtoe = \script { "btoe" 0 0 -1 0 0 } +> rbtoe = \script { "btoe" 0 0 1 0 0 } +> lfheel = \script { "fheel" 0 0 -1 0 0 } +> rfheel = \script { "fheel" 0 0 1 0 0 } +> lftoe = \script { "ftoe" 0 0 -1 0 0 } +> rftoe = \script { "ftoe" 0 0 1 0 0 } +> +> and also +> +> portato= \script { "portato" 0 -1 0 1 0 } + + * MIDI spelling. + + * foo = 1 + + \score{ + \notes { a } + \paper{ foo = \translator{ \StaffContext}; } + } + + * Align_element::padding ? * uniformise property names. diff --git a/VERSION b/VERSION index 88db5c3e8f..41cbf15065 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=0 -PATCH_LEVEL=13 -MY_PATCH_LEVEL=mb1 +PATCH_LEVEL=14 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/mf-to-xpms.sh b/buildscripts/mf-to-xpms.sh index 8ea9134e3a..03729893d9 100644 --- a/buildscripts/mf-to-xpms.sh +++ b/buildscripts/mf-to-xpms.sh @@ -6,7 +6,7 @@ if [ $# -ne 1 ]; then exit 2 fi -font=$1 +font=`basename $1 .mf` mf=$font.mf afm=out/$font.afm PKTOPBM=pktopbm diff --git a/debian/control b/debian/control index 44a7467fdb..08a7805a9e 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,12 @@ Architecture: any Depends: ${shlibs:Depends}, tetex-base (>= 0.9-5) Conflicts: musixtex-fonts, tetex-base (<< 0.9) Description: The GNU Project music typesetter. + LilyPond is the GNU Project music typesetter. This program can print + beautiful sheet music from a music definition file. It can also play + mechanical performances to a MIDI file. Features include multiple + staffs, meters, clefs, keys, lyrics, versatile input language, cadenzas, + beams, slurs, triplets, formatting scores, part extraction. It includes + a nice font of musical symbols. . URL: http://www.cs.ruu.nl/people/hanwen/lilypond http://sca.uwaterloo.ca/~praetzel/lilypond/ diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index 537b9236cf..45d754abd3 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -28,13 +28,13 @@ int _Interval__compare (const Interval_t&a,Interval_t const&b) { if (a.left == b.left && a.right == b.right) - return 0; + return 0; if (a.left <= b.left && a.right >= b.right) - return 1; + return 1; if (a.left >= b.left && a.right <= b.right) - return -1; + return -1; return -2; } @@ -45,7 +45,7 @@ Interval_t::contains_b (Interval_t const& a) const { int c_i= _Interval__compare (*this, a); if (c_i == -2) - return false; + return false; return c_i >= 0; } @@ -55,7 +55,7 @@ Interval__compare (const Interval_t&a,Interval_t const&b) { int i = _Interval__compare (a,b); if (i < -1) - assert (false); + assert (false); return i; } @@ -82,9 +82,9 @@ void Interval_t::unite (Interval_t h) { if (h.leftright) - right = h.right; + right = h.right; } /** @@ -117,7 +117,7 @@ String Interval_t::str() const { if (empty_b()) - return "[empty]"; + return "[empty]"; String s ("["); return s + T_to_str (left) + String ("," ) + T_to_str (right ) + String ("]" ); @@ -132,6 +132,6 @@ Interval_t::elem_b (T r) #define INTERVAL__INSTANTIATE(T) struct Interval_t;\ - template int Interval__compare(const Interval_t&,Interval_t const&) +template int Interval__compare(const Interval_t&,Interval_t const&) #endif // INTERVAL_TCC diff --git a/flower/interval.cc b/flower/interval.cc index 571d23f530..aaadcc196c 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -11,8 +11,6 @@ #include "real.hh" #include "interval.tcc" -template INTERVAL__INSTANTIATE (Real); - Real Interval_t::infinity () { @@ -25,7 +23,6 @@ Interval_t::T_to_str (Real r) return to_str (r); } -template INTERVAL__INSTANTIATE (int); int Interval_t::infinity () @@ -39,3 +36,6 @@ Interval_t::T_to_str (int i) return to_str (i); } +template INTERVAL__INSTANTIATE (int); +template INTERVAL__INSTANTIATE (Real); + diff --git a/init/book-fragment.ly b/init/book-fragment.ly index a914919400..0aa5267045 100644 --- a/init/book-fragment.ly +++ b/init/book-fragment.ly @@ -6,13 +6,15 @@ \include "declarations.ly" \include "paper16.ly" + \paper { \paper_sixteen + linewidth = -1.\cm; + castingalgorithm = \Wordwrap; + "unusedentry" = "}\\def\\nolilyfooter{"; + } \score { \notes { \maininput } - \paper { \paper_sixteen - linewidth = -1.\cm; - castingalgorithm = \Wordwrap; - } +\paper{} } diff --git a/init/center-fragment.ly b/init/center-fragment.ly index 20ef3e235a..6c26e3840d 100644 --- a/init/center-fragment.ly +++ b/init/center-fragment.ly @@ -1,5 +1,6 @@ % Toplevel initialisation file. + \version "1.0.6"; @@ -9,16 +10,16 @@ \paper { \paper_sixteen - linewidth = 7.\cm; + linewidth = -1.0\cm; + castingalgorithm = \Wordwrap; + "unusedentry" = "}\\def\\nolilyfooter{"; } + \score { % \notes\relative c { \notes { \maininput } - \paper { - linewidth = -1.0\cm; - castingalgorithm = \Wordwrap; - } +\paper{} } diff --git a/init/engraver.ly b/init/engraver.ly index a310e9336c..be32475668 100644 --- a/init/engraver.ly +++ b/init/engraver.ly @@ -4,7 +4,7 @@ StaffContext=\translator { \type "Line_group_engraver_group"; - Staff ; + \name Staff ; %{ The Hara_kiri_line_group_engraver is a Line_group_engraver @@ -58,7 +58,7 @@ StaffContext=\translator { \translator{\StaffContext } \translator { \type "Line_group_engraver_group"; - ChoirStaff; + \name ChoirStaff; \consists "Vertical_align_engraver"; \consists "Staff_group_bar_engraver"; \accepts "Staff"; @@ -73,7 +73,7 @@ RhythmicStaffContext=\translator{ nolines = "1"; \consists "Pitch_squash_engraver"; \consists "Separating_line_group_engraver"; - RhythmicStaff; + \name RhythmicStaff; \consists "Bar_engraver"; \consists "Time_signature_engraver"; \consists "Staff_sym_engraver"; @@ -83,7 +83,7 @@ RhythmicStaffContext=\translator{ VoiceContext = \translator { \type "Engraver_group_engraver"; \consists "Dynamic_engraver"; - Voice ; + \name Voice ; \consists "Rest_engraver"; \consists "Dot_column_engraver"; @@ -104,7 +104,7 @@ VoiceContext = \translator { \translator {\VoiceContext} \translator { \type "Line_group_engraver_group"; - GrandStaff; + \name GrandStaff; \consists "Span_bar_engraver"; \consists "Vertical_align_engraver"; \consists "Piano_bar_engraver"; @@ -119,7 +119,7 @@ VoiceContext = \translator { \consists "Span_bar_engraver"; \consists "Vertical_align_engraver"; \consists "Staff_group_bar_engraver"; - StaffGroup; + \name StaffGroup; \accepts "Staff"; \accepts "RhythmicStaff"; \accepts "GrandStaff"; @@ -129,7 +129,7 @@ VoiceContext = \translator { \translator{ \type "Line_group_engraver_group"; - LyricVoice ; + \name LyricVoice ; \consists "Separating_line_group_engraver"; \consists "Lyric_engraver"; \consists "Beam_req_swallow_translator"; @@ -138,14 +138,14 @@ VoiceContext = \translator { \translator { \type "Line_group_engraver_group"; - Lyrics; + \name Lyrics; \consists "Vertical_align_engraver"; \accepts "LyricVoice"; } ScoreContext = \translator { \type Score_engraver; - Score; + \name Score; defaultClef = violin; \consists "Timing_engraver"; @@ -177,7 +177,7 @@ ScoreWithNumbers = \translator { \translator { \type "Score_engraver"; - StupidScore; + \name StupidScore; \consists "Staff_sym_engraver"; } @@ -197,7 +197,7 @@ BarNumberingStaffContext = \translator { HaraKiriStaffContext = \translator { \type "Hara_kiri_line_group_engraver"; - Staff; + \name Staff; barColumnPriority = "0"; marginBreakPriority = "-4"; @@ -226,7 +226,7 @@ OrchestralPartStaffContext = \translator { OrchestralScoreContext= \translator { \type Score_engraver; - Score; + \name Score; barScriptPadding = "2.0"; % dimension \pt markScriptPadding = "4.0"; barColumnPriority = "-4"; diff --git a/init/fragment.ly b/init/fragment.ly index 20ef3e235a..b80b83d735 100644 --- a/init/fragment.ly +++ b/init/fragment.ly @@ -7,18 +7,19 @@ \include "paper16.ly"; - \paper { +\paper { \paper_sixteen - linewidth = 7.\cm; + linewidth = -1.0\cm; + castingalgorithm = \Wordwrap; + "unusedentry" = "}\\def\\nolilyfooter{"; } + \score { % \notes\relative c { \notes { \maininput } - \paper { - linewidth = -1.0\cm; - castingalgorithm = \Wordwrap; - } + \paper { } + } diff --git a/init/paper16.ly b/init/paper16.ly index af51b3277a..ea7a7a0529 100644 --- a/init/paper16.ly +++ b/init/paper16.ly @@ -20,7 +20,8 @@ paper_sixteen = \paper { arithmetic_basicspace = 2.; arithmetic_multiplier = 4.8\pt; texsetting = "\\input lilyponddefs \\musixsixteendefs "; - + pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"; + 0 = \symboltables { \table_sixteen } -1 = \symboltables { \table_thirteen } -2 = \symboltables { \table_eleven } diff --git a/init/paper20.ly b/init/paper20.ly index ecc8a3eac7..b73b3817bf 100644 --- a/init/paper20.ly +++ b/init/paper20.ly @@ -20,7 +20,7 @@ paper_twenty = \paper { arithmetic_basicspace = 2.; arithmetic_multiplier = 6.\pt; texsetting = "\\input lilyponddefs \\musixtwentydefs "; - + pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"; -2 = \symboltables { \table_thirteen } -1 = \symboltables { \table_sixteen } diff --git a/init/performer.ly b/init/performer.ly index be6707238a..105243f5c5 100644 --- a/init/performer.ly +++ b/init/performer.ly @@ -4,7 +4,7 @@ \translator { \type "Staff_performer"; \accepts Voice; - Staff; + \name Staff; \consists "Key_performer"; \consists "Time_signature_performer"; } @@ -12,51 +12,51 @@ \translator { \type "Performer_group_performer"; - Thread ; + \name Thread ; \consists "Note_performer"; } \translator { \type "Performer_group_performer"; \accepts Thread; -Voice; +\name Voice; } \translator { \type "Performer_group_performer"; \accepts Staff; -GrandStaff;} +\name GrandStaff;} \translator { \type "Performer_group_performer"; \consists "Lyric_performer"; -LyricVoice; +\name LyricVoice; } \translator{ \type "Performer_group_performer"; - ChoirStaff; + \name ChoirStaff; \accepts Staff; } \translator { \type "Staff_performer"; \accepts LyricVoice; - Lyrics; + \name Lyrics; \consists "Time_signature_performer"; } \translator { \type Performer_group_performer; - StaffGroup; + \name StaffGroup; \accepts Staff; } \translator { \type "Score_performer"; - Score; + \name Score; instrument = piano; \accepts Staff; \accepts GrandStaff; diff --git a/init/table11.ly b/init/table11.ly index 646a0b843c..11cb57b9b1 100644 --- a/init/table11.ly +++ b/init/table11.ly @@ -8,68 +8,68 @@ table_eleven = \symboltables { \font "feta11.afm" - % index TeXstring, xmin xmax ymin ymax + % index symbol #parameters xmin xmax ymin ymax "style" = \table { - "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt - "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt - "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt - "number" "\\setnumber{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt - "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt + "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt + "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt + "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt + "number" "setnumber" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt + "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt } "dynamics" = \table { - "mf" "\\dynmf" - "fff" "\\dynfff" - "ff" "\\dynff" - "f" "\\dynf" + "mf" "dynmf" 0 + "fff" "dynfff" 0 + "ff" "dynff" 0 + "f" "dynf" 0 - "mp" "\\dynmp" - "p" "\\dynp" - "pp" "\\dynpp" - "ppp" "\\dynppp" - "fp" "\\dynfp" - "sf" "\\dynsf" - "sfz" "\\dynsfz" + "mp" "dynmp" 0 + "p" "dynp" 0 + "pp" "dynpp" 0 + "ppp" "dynppp" 0 + "fp" "dynfp" 0 + "sf" "dynsf" 0 + "sfz" "dynsfz" 0 } "align" = \table { - "-1" "\\leftalign{%}" - "0" "\\centeralign{%}" - "1" "\\rightalign{%}" + "-1" "leftalign" 1 + "0" "centeralign" 1 + "1" "rightalign" 1 } "bars" = \table { - "empty" "\\emptybar" - "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt - "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt - "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt - "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt - ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt - "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt + "empty" "emptybar" 0 + "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt + "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt + "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt + "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt + ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt + ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt + "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt } "foobar" = \table { - "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt } % dims ignored for this table "param" = \table { - "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt - "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "stem" "\\stem{%}{%}" - "fill" "\\hbox{}" - "rule" "\\rulesym{%}{%}" + "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt + "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "stem" "stem" 2 + "fill" "hbox{}" 0 + "rule" "rulesym" 2 } } diff --git a/init/table13.ly b/init/table13.ly index 1432209b8e..c57132ec46 100644 --- a/init/table13.ly +++ b/init/table13.ly @@ -8,68 +8,68 @@ table_thirteen = \symboltables { \font "feta13.afm" - % index TeXstring, xmin xmax ymin ymax + % index symbol #parameters xmin xmax ymin ymax "style" = \table { - "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt - "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt - "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt - "number" "\\setnumber{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt - "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt + "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt + "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt + "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt + "number" "setnumber" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt + "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt } "dynamics" = \table { - "mf" "\\dynmf" - "fff" "\\dynfff" - "ff" "\\dynff" - "f" "\\dynf" + "mf" "dynmf" 0 + "fff" "dynfff" 0 + "ff" "dynff" 0 + "f" "dynf" 0 - "mp" "\\dynmp" - "p" "\\dynp" - "pp" "\\dynpp" - "ppp" "\\dynppp" - "fp" "\\dynfp" - "sf" "\\dynsf" - "sfz" "\\dynsfz" + "mp" "dynmp" 0 + "p" "dynp" 0 + "pp" "dynpp" 0 + "ppp" "dynppp" 0 + "fp" "dynfp" 0 + "sf" "dynsf" 0 + "sfz" "dynsfz" 0 } "align" = \table { - "-1" "\\leftalign{%}" - "0" "\\centeralign{%}" - "1" "\\rightalign{%}" + "-1" "leftalign" 1 + "0" "centeralign" 1 + "1" "rightalign" 1 } "bars" = \table { - "empty" "\\emptybar" - "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt - "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt - "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt - "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt - ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt - "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt + "empty" "emptybar" 0 + "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt + "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt + "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt + "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt + ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt + ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt + "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt } "time_signatures" = \table { - "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt } % dims ignored for this table "param" = \table { - "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt - "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "stem" "\\stem{%}{%}" - "fill" "\\hbox{}" - "rule" "\\rulesym{%}{%}" + "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt + "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "stem" "stem" 2 + "fill" "hbox{}" 0 + "rule" "rulesym" 2 } } diff --git a/init/table16.ly b/init/table16.ly index c7ca13d246..df5ae32e8c 100644 --- a/init/table16.ly +++ b/init/table16.ly @@ -9,71 +9,71 @@ table_sixteen= \symboltables { \font "feta16.afm" - % index TeXstring, xmin xmax ymin ymax + % index symbol #parameters xmin xmax ymin ymax "style" = \table { - "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt - "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 8.0\pt - "finger" "\\setfinger{%}" 0.0\pt 2.0\pt 0.0\pt 4.0\pt - "italic" "\\setitalic{%}" 0.0\pt 4.\pt 0.0\pt 8.0\pt - "typewriter" "\\settypewriter{%}" 0.0\pt 4.\pt 0.0\pt 8.0\pt - "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 10.0\pt - "number" "\\setnumber{%}" 0.0\pt 6.0\pt 0.0\pt 8.0\pt - "roman" "\\settext{%}" 0.0\pt 4.5\pt 0.0\pt 8.0\pt + "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt + "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 8.0\pt + "finger" "setfinger" 1 0.0\pt 2.0\pt 0.0\pt 4.0\pt + "italic" "setitalic" 1 0.0\pt 4.\pt 0.0\pt 8.0\pt + "typewriter" "settypewriter" 1 0.0\pt 4.\pt 0.0\pt 8.0\pt + "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 10.0\pt + "number" "setnumber" 1 0.0\pt 6.0\pt 0.0\pt 8.0\pt + "roman" "settext" 1 0.0\pt 4.5\pt 0.0\pt 8.0\pt } "dynamics" = \table { - "mf" "\\dynmf" - "fff" "\\dynfff" - "ff" "\\dynff" - "f" "\\dynf" - "mp" "\\dynmp" - "p" "\\dynp" - "pp" "\\dynpp" - "ppp" "\\dynppp" - "fp" "\\dynfp" - "sf" "\\dynsf" - "sfz" "\\dynsfz" + "mf" "dynmf" 0 + "fff" "dynfff" 0 + "ff" "dynff" 0 + "f" "dynf" 0 + "mp" "dynmp" 0 + "p" "dynp" 0 + "pp" "dynpp" 0 + "ppp" "dynppp" 0 + "fp" "dynfp" 0 + "sf" "dynsf" 0 + "sfz" "dynsfz" 0 } "align" = \table { - "-1" "\\leftalign{%}" - "0" "\\centeralign{%}" - "1" "\\rightalign{%}" + "-1" "leftalign" 1 + "0" "centeralign" 1 + "1" "rightalign" 1 } "bars" = \table { - "empty" "\\emptybar" - "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt - "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 16.0\pt - "||" "\\doublebar{%}" 0.0\pt 4.0\pt 0.0\pt 16.0\pt - "|." "\\finishbar{%}" -4.0\pt 0.0\pt 0.0\pt 16.0\pt - ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 16.0\pt - ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|" "\\repeatbar" -8.0\pt 0.0\pt 0.0\pt 16.0\pt - "|:" "\\startrepeat" 0.0\pt 8.0\pt 0.0\pt 16.0\pt - ":|:" "\\repeatbarstartrepeat" 0.0\pt 16.0\pt 0.0\pt 16.0\pt + "empty" "emptybar" 0 + "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt + "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 16.0\pt + "||" "doublebar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt + "|." "finishbar" 1 -4.0\pt 0.0\pt 0.0\pt 16.0\pt + ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt + ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|" "repeatbar" 0 -8.0\pt 0.0\pt 0.0\pt 16.0\pt + "|:" "startrepeat" 0 0.0\pt 8.0\pt 0.0\pt 16.0\pt + ":|:" "repeatbarstartrepeat" 0 0.0\pt 16.0\pt 0.0\pt 16.0\pt } "meters" = \table { - "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt } % dims ignored for this table "param" = \table { - "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 80.0\pt - "bracket" "\\staffbracket{%}" 0.0\pt 4.0\pt 16.0\pt 128.0\pt - "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -8.0\pt 8.0\pt - "rule" "\\rulesym{%}{%}" - "stem" "\\stem{%}{%}" - "fill" "\\hbox{}" + "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 80.0\pt + "bracket" "staffbracket" 1 0.0\pt 4.0\pt 16.0\pt 128.0\pt + "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -8.0\pt 8.0\pt + "rule" "rulesym" 2 + "stem" "stem" 2 + "fill" "hbox{}" 0 } "beamslopes" = \table { - "slope" "\\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt - "horizontal" "\\rulesym{%}{%}" + "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt + "horizontal" "rulesym" 2 } } diff --git a/init/table20.ly b/init/table20.ly index 483c775ef2..2ba7508064 100644 --- a/init/table20.ly +++ b/init/table20.ly @@ -9,74 +9,74 @@ table_twenty = \font "feta20.afm" - % index TeXstring, xmin xmax ymin ymax + % index symbol #parameters xmin xmax ymin ymax "style" = \table { - "bold" "\\setbold{%}" 0.0\pt 5.50\pt 0.0\pt 8.0\pt - "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "finger" "\\setfinger{%}" 0.0\pt 4.5\pt 0.0\pt 5.0\pt - "typewriter" "\\settypewriter{%}" 0.0\pt 5.5\pt 0.0\pt 10.0\pt - "italic" "\\setitalic{%}" 0.0\pt 5.5\pt 0.0\pt 10.0\pt - "large" "\\setlarge{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt - "Large" "\\setLarge{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt - "mark" "\\setmark{%}" 0.0\pt 6.50\pt 0.0\pt 12.0\pt - "number" "\\setnumber{%}" 0.0\pt 8.0\pt 0.0\pt 10.0\pt - "roman" "\\settext{%}" 0.0\pt 5.6\pt 0.0\pt 10.0\pt + "bold" "setbold" 1 0.0\pt 5.50\pt 0.0\pt 8.0\pt + "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "finger" "setfinger" 1 0.0\pt 4.5\pt 0.0\pt 5.0\pt + "typewriter" "settypewriter" 1 0.0\pt 5.5\pt 0.0\pt 10.0\pt + "italic" "setitalic" 1 0.0\pt 5.5\pt 0.0\pt 10.0\pt + "large" "setlarge" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt + "Large" "setLarge" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt + "mark" "setmark" 1 0.0\pt 6.50\pt 0.0\pt 12.0\pt + "number" "setnumber" 1 0.0\pt 8.0\pt 0.0\pt 10.0\pt + "roman" "settext" 1 0.0\pt 5.6\pt 0.0\pt 10.0\pt } "dynamics" = \table { - "mf" "\\dynmf" - "fff" "\\dynfff" - "ff" "\\dynff" - "f" "\\dynf" - "mp" "\\dynmp" - "p" "\\dynp" - "pp" "\\dynpp" - "ppp" "\\dynppp" - "fp" "\\dynfp" - "sf" "\\dynsf" - "sfz" "\\dynsfz" + "mf" "dynmf" 0 + "fff" "dynfff" 0 + "ff" "dynff" 0 + "f" "dynf" 0 + "mp" "dynmp" 0 + "p" "dynp" 0 + "pp" "dynpp" 0 + "ppp" "dynppp" 0 + "fp" "dynfp" 0 + "sf" "dynsf" 0 + "sfz" "dynsfz" 0 } "align" = \table { - "-1" "\\leftalign{%}" - "0" "\\centeralign{%}" - "1" "\\rightalign{%}" + "-1" "leftalign" 1 + "0" "centeralign" 1 + "1" "rightalign" 1 } "bars" = \table { - "empty" "\\emptybar" - "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt - "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt - "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt - "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt - ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt - "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt + "empty" "emptybar" 0 + "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt + "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt + "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt + "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt + ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt + ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt + "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt } "meters" = \table { - "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt } % dims ignored for this table "param" = \table { - "bracket" "\\staffbracket{%}" 0.0\pt 0.0\pt 20.0\pt 160.0\pt - "rule" "\\rulesym{%}{%}" - "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 40.0\pt 100.0\pt - "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "stem" "\\stem{%}{%}" - "fill" "\\hbox{}" + "bracket" "staffbracket" 1 0.0\pt 0.0\pt 20.0\pt 160.0\pt + "rule" "rulesym" 2 + "brace" "pianobrace" 1 0.0\pt 0.0\pt 40.0\pt 100.0\pt + "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "stem" "stem" 2 + "fill" "hbox{}" 0 } "beamslopes" = \table { - "slope" "\\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt - "horizontal" "\\rulesym{%}{%}" + "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt + "horizontal" "rulesym" 2 } } diff --git a/init/table26.ly b/init/table26.ly index c9d7dbc412..07590b0353 100644 --- a/init/table26.ly +++ b/init/table26.ly @@ -8,68 +8,68 @@ table_twentysix = \symboltables { \font "feta26.afm" - % index TeXstring, xmin xmax ymin ymax + % index symbol #parameters xmin xmax ymin ymax "style" = \table { - "bold" "\\setbold{%}" 0.0\pt 7.50\pt 0.0\pt 8.0\pt - "dynamic" "\\setdynamic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "finger" "\\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 5.0\pt - "italic" "\\setitalic{%}" 0.0\pt 0.0\pt 0.0\pt 10.0\pt - "large" "\\setlarge{%}" 0.0\pt 9.50\pt 0.0\pt 12.0\pt - "number" "\\setnumber{%}" 0.0\pt 8.0\pt 0.0\pt 10.0\pt - "roman" "\\settext{%}" 0.0\pt 7.5\pt 0.0\pt 10.0\pt + "bold" "setbold" 1 0.0\pt 7.50\pt 0.0\pt 8.0\pt + "dynamic" "setdynamic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "finger" "setfinger" 1 0.0\pt 0.0\pt 0.0\pt 5.0\pt + "italic" "setitalic" 1 0.0\pt 0.0\pt 0.0\pt 10.0\pt + "large" "setlarge" 1 0.0\pt 9.50\pt 0.0\pt 12.0\pt + "number" "setnumber" 1 0.0\pt 8.0\pt 0.0\pt 10.0\pt + "roman" "settext" 1 0.0\pt 7.5\pt 0.0\pt 10.0\pt } "dynamics" = \table { - "mf" "\\dynmf" - "fff" "\\dynfff" - "ff" "\\dynff" - "f" "\\dynf" + "mf" "dynmf" 0 + "fff" "dynfff" 0 + "ff" "dynff" 0 + "f" "dynf" 0 - "mp" "\\dynmp" - "p" "\\dynp" - "pp" "\\dynpp" - "ppp" "\\dynppp" - "fp" "\\dynfp" - "sf" "\\dynsf" - "sfz" "\\dynsfz" + "mp" "dynmp" 0 + "p" "dynp" 0 + "pp" "dynpp" 0 + "ppp" "dynppp" 0 + "fp" "dynfp" 0 + "sf" "dynsf" 0 + "sfz" "dynsfz" 0 } "align" = \table { - "-1" "\\leftalign{%}" - "0" "\\centeralign{%}" - "1" "\\rightalign{%}" + "-1" "leftalign" 1 + "0" "centeralign" 1 + "1" "rightalign" 1 } "bars" = \table { - "empty" "\\emptybar" - "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt - "|" "\\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt - "||" "\\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt - "|." "\\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt - ".|" "\\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - ".|." "\\fatdoublebar{%}" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|" "\\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt - "|:" "\\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt - ":|:" "\\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt + "empty" "emptybar" 0 + "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt + "|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt + "||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt + "|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt + ".|" "startbar" 1 0.0\pt 4.0\pt 0.0\pt 20.0\pt + ".|." "fatdoublebar" 1 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|" "repeatbar" 0 -10.0\pt 0.0\pt 0.0\pt 20.0\pt + "|:" "startrepeat" 0 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt } "meters" = \table { - "C" "\\fourfourmeter" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "C2" "\\allabreve" 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt } % dims ignored for this table "param" = \table { - "brace" "\\pianobrace{%}" 0.0\pt 0.0\pt 32.0\pt 96.0\pt - "time_signature" "\\generalmeter{%}{%}" 0.0\pt 10.0\pt -5.0\pt 5.0\pt - "stem" "\\stem{%}{%}" - "fill" "\\hbox{}" - "rule" "\\rulesym{%}{%}" + "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 96.0\pt + "time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt + "stem" "stem" 2 + "fill" "hbox{}" 0 + "rule" "rulesym" 2 } } diff --git a/lib/include/duration-convert.hh b/lib/include/duration-convert.hh index fc7ee51d97..e3489c535c 100644 --- a/lib/include/duration-convert.hh +++ b/lib/include/duration-convert.hh @@ -34,7 +34,7 @@ struct Duration_convert { /* Urgh. statics. */ - static bool const midi_as_plet_b_s = true; + static bool const midi_as_plet_b_s; static bool no_quantify_b_s; static bool no_double_dots_b_s; static bool no_triplets_b_s; diff --git a/lib/include/moment.hh b/lib/include/moment.hh index 58e8a7ec96..d578fbc59a 100644 --- a/lib/include/moment.hh +++ b/lib/include/moment.hh @@ -1,5 +1,5 @@ /* - (c) 1996,97 Han-Wen Nienhuys + (c) 1996--98 Han-Wen Nienhuys */ #ifndef MOMENT_HH @@ -8,6 +8,10 @@ #include #include "rational.hh" +class String; +typedef Rational Moment; + + /** A really big time-moment. @@ -18,12 +22,8 @@ Can't we name this Saint_jut_mom (Sintjuttemis ?) */ -const infinity_mom = INT_MAX; - -class String; -typedef Rational Moment; - +const Moment infinity_mom = INT_MAX; #endif // diff --git a/lily/abbrev.cc b/lily/abbrev.cc index b5cf16e378..4af78938bc 100644 --- a/lily/abbrev.cc +++ b/lily/abbrev.cc @@ -13,7 +13,6 @@ #include "paper-def.hh" #include "lookup.hh" #include "stem.hh" -#include "dimension.hh" Abbreviation::Abbreviation () { diff --git a/lily/abbreviation-beam.cc b/lily/abbreviation-beam.cc index 91f4ff21f9..05464b9670 100644 --- a/lily/abbreviation-beam.cc +++ b/lily/abbreviation-beam.cc @@ -10,7 +10,6 @@ #include "p-col.hh" #include "array.hh" #include "proto.hh" -#include "dimension.hh" #include "abbreviation-beam.hh" #include "misc.hh" #include "debug.hh" diff --git a/lily/atom.cc b/lily/atom.cc index cbb5579563..76b59197d3 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -8,12 +8,12 @@ #include "atom.hh" -#include "tex.hh" #include "interval.hh" -#include "dimension.hh" #include "string.hh" #include "array.hh" #include "debug.hh" +#include "dimensions.hh" +#include "lookup.hh" #include "main.hh" inline bool @@ -29,7 +29,7 @@ Atom::check_infinity_b ()const if (abs (off_[ax]) >= 100 CM) { warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax), - print_dimen (off_[ax]))); + global_lookup_l->print_dimen (off_[ax]))); if (experimental_features_global_b) assert (false); @@ -76,7 +76,7 @@ Atom::Atom () But Atom is used as a simple type *everywhere*, and we don't have virtual contructors. */ - str_ = ps_output_global_b ? "unknown" : "\\unknown"; + str_ = global_lookup_l->unknown_str (); } Atom::Atom (String s, Box b) diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 8a79324621..76163d5b3f 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -16,7 +16,6 @@ #include "span-bar.hh" #include "stem.hh" #include "time-description.hh" -#include "dimension.hh" Bar_number_engraver::Bar_number_engraver() { diff --git a/lily/beam.cc b/lily/beam.cc index dea856499b..075f08df2d 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -21,7 +21,7 @@ #include "p-col.hh" #include "array.hh" #include "proto.hh" -#include "dimension.hh" +#include "dimensions.hh" #include "beam.hh" #include "abbreviation-beam.hh" #include "misc.hh" diff --git a/lily/bezier.cc b/lily/bezier.cc index e851e74f03..6eb7bbecfd 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -11,8 +11,8 @@ #include "misc.hh" #ifndef STANDALONE +#include "dimensions.hh" #include "direction.hh" -#include "dimension.hh" #include "paper-def.hh" #include "debug.hh" #include "main.hh" diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index f973976774..05644f0261 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -7,7 +7,7 @@ */ #include "break-align-item.hh" -#include "dimension.hh" +#include "dimensions.hh" void Break_align_item::do_pre_processing() diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 4b59b529ad..4af8ceadcd 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -7,9 +7,9 @@ */ #include "molecule.hh" -#include "dimension.hh" #include "crescendo.hh" #include "lookup.hh" +#include "dimensions.hh" #include "paper-def.hh" #include "debug.hh" #include "score-column.hh" diff --git a/lily/dimen.cc b/lily/dimen.cc deleted file mode 100644 index a03b01caf2..0000000000 --- a/lily/dimen.cc +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include "dimension.hh" -#include "debug.hh" -#include "string.hh" - -Real -parse_dimen (String dim) -{ - int i=dim.length_i()-1; - char const *s = dim.ch_C (); - while (i > 0 && (isspace (s[i]) || isalpha (s[i]))) - { - i--; - } - String unit (s + i+1); - return convert_dimen (dim.value_f(), unit); -} - - -Real -convert_dimen (Real quant, String unit) -{ - if (unit == "cm") - return quant * CM_TO_PT; - if (unit == "pt") - return quant; - if (unit == "mm") - return quant*CM_TO_PT/10; - if (unit == "in") - return quant * INCH_TO_PT; - error (_f ("unknown length unit: `%s\'", unit)); -} - -String -print_dimen (Real r) -{ - String s = to_str (r, "%.3f"); - if (s.index_i ("NaN") != -1) - { - warning (_ ("NaN")); - s = "0.0"; - } - s += "pt"; - return s; -} - diff --git a/lily/header.cc b/lily/header.cc index 680245dc1a..fc95d2f8b2 100644 --- a/lily/header.cc +++ b/lily/header.cc @@ -29,7 +29,7 @@ Header::tex_string () const s+= "\\def\\LilyIdString{" + lily_id_str_ + "}"; for (Dictionary_iter i (*this); i.ok (); i++) - s += "\\def\\mudela" + i.key () + "{" + i.val () + "}"; + s += "\\def\\mudela" + i.key () + "{" + i.val () + "}\n"; return s; } @@ -41,7 +41,7 @@ Header::ps_string () const s+= "/lily_id_string\n{" + lily_id_str_ + "} bind def\n"; for (Dictionary_iter i (*this); i.ok (); i++) - s += "/mudela" + i.key () + "{" + i.val () + "} bind def"; + s += "/mudela" + i.key () + "{" + i.val () + "} bind def\n"; return s; } diff --git a/lily/include/dimension.hh b/lily/include/dimensions.hh similarity index 66% rename from lily/include/dimension.hh rename to lily/include/dimensions.hh index ac8267f187..777d80e89c 100644 --- a/lily/include/dimension.hh +++ b/lily/include/dimensions.hh @@ -1,5 +1,5 @@ -#ifndef DIMEN_HH -#define DIMEN_HH +#ifndef DIMENSIONS_HH +#define DIMENSIONS_HH #include "real.hh" #include "string.hh" @@ -14,8 +14,5 @@ const Real PT_TO_PT =1.0; #define CM *CM_TO_PT #define INCH *INCH_TO_PT -Real parse_dimen (String); -String print_dimen (Real); -Real convert_dimen (Real, String); -#endif +#endif // DIMENSIONS_HH diff --git a/lily/include/direction.hh b/lily/include/direction.hh index 8afa94ce43..e192dd35f3 100644 --- a/lily/include/direction.hh +++ b/lily/include/direction.hh @@ -36,7 +36,7 @@ flip (Direction *i) { if d > 0: the max operator if d < 0: the min operator */ -template minmax (Direction d, T, T); +template T minmax (Direction d, T, T); String direction_str (Direction, Axis); diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index a1bedc7a24..40dc740c14 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -17,6 +17,7 @@ #include "curve.hh" #include "afm.hh" #include "symtable.hh" +#include "box.hh" /** handy interface to symbol table */ @@ -32,9 +33,12 @@ public: void add (String, Symtable*); virtual Atom afm_find (String s) const = 0; Atom afm_find (String, String) const; + virtual Atom* atom_p (String, int, Box) const = 0; Atom ball (int) const; Atom bar (String, Real height) const; + String base_output_str () const; Atom beam (Real,Real, Real) const; + virtual String character_str (int i) const; Atom clef (String) const; virtual Atom dashed_slur (Array controls, Real thick, Real dash) const = 0; Atom dots () const; @@ -42,17 +46,32 @@ public: Atom fill (Box b) const; Atom flag (int, Direction) const; virtual Atom hairpin (Real width, bool decresc, bool continued) const = 0; + virtual Lookup* lookup_p (Lookup const&) const = 0; + virtual Lookup* lookup_p (Symtables const&) const = 0; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const = 0; + virtual Paper_stream* paper_stream_p () const = 0; virtual Atom plet (Real dy, Real dx, Direction dir) const = 0; void print () const; virtual Atom ps_beam (Real slope, Real width, Real thick) const = 0; + virtual String print_dimen (Real) const; Atom rest (int, bool outside) const; Atom rule_symbol (Real height, Real width) const; Atom script (String idx) const; + /** paratime_signature substitution in lookup strings. + this function provides a simple macro mechanism: + + if source == "tex%bla%", then + substitute_args (source, {"X","Y"}) == "texXblaY" + */ + String substitute_args (String source, Array args) const; + /// paratime_signature substitution in lookup strings + String substitute_args (String source, Array args) const; virtual Atom stem (Real y1_pos, Real y2_pos) const = 0; Atom stem (Real y1_pos, Real y2_pos, String) const; virtual Atom slur (Array controls) const = 0; Atom streepje (int type) const; - Atom text (String style, String text) const; + virtual Atom text (String style, String text) const; + virtual String unknown_str () const = 0; Atom vbrace (Real &dy) const; virtual Atom vbracket (Real &dy) const = 0; Atom special_time_signature (String, Array) const; diff --git a/lily/include/main.hh b/lily/include/main.hh index f5be0ca9ab..072813b2f1 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -24,7 +24,7 @@ extern bool no_timestamps_global_b; extern bool find_quarts_global_b; extern int exit_status_i_; extern bool experimental_features_global_b; -extern bool ps_output_global_b; +extern Lookup* global_lookup_l; extern bool dependency_global_b; extern bool version_ignore_global_b; diff --git a/lily/include/p-score.hh b/lily/include/p-score.hh index 553cc89375..6b627f9377 100644 --- a/lily/include/p-score.hh +++ b/lily/include/p-score.hh @@ -21,12 +21,8 @@ */ -class Paper_score : public Music_output { - Paper_outputter *open_paper_outputter (Paper_stream*); - Paper_outputter *open_ps_outputter (Ps_stream*); - Paper_outputter *open_tex_outputter (Tex_stream*); - Paper_stream *open_output_stream (); - +class Paper_score : public Music_output +{ public: Paper_def *paper_l_; diff --git a/lily/include/ps-lookup.hh b/lily/include/ps-lookup.hh index 3e2c5e0821..84f4abdcee 100644 --- a/lily/include/ps-lookup.hh +++ b/lily/include/ps-lookup.hh @@ -20,13 +20,21 @@ public: virtual ~Ps_lookup (); virtual Atom afm_find (String s) const; - virtual Atom Ps_lookup::dashed_slur (Array controls, Real thick, Real dash) const; - virtual Atom Ps_lookup::hairpin (Real width, bool decresc, bool continued) const; - virtual Atom Ps_lookup::plet (Real dy , Real dx, Direction dir) const; - virtual Atom Ps_lookup::ps_beam (Real slope, Real width, Real thick) const; - virtual Atom Ps_lookup::slur (Array controls) const; + virtual Atom* atom_p (String, int, Box) const; + virtual String character_str (int i) const; + virtual Atom dashed_slur (Array controls, Real thick, Real dash) const; + virtual Atom hairpin (Real width, bool decresc, bool continued) const; + virtual Lookup* lookup_p (Lookup const&) const; + virtual Lookup* lookup_p (Symtables const&) const; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const; + virtual Paper_stream* paper_stream_p () const; + virtual Atom plet (Real dy , Real dx, Direction dir) const; + virtual Atom ps_beam (Real slope, Real width, Real thick) const; + virtual Atom slur (Array controls) const; virtual Atom stem (Real y1, Real y2) const; - virtual Atom Ps_lookup::vbracket (Real &y) const; + virtual Atom text (String style, String text) const; + virtual String unknown_str () const; + virtual Atom vbracket (Real &y) const; }; #endif // PS_LOOKUP_HH diff --git a/lily/include/tex-lookup.hh b/lily/include/tex-lookup.hh index fb306b927d..24aadf1644 100644 --- a/lily/include/tex-lookup.hh +++ b/lily/include/tex-lookup.hh @@ -21,13 +21,22 @@ public: virtual ~Tex_lookup(); virtual Atom afm_find (String s) const; + virtual String character_str (int i) const; virtual Atom dashed_slur (Array controls, Real thick, Real dash) const; + virtual Atom* atom_p (String, int, Box) const; Atom embed (Atom a) const; virtual Atom hairpin (Real width, bool decresc, bool continued) const; + virtual Lookup* lookup_p (Lookup const&) const; + virtual Lookup* lookup_p (Symtables const&) const; + virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Header*, String) const; + virtual Paper_stream* paper_stream_p () const; virtual Atom plet (Real dy , Real dx, Direction dir) const; + virtual String print_dimen (Real) const; virtual Atom ps_beam (Real slope, Real width, Real thick) const; virtual Atom slur (Array controls) const; virtual Atom stem (Real y1, Real y2) const; + virtual Atom text (String style, String text) const; + virtual String unknown_str () const; virtual Atom vbracket (Real &y) const; }; diff --git a/lily/include/tex.hh b/lily/include/tex.hh deleted file mode 100644 index 3d5cf308b3..0000000000 --- a/lily/include/tex.hh +++ /dev/null @@ -1,35 +0,0 @@ -/* - tex.hh -- declare various functions for TeX output - - source file of the LilyPond music typesetter - - (c) 1997--1998 Han-Wen Nienhuys -*/ - - - -#ifndef TEX_HH -#define TEX_HH - -#include "string.hh" -#include "box.hh" -#include "scalar.hh" - -/** paratime_signature substitution in TeX_strings. - this function provides a simple macro mechanism: - - if source == "tex%bla%", then - substitute_args (source, {"X","Y"}) == "texXblaY" - */ -String -substitute_args (String source, Array args); - -/// paratime_signature substitution in TeX_strings -String -substitute_args (String source, Array args); - -/// #h# is in points -String vstrut (Real h); - - -#endif diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 23f341dfa7..7933239518 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -7,7 +7,6 @@ */ #include "line-of-score.hh" -#include "dimension.hh" #include "spanner.hh" #include "atom.hh" #include "paper-def.hh" diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 3791f48b97..564b66ea9a 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -5,7 +5,6 @@ (c) 1997--1998 Han-Wen Nienhuys */ -#include "dimension.hh" #include "local-key-item.hh" #include "molecule.hh" #include "scalar.hh" diff --git a/lily/lookup.cc b/lily/lookup.cc index 690d245531..8ba88483f5 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -14,9 +14,8 @@ #include "lookup.hh" #include "debug.hh" +#include "dimensions.hh" #include "symtable.hh" -#include "dimension.hh" -#include "tex.hh" #include "scalar.hh" #include "paper-def.hh" #include "string-convert.hh" @@ -110,6 +109,22 @@ Lookup::bar (String str, Real h) const return s; } +String +Lookup::base_output_str () const +{ + assert (paper_l_); + String str = paper_l_->get_default_output (); + + if (str.empty_b ()) + { + str = default_outname_base_global; + int def = paper_l_->get_next_default_count (); + if (def) + str += "-" + to_str (def); + } + return str; +} + Atom Lookup::beam (Real slope, Real width, Real thick) const { @@ -123,6 +138,12 @@ Lookup::beam (Real slope, Real width, Real thick) const return a; } +String +Lookup::character_str (int i) const +{ + return to_str (i); +} + Atom Lookup::clef (String st) const { @@ -166,6 +187,18 @@ Lookup::print () const #endif } +String +Lookup::print_dimen (Real r) const +{ + String s = to_str (r, "%.3f"); + if (s.index_i ("NaN") != -1) + { + warning (_ ("NaN")); + s = "0.0"; + } + return s; +} + Atom Lookup::rest (int j, bool o) const { @@ -180,9 +213,9 @@ Lookup::rule_symbol (Real height, Real width) const Array args; args.push (print_dimen (height)); args.push (print_dimen (width)); - bs.str_ = substitute_args (bs.str_,args); - bs.dim_.x () = Interval (0,width); - bs.dim_.y () = Interval (0,height); + bs.str_ = substitute_args (bs.str_, args); + bs.dim_.x () = Interval (0, width); + bs.dim_.y () = Interval (0, height); return bs; } @@ -195,16 +228,44 @@ Lookup::script (String str) const Atom Lookup::special_time_signature (String s, Array arr) const { - String symbolname="timesig-"+s+"%/%"; - Atom a (afm_find (substitute_args(symbolname,arr))); - if (!a.empty()) + String symbolname = "timesig-"+s+"%/%"; + Atom a (afm_find (substitute_args (symbolname, arr))); + if (!a.empty ()) return a; // Try if the full name was given - a=afm_find ("timesig-"+s); - if (!a.empty()) + a = afm_find ("timesig-"+s); + if (!a.empty ()) return a; // Resort to default layout with numbers - return time_signature(arr); + return time_signature (arr); +} + +static void +substitute_arg (String& r, String arg) +{ + int p = r.index_i ('%'); + if (p < 0) + return ; + + r = r.left_str (p) + arg + r.right_str (r.length_i () - p - 1); +} + +String +Lookup::substitute_args (String source, Array args) const +{ + String str (source); + for (int i = 0 ; i < args.size (); i++) + substitute_arg (str, args[i]); + return str; +} + +String +Lookup::substitute_args (String source, Array args) const +{ + Array sv; + for (int i = 0 ; i < args.size (); i++) + sv.push (args[i]); + return substitute_args (source, sv); } Atom @@ -295,7 +356,7 @@ Lookup::vbrace (Real &y) const { Array a; - a.push (to_str (idx)); + a.push (character_str (idx)); brace.str_ = substitute_args (brace.str_,a); brace.dim_[Y_AXIS] = Interval (-y/2,y/2); } diff --git a/lily/main.cc b/lily/main.cc index e07e46c750..33df5a1c83 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -11,6 +11,7 @@ #include #include #include "proto.hh" +#include "dimensions.hh" #include "plist.hh" #include "getopt-long.hh" #include "misc.hh" @@ -20,6 +21,8 @@ #include "config.hh" #include "file-results.hh" #include "debug.hh" +#include "ps-lookup.hh" +#include "tex-lookup.hh" #if HAVE_GETTEXT #include @@ -30,11 +33,13 @@ bool version_ignore_global_b = false; bool no_paper_global_b = false; bool no_timestamps_global_b = false; bool find_quarts_global_b = false; -bool ps_output_global_b = false; String default_outname_base_global = "lelie"; int default_count_global; File_path global_path; +Ps_lookup ps_lookup; +Tex_lookup tex_lookup; +Lookup* global_lookup_l = &tex_lookup; bool experimental_features_global_b = false; bool dependency_global_b = false; @@ -235,7 +240,7 @@ main (int argc, char **argv) { case 't': experimental_features_global_b = true; - ps_output_global_b = true; + global_lookup_l = &ps_lookup; break; case 'o': outname_str = oparser.optional_argument_ch_C_; diff --git a/lily/molecule.cc b/lily/molecule.cc index 032f0742fb..def5674fcf 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -7,12 +7,10 @@ */ #include "interval.hh" -#include "dimension.hh" #include "string.hh" #include "molecule.hh" #include "atom.hh" #include "debug.hh" -#include "tex.hh" Box Molecule::extent() const diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 279b6b9b36..c1df9ba763 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -11,7 +11,6 @@ #include "debug.hh" #include "paper-def.hh" #include "lookup.hh" -#include "dimension.hh" #include "rest.hh" #include "script.hh" #include "text-def.hh" diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index c37ec26b09..ee308432d9 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -43,6 +43,7 @@ static Keyword_ent the_key_tab[]={ {"time", TIME_T}, {"midi", MIDI}, {"mm", MM_T}, + {"name", NAME}, {"notenames", NOTENAMES}, {"notes" , NOTES}, {"output", OUTPUT}, @@ -108,7 +109,11 @@ My_lily_lexer::start_main_input () void My_lily_lexer::set_identifier (String name_str, Identifier* i, bool unique_b) { - Identifier *old = lookup_identifier (name_str); + Identifier *old =0; + if (scope_l_arr_.top ()->elem_b (name_str)) + old = scope_l_arr_.top ()->elem(name_str); + + if (old) { #if 0 diff --git a/lily/note-head.cc b/lily/note-head.cc index 00539b06d0..8245b67640 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -9,7 +9,6 @@ #include "misc.hh" #include "dots.hh" #include "note-head.hh" -#include "dimension.hh" #include "debug.hh" #include "paper-def.hh" #include "lookup.hh" diff --git a/lily/p-score.cc b/lily/p-score.cc index 0ab995f15c..25eaac2aa4 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -207,8 +207,9 @@ Paper_score::process () line_l_->space_processing (); Array breaking = calc_breaking (); - Paper_stream *paper_stream_p = open_output_stream (); - outputter_l_ = open_paper_outputter (paper_stream_p); + + Paper_stream* paper_stream_p = global_lookup_l->paper_stream_p (); + outputter_l_ = global_lookup_l->paper_outputter_p (paper_stream_p, paper_l_, header_l_, origin_str_); Link_array lines; for (int i=0; i < breaking.size (); i++) @@ -235,17 +236,12 @@ Paper_score::process () } - if (ps_output_global_b) - *paper_stream_p << "\nshowpage\n"; - else - *paper_stream_p << "\n\\EndLilyPondOutput"; - + // huh? delete outputter_l_; delete paper_stream_p; outputter_l_ = 0; } - void Paper_score::remove_line (Line_of_score *l) { @@ -276,101 +272,6 @@ Paper_score::remove_line (Line_of_score *l) } } -Paper_stream * -Paper_score::open_output_stream () -{ - // output - String base_outname=paper_l_->get_default_output (); - - if (base_outname.empty_b ()) - { - base_outname = default_outname_base_global; - int def = paper_l_->get_next_default_count (); - if (def) - { - base_outname += "-" + to_str (def); - } - } - - String outname = base_outname; - - Paper_stream* p; - if (ps_output_global_b) - { - if (outname != "-") - outname += ".ps"; - *mlog << _f ("PostScript output to %s...", - outname == "-" ? String ("") : outname ) << endl; - p = new Ps_stream (outname); - } - else - { - if (outname != "-") - outname += ".tex"; - *mlog << _f ("TeX output to %s...", - outname == "-" ? String ("") : outname ) << endl; - p = new Tex_stream (outname); - } - target_str_global_array.push (outname); - return p; -} - -// urg -Paper_outputter* -Paper_score::open_paper_outputter (Paper_stream* paper_stream_p) -{ - if (ps_output_global_b) - return open_ps_outputter ((Ps_stream*)paper_stream_p); - else - return open_tex_outputter ((Tex_stream*)paper_stream_p); -} - -// urg urg urg -Paper_outputter* -Paper_score::open_ps_outputter (Ps_stream *ps_out_p) -{ - Ps_outputter *interfees_p = new Ps_outputter (ps_out_p); - - if (header_global_p) - *ps_out_p << header_global_p->ps_string (); - - *ps_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n'; - - // urg - if (header_l_) - *ps_out_p << header_l_->ps_string (); - //aaarg - *ps_out_p << paper_l_->ps_output_settings_str (); - - if (experimental_features_global_b) - *ps_out_p << "turnOnExperimentalFeatures\n"; - - return interfees_p; -} - -Paper_outputter* -Paper_score::open_tex_outputter (Tex_stream *tex_out_p) -{ - Tex_outputter *interfees_p= new Tex_outputter (tex_out_p); - - if (header_global_p) - *tex_out_p << header_global_p->tex_string (); - - - *tex_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n'; - - if (header_l_) - *tex_out_p << header_l_->tex_string(); - *tex_out_p << paper_l_->tex_output_settings_str (); - - - if (experimental_features_global_b) - *tex_out_p << "\\turnOnExperimentalFeatures%\n"; - - *tex_out_p << "\\turnOnPostScript%\n"; - return interfees_p; -} - /** Get all breakable columns between l and r, (not counting l and r). */ Link_array Paper_score::breakable_col_range (Paper_column*l, Paper_column*r) const diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 2c006ad097..d3d4a67954 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -15,7 +15,6 @@ #include "lookup.hh" #include "ps-lookup.hh" #include "tex-lookup.hh" -#include "dimension.hh" #include "assoc-iter.hh" #include "score-engraver.hh" #include "p-score.hh" @@ -47,8 +46,7 @@ Paper_def::Paper_def (Paper_def const&s) lookup_p_assoc_p_ = new Assoc; for (Assoc_iter ai(*s.lookup_p_assoc_p_); ai.ok (); ai++) { - Lookup * l = ps_output_global_b ? new Ps_lookup (*ai.val ()) - : new Tex_lookup (*ai.val ()); + Lookup * l = global_lookup_l->lookup_p (*ai.val ()); l->paper_l_ = this; set_lookup (ai.key(), l); } @@ -219,7 +217,7 @@ Paper_def::ps_output_settings_str () const for (Assoc_iter i (*scope_p_); i.ok (); i++) s += String ("/mudelapaper") + i.key () + "{" + i.val ()->str () + "} bind def\n"; - s += *scope_p_->elem ("texsetting")->access_String (); + s += *scope_p_->elem ("pssetting")->access_String (); return s; } diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 2c47177b43..1e8d450c7b 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -12,11 +12,10 @@ #include "molecule.hh" #include "atom.hh" #include "array.hh" -#include "dimension.hh" -// urg, silly name -#include "tex.hh" #include "string-convert.hh" #include "debug.hh" +#include "lookup.hh" +#include "main.hh" Paper_outputter::Paper_outputter (Paper_stream *s) { @@ -43,10 +42,10 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm, St Array a; String r; - a.push (print_dimen (a_off.y())); - a.push (print_dimen (a_off.x())); + a.push (global_lookup_l->print_dimen (a_off.y())); + a.push (global_lookup_l->print_dimen (a_off.x())); a.push (i->str_); - r += substitute_args (s, a); + r += global_lookup_l->substitute_args (s, a); *outstream_l_ << r; } } diff --git a/lily/paper-stream.cc b/lily/paper-stream.cc index c878f4b4d0..72d14a69b5 100644 --- a/lily/paper-stream.cc +++ b/lily/paper-stream.cc @@ -9,7 +9,6 @@ #include #include -//#include "tex.hh" #include "main.hh" #include "paper-stream.hh" #include "debug.hh" @@ -79,6 +78,11 @@ Paper_stream::operator << (Scalar s) delete os; // we want to see the remains. assert (nest_level>=0); } + + /* don't break line if not nested; very ugly for ps */ + if (nest_level == 0) + break; + /* FALLTHROUGH */ case '\n': diff --git a/lily/parser.yy b/lily/parser.yy index 99af0e5ec1..bc323e061f 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -27,7 +27,7 @@ #include "keyword.hh" #include "debug.hh" #include "parseconstruct.hh" -#include "dimension.hh" +#include "dimensions.hh" #include "identifier.hh" #include "command-request.hh" #include "musical-request.hh" @@ -164,6 +164,7 @@ yylex (YYSTYPE *s, void * v_l) %token MM_T %token MUSIC %token MUSICAL_PITCH +%token NAME %token NOTENAMES %token NOTES %token OCTAVE @@ -369,6 +370,8 @@ add_declaration: $4->set_spot (THIS->pop_spot ()); } ; + + simple_identifier_init: identifier_init ; identifier_init: @@ -455,9 +458,9 @@ translator_spec_body: delete $4; $$->set_property (*$2, str); } - | translator_spec_body STRING ';' { - $$->type_str_ = *$2; - delete $2; + | translator_spec_body NAME STRING ';' { + $$->type_str_ = *$3; + delete $3; } | translator_spec_body CONSISTS STRING ';' { $$->access_Translator_group ()-> set_element (*$3, true); @@ -561,8 +564,7 @@ paper_def_body: $$ = p; } | paper_def_body int '=' symtables { // ugh, what a syntax - Lookup * l = ps_output_global_b ? new Ps_lookup (*$4) - : new Tex_lookup (*$4); + Lookup * l = global_lookup_l->lookup_p (*$4); $$->set_lookup ($2, l); } | paper_def_body STRING '=' simple_identifier_init ';' { @@ -1261,7 +1263,6 @@ simple_element: if (!THIS->lexer_p_->note_state_b ()) THIS->parser_error (_ ("have to be in Note mode for notes")); $1->set_duration (*$2); - int durlog_i = $2->durlog_i_; $$ = THIS->get_note_element ($1, $2); } | RESTNAME notemode_duration { @@ -1401,14 +1402,14 @@ symtable_body: ; symboldef: - STRING box { - $$ = new Atom (*$1, *$2); + STRING unsigned box { + $$ = global_lookup_l->atom_p (*$1, $2, *$3); delete $1; - delete $2; + delete $3; } - | STRING { + | STRING unsigned { Box b (Interval (0,0), Interval (0,0)); - $$ = new Atom (*$1, b); + $$ = global_lookup_l->atom_p (*$1, $2, b); delete $1; } ; diff --git a/lily/ps-lookup.cc b/lily/ps-lookup.cc index fd9d887350..f488b5e92a 100644 --- a/lily/ps-lookup.cc +++ b/lily/ps-lookup.cc @@ -8,13 +8,17 @@ #include "ps-lookup.hh" #include "debug.hh" +#include "dimensions.hh" #include "symtable.hh" -#include "dimension.hh" -#include "tex.hh" #include "scalar.hh" #include "paper-def.hh" #include "string-convert.hh" #include "main.hh" +#include "file-results.hh" +#include "header.hh" +#include "paper-stream.hh" +#include "ps-stream.hh" +#include "ps-outputter.hh" Ps_lookup::Ps_lookup () : Lookup () @@ -38,7 +42,21 @@ Ps_lookup::~Ps_lookup () Atom Ps_lookup::afm_find (String s) const { - return Lookup::afm_find (s, String ("(%d)")); + return Lookup::afm_find (s, String ("(\\%03o) show ")); +} + +Atom* +Ps_lookup::atom_p (String s, int n, Box b) const +{ + for (int i = 0; i < n; i++) + s.prepend ("% "); + return new Atom (s, b); +} + +String +Ps_lookup::character_str (int i) const +{ + return to_str (i, "(\\%03o)"); } Atom @@ -64,7 +82,7 @@ Ps_lookup::dashed_slur (Array controls, Real thick, Real dash) const ps += "[" + String_convert::double_str (on) + " "; ps += String_convert::double_str (off) + "] "; ps += String_convert::int_str (0) + " "; - ps += " draw_dashed_slur"; + ps += "draw_dashed_slur "; Atom a; a.str_ = ps; @@ -94,6 +112,53 @@ Ps_lookup::hairpin (Real width, bool decresc, bool continued) const return a; } +Lookup* +Ps_lookup::lookup_p (Lookup const& l) const +{ + return new Ps_lookup (l); +} + +Lookup* +Ps_lookup::lookup_p (Symtables const& s) const +{ + return new Ps_lookup (s); +} + +Paper_outputter* +Ps_lookup::paper_outputter_p (Paper_stream* os_p, Paper_def* paper_l, Header* header_l, String origin_str) const +{ + if (header_global_p) + *os_p << header_global_p->ps_string (); + + *os_p << _ ("\n% outputting Score, defined at: ") << origin_str << '\n'; + + if (header_l) + *os_p << header_l->ps_string (); + *os_p << paper_l->ps_output_settings_str (); + + if (experimental_features_global_b) + *os_p << "turnOnExperimentalFeatures\n"; + + return new Ps_outputter (os_p); +} + +Paper_stream* +Ps_lookup::paper_stream_p () const +{ +#if 1 + String outname = base_output_str (); +#else + String outname = "lelie"; +#endif + + if (outname != "-") + outname += ".ps"; + *mlog << _f ("PostScript output to %s...", + outname == "-" ? String ("") : outname ) << endl; + target_str_global_array.push (outname); + return new Ps_stream (outname); +} + Atom Ps_lookup::plet (Real dy , Real dx, Direction dir) const { @@ -102,7 +167,7 @@ Ps_lookup::plet (Real dy , Real dx, Direction dir) const ps += String_convert::double_str (dx) + " " + String_convert::double_str (dy) + " " + String_convert::int_str ( (int)dir) + - " draw_plet"; + " draw_plet "; Atom s; s.str_ = ps; @@ -114,7 +179,7 @@ Ps_lookup::ps_beam (Real slope, Real width, Real thick) const { String ps; ps += to_str (width) + " "+ to_str (slope) + " " + to_str (thick) - + " draw_beam"; + + " draw_beam "; Atom s; s.str_ = ps; @@ -145,7 +210,7 @@ Ps_lookup::slur (Array controls) const ps += String_convert::double_str (controls[0].x ()) + " " + String_convert::double_str (controls[0].y ()) + " "; - ps += " draw_slur"; + ps += " draw_slur "; Atom s; s.str_ = ps; @@ -159,8 +224,19 @@ Ps_lookup::slur (Array controls) const Atom Ps_lookup::stem (Real y1, Real y2) const { - // return Lookup::stem (y1, y2, "\\kern %\\vrule width % height % depth %"); - return Lookup::stem (y1, y2, "% % moveto % % lineto"); + return Lookup::stem (y1, y2, "\n% % % % draw_stem "); +} + +Atom +Ps_lookup::text (String style, String text) const +{ + return Lookup::text (style, "(" + text + ")"); +} + +String +Ps_lookup::unknown_str () const +{ + return "unknown "; } Atom @@ -174,7 +250,7 @@ Ps_lookup::vbracket (Real &y) const + " " + _ ("too small") + " (" + print_dimen (y) + ")"); // y = min_y; } - psbracket.str_ = to_str (y) + " draw_bracket"; + psbracket.str_ = to_str (y) + " draw_bracket "; psbracket.dim_[Y_AXIS] = Interval (-y/2,y/2); psbracket.dim_[X_AXIS] = Interval (0,4 PT); return psbracket; diff --git a/lily/ps-outputter.cc b/lily/ps-outputter.cc index 768270a8a2..d0ad70ef39 100644 --- a/lily/ps-outputter.cc +++ b/lily/ps-outputter.cc @@ -12,8 +12,6 @@ #include "molecule.hh" #include "atom.hh" #include "array.hh" -#include "dimension.hh" -#include "tex.hh" #include "string-convert.hh" #include "debug.hh" @@ -32,7 +30,9 @@ Ps_outputter::~Ps_outputter () static String ps_font_command(int i) { - return "\\font" +String_convert::form_str ("%c", 'A' + i) ; +// urg +// return "%\\font" + String_convert::form_str ("%c", 'A' + i) + "\n"; + return "\n/feta20 findfont 12 scalefont setfont "; } void @@ -52,8 +52,8 @@ Ps_outputter::switch_to_font (String fontname) font_arr_.push (fontname); - *outstream_l_ << "\\font" + ps_font_command (i) << "=" + fontname << "\n"; - *outstream_l_<< ps_font_command (i); + *outstream_l_ << "%\\font" + ps_font_command (i) << "% =" + fontname << "\n"; + *outstream_l_<< ps_font_command (i) << "\n"; } void @@ -62,20 +62,19 @@ Ps_outputter::output_molecule (Molecule const*m, Offset o, char const *nm) if (check_debug) *outstream_l_ << String ("\n%start: ") << nm << "\n"; - Paper_outputter::output_molecule (m, o, nm, "% % % placebox"); + Paper_outputter::output_molecule (m, o, nm, "% % {%}placebox \n"); } void Ps_outputter::start_line () { - *outstream_l_ << "\\hbox{%\n"; + *outstream_l_ << "\nstart_line {\n"; } void Ps_outputter::stop_line () { - *outstream_l_ << "}"; - *outstream_l_ << "\\interscoreline"; + *outstream_l_ << "}\nstop_line\n"; current_font_ = ""; font_arr_.clear (); } diff --git a/lily/ps-stream.cc b/lily/ps-stream.cc index 970b75f695..4bdbc9e2bf 100644 --- a/lily/ps-stream.cc +++ b/lily/ps-stream.cc @@ -20,17 +20,22 @@ Ps_stream::Ps_stream (String filename) header (); } +Ps_stream::~Ps_stream () +{ + *os << "\nshowpage\n"; +} + void Ps_stream::header () { - *os << _ ("%%!PS Adobe\n"); + *os << _ ("%!PS-Adobe-3.0\n"); // urg, merge with Tex - *os << _ ("% Creator: "); + *os << _ ("%%Creator: "); if (no_timestamps_global_b) *os << "GNU LilyPond\n"; else *os << get_version_str () << '\n'; - *os << _ ("% Automatically generated"); + *os << _ ("%%Automatically generated"); if (no_timestamps_global_b) *os << ".\n"; else @@ -41,10 +46,6 @@ Ps_stream::header () } } -Ps_stream::~Ps_stream () -{ -} - // print string. don't forget indent. Paper_stream& Ps_stream::operator << (Scalar s) diff --git a/lily/rod.cc b/lily/rod.cc index 1b2ae4f824..229af033c2 100644 --- a/lily/rod.cc +++ b/lily/rod.cc @@ -9,8 +9,8 @@ #include "rod.hh" #include "p-col.hh" #include "debug.hh" +#include "dimensions.hh" #include "single-malt-grouping-item.hh" -#include "dimension.hh" Rod::Rod (Single_malt_grouping_item *l, Single_malt_grouping_item *r) diff --git a/lily/score-element.cc b/lily/score-element.cc index 64b0a422da..b92945e285 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -16,8 +16,6 @@ #include "molecule.hh" #include "score-element.hh" #include "debug.hh" -#include "tex.hh" -#include "dimension.hh" #include "spanner.hh" #include "line-of-score.hh" #include "item.hh" diff --git a/lily/scores.cc b/lily/scores.cc index 257ead14c1..9b2a80bee3 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -17,6 +17,7 @@ #include "file-results.hh" #include "my-lily-parser.hh" #include "source.hh" +#include "lookup.hh" Sources* source_global_l = 0; Array inclusion_global_array; @@ -124,6 +125,16 @@ do_one_file (String init_str, String file_str) parser.set_version_check (version_ignore_global_b); parser.parse_file (init_str, file_str); + /* + urg + when calling {Ps,Tex}_lookup::paper_stream_p (), + it *appears* (aaargh, latest gdb on ppc is gdb 4.16.97) + that (global_lookup_l's) + paper_l_ is invalid but not NULL + (deleted without being reset maybe?) + */ + global_lookup_l->paper_l_ = parser.default_paper_p (); + if (parser.error_level_i_) { exit_status_i_ = 1; diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 678853185b..331201d4d0 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -6,9 +6,9 @@ (c) 1997--1998 Han-Wen Nienhuys */ -#include "dimension.hh" #include "span-bar.hh" #include "lookup.hh" +#include "dimensions.hh" #include "atom.hh" #include "paper-def.hh" #include "molecule.hh" diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 22ed79da20..99939fcd6b 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -12,13 +12,13 @@ #include "spring-spacer.hh" #include "p-col.hh" #include "debug.hh" +#include "dimensions.hh" #include "qlp.hh" #include "unionfind.hh" #include "idealspacing.hh" #include "pointer.tcc" #include "score-column.hh" #include "paper-def.hh" -#include "dimension.hh" #include "colhpos.hh" Vector diff --git a/lily/staff-side.cc b/lily/staff-side.cc index ec82d64aad..bec8df6367 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -8,10 +8,10 @@ #include "interval.hh" #include "paper-def.hh" -#include "dimension.hh" #include "staff-side.hh" #include "staff-sym.hh" #include "debug.hh" +#include "dimensions.hh" Staff_side::Staff_side() diff --git a/lily/staff-sym.cc b/lily/staff-sym.cc index d329e82185..88a3a457c6 100644 --- a/lily/staff-sym.cc +++ b/lily/staff-sym.cc @@ -7,10 +7,10 @@ */ #include "staff-sym.hh" #include "lookup.hh" +#include "dimensions.hh" #include "paper-def.hh" #include "molecule.hh" #include "debug.hh" -#include "dimension.hh" #include "item.hh" diff --git a/lily/stem-info.cc b/lily/stem-info.cc index 535cc6f7d7..1f17c945dc 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -8,7 +8,6 @@ */ #include "proto.hh" -#include "dimension.hh" #include "misc.hh" #include "debug.hh" #include "atom.hh" diff --git a/lily/stem.cc b/lily/stem.cc index 454f6d7f7a..b9e7e59b8a 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -9,7 +9,6 @@ */ #include "stem.hh" -#include "dimension.hh" #include "debug.hh" #include "paper-def.hh" #include "note-head.hh" diff --git a/lily/symtable.cc b/lily/symtable.cc index d09dbb0b44..94aba34bea 100644 --- a/lily/symtable.cc +++ b/lily/symtable.cc @@ -7,7 +7,6 @@ */ #include "misc.hh" -#include "dimension.hh" #include "debug.hh" #include "real.hh" #include "atom.hh" diff --git a/lily/template5.cc b/lily/template5.cc index ca2523d478..ccedf67a4d 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -14,8 +14,6 @@ #include "interval.tcc" -template INTERVAL__INSTANTIATE(Rational); - #include "compare.hh" Rational @@ -32,3 +30,6 @@ Interval_t::T_to_str (Rational a) return a.str (); } + + +template INTERVAL__INSTANTIATE(Rational); diff --git a/lily/tex-lookup.cc b/lily/tex-lookup.cc index 480ff14468..3e82c82a59 100644 --- a/lily/tex-lookup.cc +++ b/lily/tex-lookup.cc @@ -10,12 +10,15 @@ #include "tex-lookup.hh" #include "debug.hh" #include "symtable.hh" -#include "dimension.hh" -#include "tex.hh" #include "scalar.hh" #include "paper-def.hh" #include "string-convert.hh" #include "main.hh" +#include "file-results.hh" +#include "header.hh" +#include "paper-stream.hh" +#include "tex-stream.hh" +#include "tex-outputter.hh" Tex_lookup::Tex_lookup () : Ps_lookup () @@ -42,6 +45,22 @@ Tex_lookup::afm_find (String s) const return Lookup::afm_find (s, String ("\\char%d")); } +Atom* +Tex_lookup::atom_p (String s, int n, Box b) const +{ + if (s.length_i ()) + s.prepend ("\\"); + for (int i = 0; i < n; i++) + s += "{%}"; + return new Atom (s, b); +} + +String +Tex_lookup::character_str (int i) const +{ + return Lookup::character_str (i); +} + Atom Tex_lookup::dashed_slur (Array controls, Real thick, Real dash) const { @@ -67,6 +86,69 @@ Tex_lookup::plet (Real dy , Real dx, Direction dir) const return embed (Ps_lookup::plet (dy, dx, dir)); } +Lookup* +Tex_lookup::lookup_p (Lookup const& l) const +{ + return new Tex_lookup (l); +} + +Lookup* +Tex_lookup::lookup_p (Symtables const& s) const +{ + return new Tex_lookup (s); +} + +Paper_outputter* +Tex_lookup::paper_outputter_p (Paper_stream* os_p, Paper_def* paper_l, Header* header_l, String origin_str) const +{ + if (header_global_p) + *os_p << header_global_p->tex_string (); + + *os_p << _ ("\n% outputting Score, defined at: ") << origin_str << '\n'; + + if (header_l) + *os_p << header_l->tex_string(); + *os_p << paper_l->tex_output_settings_str (); + + if (experimental_features_global_b) + *os_p << "\\turnOnExperimentalFeatures%\n"; + + *os_p << "\\turnOnPostScript%\n"; + + return new Tex_outputter (os_p); +} + +Paper_stream * +Tex_lookup::paper_stream_p () const +{ +#if 1 + String outname = base_output_str (); +#else + String outname = "lelie"; +#endif + + Paper_stream* p; + if (outname != "-") + outname += ".tex"; + *mlog << _f ("TeX output to %s...", + outname == "-" ? String ("") : outname ) << endl; + p = new Tex_stream (outname); + target_str_global_array.push (outname); + return p; +} + +String +Tex_lookup::print_dimen (Real r) const +{ + String s = to_str (r, "%.3f"); + if (s.index_i ("NaN") != -1) + { + warning (_ ("NaN")); + s = "0.0"; + } + return Lookup::print_dimen (r) + "pt"; +} + Atom Tex_lookup::ps_beam (Real slope, Real width, Real thick) const { @@ -85,6 +167,18 @@ Tex_lookup::stem (Real y1, Real y2) const return Lookup::stem (y1, y2, "\\kern %\\vrule width % height % depth %"); } +Atom +Tex_lookup::text (String style, String text) const +{ + return Lookup::text (style, text); +} + +String +Tex_lookup::unknown_str () const +{ + return "\\unknown"; +} + Atom Tex_lookup::vbracket (Real &y) const { diff --git a/lily/tex-outputter.cc b/lily/tex-outputter.cc index 30aff3b9d0..89ebf31623 100644 --- a/lily/tex-outputter.cc +++ b/lily/tex-outputter.cc @@ -12,8 +12,6 @@ #include "molecule.hh" #include "atom.hh" #include "array.hh" -#include "dimension.hh" -#include "tex.hh" #include "string-convert.hh" #include "debug.hh" diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index 90764d289a..d803058002 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -10,7 +10,6 @@ #include #include -#include "tex.hh" #include "main.hh" #include "tex-stream.hh" #include "debug.hh" @@ -21,6 +20,11 @@ Tex_stream::Tex_stream (String filename) header (); } +Tex_stream::~Tex_stream () +{ + *os << "\n\\EndLilyPondOutput"; +} + void Tex_stream::header () { @@ -41,10 +45,6 @@ Tex_stream::header () } } -Tex_stream::~Tex_stream () -{ -} - // print string. don't forget indent. Paper_stream& Tex_stream::operator << (Scalar s) diff --git a/lily/tex.cc b/lily/tex.cc deleted file mode 100644 index 635b281aa6..0000000000 --- a/lily/tex.cc +++ /dev/null @@ -1,49 +0,0 @@ -/* - tex.cc -- implement TeX related misc functions - - source file of the GNU LilyPond music typesetter - - (c) 1996, 1997--1998 Han-Wen Nienhuys -*/ - -#include "dimension.hh" -#include "tex.hh" -#include "atom.hh" -#include "array.hh" - -String -vstrut (Real h) -{ - return String ("\\vrule height ") + print_dimen (h) + "depth 0pt width 0pt"; -} - - -static void -substitute_arg (String& r, String arg) -{ - int p = r.index_i ('%'); - if (p < 0) - return ; - - r = r.left_str (p) + arg + r.right_str (r.length_i() - p -1); -} - - -String -substitute_args (String source, Array args) -{ - String retval (source); - for (int i = 0 ; i < args.size(); i++) - substitute_arg (retval, args[i]); - return retval; -} - -String -substitute_args (String source, Array args) -{ - Array sv; - for (int i = 0 ; i < args.size(); i++) - sv.push (args[i]); - - return substitute_args (source, sv); -} diff --git a/lily/text-def.cc b/lily/text-def.cc index 6c1664017b..3597f30e5e 100644 --- a/lily/text-def.cc +++ b/lily/text-def.cc @@ -11,7 +11,6 @@ #include "paper-def.hh" #include "molecule.hh" #include "text-def.hh" -#include "dimension.hh" #include Direction diff --git a/make/STATE-VECTOR b/make/STATE-VECTOR index e80a35a668..1b57fde05f 100644 --- a/make/STATE-VECTOR +++ b/make/STATE-VECTOR @@ -92,4 +92,9 @@ 1.0.12 1.0.12.uu1 1.0.13 -1.0.13.mb1 +1.0.13.jcn1 +1.0.13.jcn2 +1.0.13.jcn3 +1.0.13.jcn4 +1.0.13.jcn5 +1.0.14 diff --git a/make/out/lelievijver.lsm b/make/out/lelievijver.lsm index de00069540..35ed1a38f6 100644 --- a/make/out/lelievijver.lsm +++ b/make/out/lelievijver.lsm @@ -1,15 +1,15 @@ Begin3 Titel: LilyPond -Versie: 1.0.13 -Inschrijf datum: 05OCT98 +Versie: 1.0.14 +Inschrijf datum: 09OCT98 Beschrijving: @FLAPTEKST@ Trefwoorden: muziek typezetten midi notatie Auteur: hanwen@stack.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 770k lilypond-1.0.13.tar.gz + 770k lilypond-1.0.14.tar.gz Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.0.13.tar.gz + 770k lilypond-1.0.14.tar.gz Copi-eer voorwaarden: GPL End diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index a048f5c527..dfd417b275 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 1.0.13 -Entered-date: 05OCT98 +Version: 1.0.14 +Entered-date: 09OCT98 Description: LilyPond is the GNU Project music typesetter. This program can print beautiful sheet music from a music definition file. It can also play @@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 770k lilypond-1.0.13.tar.gz + 770k lilypond-1.0.14.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.0.13.tar.gz + 770k lilypond-1.0.14.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index ffb495021d..99b2831e2f 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.0.13 +Version: 1.0.14 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.0.13.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.0.14.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 2a2468d6f7..db210b4e5c 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -2,9 +2,10 @@ depth = .. -STEPMAKE_TEMPLATES=metafont +STEPMAKE_TEMPLATES=metafont metapost + +EXTRA_DIST_FILES += TODO README feta.mp mfmp.ini -EXTRA_DIST_FILES += TODO README FET_FILES = $(wildcard feta[0-9]*.mf) diff --git a/mf/feta.mp b/mf/feta.mp new file mode 100644 index 0000000000..7f0c80c8b4 --- /dev/null +++ b/mf/feta.mp @@ -0,0 +1,48 @@ +% feta.mp + +batchmode; + +mode_def ljfour = + proofing:=0; % no, we're not making proofs + fontmaking:=1; % yes, we are making a font + tracingtitles:=0; % no, don't show titles at all + pixels_per_inch:=600; % that's the meaning of lowres + blacker:=.25; % make pens a bit blacker + fillin:=.0; % compensate for diagonal fillin + o_correction:=1; % but don't overshoot as much + enddef; + +if false: +def mode_param (suffix v) (expr e) = + if unknown mode_guard_.v: + v := e; + mode_guard_.v := 1; + fi +enddef; + +% This macro is invoked by all the modes, after |pixels_per_inch| +% has been defined, thus saving some space and time. +def mode_common_setup_ = + mode_param (proofing, 0); + mode_param (fontmaking, 1); + mode_param (tracingtitles, if pixels_per_inch > 700: 1 else: 0 fi); +enddef; + +% Works for a 600$\,$dpi Accel-a-Writer {\tt mackay@cs.washington.edu}, +% 16 August 95. +mode_def ljfour = %\[ HP LaserJet 4 (600dpi) + mode_param (pixels_per_inch, 600); + mode_param (blacker, .25); + mode_param (fillin, 0); + mode_param (o_correction, 1); + mode_common_setup_; +enddef; + +laserjetfour := ljfour; +fi + +mode=ljfour; +mag=100.0; + +input feta20.mf + diff --git a/mf/mfmp.ini b/mf/mfmp.ini new file mode 100644 index 0000000000..1b0e00c26b --- /dev/null +++ b/mf/mfmp.ini @@ -0,0 +1,4 @@ +\input mfplain +\input modes +\dump + diff --git a/mf/out/feta11.afm b/mf/out/feta11.afm index 1b71cf5e37..7e8f6f28d6 100644 --- a/mf/out/feta11.afm +++ b/mf/out/feta11.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -1375.00 -6875.00 9900.02 2750.00 ; C 68; N clefs-bass_change; B -1100.02 -5500.03 7920.04 2200.01 ; C 69; N clefs-violin; B -2396.44 -8250.00 10277.13 13750.00 ; C 70; N clefs-violin_change; B -2082.15 -6600.04 8056.75 11000.06 ; -C 71; N timesig-C; B -2200.01 -2750.00 1924.99 2750.00 ; -C 72; N timesig-C2; B -2200.01 -3849.99 1924.99 3849.99 ; -C 73; N timesig-oldC; B -2062.50 -2062.50 2062.50 2062.50 ; -C 74; N timesig-oldC2; B -2062.50 -2750.00 2062.50 2750.00 ; -C 75; N timesig-old3_2; B -2062.50 -2062.50 2062.50 2062.50 ; -C 76; N timesig-old6_4; B -2062.50 -3437.50 2062.50 5500.00 ; -C 77; N timesig-old9_4; B -2062.50 -3437.50 2062.50 5500.00 ; +C 71; N timesig-C4/4; B -4950.01 -2750.00 4674.99 2750.00 ; +C 72; N timesig-C2/2; B -4950.01 -3849.99 4674.99 3849.99 ; +C 73; N timesig-old4/4; B -4812.50 -2062.50 4812.50 2062.50 ; +C 74; N timesig-old2/2; B -4812.50 -2750.00 4812.50 2750.00 ; +C 75; N timesig-old3/2; B -4812.50 -2062.50 4812.50 2062.50 ; +C 76; N timesig-old6/4; B -4812.50 -3437.50 4812.50 3437.50 ; +C 77; N timesig-old9/4; B -4812.50 -3437.50 4812.50 3437.50 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta13.afm b/mf/out/feta13.afm index 9908f0cc4c..7679a06b19 100644 --- a/mf/out/feta13.afm +++ b/mf/out/feta13.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -1625.00 -8125.00 11700.03 3250.00 ; C 68; N clefs-bass_change; B -1300.02 -6500.02 9360.02 2600.00 ; C 69; N clefs-violin; B -2832.14 -9750.00 12145.70 16250.00 ; C 70; N clefs-violin_change; B -2460.72 -7800.02 9521.58 13000.03 ; -C 71; N timesig-C; B -2600.00 -3250.00 2275.00 3250.00 ; -C 72; N timesig-C2; B -2600.00 -4549.99 2275.00 4549.99 ; -C 73; N timesig-oldC; B -2437.50 -2437.50 2437.50 2437.50 ; -C 74; N timesig-oldC2; B -2437.50 -3250.00 2437.50 3250.00 ; -C 75; N timesig-old3_2; B -2437.50 -2437.50 2437.50 2437.50 ; -C 76; N timesig-old6_4; B -2437.50 -4062.50 2437.50 6500.00 ; -C 77; N timesig-old9_4; B -2437.50 -4062.50 2437.50 6500.00 ; +C 71; N timesig-C4/4; B -5850.00 -3250.00 5525.00 3250.00 ; +C 72; N timesig-C2/2; B -5850.00 -4549.99 5525.00 4549.99 ; +C 73; N timesig-old4/4; B -5687.50 -2437.50 5687.50 2437.50 ; +C 74; N timesig-old2/2; B -5687.50 -3250.00 5687.50 3250.00 ; +C 75; N timesig-old3/2; B -5687.50 -2437.50 5687.50 2437.50 ; +C 76; N timesig-old6/4; B -5687.50 -4062.50 5687.50 4062.50 ; +C 77; N timesig-old9/4; B -5687.50 -4062.50 5687.50 4062.50 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta16.afm b/mf/out/feta16.afm index 51d4dc9549..f1562888fd 100644 --- a/mf/out/feta16.afm +++ b/mf/out/feta16.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -2000.00 -10000.00 14400.02 4000.00 ; C 68; N clefs-bass_change; B -1600.04 -8000.03 11520.03 3200.01 ; C 69; N clefs-violin; B -3485.72 -12000.00 14948.55 20000.00 ; C 70; N clefs-violin_change; B -3028.58 -9600.04 11718.89 16000.06 ; -C 71; N timesig-C; B -3200.01 -4000.00 2799.99 4000.00 ; -C 72; N timesig-C2; B -3200.01 -5599.98 2799.99 5599.98 ; -C 73; N timesig-oldC; B -3000.00 -3000.00 3000.00 3000.00 ; -C 74; N timesig-oldC2; B -3000.00 -4000.00 3000.00 4000.00 ; -C 75; N timesig-old3_2; B -3000.00 -3000.00 3000.00 3000.00 ; -C 76; N timesig-old6_4; B -3000.00 -5000.00 3000.00 8000.00 ; -C 77; N timesig-old9_4; B -3000.00 -5000.00 3000.00 8000.00 ; +C 71; N timesig-C4/4; B -7200.01 -4000.00 6799.99 4000.00 ; +C 72; N timesig-C2/2; B -7200.01 -5599.98 6799.99 5599.98 ; +C 73; N timesig-old4/4; B -7000.00 -3000.00 7000.00 3000.00 ; +C 74; N timesig-old2/2; B -7000.00 -4000.00 7000.00 4000.00 ; +C 75; N timesig-old3/2; B -7000.00 -3000.00 7000.00 3000.00 ; +C 76; N timesig-old6/4; B -7000.00 -5000.00 7000.00 5000.00 ; +C 77; N timesig-old9/4; B -7000.00 -5000.00 7000.00 5000.00 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta19.afm b/mf/out/feta19.afm index 484905b536..e1f742fdbd 100644 --- a/mf/out/feta19.afm +++ b/mf/out/feta19.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -2375.00 -11875.00 17100.04 4750.00 ; C 68; N clefs-bass_change; B -1900.04 -9500.05 13680.05 3800.02 ; C 69; N clefs-violin; B -4139.30 -14250.00 17751.40 23750.00 ; C 70; N clefs-violin_change; B -3596.45 -11400.05 13916.18 19000.09 ; -C 71; N timesig-C; B -3800.02 -4750.00 3324.98 4750.00 ; -C 72; N timesig-C2; B -3800.02 -6649.98 3324.98 6649.98 ; -C 73; N timesig-oldC; B -3562.50 -3562.50 3562.50 3562.50 ; -C 74; N timesig-oldC2; B -3562.50 -4750.00 3562.50 4750.00 ; -C 75; N timesig-old3_2; B -3562.50 -3562.50 3562.50 3562.50 ; -C 76; N timesig-old6_4; B -3562.50 -5937.50 3562.50 9500.00 ; -C 77; N timesig-old9_4; B -3562.50 -5937.50 3562.50 9500.00 ; +C 71; N timesig-C4/4; B -8550.02 -4750.00 8074.98 4750.00 ; +C 72; N timesig-C2/2; B -8550.02 -6649.98 8074.98 6649.98 ; +C 73; N timesig-old4/4; B -8312.50 -3562.50 8312.50 3562.50 ; +C 74; N timesig-old2/2; B -8312.50 -4750.00 8312.50 4750.00 ; +C 75; N timesig-old3/2; B -8312.50 -3562.50 8312.50 3562.50 ; +C 76; N timesig-old6/4; B -8312.50 -5937.50 8312.50 5937.50 ; +C 77; N timesig-old9/4; B -8312.50 -5937.50 8312.50 5937.50 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta20.afm b/mf/out/feta20.afm index 271f7a999e..7b7bb8be82 100644 --- a/mf/out/feta20.afm +++ b/mf/out/feta20.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -2500.00 -12500.00 18000.03 5000.00 ; C 68; N clefs-bass_change; B -2000.05 -10000.05 14400.04 4000.02 ; C 69; N clefs-violin; B -4357.15 -15000.00 18685.68 25000.00 ; C 70; N clefs-violin_change; B -3785.74 -12000.05 14648.60 20000.08 ; -C 71; N timesig-C; B -4000.02 -5000.00 3499.98 5000.00 ; -C 72; N timesig-C2; B -4000.02 -6999.97 3499.98 6999.97 ; -C 73; N timesig-oldC; B -3750.00 -3750.00 3750.00 3750.00 ; -C 74; N timesig-oldC2; B -3750.00 -5000.00 3750.00 5000.00 ; -C 75; N timesig-old3_2; B -3750.00 -3750.00 3750.00 3750.00 ; -C 76; N timesig-old6_4; B -3750.00 -6250.00 3750.00 10000.00 ; -C 77; N timesig-old9_4; B -3750.00 -6250.00 3750.00 10000.00 ; +C 71; N timesig-C4/4; B -9000.02 -5000.00 8499.98 5000.00 ; +C 72; N timesig-C2/2; B -9000.02 -6999.97 8499.98 6999.97 ; +C 73; N timesig-old4/4; B -8750.00 -3750.00 8750.00 3750.00 ; +C 74; N timesig-old2/2; B -8750.00 -5000.00 8750.00 5000.00 ; +C 75; N timesig-old3/2; B -8750.00 -3750.00 8750.00 3750.00 ; +C 76; N timesig-old6/4; B -8750.00 -6250.00 8750.00 6250.00 ; +C 77; N timesig-old9/4; B -8750.00 -6250.00 8750.00 6250.00 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta23.afm b/mf/out/feta23.afm index 0e07d2b96c..f5b55de4ed 100644 --- a/mf/out/feta23.afm +++ b/mf/out/feta23.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -2812.50 -14062.50 20250.03 5625.00 ; C 68; N clefs-bass_change; B -2250.05 -11250.05 16200.04 4500.02 ; C 69; N clefs-violin; B -4901.80 -16875.00 21021.40 28125.00 ; C 70; N clefs-violin_change; B -4258.94 -13500.05 16479.68 22500.08 ; -C 71; N timesig-C; B -4500.02 -5625.00 3937.48 5625.00 ; -C 72; N timesig-C2; B -4500.02 -7874.97 3937.48 7874.97 ; -C 73; N timesig-oldC; B -4218.75 -4218.75 4218.75 4218.75 ; -C 74; N timesig-oldC2; B -4218.75 -5625.00 4218.75 5625.00 ; -C 75; N timesig-old3_2; B -4218.75 -4218.75 4218.75 4218.75 ; -C 76; N timesig-old6_4; B -4218.75 -7031.25 4218.75 11250.00 ; -C 77; N timesig-old9_4; B -4218.75 -7031.25 4218.75 11250.00 ; +C 71; N timesig-C4/4; B -10125.02 -5625.00 9562.48 5625.00 ; +C 72; N timesig-C2/2; B -10125.02 -7874.97 9562.48 7874.97 ; +C 73; N timesig-old4/4; B -9843.75 -4218.75 9843.75 4218.75 ; +C 74; N timesig-old2/2; B -9843.75 -5625.00 9843.75 5625.00 ; +C 75; N timesig-old3/2; B -9843.75 -4218.75 9843.75 4218.75 ; +C 76; N timesig-old6/4; B -9843.75 -7031.25 9843.75 7031.25 ; +C 77; N timesig-old9/4; B -9843.75 -7031.25 9843.75 7031.25 ; EndCharMetrics EndFontMetrics diff --git a/mf/out/feta26.afm b/mf/out/feta26.afm index d302492127..bd5369910d 100644 --- a/mf/out/feta26.afm +++ b/mf/out/feta26.afm @@ -72,12 +72,12 @@ C 67; N clefs-bass; B -3250.00 -16250.00 23400.04 6500.00 ; C 68; N clefs-bass_change; B -2600.07 -13000.08 18720.08 5200.03 ; C 69; N clefs-violin; B -5664.29 -19500.00 24291.40 32500.00 ; C 70; N clefs-violin_change; B -4921.46 -15600.08 19043.21 26000.14 ; -C 71; N timesig-C; B -5200.03 -6500.00 4549.99 6500.00 ; -C 72; N timesig-C2; B -5200.03 -9099.96 4549.99 9099.96 ; -C 73; N timesig-oldC; B -4875.00 -4875.00 4875.00 4875.00 ; -C 74; N timesig-oldC2; B -4875.00 -6500.00 4875.00 6500.00 ; -C 75; N timesig-old3_2; B -4875.00 -4875.00 4875.00 4875.00 ; -C 76; N timesig-old6_4; B -4875.00 -8125.00 4875.00 13000.00 ; -C 77; N timesig-old9_4; B -4875.00 -8125.00 4875.00 13000.00 ; +C 71; N timesig-C4/4; B -11700.03 -6500.00 11049.99 6500.00 ; +C 72; N timesig-C2/2; B -11700.03 -9099.96 11049.99 9099.96 ; +C 73; N timesig-old4/4; B -11375.00 -4875.00 11375.00 4875.00 ; +C 74; N timesig-old2/2; B -11375.00 -6500.00 11375.00 6500.00 ; +C 75; N timesig-old3/2; B -11375.00 -4875.00 11375.00 4875.00 ; +C 76; N timesig-old6/4; B -11375.00 -8125.00 11375.00 8125.00 ; +C 77; N timesig-old9/4; B -11375.00 -8125.00 11375.00 8125.00 ; EndCharMetrics EndFontMetrics diff --git a/mi2mu/include/mudela-item.hh b/mi2mu/include/mudela-item.hh index 461d43b71a..6dce94333d 100644 --- a/mi2mu/include/mudela-item.hh +++ b/mi2mu/include/mudela-item.hh @@ -75,7 +75,7 @@ public: virtual String str(); // int const c0_pitch_i_c_ = 60; // huh? - int const c0_pitch_i_c_ = 48; + static int const c0_pitch_i_c_ = 48; static bool const simple_plet_b_s = false; int channel_i_; diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index 053762502f..caf499ee43 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -153,7 +153,11 @@ Mudela_time_signature::str () as \plet 2/3; c4 \plet 1/1; */ -bool const Mudela_note::simple_plet_b_s = true; +/* + UGH: .hh says false, .cc says true. + FIXME. + */ +bool const Mudela_note::simple_plet_b_s; Mudela_note::Mudela_note (Mudela_column* mudela_column_l, int channel_i, int pitch_i, int dyn_i) diff --git a/stepmake/NEWS b/stepmake/NEWS index fe5a858598..3b27f3db08 100644 --- a/stepmake/NEWS +++ b/stepmake/NEWS @@ -1,3 +1,6 @@ +pl 56 + - crude metapost stuff + pl 55 - table-to-html stuff moved . diff --git a/stepmake/VERSION b/stepmake/VERSION index 8f110f1f6d..57fd582a8e 100644 --- a/stepmake/VERSION +++ b/stepmake/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=StepMake MAJOR_VERSION=0 MINOR_VERSION=1 -PATCH_LEVEL=55 +PATCH_LEVEL=56 MY_PATCH_LEVEL= # use the above to send patches, always empty for released version: diff --git a/stepmake/make/out/stepmake.lsm b/stepmake/make/out/stepmake.lsm index 8e72fc13ca..ee26dee12a 100644 --- a/stepmake/make/out/stepmake.lsm +++ b/stepmake/make/out/stepmake.lsm @@ -1,15 +1,15 @@ Begin3 Title: StepMake -Version: 0.1.55 -Entered-date: 05OCT98 +Version: 0.1.56 +Entered-date: 09OCT98 Description: Keywords: music notation typesetting midi fonts engraving Author: janneke@gnu.org (Jan Nieuwenhuizen) hanwen@cs.ruu.nl (Han-Wen Nienhuys) Maintained-by: janneke@gnu.org (Jan Nieuwenhuizen) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 40k stepmake-0.1.55.tar.gz + 40k stepmake-0.1.56.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/development/ - 40k stepmake-0.1.55.tar.gz + 40k stepmake-0.1.56.tar.gz Copying-policy: GPL End diff --git a/stepmake/make/out/stepmake.spec b/stepmake/make/out/stepmake.spec index ebad41221a..bc6591be30 100644 --- a/stepmake/make/out/stepmake.spec +++ b/stepmake/make/out/stepmake.spec @@ -1,9 +1,9 @@ Name: stepmake -Version: 0.1.55 +Version: 0.1.56 Release: 1 Copyright: GPL Group: Development -Source0: pcnov095.win.tue.nl:/pub/lilypond/development/stepmake-0.1.55.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/development/stepmake-0.1.56.tar.gz Summary: generic make package Packager: janneke@gnu.org (Jan Nieuwenhuizen) Buildroot: /tmp/stepmake-install diff --git a/stepmake/stepmake/documentation-targets.make b/stepmake/stepmake/documentation-targets.make index 60516476a2..862eebf7f7 100644 --- a/stepmake/stepmake/documentation-targets.make +++ b/stepmake/stepmake/documentation-targets.make @@ -12,7 +12,7 @@ else readme-top_FILES-txt: $(foreach i, $(README_TOP_FILES), \ cp $(depth)/$(i) $(outdir)/$(i).txt && ) true - + readme-top_FILES-html: $(foreach i, $(README_TOP_FILES), \ $(SHELL) $(step-bindir)/text2html.sh $(outdir)/$(i).txt $(outdir)/$(i).html && \ diff --git a/stepmake/stepmake/executable-rules.make b/stepmake/stepmake/executable-rules.make index 1bb8bf6d7f..e032d7ee59 100644 --- a/stepmake/stepmake/executable-rules.make +++ b/stepmake/stepmake/executable-rules.make @@ -1 +1,2 @@ # empty + diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index cfade84d89..2e9645b6da 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -3,7 +3,7 @@ .PHONY : all clean config default dist doc doc++ exe help html lib TAGS\ po -VPATH=$(outdir)/ #ugh? +# VPATH=$(outdir)/ #ugh? # target all: # all: default @@ -123,7 +123,7 @@ TAGS: $(outdir)/VERSION: $(depth)/VERSION cp $< $@ -$(outdir)/version.hh: VERSION +$(outdir)/version.hh: $(outdir)/VERSION sh ./$(step-bindir)/make-version.sh $< > $@ # should this be in Rules? @@ -158,6 +158,8 @@ installextradoc: WWW: local-WWW $(LOOP) +local-WWW: + include $(stepdir)/package.make include $(outdir)/dummy.dep $(DEP_FILES) diff --git a/stepmake/stepmake/metapost-rules.make b/stepmake/stepmake/metapost-rules.make new file mode 100644 index 0000000000..302e6d757c --- /dev/null +++ b/stepmake/stepmake/metapost-rules.make @@ -0,0 +1,15 @@ + +$(outdir)/%.pfa: %.mf +# urg +# i've got no idea what this scaling could be for, on both sides... +# it seems that 'low_res', which should be all we ever need according +# to the metapost mfplain guru, really does 200dpi, iso 600dpi (minimun) + -mp "&mfplain \mode=lowres; \mag=100.0; batchmode; input $<" +# -mp "&mfmp \mode=ljfour; \mag=100.0; batchmode; input $<" +# -mp "&mfplain modes \mode=ljfour; \mag=100.0; batchmode; \\input $<" +# -mp "&mfplain \mode=lowres; \mag=10.0; batchmode; input $<" +# -mp "&mfplain \mode=lowres; \mag=1.0; batchmode; input $<" + $(PYTHON) $(depth)/buildscripts/ps-to-pfa.py $< + rm -f $(basename $(@F)).[0-9]* + rm -f $(basename $<).log $(basename $<).tfm + diff --git a/stepmake/stepmake/metapost-targets.make b/stepmake/stepmake/metapost-targets.make new file mode 100644 index 0000000000..1f38b31be8 --- /dev/null +++ b/stepmake/stepmake/metapost-targets.make @@ -0,0 +1,3 @@ + +pfa: $(PFA_FILES) + diff --git a/stepmake/stepmake/metapost-vars.make b/stepmake/stepmake/metapost-vars.make new file mode 100644 index 0000000000..c8c73d2168 --- /dev/null +++ b/stepmake/stepmake/metapost-vars.make @@ -0,0 +1,7 @@ + +# MF_FILES := $(wildcard *.mf) +# FONT_FILES = $(wildcard *[0-9].mf) +# EXTRA_DIST_FILES += $(MF_FILES) +MP_PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) +PFA_FILES += $(MP_PFA_FILES) + diff --git a/stepmake/stepmake/yolily-debian-targets.make b/stepmake/stepmake/yolily-debian-targets.make index 9c19eb29db..ab52ceaf49 100644 --- a/stepmake/stepmake/yolily-debian-targets.make +++ b/stepmake/stepmake/yolily-debian-targets.make @@ -2,7 +2,6 @@ default: $(OUTCONF_FILES) - $(outdir)/%: % rm -f $@ ln $< $@ diff --git a/tex/GNUmakefile b/tex/GNUmakefile index 16b47023ad..c6f3822ec1 100644 --- a/tex/GNUmakefile +++ b/tex/GNUmakefile @@ -4,7 +4,8 @@ depth = .. TEX_FILES = $(wildcard *.tex) -EXTRA_DIST_FILES = $(TEX_FILES) + +EXTRA_DIST_FILES = $(TEX_FILES) lilyponddefs.ps INSTALLATION_DIR=$(TEXDIR)/lilypond INSTALLATION_FILES=$(TEX_FILES) diff --git a/tex/lilyponddefs.ps b/tex/lilyponddefs.ps new file mode 100644 index 0000000000..b3ba94564e --- /dev/null +++ b/tex/lilyponddefs.ps @@ -0,0 +1,304 @@ +%!PS-Adobe-3.0: lilyponddefs + +% hmm +/setgray { 1 add } bind def + +/xoffset 30 def +/yoffset 700 def +/staffrulethickness 1 def +/staffheight 20 def + +% round cappings +1 setlinecap + +/placebox +{ + /object exch def + gsave + exch translate + 0 0 moveto + object + grestore +} bind def + +/settext +{ + gsave + % urg + /Times-Roman findfont 12 scalefont setfont + show + grestore +} bind def + +/vrule % width height depth +{ + gsave + 3 -1 roll setlinewidth + neg 0 exch moveto + 0 exch lineto stroke + grestore +} bind def + +/draw_stem % kern width height depth +{ + gsave + 4 -1 roll neg 0 translate + vrule + grestore +} bind def + +/widthbar % height width +{ + gsave + setlinewidth + 2 div dup neg 0 exch moveto + 0 exch lineto stroke + 2 div + grestore +} bind def + +/thickbar % height +{ + stafflinethickness 2 mul widthbar +} bind def + +/thinbar % height +{ + stafflinethickness 1.6 mul widthbar +} bind def + +/maatstreep +{ + thinbar +} bind def + +/finishbar +{ + thickbar +} bind def + +/generalmeter +{ +} bind def + +/pianobrace +{ + gsave + /feta-braces20 findfont 12 scalefont setfont% + show + grestore +} bind def + +/repeatbar +{ +} bind def + +/start_line +{ + gsave + xoffset yoffset translate +} bind def + +/stop_line +{ + /object exch def + 0 0 moveto pathbbox exch pop sub exch pop + object + grestore + yoffset add /yoffset exch def + % urg... + yoffset staffheight 8 mul sub /yoffset exch def +} bind def + +/unknown {} bind def + +/turnOnExperimentalFeatures { } bind def + +/rulesym % thick length +{ + gsave + exch setlinewidth + 0 lineto stroke + grestore +} bind def + +/draw_beam +{ + 2 div /beam_thick exch def + /beam_slope exch def + /beam_wd exch def + beam_slope beam_wd mul /beam_ht exch def + 0 beam_thick neg moveto + beam_wd beam_ht rlineto + 0 beam_thick 2 mul rlineto + 0 beam_thick lineto + closepath fill +} bind def +% +/draw_decresc + { + staffrulethickness setlinewidth + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + cresc_wd cresc_cont moveto + 0 cresc_ht lineto + stroke + cresc_wd cresc_cont neg moveto + 0 cresc_ht neg lineto + stroke + } + bind def + /draw_cresc + { + staffrulethickness setlinewidth + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + 0 cresc_cont moveto + cresc_wd cresc_ht lineto + stroke + 0 cresc_cont neg moveto + cresc_wd cresc_ht neg lineto + stroke + } + bind def + /lily_distance { + 1 copy mul exch 1 copy mul add sqrt + } bind def +staffrulethickness 1.2 mul /plet_t exch def +/draw_plet +{ + plet_t setlinewidth + true setstrokeadjust + 1 setlinecap + 1 setlinejoin + /dir exch def + /plet_dy exch def + /plet_dx exch def + staffheight 2 div /plet_gapx exch def + plet_dy plet_dx div plet_gapx mul /plet_gapy exch def + staffheight 4 div dir mul /plet_h exch def +% + 0 0 moveto + 0 plet_h lineto + plet_dx plet_gapx sub 2 div + plet_dy plet_gapy sub 2 div plet_h add lineto + plet_dx plet_gapx add 2 div + plet_dy plet_gapy add 2 div plet_h add moveto + plet_dx plet_dy plet_h add lineto + plet_dx plet_dy lineto + stroke +} bind def +% +/draw_slur +{ + staffrulethickness setlinewidth + moveto + curveto + lineto + curveto + gsave + fill + grestore + stroke +} bind def +% +/draw_dashed_slur +{ + 1 setlinecap + 1 setlinejoin + setdash + setlinewidth + moveto + curveto + stroke +} bind def +% +staffheight 4 div /interline exch def +% +/bracket_traject +{ + /traject_ds exch def + /traject_alpha exch def + traject_ds traject_alpha sin mul add + exch + traject_ds traject_alpha cos mul add + exch +} bind def +% +% too fat for 20pt +% interline 2 div /bracket_b exch def +interline 3 div /bracket_b exch def +interline 2 mul /bracket_w exch def +staffrulethickness /stafflinethickness exch def +stafflinethickness 2 mul /bracket_t exch def +interline 1.5 mul /bracket_v exch def +bracket_v /bracket_u exch def +50 /bracket_alpha exch def +% +/half_bracket +{ +%6 + 0 0 +%5a + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add + bracket_alpha bracket_v -0.15 mul bracket_traject +%5b + 1 bracket_h + 0 bracket_v 0.5 mul bracket_traject +%5c + 0 bracket_h +%4a + bracket_b bracket_h bracket_t sub + 0 bracket_v 0.4 mul bracket_traject +%4b + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add + bracket_alpha bracket_v -0.25 mul bracket_traject +%4c + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add +%3 + bracket_b bracket_h bracket_t sub +%2 + bracket_b 0 +%1 + 0 0 +} bind def +% +/draw_half_bracket { + moveto + lineto + lineto + curveto + curveto + lineto + gsave + fill + grestore +} bind def +% +/draw_bracket +{ + 2 div bracket_b add /bracket_h exch def + bracket_t setlinewidth + true setstrokeadjust + 1 setlinecap + 1 setlinejoin + half_bracket + 20 copy + 1 -1 scale + draw_half_bracket + stroke + 1 -1 scale +% ugh, ugh: + 0.05 0 translate + draw_half_bracket + stroke +} bind def + +stafflinethickness setlinewidth + +% see if we're there... +% 10 setlinewidth 0 0 moveto 400 800 lineto stroke diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 833d0f2b0e..38ea9553e8 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -145,7 +145,9 @@ \def\columnerrormark{\placebox{-5pt}{0pt}{\bf C!}} \def\scorelineerrormark{\placebox{0pt}{-10pt}{\bf L!}} \def\errormark{{\bf E!}} -\def\unknown{{\bf u}} +\def\unknown{% + %{\bf u} %FIXME +} \input dyndefs \input fetdefs @@ -230,10 +232,20 @@ % macros suck. \ifundefined{nolilyfooter} gives wierd errors from time % to time. % + +% +% Warning: the order is conceptually weird. It says: + +% if not defined (``nolilyfooter''): +% do_footer () +% else +% dont_do_footer () +% \ifx\csname nolilyfooter\endcsname\relax - \message{[footer empty]} - \csname nolilyfooter\texsuffix\endcsname -\else \message{[footer defined]}% \csname lilyfooter\texsuffix\endcsname% +\else + \message{[footer empty]} + \csname% + nolilyfooter\texsuffix\endcsname \fi -- 2.39.2