From: fred Date: Sun, 24 Mar 2002 19:41:12 +0000 (+0000) Subject: lilypond-0.0.20 X-Git-Tag: release/1.5.59~4845 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a30405a9d250e404b2eeaced6a2b25dd88811214;p=lilypond.git lilypond-0.0.20 --- diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle deleted file mode 100644 index 0669c2094a..0000000000 --- a/Documentation/CodingStyle +++ /dev/null @@ -1,91 +0,0 @@ --*-text-*- - -CODING STANDARDS: - -Functions and methods do not return errorcodes, but use assert for -checking status. - -INDENTATION, in emacs: - - -(add-hook 'c-mode-hook - '(lambda ()(setq c-basic-offset 4))) - - -(add-hook 'c++-mode-hook - '(lambda() (c-set-style "Stroustrup") - ) - ) - - -CLASSES and TYPES: - - This_is_a_class - AClass_name (for Abbreviation_class_name) - -DATA MEMBERS - - Class::member - -if the member's name resembles its type, then I use - - class Fubular { ..} - - Class::fubular_ - -COMMENTS - -/// short description -class Class { - /// - Data data_member_; - /** - .. - */ - - /****************/ - - /// short memo - member(); - /** - long doco of member() - */ -}; -/** - Class documentation. -*/ - -Unfortunately most of the code isn't really documented that good. - -CLASSNAMES (2) - -A lot of classes in LilyPond start with 'P', this is to distinguish -certain parts of LilyPond: the P stands for Printer, and the P-classes -are supposed to be more lowlevel than the others. Example: - - Staff uses PStaff, PScore and PCol to do the typesetting of -symbols. Staff is the "brains" for PStaff - -NB: in PCursor (which is part of the library) P stands for PointerCursor - - -MEMBERS(2) - -Standard methods: - - ///check that *this satisfies its invariants, abort if not. - void OK() const - - /// print *this (and substructures) to debugging log - void print() const - - /// add some data to *this; - add( .. ) - /** - Presence of these methods usually imply that it is not feasible to this - via a constructor - */ - - /// replace some data of *this - set( .. ) - diff --git a/Documentation/algorithms b/Documentation/algorithms deleted file mode 100644 index f422332e41..0000000000 --- a/Documentation/algorithms +++ /dev/null @@ -1,98 +0,0 @@ -Date: Tue, 5 Nov 1996 00:01:32 +0100 -From: Werner Icking -To: hanwen@stack.urc.tue.nl -Cc: dsimons@logicon.com -Subject: Re: font sizes. - -> Date: Mon, 4 Nov 1996 22:37:54 +0100 (MET) -> From: Han-Wen Nienhuys -> > -> >There were different schemes when music was typeset by hand. If I remember -> >right Harder uses another scheme that Gomberg. Both scheme may be used -> -> Who are Harder and Gomberg? Do you have references? - -Both are mentioned in the master thesis by Steinbach & Schofer who -invented M(u)TeX, the grandmother of all M...TeXs. The Musiclibrary -in Bonn has the harder (printed in 1948?) and there are not many books -I liked more to own. - -The master thesis should be available at the CTAN archives under MuTeX -or MTEX maybe subdirectory DIPL (for Diplom). I have the TEX-source -and I may pack it to ftp.gmd.de if you are interested and can't find it -on CTAN. -================================================================ - -[breaking lines] -> ->Incidentally, I use a different approach in PMX, starting with the ->total number of systems for the piece instead of assuming a starting ->physical value for \elemskip. That's equivalent to setting the ->physical length of the whole piece if laid out in one long line. ->Knowing the total amount of scalable and fixed space I compute a ->starting physical value for \elemskip. I use that to get how many ->bars go in the first line. Then I force a line break there, remove ->those bars and their scalable and fixed space from the accounting, and ->start over with the second line, etc. - - -Since you are getting into technical details, I will show mine too: I -think my way is the most elegant algorithm i've seen so far. Some -terminology: I call a vertical group of symbols (notes) which start at -the same time a "column". Each line of a score has notes in it, -grouped in columns. The difference in starting time between those -columns makes it possible to determine ideal distances between those -columns. - -Example: - - time -----> - - col1 col2 col3 col4 - - -voice1 1 1 - -voice2 2 2 2 2 - - -(1 is a whole note, 2 a half note.) - -time_difference (col1 , col2) = 0.5 wholes, -time_difference (col1 , col3) = 1 wholes, -time_difference (col2 , col3) = 0.5 wholes, -etc. - -these differences are translated into ideal distances (these translations -have been the subject of discussion in this thread). - - distance (col1,col2) = 10 pt - distance (col1,col3) = 14.1 pt - distance (col2,col3) = 10 pt - etc. - -as you can see, these distance are conflicting. So instead of -satisfying all those ideals simultaneously, a compromise is sought. - -This is Columbus' egg: LilyPond attaches "springs" to each -column-pair. each spring has an equilibrium-position which is equal to -the above mentioned distance, so - - spring (col1, col2) and spring(col2,col3) try to push column 1 -and 3 away (to a distance of 20pt) from each other, whereas the spring -between col 1 and col 3 tries to pull those two together (to a -distance of 14.1 pt). The net result of this pushing and pulling is an -equilibrium situation (the pushing cancels the pulling), which can be -calculated as the solution of Quadratic program: it is the solution -with minimum potential energy, for you physicists out there. - -This algorithm for doing one line, gives a "badness" parameter for -each line (the potential energy). Now one can use TeX's algorithm for -making paragraphs (using this new version of "badness"): one should -try to minimise the overall badness of a paragraph. LilyPond also uses the -concept of pre- and post-breaks. - -(actually, it is a bit more complicated: each column also has a -minimum distance to other columns, to prevent symbols from running -into symbols of other columns.) - diff --git a/Documentation/breaking b/Documentation/breaking deleted file mode 100644 index ea1ada7e10..0000000000 --- a/Documentation/breaking +++ /dev/null @@ -1,38 +0,0 @@ -[Source files: command.hh, scommands.cc] - -BREAKING, PREBREAK POSTBREAK, etc. - -So what's the deal with PREBREAK and POSTBREAK and all this -stuff? - -Let's take text as an example. In German some compound -words change their spelling if they are broken: "backen" becomes -"bak-ken". TeX has a mechanism to deal with this, you would define -the spelling of "backen" in TeX in this way - - \discretionary{bak-}{ken}{backen} - -These 3 arguments are called "prebreak", "postbreak" and "nobreak" -text. - -The same problem exists when typesetting music. If a line of music is -broken, the next line usually gets a clef. So in TeX terms, the clef -is a postbreak. The same thing happens with meter signs: Normally the -meter follows the bar. If a line is broken at that bar, the bar along -with the meter stays on the "last" line, but the next line also gets a -meter sign after the clef. Using the previous notation, - - \discretionary{bar meter}{clef meter}{ bar meter } - -In Lilypond, we have the same concepts (and the same -terminology). Each (nonrhythmic) symbol is typeset using a Command -(code: TYPESET). At a breakpoint, TYPESET commands can be grouped -using separators (in lower case): - - BREAK_PRE, typeset(bar), typeset(meter), - BREAK_MID, typeset(bar), typeset(meter), - BREAK_POST, typeset(clef), typeset(meter), BREAK_END - -The BREAK command sequence is terminated with BREAK_END, so other -commands (like INTERPRET) may follow this sequence. - diff --git a/Documentation/commands b/Documentation/commands deleted file mode 100644 index 00d5856c67..0000000000 --- a/Documentation/commands +++ /dev/null @@ -1,24 +0,0 @@ -This table decribes the proper order for the different commands: - - -interpret - which priority - ======================== - - key 200 - clef 190 - meter 180 - bar 170 - -typeset - - which priority - ======================== - - bar 100 - clef 90 - currentclef 80 - key 70 - currentkey 60 - meter 40 - \ No newline at end of file diff --git a/Documentation/design b/Documentation/design deleted file mode 100644 index e1a317a29e..0000000000 --- a/Documentation/design +++ /dev/null @@ -1,26 +0,0 @@ -LilyPond is a "5-pass" system: - -1. Parsing: - -No difficult algorithms. Associated datastructures have prefix Input -(eg Input_score, Input_command) - -2. Processing: - -Requests are processed and granted. In this step data-structures for -3. are created and filled with data: PScore, PCol, PStaff - -3. Calculation: - -This step uses structures which have names starting with 'P'. -linebreaks and horizontal positions of PCols are determined. Line_of_* -generated. - -4. Postprocesing: - -Some items and all spanners need computation after the PCol positions -are determined. - -5. Output - -Very simple, just walk all Line_of_* and follow the links over there \ No newline at end of file diff --git a/Documentation/inputformat b/Documentation/inputformat deleted file mode 100644 index d82c02b2e5..0000000000 --- a/Documentation/inputformat +++ /dev/null @@ -1,61 +0,0 @@ -General format of a construct: - - BLOCKNAME { } - -Some types allow declarations: - - IDENTIFIER = BLOCKNAME { - - } - - .. - - BLOCKNAME { - IDENTIFIER - ... - } - - -In musicmode, eg, - - ''!c8.-"text"_v - -a lot of characters parse differently -than in "command" mode, eg, - - identifier = score { .. } - -So you have to signal that to the tokenizer. This is done with -'$'. '$' is a delimiter, which used by the tokenizer only. - -* musicmode: The brace still is used to group grammatical groups. -* musicmode: "word" are preceded by a '\' (backslash) - -This means you can write some stuff in a zillion ways: - -1. $\var = \blockname { ... } $ - -2. var = blockname { $ ... $ } - -3. var = $ $ $\blockname { ... $ } - -COMMENTS - -not really crystallized; you can use '#' or '%' as line comment - -OTHER - -A correctly parsed .ly does not guarantuee output. A lot (most) of the -checking is done *after* parsing (some checks even are done after the -break calc!); I'm sorry. - -The parser's job is to construct appropriate objects. It will *only* -detect parse errors. - -LilyPond first reads 'symbol.ini', which contains declarations crucial -to proper operation of LilyPond (symbol tables, note names) - -This language looks a lot like Rayce's which in turn owes a lot to the -POVRay raytracer. Now, I know, musictypesetting and Raytracing do not -necessarily require the same input format, but I was just to lazy to -make up a new/better input format. Suggestions welcome. diff --git a/Documentation/literature b/Documentation/literature deleted file mode 100644 index 0085806013..0000000000 --- a/Documentation/literature +++ /dev/null @@ -1,76 +0,0 @@ -\chapter{References \& Further reading} - -Herbert Chlapik, - -Ren\'e Roelofs, ``Een Geautomatiseerd Systeem voor het Afdrukken van -Muziek'' afstudeerscriptie Bestuurlijke informatica, no 45327, Erasmus -universiteit Rotterdam, 1991. (``An automated system for printing -music'' Master's Thesis Management and Computer Science.) - -G. Read, ``Modern Rhythmic Notation.'' Indiana University Press, 1978. - -C. Roemer, The Art of Music Copying. Roerick music co., Sherman Oaks (CA), 1973. - -Donemus, Uitgeven van muziek. Donemus Amsterdam, 1900 - -W.A. Hegazy and J. S. Gourlay. Optimal line breaking in music. In -``Document Manipulation and Typography'',J.C. van Vliet (ed) 1988. - -\begin{verbatim} -Date: Thu, 03 Aug 1995 22:55:48 -0700 -From: Mark Basinski -To: Han-Wen Nienhuys -Newsgroups: comp.music, comp.text.tex -Subject: Re: [WANTED] references on typesetting music - -(A copy of this message has also been posted to the following newsgroups: -comp.music, comp.text.tex) - -In article <3vqr50$den@turtle.stack.urc.tue.nl>, hanwen@stack.urc.tue.nl -(Han-Wen Nienhuys) wrote: - -> I am currently typesetting music with a preprocessor to the TeX package -> MusiXTeX, and I want to enhance this preprocessor with an some sort of -> algorithm to do spacing. Currently the output looks nice, but there are some -> flaws in the spacing when I combine accidentals, slurs, triplets and strange -> pitchjumps and so on. Therefore I am interested in all literature on -> typesetting music. The FAQS for comp.music did not have any references. -> -Probably the best 2 reference books are: - -1) ``Teach yourself the art of music engraving and processing'' by Ted Ross -(3rd edition), published by Hansen House, Miami Beach, FL. - -Hansen House -1820 West Ave. -Miami, FL 33139 -(305) 532-5461 - -This is about *engraving* i.e. professional music typesetting, and includes -some good spacing tables - -2) ``Music Notation'' by Gardner Read (2nd edition), published by Taplinger -Publishing, New York. - -This is as close to the ``standard'' reference work for music notation issues -as one is likely to get. - -Some others (of varying usefulness): - -Donato, Anthony. Preparing Music Manuscript. Englewood Cliffs: -Prentice-Hall, 1963. - -Heussenstamm, George. The Norton Manual of Music Notation. New York: -Norton, 1987. - -Karkoshka, Erdhard. Notation in New Music. Trans. Ruth Koenig. New York: -Praeger Publishers, 1972. Out of print. - -Roemer, Clinton. The Art of Music Copying. Roerick Music. Sherman Oaks, 1973. - -Rosecrans, Glen. Music Notation Primer. New York: Passantino, 1979. - -Stone, Kurt. Music Notation in the Twentieth Century. New York: Norton, 1980. - -\end{verbatim} - diff --git a/Documentation/pointers b/Documentation/pointers deleted file mode 100644 index 45e2479d3f..0000000000 --- a/Documentation/pointers +++ /dev/null @@ -1,31 +0,0 @@ -This describes the ownership of certain classes in LilyPond. + -signifies a "list of". (This is not complete) - -Score: - Paperdef - Staff+ - Score_commands - Score_columns+ - PScore - -Staff: - Voice - Staff_column+ - Command+ - - -Voice: - Voice_element - -Voice_element: - Request+ - - -PScore: - PStaff+ - PCol+ - Idealspacing+ - Item+ - Spanner+ - Spanner+ (broken) - diff --git a/Documentation/slurfont b/Documentation/slurfont deleted file mode 100644 index fda65e193a..0000000000 --- a/Documentation/slurfont +++ /dev/null @@ -1,43 +0,0 @@ -How are slur fonts organised? - -xhslu20: see xslhu20 - -xslhu20: half slurs, pointing up - right - width in steps of 12pt (12pt-96pt) - height in 16 steps - left - idem - -xslhd20: half slurs, pointing down, idem - -xslu20: whole slurs, ascending - pointing up - height (dy) in 8 steps - width in 16 steps of 4pt (8 pt - 64pt) - pointing down - height (dy) in 8 steps - width in steps of 4pt (8 pt - 64pt) - -xsld20: whole slurs, descending - pointing up - height (dy) in 8 steps - width in steps of 4pt (8 pt - 60pt) - pointing down - height (dy) in 8 steps - width in steps of 4pt (8 pt - 60pt) - - -xslhz: middlepieces for half-slurs - pointing up - width in 100 steps of 4 pt (4 pt to 400pt) - pointing down - idem - -xslz: horizontal slurs - pointing up - width in 54 steps of 4pt - pointing down - idem - -xtie: same as xslhz. diff --git a/src/moment.cc b/src/moment.cc deleted file mode 100644 index 19f8571335..0000000000 --- a/src/moment.cc +++ /dev/null @@ -1,58 +0,0 @@ -#include "moment.hh" -#include "debug.hh" - -void -Moment::print() const -{ - mtor << " at "<0); - *this = *prev; - when += + dt; - whole_in_measure += dt; - while ( whole_in_measure >= whole_per_measure ) { - whole_in_measure -= whole_per_measure; - bars ++; - } - } else { // default 4/4 - whole_per_measure = 1; - whole_in_measure =0; - one_beat = 0.25; - when = 0.0; - bars = 0; - } -} - -void -Moment::set_meter(int l, int o) -{ - assert(o); - one_beat = 1/Real(o); - whole_per_measure = Real(l) * one_beat; -} - -void -Moment::setpartial(Real p) -{ - if (when) - error_t ("Partial measure only allowed at beginning.", when); - if (p<0||p > whole_per_measure) - error_t ("Partial measure has incorrect size", when); - whole_in_measure = whole_per_measure - p; -} -Real -Moment::barleft() -{ -return whole_per_measure-whole_in_measure; -}