Generated by hanwen@cs.uu.nl, From = lilypond-1.4.8, To = lilypond-1.4.9 usage cd lilypond-source-dir; patch -E -p1 < lilypond-1.4.9.diff Patches do not contain automatically generated files or (urg) empty directories, i.e., you should rerun autoconf, configure diff -urN ../lilypond-1.4.8/CHANGES ./CHANGES --- ../lilypond-1.4.8/CHANGES Mon Sep 24 13:50:46 2001 +++ ./CHANGES Tue Nov 20 18:43:00 2001 @@ -1,3 +1,58 @@ +1.4.8.moh2 +========== + +* More flexible lyric alignment: + - new properties "alignment", "ignore-length-mismatch", "begin-alignment" an\d "end-alignment" to control non-centered lyric alignment + + +1.4.8.hwn2 +========== + +* Bugfix: neutral direction of Beam + +* Makefile rules for pktrace. + +* logout message for redhat spec + +* links from refman to internal doco. + +* search link on the webpage. + +* Fast pixmap crop for lilypond-book. + +* Add Percent_repeat_engraver description. + +* Guile 1.5.4 compatibility now working. + +* ly2dvi.py: resource import. + +* Mats' fixes for Miktex and PS output. + +* Bugfix for scriptHorizontal. + +* Change default duration behavior: copy duration fraction fields as +well. Incompatible change: \tempo doesn't set default duration + +* Updates from 1.5 for ly2dvi, etf2ly, abc2ly, emacs, rest/skip documentation + +* Bugfix: be strict about slur dimensions. + +* Bugfix: insert extra margin around pixmaps in lilpyond-book. + +* lilypond-book: magnification option for EPS + +1.4.8.jcn3 +========== + +* Dropped-in fixed c++ midi2ly from 1.5. + +* Backported more guile > 1.4 compatibility stuff. + +* Danish and Swedish .po files + +1.4.8 +===== + 1.4.7.jcn2 ========== @@ -25,7 +80,7 @@ * Backported compatibility fixes for GUILE 1.5 -* default-neutral-direction -> neutral-direction +* Change default-neutral-direction to neutral-direction everywhere. * Danish .po file. diff -urN ../lilypond-1.4.8/Documentation/footer.html.in ./Documentation/footer.html.in --- ../lilypond-1.4.8/Documentation/footer.html.in Thu Aug 23 15:37:50 2001 +++ ./Documentation/footer.html.in Tue Nov 13 23:40:43 2001 @@ -24,8 +24,7 @@

Please send comments on these web pages to -@MAIL_ADDRESS@ - +@MAILADDRESS@

Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen. diff -urN ../lilypond-1.4.8/Documentation/header.html.in ./Documentation/header.html.in --- ../lilypond-1.4.8/Documentation/header.html.in Tue Sep 18 01:11:04 2001 +++ ./Documentation/header.html.in Sun Nov 18 01:08:52 2001 @@ -49,8 +49,8 @@ Download - Linux
- Windows
+ GNU/Linux binaries
+ Windows binaries
Source code
@@ -68,6 +68,7 @@ Mailing lists
+ Search
WikiWiki
FAQs

diff -urN ../lilypond-1.4.8/Documentation/topdocs/INSTALL.texi ./Documentation/topdocs/INSTALL.texi --- ../lilypond-1.4.8/Documentation/topdocs/INSTALL.texi Sun Sep 16 21:17:12 2001 +++ ./Documentation/topdocs/INSTALL.texi Tue Nov 13 23:40:43 2001 @@ -481,7 +481,7 @@ @end example - +@c Why isn't this in BUGS (where it belongs?) @section Problems For help and questions use @email{lilypond-user@@gnu.org}. Please @@ -493,15 +493,31 @@ @unnumberedsubsec Debian GNU/Linux unstable gcc-3.0 Flex (2.5.4a-11) in unstable does not produce g++-3.0 compliant C++ -code. To compile LilyPond with gcc-3.0 you may do: +code. To compile LilyPond with gcc-3.0, please first upgrade to +flex_2.5.4a-13 or newer. Otherwise, you may do: @example + rm -f config.cache CC=gcc-3.0 CXX=g++-3.0 ./configure --enable-config=gcc-3.0 make conf=gcc-3.0 -C lily out-gcc-3.0/lexer.cc patch -p1 < lexer-gcc-3.0.patch make conf=gcc-3.0 -C lily @end example + +@unnumberedsubsec Linux-2.4.0, Guile-1.4 --with-threads + +There's a bug in certain kernels around version 2.4.0, that is +triggered when using Guile 1.4 compiled with pthreads. You'll see +random segmentation fault craches of LilyPond. Upgrade to a newer +version of Linux. If you can't do that, you may try to recompiling +Guile without threads (YMMV): + +@example + guile-1.4$ ./configure --without-threads; make all install +@end example + + @unnumberedsubsec NetBSD @itemize @bullet diff -urN ../lilypond-1.4.8/Documentation/user/refman.itely ./Documentation/user/refman.itely --- ../lilypond-1.4.8/Documentation/user/refman.itely Tue Aug 21 18:06:42 2001 +++ ./Documentation/user/refman.itely Sun Nov 18 01:08:52 2001 @@ -14,6 +14,26 @@ @end macro +@ifhtml +@macro internalsref{NAME} +@uref{../lilypond-internals/\NAME\.html,\NAME\} +@cindex \NAME\ +@end macro +@macro seeinternals{NAME} +See @internalsref{\NAME\} +@end macro +@end ifhtml + + +@ifnothtml +@macro seeinternals{NAME} +@end macro +@macro internalsref{NAME} +\NAME\ +@cindex \NAME\ + +@end macro +@end ifnothtml @c .{Reference Manual} @@ -151,6 +171,8 @@ cis' d' e' cis' c'? d' e' c'! @end lilypond +The grob for a note head is called @internalsref{NoteHead}. + @c . {Pitches} @node Pitches @@ -219,26 +241,51 @@ @subsection Rests @cindex Rests -Rests are entered like notes, with note name `@code{r}'. The grob is -@code{Rest}. Whole bar rests centered in the bar are specified using -@code{R}, see @ref{Multi measure rests}. +A rest is entered like a note, with note name `@code{r}': +@lilypond[singleline,verbatim] +r1 r2 r4 r8 +@end lilypond + +The grob is @internalsref{Rest}. Whole bar rests centered in the bar are +specified using @code{R}, see @ref{Multi measure rests}. @c . {Skips} @node Skips @subsection Skips @cindex Skip +An invisible rest, or skip, can be entered like a note with note name +`@code{s}': -@example - \skip @var{duration} - s@var{duration} -@end example -@cindex @code{\skip} +@lilypond[singleline,verbatim] +a2 s4 a4 s1 a4 +@end lilypond -Skips the amount of time specified by @var{duration}. If no other music -is played, a gap will be left for the skipped time without any notes -printed. The shorthand is only available in Note and Chord mode. +Actually, this is a shorthand for the @code{\skip} command, and it is +only available in Note mode and Chord mode. + +@c FIXME: in lyrics mode, we have " " and _ + +In Lyrics mode, you can use `@code{" "}' and `@code{_}': +@lilypond[singleline,verbatim] +< + \context Lyrics \lyrics { lah2 di4 " " dah2 _4 di } + \notes\relative c'' { a2 a4 a a2 a4 a } +> +@end lilypond + +The unabbreviated `@code{\skip} @var{duration}' also works outside of +note mode: + +@lilypond[singleline,verbatim] +\score { + \context Staff < + { \time 4/8 \skip 2 \time 4/4 } + \notes\relative c'' { a2 a1 } + > +} +@end lilypond @c . {Durations} @node Durations @@ -271,7 +318,7 @@ @lilypond[] \score { \notes \relative c'' { - a\breve \autoBeamOff + a\breve \autoBeamOff a1 a2 a4 a8 a16 a32 a64 a64 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r64 @@ -351,7 +398,8 @@ \time 3/4 c'2. c'2 ~ c'4 @end lilypond -The name of the tie grob is @code{Voice.Tie}. +The name of the tie grob is @internalsref{Tie}. It is usually created +in the @internalsref{Voice} context. @refbugs @@ -423,7 +471,7 @@ @cindex @code{tupletNumberFormatFunction} @cindex tuplet formatting -Tuplet brackets are printed as @code{TupletBracket} grobs +Tuplet brackets are printed as @internalsref{TupletBracket} grobs @c . {Defining pitch names} @node Defining pitch names @@ -459,12 +507,12 @@ @lilypond[singleline,verbatim] \include "paper23.ly" \score { - \notes { c'2 e'4 f' | g'1 } - \paper { \translator { \EasyNotation } } + \notes { c'2 e'4 f' | g'1 } + \paper { \translator { \EasyNotation } } } @end lilypond -Note that @code{EasyNotation} overrides a @code{Score} context. You +Note that @code{EasyNotation} overrides a @internalsref{Score} context. You probably will want to print it with magnification to make it more readable, see @ref{Output scaling}. @@ -525,7 +573,7 @@ Non-standard key signatures can be specified by setting this property directly, see the generated documentation for @rgrob{KeySignature}. -The printed signature is a @code{KeySignature} grob. +The printed signature is a @internalsref{KeySignature} grob. @cindex @code{keySignature} @@ -547,7 +595,7 @@ \property Staff.clefOctavation = @var{extra transposition of clefname} @end example -Any change in these properties creates a clef (a @code{Clef} grob). +Any change in these properties creates a clef (a @internalsref{Clef} grob). Supported clef-names include @@ -653,7 +701,7 @@ generated. Changing the value of @code{timeSignatureFraction} also causes a -fraction to be printed. This grob is @code{TimeSignature}. +fraction to be printed. This grob is @internalsref{TimeSignature}. The actual symbol that's printed can be customized with the style property. @@ -771,7 +819,7 @@ @code{\bar }. These settings take precedence over the automatic @code{whichBar} settings. -@code{BarLine} grobs are created by the @code{Bar_engraver}. +@internalsref{BarLine} grobs are created by the @internalsref{Bar_engraver}. @c . {Polyphony} @node Polyphony @@ -791,7 +839,7 @@ which voice should moved horizontally in case of a collision. This can be done with the identifiers @code{\shiftOff}, @code{\shiftOn}, @code{\shiftOnn}, etc. (which sets the grob property @code{horizontal-shift} -in @code{NoteColumn}). +in @internalsref{NoteColumn}). @lilypond[fragment, verbatim] \context Staff \notes\relative c''< @@ -845,11 +893,9 @@ @end lilypond Note head collisions (horizontal shifting of note heads) are handled by -the @code{NoteCollision} grob. @code{RestCollision} handles vertical -shifting of rests. +the @internalsref{NoteCollision} grob. @internalsref{RestCollision} +handles vertical shifting of rests. -@cindex @code{NoteCollision} -@cindex @code{RestCollision} @refbugs @@ -996,7 +1042,7 @@ @end lilypond @cindex @code{stemRightBeamCount} -The beam symbol (grob @code{Voice.Beam}, both for automatic and manual +The beam symbol (grob @internalsref{Beam}, both for automatic and manual beams) can be tweaked through grob-properties @code{height} and @code{staff-position}. These specify vertical location and vertical span. Both are measured in half staff-spaces, @code{staff-position=0} @@ -1048,8 +1094,9 @@ Slurs avoid crossing stems, and are generally attached to note heads. However, in some situations with beams, slurs may be attached to stem ends. If you want to override this layout you can do this through the -@code{Voice.Slur}'s grob-property @code{attachment}. It's value is a -pair of symbols, specifying the attachment type of the left and right end points. +@internalsref{Slur}'s grob-property @code{attachment}. It's value is a +pair of symbols, specifying the attachment type of the left and right +end points. @lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 @@ -1075,11 +1122,12 @@ Similarly, the curvature of a slur is adjusted to stay clear of note heads and stems. When that would increase the curvature too much, the slur is reverted to its default shape. The threshold for this decision -is in @code{Voice.Slur}'s grob-property @code{beautiful}. It is loosely -related to the enclosed area between the slur and the notes. Usually, -the default setting works well, but in some cases you may prefer a -curved slur when LilyPond decides for a vertically moved one. You can -indicate this preference by increasing the @code{beautiful} value: +is in @internalsref{Slur}'s grob-property @code{beautiful}. It is +loosely related to the enclosed area between the slur and the notes. +Usually, the default setting works well, but in some cases you may +prefer a curved slur when LilyPond decides for a vertically moved one. +You can indicate this preference by increasing the @code{beautiful} +value: @lilypond[verbatim,singleline,relative] \property Voice.Beam \override #'direction = #-1 @@ -1112,18 +1160,19 @@ @end lilypond Typographically, the phrasing slur behaves almost exactly like a normal -slur. The grob associated with it is @code{Voice.PhrasingSlur}. +slur. The grob associated with it is @internalsref{PhrasingSlur}. @node Breath marks @subsection Breath marks Breath marks are entered using @code{\breathe}. The result is a -@code{Voice.BreathingSign} grob. +@internalsref{BreathingSign} grob. @lilypond[fragment,relative] c'4 \breathe d4 @end lilypond +Note that the skip does not produce any output, not even transparent output. @@ -1169,9 +1218,9 @@ \spanrequest \start "text" \spanrequest \stop "text" @end example -LilyPond will respond by creating a @code{Voice.TextSpanner} grob. The -string to be printed, as well as the style is set through grob -properties. +LilyPond will respond by creating a @internalsref{TextSpanner} grob (typically +in @internalsref{Voice} context). The string to be printed, as well as the +style is set through grob properties. An application---or rather, a hack---is to fake octavation indications. @lilypond[fragment,relative,verbatim] @@ -1287,7 +1336,7 @@ Usually the @code{\script} keyword is not used directly. Various helpful identifier definitions appear in @file{script.ly}. -Grobs for these objects are @code{Script} and @code{Fingering}. +Grobs for these objects are @internalsref{Script} and @internalsref{Fingering}. @refbugs @@ -1316,7 +1365,8 @@ \relative c' { c4^"longtext" \fatText c4_"longlongtext" c4 } @end lilypond -Text scripts are created in form of @code{Voice.TextScript} grobs. +Text scripts are created in form of @internalsref{TextScript} grobs, in +@internalsref{Voice} context. @ref{Text markup} describes how to change the font or access special symbols in text scripts. @@ -1395,8 +1445,8 @@ @cindex @code{\glissando} -A glissando line (grob @code{Voice.Glissando}) can be requested by attaching a -@code{\glissando} to a note: +A glissando line (grob @internalsref{Glissando}) can be requested by +attaching a @code{\glissando} to a notte: @lilypond[fragment,relative,verbatim] c'-\glissando c' @@ -1488,9 +1538,9 @@ @cindex diminuendo -Dynamics are grobs of @code{Voice.DynamicText} and -@code{Voice.Hairpin}. They are put together on -@code{Voice.DynamicLineSpanner} to align them vertically. +Dynamics are grobs of @internalsref{DynamicText} and +@internalsref{Hairpin}. They are put together on +@internalsref{DynamicLineSpanner} to align them vertically. @c . {Repeats} @@ -1642,7 +1692,7 @@ @end lilypond -Repeats brackets are @code{Staff.VoltaBracket} grobs. +Repeats brackets are @internalsref{VoltaBracket} grobs. @node Tremolo repeats @subsection Tremolo repeats @@ -1661,8 +1711,8 @@ } @end lilypond -Tremolo beams are @code{Voice.Beam} grobs. Single stem tremolos are -@code{Voice.StemTremolo}. +Tremolo beams are @internalsref{Beam} grobs. Single stem tremolos are +@internalsref{StemTremolo}. @refbugs @@ -1708,8 +1758,8 @@ } @end lilypond -The signs are represented by these grobs: @code{Voice.RepeatSlash} and -@code{Voice.PercentRepeat} and @code{Voice.DoublePercentRepeat}. +The signs are represented by these grobs: @internalsref{RepeatSlash} and +@internalsref{PercentRepeat} and @internalsref{DoublePercentRepeat}. @refbugs @@ -1746,8 +1796,8 @@ Piano music is an odd type of notation. Piano staffs are two normal staffs coupled with a brace. The staffs are largely independent, but sometimes voices can cross between the two staffs. The -@code{PianoStaff} is especially built to handle this cross-staffing -behavior. In this section we discuss the @code{PianoStaff} and some +@internalsref{PianoStaff} is especially built to handle this cross-staffing +behavior. In this section we discuss the @internalsref{PianoStaff} and some other pianistic peculiarities. @menu @@ -1771,7 +1821,7 @@ @end example This will switch the interpretation context of @var{musicexp} between a @var{contexttype} named @code{up} and @code{down}. Typically, you use -@code{Staff} for @var{contexttype}. The autochanger switches on basis +@internalsref{Staff} for @var{contexttype}. The autochanger switches on basis of pitch (central C is the turning point), and it looks ahead skipping over rests to switch rests in advance. @@ -1827,7 +1877,7 @@ @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp}. These identifiers are shorthands for spanner commands of the types -@code{Sustain}, @code{UnaCorda} and @code{Sostenuto}: +@internalsref{Sustain}, @internalsref{UnaCorda} and @internalsref{Sostenuto}: @lilypond[fragment,verbatim] c''4 \spanrequest \start "Sustain" c''4 @@ -1874,8 +1924,8 @@ > @end lilypond -This command creates @code{Voice.Arpeggio} grobs. Cross staff arpeggios -are @code{PianoStaff.Arpeggio}. +This command creates @internalsref{Arpeggio} grobs. Cross staff arpeggios +are @code{PianoStaff.Arpeggio}. @internalsref{Arpeggio} @refbugs @@ -1909,7 +1959,7 @@ > @end lilypond -The associated grob is @code{Voice.VoiceFollower}. +The associated grob is @internalsref{VoiceFollower}. @node Lyrics @@ -1958,7 +2008,7 @@ @subsection Printing lyrics @cindex lyrics -Lyrics are printed by interpreting them in the @code{Lyrics} context. +Lyrics are printed by interpreting them in the @internalsref{Lyrics} context. @c Maybe more pedagogical to avoid \addlyrics in this first example? /MB @@ -2263,10 +2313,8 @@ @cindex printing chord names @cindex chord names @cindex chords -@cindex @code{ChordNames} - -For displaying printed chord names, use the @code{ChordNames} context. +For displaying printed chord names, use the @internalsref{ChordNames} context. The chords may be entered either using the notation described above, or directly using simultaneous music. @@ -2383,7 +2431,7 @@ @cindex Rehearsal marks @cindex mark @cindex @code{\mark} -@cindex @code{Mark_engraver} + @example \mark @var{unsigned} @@ -2407,13 +2455,13 @@ } @end lilypond -The grob is @code{Score.RehearsalMark}. See +The grob is @internalsref{RehearsalMark} in @internalsref{Score} context. See @code{input/test/boxed-molecule.ly} if you need boxes around the marks. @node Bar numbers @subsection Bar numbers -Bar numbers (grob: @code{BarNumber}) are printed at the start of the +Bar numbers (grob: @internalsref{BarNumber}) are printed at the start of the line. See @code{input/test/boxed-molecule.ly} for boxed bar numbers. @refbugs @@ -2529,6 +2577,8 @@ @cindex whole rests for a full measure +The grob for this object is @internalsref{MultiMeasureRest}. + @refbugs Currently, there is no way to automatically condense multiple rests into @@ -2601,8 +2651,8 @@ behavior of part combining, refer to the automatically generated documentation of @reng{Thread_devnull_engraver} and @reng{Voice_devnull_engraver}. Look at the documentation of the -responsible engravers, @code{Thread_devnull_engraver}, -@code{Voice_devnull_engraver} and @code{A2_engraver}. +responsible engravers, @internalsref{Thread_devnull_engraver}, +@internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}. @refbugs @@ -2622,9 +2672,6 @@ > @end lilypond -@cindex @code{Thread_devnull_engraver} -@cindex @code{Voice_engraver} -@cindex @code{A2_engraver} @node Hara kiri staffs @subsection Hara kiri staffs @@ -2637,10 +2684,10 @@ not disappear when it contains normal rests, you must use multi measure rests. -The hara kiri staff is specialized version of the Staff context. It is -available as the context identifier @code{\HaraKiriStaffContext}. -Observe how the second staff in this example disappears in the second -line. +The hara kiri staff is specialized version of the @internalsref{Staff} +context. It is available as the context identifier +@code{\HaraKiriStaffContext}. Observe how the second staff in this +example disappears in the second line. @lilypond[verbatim] \score { @@ -2689,8 +2736,8 @@ such as via the @emph{editio vaticana} dating back to the beginning of the 20th century. -For typesetting custodes, just put a @code{Custos_engraver} into the -@code{StaffContext} when declaring the @code{\paper} block. In this +For typesetting custodes, just put a @internalsref{Custos_engraver} into the +@internalsref{Staff} context when declaring the @code{\paper} block. In this block, you can also globally control the appearance of the custos symbol by setting the custos @code{style} property. Currently supported styles are @code{vaticana}, @code{medicaea}, @code{hufnagel} and @@ -2782,7 +2829,7 @@ The definition of a grob is actually a list of default grob properties. For example, the definition of the Stem grob (available in @file{scm/grob-description.scm}), defines the following values for -@code{Stem} +@internalsref{Stem} @example (thickness . 0.8) @@ -2888,7 +2935,7 @@ @end example Here @code{predicate} is a Scheme function taking a grob argument, and returning a boolean. This statement is processed by the -@code{Output_property_engraver}. It instructs the engraver to feed all +@internalsref{Output_property_engraver}. It instructs the engraver to feed all grobs that it sees to @var{predicate}. Whenever the predicate returns true, the grob property @var{symbol} will be set to @var{value}. @@ -3035,8 +3082,8 @@ through the grob property @code{font-style}. For example, the style @code{finger} selects family @code{number} and relative size @code{-3}. Styles available include @code{volta}, @code{finger}, @code{tuplet}, -@code{timesig}, @code{mmrest}, @code{script}, @code{large}, @code{Large} -and @code{dynamic}. +@code{timesig}, @code{mmrest}, @code{script}, @code{large}, +@code{Large} and @code{dynamic}. The style sheets and tables for selecting fonts are located in @file{scm/font.scm}. Refer to this file for more information. @@ -4003,10 +4050,10 @@ the measure, etc.? @end itemize -Contexts are grouped hierarchically: A @code{Voice} context is -contained in a @code{Staff} context (because a staff can contain -multiple voices at any point), a @code{Staff} context is contained in -@code{Score}, @code{StaffGroup}, or @code{ChoirStaff} context. +Contexts are grouped hierarchically: A @internalsref{Voice} context is +contained in a @internalsref{Staff} context (because a staff can contain +multiple voices at any point), a @internalsref{Staff} context is contained in +@internalsref{Score}, @internalsref{StaffGroup}, or @internalsref{ChoirStaff} context. Contexts associated with sheet music output are called @emph{notation contexts}, those for sound output are called @emph{performance @@ -4093,6 +4140,10 @@ without @code{\context}. For every note, a separate staff is instantiated. +@cindex explicit context +@cindex starting with chords +@cindex chords, starting with + @lilypond[verbatim, singleline] \score { \notes } @end lilypond @@ -4122,8 +4173,8 @@ Properties that are set in one context are inherited by all of the contained contexts. This means that a property valid for the -@code{Voice} context can be set in the @code{Score} context (for -example) and thus take effect in all @code{Voice} contexts. +@internalsref{Voice} context can be set in the @internalsref{Score} context (for +example) and thus take effect in all @internalsref{Voice} contexts. Properties can be unset using the following expression: @example @@ -4235,25 +4286,20 @@ The argument of @code{\type} is the name for a special engraver that handles cooperation between simple engravers such as -@code{Note_head_engraver} and @code{Staff_symbol_engraver}. Alternatives +@internalsref{Note_head_engraver} and @internalsref{Staff_symbol_engraver}. Alternatives for this engraver are the following: @table @code -@cindex @code{Engraver_group_engraver} - @item @code{Engraver_group_engraver} + @item @internalsref{Engraver_group_engraver} The standard cooperation engraver. -@cindex @code{Score_engraver} + @item @internalsref{Score_engraver} - @item @code{Score_engraver} - This is cooperation module that should be in the top level context, + This is cooperation module that should be in the top level context, and only the top level context. -@cindex @code{Grace_engraver_group} - - @item @code{Grace_engraver_group} - This is a special cooperation module (resembling - @code{Score_engraver}) that is used to create an embedded - `miniscore'. + @item @internalsref{Grace_engraver_group} This is a special +cooperation module (resembling @internalsref{Score_engraver}) that is +used to create an embedded `miniscore'. @end table Other modifiers are @@ -4282,8 +4328,8 @@ @item @code{\name} @var{contextname} - This sets the type name of the context, e.g. @code{Staff}, - @code{Voice}. If the name is not specified, the translator won't do + This sets the type name of the context, e.g. @internalsref{Staff}, + @internalsref{Voice}. If the name is not specified, the translator won't do anything. @end itemize diff -urN ../lilypond-1.4.8/Documentation/windows/installing.texi ./Documentation/windows/installing.texi --- ../lilypond-1.4.8/Documentation/windows/installing.texi Tue Aug 14 18:46:08 2001 +++ ./Documentation/windows/installing.texi Wed Nov 14 22:45:33 2001 @@ -11,10 +11,10 @@ on a Microsoft Windows 95, 98, NT or 2000 machine. This release is a free extra service of the developers to assist windows -users. Please remember that we (the developers) rather dislike windows, -and none of us use it. Don't complain to us that installing LilyPond is -too difficult; rather, if you know something about your Windows, send us -code that works better (see @uref{compiling.html,compiling}). +users. When reporting problems, please keep in mind that we (the developers) +do not use Windows. In fact, if you know something about Windows, and +are able to write code, please send us code that works better (see +@uref{compiling.html,compiling}). @section Windows binary setup diff -urN ../lilypond-1.4.8/VERSION ./VERSION --- ../lilypond-1.4.8/VERSION Mon Sep 24 15:02:59 2001 +++ ./VERSION Tue Nov 20 19:22:50 2001 @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=4 -PATCH_LEVEL=8 +PATCH_LEVEL=9 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff -urN ../lilypond-1.4.8/aclocal.m4 ./aclocal.m4 --- ../lilypond-1.4.8/aclocal.m4 Mon Sep 24 13:35:24 2001 +++ ./aclocal.m4 Tue Oct 2 00:48:47 2001 @@ -1,3 +1,5 @@ +dnl WARNING WARNING WARNING WARNING +dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4 dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in diff -urN ../lilypond-1.4.8/debian/changelog ./debian/changelog --- ../lilypond-1.4.8/debian/changelog Sun Jun 3 14:56:56 2001 +++ ./debian/changelog Fri Oct 19 12:48:52 2001 @@ -1,3 +1,44 @@ +lilypond (1.4.8-1) unstable; urgency=high + + * New upstream release. (Closes: Bug#111132) + * Stopped using $(PWD) in make, as it doesn't seems to work on + potato systems with older "make". Reverted to `pwd`. + Thanks to Wolfgang Schnitker for notifying me this problem. + * Changed the lilypond1.3 dummy package's Architecture from "all" + to "arm i386 m68k powerpc sparc". Also, as upstream updated + config.sub and config.guess to recognize ia64 and hppa. + Thanks to Anthony Towns for the bug report. (Closes: Bug#114266) + * Versioned Build-Depends: flex (>= 2.5.4a-14) to ensure gcc-3.0 + compatibility. + + -- Anthony Fok Sun, 14 Oct 2001 18:28:45 +0800 + +lilypond (1.4.5-1) unstable; urgency=low + + * New upstream release. + * Upstream includes lexer-gcc-3.0.patch which should fix compilation + problems with g++-3.0. (Closes: Bug#105001) + * Hurray! texinfo-4.0b is finally in Debian! Thanks, Josip! :-) + Updated Build-Depends. + + -- Anthony Fok Wed, 25 Jul 2001 03:04:37 +0800 + +lilypond (1.4.3-1) unstable; urgency=high + + * New upstream release. + * Urgency high because Lilypond-1.2.17 is too buggy and yet it has + been stuck in testing forever. Lilypond-1.4.x fixes multiple + serious bugs. :-) + * Ah, silly me, lilypond was conflicting against itself! I forgot + to remove this relics during the switch from lilypond1.3 to lilypond. + * Fixed a new bug in lily/main.cc which caused lilypond to skip over every + other command-line argument. + * [configure.in]: Added -mieee to CFLAGS and CXXFLAGS when building on + Alpha to prevent FP exception. Thanks to Christopher C. Chimelis + for the fix! + + -- Anthony Fok Fri, 15 Jun 2001 00:42:46 -0600 + lilypond (1.4.2-1) unstable; urgency=low * New upstream release. diff -urN ../lilypond-1.4.8/debian/control ./debian/control --- ../lilypond-1.4.8/debian/control Sun Jun 3 14:56:56 2001 +++ ./debian/control Fri Oct 19 12:48:52 2001 @@ -1,10 +1,10 @@ Source: lilypond -Build-Depends: debhelper (>= 3.0.5), python-base (>= 1.5.2-4), libguile-dev (>= 1:1.4-9), tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), groff, m4, gettext (>= 0.10.36-1) +Build-Depends: debhelper (>= 3.0.5), python-base (>= 1.5.2-4), libguile-dev (>= 1:1.4-9), tetex-bin, libkpathsea-dev, tetex-extra, flex (>= 2.5.4a-14), bison, texinfo (>= 4.0b-2), groff, m4, gettext (>= 0.10.36-1) Build-Depends-Indep: bibtex2html, gs | gs-aladdin, netpbm (>= 2:9.10-1) Section: tex Priority: optional Maintainer: Anthony Fok -Standards-Version: 3.5.4 +Standards-Version: 3.5.5 Package: lilypond Architecture: any @@ -12,7 +12,7 @@ Provides: lilypond1.3 Depends: ${shlibs:Depends}, tetex-bin (>= 1.0.5-1), python-base (>= 1.5.2-4), guile Recommends: lilypond-doc, tetex-extra (>= 1.0-1) -Conflicts: lilypond, lilypond1.3 (<= 1.3.132-1), musixtex-fonts +Conflicts: lilypond1.3 (<= 1.3.132-1), musixtex-fonts Description: A program for printing sheet music. LilyPond is a music typesetter. It produces beautiful sheet music using a high level description file as input. LilyPond is part of @@ -28,15 +28,14 @@ Package: lilypond-doc Section: doc Architecture: all -Suggests: lilypond (>= 1.4.1-1) -Suggests: postscript-viewer, www-browser +Suggests: lilypond (>= 1.4.8-1), postscript-viewer, www-browser Description: LilyPond Documentation in HTML, PS and DVI formats This package contains the HTML, PostScript and DVI documentation for the LilyPond music typestting software. Package: lilypond1.3 -Architecture: all -Depends: lilypond (>= 1.3.150-1) +Architecture: arm i386 m68k powerpc sparc +Depends: lilypond (>= 1.4.8-1) Description: Dummy package for transition to new stable lilypond. This dummy package provides a transition from the previous lilypond1.3 package back to a newer lilypond because the stable 1.4 series has arrived. diff -urN ../lilypond-1.4.8/debian/control.foka ./debian/control.foka --- ../lilypond-1.4.8/debian/control.foka Sun Jun 3 14:56:56 2001 +++ ./debian/control.foka Fri Oct 19 12:48:52 2001 @@ -1,10 +1,10 @@ Source: lilypond -Build-Depends: debhelper (>= 3.0.5), python-base (>= 1.5.2-4), libguile-dev (>= 1:1.4-9), tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), groff, m4, gettext (>= 0.10.36-1) +Build-Depends: debhelper (>= 3.0.5), python-base (>= 1.5.2-4), libguile-dev (>= 1:1.4-9), tetex-bin, libkpathsea-dev, tetex-extra, flex (>= 2.5.4a-14), bison, texinfo (>= 4.0b-2), groff, m4, gettext (>= 0.10.36-1) Build-Depends-Indep: bibtex2html, gs | gs-aladdin, netpbm (>= 2:9.10-1) Section: tex Priority: optional Maintainer: Anthony Fok -Standards-Version: 3.5.4 +Standards-Version: 3.5.5 Package: lilypond Architecture: any @@ -12,7 +12,7 @@ Provides: lilypond1.3 Depends: ${shlibs:Depends}, tetex-bin (>= 1.0.5-1), python-base (>= 1.5.2-4), guile Recommends: lilypond-doc, tetex-extra (>= 1.0-1) -Conflicts: lilypond, lilypond1.3 (<= 1.3.132-1), musixtex-fonts +Conflicts: lilypond1.3 (<= 1.3.132-1), musixtex-fonts Description: A program for printing sheet music. LilyPond is a music typesetter. It produces beautiful sheet music using a high level description file as input. LilyPond is part of @@ -28,15 +28,14 @@ Package: lilypond-doc Section: doc Architecture: all -Suggests: lilypond (>= 1.4.1-1) -Suggests: postscript-viewer, www-browser -Description: LilyPond Documentation in HTML and PS formats - This package contains the HTML and PostScript documentation for the +Suggests: lilypond (>= 1.4.8-1), postscript-viewer, www-browser +Description: LilyPond Documentation in HTML, PS and DVI formats + This package contains the HTML, PostScript and DVI documentation for the LilyPond music typestting software. Package: lilypond1.3 -Architecture: all -Depends: lilypond (>= 1.3.150-1) +Architecture: arm i386 m68k powerpc sparc +Depends: lilypond (>= 1.4.8-1) Description: Dummy package for transition to new stable lilypond. This dummy package provides a transition from the previous lilypond1.3 package back to a newer lilypond because the stable 1.4 series has arrived. diff -urN ../lilypond-1.4.8/debian/control.potato ./debian/control.potato --- ../lilypond-1.4.8/debian/control.potato Sun Jun 3 14:56:56 2001 +++ ./debian/control.potato Fri Oct 19 12:48:52 2001 @@ -12,7 +12,7 @@ Provides: lilypond1.3 Depends: ${shlibs:Depends}, tetex-bin (>= 1.0.5-1), python-base (>= 1.5.2-4), guile Recommends: lilypond-doc, tetex-extra (>= 1.0-1) -Conflicts: lilypond, lilypond1.3 (<= 1.3.132-1), musixtex-fonts +Conflicts: lilypond1.3 (<= 1.3.132-1), musixtex-fonts Description: A program for printing sheet music. LilyPond is a music typesetter. It produces beautiful sheet music using a high level description file as input. LilyPond is part of @@ -28,18 +28,7 @@ Package: lilypond-doc Section: doc Architecture: all -Suggests: lilypond (>= 1.4.1-1) -Suggests: postscript-viewer, www-browser +Suggests: lilypond (>= 1.4.8-1), postscript-viewer, www-browser Description: LilyPond Documentation in HTML, PS and DVI formats This package contains the HTML, PostScript and DVI documentation for the LilyPond music typestting software. - -Package: lilypond1.3 -Architecture: all -Depends: lilypond (>= 1.3.150-1) -Description: Dummy package for transition to new stable lilypond. - This dummy package provides a transition from the previous lilypond1.3 - package back to a newer lilypond because the stable 1.4 series has arrived. - . - Please feel free to remove this dummy package after you have upgraded - to the latest lilypond. diff -urN ../lilypond-1.4.8/debian/lilypond1.3.copyright ./debian/lilypond1.3.copyright --- ../lilypond-1.4.8/debian/lilypond1.3.copyright Sun Jun 3 14:56:56 2001 +++ ./debian/lilypond1.3.copyright Fri Oct 19 12:48:52 2001 @@ -19,24 +19,3 @@ the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -This is a dummy package to aid the transition from the old -"lilypond1.3" package to the newer "lilypond" package. -It was created by Anthony Fok -Mon, 16 Apr 2001 22:17:10 -0600 - -Copyright: - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA diff -urN ../lilypond-1.4.8/debian/rules ./debian/rules --- ../lilypond-1.4.8/debian/rules Sun Jun 3 14:56:56 2001 +++ ./debian/rules Fri Oct 19 12:48:52 2001 @@ -64,7 +64,6 @@ # Still not clean enough? Let's use... BRUTE STRENGTH! :-) find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf - rm -f debian/doc-base debian/TODO dh_clean diff -urN ../lilypond-1.4.8/input/emacs-lily.fly ./input/emacs-lily.fly --- ../lilypond-1.4.8/input/emacs-lily.fly Sun Mar 4 02:16:55 2001 +++ ./input/emacs-lily.fly Thu Jan 1 01:00:00 1970 @@ -1,2 +0,0 @@ -\ -cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly diff -urN ../lilypond-1.4.8/input/regression/lyric_align.ly ./input/regression/lyric_align.ly --- ../lilypond-1.4.8/input/regression/lyric_align.ly Thu Jan 1 01:00:00 1970 +++ ./input/regression/lyric_align.ly Sun Nov 18 17:51:04 2001 @@ -0,0 +1,73 @@ +\version "1.3.146" +\header{ + texidoc="Lyric alignment + + Lyric alignment is adjustable both interms of alignment between stanzas and on notehead. + + If the property alignment is not set, there is automatic determination of alignment type based on punctuation. (ee lyric-phrasing.ly) + +" +} + +%\paper { linewidth = -1. } +\score { + \addlyrics + \context Voice = "v" \notes \relative c'' { + \property Staff.automaticMelismata = ##t + \cadenzaOn + a\breve \bar "||" a1 \bar "|" a \bar "|" a \bar "||" \break a \bar "|" a \bar "|" a \bar "|" a \bar "||" \break a \bar "|" a \bar "|." + } + \context Lyrics < + \context LyricsVoice = "v-1" \lyrics { +% \property LyricsVoice . stanza = "1:" + \property Lyrics . LyricText \override #'ignore-length-mismatch = ##t + \property Lyrics . LyricText \override #'alignment = #-1 + \property Lyrics . LyricText \override #'begin-alignment = #8 + + "Particularly useful for reciting notes " + left + + \property Lyrics . LyricText \override #'alignment = #0 + + centered + + \property Lyrics . LyricText \override #'alignment = #1 + + right + + \property Lyrics . LyricText \override #'alignment = #-1 + \property Lyrics . LyricText \override #'begin-alignment = #2 + + left_half_way + + \property Lyrics . LyricText \override #'begin-alignment = #4 + + left_one_quarter + + \property Lyrics . LyricText \override #'begin-alignment = #10 + + left_one_tenth + + \property Lyrics . LyricText \override #'begin-alignment = #1 + + left_one_whole + + \property Lyrics . LyricText \override #'ignore-length-mismatch = ##f + \property Lyrics . LyricText \override #'begin-alignment = #4 + + Very_short_lyrics_remain_in_touch_with_their_note + + \property Lyrics . LyricText \override #'alignment = #1 + \property Lyrics . LyricText \override #'end-alignment = #1.1 + \property Lyrics . LyricText \override #'ignore-length-mismatch = ##t + + + Unless_ignore-length-mismatch_is_true + + } + \context LyricsVoice = "v-2" \lyrics { +% \property LyricsVoice . stanza = "2:" + " with many syllables under them." l c r l l l x x x note' true' + } + > +} diff -urN ../lilypond-1.4.8/input/test/beam-pos.ly ./input/test/beam-pos.ly --- ../lilypond-1.4.8/input/test/beam-pos.ly Thu Apr 5 00:02:39 2001 +++ ./input/test/beam-pos.ly Tue Nov 20 11:25:40 2001 @@ -5,6 +5,7 @@ composer = "jcn" enteredby = "jcn" copyright = "PD" +title = "Beam quantization" TestedFeatures = "beam quant positions" } diff -urN ../lilypond-1.4.8/input/test/beams.ly ./input/test/beams.ly --- ../lilypond-1.4.8/input/test/beams.ly Thu Apr 5 00:02:39 2001 +++ ./input/test/beams.ly Mon Nov 19 16:45:57 2001 @@ -12,7 +12,8 @@ \score{ < % \property Score.beamQuantisation = #'none - \context GrandStaff < + \context GrandStaff < + \context Staff = SA \notes\transpose c' { \time 8/4 @@ -39,6 +40,7 @@ } > < + \context Staff = SB \notes { \transpose c' { \time 8/4 diff -urN ../lilypond-1.4.8/lily/break-align-item.cc ./lily/break-align-item.cc --- ../lilypond-1.4.8/lily/break-align-item.cc Thu May 10 15:34:17 2001 +++ ./lily/break-align-item.cc Tue Oct 2 00:48:47 2001 @@ -122,9 +122,9 @@ next_origin = ly_symbol2scm ("begin-of-note"); SCM alist = me->get_grob_property ("space-alist"); - SCM e = scm_assoc (scm_listify (current_origin, - next_origin, - SCM_UNDEFINED), alist); + SCM e = scm_assoc (scm_list_n (current_origin, + next_origin, + SCM_UNDEFINED), alist); SCM extra_space; if (e != SCM_BOOL_F) @@ -136,7 +136,7 @@ warning (_f ("unknown spacing pair `%s', `%s'", ly_symbol2string (current_origin), ly_symbol2string (next_origin))); - extra_space = scm_listify (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED); + extra_space = scm_list_n (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED); } SCM symbol = gh_car (extra_space); diff -urN ../lilypond-1.4.8/lily/cxx-function-smob.cc ./lily/cxx-function-smob.cc --- ../lilypond-1.4.8/lily/cxx-function-smob.cc Mon Sep 24 13:52:33 2001 +++ ./lily/cxx-function-smob.cc Tue Oct 2 00:48:47 2001 @@ -25,8 +25,8 @@ return 1; } -static -scm_sizet free_smob (SCM) +static size_t +free_smob (SCM) { return 0; } diff -urN ../lilypond-1.4.8/lily/grob.cc ./lily/grob.cc --- ../lilypond-1.4.8/lily/grob.cc Mon Sep 24 13:52:33 2001 +++ ./lily/grob.cc Tue Oct 2 00:48:47 2001 @@ -49,7 +49,7 @@ */ pscore_l_=0; - status_i_ = 0; + status_c_ = 0; original_l_ = 0; immutable_property_alist_ = basicprops; mutable_property_alist_ = SCM_EOL; @@ -97,7 +97,7 @@ immutable_property_alist_ = s.immutable_property_alist_; mutable_property_alist_ = SCM_EOL; - status_i_ = s.status_i_; + status_c_ = s.status_c_; pscore_l_ = s.pscore_l_; smobify_self (); @@ -222,18 +222,16 @@ void Grob::calculate_dependencies (int final, int busy, SCM funcname) { - assert (status_i_ >=0); - - if (status_i_ >= final) + if (status_c_ >= final) return; - if (status_i_== busy) + if (status_c_== busy) { programming_error ("Element is busy, come back later"); return; } - status_i_= busy; + status_c_= busy; for (SCM d= get_grob_property ("dependencies"); gh_pair_p (d); d = gh_cdr (d)) { @@ -247,7 +245,7 @@ if (gh_procedure_p (proc)) gh_call1 (proc, this->self_scm ()); - status_i_= final; + status_c_= final; } diff -urN ../lilypond-1.4.8/lily/include/grob.hh ./lily/include/grob.hh --- ../lilypond-1.4.8/lily/include/grob.hh Sun Jun 10 00:17:07 2001 +++ ./lily/include/grob.hh Tue Oct 2 00:48:47 2001 @@ -46,7 +46,7 @@ 0 means ORPHAN, */ - char status_i_; + char status_c_; String name () const; /* @@ -89,7 +89,7 @@ /** Recursively track all dependencies of this Grob. The - status_i_ field is used as a mark-field. It is marked with + status_c_ field is used as a mark-field. It is marked with #busy# during execution of this function, and marked with #final# when finished. diff -urN ../lilypond-1.4.8/lily/include/ly-smobs.icc ./lily/include/ly-smobs.icc --- ../lilypond-1.4.8/lily/include/ly-smobs.icc Mon Sep 24 13:53:34 2001 +++ ./lily/include/ly-smobs.icc Tue Oct 2 00:48:47 2001 @@ -50,15 +50,17 @@ void \ CL::init_smobs () \ { \ - smob_tag_ = scm_make_smob_type_mfpe ( \ - #CL, 0, CL::mark_smob, CL::free_smob, CL::print_smob, \ - CL::equal_p); \ + smob_tag_ = scm_make_smob_type (#CL, 0); \ + scm_set_smob_mark (smob_tag_, CL::mark_smob); \ + scm_set_smob_free (smob_tag_, CL::free_smob); \ + scm_set_smob_print (smob_tag_, CL::print_smob); \ + scm_set_smob_equalp (smob_tag_, CL::equal_p); \ } \ SCM CL::smobbed_self () const \ { \ SCM s; \ s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (this)); \ - scm_done_malloc (sizeof (CL)); \ + scm_done_malloc (sizeof (CL)); \ \ return s; \ } \ @@ -70,7 +72,7 @@ else \ return 0; \ } \ -scm_sizet \ +size_t \ CL::free_smob (SCM ses) \ { \ CL * s = (CL*) SCM_CDR (ses); \ diff -urN ../lilypond-1.4.8/lily/include/scm-hash.hh ./lily/include/scm-hash.hh --- ../lilypond-1.4.8/lily/include/scm-hash.hh Mon Apr 16 23:17:45 2001 +++ ./lily/include/scm-hash.hh Tue Oct 2 00:48:47 2001 @@ -45,7 +45,7 @@ 2. UPON DESTRUCTION, DO - scm_unprotect_object (tab->self_scm_); + scm_gc_unprotect_object (tab->self_scm_); diff -urN ../lilypond-1.4.8/lily/input-smob.cc ./lily/input-smob.cc --- ../lilypond-1.4.8/lily/input-smob.cc Mon Sep 24 13:52:33 2001 +++ ./lily/input-smob.cc Tue Oct 2 00:48:47 2001 @@ -28,8 +28,8 @@ return 1; } -static -scm_sizet free_smob (SCM s) +static size_t +free_smob (SCM s) { delete unsmob_input (s); return 0; @@ -44,12 +44,14 @@ static void start_input_smobs () { - input_tag - = scm_make_smob_type_mfpe ("input", 0, - mark_smob, free_smob, - print_smob, 0); - scm_c_define_gsubr ("ly-input-location?", 1, 0, 0, (Scheme_function_unknown)ly_input_p); - + input_tag = scm_make_smob_type ("input", 0); + scm_set_smob_mark (input_tag, mark_smob); + scm_set_smob_free (input_tag, free_smob); + scm_set_smob_print (input_tag, print_smob); + scm_set_smob_equalp (input_tag, 0); + + scm_c_define_gsubr ("ly-input-location?", 1, 0, 0, + (Scheme_function_unknown)ly_input_p); } SCM @@ -70,7 +72,7 @@ { if (SCM_IMP (s)) return 0; - if ((long)SCM_CAR (s) == input_tag) // ugh. + if (SCM_CAR (s) == (SCM)input_tag) // ugh. return (Input*) SCM_CDR (s); else return 0; diff -urN ../lilypond-1.4.8/lily/item.cc ./lily/item.cc --- ../lilypond-1.4.8/lily/item.cc Sun Jun 10 00:17:07 2001 +++ ./lily/item.cc Tue Oct 2 00:48:47 2001 @@ -160,7 +160,7 @@ SCM vis = get_grob_property ("visibility-lambda"); if (gh_procedure_p (vis)) { - SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED); + SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED); SCM result = gh_apply (vis, args); bool trans = gh_scm2bool (gh_car (result)); bool empty = gh_scm2bool (gh_cdr (result)); diff -urN ../lilypond-1.4.8/lily/key-performer.cc ./lily/key-performer.cc --- ../lilypond-1.4.8/lily/key-performer.cc Sun Mar 11 19:10:33 2001 +++ ./lily/key-performer.cc Tue Oct 2 00:48:47 2001 @@ -47,9 +47,9 @@ if (key_req_l_) { SCM pitchlist = key_req_l_->get_mus_property ("pitch-alist"); - SCM proc = scm_eval2 (ly_symbol2scm ("accidentals-in-key"), SCM_EOL); + SCM proc = scm_primitive_eval (ly_symbol2scm ("accidentals-in-key")); SCM acc = gh_call1 (proc, pitchlist); - proc = scm_eval2 (ly_symbol2scm ("major-key"), SCM_EOL); + proc = scm_primitive_eval (ly_symbol2scm ("major-key")); SCM major = gh_call1 (proc, pitchlist); audio_p_ = new Audio_key (gh_scm2int (acc), major == SCM_BOOL_T); Audio_element_info info (audio_p_, key_req_l_); diff -urN ../lilypond-1.4.8/lily/lily-guile.cc ./lily/lily-guile.cc --- ../lilypond-1.4.8/lily/lily-guile.cc Mon Sep 24 13:52:33 2001 +++ ./lily/lily-guile.cc Tue Nov 13 23:40:43 2001 @@ -45,7 +45,7 @@ SCM_OPN | SCM_WRTNG, "ly_write2string"); // SCM write = scm_eval_3 (ly_symbol2scm ("write"), s, SCM_EOL); - SCM write = scm_eval2 (ly_symbol2scm ("write"), SCM_EOL); + SCM write = scm_primitive_eval (ly_symbol2scm ("write")); // scm_apply (write, port, SCM_EOL); gh_call2 (write, s, port); @@ -74,8 +74,8 @@ /* Read expression from port */ if (!SCM_EOF_OBJECT_P (form = scm_read (port))) - answer = scm_eval_3 (form, 1, SCM_EOL); // guh? - + answer = scm_primitive_eval (form); + /* After parsing @@ -126,7 +126,7 @@ ly_symbol2string (SCM s) { assert (gh_symbol_p (s)); - return String ((Byte*)SCM_CHARS (s), (int) SCM_LENGTH (s)); + return String ((Byte*)SCM_STRING_CHARS (s), (int) SCM_STRING_LENGTH (s)); } @@ -396,7 +396,7 @@ char str[400]; // ugh. - if (scm_integer_p (s) == SCM_BOOL_F) + if (scm_exact_p (s) == SCM_BOOL_F) { Real r (gh_scm2double (s)); diff -urN ../lilypond-1.4.8/lily/lookup.cc ./lily/lookup.cc --- ../lilypond-1.4.8/lily/lookup.cc Sat Mar 24 01:28:01 2001 +++ ./lily/lookup.cc Sun Nov 18 01:08:52 2001 @@ -125,11 +125,14 @@ { Real alpha = (curve.control_[3] - curve.control_[0]).arg (); Bezier back = curve; - + Offset perp = curvethick * complex_exp (Offset (0, alpha + M_PI/2)) * 0.5; back.reverse (); - back.control_[1] += curvethick * complex_exp (Offset (0, alpha + M_PI/2)); - back.control_[2] += curvethick * complex_exp (Offset (0, alpha + M_PI/2)); + back.control_[1] += perp; + back.control_[2] += perp; + curve.control_[1] -= perp; + curve.control_[2] -= perp; + SCM scontrols[8]; for (int i=4; i--;) @@ -152,8 +155,12 @@ ly_quote_scm (list), gh_double2scm (linethick), SCM_UNDEFINED)); + Box b(curve.extent (X_AXIS), + curve.extent (Y_AXIS)); + + b[X_AXIS].unite (back.extent (X_AXIS)); + b[Y_AXIS].unite (back.extent (Y_AXIS)); - Box b (curve.extent (X_AXIS), curve.extent (Y_AXIS)); return Molecule (b, at); } diff -urN ../lilypond-1.4.8/lily/midi-item.cc ./lily/midi-item.cc --- ../lilypond-1.4.8/lily/midi-item.cc Thu Apr 12 12:44:59 2001 +++ ./lily/midi-item.cc Tue Oct 2 00:48:47 2001 @@ -130,7 +130,7 @@ { Byte program_byte = 0; bool found = false; - SCM proc = scm_eval2 (ly_symbol2scm ("midi-program"), SCM_EOL); + SCM proc = scm_primitive_eval (ly_symbol2scm ("midi-program")); SCM program = gh_call1 (proc, ly_symbol2scm (audio_l_->str_.ch_C())); found = (program != SCM_BOOL_F); if (found) diff -urN ../lilypond-1.4.8/lily/music-list.cc ./lily/music-list.cc --- ../lilypond-1.4.8/lily/music-list.cc Sun Mar 11 19:10:34 2001 +++ ./lily/music-list.cc Tue Oct 2 00:48:47 2001 @@ -1,8 +1,6 @@ /* music-list.cc -- implement Music_sequence, Simultaneous_music, Sequential_music - source file of the GNU LilyPond music typesetter - (c) 1997--2001 Han-Wen Nienhuys */ diff -urN ../lilypond-1.4.8/lily/musical-request.cc ./lily/musical-request.cc --- ../lilypond-1.4.8/lily/musical-request.cc Tue Aug 14 13:45:04 2001 +++ ./lily/musical-request.cc Sun Nov 18 01:08:53 2001 @@ -52,8 +52,13 @@ Moment Rhythmic_req::length_mom () const { - return unsmob_duration (get_mus_property ("duration"))->length_mom (); - + Duration *d = unsmob_duration (get_mus_property ("duration")); + if (!d){ + Moment m ; + programming_error("Rhythmic_req has no duration"); + return m; + } + return d->length_mom (); } void diff -urN ../lilypond-1.4.8/lily/my-lily-parser.cc ./lily/my-lily-parser.cc --- ../lilypond-1.4.8/lily/my-lily-parser.cc Sun Sep 16 21:17:12 2001 +++ ./lily/my-lily-parser.cc Sun Nov 18 01:08:53 2001 @@ -83,11 +83,6 @@ exit_status_global = 1; } -void -My_lily_parser::set_last_duration (Duration const *d) -{ - default_duration_ = *d; -} Input diff -urN ../lilypond-1.4.8/lily/note-head.cc ./lily/note-head.cc --- ../lilypond-1.4.8/lily/note-head.cc Sat Jun 9 14:33:18 2001 +++ ./lily/note-head.cc Tue Oct 2 00:48:47 2001 @@ -99,11 +99,10 @@ UGH: use grob-property. */ Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") + - ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm ("find-notehead-symbol"), + ly_scm2string (scm_primitive_eval (gh_list (ly_symbol2scm ("find-notehead-symbol"), me->get_grob_property ("duration-log"), ly_quote_scm (style), - SCM_UNDEFINED), - SCM_EOL))); + SCM_UNDEFINED)))); if (streepjes_i) { diff -urN ../lilypond-1.4.8/lily/paper-outputter.cc ./lily/paper-outputter.cc --- ../lilypond-1.4.8/lily/paper-outputter.cc Thu May 3 17:04:50 2001 +++ ./lily/paper-outputter.cc Tue Nov 13 23:40:44 2001 @@ -77,8 +77,8 @@ SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C ()), ly_quote_scm (ly_symbol2scm ("all-definitions")), SCM_UNDEFINED); - exp = scm_eval2 (exp, SCM_EOL); - scm_eval2 (exp, SCM_EOL); + exp = scm_primitive_eval (exp); + scm_primitive_eval (exp); String creator = gnu_lilypond_version_str (); @@ -139,7 +139,7 @@ } else { - SCM result = scm_eval2 (s, SCM_EOL); + SCM result = scm_primitive_eval (s); char *c=gh_scm2newstr (result, NULL); *stream_p_ << c; @@ -162,7 +162,8 @@ { output_String_def (prefix + s, ly_scm2string (v)); } - else if (scm_integer_p (v) == SCM_BOOL_T) + else if (scm_exact_p (v) == SCM_BOOL_T + && scm_integer_p (v) == SCM_BOOL_T) { output_int_def (prefix + s, gh_scm2int (v)); } diff -urN ../lilypond-1.4.8/lily/parser.yy ./lily/parser.yy --- ../lilypond-1.4.8/lily/parser.yy Mon Sep 24 13:46:23 2001 +++ ./lily/parser.yy Sun Nov 18 01:08:53 2001 @@ -713,7 +713,7 @@ r-> set_mus_property ("alternatives", alts->self_scm ()); scm_gc_unprotect_object (alts->self_scm ()); } - SCM func = scm_eval2 (ly_symbol2scm ("repeat-name-to-ctor"), SCM_EOL); + SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor")); SCM result = gh_call1 (func, $2); set_music_properties (r, result); @@ -1090,7 +1090,7 @@ sp-> set_mus_property ("context-type", ly_str02scm ( "Score")); } | CLEF STRING { - SCM func = scm_eval2 (ly_symbol2scm ("clef-name-to-properties"), SCM_EOL); + SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties")); SCM result = gh_call1 (func, $2); SCM l = SCM_EOL; @@ -1567,9 +1567,11 @@ } | multiplied_duration { $$ = $1; + THIS->default_duration_ = *unsmob_duration ($$); } | explicit_duration { $$ = $1; + THIS->default_duration_ = *unsmob_duration ($$); } ; @@ -1582,15 +1584,11 @@ l = intlog2 ($1); $$ = Duration (l, $2).smobbed_copy (); - - THIS->set_last_duration (unsmob_duration ($$)); } | DURATION_IDENTIFIER dots { Duration *d =unsmob_duration ($1); Duration k (d->duration_log (),d->dot_count () + $2); $$ = k.smobbed_copy (); - - THIS->set_last_duration (unsmob_duration ($$)); } ; @@ -1926,7 +1924,7 @@ $$ = $1; } | string '+' string { - $$ = scm_string_append (scm_listify ($1, $3, SCM_UNDEFINED)); + $$ = scm_string_append (scm_list_n ($1, $3, SCM_UNDEFINED)); } ; diff -urN ../lilypond-1.4.8/lily/part-combine-music-iterator.cc ./lily/part-combine-music-iterator.cc --- ../lilypond-1.4.8/lily/part-combine-music-iterator.cc Sun Mar 11 19:10:34 2001 +++ ./lily/part-combine-music-iterator.cc Tue Oct 2 00:48:47 2001 @@ -202,11 +202,10 @@ if (first_pitches != SCM_EOL && second_pitches != SCM_EOL) { scm_sort_list_x (first_pitches, - scm_eval2 (ly_str02scm ("Pitch::less_p"), - SCM_EOL)); + scm_primitive_eval (ly_str02scm ("Pitch::less_p"))); scm_sort_list_x (second_pitches, - scm_eval2 (ly_str02scm ("Pitch::less_p"), - SCM_EOL)); + scm_primitive_eval (ly_str02scm ("Pitch::less_p"))); + interval = gh_int2scm (unsmob_pitch (gh_car (first_pitches))->steps () - unsmob_pitch (gh_car (scm_last_pair (second_pitches)))->steps ()); } @@ -214,16 +213,14 @@ if (first_durations != SCM_EOL) { scm_sort_list_x (first_durations, - scm_eval2 (ly_str02scm ("Duration::less_p"), - SCM_EOL)); + scm_primitive_eval (ly_str02scm ("Duration::less_p"))); first_mom += unsmob_duration (gh_car (first_durations))->length_mom (); } if (second_durations != SCM_EOL) { scm_sort_list_x (second_durations, - scm_eval2 (ly_str02scm ("Duration::less_p"), - SCM_EOL)); + scm_primitive_eval (ly_str02scm ("Duration::less_p"))); second_mom += unsmob_duration (gh_car (second_durations))->length_mom (); } diff -urN ../lilypond-1.4.8/lily/property-engraver.cc ./lily/property-engraver.cc --- ../lilypond-1.4.8/lily/property-engraver.cc Mon Sep 24 13:46:23 2001 +++ ./lily/property-engraver.cc Tue Oct 2 00:48:47 2001 @@ -111,7 +111,7 @@ if (val == SCM_EOL) ; // Not defined in context. - else if (gh_apply (type_p, scm_listify (val, SCM_UNDEFINED)) + else if (gh_apply (type_p, scm_list_n (val, SCM_UNDEFINED)) == SCM_BOOL_T) // defined and right type: do it { e->set_grob_property (elt_prop_sym, val); @@ -140,7 +140,7 @@ if (val != SCM_EOL) { // not the right type: error message. SCM errport = scm_current_error_port (); - SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL); + SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name")); SCM type_name = gh_call1 (typefunc, type_p); warning (_f ("Wrong type for property: %s, type: %s, value found: %s, type: %s", ly_symbol2string (prop_sym).ch_C (), diff -urN ../lilypond-1.4.8/lily/slur.cc ./lily/slur.cc --- ../lilypond-1.4.8/lily/slur.cc Tue May 15 16:13:29 2001 +++ ./lily/slur.cc Tue Oct 2 00:48:47 2001 @@ -336,7 +336,7 @@ int stemdir = stem ? Stem::get_direction (stem) : 1; int slurdir = gh_scm2int (me->get_grob_property ("direction")); SCM l = scm_assoc - (scm_listify (a, + (scm_list_n (a, gh_int2scm (stemdir * dir), gh_int2scm (slurdir * dir), SCM_UNDEFINED), alist); diff -urN ../lilypond-1.4.8/lily/spanner.cc ./lily/spanner.cc --- ../lilypond-1.4.8/lily/spanner.cc Thu Mar 22 01:19:49 2001 +++ ./lily/spanner.cc Tue Oct 2 00:48:47 2001 @@ -287,7 +287,7 @@ { /* We'd be fucked if this is called before spanned_drul_[] is inited. */ - if (status_i_ == ORPHAN) + if (status_c_ == ORPHAN) return SCM_EOL; Direction d = LEFT; diff -urN ../lilypond-1.4.8/lily/staff-performer.cc ./lily/staff-performer.cc --- ../lilypond-1.4.8/lily/staff-performer.cc Mon Mar 26 11:56:07 2001 +++ ./lily/staff-performer.cc Tue Oct 2 00:48:47 2001 @@ -91,7 +91,7 @@ void Staff_performer::stop_translation_timestep () { - SCM proc = scm_eval2 (ly_symbol2scm ("percussion-p"), SCM_EOL); + SCM proc = scm_primitive_eval (ly_symbol2scm ("percussion-p")); SCM drums_p = gh_call1 (proc, ly_symbol2scm (instrument_str_.ch_C())); audio_staff_p_->channel_i_ = (drums_p == SCM_BOOL_T ? 9 : -1 ); if (name_p_) diff -urN ../lilypond-1.4.8/lily/stem.cc ./lily/stem.cc --- ../lilypond-1.4.8/lily/stem.cc Thu Jun 28 12:48:57 2001 +++ ./lily/stem.cc Tue Oct 2 00:48:47 2001 @@ -450,7 +450,7 @@ Item* item = dynamic_cast (me); Item * col = item->column_l (); SCM dirlist =col->get_grob_property ("dir-list"); - if (scm_sloppy_memq (scmdir, dirlist) == SCM_BOOL_F) + if (scm_c_memq (scmdir, dirlist) == SCM_BOOL_F) { dirlist = gh_cons (scmdir, dirlist); col->set_grob_property ("dir-list", dirlist); diff -urN ../lilypond-1.4.8/lily/syllable-group.cc ./lily/syllable-group.cc --- ../lilypond-1.4.8/lily/syllable-group.cc Tue Mar 27 23:11:02 2001 +++ ./lily/syllable-group.cc Sun Nov 18 17:51:04 2001 @@ -104,7 +104,7 @@ Grob * lyric; alignment_i_ = appropriate_alignment (punc); - + // If there was no notehead in the matching voice context, use the first // notehead caught from any voice context (any port in a storm). if (!notehead_l_) { @@ -131,7 +131,7 @@ /** determine the distance to translate lyrics to get correct alignment Rules: If alignment is centre, translate = 0 Otherwise, - If (length of longest lyric) < 2 * (length of shortest lyric), + If (length of longest lyric) < (property {begin,end}-alignment) * (length of shortest lyric), - centre longest lyric on notehead Otherwise - move so shortest lyric just reaches notehead centre @@ -141,11 +141,20 @@ { Real translate = 0.0; if (alignment_i_ != CENTER) { - // FIXME: do we really know the lyric extent here? Some font sizing comes later? - Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / 2; - Real l2 = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length (); - - translate = l1 extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("begin-alignment")); + break; + case RIGHT: + translate = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("end-alignment")); + break; + } + if (!gh_scm2bool(longest_lyric_l_->get_grob_property("ignore-length-mismatch"))) { + Real l = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length (); + translate = l longest_lyric_l_->get_grob_property ("alignment"); + if (s!=SCM_EOL) { + return gh_scm2int (s); + } + if (first_in_phrase_b_) return LEFT; diff -urN ../lilypond-1.4.8/lily/text-engraver.cc ./lily/text-engraver.cc --- ../lilypond-1.4.8/lily/text-engraver.cc Sun Mar 11 19:10:34 2001 +++ ./lily/text-engraver.cc Wed Nov 14 22:24:20 2001 @@ -145,7 +145,8 @@ for (int i=0; i < texts_.size (); i++) { Item *ti = texts_[i]; - Side_position_interface::add_staff_support (ti); + if (!to_boolean (get_property ("scriptHorizontal"))) + Side_position_interface::add_staff_support (ti); typeset_grob (ti); } texts_.clear (); diff -urN ../lilypond-1.4.8/lily/translator-group.cc ./lily/translator-group.cc --- ../lilypond-1.4.8/lily/translator-group.cc Mon Sep 24 13:52:51 2001 +++ ./lily/translator-group.cc Tue Oct 2 00:48:47 2001 @@ -422,7 +422,7 @@ { SCM errport = scm_current_error_port (); ok = false; - SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL); + SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name")); SCM type_name = gh_call1 (typefunc, type_p); scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'", diff -urN ../lilypond-1.4.8/lilypond-font-lock.el ./lilypond-font-lock.el --- ../lilypond-1.4.8/lilypond-font-lock.el Mon Jun 11 17:17:19 2001 +++ ./lilypond-font-lock.el Sun Nov 18 01:08:53 2001 @@ -1,13 +1,16 @@ -;; lilypond-font-lock.el +;;; lilypond-font-lock.el --- syntax coloring for LilyPond mode ;; Copyright (C) 1992,1993,1994 Tim Peters +;; Author: 2001: Heikki Junes +;; * Emacs-mode: new keywords, reserved words, identifiers, notenames, +;; some dynamics and brackets are font-lock-keywords ;; Author: 1997: Han-Wen Nienhuys ;; Author: 1995-1996 Barry A. Warsaw ;; 1992-1994 Tim Peters ;; Created: Feb 1992 ;; Version: 0.0 -;; Last Modified: 12SEP97 +;; Last Modified: 14SEP2001 ;; Keywords: lilypond languages music notation ;; This software is provided as-is, without express or implied @@ -19,35 +22,124 @@ ;; This started out as a cannabalised version of python-mode.el, by hwn ;; For changes see the LilyPond ChangeLog ;; + ;; TODO: ;; - should handle block comments too. ;; - handle lexer modes (\header, \melodic, \lyric) etc. ;; - indentation -;; - notenames? -;; - fontlock: \melodic \melodic (defconst LilyPond-font-lock-keywords - (let* ((keywords '( + (let* ((keywords '( ; need special order due to over[lapping] of words + +;; all letters are lowercase +"accepts" "accompany" "addlyrics" "aeolian" "alias" "alternative" +"apply" "arpeggio" "autochange" "bar" "break" "breathe" "breve" +"beamintervals" "broken" "blend" "bcincipit" "char" "ch" "cg" +"chord\\(s\\|stest\\|chordmodifiers\\)?" +"clef \\(bass\\|treble\\|violin\\|tenor\\)?" +"clipping" "cm" "coda" "complex" "commandspanrequest" "consists\\(end\\)?" +"context" "contrabasso" "decr" "default" "denies" "different" "dirs" +"down\\(bow\\|prall\\)?" "dorian" "duration" "dynamicscript" +"eccentric" "eg" "embeddedps" "endincipit" "elementdescriptions" +"ex\\(treme\\)?" "fermata" "f+" "font" "flageolet" "fp" "fragment" "fz" +"gliss\\(ando\\)?" "global" "gg" "gmsus" "grace" "gr\\(and\\)?staff" +"header" "hsize" "in\\(clude\\|versions\\|visible\\)?" "ionian" +"key\\(s\\(ignature\\)?\\)?" "lag" "lheel" "line\\(break\\|prall\\)" +"locrian" "longa" "lower" "ltoe" "lydian" "lyrics" +"maintainer" "mark" "maxima" "mel\\(isma\\|ody\\)?" "midi" "major" +"minor" "mixolydian" "mordent" "monstrous" "multipart" "music" +"musicalpitch" "m\\(p\\|f\\|m\\)?" "name" "newpage" "noise\\(beat\\)?" +"normal\\(key\\|size\\)" "note\\(name\\)?s" "nt?" +"one\\(staff\\)?" "open" "outputproperty" "over\\(ride\\)?" +"paper" "partcombine" "partial" "penalty" "phrygian" "pitch" "p+" +"property" "pt" "prall\\(mordent\\|prall\\|up\\)?" "quickmeasure" +"relative" "remove" "repeat" "rever\\(t\\|seturn\\)" "rf" "rheel" "rhythm" +"right" "rtoe" "scales?" "scheme" "score" "scpaper" "script" "scscore" "sd" +"segno" "sequential" "set\\(tings\\)?" "sf\\(f\\|z\\)?" "shortlong" +"simultaneous" "singlepart" "skip" "small" "smarttranspose" "spanrequest" +"staccato" "staff\\(height\\|space\\)" "start" "stop\\(ped\\)?" +"st\\(paper\\|score\\)" "stuff" "stylesheet" "su" "tab" "tempo" "tenuto" +"textscript" "thenotes" "thrd" "threevoice" "thumb" "tilt\\(down\\|up\\)" +"timb" "times?" "timpani" "tiny" "toeters" "touch" "trans\\(lator\\|pose\\)" +"trill" "trombe" "turn" "type" "t\\(wo\\(voice\\(steminvert\\)?\\)?\\)?" +"un\\(der\\|set\\)" "up\\(bow\\|per\\|prall\\)?" "version" +"viol\\(a\\|in\\(incipit\\)?\\|oncello\\)" "visible" "voicedefault" "vsize" +"x" "zagers?" "z\\(eu\\|o\\)ger" -"apply" "arpeggio" "autochange" "spanrequest" "commandspanrequest" -"simultaneous" "sequential" "accepts" "alternative" "bar" "breathe" -"char" "chordmodifiers" "chords" "clef" "cm" "consists" "consistsend" -"context" "denies" "duration" "dynamicscript" "elementdescriptions" -"font" "grace" "header" "in" "lyrics" "key" "mark" "musicalpitch" -"time" "times" "midi" "mm" "name" "notenames" "notes" "outputproperty" -"override" "set" "revert" "partial" "paper" "penalty" "property" "pt" -"relative" "remove" "repeat" "addlyrics" "partcombine" "score" -"script" "stylesheet" "skip" "textscript" "tempo" "translator" -"transpose" "type" "unset" )) - (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))) + + (identifiers '( + +;; in principle, have one or more uppercase letters +"\\(\\(BarNumbering\\|Choir\\|Grand\\|HaraKiri\\|OrchestralPart\\|Piano\\|Rhythmic\\)Staff\\|\\(Cue\\|Lyrics\\)?Voice\\|\\(Orchestral\\)?Score\\|ChordNames\\|Grace\\|Lyrics\\|StaffGroup\\|Thread\\)Context" ; *Context +"\\(script\\|dots\\|dynamic\\|slur\\|stem\\|sustain\\|tie\\|tuplet\\)\\(Both\\|Down\\|Up\\)" ; *(Both/Down/Up) +"\\(slur\\|tie\\)\\(Dotted\\|Solid\\)" ; *(Dotted/Solid) +"\\(autoBeam\\|cadenza\\|impro\\|turn\\)\\(Off\\|On\\)" ; *(On/Off) +"\\(empty\\|fat\\)Text" ; *Text +"shift\\(On+\\|Off\\|I\\|II\\|III\\|IV\\|V\\)" ; shift* +"EasyNotation" +"\\(hide\\|show\\)StaffSwitch" +"\\(lower\\|upper\\)Voice" +"voice\\(One\\|Two\\|Three\\|Four\\|B\\|C\\|D\\|E\\)" ; voice* +"paper\\(Eleven\\|Sixteen\\|Thirteen\\|TwentySix\\)" ; paper* +"\\(lower\\|upper\\)\\(Octave\\|One\\)" ; (lower/upper)* +"hairyChord" +"\\(Piano\\|Rhythmic\\)\\(Staff\\)?" +"\\(clarinetti\\|fagotti\\|flauti\\|melodic\\|oboi\\|\\(quite\\|rather\\|somewhat\\)LongLyrics\\|violinoII?\\)?\\(Staff\\)?" ; *Staff +"\\(archi\\|bassi\\|legni\\|ottoni\\|timpani\\|viole\\|violini\\)\\(Group\\)" ; *Group +"melisma\\(End\\)?" "staff\\(One\\|Two\\)?" "rests\\(II\\)?" "specialKey" +"noBreak" "paperTwentysix" "endHorizScript" "FontBody" "text(I)+" + + )) + + (reservedwords '( + +;; Other words which look nicer when colored +"Accidentals" "autoBeamSettings" "BarLine" "Beam" +"ChordName\\([s]?\\|s.[a-zA-Z]*\\)" "Grace\\(.[a-zA-Z]*\\)?" +"\\(Grand\\|Piano\\)Staff" "Lyrics\\(.[a-zA-Z]*\\)?" "NoteHead" +"Score\\(.[a-zA-Z]*\\)" "Stem" "Staff\\(Symbol\\)?" "TextScript" +"TimeSignature" "Voice\\(.[a-zA-Z]*\\)?" + + )) + + (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|")) + (iregex (mapconcat (lambda (x) (concat "\\\\" x)) identifiers "\\|")) + (rwregex (mapconcat (lambda (x) (concat "" x)) reservedwords "\\|")) +) (list - (concat ".\\(" kwregex "\\)[^a-zA-Z]") - (concat "^\\(" kwregex "\\)[^a-zA-Z]") - '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face) - '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face) - )) +;; Fonts in use (from GNU Emacs Lisp Reference Manual, elisp.ps): +;; font-lock- comment / string / keyword / builtin / function-name / +;; variable-name / type / constant / warning -face + + '("\\([_^]?\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-constant-face) + '("\\(\\(#'\\)?[a-zA-Z][_a-zA-Z.\-]*[ \t]*=[ \t]*#\\)" 1 font-lock-variable-name-face) + '("\\([a-zA-Z][_a-zA-Z.\-]*\\)[ \t]*=[ \t]*" 1 font-lock-variable-name-face) + '("[ \t]*=[ \t]*\\([a-zA-Z][_a-zA-Z]*\\)" 1 font-lock-variable-name-face) + + +;; other reserved words + (cons (concat "\\(" rwregex "\\)") 'font-lock-variable-name-face) + +;; highlight note names; separate notes from (other than ')'-type) brackets + '("[ <\{[~()\t]\\(\\(\\(\\(do\\|re\\|mi\\|fa\\|sol\\|la\\|si\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-hsr]\\(flat\\(flat\\)?\\|sharp\\(sharp\\)?\\|ff?\\|ss?\\|is\\(siss\\|s\\|is\\)?\\|es\\(sess\\|s\\|es\\)?\\)?\\)\\|\\(as\\(as\\|es\\)?\\)\\|\\(es\\(es\\)?\\)\\|\\(bb\\)\\)[,']*\\(64\\|32\\|16\\|8\\|4\\|2\\|1\\)?[.]*\\)" 1 font-lock-type-face) + +;; highlight identifiers + (cons (concat "\\([_^]?\\(" iregex "\\)\\)+\\($\\|[] \t(~{}>\\\\]\\)") '(0 font-lock-function-name-face t)) + +;; highlight keywords + (cons (concat "\\([_^]?\\(" kwregex "\\)\\)+\\($\\|[] \t(~{}>\\\\]\\)") '(0 font-lock-keyword-face t)) + + '("\\([][><}{]\\)" 0 font-lock-warning-face t) + + '("\\([(~)]\\|\\\\<\\|\\\\!\\|\\\\>\\)" 0 font-lock-builtin-face t) + +;; highlight comments (again) + '("\\(%.*\\)" 0 font-lock-comment-face t) + + ) + ) "Additional expressions to highlight in LilyPond mode.") ;; define a mode-specific abbrev table for those who use such things diff -urN ../lilypond-1.4.8/lilypond-init.el ./lilypond-init.el --- ../lilypond-1.4.8/lilypond-init.el Thu Apr 26 22:47:36 2001 +++ ./lilypond-init.el Sun Nov 18 01:08:53 2001 @@ -1,4 +1,7 @@ -;; install this into emacs site-start.d/ +;;; lilypond-init.el --- Startup code for LilyPond mode +;;; +;;; Add this to your ~/.emacs or ~/.emacs.el, or +;;; install this file into Emacs' site-start.d (autoload 'LilyPond-mode "lilypond-mode") (setq auto-mode-alist @@ -6,6 +9,3 @@ (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) - - - diff -urN ../lilypond-1.4.8/lilypond-mode.el ./lilypond-mode.el --- ../lilypond-1.4.8/lilypond-mode.el Mon May 14 18:00:51 2001 +++ ./lilypond-mode.el Sun Nov 18 01:08:53 2001 @@ -4,11 +4,16 @@ ;;; source file of the GNU LilyPond music typesetter ;;; ;;; (c) 1999--2001 Jan Nieuwenhuizen +;;; +;;; Changed 2001 Heikki Junes +;;; * Add PS-compilation, PS-viewing and MIDI-play (29th Aug 2001) +;;; * Keyboard shortcuts (12th Sep 2001) +;;; * Inserting tags, inspired on sgml-mode (11th Oct 2001) ;;; Inspired on auctex ;;; -;;; Add this to your .emacs.el +;;; Add this to your ~/.emacs or ~/.emacs.el ;;; (load-library "lilypond-mode.el") ;;; (setq auto-mode-alist ;;; (append '(("\\.ly$" . LilyPond-mode) auto-mode-alist))) @@ -31,6 +36,9 @@ (defvar LilyPond-kick-xdvi nil "If true, no simultaneous xdvi's are started, but reload signal is sent.") +(defvar LilyPond-command-history nil + "Command history list.") + (defvar LilyPond-regexp-alist '(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) "Regexp used to match LilyPond errors. See `compilation-error-regexp-alist'.") @@ -129,6 +137,18 @@ :group 'LilyPond :type 'string) +(defcustom LilyPond-gv-command "gv -watch" + "Command used to display PS files." + + :group 'LilyPond + :type 'string) + +(defcustom LilyPond-midi-command "timidity" + "Command used to play MIDI files." + + :group 'LilyPond + :type 'string) + ;; This is the major configuration variable. (defcustom LilyPond-command-alist `( @@ -136,6 +156,7 @@ ("TeX" . ("tex '\\nonstopmode\\input %t'" . "View")) ("2Dvi" . ("ly2dvi %s" . "View")) + ("2PS" . ("ly2dvi -P %s" . "View")) ("Book" . ("lilypond-book %x" . "LaTeX")) ("LaTeX" . ("latex '\\nonstopmode\\input %l'" . "View")) @@ -145,6 +166,10 @@ ;; refreshes when kicked USR1 ("View" . (,(concat LilyPond-xdvi-command " %d") . "LilyPond")) + + ("ViewPS" . (,(concat LilyPond-gv-command " %p") . "LilyPond")) + + ("Midi" . (,(concat LilyPond-midi-command " %m") . "LilyPond")) ) "AList of commands to execute on the current document. @@ -177,6 +202,7 @@ ("%p" . ".ps") ("%l" . ".latex") ("%x" . ".tely") + ("%m" . ".midi") ) "Alist of expansion strings for LilyPond command names." @@ -228,7 +254,7 @@ (answer (or LilyPond-command-force (completing-read (concat "Command: (default " default ") ") - LilyPond-command-alist nil t)))) + LilyPond-command-alist nil t nil 'LilyPond-command-history)))) ;; If the answer is "LilyPond" it will not be expanded to "LilyPond" (let ((answer (car-safe (assoc answer LilyPond-command-alist)))) @@ -249,6 +275,42 @@ (LilyPond-command (LilyPond-command-query (LilyPond-master-file)) 'LilyPond-master-file)) +(defun LilyPond-command-formatdvi () + "Format the dvi output of the current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file) +) + +(defun LilyPond-command-formatps () + "Format the ps output of the current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file) +) + +(defun LilyPond-command-smartview () + "View the dvi output of current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file) +) + +(defun LilyPond-command-view () + "View the dvi output of current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file) +) + +(defun LilyPond-command-viewps () + "View the ps output of current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) +) + +(defun LilyPond-command-midi () + "View the ps output of current document." + (interactive) + (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file) +) + ;; FIXME, this is broken (defun LilyPond-region-file (begin end) (let ( @@ -358,10 +420,46 @@ (define-key LilyPond-mode-map "\C-c\C-b" 'LilyPond-command-buffer) (define-key LilyPond-mode-map "\C-c\C-k" 'LilyPond-kill-job) (define-key LilyPond-mode-map "\C-c\C-c" 'LilyPond-command-master) + (define-key LilyPond-mode-map "\C-c\C-d" 'LilyPond-command-formatdvi) + (define-key LilyPond-mode-map "\C-c\C-f" 'LilyPond-command-formatps) + (define-key LilyPond-mode-map "\C-c\C-s" 'LilyPond-command-smartview) + (define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view) + (define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps) + (define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-midi) + (define-key LilyPond-mode-map "\C-cn" 'lilypond-notes) + (define-key LilyPond-mode-map "\C-cs" 'lilypond-score) ) ;;; Menu Support +(define-skeleton lilypond-notes + "Lilypond notes tag." + nil +; (if (bolp) nil ?\n) + "\\notes" + (if (y-or-n-p "Set \"\\relative\" attribute? ") + (concat " \\relative " (skeleton-read "Relative: " "" str))) + " { " _ " }") + +(define-skeleton lilypond-score + "Lilypond score tag." + nil + (if (bolp) nil ?\n) + "\\score {\n" + " " _ "\n" + " \\paper { }\n" + (if (y-or-n-p "Insert \"\\header\" field? ") + (concat " \\header {\n " + (skeleton-read "Piece: " "piece = " str) "\n" + (if (y-or-n-p "Insert \"opus\" field? ") + (concat " " (skeleton-read "Opus: " "opus = " str) "\n")) + " }\n")) + (if (y-or-n-p "Insert \"\\midi\" field? ") + (concat " \\midi { " + (skeleton-read "Midi: " "\\tempo 4 = " str) + " }\n")) + "}\n") + (defun LilyPond-command-menu-entry (entry) ;; Return LilyPond-command-alist ENTRY as a menu item. (let ((name (car entry))) @@ -390,9 +488,26 @@ [ "Region" LilyPond-command-select-region :keys "C-c C-r" :style radio :selected (eq LilyPond-command-current 'LilyPond-command-region) ])) - (let ((file 'LilyPond-command-on-current)) - (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist)))) - + '(("Insert" + [ "\\notes..." lilypond-notes + :keys "C-c n" ] + [ "\\score..." lilypond-score + :keys "C-c s" ] + )) +; (let ((file 'LilyPond-command-on-current)) +; (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist)) +;;; Some kind of mapping which includes :keys might be more elegant + '([ "LilyPond" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) ]) + '([ "TeX" (LilyPond-command (LilyPond-command-menu "TeX") 'LilyPond-master-file) ]) + '([ "2Dvi" (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file) :keys "C-c C-d"]) + '([ "2PS" (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file) :keys "C-c C-f"]) + '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-master-file) ]) + '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-master-file) ]) + '([ "SmartView" (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file) :keys "C-c C-s"]) + '([ "View" (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file) :keys "C-c C-v"]) + '([ "ViewPS" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) :keys "C-c C-p"]) + '([ "Midi" (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file) :keys "C-c C-m"]) + )) (defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *=" "Regexp matching Identifier definitions.") @@ -414,7 +529,7 @@ (defun LilyPond-command-select-region () (interactive) (message "Next command will be on the region") - (setq LilyPond-command-current 'LilPond-command-region)) + (setq LilyPond-command-current 'LilyPond-command-region)) (defun LilyPond-command-menu (name) ;; Execute LilyPond-command-alist NAME from a menu. @@ -454,7 +569,7 @@ (setq comment-start-skip "%{? *") (make-local-variable 'comment-end) - (setq comment-end "\n") + (setq comment-end "") (make-local-variable 'block-comment-start) (setq block-comment-start "%{") diff -urN ../lilypond-1.4.8/ly/init-as.fly ./ly/init-as.fly --- ../lilypond-1.4.8/ly/init-as.fly Thu Apr 5 00:02:42 2001 +++ ./ly/init-as.fly Thu Jan 1 01:00:00 1970 @@ -1,43 +0,0 @@ -% Toplevel AsciiScript initialisation file. - -\version "1.3.146" - -\include "declarations-as.ly" - -% burp. need to override lily.scm -#(define cmr-alist - '(("bold" . "as-dummy") - ("brace" . "as-braces") - ("default" . "as-dummy") - ("dynamic" . "as-dummy") - ("feta" . "feta") - ("feta-1" . "feta") - ("feta-2" . "feta") - ("finger" . "as-number") - ("typewriter" . "as-dummy") - ("italic" . "as-dummy") - ("roman" . "as-dummy") - ("script" . "as-dummy") - ("large" . "as-dummy") - ("Large" . "as-dummy") - ("mark" . "as-number") - ("number" . "as-number") - ("timesig" . "as-number") - ("volta" . "as-number")) -) - -\score { - \context Voice \notes\relative c { - \maininput - } - \paper { - \paper_as_nine - %linewidth=-1.0 - %indent = 0.0 - \translator { \StaffContext barSize = \staffheight } - - % no beam-slope - %\translator { \VoiceContext beamHeight = #0 } - } - %\midi{ } -} diff -urN ../lilypond-1.4.8/ly/init.fly ./ly/init.fly --- ../lilypond-1.4.8/ly/init.fly Thu Apr 5 00:02:42 2001 +++ ./ly/init.fly Thu Jan 1 01:00:00 1970 @@ -1,14 +0,0 @@ -% Toplevel initialisation file. - -\version "1.3.146" - - -\include "declarations.ly" - -\score { - \context Voice \notes\relative c { - \maininput - } - \paper { } - \midi { } -} diff -urN ../lilypond-1.4.8/ly/init.sly ./ly/init.sly --- ../lilypond-1.4.8/ly/init.sly Thu Apr 5 00:02:42 2001 +++ ./ly/init.sly Thu Jan 1 01:00:00 1970 @@ -1,17 +0,0 @@ -% Toplevel initialisation file. - -\version "1.3.146" - - -\include "declarations.ly" - -\score { - \context Voice \notes\relative c { - \maininput - } - \paper { - - % indent = 0.0 - } - \midi{ } -} diff -urN ../lilypond-1.4.8/make/lilypond-vars.make ./make/lilypond-vars.make --- ../lilypond-1.4.8/make/lilypond-vars.make Sun Jun 3 14:56:56 2001 +++ ./make/lilypond-vars.make Sun Nov 18 01:08:53 2001 @@ -12,11 +12,12 @@ export DVIPSMAKEPK := mktexpk --destdir $(topdir)/mf/out endif -export LILYPONDPREFIX:=$(depth)/ +# LilyPond is often run from within $(outdir), making a relative +# PREFIX incorrect. +export LILYPONDPREFIX:=$(shell cd $(depth)/ ; pwd) export PYTHONPATH:=$(buildscript-dir)/$(outdir):$(PYTHONPATH) # guile load path? - the-script-dir=$(wildcard $(script-dir)) ifneq ($(the-script-dir),) diff -urN ../lilypond-1.4.8/make/lilypond.redhat.spec.in ./make/lilypond.redhat.spec.in --- ../lilypond-1.4.8/make/lilypond.redhat.spec.in Fri May 11 15:29:05 2001 +++ ./make/lilypond.redhat.spec.in Tue Nov 13 23:40:44 2001 @@ -86,6 +86,9 @@ /sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir %endif + +echo 'Please logout first before using LilyPond.' + %preun %if info=="yes" diff -urN ../lilypond-1.4.8/make/mutopia-targets.make ./make/mutopia-targets.make --- ../lilypond-1.4.8/make/mutopia-targets.make Thu Apr 5 19:20:57 2001 +++ ./make/mutopia-targets.make Tue Nov 20 18:31:46 2001 @@ -10,7 +10,7 @@ all: $(OUT_FILES) -local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples) +local-WWW: $(ly_examples) $(ps_examples) $(png_examples) $(dvi_examples) tar: mkdir -p $(outdir)/$(tarball) diff -urN ../lilypond-1.4.8/make/mutopia-vars.make ./make/mutopia-vars.make --- ../lilypond-1.4.8/make/mutopia-vars.make Wed Mar 21 00:05:53 2001 +++ ./make/mutopia-vars.make Tue Nov 20 18:31:31 2001 @@ -5,22 +5,17 @@ LY_FILES = $(wildcard *.ly) SCORE_LY_FILES = $(shell fgrep -l score *.ly) -FLY_FILES = $(wildcard *.fly) -SLY_FILES = $(wildcard *.sly) M4_FILES = $(wildcard *.m4) LYM4_FILES = $(wildcard *.lym4) -EXTRA_DIST_FILES += $(FLY_FILES) $(SLY_FILES) $(LY_FILES) $(M4_FILES) $(LYM4_FILES) +EXTRA_DIST_FILES += $(LY_FILES) $(M4_FILES) $(LYM4_FILES) ly_examples=$(addprefix $(outdir)/, $(addsuffix .ly.txt, $(examples))) -fly_examples=$(addprefix $(outdir)/, $(addsuffix .fly.txt, $(flexamples))) -sly_examples=$(addprefix $(outdir)/, $(addsuffix .sly.txt, $(slexamples))) -all_examples=$(flexamples) $(slexamples) $(examples) - -ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(all_examples))) -gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(all_examples))) -png_examples=$(addprefix $(outdir)/, $(addsuffix .png, $(all_examples))) +ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(examples))) +dvi_examples=$(addprefix $(outdir)/, $(addsuffix .dvi, $(examples))) +gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(examples))) +png_examples=$(addprefix $(outdir)/, $(addsuffix .png, $(examples))) html_subdirs=$(addprefix --subdirs ,$(SUBDIRS)) @@ -30,4 +25,4 @@ OUT_FILES = $(addprefix $(outdir)/,$(M4_FILES:%.m4=%)) \ $(addprefix $(outdir)/,$(LYM4_FILES:%.lym4=%.ly)) -score_ps = $(addprefix $(outdir)/, $(addsuffix .ps.gz, $($SCORE_LY_FILES))) \ No newline at end of file +score_ps = $(addprefix $(outdir)/, $(addsuffix .ps.gz, $($SCORE_LY_FILES))) diff -urN ../lilypond-1.4.8/mf/GNUmakefile ./mf/GNUmakefile --- ../lilypond-1.4.8/mf/GNUmakefile Sun Mar 25 00:46:58 2001 +++ ./mf/GNUmakefile Sun Nov 18 01:08:53 2001 @@ -26,6 +26,8 @@ AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES))) TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm)) PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) +PFB_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfb)) + # Make tfm files first, log files last, # so that normally log files aren't made twice diff -urN ../lilypond-1.4.8/midi2ly/duration-convert.cc ./midi2ly/duration-convert.cc --- ../lilypond-1.4.8/midi2ly/duration-convert.cc Sat Feb 24 22:06:31 2001 +++ ./midi2ly/duration-convert.cc Wed Nov 14 11:08:27 2001 @@ -8,7 +8,6 @@ */ #include #include "duration-convert.hh" -#include "duration-iter.hh" #include "warn.hh" // statics Duration_convert @@ -39,8 +38,11 @@ } str += to_str ('.', dur.dots_i_); if (dur.plet_b ()) - str += String ("*") + to_str (dur.plet_.iso_i_) - + String ("/") + to_str (dur.plet_.type_i_); + { + str += String ("*") + to_str (dur.plet_.iso_i_); + if (dur.plet_.type_i_ != 1) + str += String ("/") + to_str (dur.plet_.type_i_); + } return str; } @@ -110,49 +112,58 @@ return mom2standardised_dur (mom); } + Duration Duration_convert::mom2standardised_dur (Rational mom) { - // if (!dur_array_s.length_i ()) - if (!dur_array_s.size ()) - set_array (); - assert (dur_array_s.size ()); - for (int i = 0; i < dur_array_s.size () - 1; i++) + Duration dur; + + if (mom == Rational (0)) + return dur; + + int d = no_smaller_than_i_s ? no_smaller_than_i_s : 7; + int i = type2_i (d); + int n = (mom / Rational (1, i)); + + int tuplet = 1; + if (!no_tuplets_b_s) { - Rational lower_mom = dur2_mom (dur_array_s[ i ]); - if (mom <= lower_mom) + // ugh: 8 + int m = n; + int tup = 1; + while (tup < 8 && + mom != Rational (m, i * tup)) { - // all arbitrary, but 3/4 will get rid of the noise... - // kinda ok - if (i || (mom / lower_mom > Rational (3, 4))) - return dur_array_s[ i ]; - else - { - Duration d; - d.durlog_i_ = -100; - return d; - } + tup += 2; + m = (mom / Rational (1, i * tup)); } - Rational upper_mom = dur2_mom (dur_array_s[ i + 1 ]); - if ((mom < upper_mom) - && ((mom - lower_mom) / lower_mom - < (upper_mom - mom) / upper_mom)) - return dur_array_s[ i ]; - } - return dur_array_s[ dur_array_s.size () - 1 ]; -} - -void -Duration_convert::set_array () -{ - dur_array_s.clear (); - Duration_iterator i; - while (i.ok ()) - dur_array_s.push (i.forward_dur ()); + if (tuplet < 8) + { + n = m; + tuplet = tup; + } + } + + if (!n) + return dur; + + if (mom - Rational (n, i) + > Rational (1, i * 2 * tuplet)) + n++; + + while (!(n & 1)) + { + n >>= 1; + d--; + } + + dur.durlog_i_ = d; + dur.plet_.iso_i_ = n; + dur.plet_.type_i_ = tuplet; + return dur; } - Rational Duration_convert::plet_factor_mom (Duration dur) { diff -urN ../lilypond-1.4.8/midi2ly/duration-iter.cc ./midi2ly/duration-iter.cc --- ../lilypond-1.4.8/midi2ly/duration-iter.cc Sat Feb 24 22:06:31 2001 +++ ./midi2ly/duration-iter.cc Thu Jan 1 01:00:00 1970 @@ -1,107 +0,0 @@ -/* - duration-convert.cc -- implement Duration_convert - - source file of the LilyPond music typesetter - - (c) 1997--2001 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ -#include -#include "duration-convert.hh" -#include "warn.hh" -#include "duration-iter.hh" - -Duration_iterator::Duration_iterator () -{ - cursor_dur_.durlog_i_ = 7; - if (Duration_convert::no_smaller_than_i_s) - cursor_dur_.durlog_i_ = Duration_convert::no_smaller_than_i_s; -} - -Duration -Duration_iterator::operator ++(int) -{ - return forward_dur (); -} - -Duration -Duration_iterator::dur () -{ - return cursor_dur_; -} - -Duration -Duration_iterator::forward_dur () -{ - /* should do smart table? guessing: - duration wholes - 16 0.0625 - 32.. 0.0703 - 8:2/3 0.0833 - 16. 0.0938 - 8 0.1250 - 16.. 0.1406 - 4:2/3 0.1667 - 8. 0.1875 - - */ - assert (ok ()); - - Duration dur = this->dur (); - - if (!cursor_dur_.dots_i_ && !cursor_dur_.plet_b ()) - { - cursor_dur_.durlog_i_ += 1; - cursor_dur_.dots_i_ = 2; - } - else if (cursor_dur_.dots_i_ == 2) - { - assert (!cursor_dur_.plet_b ()); - cursor_dur_.dots_i_ = 0; - cursor_dur_.durlog_i_ -=2; - cursor_dur_.set_plet (2, 3); - } - else if (cursor_dur_.plet_b () - && (cursor_dur_.plet_.iso_i_ == 2) - && (cursor_dur_.plet_.type_i_ == 3)) - { - assert (!cursor_dur_.dots_i_); - cursor_dur_.set_plet (1, 1); - cursor_dur_.durlog_i_ += 1; - cursor_dur_.dots_i_ = 1; - } - else if (cursor_dur_.dots_i_ == 1) - { - assert (!cursor_dur_.plet_b ()); - cursor_dur_.dots_i_ = 0; - cursor_dur_.durlog_i_ -= 1; - } - - if (Duration_convert::no_tuplets_b_s - && cursor_dur_.plet_b () && ok ()) - forward_dur (); - if (Duration_convert::no_double_dots_b_s - && (cursor_dur_.dots_i_ == 2) && ok ()) - forward_dur (); - if (Duration_convert::no_smaller_than_i_s - && (cursor_dur_.durlog_i_ > Duration_convert::no_smaller_than_i_s) && ok ()) - forward_dur (); - if (Duration_convert::no_smaller_than_i_s - && cursor_dur_.dots_i_ - && (cursor_dur_.durlog_i_ >= Duration_convert::no_smaller_than_i_s) - && ok ()) - forward_dur (); - if (Duration_convert::no_smaller_than_i_s - && (cursor_dur_.dots_i_ == 2) - && (cursor_dur_.durlog_i_ >= Duration_convert::no_smaller_than_i_s / 2) - && ok ()) - forward_dur (); - - return dur; -} - -bool -Duration_iterator::ok () -{ - return cursor_dur_.length_mom () <= Rational (4); -} diff -urN ../lilypond-1.4.8/midi2ly/duration.cc ./midi2ly/duration.cc --- ../lilypond-1.4.8/midi2ly/duration.cc Sat Feb 24 22:06:31 2001 +++ ./midi2ly/duration.cc Wed Nov 14 11:08:27 2001 @@ -19,7 +19,6 @@ #include "rational.hh" #include "duration.hh" #include "duration-convert.hh" -#include "duration-iter.hh" // statics Duration int Duration::division_1_i_s = 384 * 4; @@ -44,8 +43,8 @@ void Duration::compress (Rational m) { - plet_.iso_i_ *= m.num_i (); - plet_.type_i_ *= m.den_i (); + plet_.iso_i_ *= m.num (); + plet_.type_i_ *= m.den (); } Rational diff -urN ../lilypond-1.4.8/midi2ly/include/duration-iter.hh ./midi2ly/include/duration-iter.hh --- ../lilypond-1.4.8/midi2ly/include/duration-iter.hh Sat Feb 24 22:06:31 2001 +++ ./midi2ly/include/duration-iter.hh Thu Jan 1 01:00:00 1970 @@ -1,39 +0,0 @@ -/* - duration-iter.hh -- declare Duration_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1998--2001 Han-Wen Nienhuys - - */ - -#ifndef DURATION_ITER_HH -#define DURATION_ITER_HH - -/// (iter_dur) -struct Duration_iterator { - - /// start at shortest: 128:2/3 - Duration_iterator (); - - /// return forward_dur (); - Duration operator ++(int); - - /// return current dur - Duration dur (); - - /// return dur (), step to next - Duration forward_dur (); - - /// durations left? - bool ok (); - -private: - - Duration cursor_dur_; -}; - - - -#endif /* DURATION_ITER_HH */ - diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-column.hh ./midi2ly/include/lilypond-column.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-column.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-column.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-column.hh -- declare Lilypond_column // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef LILYPOND_COLUMN_HH #define LILYPOND_COLUMN_HH diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-item.hh ./midi2ly/include/lilypond-item.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-item.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-item.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-item.hh -- declare lilypond_item // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef LILYPOND_ITEM_HH #define LILYPOND_ITEM_HH diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-score.hh ./midi2ly/include/lilypond-score.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-score.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-score.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-score.hh -- declare Lilypond_score // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef LILYPOND_SCORE_HH #define LILYPOND_SCORE_HH diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-staff.hh ./midi2ly/include/lilypond-staff.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-staff.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-staff.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-staff.hh -- declare lilypond_staff // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef LILYPOND_STAFF_HH #define LILYPOND_STAFF_HH diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-stream.hh ./midi2ly/include/lilypond-stream.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-stream.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-stream.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-stream.hh -- part of LilyPond // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen // should i be named Lilypond_stream? diff -urN ../lilypond-1.4.8/midi2ly/include/lilypond-voice.hh ./midi2ly/include/lilypond-voice.hh --- ../lilypond-1.4.8/midi2ly/include/lilypond-voice.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/lilypond-voice.hh Wed Nov 14 11:08:27 2001 @@ -1,12 +1,14 @@ // // lilypond-voice.hh -- declare Lilypond_voice // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef LILYPOND_VOICE_HH #define LILYPOND_VOICE_HH #include "midi2ly-proto.hh" +//#include "flower-proto.hh" +#include "parray.hh" #include "cons.hh" /// (lilypond_voice) @@ -14,15 +16,14 @@ { public: Lilypond_voice (Lilypond_staff* lilypond_staff_l); - void add_item (Lilypond_item* lilypond_item_l); + void add_items (Link_array& items); void output (Lilypond_stream& lilypond_stream_r); String get_clef () const; - Lilypond_item * last_item_l_; - Lilypond_note * last_note_l_; + private: Lilypond_staff* lilypond_staff_l_; - Cons_list lilypond_item_l_list_; - + Link_array < Cons_list > threads_; + Rational mom_; }; #endif // LILYPOND_VOICE_HH diff -urN ../lilypond-1.4.8/midi2ly/include/midi-score-parser.hh ./midi2ly/include/midi-score-parser.hh --- ../lilypond-1.4.8/midi2ly/include/midi-score-parser.hh Wed Mar 21 16:46:20 2001 +++ ./midi2ly/include/midi-score-parser.hh Wed Nov 14 11:08:27 2001 @@ -1,5 +1,5 @@ /* - midi-score-parser.hh -- declare + midi-score-parser.hh -- declare Midi_score_parser source file of the GNU LilyPond music typesetter diff -urN ../lilypond-1.4.8/midi2ly/include/midi2ly-global.hh ./midi2ly/include/midi2ly-global.hh --- ../lilypond-1.4.8/midi2ly/include/midi2ly-global.hh Tue Aug 8 14:01:26 2000 +++ ./midi2ly/include/midi2ly-global.hh Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // midi2ly-global.hh -- declare global stuff for midi2ly // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #ifndef MIDI2LY_GLOBAL_HH #define MIDI2LY_GLOBAL_HH diff -urN ../lilypond-1.4.8/midi2ly/lilypond-column.cc ./midi2ly/lilypond-column.cc --- ../lilypond-1.4.8/midi2ly/lilypond-column.cc Wed Mar 21 16:46:20 2001 +++ ./midi2ly/lilypond-column.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-column.cc -- implement Lilypond_column // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include "lilypond-column.hh" diff -urN ../lilypond-1.4.8/midi2ly/lilypond-item.cc ./midi2ly/lilypond-item.cc --- ../lilypond-1.4.8/midi2ly/lilypond-item.cc Wed Aug 22 12:28:44 2001 +++ ./midi2ly/lilypond-item.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-item.cc -- implement Lilypond_item // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include #include @@ -255,14 +255,17 @@ String str; //ugh - if (dur.plet_b ()) - str += String ("\\times ") - + String_convert::i2dec_str (dur.plet_.iso_i_, 0, 0) - + "/" - + String_convert::i2dec_str (dur.plet_.type_i_, 0, 0) - + " { "; + if (dur.plet_b () && dur.plet_.type_i_ != 1) + { + { + str += String ("\\times ") + + String_convert::i2dec_str (dur.plet_.iso_i_, 0, 0) + + "/" + + String_convert::i2dec_str (dur.plet_.type_i_, 0, 0) + + " { "; + } + } - str += name_str; Duration tmp = dur; @@ -270,8 +273,13 @@ str += Duration_convert::dur2_str (tmp); if (dur.plet_b ()) - str += String (" }"); - + { + if (dur.plet_.type_i_ != 1) + str += String (" }"); + else + str += String ("*") + to_str (dur.plet_.iso_i_); + } + /* note of zero duration is nonsense, but let's output anyway for convenient debugging @@ -303,16 +311,29 @@ String Lilypond_skip::str () { - if (!mom_) - return String (""); - - Duration dur = duration (); - if (dur.durlog_i_<-10) - return ""; - - String str = "\\skip "; - str += Duration_convert::dur2_str (dur); + String str; + Rational m = mom_; + if ((int)m >= 1) + { + int n = m; + str += "\\skip 1"; + if (n > 1) + { + str += "*"; + str += to_str (n); + } + str += " "; + m -= n; + } + if (m > Rational (0)) + { + + Duration dur = Duration_convert::mom2_dur (m); + str += "\\skip "; + str += Duration_convert::dur2_str (dur); + str += " "; + } return str; } diff -urN ../lilypond-1.4.8/midi2ly/lilypond-score.cc ./midi2ly/lilypond-score.cc --- ../lilypond-1.4.8/midi2ly/lilypond-score.cc Wed May 9 16:32:00 2001 +++ ./midi2ly/lilypond-score.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-score.cc -- implement Lilypond_score // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include #include "rational.hh" @@ -192,7 +192,7 @@ int current_bar_i = 0; Rational bar_mom = lilypond_time_signature_l_->bar_mom (); - int n = 5 >? Duration_convert::no_smaller_than_i_s; + int n = 7 >? Duration_convert::no_smaller_than_i_s; n = Duration_convert::type2_i (n); Rational s = Rational (1, n); for (int i = 0; i < column_l_array_.size (); i++) diff -urN ../lilypond-1.4.8/midi2ly/lilypond-staff.cc ./midi2ly/lilypond-staff.cc --- ../lilypond-1.4.8/midi2ly/lilypond-staff.cc Wed Mar 21 16:46:20 2001 +++ ./midi2ly/lilypond-staff.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-staff.cc -- implement Lilypond_staff // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include #include @@ -55,109 +55,40 @@ Lilypond_voice* voice_p = new Lilypond_voice (this); lilypond_voice_p_list_.append (new Killing_cons (voice_p, 0)); - // Rational mom = items.top ()->at_mom (); Rational mom = 0; - for (Cons** pp = &items.head_; *pp;) + Link_array now_items; + for (Cons** i = &items.head_; *i;) { - Cons* i = *pp; - if (i->car_->at_mom () > mom) - { - if (no_rests_b_g && voice_p->last_note_l_) - { - voice_p->last_note_l_->end_column_l_ = i->car_->lilypond_column_l_; - } - else - { - /* uh, what about quantisation? This should probably - use mom2standardised_dur () - arg, urg: skip should get duration from start/end columns! - */ - - Rational r = i->car_->at_mom () - mom; - // ugh, need score - Lilypond_column* start = lilypond_score_l_g->find_column_l (mom); - voice_p->add_item (new Lilypond_skip (start, r)); - } - - mom = i->car_->at_mom (); - continue; // unnecessary - } + while (*i && (*i)->car_->at_mom () < mom) + i = &(*i)->next_; + Lilypond_note* last_note = 0; Link_array now_items; - for (Cons *cp = i; cp && cp->car_->at_mom () == mom; cp = cp->next_) - now_items.push (i->car_); - -#if 0 - /* - Why don't we use , if voice has: - - - - we'd get last_item == key_change -> last_note == 0; - */ - Lilypond_note * last_note = dynamic_cast (voice_p->last_item_l_); -#else - /* - Not sure, is this better? - */ - Lilypond_note * last_note = voice_p->last_note_l_; -#endif - - Link_array candidates; - - for (int i=0; last_note && i < now_items.size (); i++) - { - Lilypond_note * now_note = dynamic_cast (now_items[i]); - if (now_note && last_note->channel_i_ != now_note->channel_i_) - candidates.push (now_note); - } - - if (candidates.size()) - { - now_items = candidates; - } - - Lilypond_item * which = 0; - if (now_items.size () > 1) - { - int mindiff = 100000; // ugh - for (int i=0; last_note && i < now_items.size (); i++) - { - Lilypond_note *nt = dynamic_cast (now_items[i]); - if (!nt) - continue; - int diff = abs (last_note->pitch_i_ - nt->pitch_i_ ); - if(diff < mindiff) - { - mindiff = diff; - which = now_items [i]; - } - } - - if (which && mindiff > 18) // more than 1.5 octaves apart. Don't put in same voice. - { - which =0; - } - } - else if (now_items.size () == 1) - which = now_items[0]; - - if (which) - { - while ((*pp)->car_ != which) - pp = &(*pp)->next_; - - mom += (*pp)->car_->duration_mom (); - Cons* c = items.remove_cons (pp); - voice_p->add_item (c->car_); + if (*i) + mom = (*i)->car_->at_mom (); + while (*i && (*i)->car_->at_mom () == mom) + { + Lilypond_note* note = dynamic_cast ((*i)->car_); + if (note && last_note + /* ugh, should sort out (whether to) channel before */ + && (note->channel_i_ != last_note->channel_i_ + || (note->duration_mom () + != last_note->duration_mom ()))) + break; + Cons* c = items.remove_cons (i); + now_items.push (c->car_); + if (note) + last_note = note; delete c; } - else - { - pp = &(*pp)->next_; - continue; - } + + if (now_items.size ()) + mom = now_items.top ()->at_mom (); + if (last_note) + mom += last_note->duration_mom (); + + voice_p->add_items (now_items); } } @@ -199,17 +130,18 @@ lilypond_stream_r << voicename << " = \\notes "; - trackbody += "\\" + voicename + "\n"; - + trackbody += "\\context Voice = " + voicename + " \\" + voicename + "\n"; lilypond_stream_r << '\n'; i->car_->output (lilypond_stream_r); c++; + lilypond_stream_r << '\n'; } + lilypond_stream_r << '\n'; lilypond_stream_r << _ ("% MIDI copyright:") << copyright_str_ << '\n'; lilypond_stream_r << _ ("% MIDI instrument:") << instrument_str_ << '\n'; lilypond_stream_r << id_str () << " = "; - lilypond_stream_r << "<\n " << trackbody << " >\n"; + lilypond_stream_r << "<\n" << trackbody << ">\n"; lilypond_stream_r << " % " << name_str () << '\n'; } @@ -231,99 +163,12 @@ } -#if 0 // not used for now -void -Lilypond_staff::output_lilypond_rest (Lilypond_stream& lilypond_stream_r, Rational begin_mom, Rational end_mom) -{ - Rational bar_mom = lilypond_time_signature_l_->bar_mom (); - Rational now_mom = begin_mom; - - int begin_bar_i = (int) (now_mom / bar_mom) + 1; - int end_bar_i = (int) (end_mom / bar_mom) + 1; - - if (end_bar_i == begin_bar_i) - { - output_lilypond_rest_remain (lilypond_stream_r, end_mom - begin_mom); - return; - } - - // multiple bars involved - int bar_i = (int) (now_mom / bar_mom) + 1; - - //fill current bar - Rational begin_bar_mom = Rational (begin_bar_i - 1) * bar_mom; - if (now_mom > begin_bar_mom) - { - int next_bar_i = (int) (now_mom / bar_mom) + 2; - Rational next_bar_mom = Rational (next_bar_i - 1) * bar_mom; - assert (next_bar_mom <= end_mom); - - Rational remain_mom = next_bar_mom - now_mom; - if (remain_mom > Rational (0)) - { - output_lilypond_rest_remain (lilypond_stream_r, remain_mom); - now_mom += remain_mom; - } - - bar_i = check_end_bar_i (now_mom, bar_i); - } - - // fill whole bars - int count_i = end_bar_i - bar_i; - for (int i = 0; i < count_i; i++) - { - int begin_bar_i = check_begin_bar_i (now_mom, bar_i); - if (begin_bar_i) - output_lilypond_begin_bar (lilypond_stream_r, now_mom, begin_bar_i); - lilypond_stream_r << "r1 "; - // *lilypond_stream_r.os_p_ << flush; - if (begin_bar_i) - LOGOUT (NORMAL_ver) << begin_bar_i << flush; - bar_i = check_end_bar_i (now_mom, bar_i); - now_mom += bar_mom; - } - - // use "int i" here, and gcc 2.7.2 hits internal compiler error - int ii = check_begin_bar_i (now_mom, bar_i); - if (ii) - output_lilypond_begin_bar (lilypond_stream_r, now_mom, ii); - - // bar_i = check_end_bar_i (now_mom, bar_i); - - Rational remain_mom = end_mom - Rational (end_bar_i - 1) * bar_mom; - if (remain_mom > Rational (0)) - { - output_lilypond_rest_remain (lilypond_stream_r, remain_mom); - now_mom += remain_mom; - } - assert (now_mom == end_mom); -} - -void -Lilypond_staff::output_lilypond_rest_remain (Lilypond_stream& lilypond_stream_r, Rational mom) -{ - if (Duration_convert::no_quantify_b_s) - { - Duration dur = Duration_convert::mom2_dur (mom); - lilypond_stream_r << "r" << dur.str () << " "; - // assert (mom == dur.mom ()); - assert (mom == dur.length ()); - return; - } - - Duration dur = Duration_convert::mom2standardised_dur (mom); - if (dur.type_i_>-10) - lilypond_stream_r << "r" << dur.str () << " "; -} -#endif - - void Lilypond_staff::process () { /* - group items into voices - */ + group items into voices + */ assert (lilypond_score_l_g); lilypond_key_l_ = lilypond_score_l_g->lilypond_key_l_; diff -urN ../lilypond-1.4.8/midi2ly/lilypond-voice.cc ./midi2ly/lilypond-voice.cc --- ../lilypond-1.4.8/midi2ly/lilypond-voice.cc Thu Apr 5 00:47:09 2001 +++ ./midi2ly/lilypond-voice.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // lilypond-voice.cc -- implement Lilypond_voice // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include "string-convert.hh" #include "midi2ly-global.hh" @@ -17,19 +17,40 @@ Lilypond_voice::Lilypond_voice (Lilypond_staff* lilypond_staff_l) { lilypond_staff_l_ = lilypond_staff_l; - last_item_l_ =0; - last_note_l_ =0; + threads_.push (new Cons_list); + mom_ = 0; } - + void -Lilypond_voice::add_item (Lilypond_item* lilypond_item_l) +Lilypond_voice::add_items (Link_array& items) { - last_item_l_ = lilypond_item_l; - if (Lilypond_note* n = dynamic_cast (lilypond_item_l)) + int thread = 0; + for (int i = 0; i < items.size (); i++) { - last_note_l_ = n; + Lilypond_item* item = items[i]; + + int to_thread; + if (Lilypond_note* n = dynamic_cast (item)) + to_thread = thread++; + else + to_thread = 0; + + if (to_thread >= threads_.size ()) + threads_.push (new Cons_list); + + if (to_thread == 0 && item->at_mom () > mom_) + { + /* urg: skip should use refer to end-colum, not separate moment */ + Rational r = item->at_mom () - mom_; + Lilypond_column* start = lilypond_score_l_g->find_column_l (mom_); + threads_[to_thread]->append (new Cons (new Lilypond_skip (start, r), 0)); + mom_ = item->at_mom (); + } + + threads_[to_thread]->append (new Cons (item, 0)); + if (to_thread == 0) + mom_ += item->duration_mom (); } - lilypond_item_l_list_.append (new Cons (lilypond_item_l, 0)); } /** @@ -40,7 +61,7 @@ { Lilypond_note * n =0; - for (Cons *cp = lilypond_item_l_list_.head_; !n && cp; cp = cp->next_) + for (Cons *cp = threads_[0]->head_; !n && cp; cp = cp->next_) { n = dynamic_cast (cp->car_); } @@ -64,7 +85,7 @@ Lilypond_voice::output (Lilypond_stream& lilypond_stream_r) { lilypond_stream_r << "{ "; - if (lilypond_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i) + if (threads_[0]->size_i () > FAIRLY_LONG_VOICE_i) lilypond_stream_r << '\n'; @@ -73,7 +94,10 @@ int current_bar_i = 0; Rational bar_mom = lilypond_staff_l_->lilypond_time_signature_l_->bar_mom (); - for (Cons* i = lilypond_item_l_list_.head_; i; i = i->next_) + Link_array > heads; + for (int i = 1; i < threads_.size (); i++) + heads.push (threads_[i]->head_); + for (Cons* i = threads_[0]->head_; i; i = i->next_) { Rational at_mom = i->car_->lilypond_column_l_->at_mom (); int bar_i = (int) (at_mom / bar_mom) + 1; @@ -91,12 +115,34 @@ current_bar_i = bar_i; } - lilypond_stream_r << *i->car_; + if (dynamic_cast (i->car_) + && heads.size () + && heads[0] + && heads[0]->car_->at_mom () == at_mom) + { + lilypond_stream_r << '<'; + + lilypond_stream_r << *i->car_; + + for (int h = 0; + h < heads.size () + && heads[h] + && heads[h]->car_->at_mom () == at_mom; + h++) + { + lilypond_stream_r << *heads[h]->car_; + heads[h] = heads[h]->next_; + } + lilypond_stream_r << '>'; + } + else + lilypond_stream_r << *i->car_; + if (Lilypond_key* k = dynamic_cast (i->car_)) lilypond_staff_l_->lilypond_key_l_ = lilypond_score_l_g->lilypond_key_l_ = k; } - if (lilypond_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i) + if (threads_[0]->size_i () > FAIRLY_LONG_VOICE_i) lilypond_stream_r << '\n'; lilypond_stream_r << "} "; diff -urN ../lilypond-1.4.8/midi2ly/main.cc ./midi2ly/main.cc --- ../lilypond-1.4.8/midi2ly/main.cc Tue Aug 21 18:04:46 2001 +++ ./midi2ly/main.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // main.cc -- implement main () entry point // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include #include @@ -121,7 +121,7 @@ cout << '\n'; cout << Long_option_init::table_str (long_option_init_a) << endl; - cout << _f ("Report bugs to %s", "bug-lilypond@gnu.org") << endl; + cout << _f ("Report bugs to %s", "bug-gnu-music@gnu.org") << endl; } void diff -urN ../lilypond-1.4.8/midi2ly/midi-track-parser.cc ./midi2ly/midi-track-parser.cc --- ../lilypond-1.4.8/midi2ly/midi-track-parser.cc Wed Mar 21 16:46:20 2001 +++ ./midi2ly/midi-track-parser.cc Wed Nov 14 11:08:27 2001 @@ -308,10 +308,6 @@ int minor_i = (int)(bool)next_byte (); Lilypond_key* p = new Lilypond_key (accidentals_i, minor_i); item_p = p; -#if 0 - info_l_->score_l_->lilypond_key_l_ = p; - lilypond_staff_p_->lilypond_key_l_ = p; -#endif } // SSME [\0x7f][\x03] else if ((byte == 0x7f) && (next == 0x03)) diff -urN ../lilypond-1.4.8/midi2ly/midi2ly-version.cc ./midi2ly/midi2ly-version.cc --- ../lilypond-1.4.8/midi2ly/midi2ly-version.cc Thu Sep 2 02:17:49 1999 +++ ./midi2ly/midi2ly-version.cc Wed Nov 14 11:08:27 2001 @@ -1,7 +1,7 @@ // // version.cc -- implement inexpensive versioning // -// copyright 1997 Jan Nieuwenhuizen +// (c) 1997--2001 Jan Nieuwenhuizen #include #include "config.h" diff -urN ../lilypond-1.4.8/po/da.po ./po/da.po --- ../lilypond-1.4.8/po/da.po Sun Sep 23 10:13:04 2001 +++ ./po/da.po Fri Sep 28 20:53:04 2001 @@ -1,12 +1,13 @@ # Danish translation of lilypond # Copyright (C) 2001 Free Software Foundation, Inc. # Keld Simonsen , 2001. +# Reviewed 2001-09-28 Rune Zedeler # msgid "" msgstr "" "Project-Id-Version: lilypond 1.4.6\n" "POT-Creation-Date: 2001-06-14 13:22+0200\n" -"PO-Revision-Date: 2001-09-22 21:00+0200\n" +"PO-Revision-Date: 2001-09-28 21:00+0200\n" "Last-Translator: Keld Simonsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" @@ -425,7 +426,7 @@ #: beam.cc:637 msgid "weird beam vertical offset" -msgstr "underligt lodret afstand for bjælke" +msgstr "underlig lodret afstand for bjælke" #: beam-engraver.cc:91 beam-engraver.cc:124 msgid "can't find start of beam" @@ -496,7 +497,7 @@ #: collision.cc:127 msgid "Too many clashing notecolumns. Ignoring them." -msgstr "For mange sammenhængende nodekolonner. Ignorerer dem." +msgstr "For mange overlappende nodekolonner. Ignorerer dem." #: dimensions.cc:13 msgid "NaN" @@ -528,7 +529,7 @@ #: folded-repeat-iterator.cc:78 msgid "no one to print a repeat brace" -msgstr "det er ingen som kan skrive et gentagelsestegn" +msgstr "der er ingen som kan skrive et gentagelsestegn" #: font-interface.cc:237 msgid "couldn't find any font satisfying " @@ -540,11 +541,11 @@ #: grace-iterator.cc:43 msgid "no Grace context available" -msgstr "ingen prydomgivelse tilgængelig" +msgstr "ingen forslagsnodeomgivelse (Grace) tilgængelig" #: grace-position-engraver.cc:96 msgid "Unattached grace notes. Attaching to last musical column." -msgstr "Ikke-fæstede prydsnoder. Fæster ved sidste musikkolonne." +msgstr "Ikke-fæstede forslagsnoder. Fæster ved sidste musikkolonne." #: hairpin.cc:93 msgid "decrescendo too small" @@ -560,7 +561,7 @@ #: hyphen-engraver.cc:102 msgid "Nothing to connect hyphen to on the left. Ignoring hyphen request." -msgstr "Det er ingenting at forbinde bindestregen mod til venstre. Ignorerer bindestregsforespørgslen." +msgstr "Der er ingenting at forbinde bindestregen med til venstre. Ignorerer bindestregsforespørgslen." #: key-engraver.cc:99 msgid "Conflicting key signatures found." @@ -577,7 +578,7 @@ #: lily-guile.cc:141 #, c-format msgid "(load path: `%s')" -msgstr "(indlæsningssøgesti: \"%s\"" +msgstr "(indlæsningssøgesti: \"%s\")" #: line-of-score.cc:96 #, c-format @@ -595,7 +596,7 @@ #: lyric-phrasing-engraver.cc:284 msgid "lyrics found without any matching notehead" -msgstr "tekst fundet uden noget matchende nodehoved" +msgstr "tekst fundet uden noget tilhørende nodehoved" #: lyric-phrasing-engraver.cc:289 msgid "Huh? Melismatic note found to have associated lyrics." @@ -625,7 +626,7 @@ #: main.cc:109 msgid "write header field to BASENAME.FIELD" -msgstr "skriv rubrikfælt til BASNAVN.FELT" +msgstr "skriv rubrikfelt til BASENAVN.FELT" #: main.cc:110 msgid "add DIR to search path" @@ -734,7 +735,7 @@ #: musical-request.cc:28 #, c-format msgid "Transposition by %s makes accidental larger than two" -msgstr "Transponering med %s gør accicental større end to" +msgstr "Transponering med %s medfører løst fortegn større end to" #: music.cc:232 msgid "ly_get_mus_property (): Not a Music" @@ -777,7 +778,7 @@ #: my-lily-parser.cc:57 msgid "Braces don't match" -msgstr "Krølleparenteser passer ikke" +msgstr "Klammer passer ikke" #: output-property-music-iterator.cc:20 request-chord-iterator.cc:76 #, c-format @@ -833,11 +834,11 @@ #: percent-repeat-engraver.cc:117 msgid "Don't know how to handle a percent repeat of this length." -msgstr "Véd ikke hvordan en procentgentagelse af denne længde skal håndteres." +msgstr "Véd ikke hvordan en procenttegnsgentagelse (percent) af denne længde skal håndteres." #: percent-repeat-iterator.cc:53 msgid "no one to print a percent" -msgstr "der er ingen som kan skrive en procent" +msgstr "der er ingen som kan skrive et procent-tegn" #: performance.cc:51 msgid "Track ... " @@ -945,21 +946,21 @@ #: slur.cc:48 msgid "Putting slur over rest. Ignoring." -msgstr "Sætter bue over pause. Ignorerer." +msgstr "Sætter legatobue over pause. Ignorerer." #: slur.cc:383 msgid "Slur over rest?" -msgstr "Bue over pause?" +msgstr "Legatobue over pause?" #: slur-engraver.cc:127 msgid "unterminated slur" -msgstr "uafsluttet bue" +msgstr "uafsluttet legatobue" #. How to shut up this warning, when Voice_devnull_engraver has #. eaten start request? #: slur-engraver.cc:144 msgid "can't find start of slur" -msgstr "kan ikke finde start på bue" +msgstr "kan ikke finde start på legatobue" #: stem.cc:116 msgid "Weird stem size; check for narrow beams" @@ -968,7 +969,7 @@ #: stem-engraver.cc:115 #, c-format msgid "Adding note head to incompatible stem (type = %d)" -msgstr "Tilføjer nodehoved til inkompatibel bue (type = %d)" +msgstr "Tilføjer nodehoved til inkompatibel nodehals (type = %d)" #: text-spanner.cc:121 msgid "Text_spanner too small" @@ -1005,15 +1006,15 @@ #. they were suicided by Thread_devnull_engraver? #: tie-engraver.cc:220 tie-performer.cc:173 msgid "No ties were created!" -msgstr "Ingen buer blev lavet!" +msgstr "Ingen bindebuer blev lavet!" #: tie-engraver.cc:240 msgid "lonely tie" -msgstr "ensom bue" +msgstr "ensom bindebue" #: time-scaled-music-iterator.cc:25 msgid "no one to print a tuplet start bracket" -msgstr "der findes ingen som kan skrive en startparentes for tuppel" +msgstr "der findes ingen som kan skrive en startklamme for tuppel" #: timing-translator.cc:38 #, c-format @@ -1071,11 +1072,11 @@ #: volta-engraver.cc:87 msgid "No volta spanner to end" -msgstr "Ingen reprisebro til slut" +msgstr "Ingen volte-bro at afslutte" #: volta-engraver.cc:104 msgid "Already have a volta spanner. Stopping that one prematurely." -msgstr "Har allerede en reprisebro. Stopper denne for tidligt." +msgstr "Har allerede en volte-bro. Stopper denne for tidligt." #: volta-engraver.cc:108 msgid "Also have a stopped spanner. Giving up." @@ -1092,7 +1093,7 @@ #: parser.yy:697 msgid "More alternatives than repeats. Junking excess alternatives." -msgstr "Flere alternativer end repriser. Stryger tiloversblevne alternativer." +msgstr "Flere alternativer end gentagelser. Stryger tiloversblevne alternativer." #: parser.yy:761 msgid "Second argument must be a symbol" @@ -1280,7 +1281,7 @@ #: main.cc:97 msgid "set key: ACC +sharps/-flads; :1 minor" -msgstr "sæt tonart: TONE +forhøjelser/-sænkninger; :1 mol" +msgstr "sæt toneart: TONE +forhøjelser/-sænkninger; :1 mol" #: main.cc:98 msgid "don't output tuplets, double dots or rests, smallest is 32" diff -urN ../lilypond-1.4.8/po/nl.po ./po/nl.po --- ../lilypond-1.4.8/po/nl.po Sun Sep 16 21:17:12 2001 +++ ./po/nl.po Wed Oct 31 16:40:45 2001 @@ -39,12 +39,12 @@ #: ly2dvi.py:207 mup2ly.py:100 update-lily.py:125 msgid "Exiting ... " -msgstr "Beëidigen ..." +msgstr "Beëindigen ..." #: ly2dvi.py:265 mup2ly.py:158 update-lily.py:183 #, c-format msgid "Usage: %s [OPTION]... FILE" -msgstr "Gebruik: %s [OPTIE]... BESTAND" +msgstr "" #: ly2dvi.py:269 main.cc:120 main.cc:149 mup2ly.py:162 update-lily.py:187 msgid "Options:" diff -urN ../lilypond-1.4.8/po/sv.po ./po/sv.po --- ../lilypond-1.4.8/po/sv.po Thu Jan 1 01:00:00 1970 +++ ./po/sv.po Sat Sep 29 10:33:10 2001 @@ -0,0 +1,1423 @@ +# Swedish translation of lilypond +# Copyright (C) 2001 Free Software Foundation, Inc. +# Martin Norbäck , 2001. +# +msgid "" +msgstr "" +"Project-Id-Version: lilypond 1.4.8\n" +"POT-Creation-Date: 2001-09-09 17:30+0200\n" +"PO-Revision-Date: 2001-09-29 11:20+0200\n" +"Last-Translator: Martin Norbäck \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ly2dvi.py:106 +msgid "Generate .dvi with LaTeX for LilyPond" +msgstr "Generera .dvi med LaTeX för LilyPond" + +#: data-file.cc:118 input.cc:85 ly2dvi.py:191 midi-parser.cc:100 mup2ly.py:93 +#: update-lily.py:118 warn.cc:23 +msgid "warning: " +msgstr "varning: " + +#: input.cc:90 ly2dvi.py:206 ly2dvi.py:639 ly2dvi.py:657 ly2dvi.py:848 +#: mup2ly.py:98 mup2ly.py:188 update-lily.py:123 update-lily.py:211 warn.cc:9 +#: warn.cc:17 +msgid "error: " +msgstr "fel: " + +#: ly2dvi.py:207 mup2ly.py:100 update-lily.py:125 +msgid "Exiting ... " +msgstr "Avslutar... " + +#: ly2dvi.py:265 mup2ly.py:158 update-lily.py:183 +#, c-format +msgid "Usage: %s [OPTION]... FILE" +msgstr "Användning: %s [FLAGGA]... FIL" + +#: ly2dvi.py:269 main.cc:120 main.cc:149 mup2ly.py:162 update-lily.py:187 +msgid "Options:" +msgstr "Flaggor:" + +#: ly2dvi.py:273 main.cc:124 main.cc:172 mup2ly.py:168 update-lily.py:191 +#, c-format +msgid "Report bugs to %s" +msgstr "" +"Rapportera programfel till %s\n" +"Rapportera fel i översättningen till " + +#: ly2dvi.py:306 mup2ly.py:185 update-lily.py:208 +#, c-format +msgid "Invoking `%s'" +msgstr "Startar \"%s\"" + +#: ly2dvi.py:310 mup2ly.py:188 update-lily.py:211 +#, c-format +msgid "command exited with value %d" +msgstr "kommandot avslutade med värde %d" + +#: ly2dvi.py:312 mup2ly.py:190 update-lily.py:213 +msgid "(ignored)" +msgstr "(ignorerat)" + +# här är det fråga om rensning av en temporärkatalog +#: ly2dvi.py:322 +#, c-format +msgid "Cleaning %s..." +msgstr "Rensar %s..." + +#: ly2dvi.py:337 mup2ly.py:214 update-lily.py:237 +#, c-format +msgid "no such setting: %s" +msgstr "inställningen finns inte: %s" + +#: ly2dvi.py:350 main.cc:113 +msgid "write Makefile dependencies for every input file" +msgstr "skriv Makefile-beroenden för varje indatafil" + +# förklaring av flaggan -h +#: ly2dvi.py:351 main.cc:96 main.cc:109 mup2ly.py:1117 update-lily.py:251 +msgid "this help" +msgstr "denna hjälp" + +#: ly2dvi.py:352 main.cc:111 main.cc:116 +msgid "DIR" +msgstr "KATALOG" + +#: ly2dvi.py:352 +msgid "add DIR to LilyPond's search path" +msgstr "lägg till KATALOG till LilyPonds sökväg" + +# %s är programmets namn +#: ly2dvi.py:353 +#, c-format +msgid "keep all output, and name the directory %s.dir" +msgstr "behåll all utdata, och namnge katalogen %s.dir" + +#: ly2dvi.py:354 +msgid "don't run LilyPond" +msgstr "kör inte LilyPond" + +#: ly2dvi.py:355 main.cc:114 +msgid "produce MIDI output only" +msgstr "skapa enbart MIDI-utdata" + +#: ly2dvi.py:356 ly2dvi.py:357 main.cc:99 main.cc:112 main.cc:115 +msgid "FILE" +msgstr "FIL" + +#: ly2dvi.py:356 +msgid "write ouput to FILE" +msgstr "skriv utdata till FIL" + +#: ly2dvi.py:357 +msgid "find pfa fonts used in FILE" +msgstr "hitta pfa-typsnitt som används i FIL" + +#: ly2dvi.py:359 +msgid "generate PostScript output" +msgstr "skapa PostScript-utdata" + +#: ly2dvi.py:360 +msgid "KEY=VAL" +msgstr "NYCKEL=VÄRDE" + +#: ly2dvi.py:360 +msgid "change global setting KEY to VAL" +msgstr "ändra global inställning NYCKEL till VÄRDE" + +# Förklaring till --verbose (borde vara längre) +#: ly2dvi.py:361 main.cc:119 mup2ly.py:1120 update-lily.py:255 +msgid "verbose" +msgstr "utförlig utdata" + +#: ly2dvi.py:362 main.cc:105 main.cc:118 mup2ly.py:1121 update-lily.py:256 +msgid "print version number" +msgstr "visa versionsnummer" + +#: ly2dvi.py:363 main.cc:107 main.cc:120 mup2ly.py:1122 update-lily.py:258 +msgid "show warranty and copyright" +msgstr "visa garanti och copyright" + +#: ly2dvi.py:385 ly2dvi.py:580 ly2dvi.py:605 +#, c-format +msgid "Running %s..." +msgstr "Kör %s..." + +#: ly2dvi.py:398 +#, c-format +msgid "Analyzing %s..." +msgstr "Analyserar %s..." + +#: ly2dvi.py:454 +#, c-format +msgid "no lilypond output found for %s" +msgstr "ingen lilypondutdata funnen för %s" + +#: ly2dvi.py:496 +#, c-format +msgid "invalid value: %s" +msgstr "ogiltigt värde: %s" + +#: ly2dvi.py:639 +#, c-format +msgid "not a PostScript file: `%s'" +msgstr "inte en PostScript-fil: \"%s\"" + +#: ly2dvi.py:657 +#, c-format +msgid "getopt says: `%s'" +msgstr "getopt säger: \"%s\"" + +# här är det fråga om skrivning till en fil +#: ly2dvi.py:824 scores.cc:44 +#, c-format +msgid "dependencies output to `%s'..." +msgstr "beroenden skrivna till \"%s\"..." + +# här är det fråga om skrivning till en fil (första parametern är t.ex +# DVI, LATEX, MIDI, TEX) +#: ly2dvi.py:835 +#, c-format +msgid "%s output to `%s'..." +msgstr "%s skrivet till \"%s\"..." + +#: includable-lexer.cc:49 lily-guile.cc:139 ly2dvi.py:837 +#: midi-score-parser.cc:24 scores.cc:136 scores.cc:142 +#, c-format +msgid "can't find file: `%s'" +msgstr "kan inte hitta fil: \"%s\"" + +#: ly2dvi.py:848 +msgid "no files specified on command line." +msgstr "inga filer angivna på kommandoraden." + +#: mup2ly.py:51 +msgid "Convert mup to ly" +msgstr "Konvertera mup till ly" + +# %s är programnamnet (mup2ly) +#: mup2ly.py:166 +#, c-format +msgid "%s is far from completed. Not all constructs are recognised." +msgstr "%s är långt ifrån färdig, och kan inte alla konstruktioner." + +#: mup2ly.py:964 +#, c-format +msgid "no such context: %s" +msgstr "omgivning finns inte: %s" + +#: mup2ly.py:1115 +msgid "debug" +msgstr "felsökningsutdata" + +#: mup2ly.py:1116 +msgid "define macro NAME [optional expansion EXP]" +msgstr "definiera makro NAME [valfri makroersättning EXP]" + +#: main.cc:115 mup2ly.py:1118 +msgid "write output to FILE" +msgstr "skriv utdata till FIL" + +#: mup2ly.py:1119 +msgid "only pre-process" +msgstr "förbehandla enbart" + +#: mup2ly.py:1200 +#, c-format +msgid "Processing `%s'..." +msgstr "Behandlar \"%s\"..." + +#: mup2ly.py:1219 +#, c-format +msgid "Writing `%s'..." +msgstr "Skriver \"%s\"..." + +#: update-lily.py:51 +msgid "Fetch and rebuild from latest source package" +msgstr "Hämta och bygg om från senaste källkodspaketet" + +#: update-lily.py:223 +#, c-format +msgid "Cleaning `%s'..." +msgstr "Rensar \"%s\"..." + +#: update-lily.py:243 +#, c-format +msgid "unpack and build in DIR [%s]" +msgstr "packa upp och bygg i DIR [%s]" + +#: update-lily.py:244 +msgid "execute COMMAND, subtitute:" +msgstr "kör COMMAND, ersätt:" + +#: update-lily.py:245 +msgid "%b: build root" +msgstr "%b: byggrot" + +#: update-lily.py:246 +#, c-format +msgid "%n: package name" +msgstr "%n: paketnamn" + +#: update-lily.py:247 +msgid "%r: release directory" +msgstr "%r: programsläppskatalog" + +#: update-lily.py:248 +msgid "%t: tarball" +msgstr "%t: tarboll" + +#: update-lily.py:249 +msgid "%v: package version" +msgstr "%v: paketversion" + +#: update-lily.py:252 +#, c-format +msgid "keep all output, and name the directory %s" +msgstr "behåll all utdata, och döp katalogen till %s" + +#: update-lily.py:253 +msgid "upon failure notify EMAIL[,EMAIL]" +msgstr "vid fel, meddela EMAIL[,EMAIL]" + +#: update-lily.py:254 +msgid "remove previous build" +msgstr "ta bort föregående bygge" + +#: update-lily.py:257 +#, c-format +msgid "fetch and build URL [%s]" +msgstr "hämta och bygg URL [%s]" + +#: update-lily.py:365 +#, c-format +msgid "Listing `%s'..." +msgstr "Listar \"%s\"..." + +#: update-lily.py:426 +#, c-format +msgid "latest is: %s" +msgstr "senaste är: %s" + +#: update-lily.py:427 +#, c-format +msgid "relax, %s is up to date" +msgstr "lugn, %s är senaste versionen" + +#: update-lily.py:435 update-lily.py:448 +#, c-format +msgid "Fetching `%s'..." +msgstr "Hämtar \"%s\"..." + +#: update-lily.py:457 +#, c-format +msgid "Building `%s'..." +msgstr "Bygger \"%s\"..." + +#: data-file.cc:54 +msgid "EOF in a string" +msgstr "EOF i en sträng" + +#: getopt-long.cc:145 +#, c-format +msgid "option `%s' requires an argument" +msgstr "flaggan \"%s\" kräver ett argument" + +#: getopt-long.cc:149 +#, c-format +msgid "option `%s' doesn't allow an argument" +msgstr "flaggan \"%s\" tillåter inget argument" + +#: getopt-long.cc:153 +#, c-format +msgid "unrecognized option: `%s'" +msgstr "okänd flagga: \"%s\"" + +#: getopt-long.cc:160 +#, c-format +msgid "invalid argument `%s' to option `%s'" +msgstr "ogiltigt argument \"%s\" till flaggan \"%s\"" + +#: input.cc:96 +msgid "non fatal error: " +msgstr "icke-fatalt fel: " + +#: input.cc:104 source-file.cc:63 source-file.cc:156 +msgid "position unknown" +msgstr "okänd position" + +# det handlar om mmap här +#: mapped-file-storage.cc:74 +msgid "can't map file" +msgstr "kan inte göra \"mmap\" på filen" + +#: lilypond-stream.cc:111 mapped-file-storage.cc:87 paper-stream.cc:45 +#: scores.cc:48 simple-file-storage.cc:44 text-stream.cc:23 +#, c-format +msgid "can't open file: `%s'" +msgstr "kan inte öppna fil: \"%s\"" + +#: simple-file-storage.cc:56 +#, c-format +msgid "Huh? Got %d, expected %d characters" +msgstr "Öh? Fick %d, väntade %d tecken" + +#: text-stream.cc:10 +msgid "" +msgstr "" + +#: warn.cc:36 +msgid "programming error: " +msgstr "programmeringsfel: " + +#: warn.cc:36 +msgid " (Continuing; cross thumbs)" +msgstr " (Fortsätter, håll tummarna)" + +#: afm.cc:59 +#, c-format +msgid "can't find character number: %d" +msgstr "kan inte hitta teckennummer: %d" + +#: afm.cc:74 +#, c-format +msgid "can't find character called: `%s'" +msgstr "kan inte hitta tecken som heter: \"%s\"" + +#: afm.cc:124 +#, c-format +msgid "Error parsing AFM file: `%s'" +msgstr "Fel vid tolkning av AFM-fil: \"%s\"" + +#: all-font-metrics.cc:95 +#, c-format +msgid "checksum mismatch for font file: `%s'" +msgstr "felaktig checksumma för typsnittsfil: \"%s\"" + +#: all-font-metrics.cc:97 +#, c-format +msgid "does not match: `%s'" +msgstr "matchar inte: \"%s\"" + +#: all-font-metrics.cc:102 +msgid " Rebuild all .afm files, and remove all .pk and .tfm files. Rerun with -V to show font paths." +msgstr " Bygg om alla .afm-filer, och ta bort alla .pk- och .tfm-filer. Kör igen med -V för att visa typsnittssökvägar." + +#: all-font-metrics.cc:167 +#, c-format +msgid "can't find font: `%s'" +msgstr "kan inte hitta typsnitt: \"%s\"" + +#: all-font-metrics.cc:168 +msgid "Loading default font" +msgstr "Läser in standardtypsnitt" + +#: all-font-metrics.cc:183 +#, c-format +msgid "can't find default font: `%s'" +msgstr "kan inte hitta standardtypsnitt: \"%s\"" + +#: all-font-metrics.cc:184 includable-lexer.cc:51 scores.cc:137 +#, c-format +msgid "(search path: `%s')" +msgstr "(sökväg: \"%s\")" + +#: all-font-metrics.cc:185 +msgid "Giving up" +msgstr "Ger upp" + +#: auto-change-iterator.cc:43 change-iterator.cc:59 +#: part-combine-music-iterator.cc:97 +msgid "Can't switch translators, I'm there already" +msgstr "Kan inte byta översättare, jag är redan där" + +#: beam-engraver.cc:91 beam-engraver.cc:124 +msgid "can't find start of beam" +msgstr "kan inte hitta start på balk" + +#: beam-engraver.cc:158 +msgid "already have a beam" +msgstr "har redan en balk" + +#: beam-engraver.cc:222 +msgid "unterminated beam" +msgstr "oavslutad balk" + +#: beam-engraver.cc:260 chord-tremolo-engraver.cc:195 +msgid "stem must have Rhythmic structure" +msgstr "skaft måste ha en rytmisk struktur" + +#: beam-engraver.cc:272 +msgid "stem doesn't fit in beam" +msgstr "skaftet passar inte i balken" + +#: beam-engraver.cc:273 +msgid "beam was started here" +msgstr "balken startade här" + +#: beam.cc:86 +msgid "beam has less than two stems" +msgstr "balk har mindre än två skaft" + +#: beam.cc:637 +msgid "weird beam vertical offset" +msgstr "underligt vertikalt avstånd för balk" + +#: break-align-item.cc:136 +#, c-format +msgid "unknown spacing pair `%s', `%s'" +msgstr "okänt avståndspar \"%s\", \"%s\"" + +#: change-iterator.cc:21 +#, c-format +msgid "can't change `%s' to `%s'" +msgstr "kan inte ändra \"%s\" till \"%s\"" + +#. +#. We could change the current translator's id, but that would make +#. errors hard to catch +#. +#. last->translator_id_str_ = change_l ()->change_to_id_str_; +#. +#: change-iterator.cc:78 +msgid "I'm one myself" +msgstr "Jag är en själv" + +#: change-iterator.cc:81 +msgid "none of these in my family" +msgstr "ingen av dessa i min familj" + +#: chord-tremolo-engraver.cc:141 percent-repeat-engraver.cc:192 +msgid "unterminated chord tremolo" +msgstr "icke avslutat ackordtremolo" + +#: chord-tremolo-iterator.cc:48 +msgid "no one to print a tremolos" +msgstr "det finns ingen som kan skriva tremolon" + +#: chord.cc:376 +#, c-format +msgid "invalid subtraction: not part of chord: %s" +msgstr "ogiltig subtraktion: inte del av ackord: %s" + +# "pitch" här ska alltså vara en ton i ett ackord +#: chord.cc:405 +#, c-format +msgid "invalid inversion pitch: not part of chord: %s" +msgstr "ogiltig ton för inversion: inte del av ett ackord: %s" + +#: collision.cc:127 +msgid "Too many clashing notecolumns. Ignoring them." +msgstr "För många krockande notkolumner. Ignorerar dem." + +#: dimensions.cc:13 +msgid "NaN" +msgstr "-" + +#: dynamic-engraver.cc:197 span-dynamic-performer.cc:86 +msgid "can't find start of (de)crescendo" +msgstr "kan inte hitta start på crescendo/diminuendo" + +#: dynamic-engraver.cc:222 +msgid "already have a crescendo" +msgstr "har redan ett crescendo" + +#: dynamic-engraver.cc:223 +msgid "already have a decrescendo" +msgstr "har redan ett diminuendo" + +#: dynamic-engraver.cc:317 +msgid "unterminated (de)crescendo" +msgstr "oavslutat crescendo/diminuendo" + +#: extender-engraver.cc:97 +msgid "unterminated extender" +msgstr "oavslutad utökare" + +#: extender-engraver.cc:109 +msgid "Nothing to connect extender to on the left. Ignoring extender request." +msgstr "Det finns inget att koppla utökaren mot till vänster. Ignorerar utökarförfrågan" + +#: folded-repeat-iterator.cc:78 +msgid "no one to print a repeat brace" +msgstr "det finns ingen som kan skriva ett repristecken" + +#: font-interface.cc:237 +msgid "couldn't find any font satisfying " +msgstr "kunde inte hitta något typsnitt som uppfyller " + +#: gourlay-breaking.cc:157 +msgid "No feasible line breaking found" +msgstr "Ingen lämplig radbrytning hittades" + +#: grace-iterator.cc:43 +msgid "no Grace context available" +msgstr "ingen prydnadsomgivning tillgänglig" + +#: grace-position-engraver.cc:96 +msgid "Unattached grace notes. Attaching to last musical column." +msgstr "Ej fastsatta prydnadsnoter. Fäster vid sista musikkolumnen." + +#: hairpin.cc:93 +msgid "decrescendo too small" +msgstr "diminuendo för litet" + +#: hairpin.cc:94 +msgid "crescendo too small" +msgstr "crescendo för litet" + +#: hyphen-engraver.cc:90 +msgid "unterminated hyphen" +msgstr "oavslutat bindestreck" + +#: hyphen-engraver.cc:102 +msgid "Nothing to connect hyphen to on the left. Ignoring hyphen request." +msgstr "Det finns inget att koppla bindestrecket mot till vänster. Ignorerar bindestrecksförfrågan." + +#: key-engraver.cc:99 +msgid "Conflicting key signatures found." +msgstr "Motsägande tonartssignaturer funna." + +#: key-engraver.cc:100 +msgid "This was the other key definition." +msgstr "Detta var den andra tonartsdefinitionen." + +#: key-performer.cc:77 +msgid "FIXME: key change merge" +msgstr "FIXA: tonartsbytessammanslagning" + +#: lily-guile.cc:141 +#, c-format +msgid "(load path: `%s')" +msgstr "(inläsningssökväg: \"%s\"" + +#: line-of-score.cc:96 +#, c-format +msgid "Element count %d." +msgstr "Elementantal %d." + +#: line-of-score.cc:253 paper-score.cc:77 +#, c-format +msgid "Element count %d " +msgstr "Elementantal %d " + +#: line-of-score.cc:267 +msgid "Calculating column positions..." +msgstr "Beräknar kolumnpositioner..." + +#: lyric-phrasing-engraver.cc:284 +msgid "lyrics found without any matching notehead" +msgstr "text hittad utan något matchande nothuvud" + +#: lyric-phrasing-engraver.cc:289 +msgid "Huh? Melismatic note found to have associated lyrics." +msgstr "Öh? Melismatisk not har tillhörande text." + +#. print example usage: lilypond -e "(set-lily-option 'help 0)" ? +#: main.cc:105 +msgid "EXPR" +msgstr "UTTR" + +#: main.cc:105 +msgid "evalute EXPR as Scheme after .scm init is read" +msgstr "evaluera UTTR som Scheme efter .scm-init har lästs" + +#. another bug in option parser: --output=foe is taken as an abbreviation +#. for --output-format +#: main.cc:108 +msgid "EXT" +msgstr "FMT" + +#: main.cc:108 +msgid "use output format EXT (scm, ps, tex or as)" +msgstr "använd utdataformat FMT (scm, ps, tex eller as)" + +#: main.cc:110 +msgid "FIELD" +msgstr "FÄLT" + +#: main.cc:110 +msgid "write header field to BASENAME.FIELD" +msgstr "skriv rubrikfält till BASNAMN.FÄLT" + +#: main.cc:111 +msgid "add DIR to search path" +msgstr "lägg till KATALOG till sökvägen" + +#: main.cc:112 +msgid "use FILE as init file" +msgstr "använd FIL som init-fil" + +#: main.cc:116 +msgid "prepend DIR to dependencies" +msgstr "lägg till KATALOG efter beroenden" + +#: main.cc:117 +msgid "inhibit file output naming and exporting" +msgstr "hindra namngivning av filutdata och exportering" + +#. +#. No version number or newline here. It confuses help2man +#. +#: main.cc:137 +#, c-format +msgid "Usage: %s [OPTION]... FILE..." +msgstr "Användning: %s [FLAGGA]... FIL..." + +#: main.cc:139 +msgid "Typeset music and or play MIDI from FILE" +msgstr "Typsätt musik och/eller spela MIDI från FIL" + +#: main.cc:143 +msgid "" +"LilyPond is a music typesetter. It produces beautiful sheet music\n" +"using a high level description file as input. LilyPond is part of \n" +"the GNU Project.\n" +msgstr "" +"LilyPond är en musiktypsättare. Den producerar vackra noter från en\n" +"högnivåbeskrivning av musiken i en fil. LilyPond är en del av\n" +"GNU-projektet.\n" + +#: main.cc:153 +msgid "This binary was compiled with the following options:" +msgstr "Detta program kompilerades med följande alternativ:" + +#: main.cc:56 main.cc:180 +#, c-format +msgid "" +"This is free software. It is covered by the GNU General Public License,\n" +"and you are welcome to change it and/or distribute copies of it under\n" +"certain conditions. Invoke as `%s --warranty' for more information.\n" +msgstr "" +"Det här är fri programvara. Den täcks av \"GNU General Public License\",\n" +"och du får ändra och/eller distribuera kopior av den under vissa\n" +"villkor. Kör \"%s --warranty\" för mer information.\n" + +#: main.cc:63 main.cc:187 main.cc:199 +#, c-format +msgid "Copyright (c) %s by" +msgstr "Copyright © %s av" + +#: main.cc:197 +msgid "GNU LilyPond -- The music typesetter" +msgstr "GNU Lilypond -- Musiktypsättaren" + +#: main.cc:72 main.cc:205 +msgid "" +" This program is free software; you can redistribute it and/or\n" +"modify it under the terms of the GNU General Public License version 2\n" +"as published by the Free Software Foundation.\n" +"\n" +" This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" +"General Public License for more details.\n" +"\n" +" You should have received a copy (refer to the file COPYING) of the\n" +"GNU General Public License along with this program; if not, write to\n" +"the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n" +"USA.\n" +msgstr "" +"Detta program är fri programvara. Du kan distribuera det och/eller\n" +"modifiera det under villkoren i GNU General Public License, publicerad\n" +"av Free Software Foundation, antingen version 2 eller (om du så vill)\n" +"någon senare version. \n" +"\n" +"Detta program distribueras i hopp om att det ska vara användbart, men\n" +"UTAN NÅGON SOM HELST GARANTI, även utan underförstådd garanti om\n" +"SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT SPECIELLT ÄNDAMÅL. Se GNU General\n" +"Public License för ytterligare information.\n" +"\n" +"Du bör ha fått en kopia av GNU General Public License tillsammans med\n" +"detta program. Om inte, skriv till Free Software Foundation, Inc., 59\n" +"Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" + +#: midi-item.cc:139 +#, c-format +msgid "no such instrument: `%s'" +msgstr "instrumentet finns inte: \"%s\"" + +#: midi-item.cc:228 +msgid "silly duration" +msgstr "tokig längd" + +#: midi-item.cc:241 +msgid "silly pitch" +msgstr "tokig ton" + +#: music-output-def.cc:115 +#, c-format +msgid "can't find `%s' context" +msgstr "kan inte hitta omgivningen \"%s\"" + +#: music.cc:232 +msgid "ly_get_mus_property (): Not a Music" +msgstr "ly_get_mus_property (): Inte en \"Music\"" + +#: music.cc:246 +msgid "ly_set_mus_property (): Not a symbol" +msgstr "ly_set_mus_property (): inte en symbol" + +#: music.cc:258 +msgid "ly_set_mus_property (): not of type Music" +msgstr "ly_set_mus_property (): inte av typen \"Music\"" + +#: music.cc:272 +msgid "ly_make_music (): Not a string" +msgstr "ly_make_music (): Inte en sträng" + +#: music.cc:292 +msgid "ly_music_name (): Not a music expression" +msgstr "ly_music_name (): Inte ett musikuttryck" + +#: musical-request.cc:28 +#, c-format +msgid "Transposition by %s makes accidental larger than two" +msgstr "Transponering med %s gör höjning/sänkning större än två" + +#: my-lily-lexer.cc:139 +#, c-format +msgid "Identifier name is a keyword: `%s'" +msgstr "Identifierarnamn är ett nyckelord: \"%s\"" + +#: my-lily-lexer.cc:159 +#, c-format +msgid "error at EOF: %s" +msgstr "fel vid filslut: %s" + +#: midi-score-parser.cc:94 my-lily-parser.cc:47 +msgid "Parsing..." +msgstr "Tolkar..." + +#: my-lily-parser.cc:57 +msgid "Braces don't match" +msgstr "Krullparenteser matchar inte" + +#: output-property-music-iterator.cc:20 request-chord-iterator.cc:76 +#, c-format +msgid "Junking request: `%s'" +msgstr "Slänger förfrågan: \"%s\"" + +#: paper-def.cc:109 +#, c-format +msgid "paper output to `%s'..." +msgstr "pappersutdata till \"%s\"..." + +#: lilypond-stream.cc:93 paper-outputter.cc:85 performance.cc:99 +msgid ", at " +msgstr ", vid " + +#: paper-outputter.cc:232 +#, c-format +msgid "writing header field `%s' to `%s'..." +msgstr "skriver rubrikfält \"%s\" till \"%s\"..." + +#: paper-score.cc:80 +msgid "Preprocessing elements..." +msgstr "Förbehandlar element..." + +#: paper-score.cc:114 +msgid "Outputting Score, defined at: " +msgstr "Matar ut partitur, definierade vid: " + +#: paper-stream.cc:41 +#, c-format +msgid "can't create directory: `%s'" +msgstr "kan inte skapa katalog: \"%s\"" + +#: paper-stream.cc:55 +msgid "Error syncing file (disk full?)" +msgstr "Fel vid synkning av fil (disken full?)" + +#. +#. We could change the current translator's id, but that would make +#. errors hard to catch +#. +#. last->translator_id_str_ = change_l ()->change_to_id_str_; +#. +#: part-combine-music-iterator.cc:116 +#, c-format +msgid "I'm one myself: `%s'" +msgstr "Jag är en själv: \"%s\"" + +#: part-combine-music-iterator.cc:119 +#, c-format +msgid "none of these in my family: `%s'" +msgstr "ingen av dessa i min familj: \"%s\"" + +#: percent-repeat-engraver.cc:117 +msgid "Don't know how to handle a percent repeat of this length." +msgstr "Vet inte hur en procentupprepning av denna längd ska hanteras." + +#: percent-repeat-iterator.cc:53 +msgid "no one to print a percent" +msgstr "det finns ingen som kan skriva procent" + +#: performance.cc:51 +msgid "Track ... " +msgstr "Spår... " + +#: performance.cc:83 +msgid "Creator: " +msgstr "Skapare: " + +#: performance.cc:113 +#, c-format +msgid "from musical definition: %s" +msgstr "från musikdefinition: %s" + +#: performance.cc:168 +#, c-format +msgid "MIDI output to `%s'..." +msgstr "MIDI-utdata till \"%s\"..." + +#: phrasing-slur-engraver.cc:119 +msgid "unterminated phrasing slur" +msgstr "oavslutad fraseringsbåge" + +#: phrasing-slur-engraver.cc:134 +msgid "can't find start of phrasing slur" +msgstr "kan inte hitta start på fraseringsbåge" + +#: piano-pedal-engraver.cc:142 piano-pedal-engraver.cc:154 +#: piano-pedal-performer.cc:87 +#, c-format +msgid "can't find start of piano pedal: `%s'" +msgstr "kan inte hitta start på pianopedal: \"%s\"" + +#: pitch.cc:25 +msgid "Pitch arguments out of range" +msgstr "Tonargument utanför intervallet" + +#: property-engraver.cc:121 +#, c-format +msgid "" +"`%s' is deprecated. Use\n" +" \\property %s.%s \\override #'%s = #%s" +msgstr "" +"\"%s\" är föråldrat. Använd\n" +" \\property %s.%s \\override #'%s = #%s" + +#: property-engraver.cc:145 +#, c-format +msgid "Wrong type for property: %s, type: %s, value found: %s, type: %s" +msgstr "Fel typ för egenskap: %s, typ: %s, värde funnet: %s, typ: %s" + +#: rest-collision.cc:194 +msgid "too many colliding rests" +msgstr "för många krockande pauser" + +#: rest-collision.cc:198 +msgid "too many notes for rest collision" +msgstr "för många toner för pauskrock" + +#: scm-option.cc:63 +msgid "Scheme options:" +msgstr "Scheme-alternativ:" + +#: score-engraver.cc:188 +#, c-format +msgid "unbound spanner `%s'" +msgstr "obunden bryggare \"%s\"" + +#: score.cc:78 +msgid "Interpreting music..." +msgstr "Tolkar musik..." + +#: score.cc:92 +msgid "Need music in a score" +msgstr "Behöver musik i partitur" + +#. should we? hampers debugging. +#: score.cc:105 +msgid "Errors found/*, not processing score*/" +msgstr "Fel funna/*, behandlar inte partitur*/" + +#: score.cc:112 +#, c-format +msgid "elapsed time: %.2f seconds" +msgstr "tidsåtgång: %.2f sekunder" + +#: scores.cc:106 +msgid "Score contains errors; will not process it" +msgstr "Partitur innehåller fel; kommer inte behandla det" + +#: scores.cc:152 +#, c-format +msgid "Now processing: `%s'" +msgstr "Behandlar nu: \"%s\"" + +#: script-engraver.cc:66 +#, c-format +msgid "Don't know how to interpret articulation `%s'" +msgstr "Kan inte tolka artikulering \"%s\"" + +#. this shouldn't happen, but let's continue anyway. +#: separation-item.cc:47 +msgid "Separation_item: I've been drinking too much" +msgstr "Separation_item: Jag har druckit för mycket" + +#: slur-engraver.cc:127 +msgid "unterminated slur" +msgstr "oavslutat båge" + +#. How to shut up this warning, when Voice_devnull_engraver has +#. eaten start request? +#: slur-engraver.cc:144 +msgid "can't find start of slur" +msgstr "kan inte hitta start på båge" + +#: slur.cc:48 +msgid "Putting slur over rest. Ignoring." +msgstr "Sätter båge över paus. Ignorerar." + +#: slur.cc:383 +msgid "Slur over rest?" +msgstr "Båge över paus?" + +#: stem-engraver.cc:115 +#, c-format +msgid "Adding note head to incompatible stem (type = %d)" +msgstr "Lägger till nothuvud till inkompatibel båge (typ = %d)" + +#: stem.cc:116 +msgid "Weird stem size; check for narrow beams" +msgstr "Konstig skaftstorlek; kolla efter smala balkar" + +#: text-spanner-engraver.cc:94 +msgid "can't find start of text spanner" +msgstr "kan inte hitta start på textbryggare" + +#: text-spanner-engraver.cc:114 +msgid "already have a text spanner" +msgstr "har redan en textbryggare" + +#: text-spanner-engraver.cc:169 +msgid "unterminated text spanner" +msgstr "oavslutad textbryggare" + +#: text-spanner.cc:121 +msgid "Text_spanner too small" +msgstr "Textbryggare för liten" + +#: tfm-reader.cc:106 +#, c-format +msgid "TFM header of `%s' has only %u word (s)" +msgstr "TFM-rubrik i \"%s\" har bara %u ord" + +#: tfm-reader.cc:140 +#, c-format +msgid "%s: TFM file has %u parameters, which is more than the %u I can handle" +msgstr "%s: TFM-fil har %u parametrar, vilket är mer än de %u jag kan hantera" + +#: tfm.cc:77 +#, c-format +msgid "can't find ascii character: %d" +msgstr "kan inte hitta ASCII-tecken: %d" + +#. How to shut up this warning, when no notes appeared because +#. they were suicided by Thread_devnull_engraver? +#: tie-engraver.cc:220 tie-performer.cc:173 +msgid "No ties were created!" +msgstr "Inga bågar skapades!" + +#: tie-engraver.cc:240 +msgid "lonely tie" +msgstr "ensam båge" + +#: time-scaled-music-iterator.cc:25 +msgid "no one to print a tuplet start bracket" +msgstr "det finns ingen som kan skriva en starthake för tupel" + +#: timing-translator.cc:38 +#, c-format +msgid "barcheck failed at: %s" +msgstr "taktkontroll misslyckades vid: %s" + +#: translator-ctors.cc:40 +#, c-format +msgid "unknown translator: `%s'" +msgstr "okänd översättare: \"%s\"" + +#: translator-def.cc:99 +msgid "Program has no such type" +msgstr "Programmet har ingen sådan typ" + +#: translator-def.cc:105 +#, c-format +msgid "Already contains: `%s'" +msgstr "Innehåller redan: \"%s\"" + +#: translator-def.cc:106 +#, c-format +msgid "Not adding translator: `%s'" +msgstr "Lägger inte till översättare: \"%s\"" + +#: translator-def.cc:224 +#, c-format +msgid "can't find: `%s'" +msgstr "kan inte hitta: \"%s\"" + +#: translator-group.cc:146 +#, c-format +msgid "can't find or create `%s' called `%s'" +msgstr "kan inte hitta eller skapa \"%s\" kallad \"%s\"" + +#: translator-group.cc:231 +#, c-format +msgid "can't find or create: `%s'" +msgstr "kan inte hitta eller skapa: \"%s\"" + +#: translator-group.cc:414 +#, c-format +msgid "Can't find property type-check for `%s'. Perhaps you made a typing error? Doing assignment anyway." +msgstr "Kan inte hitta egenskapstypkontroll för \"%s\". Kanske har du gjort ett typfel? Gör tilldelning i alla fall." + +#: translator-group.cc:428 +#, c-format +msgid "Type check for `%s' failed; value `%s' must be of type `%s'" +msgstr "Typkontroll för \"%s\" misslyckades. Värde \"%s\" måste ha typen \"%s\"" + +#. programming_error? +#: translator-group.cc:447 +msgid "ly-get-trans-property: expecting a Translator_group argument" +msgstr "ly-get-trans-property: väntade ett Translator_group-argument" + +#: volta-engraver.cc:87 +msgid "No volta spanner to end" +msgstr "Ingen reprisbryggare till slutet" + +#: volta-engraver.cc:104 +msgid "Already have a volta spanner. Stopping that one prematurely." +msgstr "Har redan en reprisbryggare. Stoppar den tidigare." + +#: volta-engraver.cc:108 +msgid "Also have a stopped spanner. Giving up." +msgstr "Har också en stoppad bryggare. Ger upp." + +#: parser.yy:121 +#, c-format +msgid "Expecting %d arguments" +msgstr "Väntade %d argument" + +#: parser.yy:423 +msgid "Identifier should have alphabetic characters only" +msgstr "Identifierare får bara innehålla alfabetiska tecken" + +#: parser.yy:697 +msgid "More alternatives than repeats. Junking excess alternatives." +msgstr "Fler alternativ än repriser. Slänger överblivna alternativ." + +#: parser.yy:761 +msgid "Second argument must be a symbol" +msgstr "Andra argumentet måste vara en symbol" + +#: parser.yy:766 +msgid "First argument must be a procedure taking 1 argument" +msgstr "Första argumentet måste vara en procedur som tar 1 argument" + +#: parser.yy:1263 +msgid "Expecting string as script definition" +msgstr "Väntade sträng som skriptdefinition" + +#: parser.yy:1273 +msgid "Can't specify direction for this request" +msgstr "Kan inte ange riktning för denna förfrågan" + +#: parser.yy:1398 +msgid "Expecting musical-pitch value" +msgstr "Väntade notvärde" + +#: parser.yy:1409 +msgid "Must have duration object" +msgstr "Måste ha längdobjekt" + +#: parser.yy:1418 parser.yy:1426 +msgid "Have to be in Lyric mode for lyrics" +msgstr "Måste vara i textläge (Lyric mode) för text" + +#: parser.yy:1579 parser.yy:1636 +#, c-format +msgid "not a duration: %d" +msgstr "inte en längd: %d" + +#: parser.yy:1645 +msgid "Have to be in Note mode for notes" +msgstr "Måste vara i notläge (Note mode) för noter" + +#: parser.yy:1731 +msgid "Have to be in Chord mode for chords" +msgstr "Måste vara i ackordläge (Chord mode) för ackord" + +#: parser.yy:1911 +msgid "need integer number arg" +msgstr "behöver heltalsargument" + +#: lexer.ll:174 +msgid "EOF found inside a comment" +msgstr "filslut hittat inuti en kommentar" + +#: lexer.ll:188 +msgid "\\maininput disallowed outside init files" +msgstr "\\maininput förbjudet utanför init-filer" + +#: lexer.ll:212 +#, c-format +msgid "wrong or undefined identifier: `%s'" +msgstr "felaktig eller odefinierad identifierare: \"%s\"" + +#. backup rule +#: lexer.ll:221 +msgid "Missing end quote" +msgstr "Saknat slutcitationstecken" + +#. backup rule +#: lexer.ll:243 lexer.ll:247 +msgid "white expected" +msgstr "väntade tomrum" + +#: lexer.ll:256 +msgid "Can't evaluate Scheme in safe mode" +msgstr "Kan inte evaluera Scheme i säkert läge" + +#: lexer.ll:349 +msgid "Brace found at end of lyric. Did you forget a space?" +msgstr "Krullparentes funnen i slutet på text. Glömde du ett mellanslag?" + +#: lexer.ll:457 +#, c-format +msgid "invalid character: `%c'" +msgstr "ogiltigt tecken: \"%c\"" + +#: lexer.ll:538 +#, c-format +msgid "unknown escaped string: `\\%s'" +msgstr "okänd \"escaped\" sträng: \"\\%s\"" + +#: lexer.ll:617 +#, c-format +msgid "Oldest supported input version: %s" +msgstr "Äldsta indataversion som stöds: %s" + +#: lexer.ll:629 +#, c-format +msgid "incorrect lilypond version: %s (%s, %s)" +msgstr "felaktig lilypond-version: %s (%s, %s)" + +#: lexer.ll:630 +msgid "Consider converting the input with the convert-ly script" +msgstr "Fundera på att konvertera indata med skriptet \"convert-ly\"" + +#: lilypond-item.cc:161 +#, c-format +msgid "#32 in quarter: %d" +msgstr "#32 i fjärdedel: %d" + +#: lilypond-score.cc:108 +#, c-format +msgid "LY output to `%s'..." +msgstr "LY-utdata till \"%s\"..." + +#: lilypond-score.cc:119 +#, c-format +msgid "track %d:" +msgstr "spår %d:" + +#: lilypond-score.cc:155 +msgid "Processing..." +msgstr "Behandlar..." + +#: lilypond-score.cc:164 +msgid "Creating voices..." +msgstr "Skapar stämmor..." + +#: lilypond-score.cc:168 +msgid "track " +msgstr "spår " + +#: lilypond-score.cc:177 +msgid "NOT Filtering tempo..." +msgstr "Filtrerar INTE tempo..." + +#: lilypond-score.cc:186 +msgid "NOT Quantifying columns..." +msgstr "Kvantifierar INTE kolumner..." + +#: lilypond-score.cc:190 +msgid "Quantifying columns..." +msgstr "Kvantifierar kolumner..." + +#: lilypond-score.cc:223 +msgid "Settling columns..." +msgstr "Bestämmer kolumner..." + +#: lilypond-staff.cc:209 +msgid "% MIDI copyright:" +msgstr "% MIDI-copyright:" + +#: lilypond-staff.cc:210 +msgid "% MIDI instrument:" +msgstr "% MIDI-instrument:" + +#: lilypond-stream.cc:37 +#, c-format +msgid "lily indent level: %d" +msgstr "indenteringsnivå för lily: %d" + +# Kanske man inte ska översätta, men då får de ta bort _() i stället för +# att skriva en fånig kommentar +#. Maybe better not to translate these? +#: lilypond-stream.cc:83 +msgid "% Creator: " +msgstr "% Skapare: " + +#: lilypond-stream.cc:88 +msgid "% Automatically generated" +msgstr "% Automatgenererad" + +#: lilypond-stream.cc:97 +#, c-format +msgid "% from input file: " +msgstr "% från indatafil: " + +#: main.cc:94 +msgid "write exact durations, e.g.: a4*385/384" +msgstr "skriv exakta länger, t.ex: a4*385/384" + +#: main.cc:95 +msgid "enable debugging output" +msgstr "slå på felsökningsutdata" + +#: main.cc:97 +msgid "ACC[:MINOR]" +msgstr "TON[:MOLL]" + +#: main.cc:97 +msgid "set key: ACC +sharps/-flats; :1 minor" +msgstr "sätt tonart: TON +höjningar/-sänkningar; :1 moll" + +#: main.cc:98 +msgid "don't output tuplets, double dots or rests, smallest is 32" +msgstr "mata inte ut tupler, dubbelpunkteringar eller pauser, minsta är 32" + +#: main.cc:99 +msgid "set FILE as default output" +msgstr "sätt FIL som standardutdata" + +#: main.cc:100 +msgid "don't output tuplets" +msgstr "mata inte ut tupler" + +#: main.cc:101 +msgid "be quiet" +msgstr "var tyst" + +#: main.cc:102 +msgid "don't output rests or skips" +msgstr "mata inte ut pauser eller hopp" + +#: main.cc:103 +msgid "DUR" +msgstr "LÄNGD" + +#: main.cc:103 +msgid "set smallest duration" +msgstr "ställ in minsta längd" + +#: main.cc:104 +msgid "don't timestamp the output" +msgstr "tidsstämpla inte utdata" + +#: main.cc:106 +msgid "be verbose" +msgstr "var utförlig" + +#: main.cc:108 +msgid "assume no double dotted notes" +msgstr "anta inga dubbelpunkterade noter" + +#: main.cc:115 +#, c-format +msgid "Usage: %s [OPTION]... [FILE]" +msgstr "Användning: %s [FLAGGA]... [FIL]" + +#: main.cc:117 +msgid "Translate MIDI-file to lilypond" +msgstr "Översätt MIDI-fil till lilypond" + +#: main.cc:131 +#, c-format +msgid "no_double_dots: %d\n" +msgstr "no_double_dots: %d\n" + +#: main.cc:133 +#, c-format +msgid "no_rests: %d\n" +msgstr "no_rests: %d\n" + +#: main.cc:135 +#, c-format +msgid "no_quantify_b_s: %d\n" +msgstr "no_quantify_b_s: %d\n" + +#: main.cc:137 +#, c-format +msgid "no_smaller_than: %d (1/%d)\n" +msgstr "no_smaller_than: %d (1/%d)\n" + +#: main.cc:140 +#, c-format +msgid "no_tuplets: %d\n" +msgstr "no_tuplets: %d\n" + +#: midi-parser.cc:64 +msgid "zero length string encountered" +msgstr "sträng med längd noll påträffad" + +#: midi-score-parser.cc:44 +msgid "MIDI header expected" +msgstr "väntade MIDI-rubrik" + +#: midi-score-parser.cc:49 +msgid "invalid header length" +msgstr "felaktig rubriklängd" + +#: midi-score-parser.cc:52 +msgid "invalid MIDI format" +msgstr "ogiltigt MIDI-format" + +#: midi-score-parser.cc:55 +msgid "invalid number of tracks" +msgstr "ogiltigt antal spår" + +#: midi-score-parser.cc:58 +msgid "can't handle non-metrical time" +msgstr "kan inte hantera icke-metrisk tid" + +#: midi-track-parser.cc:68 +#, c-format +msgid "Junking note-end event: channel = %d, pitch = %d" +msgstr "Slänger notslutshändelse: kanal = %d, ton = %d" + +#: midi-track-parser.cc:124 +msgid "invalid running status" +msgstr "ogiltig körstatus" + +#: midi-track-parser.cc:328 +msgid "unimplemented MIDI meta-event" +msgstr "oimplementerad MIDI-metahändelse" + +#: midi-track-parser.cc:333 +msgid "invalid MIDI event" +msgstr "ogiltig MIDI-händelse" + +#: midi-track-parser.cc:348 +msgid "MIDI track expected" +msgstr "väntade MIDI-spår" + +#: midi-track-parser.cc:353 +msgid "invalid track length" +msgstr "ogiltig spårlängd" diff -urN ../lilypond-1.4.8/scm/ascii-script.scm ./scm/ascii-script.scm --- ../lilypond-1.4.8/scm/ascii-script.scm Thu Mar 29 15:09:17 2001 +++ ./scm/ascii-script.scm Tue Oct 2 00:48:47 2001 @@ -269,4 +269,4 @@ ) (define (scm-as-output) - (ly-eval (as-scm 'all-definitions))) + (primitive-eval (as-scm 'all-definitions))) diff -urN ../lilypond-1.4.8/scm/basic-properties.scm ./scm/basic-properties.scm --- ../lilypond-1.4.8/scm/basic-properties.scm Wed Mar 21 16:46:21 2001 +++ ./scm/basic-properties.scm Thu Nov 1 16:26:44 2001 @@ -26,6 +26,7 @@ (let ((result (assoc glyph '((":|:" . (":|" . "|:")) ("|" . ("|" . "")) + ("||:" . ("||" . "|:")) ("|s" . (nil . "|")) ("|:" . ("|" . "|:")) ("|." . ("|." . nil)) diff -urN ../lilypond-1.4.8/scm/beam.scm ./scm/beam.scm --- ../lilypond-1.4.8/scm/beam.scm Thu Mar 15 17:48:33 2001 +++ ./scm/beam.scm Tue Nov 20 17:38:47 2001 @@ -95,6 +95,8 @@ (define (beam-dir-majority count total) (dir-compare (car count) (cdr count))) +(beam-dir-majority '(0 . 0) '(0 . 0)) + (define (beam-dir-mean count total) (dir-compare (car total) (cdr total))) diff -urN ../lilypond-1.4.8/scm/chord-name.scm ./scm/chord-name.scm --- ../lilypond-1.4.8/scm/chord-name.scm Sun Jul 15 14:14:41 2001 +++ ./scm/chord-name.scm Tue Oct 2 00:48:47 2001 @@ -349,7 +349,7 @@ bass-and-inversion steps))) (define (chord::restyle name style) - (ly-eval (string->symbol + (primitive-eval (string->symbol (string-append (symbol->string name) (symbol->string style))))) diff -urN ../lilypond-1.4.8/scm/drums.scm ./scm/drums.scm --- ../lilypond-1.4.8/scm/drums.scm Wed Mar 28 17:49:05 2001 +++ ./scm/drums.scm Tue Oct 2 00:48:47 2001 @@ -1,7 +1,7 @@ ;;;; drum-"hack". See input/tricks/drums.ly and ly/drumpitch.ly ;;;; 2001/03/25 Rune Zedeler -;;;; changed eval to ly-eval for guile 1.4/1.4.1 compatibility --jcn +;;;; changed eval to primitive-eval for guile 1.4/1.4.1 compatibility --jcn (define (seq-music-list elts) (let* ( (ml (ly-make-music "Sequential_music")) ) @@ -100,7 +100,7 @@ (begin (display p) ;; UGH. FIXME. pitch->string ??? (ly-warn " unknown drumpitch.") - (cdar (ly-eval kit)) + (cdar (primitive-eval kit)) )) ((eq? p (caddr (car pitches))) ((name->paper kit) (caar pitches)) ) (else (p2p (cdr pitches) ) ) @@ -108,12 +108,12 @@ ) ) (define ((name->paper kit) n) - (let n2p ((pitches (ly-eval kit))) + (let n2p ((pitches (primitive-eval kit))) (cond ((eq? pitches '()) (begin (ly-warn (string-append "Kit `" (symbol->string kit) "' doesn't contain drum `" n "'\nSee lily/drumpitch.ly for supported drums.")) - (cdar (ly-eval kit)) + (cdar (primitive-eval kit)) )) ((eq? n (caar pitches)) (cdar pitches) ) (else (n2p (cdr pitches) ) ) diff -urN ../lilypond-1.4.8/scm/grob-description.scm ./scm/grob-description.scm --- ../lilypond-1.4.8/scm/grob-description.scm Tue Aug 21 18:11:21 2001 +++ ./scm/grob-description.scm Sun Nov 18 17:51:04 2001 @@ -304,6 +304,9 @@ (self-alignment-X . 0) (non-rhythmic . #t) (word-space . 0.6) + (ignore-length-mismatch . #f) + (begin-alignment . 4) + (end-alignment . 2) (font-family . roman) (font-shape . upright) (meta . ,(grob-description "LyricText" lyric-syllable-interface text-interface font-interface )) diff -urN ../lilypond-1.4.8/scm/grob-property-description.scm ./scm/grob-property-description.scm --- ../lilypond-1.4.8/scm/grob-property-description.scm Thu Jun 21 00:54:59 2001 +++ ./scm/grob-property-description.scm Sun Nov 18 17:51:04 2001 @@ -360,6 +360,10 @@ (grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a cons of booleans containing (TRANSPARENT . EMPTY).") (grob-property-description 'when moment? "when does this column happen?.") (grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).") +(grob-property-description 'alignment number? "alignment of lyrics on notehead, -1 is LEFT, 0 is CENTRE, 1 is RIGHT .") +(grob-property-description 'ignore-length-mismatch boolean? "if #t, stanzas with shorter lyrics can be moved away from their respective note-head by the lyric alignment code.") +(grob-property-description 'begin-alignment number? "proportion of lyric length from beginning to align with note-head for left-aligned lyrics.") +(grob-property-description 'end-alignment number? "proportion of lyric length from end to align with note-head for right-aligned lyrics.") (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.") (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.") (grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.") diff -urN ../lilypond-1.4.8/scm/interface-description.scm ./scm/interface-description.scm --- ../lilypond-1.4.8/scm/interface-description.scm Tue Aug 21 18:11:31 2001 +++ ./scm/interface-description.scm Sun Nov 18 17:51:04 2001 @@ -532,7 +532,11 @@ 'lyric-syllable-interface "a single piece of lyrics" '( - word-space + word-space + alignment + ignore-length-mismatch + begin-alignment + end-alignment )) @@ -773,7 +777,7 @@ )) -(ly-eval (cons +(primitive-eval (cons 'begin (map (lambda (x) (list 'define (car x) (list 'quote (cdr x)))) all-interfaces))) diff -urN ../lilypond-1.4.8/scm/lily.scm ./scm/lily.scm --- ../lilypond-1.4.8/scm/lily.scm Thu Jun 28 16:02:04 2001 +++ ./scm/lily.scm Tue Nov 20 17:39:56 2001 @@ -54,11 +54,13 @@ ;;; Un-assorted stuff ;; URG guile-1.4/1.4.x compatibility -(define (ly-eval x) (eval2 x #f)) +(if (not (defined? 'primitive-eval)) + (define (primitive-eval form) + (eval2 form #f))) (define (sign x) (if (= x 0) - 1 + 0 (if (< x 0) -1 1))) (define (write-me n x) diff -urN ../lilypond-1.4.8/scm/pdf.scm ./scm/pdf.scm --- ../lilypond-1.4.8/scm/pdf.scm Sun May 20 21:17:33 2001 +++ ./scm/pdf.scm Tue Oct 2 00:48:47 2001 @@ -281,7 +281,7 @@ ) (define (scm-pdf-output) - (ly-eval (pdf-scm 'all-definitions))) + (primitive-eval (pdf-scm 'all-definitions))) ; Local Variables: ; scheme-program-name: "guile" diff -urN ../lilypond-1.4.8/scm/pdftex.scm ./scm/pdftex.scm --- ../lilypond-1.4.8/scm/pdftex.scm Sun May 20 21:17:33 2001 +++ ./scm/pdftex.scm Tue Oct 2 00:48:47 2001 @@ -245,4 +245,4 @@ ) (define (scm-pdftex-output) - (ly-eval (pdftex-scm 'all-definitions))) + (primitive-eval (pdftex-scm 'all-definitions))) diff -urN ../lilypond-1.4.8/scm/ps.scm ./scm/ps.scm --- ../lilypond-1.4.8/scm/ps.scm Thu Jun 28 18:05:32 2001 +++ ./scm/ps.scm Tue Oct 2 00:48:47 2001 @@ -258,4 +258,4 @@ ) (define (scm-ps-output) - (ly-eval (ps-scm 'all-definitions))) + (primitive-eval (ps-scm 'all-definitions))) diff -urN ../lilypond-1.4.8/scm/tex.scm ./scm/tex.scm --- ../lilypond-1.4.8/scm/tex.scm Tue Jul 24 13:39:37 2001 +++ ./scm/tex.scm Tue Oct 2 00:48:47 2001 @@ -257,4 +257,4 @@ ) (define (scm-tex-output) - (ly-eval (tex-scm 'all-definitions))) + (primitive-eval (tex-scm 'all-definitions))) diff -urN ../lilypond-1.4.8/scm/translator-description.scm ./scm/translator-description.scm --- ../lilypond-1.4.8/scm/translator-description.scm Fri May 4 13:13:01 2001 +++ ./scm/translator-description.scm Tue Nov 13 23:40:44 2001 @@ -449,6 +449,13 @@ '(SostenutoPedal SustainPedal UnaCordaPedal) '(pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings ))) + (cons + 'Percent_repeat_engraver + (engraver-description + "Percent_repeat_engraver" + "Engrave percent repeats." + '(PercentRepeat DoublePercentRepeat RepeatSlash) + '( ))) (cons 'Pitch_squash_engraver diff -urN ../lilypond-1.4.8/scripts/abc2ly.py ./scripts/abc2ly.py --- ../lilypond-1.4.8/scripts/abc2ly.py Tue Aug 21 18:05:28 2001 +++ ./scripts/abc2ly.py Sun Nov 18 01:08:53 2001 @@ -32,7 +32,8 @@ # the default placement for text in abc is above the staff. # %%LY now supported. # \breve and \longa supported. - +# M:none doesn't crash lily. + # Limitations # # Multiple tunes in single file not supported @@ -67,6 +68,7 @@ UNDEF = 255 state = UNDEF +strict = 0 voice_idx_dict = {} header = {} header['footnotes'] = '' @@ -88,6 +90,13 @@ alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ" HSPACE=' \t' midi_specs = '' + + +def error (msg): + sys.stderr.write (msg) + if strict: + sys.exit (1) + def check_clef(s): if not s: @@ -155,6 +164,7 @@ ks = hdr.keys () ks.sort () for k in ks: + hdr[k] = re.sub('"', '\\"', hdr[k]) outf.write ('\t%s = "%s"\n'% (k,hdr[k])) outf.write ('}') @@ -217,7 +227,7 @@ array2=string.split(array[1],'=') denominator=array2[0] perminute=array2[1] - duration=str(string.atof(denominator)/string.atoi(numerator)) + duration=str(string.atoi(denominator)/string.atoi(numerator)) midi_specs=string.join(["\\tempo", duration, "=", perminute]) else: sys.stderr.write("abc2ly: Warning, unable to parse Q specification: %s\n" % a) @@ -457,6 +467,7 @@ key_count = flat_key_seq.index (keytup) accseq = map (lambda x: (3*x + 3 ) % 7, range (1, key_count + 1)) else: + error ("Huh?") raise "Huh" key_table = [0] * 7 @@ -480,8 +491,10 @@ if re.match ('\([2-9]', str): dig = str[1] str = str[2:] - state.parsing_tuplet = string.atoi (dig[0]) - + prev_tuplet_state = state.parsing_tuplet + state.parsing_tuplet = string.atoi (dig[0]) + if prev_tuplet_state: + voices_append ("}") voices_append ("\\times %s {" % tup_lookup[dig]) return str @@ -576,7 +589,10 @@ a = re.sub('[ \t]*$','', a) #strip trailing blanks if header.has_key('title'): if a: - header['title'] = header['title'] + '\\\\\\\\' + a + if len(header['title']): + header['title'] = header['title'] + '\\\\\\\\' + a + else: + header['subtitle'] = a else: header['title'] = a if g == 'M': # Meter @@ -594,7 +610,8 @@ set_default_len_from_time_sig (a) else: length_specified = 0 - voices_append ('\\time %s' % a) + if not a == 'none': + voices_append ('\\time %s' % a) state.next_bar = '' if g == 'K': # KEY a = check_clef(a) @@ -703,6 +720,9 @@ if base == 1: if (multiply_tup[0] / multiply_tup[1]) == 2: base = '\\breve' + if (multiply_tup[0] / multiply_tup[1]) == 3: + base = '\\breve' + dots = 1 if (multiply_tup[0] / multiply_tup[1]) == 4: base = '\longa' return '%s%s' % ( base, '.'* dots) @@ -1226,8 +1246,7 @@ ln = junk_space (ln) if ln: - msg = "%s: %d: Huh? Don't understand\n" % (fn, lineno) - sys.stderr.write (msg) + error ("%s: %d: Huh? Don't understand\n" % (fn, lineno)) left = orig_ln[0:-len (ln)] sys.stderr.write (left + '\n') sys.stderr.write (' ' * len (left) + ln + '\n') @@ -1246,9 +1265,16 @@ -h, --help this help -o, --output=FILE set output filename to FILE -v, --version version information - + -s, --strict be strict about succes. + This program converts ABC music files (see http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt) To LilyPond input. + + +Report bugs to bug-gnu-music@gnu.org + +Written by Han-Wen Nienhuys , Laura Conrad +, Roy Rankin """ def print_version (): @@ -1256,7 +1282,7 @@ -(options, files) = getopt.getopt (sys.argv[1:], 'vo:h', ['help','version', 'output=']) +(options, files) = getopt.getopt (sys.argv[1:], 'vo:hs', ['help','version', 'output=', 'strict']) out_filename = '' for opt in options: @@ -1265,11 +1291,12 @@ if o== '--help' or o == '-h': help () sys.exit (0) - if o == '--version' or o == '-v': + elif o == '--version' or o == '-v': print_version () sys.exit(0) - - if o == '--output' or o == '-o': + elif o == '--strict' or o == '-s': + strict = 1 + elif o == '--output' or o == '-o': out_filename = a else: print o diff -urN ../lilypond-1.4.8/scripts/as2text.scm ./scripts/as2text.scm --- ../lilypond-1.4.8/scripts/as2text.scm Thu Mar 29 15:09:17 2001 +++ ./scripts/as2text.scm Mon Nov 19 17:25:27 2001 @@ -162,12 +162,14 @@ ;;; Helper functions + + (define (af-gulp-file name) ;; urg (let ((old-load-path %load-path)) (set! %load-path (cons (string-append - (or (getenv 'LILYPONDPREFIX) ".") "/mf") + (or (getenv "LILYPONDPREFIX") ".") "/mf") (cons (string-append lily-home "/mf") %load-path))) (let* ((path (%search-load-path name)) (text (if path diff -urN ../lilypond-1.4.8/scripts/etf2ly.py ./scripts/etf2ly.py --- ../lilypond-1.4.8/scripts/etf2ly.py Tue Aug 21 18:05:28 2001 +++ ./scripts/etf2ly.py Sun Nov 18 01:08:53 2001 @@ -1,7 +1,7 @@ #!@PYTHON@ # info mostly taken from looking at files. See also -# http://www.cs.uu.nl/~hanwen/lily-devel/etf.html +# http://lilypond.org/wiki/?EnigmaTransportFormat # This supports # @@ -13,7 +13,7 @@ # * articulation # * grace notes # * tuplets - +# # todo: # * slur/stem directions @@ -22,7 +22,7 @@ # * beams (better use autobeam?) # * more robust: try entertainer.etf (freenote) # * dynamics -# * automatic `deletion' of invalid items +# * empty measures (eg. twopt03.etf from freenote) # @@ -174,16 +174,7 @@ (n, a) = tuple2 nn = chr ((n+ 2)%7 + ord ('a')) - if a == -1: - nn = nn + 'es' - elif a == -2: - nn = nn + 'eses' - elif a == 1: - nn = nn + 'is' - elif a == 2: - nn = nn + 'isis' - - return nn + return nn + {-2:'eses', -1:'es', 0:'', 1:'is', 2:'isis'}[a] class Tuplet: @@ -225,16 +216,16 @@ sys.stderr.write ("\nHuh? Tuplet starting at entry %d was too short." % self.start_note) class Slur: - def __init__ (self, number): + def __init__ (self, number, params): self.number = number - self.finale = [] + self.finale = params def append_entry (self, finale_e): self.finale.append (finale_e) def calculate (self, chords): - startnote = self.finale[0][5] - endnote = self.finale[3][2] + startnote = self.finale[5] + endnote = self.finale[3*6 + 2] try: cs = chords[startnote] ce = chords[endnote] @@ -254,7 +245,9 @@ self.number = number self.keysignature = None self.scale = None - + self.force_break = 0 + + self.repeats = [] self.finale = [] def __str__ (self): @@ -263,7 +256,8 @@ def set_timesig (self, finale): (beats, fdur) = finale (log, dots) = EDU_to_duration (fdur) - assert dots == 0 + if dots <> 0: + sys.stderr.write ("\nHuh? Beat duration has a dot? (EDU Duration = %d)" % fdur) self.timesig = (beats, log) def length (self): @@ -274,32 +268,60 @@ self.keysignature = k self.scale = find_scale (k) + def set_flags (self,flag1, flag2): + + # flag1 isn't all that interesting. + if flag2 & 0x8000: + self.force_break = 1 + + if flag2 & 0x0008: + self.repeats.append ('start') + if flag2 & 0x0004: + self.repeats.append ('stop') + + if flag2 & 0x0002: + if flag2 & 0x0004: + self.repeats.append ('bracket') articulation_dict ={ - 11: '\\prall', - 12: '\\mordent', - 8: '\\fermata', - 4: '^', - 1: '.', - 3: '>', - 18: '"arp"' , # arpeggio + 94: '^', + 109: '\\prall', + 84: '\\turn', + 62: '\\mordent', + 85: '\\fermata', + 46: '.', +# 3: '>', +# 18: '\arpeggio' , } +class Articulation_def: + def __init__ (self, n, a, b): + self.finale_glyph = a & 0xff + self.number = n + + def dump (self): + try: + return articulation_dict[self.finale_glyph] + except KeyError: + sys.stderr.write ("\nUnknown articulation no. %d" % self.finale_glyph) + sys.stderr.write ("\nPlease add an entry to articulation_dict in the Python source") + return None + class Articulation: def __init__ (self, a,b, finale): - self.type = finale[0] + self.definition = finale[0] self.notenumber = b - def calculate (self, chords): + + def calculate (self, chords, defs): c = chords[self.notenumber] - try: - a = articulation_dict[self.type] - except KeyError: - sys.stderr.write ("\nUnknown articulation no. %d on note no. %d" % (self.type, self.notenumber)) - sys.stderr.write ("\nPlease add an entry to articulation_dict in the Python source") - a = '"art"' - - c.note_suffix = '-' + a + c.note_suffix + adef = defs[self.definition] + lystr =adef.dump() + if lystr == None: + lystr = '"art"' + sys.stderr.write ("\nThis happened on note %d" % self.notenumber) + + c.note_suffix = '-' + lystr class Syllable: def __init__ (self, a,b , finale): @@ -355,8 +377,6 @@ self.staff = None self.valid = 1 - def add_finale_entry (self, entry): - self.finale.append (entry) def valid (self): return self.valid @@ -365,13 +385,11 @@ if len (self.finale) < 2: fs = self.finale[0] - fs = map (string.atoi, list (fs)) + self.clef = fs[1] self.frames = [fs[0]] else: - fs = self.finale[0] + self.finale[1] - - fs = map (string.atoi, list (fs)) + fs = self.finale self.clef = fs[0] self.flags = fs[1] self.frames = fs[2:] @@ -438,15 +456,13 @@ self.measures = [] def get_measure (self, no): - if len (self.measures) <= no: - self.measures = self.measures + [None]* (1 + no - len (self.measures)) + fill_list_to (self.measures, no) if self.measures[no] == None: m = Measure (no) self.measures [no] =m m.staff = self - return self.measures[no] def staffid (self): return 'staff' + encodeint (self.number - 1) @@ -465,13 +481,35 @@ g = m.global_measure e = '' - if g and last_key <> g.keysignature: - e = e + "\\key %s \\major " % lily_notename (g.keysignature) - last_key = g.keysignature - if g and last_time <> g.timesig : - e = e + "\\time %d/%d " % g.timesig - last_time = g.timesig + + if g: + if last_key <> g.keysignature: + e = e + "\\key %s \\major " % lily_notename (g.keysignature) + last_key = g.keysignature + if last_time <> g.timesig : + e = e + "\\time %d/%d " % g.timesig + last_time = g.timesig + + if 'start' in g.repeats: + e = e + ' \\bar "|:" ' + + + # we don't attempt voltas since they fail easily. + if 0 : # and g.repeat_bar == '|:' or g.repeat_bar == ':|:' or g.bracket: + strs = [] + if g.repeat_bar == '|:' or g.repeat_bar == ':|:' or g.bracket == 'end': + strs.append ('#f') + + if g.bracket == 'start': + strs.append ('"0."') + + str = string.join (map (lambda x: '(volta %s)' % x, strs)) + + e = e + ' \\property Score.repeatCommands = #\'(%s) ' % str + + if g.force_break: + e = e + ' \\break ' if last_clef <> m.clef : e = e + '\\clef "%s"' % lily_clef (m.clef) @@ -484,7 +522,8 @@ if g: gap = rat_add (gap, g.length ()) - + if 'stop' in g.repeats: + k = k + ' \\bar ":|" ' k = '%sglobal = \\notes { %s }\n\n ' % (self.staffid (), k) return k @@ -501,17 +540,15 @@ gap = (0,1) for m in self.measures[1:]: if not m or not m.valid: - sys.stderr.write ("Skipping non-existant measure") + sys.stderr.write ("Skipping non-existant or invalid measure\n") continue fr = None try: fr = m.frames[x] except IndexError: - - sys.stderr.write ("Skipping nonexistent frame") - laystr = laystr + "% FOOBAR ! \n" - print laystr + sys.stderr.write ("Skipping nonexistent frame %d\n" % x) + laystr = laystr + "%% non existent frame %d (skipped) \n" % x if fr: first_frame = fr if gap <> (0,1): @@ -543,15 +580,24 @@ +def ziplist (l): + if len (l) < 2: + return [] + else: + return [(l[0], l[1])] + ziplist (l[2:]) + class Chord: - def __init__ (self, finale_entry): + def __init__ (self, number, contents): self.pitches = [] self.frame = None - self.finale = finale_entry + self.finale = contents[:7] + + self.notelist = ziplist (contents[7:]) self.duration = None self.next = None self.prev = None + self.number = number self.note_prefix= '' self.note_suffix = '' self.chord_suffix = '' @@ -579,37 +625,37 @@ mylen = rat_multiply (mylen, self.tuplet.factor()) return mylen - def number (self): - return self.finale[0][0] def EDU_duration (self): - return self.finale[0][3] + return self.finale[2] def set_duration (self): self.duration = EDU_to_duration(self.EDU_duration ()) + def calculate (self): self.find_realpitch () self.set_duration () - flag = self.finale[0][5] + flag = self.finale[4] if Chord.GRACE_MASK & flag: self.grace = 1 - + def find_realpitch (self): - - ((no, prev, next, dur, pos, entryflag, extended, follow), notelist) = self.finale meas = self.measure () tiestart = 0 if not meas or not meas.global_measure : - print 'note %d not in measure' % self.number () + sys.stderr.write ('note %d not in measure\n' % self.number) elif not meas.global_measure.scale: - print 'note %d: no scale in this measure.' % self.number () + sys.stderr.write ('note %d: no scale in this measure.' % self.number) else: - for p in notelist: + + for p in self.notelist: (pitch, flag) = p - + + nib1 = pitch & 0x0f + if nib1 > 8: nib1 = -(nib1 - 8) rest = pitch / 16 @@ -632,7 +678,8 @@ rest = '' - if not (self.finale[0][5] & Chord.REST_MASK): + + if not (self.finale[4] & Chord.REST_MASK): rest = 'r' for p in self.pitches: @@ -664,40 +711,141 @@ s = self.chord_prefix + s + self.chord_suffix return s -GFre = re.compile(r"""^\^GF\(([0-9-]+),([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -BCre = re.compile (r"""^\^BC\(([0-9-]+)\) ([0-9-]+) .*$""") -eEre = re.compile(r"""^\^eE\(([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) \$([0-9A-Fa-f]+) ([0-9-]+) ([0-9-]+)""") -FRre = re.compile (r"""^\^FR\(([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -MSre = re.compile (r"""^\^MS\(([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -note_re = re.compile (r"""^ +([0-9-]+) \$([A-Fa-f0-9]+)""") -Sxre = re.compile (r"""^\^Sx\(([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -IMre = re.compile (r"""^\^IM\(([0-9-]+),([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -vere = re.compile(r"""^\^(ve|ch|se)\(([0-9-]+),([0-9-]+)\) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") -versere = re.compile(r"""^\^verse\(([0-9]+)\)(.*)\^end""") -TPre = re.compile(r"""^\^TP\(([0-9]+),([0-9]+)\) *([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)""") +def fill_list_to (list, no): + """ +Add None to LIST until it contains entry number NO. + """ + while len (list) <= no: + list.extend ([None] * (no - len(list) + 1)) + return list + +def read_finale_value (str): + """ +Pry off one value from STR. The value may be $hex, decimal, or "string". +Return: (value, rest-of-STR) + """ + while str and str[0] in ' \t\n': + str = str[1:] + + if not str: + return (None,str) + + if str[0] == '$': + str = str [1:] + + hex = '' + while str and str[0] in '0123456789ABCDEF': + hex = hex + str[0] + str = str[1:] + + + return (string.atol (hex, 16), str) + elif str[0] == '"': + str = str[1:] + s = '' + while str and str[0] <> '"': + s = s + str[0] + str = str[1:] + + return (s,str) + elif str[0] in '-0123456789': + dec = '' + while str and str[0] in '-0123456789': + dec = dec + str[0] + str = str[1:] + + return (string.atoi (dec), str) + else: + sys.stderr.write ("Can't convert `%s'\n" % str) + return (None, str) + + + + +def parse_etf_file (fn, tag_dict): + + """ Read FN, putting ETF info into + a giant dictionary. The keys of TAG_DICT indicate which tags + to put into the dict. + """ + + sys.stderr.write ('parsing ... ' ) + f = open (fn) + + gulp = re.sub ('[\n\r]+', '\n', f.read ()) + ls = string.split (gulp, '\n^') + + etf_file_dict = {} + for k in tag_dict.keys (): + etf_file_dict[k] = {} + + last_tag = None + last_numbers = None + + + for l in ls: + m = re.match ('^([a-zA-Z0-9&]+)\(([^)]+)\)', l) + if m and tag_dict.has_key (m.group (1)): + tag = m.group (1) + + indices = tuple (map (string.atoi, string.split (m.group (2), ','))) + content = l[m.end (2)+1:] + + + tdict = etf_file_dict[tag] + if not tdict.has_key (indices): + tdict[indices] = [] + + + parsed = [] + + if tag == 'verse' or tag == 'block': + m2 = re.match ('(.*)\^end', content) + if m2: + parsed = [m2.group (1)] + else: + while content: + (v, content) = read_finale_value (content) + if v <> None: + parsed.append (v) + + tdict [indices].extend (parsed) + + last_indices = indices + last_tag = tag + + continue + +# let's not do this: this really confuses when eE happens to be before a ^text. +# if last_tag and last_indices: +# etf_file_dict[last_tag][last_indices].append (l) + + sys.stderr.write ('\n') + return etf_file_dict + + + class Etf_file: def __init__ (self, name): self.measures = [None] - self.entries = [None] self.chords = [None] self.frames = [None] self.tuplets = [None] self.staffs = [None] - self.slur_dict = {} + self.slurs = [None] self.articulations = [None] self.syllables = [None] self.verses = [None] - + self.articulation_defs = [None] + ## do it self.parse (name) def get_global_measure (self, no): - if len (self.measures) <= no: - self.measures = self.measures + [None]* (1 + no - len (self.measures)) - + fill_list_to (self.measures, no) if self.measures[no] == None: self.measures [no] = Global_measure (no) @@ -705,178 +853,124 @@ def get_staff(self,staffno): - if len (self.staffs) <= staffno: - self.staffs = self.staffs + [None] * (1 + staffno - len (self.staffs)) - + fill_list_to (self.staffs, staffno) if self.staffs[staffno] == None: self.staffs[staffno] = Staff (staffno) return self.staffs[staffno] # staff-spec - def try_IS (self, l): + def try_IS (self, indices, contents): pass - def try_BC (self, l): - m = BCre.match (l) - if m: - bn = string.atoi (m.group (1)) - where = string.atoi (m.group (2)) / 1024.0 - return m - def try_TP(self, l): - m = TPre.match (l) - if m: - (nil, num) = map (string.atoi, (m.groups ()[0:2])) - entries = map (string.atoi, (m.groups ()[2:])) - - if self.tuplets[-1] == None or num <> self.tuplets[-1].start_note: - self.tuplets.append (Tuplet (num)) - - self.tuplets[-1].append_finale (entries) - - def try_IM (self, l): - m = IMre.match (l) - if m: - a = string.atoi (m.group (1)) - b = string.atoi (m.group (2)) - - fin = map (string.atoi, m.groups ()[2:]) - - self.articulations.append (Articulation (a,b,fin)) - return m - def try_verse (self,l): - m = versere .match (l) - if m: - a = string.atoi (m.group (1)) - body =m.group (2) - - body = re.sub (r"""\^[a-z]+\([^)]+\)""", "", body) - body = re.sub ("\^[a-z]+", "", body) - self.verses.append (Verse (a, body)) - - return m - def try_ve (self,l): - m = vere .match (l) - if m: - a = string.atoi (m.group (1)) - b = string.atoi (m.group (2)) - - fin = map (string.atoi, m.groups ()[2:]) - - self.syllables.append (Syllable (a,b,fin)) - return m - def try_eE (self, l): - m = eEre.match (l) - if m: - tup = m.groups() - (no, prev, next, dur, pos, entryflag, extended, follow) = tup - (no, prev, next, dur, pos,extended, follow) \ - = tuple (map (string.atoi, [no,prev,next,dur,pos,extended,follow])) - - entryflag = string.atol (entryflag,16) - if len (self.entries) <= no: - # missing entries seem to be quite common. - # we fill'em up with None. - self.entries = self.entries + [None] * (no - len (self.entries) + 1) - - current_entry = ((no, prev, next, dur, pos, entryflag, extended, follow), []) - self.entries[no] = current_entry - return m - - def try_Sx(self,l): - m = Sxre.match (l) - if m: - slurno = string.atoi (m.group (1)) - - sl = None - try: - sl = self.slur_dict[slurno] - except KeyError: - sl = Slur (slurno) - self.slur_dict[slurno] = sl - - params = list (m.groups ()[1:]) - params = map (string.atoi, params) - sl.append_entry (params) - - return m - def try_GF(self, l): - m = GFre.match (l) - if m: - (staffno,measno) = m.groups ()[0:2] - s = string.atoi (staffno) - me = string.atoi (measno) - - entry = m.groups () [2:] - st = self.get_staff (s) - meas = st.get_measure (me) - meas.add_finale_entry (entry) - - # frame ? - def try_FR(self, l): - m = FRre.match (l) - if m: - (frameno, startnote, endnote, foo, bar) = m.groups () - (frameno, startnote, endnote) = tuple (map (string.atoi, [frameno, startnote, endnote])) - if len (self.frames) <= frameno: - self.frames = self.frames + [None] * (frameno - len(self.frames) + 1) - - self.frames[frameno] = Frame ((frameno, startnote, endnote)) - - return m - - def try_MS (self, l): - m = MSre.match (l) - if m: - measno = string.atoi (m.group (1)) - keynum = string.atoi (m.group (3)) - meas =self. get_global_measure (measno) - meas.set_keysig (keynum) - - beats = string.atoi (m.group (4)) - beatlen = string.atoi (m.group (5)) - meas.set_timesig ((beats, beatlen)) - - return m - - def try_note (self, l): - m = note_re.match (l) - if m: - (pitch, flag) = m.groups () - pitch = string.atoi (pitch) - flag = string.atol (flag,16) - self.entries[-1][1].append ((pitch,flag)) + def try_BC (self, indices, contents): + bn = indices[0] + where = contents[0] / 1024.0 + def try_TP(self, indices, contents): + (nil, num) = indices + + if self.tuplets[-1] == None or num <> self.tuplets[-1].start_note: + self.tuplets.append (Tuplet (num)) + + self.tuplets[-1].append_finale (contents) + + def try_IM (self, indices, contents): + (a,b) = indices + fin = contents + self.articulations.append (Articulation (a,b,fin)) + def try_verse (self, indices, contents): + a = indices[0] + body = contents[0] + + body = re.sub (r"""\^[a-z]+\([^)]+\)""", "", body) + body = re.sub ("\^[a-z]+", "", body) + self.verses.append (Verse (a, body)) + def try_ve (self,indices, contents): + (a,b) = indices + self.syllables.append (Syllable (a,b,contents)) + + def try_eE (self,indices, contents): + no = indices[0] + (prev, next, dur, pos, entryflag, extended, follow) = contents[:7] + + fill_list_to (self.chords, no) + self.chords[no] =Chord (no, contents) + + def try_Sx(self,indices, contents): + slurno = indices[0] + fill_list_to (self.slurs, slurno) + self.slurs[slurno] = Slur(slurno, contents) + + def try_IX (self, indices, contents): + n = indices[0] + a = contents[0] + b = contents[1] - def parse (self, name): - sys.stderr.write ('parsing ...') - sys.stderr.flush () + ix= None + try: + ix = self.articulation_defs[n] + except IndexError: + ix = Articulation_def (n,a,b) + self.articulation_defs.append (Articulation_def (n, a, b)) - gulp = open (name).read () + def try_GF(self, indices, contents): + (staffno,measno) = indices - gulp = re.sub ('[\n\r]+', '\n', gulp) - ls = string.split (gulp, '\n') + st = self.get_staff (staffno) + meas = st.get_measure (measno) + meas.finale = contents - for l in ls: - m = None - if not m: - m = self.try_MS (l) - if not m: - m = self.try_FR (l) - if not m: - m = self.try_GF (l) - if not m: - m = self.try_note (l) - if not m: - m = self.try_eE (l) - if not m: - m = self.try_IM (l) - if not m: - m = self.try_Sx (l) - if not m: - m = self.try_TP (l) - if not m: - m = self.try_verse (l) + def try_FR(self, indices, contents): + frameno = indices [0] + + startnote = contents[0] + endnote = contents[1] + fill_list_to (self.frames, frameno) + + self.frames[frameno] = Frame ((frameno, startnote, endnote)) + + def try_MS (self, indices, contents): + measno = indices[0] + keynum = contents[1] + meas =self. get_global_measure (measno) + meas.set_keysig (keynum) + + beats = contents[2] + beatlen = contents[3] + meas.set_timesig ((beats, beatlen)) + + meas_flag1 = contents[4] + meas_flag2 = contents[5] + + meas.set_flags (meas_flag1, meas_flag2); + + + routine_dict = { + 'MS': try_MS, + 'FR': try_FR, + 'GF': try_GF, + 'IX': try_IX, + 'Sx' : try_Sx, + 'eE' : try_eE, + 'verse' : try_verse, + 've' : try_ve, + 'IM' : try_IM, + 'TP' : try_TP, + 'BC' : try_BC, + 'IS' : try_IS, + } + + def parse (self, etf_dict): + sys.stderr.write ('reconstructing ...') + sys.stderr.flush () + + for (tag,routine) in Etf_file.routine_dict.items (): + ks = etf_dict[tag].keys () + ks.sort () + for k in ks: + routine (self, k, etf_dict[tag][k]) + sys.stderr.write ('processing ...') sys.stderr.flush () @@ -899,8 +993,11 @@ frame_obj_list = [None] for frno in m.frames: - fr = self.frames[frno] - frame_obj_list.append (fr) + try: + fr = self.frames[frno] + frame_obj_list.append (fr) + except IndexError: + sys.stderr.write ("\nNon-existent frame %d" % frno) m.frames = frame_obj_list for fr in frame_obj_list[1:]: @@ -925,10 +1022,12 @@ for t in self.tuplets[1:]: t.calculate (self.chords) - for s in self.slur_dict.values(): - s.calculate (self.chords) + for s in self.slurs[1:]: + if s: + s.calculate (self.chords) + for s in self.articulations[1:]: - s.calculate (self.chords) + s.calculate (self.chords, self.articulation_defs) def get_thread (self, startno, endno): @@ -942,7 +1041,7 @@ return [] - while c and c.number () <> endno: + while c and c.number <> endno: thread.append (c) c = c.next @@ -978,24 +1077,18 @@ return 'ETF FILE %s %s' % (self.measures, self.entries) def unthread_entries (self): - self.chords = [None] - for e in self.entries[1:]: - ch = None - if e: - ch = Chord (e) - self.chords.append (ch) - for e in self.chords[1:]: if not e: continue - e.prev = self.chords[e.finale[0][1]] - e.next = self.chords[e.finale[0][2]] + + e.prev = self.chords[e.finale[0]] + e.next = self.chords[e.finale[1]] def identify(): sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version)) def help (): - print """Usage: etf2ly [OPTION]... ETF-FILE + sys.stdout.write("""Usage: etf2ly [OPTION]... ETF-FILE Convert ETF to LilyPond. @@ -1008,20 +1101,20 @@ Finale product. This program will convert a subset of ETF to a ready-to-use lilypond file. -Report bugs to bug-lilypond@gnu.org +Report bugs to bug-gnu-music@gnu.org Written by Han-Wen Nienhuys -""" +""") def print_version (): - print r"""etf2ly (GNU lilypond) %s + sys.stdout.write (r"""etf2ly (GNU lilypond) %s This is free software. It is covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Invoke as `midi2ly --warranty' for more information. Copyright (c) 2000 by Han-Wen Nienhuys -""" % version +""" % version) @@ -1052,7 +1145,9 @@ f = '' sys.stderr.write ('Processing `%s\'\n' % f) - e = Etf_file(f) + + dict = parse_etf_file (f, Etf_file.routine_dict) + e = Etf_file(dict) if not out_filename: out_filename = os.path.basename (re.sub ('(?i).etf$', '.ly', f)) diff -urN ../lilypond-1.4.8/scripts/lilypond-book.py ./scripts/lilypond-book.py --- ../lilypond-1.4.8/scripts/lilypond-book.py Sun Sep 16 23:19:02 2001 +++ ./scripts/lilypond-book.py Tue Nov 20 18:21:13 2001 @@ -12,6 +12,10 @@ # geometry.sty and article.cls. Give me a hint, and I'll # fix it.) +# +# TODO: magnification support should also work for texinfo -> html: eg. add as option to dvips. +# + # This is was the idea for handling of comments: # Multiline comments, @ignore .. @end ignore is scanned for # in read_doc_file, and the chunks are marked as 'ignore', so @@ -31,6 +35,8 @@ # The the rest of the rexeces are searched for. They don't have to test # if they are on a commented out line. + + import os import stat import string @@ -43,7 +49,7 @@ program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.4pre' + program_version = '1.4.9' # # Try to cater for bad installations of LilyPond, that have @@ -365,8 +371,8 @@ 'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}", 'output-default-post': "\\def\postLilypondExample{}\n", 'output-default-pre': "\\def\preLilypondExample{}\n", - 'usepackage-graphics': '\\usepackage{graphics}\n', - 'output-eps': '\\noindent\\parbox{\\lilypondepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s.eps}}', + 'usepackage-graphics': '\\usepackage{graphicx}\n', + 'output-eps': '\\noindent\\parbox{\\lilypondepswidth{%(fn)s.eps}}{\includegraphics[width=\\lilypondepswidth{%(fn)s.eps}]{%(fn)s.eps}}', 'output-tex': '\\preLilypondExample \\input %(fn)s.tex \\postLilypondExample\n', 'pagebreak': r'\pagebreak', }, @@ -927,16 +933,6 @@ return newchunks -def find_eps_dims (match): - "Fill in dimensions of EPS files." - - fn =match.group (1) - dims = bounding_box_dimensions (fn) - if g_outdir: - fn = os.path.join(g_outdir, fn) - - return '%ipt' % dims[0] - def system (cmd): sys.stderr.write ("invoking `%s'\n" % cmd) @@ -945,6 +941,40 @@ error ('Error command exited with value %d\n' % st) return st + +def get_bbox (filename): + f = open (filename) + gr = [] + while 1: + l =f.readline () + m = re.match ('^%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', l) + if m: + gr = map (string.atoi, m.groups ()) + break + + return gr + +def make_pixmap (name): + bbox = get_bbox (name + '.eps') + margin = 3 + fo = open (name + '.trans.eps' , 'w') + fo.write ('%d %d translate\n' % (-bbox[0]+margin, -bbox[1]+margin)) + fo.close () + + res = 90 + + x = (2* margin + bbox[2] - bbox[0]) * res / 72. + y = (2* margin + bbox[3] - bbox[1]) * res / 72. + + cmd = r"""gs -g%dx%d -sDEVICE=pgm -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit | pnmtopng > %s""" + + cmd = cmd % (x, y, res, name + '.trans.eps', name + '.eps',name + '.png') + try: + status = system (cmd) + except: + os.unlink (name + '.png') + error ("Removing output file") + def compile_all_files (chunks): global foutn eps = [] @@ -1001,14 +1031,9 @@ for e in eps: system(r"tex '\nonstopmode \input %s'" % e) system(r"dvips -E -o %s %s" % (e + '.eps', e)) + for g in png: - cmd = r"""gs -sDEVICE=pgm -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r90 -dNOPAUSE %s -c quit | pnmcrop | pnmtopng > %s""" - cmd = cmd % (g + '.eps', g + '.png') - try: - status = system (cmd) - except: - os.unlink (g + '.png') - error ("Removing output file") + make_pixmap (g) os.chdir (d) @@ -1159,14 +1184,31 @@ n.append (c) return n + +## what's this? Docme --hwn +## def fix_epswidth (chunks): newchunks = [] for c in chunks: - if c[0] == 'lilypond' and 'eps' in c[2]: - body = re.sub (r"""\\lilypondepswidth{(.*?)}""", find_eps_dims, c[1]) - newchunks.append(('lilypond', body, c[2], c[3], c[4])) - else: + if c[0] <> 'lilypond' or 'eps' not in c[2]: newchunks.append (c) + continue + + mag = 1.0 + for o in c[2]: + m = re.match ('magnification=([0-9.]+)', o) + if m: + mag = string.atof (m.group (1)) + + def replace_eps_dim (match, lmag = mag): + filename = match.group (1) + dims = bounding_box_dimensions (filename) + + return '%fpt' % (dims[0] *lmag) + + body = re.sub (r"""\\lilypondepswidth{(.*?)}""", replace_eps_dim, c[1]) + newchunks.append(('lilypond', body, c[2], c[3], c[4])) + return newchunks diff -urN ../lilypond-1.4.8/scripts/ly2dvi.py ./scripts/ly2dvi.py --- ../lilypond-1.4.8/scripts/ly2dvi.py Thu Aug 23 15:21:55 2001 +++ ./scripts/ly2dvi.py Tue Nov 20 18:35:52 2001 @@ -55,6 +55,9 @@ ''' + + + import os import stat import string @@ -66,105 +69,25 @@ import operator import tempfile import traceback -import resource - - - -datadir = '@datadir@' -sys.path.append (datadir + '/python') + + +################################################################ +# lilylib.py -- options and stuff +# +# source file of the GNU LilyPond music typesetter + try: import gettext - gettext.bindtextdomain ('lilypond', '@localedir@') - gettext.textdomain('lilypond') + gettext.bindtextdomain ('lilypond', localedir) + gettext.textdomain ('lilypond') _ = gettext.gettext except: def _ (s): return s - -layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle', - 'footer', 'head', 'composer', 'arranger', 'instrument', - 'opus', 'piece', 'metre', 'meter', 'poet', 'texttranslator'] - - -# init to empty; values here take precedence over values in the file - -## TODO: change name. -extra_init = { - 'language' : [], - 'latexheaders' : [], - 'latexpackages' : ['geometry'], - 'latexoptions' : [], - 'papersize' : [], - 'pagenumber' : [1], - 'textheight' : [], - 'linewidth' : [], - 'orientation' : [] -} - -extra_fields = extra_init.keys () - -fields = layout_fields + extra_fields -program_name = 'ly2dvi' -help_summary = _ ("Generate .dvi with LaTeX for LilyPond") - -include_path = ['.'] -lily_p = 1 -paper_p = 1 -cache_pks_p = 1 - -PK_PATTERN='feta.*\.[0-9]+pk' - -output_name = '' -targets = { - 'DVI' : 0, - 'LATEX' : 0, - 'MIDI' : 0, - 'TEX' : 0, - } - -track_dependencies_p = 0 -dependency_files = [] - - -# lily_py.py -- options and stuff -# -# source file of the GNU LilyPond music typesetter - -# BEGIN Library for these? -# cut-n-paste from ly2dvi - program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.148' - - -original_dir = os.getcwd () -temp_dir = os.path.join (original_dir, '%s.dir' % program_name) - -keep_temp_dir_p = 0 -verbose_p = 0 - -# -# Try to cater for bad installations of LilyPond, that have -# broken TeX setup. Just hope this doesn't hurt good TeX -# setups. Maybe we should check if kpsewhich can find -# feta16.{afm,mf,tex,tfm}, and only set env upon failure. -# -environment = { - 'MFINPUTS' : datadir + '/mf' + ':', - 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps' + ':', - 'TFMFONTS' : datadir + '/tfm' + ':', - 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa', - 'GS_LIB' : datadir + '/ps', -} - -def setup_environment (): - for key in environment.keys (): - val = environment[key] - if os.environ.has_key (key): - val = os.environ[key] + os.pathsep + val - os.environ[key] = val + program_version = '1.5.17' def identify (): sys.stdout.write ('%s (GNU LilyPond) %s\n' % (program_name, program_version)) @@ -182,8 +105,6 @@ NO WARRANTY.''')) sys.stdout.write ('\n') -errorport=sys.stderr - def progress (s): errorport.write (s + '\n') @@ -296,10 +217,6 @@ Exit status of CMD """ - - # Attempt to fix problems with limited stack size set by Python! - # Sets unlimited stack size. - resource.setrlimit(resource.RLIMIT_STACK, (-1,-1)) if verbose_p: progress (_ ("Invoking `%s\'") % cmd) @@ -322,29 +239,64 @@ shutil.rmtree (temp_dir) -#what a name. -def set_setting (dict, key, val): - try: - val = string.atof (val) - except ValueError: - #warning (_ ("invalid value: %s") % `val`) - pass - - try: - dict[key].append (val) - except KeyError: - warning (_ ("no such setting: %s") % `key`) - dict[key] = [val] - - def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e +################################################################ # END Library + + + + + +# if set, LILYPONDPREFIX must take prevalence +# if datadir is not set, we're doing a build and LILYPONDPREFIX +datadir = '@datadir@' + + +if os.environ.has_key ('LILYPONDPREFIX') : +# huh ? this always leads to exception. +# or '@datadir@' == '@' + 'datadir' + '@': + datadir = os.environ['LILYPONDPREFIX'] +else: + datadir = '@datadir@' + + +while datadir[-1] == os.sep: + datadir= datadir[:-1] + +program_name = 'ly2dvi' + +original_dir = os.getcwd () +temp_dir = os.path.join (original_dir, '%s.dir' % program_name) +errorport = sys.stderr +keep_temp_dir_p = 0 +verbose_p = 0 + +try: + import gettext + gettext.bindtextdomain ('lilypond', '@localedir@') + gettext.textdomain ('lilypond') + _ = gettext.gettext +except: + def _ (s): + return s + +# Attempt to fix problems with limited stack size set by Python! +# Sets unlimited stack size. Note that the resource module only +# is available on UNIX. +try: + import resource + resource.setrlimit (resource.RLIMIT_STACK, (-1, -1)) +except: + pass + +help_summary = _ ("Generate .dvi with LaTeX for LilyPond") + option_definitions = [ ('', 'd', 'dependencies', _ ("write Makefile dependencies for every input file")), ('', 'h', 'help', _ ("this help")), @@ -362,6 +314,90 @@ ('', 'w', 'warranty', _ ("show warranty and copyright")), ] +layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle', + 'footer', 'head', 'composer', 'arranger', 'instrument', + 'opus', 'piece', 'metre', 'meter', 'poet', 'texttranslator'] + + +# init to empty; values here take precedence over values in the file + +## TODO: change name. +extra_init = { + 'language' : [], + 'latexheaders' : [], + 'latexpackages' : ['geometry'], + 'latexoptions' : [], + 'papersize' : [], + 'pagenumber' : [1], + 'textheight' : [], + 'linewidth' : [], + 'orientation' : [] +} + +extra_fields = extra_init.keys () +fields = layout_fields + extra_fields + +include_path = ['.'] +lily_p = 1 +paper_p = 1 +cache_pks_p = 1 + +PK_PATTERN='feta.*\.[0-9]+pk' + +output_name = '' +targets = { + 'DVI' : 0, + 'LATEX' : 0, + 'MIDI' : 0, + 'TEX' : 0, + } + +track_dependencies_p = 0 +dependency_files = [] + + +# +# Try to cater for bad installations of LilyPond, that have +# broken TeX setup. Just hope this doesn't hurt good TeX +# setups. Maybe we should check if kpsewhich can find +# feta16.{afm,mf,tex,tfm}, and only set env upon failure. +# +environment = { + 'MFINPUTS' : datadir + '/mf' + ':', + 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:' + '.:' + + os.getcwd() + ':', + 'TFMFONTS' : datadir + '/tfm' + ':', + 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa', + 'GS_LIB' : datadir + '/ps', +} + + +def setup_environment (): + for key in environment.keys (): + val = environment[key] + if os.environ.has_key (key): + val = os.environ[key] + os.pathsep + val + os.environ[key] = val + +#what a name. +def set_setting (dict, key, val): + try: + val = string.atof (val) + except ValueError: + #warning (_ ("invalid value: %s") % `val`) + pass + + try: + dict[key].append (val) + except KeyError: + warning (_ ("no such setting: %s") % `key`) + dict[key] = [val] + + +def print_environment (): + for (k,v) in os.environ.items (): + sys.stderr.write ("%s=\"%s\"\n" % (k,v)) + def run_lilypond (files, outbase, dep_prefix): opts = '' # opts = opts + '--output=%s.tex' % outbase @@ -381,11 +417,14 @@ fs = string.join (files) if not verbose_p: - progress ( _("Running %s...") % 'LilyPond') # cmd = cmd + ' 1> /dev/null 2> /dev/null' + progress ( _("Running %s...") % 'LilyPond') else: opts = opts + ' --verbose' - + + # for better debugging! + print_environment () + print opts, fs system ('lilypond %s %s ' % (opts, fs)) def analyse_lilypond_output (filename, extra): @@ -537,7 +576,8 @@ ''' if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no': - s = s + '\\pagestyle{plain}\n' + s = s + '\setcounter{page}{%s}\n' % (extra['pagenumber'][-1]) + s = s + '\\pagestyle{plain}\n' else: s = s + '\\pagestyle{empty}\n' @@ -648,12 +688,12 @@ return pfa -(sh, long) = getopt_args (__main__.option_definitions) +(sh, long) = getopt_args (option_definitions) try: (options, files) = getopt.getopt(sys.argv[1:], sh, long) except getopt.error, s: errorport.write ('\n') - errorport.write (_( "error: ") + _ ("getopt says: `%s\'" % s)) + errorport.write (_ ("error: ") + _ ("getopt says: `%s\'" % s)) errorport.write ('\n') errorport.write ('\n') help () @@ -744,6 +784,9 @@ # Ugh, maybe make a setup () function files = map (lambda x: strip_extension (x, '.ly'), files) + # hmmm. Wish I'd 've written comments when I wrote this. + # now it looks complicated. + (outdir, outbase) = ('','') if not output_name: outbase = os.path.basename (files[0]) @@ -756,8 +799,8 @@ for i in ('.dvi', '.latex', '.ly', '.ps', '.tex'): output_name = strip_extension (output_name, i) - - files = map (abspath, files) + outbase = strip_extension (outbase, i) + files = map (abspath, files) if os.path.dirname (output_name) != '.': dep_prefix = os.path.dirname (output_name) @@ -774,6 +817,8 @@ os.chdir (outdir) cp_to_dir (PK_PATTERN, tmpdir) + # to be sure, add tmpdir *in front* of inclusion path. + #os.environ['TEXINPUTS'] = tmpdir + ':' + os.environ['TEXINPUTS'] os.chdir (tmpdir) if lily_p: @@ -844,7 +889,7 @@ else: # FIXME: read from stdin when files[0] = '-' help () - errorport.write ("ly2dvi: " + _ ("error: ") + _ ("no files specified on command line.") + '\n') + errorport.write (program_name + ":" + _ ("error: ") + _ ("no files specified on command line.") + '\n') sys.exit (2) diff -urN ../lilypond-1.4.8/stepmake/bin/add-html-footer.py ./stepmake/bin/add-html-footer.py --- ../lilypond-1.4.8/stepmake/bin/add-html-footer.py Mon May 21 11:13:08 2001 +++ ./stepmake/bin/add-html-footer.py Tue Nov 13 23:40:44 2001 @@ -38,11 +38,12 @@ of @PACKAGE_NAME@ """ + built = r"""


-This page was built from @PACKAGE_NAME@-@PACKAGE_VERSION@ by
+This page was built from @PACKAGE_NAME@-@PACKAGE_VERSION@ (@BRANCH@) by
-

@GCOS@ <@MAIL_ADDRESS@>, +
@GCOS@ <@MAILADDRESS@>, @LOCALTIME@.
""" @@ -188,6 +189,12 @@ # index = "./index.html" # top = "./" + + versiontup = string.split(package_version, '.') + branch_str = 'stable-branch' + if string.atoi ( versiontup[1]) % 2: + branch_str = 'development-branch' + s = re.sub ('@INDEX@', index, s) s = re.sub ('@TOP@', top, s) s = re.sub ('@PACKAGE_NAME@', package_name, s) @@ -195,7 +202,8 @@ s = re.sub ('@WEBMASTER@', webmaster, s) s = re.sub ('@GCOS@', gcos, s) s = re.sub ('@LOCALTIME@', localtime, s) - s = re.sub ('@MAIL_ADDRESS@', mail_address, s) + s = re.sub ('@MAILADDRESS@', mail_address, s) + s = re.sub ('@BRANCH@', branch_str, s) open (f, 'w').write (s) diff -urN ../lilypond-1.4.8/stepmake/stepmake/metafont-rules.make ./stepmake/stepmake/metafont-rules.make --- ../lilypond-1.4.8/stepmake/stepmake/metafont-rules.make Thu May 11 15:10:56 2000 +++ ./stepmake/stepmake/metafont-rules.make Sun Nov 18 01:08:53 2001 @@ -26,6 +26,12 @@ $(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf gftopk $< $@ + + +$(outdir)/%.pfb: + pktrace $(basename $(@F)) + mv $(basename $(@F)).pfb $(outdir) + #%.afm: # $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm) # mv $@ $@.in diff -urN ../lilypond-1.4.8/stepmake/stepmake/metafont-targets.make ./stepmake/stepmake/metafont-targets.make --- ../lilypond-1.4.8/stepmake/stepmake/metafont-targets.make Thu May 11 15:10:56 2000 +++ ./stepmake/stepmake/metafont-targets.make Sun Nov 18 01:08:53 2001 @@ -8,3 +8,6 @@ xpms: $(addprefix $(outdir)/, $(XPM_FONTS:%=%.afm)) pks $(foreach i, $(XPM_FONTS), $(SHELL) $(depth)/buildscripts/mf-to-xpms.sh $(i) && ) true + + +pfb: $(PFB_FILES) diff -urN ../lilypond-1.4.8/tex/lily-ps-defs.tex ./tex/lily-ps-defs.tex --- ../lilypond-1.4.8/tex/lily-ps-defs.tex Tue Aug 21 18:08:53 2001 +++ ./tex/lily-ps-defs.tex Wed Nov 14 22:15:39 2001 @@ -9,6 +9,7 @@ % % escape the colon with \string to avoid problems with french babel % +\def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\csname #1\endcsname) set_tex_dimen}} \def\lilySpace{ } \def\turnOnPostScript{% % This sets CTM so that you get to the currentpoint diff -urN ../lilypond-1.4.8/tex/lilyponddefs.tex ./tex/lilyponddefs.tex --- ../lilypond-1.4.8/tex/lilyponddefs.tex Tue Jul 24 13:39:37 2001 +++ ./tex/lilyponddefs.tex Wed Nov 14 14:56:02 2001 @@ -55,11 +55,17 @@ \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}% % Are we using PDFTeX? If so, use pdf definitions. +% MiKTeX checks \pdfoutput the wrong way, makes our +% check more complicated. \ifx\pdfoutput\undefined \input lily-ps-defs \else - \pdfoutput=1 - \input lily-pdf-defs + \ifx\pdfoutput\relax + \input lily-ps-defs + \else + \pdfoutput=1 + \input lily-pdf-defs + \fi \fi \def\EndLilyPondOutput{%