WHAT IS LilyPond?
-LilyPond is the GNU Project music typesetter. It transforms a musical
-description file into beautiful sheet music.
+LilyPond is the GNU Project music typesetter.
+
+LilyPond produces beautiful sheet music using a high level description
+file as input.
BROWSE
Sources for this project are on
ftp://ftp.cs.uu.nl/~hanwen/lilypond/ (Europe)
+ ftp://ftp.gnu.org/
+
+Prepackaged i386 and PPC packages for both Debian and RedHat GNU are
+also available.
-Prepackaged i386 and PPC for both Debian and RedHat are also
-available.
-
WHAT'S NEW?
* Large cleanups, enhanced design and GUILE integration for smaller
memory footprint and more flexible code.
-* Direct output to PostScript (optional), or as GUILE script.
+* Direct output to PostScript (optional), PDFTeX or as GUILE script.
* convertors for ABC and MUP formats.
* Font: now available as scaleable PostScript. New glyphs: time
signature, more note heads.
-* Enhanced input: semi-automatic beaming, (nested) tuplets, (nested)
- repeats, automatic staff switching, chordnames.
+* Enhanced input: semi-automatic beaming, (nested) tuplets, (nested)
+ repeats, automatic staff switching, chordnames, automatic Lyrics
+ durations.
* Grace notes, volta brackets, better spacing, multiple styles for
note heads and time signatures, breathing signs, lyric extenders,
cross staff beaming and slurring.
-
+
* --safe option for the paranoid
* More elegant spacing. Text is spaced exactly.
-* The Mutopia archive is now a separate effort
-
* lots of bugfixes
lilypond -fps foo.ly
)
it() To view the file(.ps) output with GhostView, set GS_FONTPATH to the
-directory containing the file(pfa)s, and set GS_LIB to the directory containing the file(.ps) library files of LilyPond. In the source tree, these are file(mf/out/) and file(ps/).
+directory containing the file(pfa)s. In the source tree, this is file(mf/out/).
i.e. do something like:
verb(
export GS_FONTPATH=$HOME/usr/src/lilypond/mf/out
- export GS_LIB=$HOME/usr/src/lilypond/ps
gv foo.ps &
)
)
manpageoptions()
description(
dit(--output)
- The output file to write [FIXME, doesn't work]
+ The output file to write.
dit(--edit)
- Do an inline edit of the input file. override @samp{--output}
+ Do an inline edit of the input file. override code(--output)
dit(--show-rules)
shows all known conversions, and exit
dit(--from=FROM_PATCHLEVEL)
The name of LaTeX() file to output. If this option is not given,
the output name derived from the input name.
dit(--outdir=DIRECTORY)
- The directory to output lilypond output and input to.
+ The name of the directory to output lilypond output and input to.
+ This must be a name; the subdirectory will be created in the cwd. [FIXME]
dit(--help)
Print a short help message
dit(--dependencies)
.PP
.SH "OPTIONS"
.IP "--output"
-The output file to write [FIXME, doesn\'t work]
+The output file to write\&.
.IP "--edit"
-Do an inline edit of the input file\&. override @samp{--output}
+Do an inline edit of the input file\&. override \f(CW--output\fP
.IP "--show-rules"
shows all known conversions, and exit
.IP "--from=FROM_PATCHLEVEL"
The name of file to output\&. If this option is not given,
the output name derived from the input name\&.
.IP "--outdir=DIRECTORY"
-The directory to output lilypond output and input to\&.
+The name of the directory to output lilypond output and input to\&.
+This must be a name; the subdirectory will be created in the cwd\&. [FIXME]
.IP "--help"
Print a short help message
.IP "--dependencies"
\begin{document}
\maketitle
-This document tries give an brief overview of LilyPond features. When
+This document tries give an brief overview of LilyPond features. When
the text correspond with the shown notation, we consider LilyPond
-Officially BugFree (tm).
+Officially BugFree (tm). This document is intended for finding bugs,
+and documenting bugfixes.
\section{Notes and rests}
\mudelafile{repeat-fold.ly}
+\section{Lyrics}
+
+Lyrics can be set to a melody automatically. Excess lyrics will be
+dumped. Lyrics will not be set over rests. You can have melismata by
+setting a property melismaBusy. If you want a different order than
+first Music, then Lyrics, you must precook a chord of staffs/lyrics
+and label those. Of course \verb+\rhythm+ ignores any other rhythms
+in the piece. Hyphens and extenders do not assume anything about
+lyric lengths, so they continue to work.
+
+\mudelafile{lyric-combine.ly}
+
\section{Multiple notes}
Rests should not collide with beams, stems and noteheads. Rests may
\mudelafile{stem-spacing.sly}
+Even if a line is very tightly spaced, there will still be room
+between prefatory matter and the following notes. The same holds at
+the end of line.
+
+\mudelafile{spacing-tight.ly}
+
+
\section{Global stuff}
Markings that are attached to (invisible) barlines are
\mudelafile{breathing-sign.ly}
+Fonts are available in a default set of sizes: 11, 13, 16, 20, 23 and
+26pt staffheight. Sizes of the text fonts and symbol fonts are made
+to match the staff dimensions.
+
+\mudelafile{size11.ly}
+
+\mudelafile{size13.ly}
+
+\mudelafile{size16.ly}
+
+\mudelafile{size20.ly}
+
+\mudelafile{size23.ly}
+
+\mudelafile{size26.ly}
+
\section{Clefs and Time Signatures}
The transparent clef should not occupy any space and with style
\texttt{fullSizeChanges}, the changing clef should be typeset in full
size. For octaviated clefs, the ``8'' should appear closely above or
-below the clef respectively. The ``8'' is processed in a rather
-convoluted way, so this is fragile as well.
+below the clef respectively. The ``8'' is processed in a convoluted
+way, so this is fragile as well.
\mudelafile{clefs.ly}
+\def\bla#1{%the input file is too long and does not test for specific bugs
By default, time signatures are written with two numbers. With style
``C'', 4/4 and 2/2 are written with their corresponding symbols and
with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
9/8 are typeset with symbols, all other signatures retain the default
layout. The style ``1'', gives single number signatures for all
signatures.
-
-\mudelafile{time.fly}
-
+%
+\mu delafile{time.fly}
+}
\end{document}
BUGS:
- Causes segfault:
-
- \score{
- \notes{ \context Voice {
- \repeat fold 2 { a b c d } {}
- }
- }
- }
-
-
restStyle=mensural doesn't seem to work (lots of characters not found
for rests.fly)
Is there a simple way to explain this, or is the behavior
too complicated for a reasonable explanation?
accordion symbols
- interstaff beams (beam-interstaff.ly)
- interstaff slurs (see preludes-1.ly)
)
END OF COMMENT )
-
sect(Repeats)
In order to specify repeats, use the code(\repeat) keyword. By
}})
+
+sect(Ambiguities)
+
+The grammar contains a number of ambiguities. We hope to resolve most
+of them at a later time.
+
+itemize(
+it()
+The assignment
+verb(
+foo = bar)
+COMMENT(
+
+)Can be interpreted as making a string identifier code(\foo) containing
+code("foo"), or a music identifier containing the lyric lyric `foo'.
+
+Since this assignment is possible at top-level and within paper, these
+are two conflicts.
+it()The assignment
+verb( foo = -6
+)Can be interpreted as making a int identifier containing -6, or a
+request identifier containing the fingering `6' (with neutral direction).
+
+Since this assignment is possible at top-level and within paper, these
+are two conflicts.
+it() A chord followed by
+code(-3)
+can be interpreted as a chord substraction, or as the fingering `2' (with
+neutral direction)
+it() Similarly code(^2) is a conflict.
+ chord_addition '^' ->?
+it()
+If you do a nested repeat,
+verb (
+\repeat ...
+ \repeat ..
+ \alternative
+ ) then it ambiguous to which code(\repeat) the code(\alternative)
+ belongs. This is the classic if-then-else dillema. It may be solved
+ by using braces.
+)
+
sect(Keywords)
Keywords sometimes appear alone, but usually they require arguments.
+pl 61.hwn2
+ - revise / junk various input files.
+ - junk Music_list_iterator
+ - bf: declared paper + \shape
+ - bf: \shape and wordwrap
+ - Busy_playing_req ()
+ - Music_iterator::try_music_in_children (),
+so explicit \context Staff is often not needed for
+ * tuplets
+ * repeats
+ - automatic rest detection for \rhythm
+ - regtest tight-spacing.ly
+ - regtest lyric-combine.ly
+ - Melisma_playing_req, Melisma_engraver, Busy_playing_req:
+stuff for syncing music & lyrics.
+ - simplify Extender_engraver, Hyphen_engraver. Assume lyrics come in from only one voice.
+ - docced ambiguities in grammar.
+ - mudela-book -I behavior, verbosity.
+ - state search path when file not found
+
+pl 61.hwn1
+ - bf: \scm with --safe
+ - (ly-gulp-file)
+ - no need to set GS_LIBDIR, .ps files are inlined and directly
+printable.
+ - bf: spacing engine
+ - fixed paper11/13/16/20/23/26.ly
+ - use (header-end) iso {ps,tex}setting
+ - bf: convert-mudela --output
+ - move \version check to lexer.ll
+ - moved repeated-music-iterator.cc to folded-repeat-iterator.cc
+ - bf: broken crescendi
+ - removed delayed Spanner breaking.
+ - new implementation of \rhythm:
+ * Lyric_combine_music
+ * Lyric_combine_music_iterator
+ * \property melismaBusy sets melisma state.
+ * (commented out in parser.yy -- solution is not good enough yet.)
+ - bf: record def spot of seq/sim music
+ - junk Music_iterator::next_music_l (), Music::to_rhythm () & friends.
+ - junk Re_rhythmed_music & friends
+ - mudela 1.1.62: \shape = -1 -2 -3; -> \shape -1, -2, -3; etc.
+ solves one ambiguity.
+ - grace notes at end of music don't crash Lily.
+
+*******
pl 60.jcn2
- moved creation of $BUILDDIR/share/locale into set-lily.sh
- slur slope change constraints when snapping
- don't typeset unfinished (auto) beams
pl 60.jbr1
- - Documentation/ntweb/angels.y,Documentation/ntweb/guile.patch: added
+ - Documentation/ntweb/angels.ly, Documentation/ntweb/guile.patch: added
- Documentation/ntweb/GNUmakefile: add above to EXTRA_DIST_FILES
pl 59.mb2
Grep for TODO and ugh/ugr/urg.
.* TODO before 1.2
-. * rename 'staff_line_leading' (who is being lead where?) to
-staff_space, interline; (or other meaningful name) and use throughout
-lily
-
-[-> leading are the lead strips between the sticks (lines) of
-typeface. ie. leading is vertical space --hwn]
-. * Rewrite \rhythm to be during interpreting.
-. * move \version check to lexer.ll
-. * junk delayed spanner breaking.
-. * core dump on broken (de)crescendo
. * align left edge of broken (de)cresc/slur/tie/tuplet/volta
-. * check dangling_scm_sym working.
+. * auto-staff-switching.
+. * broken examples:
+mutopia/J.S.Bach/Petites-Preludes/preludes-paper.ly
+mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly
+mutopia/J.S.Bach/Solo-Cello-Suites/*
+mutopia/Coriolan/*
+
. * spacing of accidentals
. * key restorations & repeats
-. *
-So how do I do what I want to do?
-
-In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and
-ends on a pair of grace notes. Standard practice is to mark this with
-a slur starting on the main note and ending on the grace note, so a
-singer knows where to break the words.
-
-In bar 26, there's a \p marker that should appear below the grace
-note.
-
-In bar 27, there's a crescendo that's supposed to start at the start
-of the grace notes and extend to the note after the grace notes.
-
-How do I specify these?
. * spanners from grace to normal ctxt
-. * Glen:
-
-5. Sometimes lyrics extend past the right end of the staff. I guess that
-this is a similar problem (if not another symptom of the same problem) as
-one of the spacing bugs mentioned in the TODO.
-. * 4. Lyrics and grace sections don't go too well together.
- The words are aligned with the main note, not the start of the
- grace note. This is usually wrong, but is sometimes right.
-. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?)
-. * Rename illegal to invalid
-. * Mats:
-
-- The Postscript output is still very experimental
-
-- It is impossible to typeset two textual scripts that are stacked
- on top of eachother and avoids note collisions and at the same
- time are typeset with different textStyle. I tried to move around
- the text_engraver and other engravers between Voice and Thread
- but the granularity is not fine enough, the scripts have to
- share the same engraver in order to be get correct vertical
- position but than they cannot have different style.
- In my opinion, all scripts that share the same staff, should
- be stacked vertically, avoiding collisions with the notes
- in all voices.
-
-- I'd like to change the \repetitions command to Jan's suggested
- syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that
- I understand the implementation of repeats well enough.
-
-- The paper11/13/26 files have to be updated.
. * Grace_slur_engraver.
-. * (gulp-file-to-str) for LilyPond
+. * paperXX.ly \quartwidth, font setting not up to date. (Should read from AFM?)
. * input/star-spangled-banner.ly: fold for lyrics?
-. * don't create $srcdir/share/
. * Break_req handling is silly (break_forbid () + \break fucks up.)
-. * hangOnClef with non-breakable clefs.
. * account for accidentals in spacing.
-. * collision of lyrics with span_bars. See star-spangled.
-. * fix partial measures in meaningful way.
-. * relative mode for midi2ly
-. *
-Crescendi/diminuendi that cross a line break lose their vertical
-position and all end up above the top staff line, see the
-following example.
-
-----------------
-\score{
- \context StaffGroup <
- \context Staff=s1 \notes\relative c'{
- c d e f |
- g f e d | \break %% If this break is removed, it works fine
- c d e f |}
- \context Staff=s2 \notes\relative c'{
- c \< d e f |
- g f e d |
- c d e \! f |}
- >
-}
-. * uniformise recent feta contributions.
-. * bigger and fatter 4/4 C
-. * sort out directory stuff.
-. * --prefix option?
-. * -I option per filetype?
-. * kpathsea?
-. * ly2dvi/lilypond logfile.
-. * fractional chord durs.
-. * hang Item on Spanner
-. * do --safe for PS output?
-. * convert-mudela --output
-. * Staff_margin (with a partial measure.)
-. * fix convert-mudela manpage
-. * decimal point in \paper {}
-. * msgfmt -o check?
-. * add new glyphs to font.ly
-. * formatting of input stuff.
-. * deps for ly2dvi
. * indent = 0.0 with linewidth=-1.0
-. * collisions & accidentals.
-. * music ending in grace notes.
+. * \shape 1st dim skipped?
. * PostScript
. * half notes in pfa
-. * didot / big point.
-. * \shape 1st dim skipped?
-. * turn slope-damping on/off
. * We need feta-din*.mf files for more sizes than 10.
. * fix dynamics decently, ie. use kerning & ligatures.
-. * behavior of "that the obvious solution
-\lyrics { foo1*4 __ _ }" is unintuitive.
-. * Lyrics and scripts collide.
-. * filenames : junk lily.x
.* Cleanups needed
. * \$ and $ identifier syntax in examples.
. * Junk ghost positioning objects eg, Script leans on Staffside
leans on Staff.
-
. * bracket ps code.
+. * mudela-book.
. * Key_engraver, Local_key_item
. * Think of comprehensive solution for "if (grace_b == self_grace_b_)"
. * Y dimension units: staffspace vs. Point
. * Duration
. * clef engraver
. * parser
+. * Lookup::text -> needs to be TeX independent.
+. * junk Music_iterator::first_b_
. * Bezier
.* BUGS
> >
.* STUFF
+. *In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and
+ends on a pair of grace notes. Standard practice is to mark this with
+a slur starting on the main note and ending on the grace note, so a
+singer knows where to break the words.
+
+In bar 27, there's a crescendo that's supposed to start at the start
+of the grace notes and extend to the note after the grace notes.
+. * 5. Sometimes lyrics extend past the right end of the staff. I guess that
+this is a similar problem (if not another symptom of the same problem) as
+one of the spacing bugs mentioned in the TODO.
+. * 4. Lyrics and grace sections don't go too well together.
+ The words are aligned with the main note, not the start of the
+ grace note. This is usually wrong, but is sometimes right.
+. * decimal point in \paper {}
+. * use melismaBusy in Lyric context to typeset melismata correctly.
+. * ly2dvi/lilypond logfile.
+. * hang Item on Spanner
+. * do --safe for PS output?
+. * msgfmt -o check?
+. * collision of lyrics with span_bars. See star-spangled.
+. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?)
+. * It is impossible to typeset two textual scripts that are stacked
+ on top of eachother and avoids note collisions and at the same
+ time are typeset with different textStyle. I tried to move around
+ the text_engraver and other engravers between Voice and Thread
+ but the granularity is not fine enough, the scripts have to
+ share the same engraver in order to be get correct vertical
+ position but than they cannot have different style.
+ In my opinion, all scripts that share the same staff, should
+ be stacked vertically, avoiding collisions with the notes
+ in all voices.
+
. * break priority setting from SCM.
. * Matanya's tips:
. * don't shorten stems/staffs closer to each other.
possible with lily?
. * scm-ify \property values.
. * make dependencies () a virtual function.
+. * deprecate hangOnClef.
. * Abstraction for engravers:
-. * make "in-between" engraver (Tie, Extender)
+. * make "in-between" engraver (Tie)
. * make wide_spanner_engraver (line_group_spanner, staff_symbol)
. * store req -> element, element -> element causes for warnings
. * compulsory hshift
-. *
-My wish list for lyrics. I dream of a time when I will have enough time to
+. * My wish list for lyrics. I dream of a time when I will have enough time to
become familiar enough with the source code to be able to implement some of
these myself, but I don't know when that will be, so I thought I'd "publish"
my suggestions in case someone else is in a position to give them some
. * Give # lines in linebreaking.
. * arrows on slurs.
. * rewrite context defs using Scheme
+. * junk TeX specifics from internal code.
. * \selectmusic to cut pieces from music.
+. * formatting of input stuff.
+. * deps for ly2dvi
. * TODO: merge atom & molecule; make tree from molecule.
. * Align_element::padding ?
. * typo checks on property names?
. * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
. * strip EXEs before installing
. * zip target for binary windows dist (JBR)
+. * fix partial measures in meaningful way.
+. * uniformise recent feta contributions.
+. * bigger and fatter 4/4 C
+. * relative mode for midi2ly
. * junking \skip req in lyrics
. * midi2ly empty staffs.
. * use Fourier transformation for rhythmic quantisation.
. * horizontal centering of dynamics
. * $DEPENDENCIES_OUTPUT support
+. * turn slope-damping on/off
+. * sort out directory stuff.
+. * --prefix option?
+. * -I option per filetype?
+. * kpathsea?
. * fix vertical alignment and stafflines
. * declaring Performers
. * *.yo: fix pod manpage layout legacy
. * fix variable define/lookup parser global<->paper
. * fix title/instrument placements; see input/test/title.ly
. * <\voiceone c4. \voicetwo c4>
+. * I'd like to change the \repetitions command to Jan's suggested
+ syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that
+ I understand the implementation of repeats well enough.
. * add full cello suites to web site (kom op, Maarten!)
+. * rename 'staff_line_leading' (who is being lead where?) to
+staff_space, interline; (or other meaningful name) and use throughout
+lily
+
+[-> leading are the lead strips between the sticks (lines) of
+typeface. ie. leading is vertical space --hwn]
. * add mudela-book-doc source to webstie.
. * Rethink Time_description
\cadenza , \meter, should all be \properties
. * abbreviation-beam -> (measured/unmeasured) tremolo
. * partial -> anacrouse
. * move paper vars into engraver properties
+. * add new glyphs to font.ly
. * check for groff / troff/ nroff et
. * more intelligent file searching
. * disable spaces in TeX stuff
. * handle ^C for tmp/file creation.
. * make LilyPond RPM fully relocatable
. * better hshift (dots, distance, head dependent)
+. * didot / big point.
. * clefs (AG): The "8" should appear closer to the actual clef,
touching it.
. * put errorlevel in Input class
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=61
+PATCH_LEVEL=62
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
SUBDIRS=test bugs
-examples=praeludium-fuga-E
+examples=praeludium-fuga-E star-spangled-banner just-friends
flexamples=
LOCALSTEPMAKE_TEMPLATES=mutopia
--- /dev/null
+
+\score {
+\notes {
+ \context AutoSwitchGrandStaff \relative c' {
+ c8 d b a' a, f' g,4 ~ g
+
+ }
+}
+
+\paper {
+\translator { \ScoreContext
+\accepts AutoSwitchGrandStaff;
+}
+\translator{
+ \type "Engraver_group_engraver";
+ \name AutoSwitchGrandStaff;
+ \consists "Span_bar_engraver";
+ \consists "Vertical_align_engraver";
+ \consists "Piano_bar_engraver";
+ \consistsend "Axis_group_engraver";
+ minVerticalAlign = 2.*\staffheight;
+ maxVerticalAlign = 2.*\staffheight;
+ switcherName = "Voice";
+ acceptorName = "Thread";
+ staffContextName = "Staff";
+
+ \accepts "AutoSwitchContext";
+ \accepts "Staff";
+}
+\translator {
+ \type "Engraver_group_engraver";
+ \name "AutoSwitchContext";
+ \consists "Staff_switching_translator";
+}
+
+}}
+
+\version "1.1.52";
--- /dev/null
+\header{
+filename = "denneboom.ly";
+enteredby = "jcn";
+copyright = "public domain";
+TestedFeatures = "This file tests silly line shapes";
+}
+
+\include "paper20.ly"
+
+\version "1.1.52";
+
+oden = \lyrics{
+ O |
+ den- ne- boom, o |
+ den- ne- boom Wat |
+ zijn uw tak- ken |
+ won- der- schoon
+}
+
+ikheb = \lyrics{
+ Ik |
+ heb u laatst in_'t |
+ bos zien staan toen |
+ zat- en er geen |
+ kaars- jes aan
+}
+
+ugloeit = \lyrics{
+ U |
+ gloeit in bar- re |
+ win- ter- tijd, als |
+ sneeuw op aar- de |
+ licht ge- spreid
+}
+
+oboom = \notes\transpose c''{
+ g,8 |
+ c8. c16 c4. d8 |
+ e8. e16 e4. e8 |
+ d e f4 b, |
+ d8. c16 c4 r8
+}
+
+bos = \notes\transpose c''{
+ g8 |
+ g e a4. g8 |
+ g8. f16 f4 r8 f8 |
+ f d g4. f8 |
+ f8. e16 e4 r8
+}
+
+
+melody = \notes{
+ \oboom
+ \oboom
+ \bos
+ \oboom
+}
+
+
+verse_one = \notes{
+ \oden
+ \oden
+ \ikheb
+ \oden
+}
+
+verse_one_staff = \context Lyrics = one
+ \verse_one
+
+
+verse_two = \notes{
+ \oden
+ \oden
+ \ugloeit
+ \oden
+}
+
+verse_two_staff = \context Lyrics = two
+ \verse_two
+
+
+denneboom_shape = \paper{
+ \paper_twenty
+ indent = 20. \mm;
+ \shape 70. \mm, 20. \mm,
+ 65. \mm, 30. \mm,
+ 57.5 \mm, 45. \mm,
+ 50. \mm, 60. \mm,
+ 42.5 \mm, 75. \mm,
+ 35. \mm, 90. \mm,
+ 27.5 \mm, 105. \mm,
+ 20. \mm, 120. \mm,
+ 10. \mm, 140. \mm,
+ 65. \mm, 30. \mm
+ ;
+ gourlay_maxmeasures = 30.;
+% uhuh, loop if you comment these in
+% arithmetic_basicspace = 3.8;
+% arithmetic_multiplier = 8.\pt;
+}
+
+\score{
+ \addlyrics
+ \context Staff { \time 3/4; \melody }
+ \context Lyrics \verse_one
+ \paper{
+% huh?
+% \denneboom_shape
+ \paper_twenty
+ indent = 20. \mm;
+ \shape 70. \mm, 50. \mm,
+ 65. \mm, 30. \mm,
+ 57.5 \mm, 45. \mm,
+ 50. \mm, 60. \mm,
+ 42.5 \mm, 75. \mm,
+ 35. \mm, 90. \mm,
+ 27.5 \mm, 105. \mm,
+ 20. \mm, 120. \mm,
+ 10. \mm, 140. \mm,
+% 65. \mm, 30. \mm,
+ 65. \mm, 40. \mm
+ ;
+ gourlay_maxmeasures = 30.;
+% uhuh, loop if you comment these in
+ arithmetic_basicspace = 3.8;
+% arithmetic_multiplier = 8.\pt;
+ arithmetic_multiplier = 7.5\pt;
+ casting_algorithm= \Wordwrap;
+ }
+ \midi{ \tempo 4 = 90; }
+}
+
+%{
+\score{
+ <
+ \melody_staff
+ \verse_two_staff
+ >
+ \paper{ \denneboom_shape }
+ \midi{ \tempo 4 = 90; }
+}
+%}
+++ /dev/null
-\version "1.1.52";
-
-
-blah = \notes {
-
-\transpose c'' {
- \time 4/4;
- \keysignature es;
- [cis8 d e f] [e! a b cis'] |
- es e f e a a' a a' |
- \clef "bass"; }
- [es16 c' b a] [g f es d] [c d es d] [c Bes As G] |
-
-\clef "violin";
- \keysignature c;
- cis4 c cis cis |
- <cis dis eis fes ges> cis dis2 ~ |
- \time 2/4 ;
- dis4 dis ~ | c cis~ | c
-}
-
-\score{
- \context Staff \blah
-
-}
+++ /dev/null
-\header{
-filename = "kortjakje.ly";
-title = "Ah vous dirais-je maman (variations)";
-description = "bare bones version. (written down from memory :-)";
-composer = "Mozart KV 265";
-enteredby = "HWN";
-copyright = "public domain";
-}
-%{
-Tested Features: example file with comments
-
-%}
-\version "1.1.52";
-
-
-% the % is a comment.
-
-
-% declare melody (which will be in *one* staff ) for the lead voice
-melodie = \notes \relative c' {
- % switch Lilypond in note-mode
- \clef"violin";
- \time 2/4 ;
- %%% theme
- c4 c | % the | checks if there is a new measure here.
- g' g|
- a a|
-
- g2| % g2 means a "g-1" pitched half-note
- f4 f| e e| d d| c2
- g'4 g| f f| e e| d d| g g| f f| e e| d d|
- %%% var 1
- c4 r8 c % r8 means an 8th rest.
- (| % start a slur
- % NOTE: the slurstart should be directly after the note
- ) % end a slur.
- g'4 r8 g8 () a4 r8 a8 () g4 r4
- f4 r8 f8 () e4 r8 e8 (|) d4 r8 d8 () c4 r4
-}
-
- % more of this.
-begeleiding = \notes \relative c {
- \clef "bass";
- \time 2/4 ;
-
- %%% theme
- c4 % before note means one octave lower.
- % Similarly: after means one higher.
- c' e c f c e c d b c a f g c,2 |
- e'4 g, d' g, c g b g e' g, d' g, c g b g
- %%%% var 1
- r8 e'8() c4 r8 e8() c4 r8 f8() c4 r8 e8() c4
- r8 d8() b4 r8 c8() a4 r8 a8() f4 r8 e8() c4
-}
-
-\score{
- \context GrandStaff <
- \melodie
- \begeleiding
- >
- \paper{}
- \midi{}
-}
-
+++ /dev/null
-\version "1.1.52";
-part = \notes {
- c-1 c c c
- r1*3
- c4-5 c c c
- c-6 c c c
- c-7 c c c
- c-8 c c c
-}
-
-a4 = \paper{
- linewidth= 80.\mm;
- \translator {
- \StaffContext
-
- \consists "Bar_column_engraver";
- \consists "Bar_number_engraver";
-
- }
-}
-
-\score{
- <
- \notes{
- \part
- }
- >
- \paper{\a4}
-}
-
-\score{
- <
- \notes{
- \part
- }
- >
- \paper{\a4}
-}
+++ /dev/null
-%
-% This file does not work.
-%
-
-% pedal.ly
-%
-% Johann Sebastian Bach
-% preludium en fuga in D
-% bwv 532
-%
-% fuga --- two bar excerpt of pedal part
-%
-% example for pedal studies
-
-% ugh, front and back priority are the same...
-% one must use (ugh):
-% left front:
-% -\front-\l{toe,heel}
-% left back:
-% -\l{toe,heel}-\back
-% rigth front:
-% -\r{toe,heel}-\front
-% right back:
-% -\back-\r{toe,heel}
-
-% therefore:
-% \lheel \ltoe \rheel \rtoe
-% \lbheel \lbheel \lfheel \lftoe
-% \rbheel \rbtoe \rfheel \rftoe
-
-\version "1.1.52";
-
-\score{
- \notes {
- \time 4/4;
- \key D;
- \clef bass;
- % silly chord testing...
-% these should be stacked...
-% < c,-\ltoe e,-\lheel > < c'-\rtoe e'-\rheel>
-% < c,-\lheel e,-\ltoe > < c'-\rheel e'-\rtoe> |
- < c,-\ltoe-\lheel e, > < c'-\rtoe-\rheel e' >
- < c,-\lheel-\ltoe e, > < c'-\rheel-\rtoe e' > |
- % 46
-
- [d16-\lfheel e-\rbtoe fis-\ltoe e-\rbtoe]
- [d-\lfheel e-\rbtoe fis-\lheel e] [d e fis e] [d e fis e] |
- d4 r4 r4 [b16-\rtoe a-\ltoe b-\rtoe fis-\ltoe] |
- }
- \paper{}
-}
-
another =
- \notes{ \time 6/4;
+ \relative c'' \notes{ \time 6/4;
c1. c1. \time 4/4;c4 c4 c4 c4 c1 c1 c1
}
-%
-% Beams are incorrect for the next staff. They cut through the whole notes.
-%
-
yanother =
\notes{ \time 4/4;
c1 c1 c1 c4 c4 c4 c4 c1 c1 c1
+++ /dev/null
-%
-% This file prints lots of warning messages about scripts-dportato
-%
-
-\header{
-filename = "scales.ly";
-enteredby = "HWN";
-copyright = "public domain";
-}
-
-%{
- Tested Features: scripts, beams, transposition,
-%}
-
-%
-% scales with accents.
-%
-
-\version "1.1.52";
-blah = \notes {
- \time 6/8;
-\transpose c {
- \clef "bass";
- c4. d
-}
- c d
- \clef "violin" ;
-\transpose c'' {
- \transpose d { e f } }
-\transpose c''' {
- c4. d
- %ugr
- |\times 6/9 { [ a8 \< a a a a a a \! a a \ff \> ] } | }
- \transpose c'' {
- \times 6/9 { [ a a a a a a a a \! a ] } | }
- \transpose c''' {
- \times 6/9 { [ c,->-.-\fermata \< g,->-.-\fermata
- d->-.-\fermata a->-.-\fermata
- e'->-.-\fermata b'-. f''-. c'''->-.-\fermata
- \! g'''->-.-\fermata \> ] }
-
- \times 6/9 { [ g'''->-.-\fermata c'''->-.-\fermata
- f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata
- a->-.-\fermata d->-.-\fermata g,->-.-\fermata \!
- c,->-.-\fermata ] }
-
- \times 6/9 { [ c,->-.-\fermata \< g,->-.-\fermata d->-.-\fermata
- a->-.-\fermata
- e'->-.-\fermata b'-. f''-.
- c'''->-.-\fermata \! g'''->-.-\fermata \> ] }
- \times 6/9 { [ g'''->-.-\fermata c'''->-.-\fermata
- f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata
- a->-.-\fermata d->-.-\fermata
- g,->-.-\fermata \! c,->-.-\fermata ] }
- }
- \transpose c'' {
- \times 2/3 { [ c g d' ] }
- \times 2/3 { [ d' g c ] }
- \times 2/3 { [ f c' g' ] }
- \times 2/3 { [ g' c' f ] }
- }
- \transpose c' {
- \times 2/3 { [ c g d' ] }
- \times 2/3 { [ d' g c ] }
- \times 2/3 { [ f c' g' ] }
- \times 2/3 { [ g' c' f ] }
- \times 2/3 { [ g' c' f ] }
- \time 4/4;
-
-c1}
-
- r8-"text" r8^. r8_. r8 r8 r8 r8 r8
- [c-> d-> e-> f->][g-> a-> b-> c'->] % 1
-\transpose c'' { [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]}
- [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
- [c-. d-. e-. f-.][g-. a-. b-. c'-.]
- [c'-- b-- a-- g][f-- e-- d c--] % 5
- [c-\portato d-\portato e-\portato f-\portato]
- [g-\portato a-\portato b-\portato c'-\portato]
- [c'-\upbow b-\upbow a-\downbow g-\downbow]
- [f-\downbow e-\downbow d-\upbow c-\upbow]
- [c-| d-| e-| f-|][g-| a-| b-| c'-|]
- [c' b a g][f e d c]
- [c d e f][g a b c'] % 10
- |[c' b a g][f e d c]
-
- }
-
-
-\score{
- \notes {\blah}
- \paper{
- castingalgorithm = \Wordwrap;
- }
-}
+++ /dev/null
-
-\version "1.1.52";
-
-
-blah = \notes{ \transpose c'' {
-
- c,4 ->-.-\fermata-"text"
- c ->-.-\fermata-"text"
- c' ->-.-\fermata-"text"
- c'' ->-.-\fermata-"text"
-
- d, ->-.-\fermata-"text"
- d ->-.-\fermata-"text"
- d' ->-.-\fermata-"text"
- d'' ->-.-\fermata-"text"
-
- c, ^>^.^\fermata^"text"
- c ^>^.^\fermata^"text"
- c' ^>^.^\fermata^"text"
- c'' ^>^.^\fermata^"text"
-
- d, ^>^.^\fermata^"text"
- d ^>^.^\fermata^"text"
- d' ^>^.^\fermata^"text"
- d'' ^>^.^\fermata ^"text"
-
- c, _>_._\fermata _"text"
- c _>_._\fermata _"text"
- c' _>_._\fermata _"text"
- c'' _>_._\fermata _"text"
-
- d, _>_._\fermata _"text"
- d _>_._\fermata _"text"
- d' _>_._\fermata _"text"
- d'' _>_._\fermata _"text"
-
- \stemup
- b,-. c-. d-. e-. f-. g-. a-. b-. c'-.
- \stemdown
- a-. b-. c'-. d'-. e'-. f'-. g'-. a'-. b'-.
- \stemup
- b,-> c-> d-> e-> f-> g-> a-> b-> c'->
- \stemup
- b,---. c---. d---. e---. f---. g---. a---. b---. c'---.
- \stemboth
- \time 4/4;
- [c8 \< d e \! f][d' \> e' f' \! g']
- [c-> \< d-> e-> \! f->][d'-> \> e'-> f'-> \! g'->]
- [c-^ \< d-^ e-^ \! f-^][d'-^ \> e'-^ f'-^ \! g'-^]
- [c-. \< d-. e-. \! f-.][d'-. \> e'-. f'-. \! g'-.]
- [c-- \< d-- e-- \! f--][d'-- \> e'-- f'-- \! g'--]
- [c-\tenuto \< d-\tenuto e-\tenuto \! f-\tenuto]
- [d'-\tenuto \> e'-\tenuto f'-\tenuto \! g'-\tenuto]
- [c-\upbow \< d-\upbow e-\upbow \! f-\upbow]
- [d'-\upbow \> e'-\upbow f'-\upbow \! g'-\upbow]
- [c-| \< d-| e-| \! f-|][d'-| \> e'-| f'-| \! g'-|]
- [c-\fermata \< d-\fermata e-\fermata \! f-\fermata]
- [d'-\fermata \> e'-\fermata f'-\fermata \! g'-\fermata]
- [c-\lheel \< d-\lheel e-\lheel \! f-\lheel]
- [d'-\lheel \> e'-\lheel f'-\lheel \! g'-\lheel]
-
-}}
-
-
-\score{
- \blah
-
-}
--- /dev/null
+
+
+
+\score { \notes
+ \relative c'' \context Staff {
+ \repeat "semi" 2 { \time 4/4; c4^"foo" }
+ \alternative { d-4 e-\fermata } \grace { c16 } f-\ff
+ }
+ \paper { linewidth = -1.0; }
+}
+++ /dev/null
-\score{
- <
- \context Staff \notes{
- \skip 4*27;
- \skip 4*27;
- \skip 4*27;
- \skip 4*27;
- }
- \context Lyrics \lyrics{
-aaaaaaaaaaaaaaaaaaa
-xxx\break
-bbbbbbbbbbbbbbbbbbb
-xxx\break
-ccccccccccccccccccc
-xxx\break
-ddddddddddddddddddd
-xxx\break
-eeeeeeeeeeeeeeeeeee
-xxx\break
-fffffffffffffffffff
-xxx\break
-ggggggggggggggggggg
-xxx\break
-hhhhhhhhhhhhhhhhhhh
-xxx\break
-iiiiiiiiiiiiiiiiiii
-xxx\break
-jjjjjjjjjjjjjjjjjjj
-xxx\break
-kkkkkkkkkkkkkkkkkkk
-xxx\break
-lllllllllllllllllll
-xxx\break
-mmmmmmmmmmmmmmmmmmm
-xxx\break
-nnnnnnnnnnnnnnnnnnn
-xxx\break
-ooooooooooooooooooo
-xxx\break
-ppppppppppppppppppp
-xxx\break
-qqqqqqqqqqqqqqqqqqq
-xxx\break
-rrrrrrrrrrrrrrrrrrr
-xxx\break
-sssssssssssssssssss
-xxx\break
-ttttttttttttttttttt
-xxx\break
-uuuuuuuuuuuuuuuuuuu
-xxx\break
-vvvvvvvvvvvvvvvvvvv
-xxx\break
-wwwwwwwwwwwwwwwwwww
-xxx\break
-xxxxxxxxxxxxxxxxxxx
-xxx\break
-yyyyyyyyyyyyyyyyyyy
-xxx\break
-zzzzzzzzzzzzzzzzzzz
-xxx\break
-...................
-xxx\break
-AAAAAAAAAAAAAAAAAAA
-xxx\break
-BBBBBBBBBBBBBBBBBBB
-xxx\break
-CCCCCCCCCCCCCCCCCCC
-xxx\break
-DDDDDDDDDDDDDDDDDDD
-xxx\break
-EEEEEEEEEEEEEEEEEEE
-xxx\break
-FFFFFFFFFFFFFFFFFFF
-xxx\break
-GGGGGGGGGGGGGGGGGGG
-xxx\break
-HHHHHHHHHHHHHHHHHHH
-xxx\break
-IIIIIIIIIIIIIIIIIII
-xxx\break
-JJJJJJJJJJJJJJJJJJJ
-xxx\break
-KKKKKKKKKKKKKKKKKKK
-xxx\break
-LLLLLLLLLLLLLLLLLLL
-xxx\break
-MMMMMMMMMMMMMMMMMMM
-xxx\break
-NNNNNNNNNNNNNNNNNNN
-xxx\break
-OOOOOOOOOOOOOOOOOOO
-xxx\break
-PPPPPPPPPPPPPPPPPPP
-xxx\break
-QQQQQQQQQQQQQQQQQQQ
-xxx\break
-RRRRRRRRRRRRRRRRRRR
-xxx\break
-SSSSSSSSSSSSSSSSSSS
-xxx\break
-TTTTTTTTTTTTTTTTTTT
-xxx\break
-UUUUUUUUUUUUUUUUUUU
-xxx\break
-VVVVVVVVVVVVVVVVVVV
-xxx\break
-WWWWWWWWWWWWWWWWWWW
-xxx\break
-XXXXXXXXXXXXXXXXXXX
-xxx\break
-YYYYYYYYYYYYYYYYYYY
-xxx\break
-ZZZZZZZZZZZZZZZZZZZ
-xxx\break
- }
- >
- \paper {
- castingalgorithm = \Wordwrap;
- linewidth = 40.\mm;
- }
-}
-
-\version "1.1.52";
-[f8 f] \grace { f8 e8 } [f64 f]
+[f8 f] \grace { [f8 e8] } [f64 f]
+++ /dev/null
-\score{
- \notes \relative c''{
- \time 2/4;
- c8
- \repeat 2 { % \bar "|:" iknoort-i ook...
- c8 c8
- }
- c8
- }
-}
+++ /dev/null
-
- % broken.
- [:32 c16 e]
- [:32 c16 e]
- [:16 c8 e]
- [:16 e4 g]
- [:16 e2 g]
- [:16 e1 g]
+++ /dev/null
-
-\score {
-\notes \relative c {
-\include "noteheadstyle.fly"
-}\header { title = "notehead style"; }
-}
-
-\score {
-\notes \relative c {
-\include "number-staff-lines.fly"
-}\header { title = "number of staff lines"; }
-}
-
-\include "bar-scripts.ly"
-
-\include "font20.ly"
+++ /dev/null
-\header{
-filename = "denneboom.ly";
-enteredby = "jcn";
-copyright = "public domain";
-TestedFeatures = "This file tests silly line shapes";
-}
-
-\include "paper20.ly"
-
-\version "1.1.52";
-
-oden = \lyrics{
- O8 |
- den-8. ne-16 boom,4. o8 |
- den-8. ne-16 boom.4. Wat8 |
- zijn uw tak-4 ken |
- won-8. der-16 schoon4 _8
-}
-
-ikheb = \lyrics{
- Ik8 |
- heb u laatst4. in_'t8 |
- bos8. zien16 staan4 _8 toen8 |
- zat- en er4. geen8 |
- kaars-8. jes16 aan.4 _8
-}
-
-ugloeit = \lyrics{
- U8 |
- gloeit in bar-4. re8 |
- win-8. ter-16 tijd,4 r8 als8 |
- sneeuw op aar-4. de8 |
- licht8. ge-16 spreid.4 _8
-}
-
-oboom = \notes\transpose c''{
- g,8 |
- c8. c16 c4. d8 |
- e8. e16 e4. e8 |
- d e f4 b, |
- d8. c16 c4 r8
-}
-
-bos = \notes\transpose c''{
- g8 |
- g e a4. g8 |
- g8. f16 f4 r8 f8 |
- f d g4. f8 |
- f8. e16 e4 r8
-}
-
-global = \notes{
- \time 3/4;
- \partial 8;
- \skip 4*48;
- \bar "|.";
-}
-melody = \notes{
- \oboom
- \oboom
- \bos
- \oboom
-}
-
-$melody_staff = \context Staff = melody <
- \global
- \melody
->
-
-$verse_one = \notes{
- \oden
- \oden
- \ikheb
- \oden
-}
-
-$verse_one_staff = \context Lyrics = one <
- \global
- \$verse_one
->
-
-$verse_two = \notes{
- \oden
- \oden
- \ugloeit
- \oden
-}
-
-$verse_two_staff = \context Lyrics = two <
- \global
- \$verse_two
->
-
-$denneboom_shape = \paper{
- \paper_twenty
- indent = 20. \mm;
- \shape = 70. \mm 20. \mm
- 65. \mm 30. \mm
- 57.5 \mm 45. \mm
- 50. \mm 60. \mm
- 42.5 \mm 75. \mm
- 35. \mm 90. \mm
- 27.5 \mm 105. \mm
- 20. \mm 120. \mm
- 10. \mm 140. \mm
- 65. \mm 30. \mm
- ;
- gourlay_maxmeasures = 30.;
-% uhuh, loop if you comment these in
-% arithmetic_basicspace = 3.8;
-% arithmetic_multiplier = 8.\pt;
-}
-
-\score{
- <
- \$melody_staff
- \$verse_one_staff
- >
- \paper{
-% huh?
-% \$denneboom_shape
- \paper_twenty
- indent = 20. \mm;
- \shape = 70. \mm 50. \mm
- 65. \mm 30. \mm
- 57.5 \mm 45. \mm
- 50. \mm 60. \mm
- 42.5 \mm 75. \mm
- 35. \mm 90. \mm
- 27.5 \mm 105. \mm
- 20. \mm 120. \mm
- 10. \mm 140. \mm
-% 65. \mm 30. \mm
- 65. \mm 40. \mm
- ;
- gourlay_maxmeasures = 30.;
-% uhuh, loop if you comment these in
- arithmetic_basicspace = 3.8;
-% arithmetic_multiplier = 8.\pt;
- arithmetic_multiplier = 7.5\pt;
- }
- \midi{ \tempo 4 = 90; }
-}
-
-%{
-\score{
- <
- \$melody_staff
- \$verse_two_staff
- >
- \paper{ \$denneboom_shape }
- \midi{ \tempo 4 = 90; }
-}
-%}
+++ /dev/null
-\version "1.0.21";
-
-\score{
- \notes \relative c {
- c d c f c g c b, c g, c f, c c'' c
-% run with find-quarts should suggest:
-% c d c f c g' c, b c g c f, c' c'' c,,
- }
-}
-
-\header{
-enteredby = "jcn";
-copyright = "PD";
-TestedFeatures = "This file tests some nasty Gourlay spacings";
-}
-
\version "1.1.52";
%{
%}
\score{
- \notes \context Staff \transpose c''<
- { \stemup d2 d | d d | d4 d2. | \break c1 }
- \transpose c, { \stemdown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 }
+ \notes \context Staff \relative c'' <
+ \context Voice = VA { \stemup d2 d | d d | d4 d2. | \break c1 }
+ \context Voice = VB { \stemdown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 }
>
\paper{
- linewidth = 8.\cm
+ linewidth = 9.\cm;
}
}
--- /dev/null
+
+c4 \grace { [d16 d16] }
\grace { [cis32 dis32] } e4
\grace { [c32 d] }\times 2/3 { [c8 c c] }
\grace { [b32 ( c32] } ) c4
- \grace c16 [c8 c8]
+ \grace <c16 d16> [c8 c8]
+% \grace c16 [c8 c8]
\grace { \property Grace.graceAlignPosition = \right c16} c4
}
\paper {linewidth = -1.;}
--- /dev/null
+\version "1.1.52";
+
+
+blah = \notes {
+
+\transpose c'' {
+ \time 4/4;
+ \keysignature es;
+ [cis8 d e f] [e! a b cis'] |
+ es e f e a a' a a' |
+ \clef "bass"; }
+ [es16 c' b a] [g f es d] [c d es d] [c Bes As G] |
+
+\clef "violin";
+ \keysignature c;
+ cis4 c cis cis |
+ <cis dis eis fes ges> cis dis2 ~ |
+ \time 2/4 ;
+ dis4 dis ~ | c cis~ | c
+}
+
+\score{
+ \context Staff \blah
+
+}
--- /dev/null
+\header{
+filename = "twinkle-pop.ly";
+%title = "Ah, vous dirais-je, maman ";
+description = "twinkle twinkle in pop-song-settings";
+composer = "traditional";
+enteredby = "HWN, chords by Johan Vromans";
+copyright = "public domain";
+}
+
+\version "1.1.52";
+
+m =\notes \relative c'' {
+ \autoBeamOff
+ g4 r8 \times 2/3 { g'8 f e } r8 \grace { [d16 c b] } e4
+ \melisma
+ d8.() c16
+ \melismaEnd
+ b }
+
+noisebeat =\notes \relative c'' {g16 g g g }
+noise = { \noisebeat \noisebeat \noisebeat \noisebeat \noisebeat \noisebeat }
+textI = \lyrics { la2 __ la -- la __ la la la la la }
+textII = \lyrics { da -- da __ da -- da da da da da }
+
+\score {
+ \notes < \context Staff = SA \m
+ \context Lyrics = LA { s1 }
+ \context Staff = SB { s1 }
+ \context Lyrics = LB { s1 }
+ \context Staff = SC \noise
+
+ \addlyrics
+ \context Staff = SB \m
+ < \context Lyrics = LA \textI
+ \context Lyrics = LB \textII
+ >
+
+ >
+}
+
% no alts.
-\score { \notes\context Staff\relative c'' {
+\score { \notes
+ \relative c'' {
\repeat semi 3 { c^"3$\\times$ 0alt" d }
% less alts than body
\repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f }
-\score { \notes\context Staff\relative c'' {
-\repeat unfold 3 { c^"3$\\times$ 0alt" d }
+\score { \notes\relative c'' {
+\repeat unfold 3 { c^"3x 0a" d }
% less alts than body
-\repeat unfold 4 { c^"4$\\times$ 2alt" d } \alternative { e f }
+\repeat unfold 4 { c^"4x 0a" d } \alternative { e f }
% more alts than body
-\repeat unfold 2 { c^"2$\\times$ 3alt" d } \alternative { e f g }
+\repeat unfold 2 { c^"2x 3a" d } \alternative { e f g }
}}
+++ /dev/null
-text = \lyrics { Feel the rhy- thm }
-
-melody = \notes {
- e4. d8 e4. c8
-}
-
-\score{
- <
- \context Voice \notes\relative c'' \melody
- \context Lyrics \rhythm \melody \text
- >
-}
+++ /dev/null
-%\rhythm { 4. 8 8. 16 } { c'' d e f }
-\rhythm { c4. c8 c8. c16 } { c'' d e f }
+++ /dev/null
-\score{
- \context Voice \notes\relative c''{
- % still thinking 'bout this
- %c4. 8 4. 8
- c4. c8 c4. c8
- }
-}
--- /dev/null
+\score{
+ \context RhythmicStaff {
+ \notes\relative c''{
+ \time 4/4;
+ r4 r g2 | r4 g r2 | g1:32 | r1 |
+ }
+ }
+}
+++ /dev/null
-\score{
- \context RhythmicStaff {
- \notes\relative c''{
- \time 4/4;
- r4 r g2 | r4 g r2 | g1:32 | r1 |
- }
- }
-}
--- /dev/null
+
+\version "1.1.52";
+
+
+blah = \notes{ \transpose c'' {
+
+ c,4 ->-.-\fermata-"text"
+ c ->-.-\fermata-"text"
+ c' ->-.-\fermata-"text"
+ c'' ->-.-\fermata-"text"
+
+ d, ->-.-\fermata-"text"
+ d ->-.-\fermata-"text"
+ d' ->-.-\fermata-"text"
+ d'' ->-.-\fermata-"text"
+
+ c, ^>^.^\fermata^"text"
+ c ^>^.^\fermata^"text"
+ c' ^>^.^\fermata^"text"
+ c'' ^>^.^\fermata^"text"
+
+ d, ^>^.^\fermata^"text"
+ d ^>^.^\fermata^"text"
+ d' ^>^.^\fermata^"text"
+ d'' ^>^.^\fermata ^"text"
+
+ c, _>_._\fermata _"text"
+ c _>_._\fermata _"text"
+ c' _>_._\fermata _"text"
+ c'' _>_._\fermata _"text"
+
+ d, _>_._\fermata _"text"
+ d _>_._\fermata _"text"
+ d' _>_._\fermata _"text"
+ d'' _>_._\fermata _"text"
+
+ \stemup
+ b,-. c-. d-. e-. f-. g-. a-. b-. c'-.
+ \stemdown
+ a-. b-. c'-. d'-. e'-. f'-. g'-. a'-. b'-.
+ \stemup
+ b,-> c-> d-> e-> f-> g-> a-> b-> c'->
+ \stemup
+ b,---. c---. d---. e---. f---. g---. a---. b---. c'---.
+ \stemboth
+ \time 4/4;
+ [c8 \< d e \! f][d' \> e' f' \! g']
+ [c-> \< d-> e-> \! f->][d'-> \> e'-> f'-> \! g'->]
+ [c-^ \< d-^ e-^ \! f-^][d'-^ \> e'-^ f'-^ \! g'-^]
+ [c-. \< d-. e-. \! f-.][d'-. \> e'-. f'-. \! g'-.]
+ [c-- \< d-- e-- \! f--][d'-- \> e'-- f'-- \! g'--]
+ [c-\tenuto \< d-\tenuto e-\tenuto \! f-\tenuto]
+ [d'-\tenuto \> e'-\tenuto f'-\tenuto \! g'-\tenuto]
+ [c-\upbow \< d-\upbow e-\upbow \! f-\upbow]
+ [d'-\upbow \> e'-\upbow f'-\upbow \! g'-\upbow]
+ [c-| \< d-| e-| \! f-|][d'-| \> e'-| f'-| \! g'-|]
+ [c-\fermata \< d-\fermata e-\fermata \! f-\fermata]
+ [d'-\fermata \> e'-\fermata f'-\fermata \! g'-\fermata]
+ [c-\lheel \< d-\lheel e-\lheel \! f-\lheel]
+ [d'-\lheel \> e'-\lheel f'-\lheel \! g'-\lheel]
+
+}}
+
+
+\score{
+ \blah
+
+}
--- /dev/null
+
+\include "paper11.ly"
+\include "allfontstyle.ly";
--- /dev/null
+\include "paper13.ly"
+\include "allfontstyle.ly";
--- /dev/null
+\include "paper16.ly"
+\include "allfontstyle.ly";
--- /dev/null
+\include "paper20.ly"
+\include "allfontstyle.ly";
--- /dev/null
+\include "paper23.ly"
+\include "allfontstyle.ly";
--- /dev/null
+\include "paper26.ly"
+\include "allfontstyle.ly";
+++ /dev/null
-\version "1.1.52";
-
-% urg, the direction of the slur gets swapped!
-\score{
- \notes\relative c{
- \slurup
- \stemup
- [e'8( c' a b]
- \stemdown
- [e c a )e] \break
- \stemup
- [e8( c' a b]
- \stemdown
- [e c a )e] e1
- }
- \paper{
- indent = 0.\mm
- linewidth=80.\mm
- }
-}
--- /dev/null
+
+\score {
+ \notes { \time 2/2; c'2 c'2 \time 2/2; }
+ \paper { linewidth = 2.9\cm; }
+}
--- /dev/null
+% test staff margin with partial measure.
+\score {
+\notes { \property Staff.instrument = "foo" \partial 4; c4 c1 }
+\paper { \translator { \StaffContext \consists Staff_margin_engraver; }}
+}
+++ /dev/null
-\score{
- \context Staff \notes\relative c'' {
- % doesn't quite work yet
- % \property Staff.unfoldRepeats = 1
- \repeat 3 { a b c d }
- \alternative { { d c b a } { a b c d } } d d d d
- }
-}
-
-\version "1.0.16";
%}
%{
-Tested Features: lyrics, interleaving lyrics and staffs, repeats,
- auto beaming, applying new rhythm on lyrics, hyphens
+Tested Features: lyrics, interleaving lyrics and staffs, repeats
%}
\version "1.1.52";
}
tekst = \lyrics{
- Al -- tijd is Kort -- jak -- je ziek, " "
- midden "in de" week maar "'s zon" -- dags " " niet.
- "'s Zon" -- dags gaat ze naar de kerk, " "
- met een boek vol zil -- ver " " werk. " "
- Al -- tijd is Kort -- jak -- je ziek, " "
- midden "in de" week maar "'s zon" -- dags " " niet.
+ Al-4 tijd is Kort- jak- je ziek,2
+ midden4 "in de" week maar "'s zon-" dags niet.2
+ "'s Zon-"4 dags gaat ze naar de kerk,2
+ met4 een boek vol zil- ver werk.2
+ Al-4 tijd is Kort- jak- je ziek,2
+ mid-8 den in de week4 maar "'s zon-" dags niet.2
}
%}
hegedraagjetekst = \lyrics{
- Al -- tijd zuigt Bill Gates mijn piek, " "
- "\TeX" is slecht -- ser dan mu -- " " ziek.
- "'s Zon" -- dags gaat het door een raam, " "
- Weet dat ik me er -- voor " " schaam.
- Al -- tijd zuigt Bill Gates mijn piek, " "
- "\TeX" is slecht -- ser dan mu -- " " ziek.
+ Al-4 tijd zuigt Bill Gates mijn piek,2
+ "\TeX"4 is slecht- ser dan mu- ziek.2
+ "'s Zon-"4 dags gaat het door een raam,2
+ Weet4 dat ik me er- voor schaam.2
+ Al-4 tijd zuigt Bill Gates mijn piek,2
+ "\TeX"4 is slecht- ser dan mu- ziek.2
}
texte = \lyrics{
\property Lyrics . textStyle" = "italic"
% \property Lyrics . textStyle" = "roman"
- Ah! vous dir -- ai -- je ma -- man " "
- Ce qui cau -- se mon tour -- " " ment
- Pa -- pa veut que je rai -- son -- ne
- Comm' u -- ne gran -- de per -- " " son -- ne
- Moi je dis que les bon -- bons " "
- Va -- lent mieux que la rai -- " " son
+ Ah!4 vous dir- ai- je ma- man2
+ Ce4 qui cau- se mon tour- ment2
+ Pa-4 pa veut que je rai- son- ne
+ Comm' u- ne gran- de per- son- ne
+ Moi je dis que les bon- bons2
+ Va-4 lent mieux que la rai- son2
}
texti = \lyrics{
\property "Lyrics"."textStyle" = "roman"
- Twin -- kle, twin -- kle, lit -- tle star, " "
- How I won -- der what you " " are.
- Up a -- bove the world so high, " "
- Like a dia -- mond in the " " sky. " "
- Twin -- kle, twin -- kle, lit -- tle star, " "
- How I won -- der what you " " are!
+ Twin-4 kle, twin- kle, lit- tle star,2
+ How4 I won- der what you are.2
+ Up4 a- bove the world so high,2
+ Like4 a dia- mond in the sky.2
+ Twin-4 kle, twin- kle, lit- tle star,2
+ How4 I won- der what you are!2
}
textii = \lyrics{
- When the bla -- zing sun is gone, " "
- When he no -- thing shines up -- " " on,
- Then you show your lit -- tle light, " "
- Twin -- kle, twin -- kle, all the " " night. " "
- Twin -- kle, twin -- kle, lit -- tle star, " "
- How I won -- der what you " " are!
+ When4 the bla- zing sun is gone,2
+ When4 he no- thing shines up- on,2
+ Then4 you show your lit- tle light,2
+ Twin-4 kle, twin- kle, all the night.2
+ Twin-4 kle, twin- kle, lit- tle star,2
+ How4 I won- der what you are!2
+
}
textiii = \lyrics{
- Then the tra -- veler in the dark " "
- Thanks you for your ti -- ny " " spark;
- He could not see which way to go,
- If you did not twin -- kle " " so. " "
- Twin -- kle, twin -- kle, lit -- tle star, " "
- How I won -- der what you " " are!
+ Then4 the tra- veler in the dark2
+ Thanks4 you for your ti- ny spark;2
+ He4 could not see which way8 to8 go,2
+ If4 you did not twin- kle so.2
+ Twin-4 kle, twin- kle, lit- tle star,2
+ How4 I won- der what you are!2
}
\score{
<
\context Staff=i \repeat semi 2 < \global\melody >
- \context Lyrics=top \context LyricVoice
- \repeat fold 2 {}
- \alternative {
- \rhythm \melody \tekst
- \rhythm \melody \texte
- }
+ \context Lyrics=top \context LyricVoice \repeat fold 2 {} \alternative { \tekst \texte }
\context GrandStaff <
\context Staff=ii \repeat semi 2 < \global\melody >
\context Staff=iii \repeat semi 2 < \global\accompany >
>
- \context Lyrics =bottom \context LyricVoice
- \repeat fold 3 {}
- \alternative {
- \rhythm \melody \texti
- \rhythm \melody \textii
- \rhythm \melody \textiii
- }
+ \context Lyrics =bottom \context LyricVoice \repeat fold 3 {}
+ \alternative { \texti \textii \textiii }
>
\paper{
gourlay_maxmeasures = 14.0;
Base class for anything that records its poisition in the parse file.
*/
class Input {
- char const *defined_ch_C_ ;
- Source_file * source_file_l_;
+ char const *defined_ch_C_ ;
+ Source_file * source_file_l_;
public:
- void warning (String) const; // should use member func?
- void non_fatal_error (String) const;
- void error (String) const;
- void message (String) const;
- void set_spot (Input const &);
-
- String location_str () const;
- Input (Source_file*, char const*);
- Input ();
- Input (Input const& );
+ void warning (String) const; // should use member func?
+ void non_fatal_error (String) const;
+ void error (String) const;
+ void message (String) const;
+ void set_spot (Input const &);
+ Input spot () const;
+ String location_str () const;
+ Input (Source_file*, char const*);
+ Input ();
};
#endif // INPUT_HH
void set_path (File_path*p_C);
void set_binary (bool);
-private:
const File_path * path_C_;
+private:
Cons<Source_file> *sourcefile_p_list_;
bool binary_b_ ;
};
defined_ch_C_ = 0;
}
-Input::Input (Input const &s)
+Input
+Input::spot () const
{
- source_file_l_ = s.source_file_l_;
- defined_ch_C_ = s.defined_ch_C_;
+ return *this;
}
void
else
return "(" + _ ("position unknown") + ")";
}
+
}
-Character_metric *
+Character_metric const *
Adobe_font_metric::get_char (int code, bool warn) const
{
return &find_ascii (code,warn);
Scalar al = get_property ("graceAlignPosition", 0);
if (al.isdir_b ())
{
- align_item_p_->notehead_align_dir_ = int (al);
+ align_item_p_->notehead_align_dir_ = Direction (int (al));
}
typeset_element (align_item_p_);
Axis_group_element::extra_extent (Axis a )const
{
Interval g;
- purge_extra ();
+ purge_extra (); // Yeah yeah, const correctness.
for (int i=0; i < extra_elems_.size (); i++)
{
Interval ge = extra_elems_[i]->extent (a);
Item *it = dynamic_cast <Item *> (elt) ;
if (Spanner * sp =dynamic_cast <Spanner *> (elt))
{
- for (int j =0; j < sp->broken_info_.size(); j++)
+ for (int j =0; j < sp->broken_into_l_arr_.size(); j++)
{
- Line_of_score *l = sp->broken_info_[j].line_l_;
+ Line_of_score *l = sp->broken_into_l_arr_[j]->line_l ();
Axis_group_spanner * my_broken_l
= dynamic_cast<Axis_group_spanner*>(find_broken_piece (l));
--- /dev/null
+/*
+ break.cc -- implement Break_algorithm
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "score-column.hh"
+#include "break.hh"
+#include "paper-def.hh"
+#include "spring-spacer.hh"
+#include "debug.hh"
+#include "line-of-score.hh"
+#include "paper-score.hh"
+#include "paper-column.hh"
+#include "cpu-timer.hh"
+#include "command-request.hh"
+
+String
+Col_stats::str () const
+{
+ String s;
+ if (!count_i_)
+ s = _ ("0 lines");
+ else if (count_i_ == 1)
+ s = _f ("1 line (of %.0f columns)", (Real)cols_i_/count_i_);
+ else
+ s = _f ("%d lines (with an average of %.1f columns)",
+ count_i_, (Real)cols_i_/count_i_);
+ return s;
+}
+
+void
+Col_stats::add (Line_of_cols const& line)
+{
+ count_i_++;
+ cols_i_ += line.size ();
+}
+
+
+Col_stats::Col_stats ()
+{
+ count_i_ =0;
+ cols_i_ =0;
+}
+
+/* **************************************************************** */
+
+
+Array<int>
+Break_algorithm::find_break_indices () const
+{
+ Line_of_cols all (pscore_l_->col_l_arr_);
+ Array<int> retval;
+
+ for (int i=0; i < all.size (); i++)
+ if (all[i]->breakable_b ())
+ retval.push (i);
+
+ if (linelength <=0)
+ while (retval.size () >2)
+ retval.del (1);
+
+ return retval;
+}
+
+
+Line_of_cols
+Break_algorithm::find_breaks () const
+{
+ Line_of_cols all (pscore_l_->col_l_arr_);
+ Line_of_cols retval;
+
+ for (int i=0; i < all.size (); i++)
+ if (all[i]->breakable_b ())
+ retval.push (all[i]);
+
+
+ if (linelength <=0)
+ while (retval.size () >2)
+ retval.del (1);
+
+ return retval;
+}
+
+
+
+
+
+Line_spacer*
+Break_algorithm::generate_spacing_problem (Line_of_cols curline, Interval line) const
+{
+ // ugh
+ Spring_spacer * sp= dynamic_cast<Spring_spacer*> ((*get_line_spacer) ());
+
+ sp->paper_l_ = pscore_l_->paper_l_;
+ sp->add_column (curline[0], true, line[LEFT]);
+ for (int i=1; i< curline.size ()-1; i++)
+ sp->add_column (curline[i]);
+
+ if (line.length () > 0)
+ {
+ sp->add_column (curline.top (), true, line[RIGHT]);
+ sp->energy_normalisation_f_ = sqr (line.length ());
+ }
+ else
+ sp->add_column (curline.top ());
+
+ sp->prepare ();
+ return sp;
+}
+
+Break_algorithm::Break_algorithm ()
+{
+ pscore_l_ = 0;
+ get_line_spacer =0;
+ linelength = 0;
+}
+
+void
+Break_algorithm::set_pscore (Paper_score*s)
+{
+ pscore_l_ = s;
+ linelength = s->paper_l_->linewidth_f ();
+ do_set_pscore ();
+}
+
+bool
+Break_algorithm::feasible (Line_of_cols curline) const
+{
+ if (linelength <= 0)
+ return true;
+
+ for (int i=0; i < curline.size (); i++)
+ {
+ if (i && i < curline.size () -1
+ && ((dynamic_cast<Score_column*>(curline[i]))->break_penalty_i () >= Break_req::FORCE))
+ return false;
+ }
+ return true;
+}
+
+void
+Break_algorithm::problem_OK () const
+{
+ if (pscore_l_->col_l_arr_.empty ())
+ error (_("score does not have any columns"));
+ OK ();
+}
+
+void
+Break_algorithm::OK () const
+{
+}
+
+Array<Column_x_positions>
+Break_algorithm::solve () const
+{
+ Cpu_timer timer;
+
+ Array<Column_x_positions> h= do_solve ();
+
+ if (approx_stats_.count_i_)
+ *mlog << '\n' << _f ("approximated %s", approx_stats_.str ()) << endl;
+ if (exact_stats_.count_i_)
+ *mlog << _f ("calculated %s exactly", exact_stats_.str ()) << endl;
+ *mlog << _f ("elapsed time %.2f seconds", timer.read ()) << endl;
+
+ return h;
+}
+
+void
+Break_algorithm::do_set_pscore ()
+{
+
+}
scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
elems[0]->set_elt_property (minimum_space_scm_sym, first_pair);
-
-
Axis_align_item::do_pre_processing();
Real pre_space = elems[0]->extent (X_AXIS)[LEFT];
Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT];
- Real stretch_distance =0.;
+ Real stretch_distance =0.;
+
if (SCM_CAR (symbol_list) == extra_space_scm_sym)
{
spring_len += dists.top ();
stretch_distance = spring_len;
}
-
/*
Hint the spacing engine how much space to put in.
*/
gh_double2scm (spring_len)));
column_l ()->set_elt_property (stretch_distance_scm_sym,
- gh_double2scm (stretch_distance));
+ gh_cons (gh_double2scm (dists[0]),
+ gh_double2scm (stretch_distance)));
}
+++ /dev/null
-/*
- break.cc -- implement Break_algorithm
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "score-column.hh"
-#include "break.hh"
-#include "paper-def.hh"
-#include "spring-spacer.hh"
-#include "debug.hh"
-#include "line-of-score.hh"
-#include "paper-score.hh"
-#include "paper-column.hh"
-#include "cpu-timer.hh"
-#include "command-request.hh"
-
-String
-Col_stats::str () const
-{
- String s;
- if (!count_i_)
- s = _ ("0 lines");
- else if (count_i_ == 1)
- s = _f ("1 line (of %.0f columns)", (Real)cols_i_/count_i_);
- else
- s = _f ("%d lines (with an average of %.1f columns)",
- count_i_, (Real)cols_i_/count_i_);
- return s;
-}
-
-void
-Col_stats::add (Line_of_cols const& line)
-{
- count_i_++;
- cols_i_ += line.size ();
-}
-
-
-Col_stats::Col_stats ()
-{
- count_i_ =0;
- cols_i_ =0;
-}
-
-/* **************************************************************** */
-
-
-Array<int>
-Break_algorithm::find_break_indices () const
-{
- Line_of_cols all (pscore_l_->col_l_arr_);
- Array<int> retval;
-
- for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b ())
- retval.push (i);
-
- if (linelength <=0)
- while (retval.size () >2)
- retval.del (1);
-
- return retval;
-}
-
-
-Line_of_cols
-Break_algorithm::find_breaks () const
-{
- Line_of_cols all (pscore_l_->col_l_arr_);
- Line_of_cols retval;
-
- for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b ())
- retval.push (all[i]);
-
-
- if (linelength <=0)
- while (retval.size () >2)
- retval.del (1);
-
- return retval;
-}
-
-
-
-
-
-Line_spacer*
-Break_algorithm::generate_spacing_problem (Line_of_cols curline, Interval line) const
-{
- // ugh
- Spring_spacer * sp= dynamic_cast<Spring_spacer*> ((*get_line_spacer) ());
-
- sp->paper_l_ = pscore_l_->paper_l_;
- sp->add_column (curline[0], true, line[LEFT]);
- for (int i=1; i< curline.size ()-1; i++)
- sp->add_column (curline[i]);
-
- if (line.length () > 0)
- {
- sp->add_column (curline.top (), true, line[RIGHT]);
- sp->energy_normalisation_f_ = sqr (line.length ());
- }
- else
- sp->add_column (curline.top ());
-
- sp->prepare ();
- return sp;
-}
-
-Break_algorithm::Break_algorithm ()
-{
- pscore_l_ = 0;
- get_line_spacer =0;
- linelength = 0;
-}
-
-void
-Break_algorithm::set_pscore (Paper_score*s)
-{
- pscore_l_ = s;
- linelength = s->paper_l_->linewidth_f ();
- do_set_pscore ();
-}
-
-bool
-Break_algorithm::feasible (Line_of_cols curline) const
-{
- if (linelength <= 0)
- return true;
-
- for (int i=0; i < curline.size (); i++)
- {
- if (i && i < curline.size () -1
- && ((dynamic_cast<Score_column*>(curline[i]))->break_penalty_i () >= Break_req::FORCE))
- return false;
- }
- return true;
-}
-
-void
-Break_algorithm::problem_OK () const
-{
- if (pscore_l_->col_l_arr_.empty ())
- error (_("score does not have any columns"));
- OK ();
-}
-
-void
-Break_algorithm::OK () const
-{
-}
-
-Array<Column_x_positions>
-Break_algorithm::solve () const
-{
- Cpu_timer timer;
-
- Array<Column_x_positions> h= do_solve ();
-
- if (approx_stats_.count_i_)
- *mlog << '\n' << _f ("approximated %s", approx_stats_.str ()) << endl;
- if (exact_stats_.count_i_)
- *mlog << _f ("calculated %s exactly", exact_stats_.str ()) << endl;
- *mlog << _f ("elapsed time %.2f seconds", timer.read ()) << endl;
-
- return h;
-}
-
-void
-Break_algorithm::do_set_pscore ()
-{
-
-}
/*
extender-engraver.cc -- implement Extender_engraver
- (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1999 Glen Prideaux <glenprideaux@iname.com>,
+ Han-Wen Nienhuys, Jan Nieuwenhuizen.
+
*/
#include "proto.hh"
#include "extender-spanner.hh"
#include "score-column.hh"
#include "text-item.hh"
+#include "extender-engraver.hh"
ADD_THIS_TRANSLATOR (Extender_engraver);
Extender_engraver::Extender_engraver ()
{
+ current_lyric_l_ = 0;
+ last_lyric_l_ = 0;
extender_spanner_p_ = 0;
req_l_ = 0;
}
{
if (Text_item* t = dynamic_cast<Text_item*> (i.elem_l_))
{
- Rhythmic_req * rh = dynamic_cast<Rhythmic_req*> (i.req_l_);
- if (!rh)
- return;
-
- now_lyrics_.push (Text_lyric_tuple (t, rh, now_mom () + rh->length_mom ()));
- /*
- UGH. What do we do in case of multiple alternatives?
- */
+ current_lyric_l_ = t;
if (extender_spanner_p_
&& !extender_spanner_p_->spanned_drul_[RIGHT]
)
bool
-Extender_engraver::do_try_music (Music* req_l)
+Extender_engraver::do_try_music (Music* r)
{
- if (Extender_req* p = dynamic_cast <Extender_req *> (req_l))
+ if (Extender_req* p = dynamic_cast <Extender_req *> (r))
{
if (req_l_)
return false;
void
Extender_engraver::do_process_requests ()
{
- Array<Text_lyric_tuple> stopped_texts;
- Moment now = now_mom ();
-
- stopped_texts.clear ();
- while (past_lyrics_pq_.size ()
- && past_lyrics_pq_.front ().end_ == now)
- stopped_texts.push (past_lyrics_pq_.get ());
-
if (req_l_)
{
- if (!stopped_texts.size ())
+ if (!last_lyric_l_)
{
req_l_->warning ("Nothing to connect extender to on the left. Ignoring extender request");
return;
}
extender_spanner_p_ = new Extender_spanner;
- extender_spanner_p_->set_textitem (LEFT, stopped_texts[0].text_l_);
+ extender_spanner_p_->set_textitem (LEFT, last_lyric_l_);
announce_element (Score_element_info (extender_spanner_p_, req_l_));
}
}
void
Extender_engraver::do_pre_move_processing ()
{
- for (int i=0; i < now_lyrics_.size (); i++)
- {
- past_lyrics_pq_.insert (now_lyrics_[i]);
- }
- now_lyrics_.clear ();
-
if (extender_spanner_p_)
{
typeset_element (extender_spanner_p_);
extender_spanner_p_ = 0;
}
-}
-void
-Extender_engraver::do_post_move_processing ()
-{
- Moment now = now_mom ();
- while (past_lyrics_pq_.size () && past_lyrics_pq_.front ().end_ < now)
- past_lyrics_pq_.delmin ();
- req_l_ =0;
-}
-
-/**********************************************************************/
-Text_lyric_tuple::Text_lyric_tuple ()
-{
- text_l_ =0;
- req_l_ =0;
- end_ = 0;
+ if (current_lyric_l_)
+ {
+ last_lyric_l_ = current_lyric_l_;
+ current_lyric_l_ =0;
+ }
}
-Text_lyric_tuple::Text_lyric_tuple (Text_item *h, Rhythmic_req*m, Moment mom)
+void
+Extender_engraver::do_post_move_processing ()
{
- text_l_ = h;
- req_l_ = m;
- end_ = mom;
+ req_l_ = 0;
}
-int
-Text_lyric_tuple::time_compare (Text_lyric_tuple const&h1,
- Text_lyric_tuple const &h2)
-{
- return (h1.end_ - h2.end_ ).sign ();
-}
--- /dev/null
+/*
+ new-repeated-music-iterator.cc -- implement Folded_repeat_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "folded-repeat-iterator.hh"
+#include "new-repeated-music.hh"
+#include "music-list.hh"
+#include "simultaneous-music-iterator.hh"
+#include "translator-group.hh"
+
+Folded_repeat_iterator::Folded_repeat_iterator ()
+{
+ main_iter_p_ = 0;
+ alternative_iter_p_ = 0;
+}
+
+bool
+Folded_repeat_iterator::ok () const
+{
+ return main_iter_p_ || alternative_iter_p_;
+}
+
+Folded_repeat_iterator::~Folded_repeat_iterator ()
+{
+ delete main_iter_p_;
+ delete alternative_iter_p_;
+}
+
+Moment
+Folded_repeat_iterator::next_moment () const
+{
+ if (main_iter_p_)
+ {
+ return main_iter_p_->next_moment ();
+ }
+ else
+ return main_length_mom_ + alternative_iter_p_->next_moment ();
+}
+
+void
+Folded_repeat_iterator::construct_children ()
+{
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
+ main_iter_p_ = get_iterator_p (mus->repeat_body_p_);
+ if (!main_iter_p_->ok())
+ {
+ leave_body ();
+ enter_alternative ();
+ }
+}
+
+void
+Folded_repeat_iterator::do_process_and_next (Moment m)
+{
+ if (!m)
+ {
+ bool success = try_music (music_l_);
+ if (!success)
+ music_l_->warning ( _("No one to print a repeat brace"));
+ }
+
+ if (main_iter_p_)
+ {
+ main_iter_p_->process_and_next (m);
+ if (!main_iter_p_->ok ())
+ leave_body ();
+ }
+
+ if (!main_iter_p_ && !alternative_iter_p_)
+ {
+ enter_alternative ();
+ }
+
+ if (alternative_iter_p_)
+ {
+ alternative_iter_p_->process_and_next (m - main_length_mom_);
+ if (!alternative_iter_p_->ok ())
+ {
+ delete alternative_iter_p_;
+ alternative_iter_p_ =0;
+ }
+ }
+}
+
+void
+Folded_repeat_iterator::leave_body ()
+{
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
+ delete main_iter_p_;
+ main_iter_p_ = 0;
+ main_length_mom_ += mus->repeat_body_p_->length_mom ();
+}
+
+void
+Folded_repeat_iterator::enter_alternative ()
+{
+ Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
+ if (mus->alternatives_p_)
+ {
+ Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
+ s->separate_contexts_b_ = true;
+ s->init_translator (mus->alternatives_p_, report_to_l ());
+
+ alternative_iter_p_ = s;
+ alternative_iter_p_->construct_children ();
+ }
+}
+
+void
+Folded_repeat_iterator::do_print () const
+{
+#ifndef NPRINT
+#endif
+}
+
+Music_iterator*
+Folded_repeat_iterator::try_music_in_children (Music const* m) const
+{
+ if (main_iter_p_)
+ {
+ return main_iter_p_->try_music (m);
+ }
+ if (alternative_iter_p_)
+ return alternative_iter_p_->try_music (m);
+ return 0;
+}
return 0;
}
-Music*
-Grace_iterator::next_music_l ()
-{
- return 0;
-}
#include "grace-align-item.hh"
#include "note-head.hh"
#include "local-key-item.hh"
+#include "paper-column.hh"
class Grace_position_engraver:public Engraver
{
+ Paper_column *last_musical_col_l_;
protected:
VIRTUAL_COPY_CONS(Translator);
virtual void acknowledge_element (Score_element_info);
virtual void process_acknowledged ();
virtual void do_post_move_processing ();
+ virtual void do_pre_move_processing ();
Grace_align_item*align_l_;
Link_array<Item> support_;
public:
Grace_position_engraver::Grace_position_engraver ()
{
align_l_ =0;
+ last_musical_col_l_ =0;
}
void
}
else if (Note_head * n = dynamic_cast <Note_head*> (i.elem_l_))
{
- support_.push (n);
+ if (n->get_elt_property (grace_scm_sym) == SCM_BOOL_F)
+ support_.push (n);
}
else if (Local_key_item*it = dynamic_cast<Local_key_item*>(i.elem_l_))
{
}
}
+void
+Grace_position_engraver::do_pre_move_processing ()
+{
+ /*
+ We don't have support. Either some moron tried attaching us to a rest,
+ or we're at the end of the piece. In the latter case, we have a
+ problem if there are spanners in the grace section,
+ they will want to be broken into pieces (their line_l () field is nil).
+
+ Solution: attach ourselves to the last musical column known. A little intricate.
+
+ */
+ if (align_l_ && !align_l_->supported_b ())
+ {
+ Graphical_element * elt = align_l_->parent_l (X_AXIS);
+ if (elt)
+ return;
+
+ warning (_("Unattached grace notes. Attaching to last musical column."));
+ Axis_group_element * ae = dynamic_cast<Axis_group_element*> (elt);
+ if (ae)
+ ae->remove_element (align_l_);
+ else if (elt)
+ align_l_->dim_cache_[X_AXIS]->parent_l_ = 0;
+ last_musical_col_l_->add_element (align_l_);
+ }
+ last_musical_col_l_ = get_staff_info ().musical_pcol_l ();
+}
+
void
Grace_position_engraver::do_post_move_processing ()
{
Hyphen_engraver::Hyphen_engraver ()
{
+ current_lyric_l_ = 0;
+ last_lyric_l_ = 0;
hyphen_spanner_p_ = 0;
req_l_ = 0;
}
{
if (Text_item* t = dynamic_cast<Text_item*> (i.elem_l_))
{
- Rhythmic_req * rh = dynamic_cast<Rhythmic_req*> (i.req_l_);
- if (!rh)
- return;
-
- now_lyrics_.push (Text_lyric_tuple (t, rh, now_mom () + rh->length_mom ()));
- /*
- UGH. What do we do in case of multiple alternatives?
- */
+ current_lyric_l_ = t;
if (hyphen_spanner_p_
&& !hyphen_spanner_p_->spanned_drul_[RIGHT]
)
void
Hyphen_engraver::do_process_requests ()
{
- Array<Text_lyric_tuple> stopped_texts;
- Moment now = now_mom ();
-
- stopped_texts.clear ();
- while (past_lyrics_pq_.size ()
- && past_lyrics_pq_.front ().end_ == now)
- stopped_texts.push (past_lyrics_pq_.get ());
-
if (req_l_)
{
- if (!stopped_texts.size ())
+ if (!last_lyric_l_)
{
req_l_->warning ("Nothing to connect hyphen to on the left. Ignoring hyphen request");
return;
}
hyphen_spanner_p_ = new Hyphen_spanner;
- hyphen_spanner_p_->set_textitem (LEFT, stopped_texts[0].text_l_);
+ hyphen_spanner_p_->set_textitem (LEFT, last_lyric_l_);
announce_element (Score_element_info (hyphen_spanner_p_, req_l_));
}
}
void
Hyphen_engraver::do_pre_move_processing ()
{
- for (int i=0; i < now_lyrics_.size (); i++)
- {
- past_lyrics_pq_.insert (now_lyrics_[i]);
- }
- now_lyrics_.clear ();
-
if (hyphen_spanner_p_)
{
typeset_element (hyphen_spanner_p_);
hyphen_spanner_p_ = 0;
}
+
+ if (current_lyric_l_)
+ {
+ last_lyric_l_ = current_lyric_l_;
+ current_lyric_l_ =0;
+ }
}
+
void
Hyphen_engraver::do_post_move_processing ()
{
- Moment now = now_mom ();
- while (past_lyrics_pq_.size () && past_lyrics_pq_.front ().end_ < now)
- past_lyrics_pq_.delmin ();
-
- req_l_ =0;
+ req_l_ = 0;
}
#include <strstream.h>
+
+#include "file-path.hh"
#include "includable-lexer.hh"
#include "source-file.hh"
#include "source.hh"
if (!sl)
{
String msg = _f ("can't find file: `%s\'", s);
+ msg += _f ("\nSearch path is `%s'\n", global_sources->path_C_->str ().ch_C());
LexerError (msg.ch_C ());
+
return;
}
filename_str_arr_.push (sl->name_str ());
Adobe_font_metric ();
void read_char_metrics (Data_file &input, int size);
- Character_metric *get_char (int, bool) const;
+ Character_metric const *get_char (int, bool) const;
};
Adobe_font_metric read_afm_file (String fn);
source file of the GNU LilyPond music typesetter
- (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1999 Glen Prideaux <glenprideaux@iname.com>,
+ Han-Wen Nienhuys, Jan Nieuwenhuizen.
*/
#ifndef EXTENDER_ENGRAVER_HH
#include "drul-array.hh"
#include "extender-spanner.hh"
#include "pqueue.hh"
-
-struct Text_lyric_tuple {
- Rhythmic_req *req_l_ ;
- Text_item *text_l_;
- Moment end_;
-
- Text_lyric_tuple ();
- Text_lyric_tuple (Text_item*, Rhythmic_req*, Moment);
- static int time_compare (Text_lyric_tuple const &, Text_lyric_tuple const &);
-};
-
-inline int compare (Text_lyric_tuple const &a, Text_lyric_tuple const &b)
-{
- return Text_lyric_tuple::time_compare (a,b);
-}
-
-
+#include "extender-engraver.hh"
/**
- Generate an extender. Should make an Extender_spanner that typesets
- a nice extender line.
-
- We remember all Text_items that come across, and store their
- termination times. When we get a request, we create the spanner, and
- attach the left point to the finished lyrics, and the right point to
- any lyrics we receive by then.
-*/
+ Generate an centred extender. Should make a Extender_spanner that
+ typesets a nice centred extender of varying length depending on the
+ gap between syllables.
+
+ We remember the last Text_item that come across. When we get a
+ request, we create the spanner, and attach the left point to the
+ last lyrics, and the right point to any lyrics we receive by
+ then. */
class Extender_engraver : public Engraver
{
- PQueue<Text_lyric_tuple> past_lyrics_pq_;
- Array<Text_lyric_tuple> now_lyrics_;
- Array<Text_lyric_tuple> stopped_lyrics_;
-
+ Text_item * last_lyric_l_;
+ Text_item * current_lyric_l_;
Extender_req* req_l_;
Extender_spanner* extender_spanner_p_;
-
-
public:
Extender_engraver ();
VIRTUAL_COPY_CONS (Translator);
virtual void do_print () const;
virtual void do_process_and_next (Moment);
+ virtual Music_iterator *try_music_in_children (Music const *) const;
};
#endif /* FOLDED_REPEAT_ITERATOR_HH */
struct Font_metric
{
- virtual Character_metric *get_char (int ascii, bool warn) const=0;
+ virtual Character_metric const *get_char (int ascii, bool warn) const=0;
virtual ~Font_metric () {}
};
~Grace_iterator ();
virtual void construct_children () ;
virtual void do_process_and_next (Moment);
+
Moment next_moment () const;
- Music* next_music_l ();
};
/**
- Generate an centred hyphen. Should make a Hyphen_spanner that typesets
- a nice centred hyphen of varying length depending on the gap between syllables.
-
- We remember all Text_items that come across, and store their
- termination times. When we get a request, we create the spanner, and
- attach the left point to the finished lyrics, and the right point to
- any lyrics we receive by then.
-*/
+ Generate an centred hyphen. Should make a Hyphen_spanner that
+ typesets a nice centred hyphen of varying length depending on the
+ gap between syllables.
+
+ We remember the last Text_item that come across. When we get a
+ request, we create the spanner, and attach the left point to the
+ last lyrics, and the right point to any lyrics we receive by
+ then. */
class Hyphen_engraver : public Engraver
{
- PQueue<Text_lyric_tuple> past_lyrics_pq_;
- Array<Text_lyric_tuple> now_lyrics_;
- Array<Text_lyric_tuple> stopped_lyrics_;
-
+ Text_item * last_lyric_l_;
+ Text_item * current_lyric_l_;
Hyphen_req* req_l_;
Hyphen_spanner* hyphen_spanner_p_;
-
-
public:
Hyphen_engraver ();
VIRTUAL_COPY_CONS (Translator);
/// is #c# contained in #*this#?
bool contains_b (Paper_column const *c) const;
- Line_of_score * set_breaking (Array<Column_x_positions> const&, int j) const;
+ Line_of_score * set_breaking (Array<Column_x_positions> const&, int j);
void output_all (bool last_line);
--- /dev/null
+
+/*
+ lyric-combine-music-iterator.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef LYRIC_COMBINE_MUSIC_ITERATOR_HH
+#define LYRIC_COMBINE_MUSIC_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+class Lyric_combine_music_iterator : public Music_iterator
+{
+ Music_iterator * music_iter_p_;
+ Music_iterator * lyric_iter_p_;
+
+protected:
+ bool melisma_started_b_;
+
+
+ virtual void construct_children ();
+ virtual Moment next_moment () const;
+ virtual void do_process_and_next (Moment);
+ virtual Music_iterator *try_music_in_children (Music const*) const;
+
+ virtual bool ok () const;
+ virtual void do_print () const;
+ virtual ~Lyric_combine_music_iterator ();
+public:
+ Lyric_combine_music_iterator ();
+};
+#endif /* LYRIC_COMBINE_MUSIC_ITERATOR_HH */
+
--- /dev/null
+/*
+ lyric-combine-music.hh -- declare Lyric_combine_music
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef LYRIC_COMBINE_MUSIC_HH
+#define LYRIC_COMBINE_MUSIC_HH
+#include "music.hh"
+
+
+class Lyric_combine_music : public Music
+{
+ Music * music_p_;
+ Music * lyrics_p_;
+public:
+ Music * music_l () const;
+ Music * lyrics_l () const;
+
+ Lyric_combine_music (Music*, Music*);
+
+ virtual void transpose (Musical_pitch);
+ virtual void do_print () const;
+
+ VIRTUAL_COPY_CONS(Music);
+ Lyric_combine_music (Lyric_combine_music const&);
+ virtual Moment length_mom () const;
+ virtual ~Lyric_combine_music ();
+ virtual Musical_pitch to_relative_octave (Musical_pitch);
+ virtual void compress (Moment);
+};
+#endif /* LYRIC_COMBINE_MUSIC_HH */
+
int patch_i_;
};
+extern Mudela_version oldest_version;
+
#endif // MUDELA_VERSION_HH
*/
Music_iterator* get_iterator_p (Music const*mus) const;
- /** Do the actual reporting. This should be overriden in derived
+ /** Do the actual move. This should be overriden in derived
classes. It is called by #process_and_next#, the public interface
*/
virtual void do_process_and_next (Moment until);
+
+ virtual Music_iterator* try_music_in_children (Music const *) const;
+
public:
+ /**
+ Do the reporting. Will try MUSIC_L_ in its own translator first,
+ then its children. Returns the iterator that succeeded
+ */
+ Music_iterator * try_music (Music const *) const;
+
/**
The translation unit that we this iterator is reporting to now.
*/
/// Find the next interesting point in time.
virtual Moment next_moment() const;
- /// Return next Music item
- virtual Music* next_music_l ();
///Are we finished with this piece of music?
virtual bool ok() const;
+++ /dev/null
-/*
- music-list-iterator.hh -- declare Music_list_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-
-#ifndef MUSIC_LIST_ITERATOR_HH
-#define MUSIC_LIST_ITERATOR_HH
-
-#include "music-iterator.hh"
-
-
-class Music_list_iterator : public Music_iterator
-{
-public:
- Music_list_iterator ();
- virtual ~Music_list_iterator ();
-
- virtual void construct_children ();
- virtual Moment next_moment () const;
- virtual Music* next_music_l ();
- virtual bool ok () const;
-
-protected:
- virtual void do_print () const;
- virtual void do_process_and_next (Moment);
-};
-
-#endif // MUSIC_LIST_ITERATOR_HH
#include "cons.hh"
-class Music_list : public Cons_list<Music>
+class Music_list : public Cons_list<Music> , public Input
{
public:
Musical_pitch do_relative_octave (Musical_pitch, bool);
- Music_iterator* do_rhythm (Music_iterator*);
void add_music (Music*);
Music_list (Music_list const&);
Music_list ();
VIRTUAL_COPY_CONS(Music);
Musical_pitch do_relative_octave (Musical_pitch p, bool b);
- Music_iterator* do_rhythm (Music_iterator*);
virtual void transpose (Musical_pitch );
virtual void compress (Moment);
void add_music (Music *music_p);
protected:
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
virtual void do_print() const;
};
Simultaneous_music(Music_list *);
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
virtual Moment length_mom () const;
};
VIRTUAL_COPY_CONS(Music);
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
Request_chord();
};
virtual void construct_children () ;
virtual Moment next_moment () const;
- virtual Music* next_music_l ();
virtual bool ok () const;
protected:
virtual void do_print () const;
virtual void do_process_and_next (Moment) ;
+ virtual Music_iterator *try_music_in_children (Music const *) const;
+
Music_iterator *child_iter_p_;
};
virtual Moment length_mom () const;
virtual ~Music_wrapper ();
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
virtual void compress (Moment);
};
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
/// The duration of this piece of music
virtual Moment length_mom () const;
VIRTUAL_COPY_CONS(Music);
};
+/** is anyone playing a note?
+ Used for communication between Music & Lyrics
+ */
+class Busy_playing_req : public Request
+{
+public:
+ VIRTUAL_COPY_CONS (Music);
+};
+/**
+ instruct lyric context to alter typesetting (unimplemented). */
+class Melisma_req : public Span_req
+{
+public:
+ VIRTUAL_COPY_CONS(Music);
+};
+
+/**
+ Helping req to signal start of a melisma from within a context, and
+ to */
+class Melisma_playing_req : public Request
+{
+public:
+ VIRTUAL_COPY_CONS (Music);
+};
#endif // MUSICALREQUESTS_HH
Music_sequence * alternatives_p_;
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
/// The duration of this piece of music
virtual Moment length_mom () const;
Direction notehead_align_dir_;
Note_head_side ();
+ bool supported_b () const;
void add_support (Item*);
VIRTUAL_COPY_CONS (Score_element);
protected:
#ifndef HEADSGRAV_HH
#define HEADSGRAV_HH
#include "engraver.hh"
+#include "pqueue.hh"
/**
make balls and rests
Link_array<Note_head> note_p_arr_;
Link_array<Dots> dot_p_arr_;
Link_array<Note_req> note_req_l_arr_;
+ PQueue<Moment> notes_end_pq_;
public:
VIRTUAL_COPY_CONS(Translator);
Request* get_script_req (char);
Request*get_grouping_req (Array<int> i_arr);
+#error
#endif // PARSECONSTRUCT_HH
+++ /dev/null
-/*
- re-rhythmed-music.hh -- declare Re_rhythmed_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
-
- */
-
-#ifndef RE_RHYTHMED_MUSIC_HH
-#define RE_RHYTHMED_MUSIC_HH
-
-#include "music-wrapper.hh"
-
-class Re_rhythmed_music : public Music_wrapper
-{
-public:
- void do_print () const;
- Re_rhythmed_music (Music*, Music*);
-
- VIRTUAL_COPY_CONS(Music);
- virtual Music_iterator* to_rhythm (Music_iterator*);
-};
-
-
-#endif /* RE_RHYTHMED_MUSIC_HH */
-
VIRTUAL_COPY_CONS(Music);
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
};
protected:
virtual void do_process_and_next (Moment);
virtual Moment next_moment() const;
- virtual Music* next_music_l ();
virtual void construct_children();
virtual bool ok() const;
virtual void do_print() const;
#ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
#define SEQUENTIAL_MUSIC_ITERATOR_HH
-#include "music-list-iterator.hh"
+#include "music-iterator.hh"
/** Sequential_music iteration: walk each element in turn, and
construct an iterator for every element.
*/
-class Sequential_music_iterator : public Music_list_iterator
+class Sequential_music_iterator : public Music_iterator
{
public:
Sequential_music_iterator ();
virtual void construct_children ();
virtual Moment next_moment () const;
- virtual Music* next_music_l ();
virtual bool ok () const;
protected:
virtual void do_print() const;
virtual void do_process_and_next (Moment);
+ virtual Music_iterator *try_music_in_children (Music const*) const;
+
private:
Moment here_mom_;
- /// don't go into next element when you finish.
- bool per_elt_b_;
Cons<Music> *cursor_;
Music_iterator * iter_p_;
#ifndef SIMULTANEOUS_MUSIC_ITERATOR_HH
#define SIMULTANEOUS_MUSIC_ITERATOR_HH
-
+#include "music-iterator.hh"
#include "cons.hh"
-#include "music-list-iterator.hh"
-class Simultaneous_music_iterator : public Music_list_iterator
+class Simultaneous_music_iterator : public Music_iterator
{
public:
protected:
virtual void do_print () const;
virtual void do_process_and_next (Moment);
+ virtual Music_iterator *try_music_in_children (Music const*) const;
+
private:
Cons_list<Music_iterator> children_p_list_;
class Spanner : public virtual Score_element {
public:
Drul_array<Item*> spanned_drul_;
- Array<Breaking_information> broken_info_;
+ Link_array<Spanner> broken_into_l_arr_;
void set_bounds (Direction d, Item*);
Tex_font_metric ();
void clear (int n);
- Character_metric *get_char (int, bool) const;
+ Character_metric const *get_char (int, bool) const;
Tex_font_char_metric const &find_ascii (int ascii, bool warn=true) const;
void read_file (String name);
String str () const;
VIRTUAL_COPY_CONS(Music);
virtual Musical_pitch to_relative_octave (Musical_pitch);
- virtual Music_iterator* to_rhythm (Music_iterator*);
};
#endif /* TRANSPOSED_MUSIC_HH */
virtual void construct_children ();
virtual Moment next_moment () const;
virtual void do_process_and_next (Moment);
+ virtual Music_iterator *try_music_in_children (Music const*) const;
+
virtual bool ok () const;
virtual void next_element ();
virtual void do_print () const;
#include "interval.hh"
#include "parser.hh"
#include "debug.hh"
-#include "parseconstruct.hh"
#include "main.hh"
#include "musical-request.hh"
#include "identifier.hh"
+#include "mudela-version.hh"
+#include "version.hh"
+
void strip_trailing_white (String&);
void strip_leading_white (String&);
+
+bool
+valid_version_b (String s);
+
+
+
#define start_quote() \
yy_push_state (quote);\
yylval.string = new String
%option never-interactive
%option warn
+%x version
%x chords
%x incl
%x lyrics
}
}
+<INITIAL,chords,lyrics,notes>\\version{WHITE}* {
+ yy_push_state (version);
+}
+<version>\"[^"]*\";? { /* got the include file name */
+ String s (YYText ()+1);
+ s = s.left_str (s.index_last_i ('"'));
+ DOUT << "#version `" << s << "\'\n";
+ if (!valid_version_b (s))
+ return INVALID;
+ yy_pop_state ();
+}
+<version>. {
+ LexerError ("No quoted string found after \\version");
+ yy_pop_state ();
+}
<longcomment>{
[^\%]* {
}
yylval.i = String_convert::dec2_i (String (YYText ()));
return DIGIT;
}
-
{UNSIGNED} {
yylval.i = String_convert::dec2_i (String (YYText ()));
return UNSIGNED;
int
My_lily_lexer::scan_escaped_word (String str)
-{
+{
DOUT << "\\word: `" << str<<"'\n";
int l = lookup_keyword (str);
if (l != -1) {
s = s.left_str (i+1);
}
+
+
+
+bool
+valid_version_b (String s)
+{
+ Mudela_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
+ Mudela_version ver (s);
+ if (!((ver >= oldest_version) && (ver <= current)))
+ {
+ error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), current.str ()));
+ if (!version_ignore_global_b)
+ return false;
+ }
+ return true;
+}
+
#include "file-path.hh"
#include "debug.hh"
-
-
-
/*
scm_m_quote doesn't use any env, but needs one for a good signature in GUILE.
return scm_sysintern (name.ch_C(), val);
}
-/**
+/**
Read a file, and shove it down GUILE. GUILE also has file read
functions, but you can't fiddle with the path of those.
-
*/
void
read_lily_scm_file (String fn)
}
+SCM
+ly_gulp_file (SCM name)
+{
+ String fn (ly_scm2string (name));
+ String s = global_path.find (fn);
+ if (s == "")
+ {
+ String e = _f ("Can not find file `%s\'", fn);
+ e += " ";
+ e += _f ("(Load path is `%s\'", global_path.str ());
+ error (e);
+ }
+ else
+ *mlog << '[' << s;
+
+
+ Simple_file_storage f(s);
+ return gh_str02scm (f.ch_C());
+}
+
void
ly_display_scm (SCM s)
{
init_functions ()
{
scm_make_gsubr ("ly-warn", 1, 0, 0, ly_warning);
+ scm_make_gsubr ("ly-gulp-file", 1,0, 0, ly_gulp_file);
}
-
extern void init_symbols ();
void
// const?
Line_of_score*
-Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j) const
+Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j)
{
const Link_array<Paper_column> &curline (breaking[j].cols_);
const Array<Real> &config (breaking[j].config_);
b.broken_spanner_l_ = line_l;
b.line_l_ = line_l;
- broken_info_.push (b);
+ broken_into_l_arr_.push (line_l);
return line_l;
}
Real step = 1.0;
int minht = 2 * staff_size;
int maxht = 7 * minht;
- int idx = ((maxht - step) <? y - minht) / step;
+ int idx = int (((maxht - step) <? y - minht) / step);
idx = idx >? 0;
SCM f = ly_symbol (String ("feta-braces" + to_str (staff_size)));
--- /dev/null
+/*
+ lyric-combine-music-iterator.cc -- implement Lyric_combine_music_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "translator-group.hh"
+#include "lyric-combine-music-iterator.hh"
+#include "lyric-combine-music.hh"
+#include "musical-request.hh"
+
+Busy_playing_req busy_req;
+Melisma_req melisma_start_req;
+Melisma_req melisma_stop_req;
+Melisma_playing_req melisma_playing_req;
+
+
+Lyric_combine_music_iterator::Lyric_combine_music_iterator ()
+{
+ melisma_start_req.span_dir_ = START;
+ melisma_stop_req.span_dir_ = STOP;
+
+ melisma_started_b_ = false;
+ music_iter_p_ =0;
+ lyric_iter_p_ =0;
+}
+
+Moment
+Lyric_combine_music_iterator::next_moment () const
+{
+ Moment musnext = music_iter_p_->next_moment ();
+ return musnext;
+}
+
+bool
+Lyric_combine_music_iterator::ok () const
+{
+ return music_iter_p_->ok ();
+}
+
+void
+Lyric_combine_music_iterator::do_print () const
+{
+ music_iter_p_->print ();
+ lyric_iter_p_->print ();
+}
+
+void
+Lyric_combine_music_iterator::construct_children ()
+{
+ Lyric_combine_music const * m = dynamic_cast<Lyric_combine_music const*> (music_l_);
+
+ music_iter_p_ = get_iterator_p (m->music_l ());
+ lyric_iter_p_ = get_iterator_p (m->lyrics_l ());
+}
+
+void
+Lyric_combine_music_iterator::do_process_and_next (Moment m)
+{
+ Moment my_next = music_iter_p_->next_moment ();
+ if (my_next > m)
+ return;
+
+ music_iter_p_->process_and_next (m);
+
+ bool busy = try_music (&busy_req);
+ if (busy)
+ {
+ bool melisma_b = try_music (&melisma_playing_req);
+ if (!melisma_started_b_ || !melisma_b)
+ {
+ if (lyric_iter_p_->ok ())
+ {
+ if (melisma_b && !melisma_started_b_)
+ lyric_iter_p_->try_music (&melisma_start_req);
+ else if (melisma_started_b_)
+ lyric_iter_p_->try_music (&melisma_stop_req);
+
+ Moment m= lyric_iter_p_->next_moment ();
+ lyric_iter_p_->process_and_next (m);
+ }
+ }
+ melisma_started_b_ = melisma_b;
+ }
+
+
+
+ Music_iterator::do_process_and_next (m);
+}
+
+Lyric_combine_music_iterator::~Lyric_combine_music_iterator ()
+{
+ delete lyric_iter_p_;
+ delete music_iter_p_;
+}
+
+Music_iterator*
+Lyric_combine_music_iterator::try_music_in_children (Music const *m) const
+{
+ Music_iterator * i = music_iter_p_->try_music (m);
+ if (i)
+ return i;
+ else
+ return lyric_iter_p_->try_music (m);
+}
+
--- /dev/null
+/*
+ lyric-combine-music.cc -- implement Lyric_combine_music
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "lyric-combine-music.hh"
+#include "musical-pitch.hh"
+
+Lyric_combine_music::Lyric_combine_music (Music * m, Music * l)
+{
+ music_p_ = m;
+ lyrics_p_ = l;
+}
+
+Lyric_combine_music::~Lyric_combine_music ()
+{
+ delete music_p_;
+ delete lyrics_p_;
+}
+
+Lyric_combine_music::Lyric_combine_music (Lyric_combine_music const&s)
+ : Music (s)
+{
+ music_p_ = s.music_p_ ? s.music_p_->clone ():0;
+ lyrics_p_ = s.lyrics_p_ ? s.lyrics_p_->clone ():0;
+}
+
+void
+Lyric_combine_music::transpose (Musical_pitch p)
+{
+ music_p_->transpose (p);
+ lyrics_p_->transpose (p);
+}
+
+void
+Lyric_combine_music::do_print () const
+{
+ music_p_->print();
+ lyrics_p_->print ();
+}
+
+Moment
+Lyric_combine_music::length_mom () const
+{
+ return music_p_->length_mom ();
+}
+
+Musical_pitch
+Lyric_combine_music::to_relative_octave ( Musical_pitch p )
+{
+ p = music_p_->to_relative_octave (p);
+ return lyrics_p_->to_relative_octave (p);
+}
+
+void
+Lyric_combine_music::compress (Moment m)
+{
+ music_p_->compress (m);
+}
+
+Music*
+Lyric_combine_music::music_l () const
+{
+ return music_p_;
+}
+
+Music*
+Lyric_combine_music::lyrics_l () const
+{
+ return lyrics_p_;
+}
global_path.parse_path (env_sz);
- char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", 0};
+ char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", "ps", 0};
for (char **s = suffixes; *s; s++){
if (!prefix_directory.empty_b())
global_path.add (prefix_directory + to_str ('/') + String (*s));
--- /dev/null
+/*
+ melisma-engraver.cc -- implement Melisma_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "engraver.hh"
+#include "musical-request.hh"
+
+/**
+ Signal existence of melismas.
+ */
+class Melisma_engraver:public Engraver
+{
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ bool do_try_music (Music *);
+};
+ADD_THIS_TRANSLATOR(Melisma_engraver);
+
+bool
+Melisma_engraver::do_try_music (Music *m )
+{
+ if (dynamic_cast<Melisma_playing_req*>(m))
+ {
+ Scalar s (get_property ("melismaBusy", 0));
+ return s.to_bool ();
+ }
+ return false;
+}
#include "unfolded-repeat-iterator.hh"
#include "grace-iterator.hh"
#include "grace-music.hh"
+#include "lyric-combine-music.hh"
+#include "lyric-combine-music-iterator.hh"
void
Music_iterator::do_print() const
if (!check_debug)
return ;
DOUT << classname(this) << "{";
- DOUT << "report to " <<
- report_to_l() << " (" << classname (report_to_l ()) << ")\n";
+ Translator_group *t = report_to_l();
+ DOUT << "report to " << t->type_str_ << " = " << t->id_str_ << "\n";
if (ok())
DOUT << "next at " << next_moment() << " ";
else
return 0;
}
-Music*
-Music_iterator::next_music_l ()
-{
- return 0;
-}
void
Music_iterator::process_and_next (Moment m)
if (dynamic_cast<Request_chord const *> (m))
p = new Request_chord_iterator;
+ else if (dynamic_cast<Lyric_combine_music const*> (m))
+ p = new Lyric_combine_music_iterator;
else if (dynamic_cast<Simultaneous_music const *> (m))
p = new Simultaneous_music_iterator;
else if (dynamic_cast<Sequential_music const *> (m))
first_b_ = true;
}
+Music_iterator*
+Music_iterator::try_music (Music const *m) const
+{
+ bool b = report_to_l ()->try_music ((Music*)m); // ugh
+ Music_iterator * it = b ? (Music_iterator*) this : 0; // ugh
+ if (!it)
+ it = try_music_in_children (m);
+ return it;
+}
+
+Music_iterator*
+Music_iterator::try_music_in_children (Music const * ) const
+{
+ return 0;
+}
+++ /dev/null
-/*
- Music_list-iterator.cc -- implement Music_list_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "music-list-iterator.hh"
-#include "music-list.hh"
-
-Music_list_iterator::Music_list_iterator ()
-{
-}
-
-Music_list_iterator::~Music_list_iterator ()
-{
-}
-
-void
-Music_list_iterator::construct_children ()
-{
-}
-
-void
-Music_list_iterator::do_print() const
-{
-}
-
-void
-Music_list_iterator::do_process_and_next (Moment)
-{
-}
-
-Moment
-Music_list_iterator::next_moment () const
-{
- return 0;
-}
-
-Music*
-Music_list_iterator::next_music_l ()
-{
- return 0;
-}
-
-bool
-Music_list_iterator::ok () const
-{
- return false;
-}
-
return do_relative_octave (p, true);
}
-Music_iterator*
-Simultaneous_music::to_rhythm (Music_iterator* r)
-{
- return do_rhythm (r);
-}
Musical_pitch
Music_sequence::do_relative_octave (Musical_pitch p, bool b)
return music_p_list_p_->do_relative_octave (p, b);
}
-Music_iterator*
-Music_sequence::do_rhythm (Music_iterator* r)
-{
- return music_p_list_p_->do_rhythm (r);
-}
Musical_pitch
Music_list::do_relative_octave (Musical_pitch last, bool ret_first)
return retval;
}
-Music_iterator*
-Music_list::do_rhythm (Music_iterator* r)
-{
- for (Cons<Music> *i = head_; i ; i = i->next_)
- {
- r = i->car_->to_rhythm (r);
- }
- return r;
-}
Music_list::Music_list (Music_list const &s)
- : Cons_list<Music> (s)
+ : Cons_list<Music> (s), Input (s)
{
Cons_list<Music>::init ();
clone_killing_cons_list (*this, s.head_);
return last;
}
-Music_iterator*
-Request_chord::to_rhythm (Music_iterator* it)
-{
- for (Cons<Music>* i = music_p_list_p_->head_; i ; i = i->next_)
- {
- if (Rhythmic_req* r= dynamic_cast <Rhythmic_req*> (i->car_))
- {
- for (Music*m = it->next_music_l (); m; m = it->next_music_l ())
- {
-#if 0
- // is it sane to assume we don't want rests on lyrics/in rhythm?
- if (dynamic_cast <Rest_req*> (r)
- || dynamic_cast <Multi_measure_rest_req*> (r)
- || dynamic_cast <Skip_req*> (r))
- {
- continue;
- }
-#endif
- if (Rhythmic_req* d= dynamic_cast <Rhythmic_req*> (m))
- {
- r->duration_ = d->duration_;
- return it;
- }
- }
- }
- }
- return it;
-}
Music_list::Music_list ()
{
return do_relative_octave (p, false);
}
-Music_iterator*
-Music_sequence::to_rhythm (Music_iterator* r)
-{
- return do_rhythm (r);
-}
Moment
Music_sequence::maximum_length () const
Music_iterator::do_process_and_next (m);
}
+
Moment
Music_wrapper_iterator::next_moment () const
{
return child_iter_p_->next_moment ();
}
-Music*
-Music_wrapper_iterator::next_music_l ()
+
+Music_iterator*
+Music_wrapper_iterator::try_music_in_children (Music const *m) const
{
- return child_iter_p_->next_music_l ();
+ return child_iter_p_->try_music (m);
}
-
return element_p_->to_relative_octave (p);
}
-Music_iterator*
-Music_wrapper::to_rhythm (Music_iterator* r)
-{
- return element_p_->to_rhythm (r);
-}
Music*
Music_wrapper::element_l () const
return m;
}
-Music_iterator*
-Music::to_rhythm (Music_iterator* r)
-{
- return r;
-}
void
Music::transpose (Musical_pitch )
#endif
}
-
-
-
void
Melodic_req::transpose (Musical_pitch delta)
{
#include "my-lily-lexer.hh"
#include "debug.hh"
#include "source-file.hh"
-#include "parseconstruct.hh"
#include "main.hh"
#include "scope.hh"
{"remove", REMOVE},
{"repeat", REPEAT},
{"repetitions", REPETITIONS},
- {"rhythm", RHYTHM},
+ {"addlyrics", ADDLYRICS},
{"scm", SCM_T},
{"scmfile", SCMFILE},
{"score", SCORE},
{
notehead_align_dir_ = LEFT;
}
+bool
+Note_head_side::supported_b ()const
+{
+ return support_l_arr_.size ();
+}
if (Note_req * n =dynamic_cast <Note_req *> (m))
{
note_req_l_arr_.push (n);
+ notes_end_pq_.insert (now_mom () + m->length_mom ());
+
return true;
}
- if (Tonic_req* t = dynamic_cast<Tonic_req*> (m))
+ else if (Tonic_req* t = dynamic_cast<Tonic_req*> (m))
{
return true;
}
+ else if (Busy_playing_req * p = dynamic_cast<Busy_playing_req*> (m))
+ {
+ return notes_end_pq_.size ();
+ }
return false;
+
}
void
announce_element (Score_element_info (d,0));
dot_p_arr_.push (d);
}
-
- // note_p->steps_i_ = note_req_l->pitch_.steps ();
note_p->position_i_ = note_req_l->pitch_.steps ();
-
if (noteheadstyle == "transparent")
note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
else
void
Note_heads_engraver::do_post_move_processing()
{
-
+ Moment n (now_mom ());
+ while (notes_end_pq_.size () && notes_end_pq_.front () <=n)
+ notes_end_pq_.get ();
}
Paper_def::Paper_def (Paper_def const&s)
: Music_output_def (s)
{
+ shape_int_a_ = s.shape_int_a_;
lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
lookup_p_tab_p_->hash_func_ = int_hash;
Paper_def::line_dimensions_int (int n) const
{
if (!shape_int_a_.size ())
- if (n)
- return Interval (0, linewidth_f ());
- else
- return Interval (get_var ("indent"), linewidth_f ());
-
+ {
+ if (n)
+ return Interval (0, linewidth_f ());
+ else
+ return Interval (get_var ("indent"), linewidth_f ());
+ }
+
if (n >= shape_int_a_.size ())
n = shape_int_a_.size () -1;
p->output_scope (scope_p_, "mudelapaper");
- *p->outstream_l_ << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false);
+ // *p->outstream_l_ << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false);
SCM scm = gh_list (ly_symbol ("experimental-on"), SCM_UNDEFINED);
p->output_scheme (scm);
Jan Nieuwenhuizen <janneke@gnu.org>
*/
-/*
- Ambiguities:
-
- * \alternative
-
- * use of '-' in various places
-
-*/
-
-
#include <iostream.h>
#include "lily-guile.hh"
#include "notename-table.hh"
#include "file-path.hh"
#include "keyword.hh"
#include "debug.hh"
-#include "parseconstruct.hh"
#include "dimensions.hh"
#include "identifier.hh"
#include "command-request.hh"
#include "duration-convert.hh"
#include "change-translator.hh"
#include "file-results.hh"
-#include "mudela-version.hh"
#include "scope.hh"
#include "relative-music.hh"
-#include "re-rhythmed-music.hh"
+#include "lyric-combine-music.hh"
#include "transposed-music.hh"
#include "time-scaled-music.hh"
#include "new-repeated-music.hh"
-#include "version.hh"
+#include "mudela-version.hh"
#include "grace-music.hh"
// mmm
Mudela_version oldest_version ("1.1.52");
-Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
+
void
%union {
- Array<Interval>* intarr;
+ Array<Real>* realarr;
Array<Musical_pitch> *pitch_arr;
Link_array<Request> *reqvec;
Array<String> * strvec;
%token GRACE
%token HEADER
%token IN_T
+%token INVALID
%token KEY
%token KEYSIGNATURE
%token LYRICS
%token REMOVE
%token REPEAT
%token REPETITIONS
-%token RHYTHM
+%token ADDLYRICS
%token SCM_T
%token SCMFILE
%token SCORE
%type <music> property_def translator_change
%type <music_list> Music_list
%type <paper> paper_block paper_def_body
-%type <real> real_expression real real_with_dimension
+%type <real> real real_with_dimension
%type <request> abbrev_command_req
%type <request> post_request
%type <request> command_req verbose_command_req
%type <request> hyphen_req
%type <string> string
%type <score> score_block score_body
-%type <intarr> shape_array
+%type <realarr> real_array
%type <string> script_abbreviation
%type <trans> translator_spec_block translator_spec_body
| mudela toplevel_expression {}
| mudela assignment { }
| mudela error
- | mudela check_version { }
+ | mudela INVALID {
+ THIS->error_level_i_ =1;
+ }
;
toplevel_expression:
delete $2;
}
| SCM_T STRING semicolon {
+ if (THIS->lexer_p_->main_input_b_ && safe_global_b)
+ error (_("Cannot evaluate Scheme in safe mode"));
gh_eval_str ($2->ch_l ());
delete $2;
};
-check_version:
- VERSION STRING semicolon {
- Mudela_version ver (*$2);
- if (!((ver >= oldest_version) && (ver <= version))) {
- if (THIS->ignore_version_b_) {
- THIS->here_input ().error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
- } else {
- THIS->fatal_error_i_ = 1;
- THIS->parser_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
- }
- }
- }
- ;
-
chordmodifiers_block:
CHORDMODIFIERS '{' notenames_body '}' { $$ = $3; }
SCORE
*/
score_block:
- SCORE { THIS->remember_spot ();
+ SCORE {
}
/*cont*/ '{' score_body '}' {
$$ = $4;
- $$->set_spot (THIS->pop_spot ());
if (!$$->def_p_arr_.size ())
$$->add_output (THIS->default_paper_p ());
-
}
;
score_body: {
$$ = new Score;
+ $$->set_spot (THIS->here_input ());
}
| SCORE_IDENTIFIER {
$$ = $1->access_content_Score (true);
| paper_def_body translator_spec_block {
$$->assign_translator ($2);
}
- | paper_def_body SHAPE '=' shape_array semicolon {
- $$->shape_int_a_ = *$4;
- delete $4;
+ | paper_def_body SHAPE real_array semicolon {
+ /*
+ URG URG.
+ */
+ if ($3->size () % 2)
+ warning ("Need even number of args for shape array");
+
+ for (int i=0; i < $3->size (); i+=2)
+ {
+ Real l = $3->elem (i);
+ $$->shape_int_a_.push (Interval (l,
+ l + $3->elem (i+1)));
+ }
+ delete $3;
}
| paper_def_body error {
;
-real:
- real_expression { $$ = $1; }
- ;
-
real_with_dimension:
REAL CM_T {
}
;
-real_expression:
+real:
REAL {
$$ = $1;
}
| REAL_IDENTIFIER {
$$= *$1->access_content_Real (false);
}
- | '-' real_expression %prec UNARY_MINUS {
+ | '-' real %prec UNARY_MINUS {
$$ = -$2;
}
- | real_expression '*' real_expression {
+ | real '*' real {
$$ = $1 * $3;
}
- | real_expression '/' real_expression {
+ | real '/' real {
$$ = $1 / $3;
}
- | real_expression '+' real_expression {
+ | real '+' real {
$$ = $1 + $3;
}
- | real_expression '-' real_expression {
+ | real '-' real {
$$ = $1 - $3;
}
- | '(' real_expression ')' {
+ | '(' real ')' {
$$ = $2;
}
;
-shape_array:
- /* empty */ {
- $$ = new Array<Interval>;
+real_array:
+ real {
+ $$ = new Array<Real>;
+ $$->push ($1);
}
- | shape_array real real {
- $$->push(Interval($2, $2 + $3));
- };
+ | /* empty */ {
+ $$ = new Array<Real>;
+ }
+ | real_array ',' real {
+ $$->push($3);
+ }
+ ;
/*
MIDI
Music_list: /* empty */ {
$$ = new Music_list;
+ $$->set_spot (THIS->here_input ());
}
| Music_list Music {
$$->add_music ($2);
r->fold_b_ = (*$2 == "fold");
r->semi_fold_b_ = (*$2 == "semi");
delete $2;
- r->set_spot (THIS->here_input ());
-
+ r->set_spot ($4->spot ());
}
;
Music_sequence: '{' Music_list '}' {
$$ = new Music_sequence ($2);
+ $$->set_spot ($2->spot ());
}
;
Sequential_music: '{' Music_list '}' {
$$ = new Sequential_music ($2);
+ $$->set_spot ($2->spot ());
}
;
Simultaneous_music: '<' Music_list '>' {
$$ = new Simultaneous_music ($2);
+ $$->set_spot ($2->spot ());
}
;
THIS->lexer_p_->pop_state ();
}
| relative_music { $$ = $1; }
- | re_rhythmed_music { $$ = $1; }
+ | re_rhythmed_music { $$ = $1; }
;
relative_music:
;
re_rhythmed_music:
- RHYTHM Music Music {
- $$ = new Re_rhythmed_music ($3, $2);
+ ADDLYRICS Music Music {
+ Lyric_combine_music * l = new Lyric_combine_music ($2, $3);
+ $$ = l;
}
;
$$ = v;
}
- /*
- This rhythm option introduces a lot of shift/reduce conflicts;
- ie, for every optional_notemode_duration.
- However, we always want the default behaviour, which is to shift:
- if an optional_notemode_duration is allowed, a following duration
- is to be taken as this default duration. Thus
-
- c4 c 8 4
-
- are three notes, ie: c4 c8 c4.
- Parsing whitespace is a snaky thing to do.
- * /
- | entered_notemode_duration {
- if (!THIS->lexer_p_->note_state_b ())
- THIS->parser_error (_ ("have to be in Note mode for notes"));
-
- Note_req *n = new Note_req;
-
- n->pitch_ = THIS->default_pitch_;
- n->duration_ = *$1;
- delete $1;
-
- Simultaneous_music*v = new Request_chord;
- v->set_spot (THIS->here_input ());
- n->set_spot (THIS->here_input ());
-
- v->add_music (n);
-
- $$ = v;
- }
-*/
| RESTNAME optional_notemode_duration {
$$ = THIS->get_rest_element (*$1, $2);
delete $1; // delete notename
UNSIGNED {
$$ = $1;
}
- | DIGIT {
+ | DIGIT {
$$ = $1;
- };
+ }
+ ;
int:
unsigned {
}
-
+++ /dev/null
-/*
- re-rhythmed-music.cc -- implement Re_rhythmed_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
-
- */
-
-#include "re-rhythmed-music.hh"
-#include "music-iterator.hh"
-#include "global-translator.hh"
-
-// urg
-class Foo_translator : public Global_translator
-{
-};
-
-Music_iterator*
-Re_rhythmed_music::to_rhythm (Music_iterator* r)
-{
- return r;
-}
-
-Re_rhythmed_music::Re_rhythmed_music (Music* m, Music* r)
- : Music_wrapper (m)
-{
- Music_iterator* i = Music_iterator::static_get_iterator_p (r);
- Global_translator*t = new Foo_translator ();
- i->init_translator (r, t);
- i->construct_children ();
- element_l ()->to_rhythm (i);
-}
-
-void
-Re_rhythmed_music::do_print () const
-{
- Music_wrapper::do_print ();
-}
-
-
return last_pitch_;
}
-Music_iterator*
-Relative_octave_music::to_rhythm (Music_iterator* r)
-{
- return element_l ()->to_rhythm (r);
-}
Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def)
: Music_wrapper (p)
if (r->semi_fold_b_)
{
repeated_music_l_ = r;
- return true;
}
+
+ /*
+ We acknowledge other types of unfolded music as well, to
+ get auto context selection right.
+ */
+ return true;
+
}
return false;
}
+++ /dev/null
-/*
- new-repeated-music-iterator.cc -- implement Folded_repeat_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "folded-repeat-iterator.hh"
-#include "new-repeated-music.hh"
-#include "music-list.hh"
-#include "simultaneous-music-iterator.hh"
-#include "translator-group.hh"
-
-Folded_repeat_iterator::Folded_repeat_iterator ()
-{
- main_iter_p_ = 0;
- alternative_iter_p_ = 0;
-}
-
-bool
-Folded_repeat_iterator::ok () const
-{
- return main_iter_p_ || alternative_iter_p_;
-}
-
-Folded_repeat_iterator::~Folded_repeat_iterator ()
-{
- delete main_iter_p_;
- delete alternative_iter_p_;
-}
-
-Moment
-Folded_repeat_iterator::next_moment () const
-{
- if (main_iter_p_)
- {
- return main_iter_p_->next_moment ();
- }
- else
- return main_length_mom_ + alternative_iter_p_->next_moment ();
-}
-
-void
-Folded_repeat_iterator::construct_children ()
-{
- Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
- main_iter_p_ = get_iterator_p (mus->repeat_body_p_);
- if (!main_iter_p_->ok())
- {
- leave_body ();
- enter_alternative ();
- }
-}
-
-void
-Folded_repeat_iterator::do_process_and_next (Moment m)
-{
- if (!m)
- {
- bool success = report_to_l ()->try_music (music_l_);
- if (!success)
- music_l_->warning ( _("No one to print a volta bracket"));
- }
-
- Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
-
- if (main_iter_p_)
- {
- main_iter_p_->process_and_next (m);
- if (!main_iter_p_->ok ())
- leave_body ();
- }
-
- if (!main_iter_p_ && !alternative_iter_p_)
- {
- enter_alternative ();
- }
-
- if (alternative_iter_p_)
- {
- alternative_iter_p_->process_and_next (m - main_length_mom_);
- if (!alternative_iter_p_->ok ())
- {
- delete alternative_iter_p_;
- alternative_iter_p_ =0;
- }
- }
-}
-
-void
-Folded_repeat_iterator::leave_body ()
-{
- Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
- delete main_iter_p_;
- main_iter_p_ = 0;
- main_length_mom_ += mus->repeat_body_p_->length_mom ();
-}
-
-void
-Folded_repeat_iterator::enter_alternative ()
-{
- Repeated_music const * mus = dynamic_cast<Repeated_music const*> (music_l_);
- if (mus->alternatives_p_)
- {
- Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
- s->separate_contexts_b_ = true;
- s->init_translator (mus->alternatives_p_, report_to_l ());
-
- alternative_iter_p_ = s;
- alternative_iter_p_->construct_children ();
- }
-}
-
-void
-Folded_repeat_iterator::do_print () const
-{
-#ifndef NPRINT
-#endif
-}
return p;
}
-Music_iterator*
-Repeated_music::to_rhythm (Music_iterator* r)
-{
- if (repeat_body_p_)
- r = repeat_body_p_->to_rhythm (r);
-
- if (alternatives_p_)
- r = alternatives_p_->do_rhythm (r);
- return r;
-}
void
return m;
}
-Music*
-Request_chord_iterator::next_music_l ()
-{
- if (first_b_)
- {
- cursor_ = elt_l ()->music_p_list_p_->head_;
- first_b_ = false;
- }
- else
- {
- if (cursor_)
- cursor_ = cursor_->next_;
- }
- if (cursor_)
- return cursor_->car_;
- else
- return 0;
-}
void
Request_chord_iterator::do_print() const
{
if (Request * req_l = dynamic_cast<Request*> (i->car_))
{
- bool gotcha = report_to_l()->try_music (req_l);
+ bool gotcha = try_music (req_l);
if (!gotcha)
req_l->warning (_f ("junking request: `%s\'", classname( req_l)));
}
Scope::~Scope ()
{
- for (Scope_iter ai (*this); ai.ok(); ai++)
+ for (Scope_iter ai (*this); ai.ok(); ai++)
{
DOUT << "deleting: " << ai.key() << '\n';
delete ai.val ();
cursor_ = 0;
here_mom_ = 0;
iter_p_ =0;
- per_elt_b_ = false;
}
void
void
Sequential_music_iterator::set_sequential_music_translator()
{
- if (iter_p_->report_to_l()->depth_i () > report_to_l ()->depth_i ()
- && ! dynamic_cast<Grace_iterator*> (iter_p_)) // UGH.!
- set_translator (iter_p_->report_to_l());
+ Translator_group * child_report = child_report = iter_p_->report_to_l ();
+ if (dynamic_cast<Grace_iterator*> (iter_p_))
+ child_report = child_report->daddy_trans_l_;
+
+ if (report_to_l()->depth_i () < child_report->depth_i ())
+ set_translator (child_report);
}
Sequential_music_iterator::~Sequential_music_iterator()
{
- assert (! iter_p_);
+ if (iter_p_)
+ {
+ music_l_->warning ("Must stop before this music ends");
+ delete iter_p_;
+ iter_p_ = 0;
+ }
}
if (!iter_p_->ok())
{
+ set_sequential_music_translator();
leave_element();
if (cursor_)
- {
- start_next_element();
- set_sequential_music_translator();
-
- if (per_elt_b_)
- goto loopexit; // ugh.
- }
+ start_next_element();
else
- {
- goto loopexit;
- }
+ goto loopexit;
}
}
return iter_p_->next_moment() + here_mom_;
}
-Music*
-Sequential_music_iterator::next_music_l ()
-{
- if (!iter_p_)
- return 0;
-
- while (1)
- {
- if (Music* m = iter_p_->next_music_l ())
- {
- return m;
- }
- else
- {
- // urg FIXME: sequential children should be iterated to finish
- if (dynamic_cast<Request_chord_iterator*> (iter_p_))
- delete iter_p_;
- iter_p_ = 0;
- leave_element ();
-
- if (cursor_)
- {
- start_next_element ();
- set_sequential_music_translator ();
- }
- else
- {
- delete iter_p_;
- iter_p_ = 0;
- return 0;
- }
- }
- }
-}
bool
Sequential_music_iterator::ok() const
return iter_p_;
}
+Music_iterator*
+Sequential_music_iterator::try_music_in_children (Music const *m) const
+{
+ return iter_p_ ? iter_p_->try_music (m) : 0;
+}
return children_p_list_.head_;
}
+Music_iterator*
+Simultaneous_music_iterator::try_music_in_children (Music const*m) const
+{
+ Music_iterator * b=0;
+ for (Cons<Music_iterator> *p = children_p_list_.head_; !b && p; p = p->next_)
+ b =p->car_->try_music (m);
+ return b;
+}
John S. Gourlay. ``Spacing a Line of Music,'' Technical Report
OSU-CISRC-10/87-TR35, Department of Computer and Information
Science, The Ohio State University, 1987.
+
+ TOO HAIRY.
*/
Array<Spring>
SCM hint = lc->get_elt_property (extra_space_scm_sym);
SCM next_hint = rc->get_elt_property (extra_space_scm_sym);
- SCM stretch_hint = rc->get_elt_property (stretch_distance_scm_sym);
-
+ SCM stretch_hint = lc->get_elt_property (stretch_distance_scm_sym);
+ SCM next_stretch_hint = rc->get_elt_property (stretch_distance_scm_sym);
+
+ Real left_distance;
if (hint != SCM_BOOL_F)
{
hint = SCM_CDDR (hint);
- s.distance_f_ = gh_scm2double (hint);
- if (!lc->musical_b ())
- s.strength_f_ = non_musical_space_strength; // fixed after complaints by michael krause 2.0;
+ left_distance = gh_scm2double (hint);
}
else if (!lc->musical_b() && i+1 < col_count())
{
- s.distance_f_ = default_bar_spacing (lc,rc,shortest);
+ left_distance= default_bar_spacing (lc,rc,shortest);
}
else if (lc->musical_b())
{
- s.distance_f_ = note_spacing (lc, rc, shortest);
-
+ left_distance = note_spacing (lc, rc, shortest);
}
-
+
+ s.distance_f_ = left_distance;
+ if (!lc->musical_b () || !rc->musical_b ())
+ s.strength_f_ = non_musical_space_strength;
+
+ Real right_dist = 0.0;
if (next_hint != SCM_BOOL_F)
{
- next_hint = SCM_CADR(next_hint);
- s.distance_f_ += gh_scm2double (next_hint);
+ next_hint = SCM_CADR(next_hint);
+ right_dist += gh_scm2double (next_hint);
}
else
{
Interval ext (rc->extent (X_AXIS));
- Real correction = ext.empty_b() ? 0.0 : - ext [LEFT];
+ right_dist = ext.empty_b() ? 0.0 : - ext [LEFT];
+ }
- /*
- don't want to create too much extra space for accidentals
- */
- if (lc->musical_b () && rc->musical_b ())
- correction /= 2.0;
+ /*
+ don't want to create too much extra space for accidentals
+ */
+ if (lc->musical_b () && rc->musical_b ())
+ right_dist /= 2.0;
- s.distance_f_ += correction;
+ s.distance_f_ = left_distance + right_dist;
+
+ Real stretch_dist = 0.;
+ if (stretch_hint != SCM_BOOL_F)
+ stretch_dist += gh_scm2double (SCM_CDDR (stretch_hint));
+ else
+ stretch_dist += left_distance;
+
+ if (next_stretch_hint != SCM_BOOL_F)
+ {
+ // see regtest spacing-tight
+ // stretch_dist += gh_scm2double (SCM_CADR (next_stretch_hint));
}
+ else
+ stretch_dist += right_dist;
- if (s.distance_f_ == 0.0)
+ if (stretch_dist == 0.0)
{
/*
\bar "". We give it 0 space, with high strength.
*/
- s.distance_f_ = 0.0 PT;
s.strength_f_ = 20.0;
}
- else if (stretch_hint != SCM_BOOL_F)
- {
- Real hint_sp = gh_scm2double (SCM_CDR (stretch_hint));
- s.strength_f_ /= hint_sp;
- }
else
- {
- s.strength_f_ /= s.distance_f_;
- }
-
+ s.strength_f_ /= stretch_dist;
+
meas_springs.push (s);
}
}
Do something if breakable column has no spacing hints set.
*/
Real
-Spacing_spanner::default_bar_spacing (Score_column *lc, Score_column *rc, Moment shortest) const
+Spacing_spanner::default_bar_spacing (Score_column *lc, Score_column *rc,
+ Moment shortest) const
{
Real symbol_distance = lc->extent (X_AXIS)[RIGHT] ;
Real durational_distance = 0;
<< " and " << classname (spanned_drul_[RIGHT]) << '\n';
if (broken_b ())
- DOUT << "Broken in " << to_str (broken_info_.size ()) << " pieces";
+ DOUT << "Broken in " << to_str (broken_into_l_arr_.size ()) << " pieces";
#endif
}
Item *&pc_l = info.bounds_[d] ;
if (!pc_l->line_l())
pc_l = pc_l->find_prebroken_piece(- d);
-
+
assert (pc_l);
if (!info.line_l_)
info.line_l_ = pc_l-> line_l ();
}
while ((flip(&d))!= LEFT);
- info.broken_spanner_l_ = 0;
- broken_info_.push (info);
+
+ Spanner *span_p = dynamic_cast<Spanner*>(clone ());
+ span_p->set_bounds(LEFT,info.bounds_[LEFT]);
+ span_p->set_bounds(RIGHT,info.bounds_[RIGHT]);
+ pscore_l_->typeset_element (span_p);
+
+ info.broken_spanner_l_ = span_p;
+ span_p->handle_broken_dependencies();
+
+ broken_into_l_arr_.push (span_p);
}
}
Spanner*
Spanner::find_broken_piece (Line_of_score*l) const
{
- for (int i=0; i < broken_info_.size (); i++)
+ for (int i=0; i < broken_into_l_arr_.size (); i++)
{
- Spanner *me =(Spanner*) this;
- Breaking_information &info = me->broken_info_[i];
- if (info.line_l_ == l)
- {
- if (!info.broken_spanner_l_)
- {
- Spanner *span_p = dynamic_cast<Spanner*>(clone ());
- span_p->set_bounds(LEFT,info.bounds_[LEFT]);
- span_p->set_bounds(RIGHT,info.bounds_[RIGHT]);
- pscore_l_->typeset_element (span_p);
-
- info.broken_spanner_l_ = span_p;
- span_p->handle_broken_dependencies();
-
- }
- return info.broken_spanner_l_;
- }
+ if (broken_into_l_arr_[i]->line_l () == l)
+ return broken_into_l_arr_[i];
}
return 0;
bool
Spanner::broken_b() const
{
- return broken_info_.size();
+ return broken_into_l_arr_.size();
}
Array<Rod>
}
}
+/*
+ UGH.
+ */
void
Spanner::handle_broken_dependents ()
{
-#if 0 // need to remove delayd breaking.
- if (original_l_ && !original_l_->line_l ())
+ Spanner *unbrok = dynamic_cast<Spanner*> (original_l_);
+ if (!unbrok || dim_cache_[Y_AXIS]->parent_l_)
+ return;
+
+ Spanner *refpoint = dynamic_cast<Spanner*> (unbrok->parent_l (Y_AXIS));
+
+ if (refpoint)
{
-
- /* we're the broken pieces of a spanner.
- Check if our Y-leaning point is sane.
- */
- Dimension_cache *d = dim_cache_[Y_AXIS]->parent_l_;
- if (d)
- return;
-
- Score_element * ref_elt = dynamic_cast<Score_element*>(d->element_l());
- Spanner *ref_span = dynamic_cast<Spanner*> (ref_elt);
- if (!ref_elt->line_l () && ref_span)
- {
- Spanner *broken_refpoint = ref_span->find_broken_piece (line_l ());
- if (broken_refpoint)
- dim_cache_[Y_AXIS]->parent_l_ = broken_refpoint->dim_cache_[Y_AXIS];
- else
- programming_error ("Spanner y -refpoint lost.");
- }
+ Spanner * broken_refpoint = refpoint->find_broken_piece (line_l ());
+ if (broken_refpoint)
+ dim_cache_[Y_AXIS]->parent_l_ = broken_refpoint->dim_cache_[Y_AXIS];
+ else
+ programming_error ("Spanner y -refpoint lost.");
}
-#endif
}
Super_element::break_processing ()
{
calculate_dependencies (BROKEN, BROKEN, &Score_element::do_break_processing);
- calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND,
- &Score_element::handle_broken_dependents);
}
+
void
Super_element::post_processing ()
{
+ calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND,
+ &Score_element::handle_broken_dependents);
calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::do_post_processing);
}
return dummy_static_char_metric;
}
-Character_metric*
+Character_metric const*
Tex_font_metric::get_char (int a, bool w) const
{
return &find_ascii (a, w);
/*
- time-scaled-music-iterator.cc -- implement Time_scaled_music_iterator
+ time-scaled-music-iterator.cc -- implement Time_scaled_music_iterator
source file of the GNU LilyPond music typesetter
#include "translator-group.hh"
#include "command-request.hh"
-
-
void
Time_scaled_music_iterator::do_process_and_next (Moment m)
{
- if (first_b_)
+ if (!m)
{
- bool success = report_to_l ()->try_music (dynamic_cast<Time_scaled_music const*> (music_l_));
- if (!success)
+ Music_iterator *yeah = try_music (music_l_);
+ if (yeah)
+ set_translator (yeah->report_to_l ());
+ else
music_l_->warning ( _("No one to print a tuplet start bracket"));
}
return p;
}
-Music_iterator*
-Transposed_music::to_rhythm (Music_iterator* r)
-{
- return r;
-}
{
if (!m)
{
- bool success = report_to_l ()->try_music (music_l_);
- if (!success)
+ Music_iterator *yeah = try_music (music_l_);
+ if (yeah)
+ set_translator (yeah->report_to_l ());
+ else
music_l_->warning ( _("No one to print a volta bracket"));
}
while (1)
current_iter_p_->print();
#endif
}
+
+Music_iterator*
+Unfolded_repeat_iterator::try_music_in_children (Music const * m) const
+{
+ return current_iter_p_->try_music (m);
+}
bool no_vertical_start = false;
bool no_vertical_end = last_b_;
Spanner *orig_span = dynamic_cast<Spanner*> (original_l_);
- if (orig_span && orig_span->broken_info_[0].broken_spanner_l_ != this)
+ if (orig_span && orig_span->broken_into_l_arr_[0] != this)
no_vertical_start = true;
- if (orig_span && orig_span->broken_info_.top ().broken_spanner_l_ != this)
+ if (orig_span && orig_span->broken_into_l_arr_.top () != this)
no_vertical_end = true;
if (bar_arr_.top ()->type_str_.length_i () > 1)
no_vertical_end = false;
A Dynamic Programming type of algorithm
similar to TeX's is in Gourlay_breaking
-
UGH. Should think about pre/post break columns.
*/
Array<Column_x_positions>
assert (breakpoints.size ()>=2);
int break_idx=0;
- int line_no = 0;
while (break_idx < breakpoints.size () -1)
{
Column_x_positions minimum;
// do another line
- line_no ++;
+
Item *post = breakpoints[break_idx]->find_prebroken_piece (RIGHT);
Paper_column *postcol =dynamic_cast<Paper_column*>(post);
current.add_paper_column (precol);
current.spacer_l_ = generate_spacing_problem (current.cols_,
- pscore_l_->paper_l_->line_dimensions_int (line_no));
+ pscore_l_->paper_l_->line_dimensions_int (breaking.size ()));
// try to solve
if (!feasible (current.cols_))
phrygian = 8
dorian = 10
+melisma = \property Staff.melismaBusy = "1"
+melismaEnd = \property Staff.melismaBusy = "0"
+
papersize = "a4"
\include "generic-paper.ly"
\include "paper20.ly"
-\paper{
- \paper_twenty
-}
-
% ugh
\include "midi.ly"
% \consists "Multi_measure_rest_engraver";
% ugh. Order matters here.
+ \consists "Melisma_engraver";
\consists "Text_engraver";
\consists "Script_engraver";
\consists "Script_column_engraver";
\consists "Align_note_column_engraver";
\consists "Font_size_engraver";
\consists "Rhythmic_column_engraver";
+ \consists "Dynamic_engraver";
stemStyle = "grace";
weAreGraceContext = "1";
\paper {
- texsetting = "\\input lilyponddefs ";
- pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
- scmsetting = "\"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\";\n";
+ texsetting = "";
+ pssetting = "";
+ scmsetting = "\"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\";\n";% UGH.
+
}
quartwidth = 3.63\pt;
wholewidth = 5.45\pt;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 4.8\pt;
-
+ font_large = 8.;
+ font_Large = 6.;
+ font_normal = 5.;
+
+ font_finger = 4.;
+ font_volta = 4.;
+ font_number = 4.;
+ font_dynamic = 10.;
+ font_mark = 6.;
+
+ -1=\font "feta11"
+ -2=\font "feta11"
0=\font "feta11"
\include "params.ly";
}
+\paper { \paper_eleven }
wholewidth = 6.44\pt;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 4.8\pt;
-
+ font_large = 8.;
+ font_Large = 6.;
+ font_normal = 5.;
+
+ font_finger = 4.;
+ font_volta = 4.;
+ font_number = 6.;
+ font_dynamic = 10.;
+ font_mark = 6.;
+
0=\font "feta13"
+ -1=\font "feta11"
+
\include "params.ly";
}
+\paper { \paper_thirteen }
font_dynamic = 10.;
font_mark = 10.;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 4.8\pt;
-
-% scmsetting = "\"\\\\input lilyponddefs \";\n";
-
0 = \font "feta16"
-1 = \font "feta13"
-2 = \font "feta11"
\include "params.ly";
}
+
+\paper {\paper_sixteen }
quartwidth = 6.61\pt;
wholewidth = 9.90\pt;
-
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 6.\pt;
-
- -2 = \font "feta13"
+ -2 = \font "feta13"
-1 = \font "feta16"
0 = \font "feta20"
\include "params.ly";
}
+\paper { \paper_twenty }
--- /dev/null
+% paper23.ly
+
+
+\version "1.1.52";
+
+paper_twentythree = \paper {
+ staffheight = 23.0\pt;
+
+ font_large = 12.;
+ font_Large = 12.;
+ font_normal = 10.;
+
+ font_finger = 5.;
+ font_volta = 8.;
+ font_number = 10.;
+ font_mark = 12.;
+
+ % Ugh
+ magnification_dynamic = 3.;
+
+ % ugh see table20 for sizes
+ quartwidth = 6.61\pt;
+ wholewidth = 9.90\pt;
+
+ -2 = \font "feta16"
+ -1 = \font "feta20"
+ 0 = \font "feta23"
+
+ \include "params.ly";
+}
+
+\paper { \paper_twentythree }
paper_twentysix = \paper {
staffheight = 26.0\pt;
- % ugh see table26 for sizes
quartwidth = 8.59\pt;
wholewidth = 12.87\pt;
-
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 6.\pt;
+ font_large = 14.;
+ font_Large = 17.;
+ font_normal = 12.;
+ font_dynamic = 10.;
+ % Ugh
+ magnification_dynamic = 4.;
+
+ font_finger = 8.;
+ font_volta = 10.;
+ font_number = 10.;
+ magnification_number = 2.;
+ font_mark = 14.;
+
0=\font "feta26"
+ -1 = \font "feta23"
+ -2 = \font "feta20"
\include "params.ly";
- linewidth = \linewidth20;
- textheight = \textheight20;
}
+\paper { \paper_twentysix }
stem_length2 = 4.;
stem_length3 = 3.;
+%
+arithmetic_basicspace = 2.;
+arithmetic_multiplier = 0.9 * \quartwidth ;
+
+
+
% urg.
% if only these ugly arrays were scm,
% we could override them in the Grace context
\nobreak \bar "";
}
+autoBeamOff = \property Voice.beamAuto = ""
+autoBeamOn = \property Voice.beamAuto = "1"
Begin3
Titel: LilyPond
-Versie: 1.1.61
-Inschrijf datum: 16JUL99
+Versie: 1.1.62
+Inschrijf datum: 19JUL99
Beschrijving: @FLAPTEKST@
Trefwoorden: muziek typezetten midi notatie
Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 770k lilypond-1.1.61.tar.gz
+ 770k lilypond-1.1.62.tar.gz
Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.61.tar.gz
+ 770k lilypond-1.1.62.tar.gz
Copi-eer voorwaarden: GPL
End
Begin3
Title: LilyPond
-Version: 1.1.61
-Entered-date: 16JUL99
+Version: 1.1.62
+Entered-date: 19JUL99
Description:
LilyPond is the GNU Project music typesetter. It transforms a musical
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 770k lilypond-1.1.61.tar.gz
+ 770k lilypond-1.1.62.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.61.tar.gz
+ 770k lilypond-1.1.62.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.1.61
+Version: 1.1.62
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.61.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.62.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
"spanrequest" "grace" "scmfile" "lyrics"
"in" "translator" "context" "key" "maininput" "notes"
"musical_pitch" "time" "midi" "mm" "header"
- "notenames" "octave" "output" "partial" "paper" "plet" "name"
+ "notenames" "octave" "output" "partial" "paper" "plet" "name" "addlyrics"
"property" "pt" "shape" "relative" "include" "score"
"scm" "scmfile"
"script" "skip" "table" "times" "textscript" "symboltables" "type"
depth = ../..
-examples=
+examples=standchen
LOCALSTEPMAKE_TEMPLATES=mutopia
include $(depth)/make/stepmake.make
}
%{
- Tested Features: multivoice accents lyrics chords piano music
+ Tested Features@ multivoice accents lyrics chords piano music
multiple \paper{}s in one \score
Note: Original key F.
%}
e2 r4 |
}
-lyricVerseOne = \lyrics{
- Lei- " " se fleh- en mei- " " ne Lie- der " "
- Durch die Nacht " " zu dir; " "
- " "
- " "
- In " " den stil- len Hain " " her- nie- der
- Lieb- chen, komm " " zu mir! " "
- " "
- " "
- Fl\"us- ternd schlan- ke Wip- fel rau- schen
- In " " des Mon- des Licht,
- In " " des Mon- des Licht;
-
- Des Ver- r\"a- ters feind- lich Lau- schen
- F\"urch- " " te, Hol- de, nicht,
- f\"urch- " " te, Hol- de, nicht.
+lyricVerse1 = \lyrics{
+% 5
+ \times 2/3 { Lei-4 se8 } fleh-4. en8 |
+ \times 2/3 { mei-4 ne8 } Lie-4 der8 " "8 |
+ Durch4. die8 \times 2/3 { Nacht4 zu8 } |
+ dir;2 " "4 |
+ " "2.*2
+%{ " "4 " " " " |
+ " " " " " " |%}
+% 11
+ \times 2/3 { In4 den8 } stil-4. len8 |
+ \times 2/3 { Hain4 her-8 } nie-4. der8 |
+ Lieb-4. chen,8 \times 2/3 { komm4 zu8 } |
+ mir!2 " "4 |
+ " "2.*2
+%{ " "4 " " " " |
+ " " " " " " |%}
+% 17
+ Fl\"us-8. ternd16 schlan-4. ke8 |
+ Wip-8. fel16 rau-4. schen8 |
+ \times 2/3 { In4 des8 } Mon-4. des8 |
+ Licht;2. |
+ \times 2/3 { In4 des8 } Mon-4. des8 |
+ Licht;2. |
+% 23
+ Des8. Ver-16 r\"a-4. thers8 |
+ feind-8. lich16 Lau-4. schen8 |
+ \times 2/3 { F\"urch-4 te8 } Hol-4. de8 |
+ nicht2. |
+ \times 2/3 { f\"urch-4 te8 } Hol-4. de8 |
+ nicht.2. |
}
-lyricVerseTwo = \lyrics{
- H\"orst " " die Nach- ti- gal- " " len schla- gen? " "
- Ach! sie fleh- " " en dich, " "
- " "
- " "
- Mit " " der T\"o- ne s\"u- " " "\ss en" Kla- gen
- Fleh- en sie " " f\"ur mich. " "
- " "
- " "
- Sie- ver- "steh'n" des Bus- ens Seh- nen
- Ken- " " nen Lieb- es- schmerz,
- Ken- " " nen Lieb- es- schmerz.
+lyricVerse2 = \lyrics{
+% 5
+ \times 2/3 { H\"orst4 die8 } Nach-4. ti-8
+ \times 2/3 { gal-4 len8 } schla-4 gen?8 " "8
+ ach!4. sie8 \times 2/3 { fleh-4 en8 }
+ dich,2 " "4
+ " "2.*2
+%{ " "4 " " " "
+ " "4" " " "
+%}
+% 11
+ \times 2/3 { Mit4 der8 } T\"o-4. ne8
+ \times 2/3 { s\"u-4 "\ss en"8 } Kla-4. gen8
+ Fleh-4. en8 \times 2/3 { sie4 f\"ur8 }
+ mich2 " "4
+ " "2.*2
+%{ " "4" " " "
+ " "4" " " "
+%}
+% 17
+ Sie-8. ver-16 stehn4. des8
+ Bus-8. ens16 Seh-4. nen8
+ \times 2/3 { Ken-4 nen8 } Lieb-4. es-8
+ schmerz,2.
+ \times 2/3 { Ken-4 nen8 } Lieb-4. es-8
+ schmerz.2.
- R\"uh- ren mit den Sil- ber- t\"o- nen
- Jed- " " es wei- che Herz,
- Jed- " " es wei- che Herz.
+% 23
+ R\"uh-8. ren16 mit4. den8
+ Sil-8. ber-16 t\"o-4. nen8
+ \times 2/3 { jed-4 es8 } wei-4. che8
+ Herz,2.
+ \times 2/3 { jed-4 es8 } wei-4. che8
+ Herz.2.
}
lyricThrough = \lyrics{
- La\ss auch dir die Brust be- we- gen " "
- Lieb- chen, h\"o- re mich! " "
- Be- bend harr' " " ich dir ent- ge- gen! " "
- " "
- " "
- Komm, " " be- "gl\"uk-" ke mich!
- Komm, " " be- "gl\"uk-" ke mich, __ " " " "
- Be- "gl\"uk-" ke mich!
+% 37
+ La\ss8. auch16 dir8. die16 Brust8. be-16 |
+ we-4 gen " " |
+ Lieb-4. chen,8 h\"o-8. re16 |
+ mich!2 " "4 |
+ Be-4. bend8 \times 2/3 { harr'4 ich8} |
+ dir8. ent-16 ge-4 gen!8 " "8 |
+ " "2. |
+ " "2. |
+ \times 2/3 { Komm4 be-8 } gl\"u4. cke8 |
+ mich!2. |
+ \times 2/3 { Komm4 be-8 } gl\"u4. cke8 |
+ mich,2. __ |
+ " "2 be-4 |
+ gl\"u-2. |
+ cke2. |
+ mich!2 " "4 |
}
trebleIntro = \notes\relative c{
- r8^"\bf M\\\"a\\ss ig"\pp <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+ r8^"\bf m\\\"a\\\ss ig"\pp <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
r8 <as-. c-.> <c-. es-.> <as-. c-.> <c-. es-.> <as-. c-.> |
r8 <as-. c-.> <c-. d-.> <as-. c-.> <c-. d-.> <as-. c-.> |
r8 <g-. b-.> <b-. d-.> <g-. b-.> <b-. d-.> <g-. b-.> |
\break
}
-trebleVerseOne = \notes\relative c{
+trebleVerse1 = \notes\relative c{
%5
r8 <g' c> <c es> <g c> <c es> <g c> |
r8 <f c'> <c' d> <f, c'> <c' d> <f, c'> |
<g2 g'> r4 |
}
-bassVerseOne = \notes\relative c{
+bassVerse1 = \notes\relative c{
% \clef bass;
\property Voice.dynamicDir=1
%5
}
-allLyrics = \lyrics {
- " "4 * 12
- \rhythm \vocalVerse \lyricVerseOne
- " "4 * 12
- " "4 * 12
- \rhythm \vocalVerse \lyricVerseTwo
- \rhythm \vocalThrough \lyricThrough
+lyricFour = \lyrics{
+ " "2.*4
+%{ " "4 " " " "
+ " " " " " "
+ " " " " " "
+ " " " " " "%}
+}
+
+allLyrics = {
+ \time 3/4;
+% \skip 4 * 12;
+ \lyricFour
+ \lyricVerse1
+% \skip 4 * 24;
+ \lyricFour
+ \lyricFour
+ \lyricVerse2
+ \lyricThrough
}
lyricStaff = \context Lyrics = lyric<
\clef treble;
% certainly no auto-beaming for vocals
\property Voice.beamAuto=0
+
\property Voice.dynamicDir = \up
\skip 4 * 12;
\clef treble;
\property Voice.beamAutoBegin=0
\trebleIntro
- \trebleVerseOne
+ \trebleVerse1
\trebleEentje
- \trebleVerseOne
+ \trebleVerse1
\trebleThrough
}
bass = {
\clef bass;
\bassIntro
- \bassVerseOne
+ \bassVerse1
\bassEentje
- \bassVerseOne
+ \bassVerse1
\bassThrough
}
{ \notes { \grandStaff } }
>
\paper {
+% \translator { \OrchestralScoreContext }
+% \translator { \OrchestralPartStaffContext }
\translator { \HaraKiriStaffContext }
}
- \midi{
- \tempo 4 = 54;
- }
+%broken 1.1.51
+% \midi{
+% \tempo 4 = 54;
+% }
}
>
\stemboth [es, f g16 c,32 d es16][g,8. bes32 as][g as bes16 es,32 f g16] |
%8
- [a,8 c][f a][bes. f''32 es][d es f16 bes,32 c d16] |
+ [a,8 c][f a][bes8. f''32 es][d es f16 bes,32 c d16] |
[es, g a bes][c d es c][fis, a bes c][d e fis d] |
[g, bes c d][e fis g es][a, c d es][d c bes a] |
[bes c d a][bes es d c][d a bes fis][g c bes a] |
>
>
\paper{}
-}
\ No newline at end of file
+}
>
\paper{
}
- \midi{\tempo=60;}
+ \midi{\tempo 4 =60;}
}
hoyreOpp = \notes\relative c'' {
\stemup
- es4^"Grave adagio" r16 [es d. es32] f4 r16 [f16 f. g32] |
- [as8. as16] [as16 g32 f g16. d32] es4 r16 [g g. as32] |
+ es4^"Grave adagio" r16 [es d16. es32] f4 r16 [f16 f16. g32] |
+ [as8. as16] [as16 g32 f g16. d32] es4 r16 [g g16. as32] |
%3
- bes4 r16 [bes,16 bes. c32] [des8. des16]
+ bes4 r16 [bes,16 bes16. c32] [des8. des16]
\context Staff <
{ \stemup e4 }
{ \stemup \property Voice.horizontalNoteShift = 1 [des16 c32 bes c16. g32] }
>
%4
- f4 \stemboth r16 [f g. as32] \stemup d,4 r16 [d g. es32] |
+ f4 \stemboth r16 [f g16. as32] \stemup d,4 r16 [d g16. es32] |
c4 ~ [c32 es des c des16. f32] [b,16. c32 b16. c32] d4 ~ |
d2 ~ [d16. g,32 a16. b32] [c16. <b32 g> <c16. a> <d32 b>] |
<[es8. c> <es16 c>]
hoyreNed = \notes\relative c'' {
\clef violin;
\stemdown
- <c4 g> r16 [c b. c32] d4 r16 [d d. es32] |
- [f8. f16] f8 r <c4 g> r16 [es16 es. f32] |
+ <c4 g> r16 [c b16. c32] d4 r16 [d d16. es32] |
+ [f8. f16] f8 r <c4 g> r16 [es16 es16. f32] |
<c4 g' > r16 [g16 g16. as32] [bes8. bes16] bes8 r |
- <c4 as> r16 s16*3 r16 [f, f. g32] g4 |
+ <c4 as> r16 s16*3 r16 [f, f16. g32] g4 |
%5
- r16 [es es. f32] f4 [g16. a32 g16. a32] b4 ~ |
+ r16 [es es16. f32] f4 [g16. a32 g16. a32] b4 ~ |
[b8. d,16] [f8. as16] [g16. f32 es16. d32] [es16. d32 es16. f32] |
g4 <c8 a> r <d2 b>
}
<c4 g es> r <b as f d> r |
r <b f d> <c g es> r |
<c g e> r r <c g> |
- <c as f> r r16 <[as d,><as. d,><g32 d>] <g4 d> |
+ <c as f> r r16 <[as d,><as16. d,><g32 d>] <g4 d> |
%5
- r16 <[g c,><g. c,><f32 c>]
+ r16 <[g c,><g16. c,><f32 c>]
\context Staff <
{\stemup f4~ f}
{\stemup c4 d}
- > r16 [f f. g32] |
+ > r16 [f f16. g32] |
%6
[as8. as16]~ [as g32 f g16 d] <es4 c> r |
r <a es c> <g2 d>
venstreNed = \notes\relative c{
\stemdown
- c4 r c r | r c c r | c r r c | c r r16 [c c. bes32] bes4 |
- r16 [bes bes. as32] as4_"tr" g r16 [d' d. es32] |
+ c4 r c r | r c c r | c r r c | c r r16 [c c16. bes32] bes4 |
+ r16 [bes bes16. as32] as4_"tr" g r16 [d' d16. es32] |
\context Staff <
{ \stemdown \property Voice.horizontalNoteShift = 1 [f8. f16] [b,8. b16] g4 r | }
{ \stemdown s4 g}
}
%{
-
+TODO: use autobeaming.
%}
\version "1.1.52";
-global =
- \notes {
- \time 4/4; % should be \time C
- }
-
-
-
tenor =
- \notes \relative c' {
+ \context Voice = tenor \notes \relative c' {
\clef "violin";
\stemdown
- r8 [c8 d e] [f. g32 f] [e8 a] |
+ r8 [c8 d e] [f8. g32 f] [e8 a] |
[d, g] ~ [g16 a g f] [e f e d] [c d c b ] |
[a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] |
[g f! e d] c r r g' ~ |
[c8 f] r16 [g f e] [f8 d] g4 ~ |
g4 r4 r2 |
r1 |
- r8 [g8 a b] [c . d 32 c ] [b8 e ]
+ r8 [g8 a b] [c8. d 32 c ] [b8 e ]
%% 10
[a, d ] ~ [d 16 e d c ] b8 r8 r d, |
- [e fis] [g. a32 g] [fis8 b e, a] ~ |
+ [e fis] [g8. a32 g] [fis8 b e, a] ~ |
[a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
[a gis a b] [gis fis gis a] b8 r8 r4 |
- r8 [c,8 d e] \stemup [f. g32 f] [e8 a] |
+ r8 [c,8 d e] \stemup [f8. g32 f] [e8 a] |
%% 15
[d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ |
[g8 fis] [gis8 a] ~ [a g! a b] |
\stemboth
- [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
+ [c8. d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
[b8 g' cis, d ] [e cis d e ] |
- \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] |
+ \stemdown a,8 r8 r e [fis g] \stemboth [a8. b32 a] |
%% 20
[g8 c fis, b] ~ [b16 c b a] \stemdown [g fis e d] \stemboth |
e4 \stemdown d ~ [d16 a' g f!] [e g f! a] |
soprane =
- \notes \relative c' {
+ \context Voice = sop \notes \relative c' {
\stemup
r1 |
r2 r8 [g'8 a b] |
- [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
+ [c8. d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] |
[b g a b] [c b c d ] [e d e fis ] [g 8 b,] |
%% 5
[c a] [d 16 c b a] [g8. g16] [f e f g] |
[a g a b] c 2 b4 |
- r8 [c8 d e] [f. g32 f] [e8 a] |
+ r8 [c8 d e] [f8. g32 f] [e8 a] |
[d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
f2 [e8. fis16] g4 ~
%% 10
a 4 r4 r2 |
%% 15
r2 r8 [g 8 a b ] |
- [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] |
+ [c8. d32 c] [b 8 c] [d e] [f!8. g32 f!] |
[e8 a d, g] ~ [g16 a g f] [e8 a] |
[d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] |
[a16 cis, d g] [e8. d16] d8 r8 r4 |
%% 20
r2 r4 r8 g, |
- [a b ] [c. d32 c] [b 8 e a, d] ~ |
- [e16 e d c] [b c d e] [f g a g] [f e d c] |
+ [a b ] [c8. d32 c] [b 8 e a, d( ] |
+ [) e16 e d c] [b c d e] [f g a g] [f e d c] |
b 4 [c,8 d] g c4 b 8 |
c4 [b 8 bes 8] a d4 c8 |
%% 25
}
alt =
- \notes \relative c {
+\context Voice = alt \notes \relative c {
\clef "bass";
r1 |
r |
r |
- r8 [g'8 a b] [c . d32 c ] [b8 e ] |
+ r8 [g'8 a b] [c8. d32 c ] [b8 e ] |
%% 5
[a, d ] ~ [d 16 e d c ] [b8 c ~ c bes8] |
[a d g, c ] r16 [a16 b c ] d 4 |
- g,4 r8 g8 [a b] [c . d32 c ] |
+ g,4 r8 g8 [a b] [c8. d32 c ] |
[b8 e a, d ] ~ [d 16 e d c !] [b!8 e ] ~ |
e 4 d 4 [c 16 b c a] [e' d c b] |
%% 10
[c 16 a b c ] [d c b a] g4 r4 |
r1 |
- r8 [e8 fis gis] [a. b32 a] [gis8 c ] |
+ r8 [e8 fis gis] [a8. b32 a] [gis8 c ] |
[fis, b] ~ [b16 c b a] gis8 a4 gis8 |
- a4 r8 g8 [a b] c . [d32 c ] |
+ a4 r8 g8 [a b] c8. [d32 c ] |
%% 15
- [b8 e a, d ] ~ [d' g,] d 4 |
+ [b8 e a, d (] [ ) d' g,] d 4 |
[c 8 a] e' 4 d 8 r8 r4 |
- r8 [a8 b cis ] [d . e32 d ] [c !8 f ] |
+ r8 [a8 b cis ] [d8. e32 d ] [c !8 f ] |
[b,8 e ] ~ [e 16 f e d ] cis 8 r8 r4 |
- r8 [a8 b cis ] [d . e32 d ] [c !8 fis ] |
+ r8 [a8 b cis ] [d8. e32 d ] [c !8 fis ] |
%% 20
[b, e ] ~ [e 16 fis e d ] c 2 ~ |
[c 16 d c b] [a g a fis] [g8 b c d ] |
- [e . f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] |
+ [e8. f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] |
d 4 [e 8 d ] ~ [d g,] g4 ~
- [g8 c, d e] [f. g32 f] [e8 a] |
+ [g8 c, d e] [f8. g32 f] [e8 a] |
%% 25
[d, g] ~ [g16 a g f] [e d e f] [g a bes g] |
[a e f g] [a b c a] b2 |
c 1 |
}
-bass =
+bass =\context Voice = bassvoice
\notes \relative c {
\clef "bass";
r |
%% 5
r2 r8 [c8 d e] |
- [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] |
+ [f8. g32 f] [e8 a] [d, g] ~ [g16 a g f] |
[e f e d] [c d c b ] [a' 8 d a fis] |
[g16 a bes g] [cis,8 d] a'4 e4 |
[a16 b c d ] [c b a g] c 8 r8 r4 |
%% 10
r2 r8 [g, 8 a b ] |
- [c. d32 c] [b 8 e] [a, d] ~ [d16 e d c] |
+ [c8. d32 c] [b 8 e] [a, d] ~ [d16 e d c] |
b 8 e4 d8 c f!4 e8 ~ |
e d4 e8 [f! e16 d] e4 |
a, 4 r4 r2 |
%% 15
- r8 [g 8 a b ] [c. d32 c] [b 8 e] |
+ r8 [g 8 a b ] [c8. d32 c] [b 8 e] |
[a, 8 d] ~ [d16 e d c] [b 8 bes a g'' ] |
[a,, 8 fis' g e] d4 [e8 f!] |
[g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] |
\score {
- \notes \context GrandStaff <
- \context Staff = one <
- \global
+ \notes \context PianoStaff <
+ \context Staff = one {
+ \time 4/4;
+ <
\soprane
\tenor
- >
- \context Staff = two <
- \global
+ > \bar "|."; }
+ \context Staff = two { <
\alt
\bass
- >
- >
+ > \bar "|."; }
+ >
\paper{
- gourlay_maxmeasures =5.;
- castingalgorithme = \Wordwrap;
+ gourlay_maxmeasures = 7.;
+% castingalgorithme = \Wordwrap;
}
% \midi { \tempo 4 = 84; }
}
\version "1.1.52";
-global =
- \notes {
- \time 4/4; % should be \time C
- }
-
-
% should do programmable input.
-
soprane =
\notes \transpose c'' {
- \clef "violin";
-
\context Staff <
% Real soprane
- {\stemup
+ \context Voice = uVoice {
+ \time 4/4;
+ \clef "violin";
+
+ \stemup
r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] |
r8 [a16 d'] [f' a d' f'] r8 [a16 d'] [f' a d' f'] |
r8 [g16 d'] [f' g d' f'] r8 [g16 d'] [f' g d' f'] |
r8 [fis16 a] [d' fis a d'] r8 [fis16 a] [d' fis a d'] |
r8 [g16 d'] [g' g d' g'] r8 [g16 d'] [g' g d' g'] |
r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |
- r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |}
+ r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] }
% Tenor
- {\stemdown
+ \context Voice = dVoice {\stemdown
r16 e8. ~ e4 r16 e8. ~ e4 |
r16 d8. ~ d4 r16 d8. ~ d4 |
r16 d8. ~ d4 r16 d8. ~ d4 |
r8 [f,16 a,] [c f c a,] [c a, f, a,] [f, d, f, d,] |
r8 [g16 b] [d' f' d' b] [d' b g b] [d f e d] |
- <e1 g c'> ||
+ <e1 g c'> \bar "|.";
}
bass =
a a |
%% 10
\context Staff <
- % Alt
+ \context Voice = Alt
{\stemup
r16 a8. ~ a4 r16 a8. ~ a4 |
r16 b8. ~ b4 r16 b8. ~ b4 |
r16 b,8. ~ b,4 ~ b,2 |
c1 ||}
- % Bass
+ \context Voice = Bass
{\stemdown
d2 d |
g g |
c, c, |
c, c, |
- c,1 }>
+ c,1 \bar "|."; }>
}
\score {
- \notes \context GrandStaff <
- <
- \global
- \soprane
- >
- <
- \global
- \bass
- >
- >
-
+ \notes \context PianoStaff <
+ \soprane
+ \bass
+ >
\paper{
gourlay_maxmeasures =5.;
}
}
% EOF
+
+++ /dev/null
-%% under construction
-
-define(preludepattern, `[' $1 $2 $3 $2 `]')
-define(preludehalfmeasure, preludepattern($1, $2, $3)
- preludepattern($4, $2, $3))
-
-define(intromeasure,
- preludehalfmeasure($1, $2, $3, $4)
- preludehalfmeasure($1, $2, $3, $4)|
-)
-define(handymeasure, `intromeasure(translit($*,` ', `,'))')
-
-
-
-trebleIntro=\notes \transpose c'' {
-handymeasure(c' es d c)
-handymeasure(as f e c)
-handymeasure(b f es d)
-handymeasure(c g f es)
-handymeasure(es' as g es)
-handymeasure(d' fis e d)
-handymeasure(d' g fis d)
-handymeasure(c' e d c)
-handymeasure(c' f e c)
-handymeasure(bes f es d)
-handymeasure(bes g f es)
-handymeasure(as g f es)
-handymeasure(as d c Bes)
-handymeasure(g Bes As es)
-handymeasure(f c Bes A)
-handymeasure(f d c B)
-handymeasure(es c B G)
-handymeasure(F es d f)
-handymeasure(Fis c b es)
-handymeasure(es c B G)
-handymeasure(fis c B A)
-handymeasure(g c B d)
-handymeasure(as c B d)
-}
-
-bassIntro = \notes {
-handymeasure(c g f es)
-handymeasure(c as g f)
-handymeasure(c as g f)
-handymeasure(c es d g)
-handymeasure(c c' bes as)
-handymeasure(c a g fis)
-handymeasure(Bes bes a g)
-handymeasure(Bes g f e)
-handymeasure(As as g f)
-handymeasure(As d c f)
-handymeasure(G es d g)
-handymeasure(c es d As)
-handymeasure(d f es as)
-handymeasure(es g f as)
-handymeasure(es a g f)
-handymeasure(d f es as)
-handymeasure(c f e as)
-preludehalfmeasure(c, es, d, f)
-preludehalfmeasure(bes, es, d, f)|
-handymeasure(As c b d)
-handymeasure(A es d c)
-handymeasure(G es d f)
-handymeasure(G es d c)
-handymeasure(G es d f)
-handymeasure(G es d f)
-}
-
-
-middlepiece = \notes
-{
- \stemdown
- [G B d]
- \stemup f [as f ef] [b f d' b'] [as f e f] |
- \stemdown [G c es]]
- \stemup g [c' g fis g ] [es' c' g' es'] [c' as g as]|
- \stemdown [G A fis]
- \translator Staff=treble
- \stemsboth \transpose c'' { c [es c B c] [fis c a fis] [es c B c] }
-}
-
-
-
-
+++ /dev/null
-\header{
-filename = "los-toros-oboe.ly";
-title = "La Feria";
-subtitle = "Los Toros";
-opus = "";
-composer = "Paul Lac\\^ome dEstalenx (1838-1920)";
-enteredby = "jcn";
-copyright = "public domain";
-latexheaders= "headers";
-}
-\version "1.1.52";
-
-
-
-\include "paper16.ly"
-
-hoboonestart = \notes
- \relative c'{
-% ugh: cant copy: allegro/primo tempo
- \property Voice . textStyle = "large"
- [es''16-.^"Allegro" es-. es-. es-.] [es8-. d-.] |
- \property Voice . textStyle = "italic"
-}
-
-hobooneintro = \notes \relative c'{
-
-% \property Voice . textStyle = "roman"
-% [es''16-.-"Allegro" es-. es-. es-.] [es8-. d-.] |
-% \property Voice . textStyle = "italic"
- [f''8.-> es16(] [)d8 c-.] |
- [bes16( c d es] [)d8 c-.] |
- [bes-. as->~] [as16( g f g] |
- [as bes c d] [)es8 c-.] |
- [d8-. c16( bes] )as4 ~ |
- [as16 g( f g] [as c bes as] |
-% [)g8 as16 g(] [)f8 g16( f] |
- [)g8 as16 g(] [)f8 g16( f] |
- [)es8 f16-. g-.] [as-. bes-. c-. d-.] |
- [es-. es-. es-. es-.] [es8-. d-.] |
- [f8.-> es16(] [)d8 c-.] |
- [bes16( c d es] [)d8 c-.] |
- [bes8 a->~] [a16 g( fis g] |
- [a bes c d] [)es8 d16()c] |
- [bes-. g-. bes-. d-.] g4-> ~ |
- [g16 f( es d] [c es d c] |
- [)bes8 c16( bes] [)a8 bes16( a] |
- [)g8 r d'] r |
-}
-
-hoboonemid = \notes \relative c'{
-
- [g'16-. g-. g-. g-.] [g8-. f-.] |
- as2-> |
- [as16-. as-. as-. as-.] [as8-. g-.] |
- bes2-> |
- [bes16-. bes-. bes-. bes-.] [bes8-. c] |
-
- r-"cresc." [d8-. r c-.] |
- r\f [d-. es-. f-.] |
- [g8.-> es16] [bes8 g] |
-
- % four measures copied from 8 measures back...
- [g16-.\p g-. g-. g-.] [g8-. f-.] |
- as2-> |
- [as16-. as-. as-. as-.] [as8-. g-.] |
- bes2-> |
- [b16-. b-. b-. b-.] [b8-. c-.] |
-
- % same measure
- [b16-. b-. b-. b-.] [b8-. c-.] |
-
- [b8-.-"cresc." c-. b-. c-.] |
- [d-. es-. d-. es-.] |
- [f\f-. g-. f-. g-.] |
- [as-.\< g-. as-. bes-.] |
- [\!g16\ff-. g-. g-. g-.] [g8-. g-.] |
- [g8.-> g16] [g8 g] |
- [g8.-> g16] [g8 g] |
- [f8.-> f16] [f8 f] |
- [f8.-> f16] [f8 f] |
- [bes8-. as16( g] )f4 ~ |
- [f16 es( d es] [f as g )f] |
- [es( g f es] [d f es d] |
- [c es d c] [b d c b] |
- [a c bes a] [g bes a g] |
- [fis a g fis] [e g fis )e] |
- % `a deux
- [d8 d'] [es8.-> c16] |
- [a8 bes g es] |
- [c' d es8. bes16] |
- [g8 es bes' c,] |
- [d16-. d-. d-. d-.] [d8.-. es16->] |
- [d'16-.-"cresc." d-. d-. d-.] [d8.-. es16->] |
- [d16-. d-. d-. d-.] [d8.-. es16->] |
- [d16 d d d] [d8 es16-.] r16-\fermata^"court"^"tr\\`es" |
- % Un peu plus lent.
- \property Voice . textStyle = "bold"
-
-% ugh
-% d4(\<^"Un peu plus lent" \property Voice . textStyle = "italic _"tr\\`es \\'el\\'egant"
-% d4(\^"Un peu plus lent et \\'el\\'egant"<
- \property Voice . textStyle = "italic"
- d4(\<
- [e8 \!fis8] |
-% [)b-. a-.] [g16( fis e )d] |
- \property Voice . textStyle = "bold"
- [)b-.^"Un peu plus lent et \\'el\\'egant" a-.] [g,,16( fis' e )d] |
- \property Voice . textStyle = "italic"
- [d( c b\< c] [)\!fis'8-. e-.] |
- d,,4-> ~ [d16 e( fis g] |
- [a b\< d fis] [)\!a8-. g-.] |
- [fis16( e a, )c] e4 ~ |
- [e16 d( e, c'] [)b8-. a-.] |
- g2 ~ |
- [g8 \times 2/3 { d16( e fis ] } [)g8 d'-.] |
- b2-> ~ |
- [b8 \times 2/3 { d,16( e fis ] } [)g8-"cresc. poco" e'-.] |
- e2-> ~ |
- [e8 \times 2/3 { d,,16( e fis ] } [)g8\f d'-.] |
- [d8.-> b'16-.] [g16-. d-. b-. c-.] |
- [d-. e-. fis-. a-.] [g8-. e-.] |
- fis2-> ~ |
- [fis16 g-.\< a-. b-.] [\!c8-. c,-.] |
- [es8.->(-"espress.") d16] d4 ~ |
- [d16 e( fis a] [)g8 b,-.] |
- [b8.->( )c16] c4 ~ |
- [c16\< cis( d \!dis] [)e8-.-"dim." fis,-.] |
- [fis8.->( g16] )g4 ~ |
-
- % (only notes! of) five measures copied from 14 measures above
- [g8 \times 2/3 { d16( e fis ] } [)g8 d'-.] |
- b2->-"cresc." ~ |
- [b8 \times 2/3 { d,16( e fis ] } [)g8 e'-.] |
- e2-> ~ |
- [e8 \times 2/3 { d,,16(_"h\\^atez" e fis ] } [)g8\f d'-.] |
- [d8.-> b16-.] [g16-.-"cresc." d'-. b-. c-.] |
- [d16\f\< e-. fis-. g-.] [a-. b,-. c-. \!d-.]
-}
-
-
-hoboonesecondstart = \notes \relative c'{
-
-% ugh: cant copy: allegro/primo tempo
- \property Voice . textStyle = "large"
- [es''16-.\ff^"Tempo 1$^o$" es-. es-. es-.] [es8-. d-.] |
- \property Voice . textStyle = "italic"
-
-}
-
-hoboonelast = \notes \relative c'{
- % could transpose/copy from measure 19...
- [d''16-.\p d-. d-. d-.] [d8-. c-.] |
- es2-> |
- [es16-. es-. es-. es-.] [es8-. d-.] |
- f2-> |
- [f16-. f-. f-. f-.] [f8-. g-.] |
- r8 [a-.-"cresc." r g-.] |
- r [a-.\f bes-.\< \!c-.] |
- [d8.->\> \!bes16] [f8 d] |
-
- % four measures copied from 8 measures back...
- [d16-.\p d-. d-. d-.] [d8-. c-.] |
- es2-> |
- [es16-. es-. es-. es-.] [es8-. d-.-"cresc."] |
- f2-> |
- [fis16-.\p fis-. fis-. fis-.] [fis8-. g-.] |
- % same measure
- [fis16-.\p fis-. fis-. fis-.] [fis8-. g-.] |
- [fis8-. g-. fis-. g-.] |
- [a-. bes-. a-. bes-. ] |
- [a-.\f bes-. a-. bes-. ] |
- [c-.-"cresc." f,-. g-. a-.] |
- [bes-. bes-. ces8.-> as16] |
- [f8-. ges-. es-. ces-.] |
- % `a deux
- [as-. bes-. ces8.-> ges16] |
- [es8-. ces'-. ges-. as-.] |
- bes\p r r4 |
- [bes16-.-"cresc." bes-. bes-. bes-.] [bes8-. ces->] |
- % same measure
- [bes16-. bes-. bes-. bes-.] [bes8-. ces->] |
- [bes'16-.\ff bes-. bes-. bes-.] [bes8-. ces16->] r16^"court"-\fermata |
- % ugh: eight measures rest (ugh: r1 -> four beats...)
- % eiht measures rest..
- \property Voice . textStyle = "bold"
-% r2^"Un peu plus lent et \\'el\\'egant"
- R2*8
-% r4 r8\p bes |
- r4^"Un peu plus lent et \\'el\\'egant"
- r8\p bes,, |
-% g2->^"Un peu plus lent et \\'el\\'egant" ~ |
- g2-> ~ |
- \property Voice . textStyle = "italic"
- g8 r r c |
- c2-> ~ |
- c8 r r bes'\f |
- [bes8.->\f g16-.] [es16-. bes-. g-. as-.] |
- [bes-.-"dim." c-. d-. f-.] [es8-. c-.] |
- d2-> ~ |
- [d16-"dim."( es f g] [)as,8 as-.] |
- [ces8.->\p( )bes16-.] bes4 ~ |
- [bes16( c! d f] [)es8 g,-.] |
- [g8.->( )as16] as4 ~ |
- [as16( a bes b] [)c8-. d,-.] |
- % a deux
- [d8.->( ) es16] es4 ~ |
- es4 r8 bes'-. |
- g2-> ~ |
- g8 r r c |
- c2 ~ |
- c8 r r bes' |
- [bes8.-> g16-.] [es16-. bes-. g-. as-.] |
- [bes-. c-. d-. es-.] [f-. g-. as-. bes-.] |
- d8-. r c4-> ~ |
- [c16 f,-. g-. a-.] [bes-. c,-. d-. es-.] |
- g8-. r f4-> ~ |
- [f16 bes,-. c-. d-.] [es-. f-. g-. as-.] |
- c8 r bes4 ~ |
- [bes8 as-. g8.-. e16-.] |
- g8-. r f4-> ~ |
- [f8 es-. ces8.-. as16-.] |
- % `a deux
- \property Voice . textStyle = "large"
- [ces8.->^"Plus vite" bes16-.(] [a bes es d] |
- \property Voice . textStyle = "italic"
- [)c!8.-> bes16] [a( bes es )d] |
- [c->( bes es )d] [c->( bes es )d] |
- % same measure
- [c->( bes es )d] [c->( bes es )d] |
- [c( bes a bes] [c d es e] |
- [g )f d( es] [f g as a] |
- [c )bes bes,( c] [d es f g] |
- [as g f g] [as bes c d] |
- \property Voice . textStyle = "large"
- [)es-.^"Tempo 1$^o$" g,-. g-. g-.] [g8-. g-.] |
- \property Voice . textStyle = "italic"
- bes4.-> g8-. |
- gis2->( |
- )as! |
- [g16-. g-. g-. g-.] [g8-. g-.] |
- bes4.-> g8-. |
- gis2->( |
-% )as! |
- )as |
- [bes16-. bes-. bes-. bes-.] [bes8-. bes-.] |
- bes4.-> g8-. |
- [g16-._"h\\^atez" g-. g-. g-.] [g8-. g-.] |
- g4.-> g8-. |
- es4.-> es8-. |
- bes4.-> bes8-. |
- \property Voice . textStyle = "large"
- g'4.->^"Presto" g8-. |
- \property Voice . textStyle = "italic"
- es4.-> es8-. |
- [bes-. bes-. es-. g-.] |
- [bes-. bes,-. es-. g-.] |
- bes-. r r4 |
- g8-. r r4 |
- g8-. r r4 |
-}
-
-hoboone = \notes {
- \hoboonestart
- \hobooneintro
- \hoboonemid
- \hoboonesecondstart
- \hobooneintro
- \hoboonelast
-}
-
-global = \notes{
- \key es;
- \time 2/4;
- \skip 4*110;
- \key g; |
- \bar "||";
- \skip 4*58;
- \key es; |
- \bar "||";
- \skip 4*220;
- \bar "|.";
-}
-
-
-$staff_hoboone = \context Staff = hoboonestaff <
- \global
- \property Staff.instrument = "oboe"
- % don't expand multi-bar rest
- \property Score.skipBars = 1
- \hoboone
->
-
-a4 = \paper{
- \translator{ \BarNumberingStaffContext }
-}
-
-a4sixteen = \paper{
- \paper_sixteen
- linewidth= 193.\mm;
- \translator { \BarNumberingStaffContext }
-}
-
-\score{
- \$staff_hoboone
- \paper{ \a4 }
- \midi{
- \tempo 4 = 80;
- }
-% \paper{ \a4sixteen }
-}
-
yoffset mudelapaperstaffheight 8 mul sub /yoffset exch def
} bind def
-/unknown { (U) setbold } bind def
-/empty { (E) setbold } bind def
-
/turnOnExperimentalFeatures { } bind def
-/rulesym % thick length
-{
- gsave
- exch setlinewidth
- 0 lineto stroke
- grestore
-} bind def
-
-(lily.ps) findlibfile
-{
- exch pop //systemdict /run get exec
-}
-{
- /undefinedfilename signalerror
-} ifelse
-
stafflinethickness setlinewidth
% see if we're there...
(("Clef_item" "Span_bar") . (minimum_space 3.7))
(("Time_signature" "Span_bar") . (minimum_space 2.0))
(("Key_item" "Span_bar") . (minimum_space 2.5))
- (("Staff_bar" "Time_signature") . (minimum_space 2.0)) ;double check this.
+ (("Staff_bar" "Time_signature") . (minimum_space 1.5)) ;double check this.
(("Time_signature" "begin-of-note") . (extra_space 2.0)) ;double check this.
(("Key_item" "begin-of-note") . (extra_space 2.5))
(("Staff_bar" "begin-of-note") . (extra_space 1.0))
;; UGH
- (define (header-end) "\\turnOnPostScript")
+ (define (header-end) "\\input lilyponddefs \\turnOnPostScript")
(define (header creator generate)
(string-append
(define (font-switch i)
(string-append (font i) " "))
- (define (header-end) "")
+ (define (header-end)
+ (string-append
+ (ly-gulp-file "lilyponddefs.ps")
+ " {exch pop //systemdict /run get exec} "
+ (ly-gulp-file "lily.ps")
+ "{ exch pop //systemdict /run get exec } "
+ ))
+
(define (lily-def key val)
(if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")
print ("}")
def dump_score ():
- print ("\\score{")
- print (" \\notes<")
- print (" \\global")
+ print r"""\score{
+ \notes<
+ \global"""
+
for i in range (len (voices)):
print (" \\context Staff=%s \\voice%s" %
(names [i], names [i]))
j = i
if j >= len (voices):
j = len (voices) - 1
- print (" \\context Lyrics=%s \\rhythm \\voice%s \\verse%s" %
+ print (" \\context Lyrics=%s \\addlyrics \\voice%s \\verse%s" %
(names [i], names [j], names [i]))
print (" >")
dump_header (header)
return str
-# urg, hairy to compute grace note hack using \times{}
def try_parse_grace_delims (str):
if str and str[0] == '{':
str = str[1:]
identify ()
(options, files) = getopt.getopt (
- sys.argv[1:], 'f:t:seh', ['show-rules', 'help', 'edit', 'from', 'to'])
+ sys.argv[1:], 'o:f:t:seh', ['output', 'show-rules', 'help', 'edit', 'from', 'to'])
for opt in options:
o = opt[0]
elif o== '--show-rules' or o == '-s':
show_rules (sys.stdout)
sys.exit(0)
+ elif o == '--output' or o == '-o':
+ outfile_name = a
else:
print o
raise getopt.error
# - changed RE to search for pre/postMudelaExample to make it possible to
# comment out a definition.
# - use sys.stderr and sys.stdout instead of print
+# 1.1.62
+# - junked separate versioning
+# - pass -I options to lily.
+# - portability stuff (os.sep).
+
import os
import string
import re
import getopt
import sys
+import __main__
outdir = 'out'
initfile = ''
-program_version = '0.5.6'
+program_version = '@TOPLEVEL_VERSION@'
include_path = ['.']
out_files = []
def compile (command, workingdir, infile, outfile):
"Test if infile is newer than outfile. If so, cd to workingdir"
"and execute command"
+ print "COMPILE!!"
indate = file_mtime (workingdir+infile)
try:
outdate = file_mtime (workingdir+outfile)
for g in g_vec:
if need_recompile_b(outdir+g[1]+'.ly', outdir+g[1]+'.tex'):
s = s + ' ' + g[1]+'.ly'
+
+ lilyoptions = ''
+ for inc in __main__.include_path :
+ p = inc[:]
+ if p[0] <> os.sep and outdir: # UGH-> win32 ?
+ p = '..' + os.sep + p
+ lilyoptions = lilyoptions + " -I \"%s\"" % p
+
if s != '':
- e = os.system('cd %s; lilypond %s' %(outdir, s))
+ cmd = 'cd %s; lilypond %s %s' %(outdir, lilyoptions, s)
+ sys.stderr.write ('invoking command %s' % cmd)
+ e = os.system(cmd)
if e:
sys.stderr.write("error: lilypond exited with value %i\n" % e)
sys.exit(e)
Props.force_verbatim_b = 1
elif o == '--init':
initfile = a
- if outdir[-1:] != '/':
- outdir = outdir + '/'
+ if outdir[-1:] != os.sep:
+ outdir = outdir + os.sep
# r""" ... """ means: leave escape seqs alone.
defined_mudela_cmd = {'mudela': r"""