rule for automaticBars.
* lily/timing-engraver.cc (start_translation_timestep): change
barNonAuto to automaticBars
+2003-06-30 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * scripts/convert-ly.py (FatalConversionError.conv): conversion
+ rule for automaticBars.
+
+ * lily/timing-engraver.cc (start_translation_timestep): change
+ barNonAuto to automaticBars
+
2003-06-30 Graham Percival <gperlist@shaw.ca>
* input/test/perform-tie.ly: delete file.
2003-06-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * scm/new-markup.scm (brew-new-markup-molecule): move old markup
+ glue into brew-new-markup-molecule.
+
+ * input/mutopia/J.S.Bach/Petites-Preludes/*.ly: syntax updates.
+
* Documentation/user/introduction.itely (Computerized typography):
new section
\times 2/3 { f8 g a }
@end lilypond
+
+@item @code{\grace}
+@tab grace notes
+@tab
+@lilypond[relative 1,fragment]
+ \grace b16 c4
+@end lilypond
+
@item @code{\lyrics @{ @dots{} @}}
@tab entering lyrics
@tab
\context ChordNames \chords { c:dim f:maj7 }
@end lilypond
+@item @code{< @dots{} \\ @dots{} >}
+@tab polyphony
+@tab
+@lilypond[fragment,relative 1]
+ < c \\ g' >
+@end lilypond
+
+
+@item @code{s4 s8 s16}
+@tab spacer rests
+@tab
+
@end multitable
immediately, and if @var{lazyness} is @code{#t} then the accidental
lasts forever.
-[TODO: should use +infinity for this case?]
+@c [TODO: should use +infinity for this case?]
@end table
@refbugs
-The definition of lyrics mode is too complex.
+The definition of lyrics mode is too complex.
@node The Lyrics context
@subsection The Lyrics context
@refbugs
@code{\addlyrics} is not automatic enough: melismata are not detected
-automatically, and melismata are not stopped when they hit a rest.
+automatically, and melismata are not stopped when they hit a rest. A
+melisma on the last note in a melody is not printed.
@node More stanzas
\times 2/3 { c r c }
@end lilypond
+Grace notes are also made by prefixing a note, or a set of notes with
+a keyword. In this case, the keyword is @code{\grace}.
+@lilypond[relative 1, verbatim,fragment]
+ \grace b16-( c4-)
+ \grace { d16-( e } d4-)
+@end lilypond
+
+@noindent
+More information on the use of grace notes is in @ref{Grace notes}.
-TODO: grace notes
Comments are pieces of the input that are ignored. There are two
types of comments. A line comments are introduced by @code{%}: after
@example
\lyrics @{ I want to break free __ @}
@end example
-@lilypond[singleline]
+@lilypond[]
\score {
\notes {
\addlyrics
\partial 8
c8
\times 2/3 { f g g } \times 2/3 { g4-( a2-) }
+
+ %% ugh, this is to deal with bugs in the extender implementation
+ \blankNotes
+ c8
}
\context Lyrics \lyrics { I want to break free __ }
}
- \paper{ }
+ \paper{ linewidth = 9.0 \cm }
}
@end lilypond
-TODO: fix extender lines here.
-
Similarly, hyphens between words can be entered as two dashes,
resulting in a centered hyphen between two syllables.
@example
{ r4 g4 f2 f4 } >
@end lilypond
The notation @code{< .. >} is a shorthand for @code{\simultaneous @{
-.. @}}. More features of polyphonic typesetting are in the notation
-manual, @ref{Polyphony}.
+.. @}}.
+
+For polyphonic typesetting spacer rests can also be convenient: these
+are rests that do not print. It is useful for filling up voices that
+temporarily do not play:
+@lilypond[verbatim,relative]
+ < { a4 g2 f4-~ f4 } \\
+ { s4 g4 f2 f4 } >
+@end lilypond
+
+More features of polyphonic typesetting are in the notation manual
+in @ref{Polyphony}.
@node Piano staffs
@section Piano staffs
@cindex cross staff voice, manual
@cindex @code{\translator}
+Piano music is always typeset in two staffs connected by a brace.
+Printing such a staff is done similar to the polyphonic example in
+@ref{More basics}:
+@example
+ < \context Staff = up @{ @dots{} @}
+ \context Staff = down @{ @dots{} @}
+ >
+@end example
+but now this entire expression must be interpreted as a
+@code{PianoStaff}:
+@example
+ \context PianoStaff < \context Staff @dots{} >
+@end example
+
+Here is a complete-fledged example:
+@lilypond[relative 0,fragment]
+\context PianoStaff
+ < \context Staff = up {
+ c4 c g g }
+ \context Staff = down {
+ \clef bass c, c' e c }
+ >
+@end lilypond
+
+More information on formatting piano music is in @ref{Piano music}.
+
+@node Setting variables
+@section Setting variables
version automatically.
-@separate
-@example
-s1 s2. r4
-@end example
-@code{s} is a spacer rest. It does not print anything, but it does have
-the duration of a rest. It is useful for filling up voices that
-temporarily do not play. In this case, the viola does not come until one
-and a half measure later.
-
-@separate
-@example
-\grace <<e g>>-( <<d f>>4-) <<c e>>2
-@end example
-@cindex @code{\grace}
-@cindex ornaments
-@cindex grace notes
-@code{\grace} introduces grace notes. It takes one argument, in this
-case a chord. A slur is introduced starting from the @code{\grace}
-ending on the following chord.
-
-@separate
-@example
-\times 2/3
-@end example
-@cindex tuplet
-@cindex triplets
-
-@separate
-@example
-@{ <<d f>>8 <<e g>> <<f a>> @}
-@end example
-The piece of music to be `tripletted' is sequential music containing
-three chords.
-
-
-The bass has a little hoom-pah melody to demonstrate parts switching
-between staves. Since it is repetitive, we use repeats:
-@separate
-@example
-hoomPah = \repeat unfold 8
-@end example
-@cindex unfolded @code{\repeat}
-The unfolded repeat prints the notes in its argument as if they were
-written out in full eight times.
-@separate
@node Fine tuning a piece
@section Fine tuning a piece
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=7
-PATCH_LEVEL=22
+PATCH_LEVEL=23
MY_PATCH_LEVEL=
# Use the above to send patches: MY_PATCH_LEVEL is always empty for a
% upper = \context Staff \notes\relative c {
upper = \context Staff=upper \notes\relative c {
- \context Voice=i
\property Voice.TextScript \set #'font-style = #'italic
r16 g'' c e r g, c e
<<f d b>>4
r4
- \stemBoth
\lowstaff
\stemUp
r16 g,, b d
b d b g as f g d
es fis a c
<
- { \stemUp r c8 b16 }
- \context Voice=ii { \stemDown d,8 f }
+ { r c8 b16 } \\
+ { d,8 f }
>
- \stemBoth |
<<c g e>>1
\bar "|."
}
-% lower = \context Staff \notes\relative c{
lower = \context Staff=lower \notes\relative c{
- \context Voice=i
\property Voice.TextScript \set #'font-style = #'roman
- c4 e g^#'(music "accidentals-1") -\mordent g,4 |
- d'4-\mordent f a-\mordent^#'(music "accidentals-1") a,4 |
+ c4 e g^\markup { \musicglyph #"accidentals-1" } -\mordent g,4 |
+ d'4-\mordent f a-\mordent^\markup { \musicglyph #"accidentals-1" } a,4 |
e' e'-\mordent a, b-\upprall |
c4 e, fis gis-\upprall |
a4 c, d e-\upprall |
f4 e d-\prall c |
- g'-\mordent^#'(music "accidentals-1") g, g'-\mordent g, |
+ g'-\mordent^\markup { \musicglyph #"accidentals-1" } g, g'-\mordent g, |
g'-\mordent g, g'-\mordent g, |
g' r s s | s s s s \clef "bass" |
- <
- { \stemUp\tieUp g1 ~ g ~ g ~ g ~ g ~ g ~ g }
- \context Voice=ii { \stemDown\tieDown g,1 ~ g ~ g ~ g ~ g ~ g ~ g }
+ < { g1 ~ g ~ g ~ g ~ g ~ g ~ g } \\
+ { g,1 ~ g ~ g ~ g ~ g ~ g ~ g }
>
<<c, c,>>1
\bar "|."
<<d c a>>2
r4
<<d c a>>
- < { \stemUp d8-[ g, 8 b d] }
- \context Voice = ii < \stemDown b g >
+ < { d8-[ g, 8 b d] } \\
+ { << b g >> }
>
<<b g>>4
c2
r4
<
- { \stemUp\tieUp c ~ c8}
+ { c ~ c8} \\
% We get a warning: No ties created!
% but they are too!
- \context Voice=ii { \stemDown\tieDown <<e, a>>4 ~ <<e a>>8 }
+ { <<e, a>>4 ~ <<e a>>8 }
>
\stemBoth
d, fis a fis d c' a |
}
lower = \context Staff \notes\relative c{
- \context Voice=i
<
- { \stemUp\tieUp c1 ~ | c ~ | c }
- \context Voice=ii { \stemDown\tieDown c,1 ~ | c ~ | c }
+ { c1 ~ | c ~ | c } \\
+ { c,1 ~ | c ~ | c }
>
\stemBoth |
r8 c e g e c c' e, |
g2 r4 g |
a8 a, c e c a g' e |
fis2 r4 d |
- g-\mordent-#'(music "accidentals-1") g, 4 g'-\mordent g, |
+ g-\mordent-\markup { \musicglyph #"accidentals-1" } g, 4 g'-\mordent g, |
% mordents in brackets...
g'-\mordent g, g'-\mordent g, |
g'-\mordent g, g'-\mordent g, |
% \translator Staff=lower \stemUp
\context Staff <
{
- \translator Staff = lower
+ \translator Staff = lower
a8 g fis16 e fis d
}\\
{
- \translator Staff = upper
+ \translator Staff = upper
d8 a~ a4
}
>
{
\property Voice.TextScript \set #'font-style = #'roman
- c4-\mordent^#'(music "accidentals-1") r r |
- c4-\mordent^#'(music "accidentals-1") r r
+ c4-\mordent^\markup { \musicglyph "accidentals-1" } r r |
+ c4-\mordent^\markup { \musicglyph "accidentals-1" } r r
\property Voice.TextScript \set #'font-style = #'italic
} \\
- { \stemDown a4 r r | a4 r r }
+ { a4 r r | a4 r r }
> |
- \stemBoth
a'8 es d c bes a |
g fis e! d c' a |
%15
}\\
{ \stemDown a4 }
>
- \stemBoth
a8 e' cis a bes! a |
g e' cis g e' cis |
g e' cis g a g |
} \\
{ cis2 }
>
- \stemBoth
d8 c! a d bes g |
%45
c a fis bes g e |
fis,4 r r
d fis d |
\property Voice.TextScript \set #'font-style = #'roman
- g4-\mordent^#'(music "accidentals-1") r r8 f!8 |
+ g4-\mordent^\markup { \musicglyph "accidentals-1" } r r8 f!8 |
\property Voice.TextScript \set #'font-style = #'italic
e4-\prall r r |
f4-\mordent r r8 e |
\score { \notes \relative c'' {
\property Voice.TextScript \override #'molecule-callback =
- #(make-molecule-boxer 0.1 0.3 0.2 Text_item::brew_molecule)
+ #(make-molecule-boxer 0.1 0.3 0.2 brew-new-markup-molecule)
c'4^"foo"
#(make-molecule-boxer 0.05 0.25 0.25 Stem::brew_molecule)
\property Score.RehearsalMark \override #'molecule-callback =
- #(make-molecule-boxer 0.15 0.3 0.3 Text_item::brew_molecule)
-
+ #(make-molecule-boxer 0.15 0.3 0.3 brew-new-markup-molecule)
c8
\property Voice.Stem \revert #'molecule-callback
return false;
req_ = r;
- return true;
+ return true;
}
void
if (text_->get_grob_property ("text") != txt)
text_->set_grob_property ("text", txt);
- if (new_markup_p (txt))
- text_->set_grob_property ("molecule-callback", new_markup_brewer());
-
if (delim_)
text_->set_parent (delim_, Y_AXIS);
*/
SCM m = mark_req_->get_mus_property ("label");
- if (new_markup_p (m))
+ if (gh_pair_p (m) || new_markup_p (m))
{
text_->set_grob_property ("text",m);
- text_->set_grob_property ("molecule-callback", new_markup_brewer ());
}
- if (gh_pair_p (m)) // markup text
- text_->set_grob_property ("text",m);
else
{
if (!gh_string_p (m) && !gh_number_p (m))
SCM mark = r->get_mus_property ("text");
- if (new_markup_p (mark))
- text->set_grob_property ("molecule-callback", new_markup_brewer());
-
text->set_grob_property ("text", mark);
announce_grob (text, r->self_scm ());
texts_.push (text);
{
Timing_translator::start_translation_timestep ();
- SCM nonauto = get_property ("barNonAuto");
+ SCM automatic_bars = get_property ("automaticBars");
Moment now = now_mom ();
SCM which = get_property ("whichBar");
->set_grob_property ("measure-length", mlen.smobbed_copy ());
}
- if (!gh_string_p (which) && !to_boolean (nonauto))
+ if (!gh_string_p (which) && to_boolean (automatic_bars))
{
SCM always = get_property ("barAlways");
/* creats*/ "",
/* accepts */ "",
/* acks */ "",
-/* reads */ "timeSignatureFraction barNonAuto whichBar barAlways defaultBarType skipBars timing oneBeat measureLength measurePosition currentBarNumber",
+/* reads */ "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing oneBeat measureLength measurePosition currentBarNumber",
/* write */ "");
defaultBarType = #"|"
barNumberVisibility = #default-bar-number-visibility
-
+ automaticBars = ##t
+
explicitClefVisibility = #all-visible
explicitKeySignatureVisibility = #all-visible
autoBeamSettings = #default-auto-beam-settings
def make_ps_images (ps_name, resolution = 90):
-
-
## todo:
## have better algorithm for deciding when to crop page,
## and when to show full page
))
(self-alignment-Y . 0)
- (molecule-callback . ,Text_item::brew_molecule)
+ (molecule-callback . ,brew-new-markup-molecule)
(break-align-symbol . instrument-name)
(break-visibility . ,begin-of-line-visible)
(baseline-skip . 2)
melismata, and align lyrics accordingly.
")
-(translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
+(translator-property-description 'barAlways boolean? "If set to true a bar line is drawn after each note.
")
(translator-property-description 'barCheckSynchronize boolean? "If
true then reset measurePosition when finding a barcheck. Turn off when
(define-public (brew-new-markup-molecule grob)
(let*
- ((t (ly:get-grob-property grob 'text))
- )
- (if (null? t)
- '()
+ ((t (ly:get-grob-property grob 'text)))
+ (if (markup? t)
(interpret-markup grob
(Font_interface::get_property_alist_chain grob)
t
- ))
- ))
+ )
+ (Text_item::text_to_molecule t)
+ )))
-(define-public empty-markup `(,simple-markup ""))
+(define-public empty-markup (make-simple-markup ""))
(define (interpret-markup grob props markup)
(if (string? markup)
conversions.append (((1,7,22), conv,"remove GraceContext"))
+if 1:
+ def conv(str):
+ str = re.sub (
+ "barNonAuto *= *##t",
+ "automaticBars = ##f",
+ str)
+ str = re.sub (
+ "barNonAuto *= *##f",
+ "automaticBars = ##t",
+ str)
+ return str
+
+ conversions.append (((1,7,23), conv,"barNonAuto -> automaticBars"))
+
+
+
################################
# END OF CONVERSIONS
################################
ly.system ('%s --preview --postscript --verbose %s ' % (ly2dvi_binary, base) )
- ly.make_page_images (base)
+ ly.make_ps_images (base)
ly.system ('gzip -9 - < %s.ps > %s.ps.gz' % (base, base))
def size_str (fn):
ly.system ("dvips -E -o %s.eps %s" % (file, file))
map (to_eps, eps)
- map (lambda x: ly.make_ps_images (x + '.eps'), png)
+ map (ly.make_ps_images, map (lambda x: x + '.eps', png))
os.chdir (d)
for score in find_tex_files (files, extra_init):
preview_base = ly.strip_extension (score[0], '.tex')
ly.make_ps_images (preview_base + '.preview.ps',
- resolution=preview_resolution
- )
+ resolution=preview_resolution
+ )
if 'PDFTEX' in targets:
try: