+2003-07-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * scripts/lilypond-book.py (option_definitions): typo
+
+ * scripts/ly2dvi.py (include_path): typo
+
+ * make/lilypond.redhat.spec.in (Group): add INSTALL.txt
+
+ * lily/parse-scm.cc (parse_handler): typo
+
+ * Documentation/user/macros.itexi: use @heading for headings.
+
+ * Documentation/user/refman.itely: updates, fixes.
+
2003-07-23 Heikki Junes <hjunes@cc.hut.fi>
* po/fi.po: add Finnish translations.
2003-07-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * lily/volta-bracket.cc (brew_molecule): opps: only wipe number
+ for non-first _broken_ bracket.
+
* Documentation/user/refman.itely: corrections.
2003-07-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
@c move this elsewhere?
There is also support for emacs: lilypond-mode for emacs provides
-keyword autocompletion, indentation, LilyPond specific parenthesis matching
-and syntax coloring, handy compile short-cuts and reading LilyPond manuals
-using Info. If lilypond-mode
-is not installed on your platform, then refer to the installation
-instructions for more information.
+keyword autocompletion, indentation, LilyPond specific parenthesis
+matching and syntax coloring, handy compile short-cuts and reading
+LilyPond manuals using Info. If lilypond-mode is not installed on
+your platform, then refer to the installation instructions for more
+information.
@cindex emacs
@cindex emacs mode
print. Instead refer to an example input file (@inputfileref), these
are clickable in HTML.
+* abbrevs in caps, e.g. HTML, DVI, MIDI, etc.
+
@end ignore
@ifhtml
@item \forgetAccidentals
@cindex @code{\forgetAccidentals}
This is sort of the opposite of @code{\noResetKey}: Accidentals
- are not remembered at all - and hence all accidentals are
+ are not remembered at all---and hence all accidentals are
typeset relative to the key signature, regardless of what was
before in the music:
@lilypond[singleline,fragment,verbatim,relative]
@refbugs
Producing nice slurs is a difficult problem, and LilyPond currently
-uses a simple, empiric method to produce slurs. In some cases, the
-results of this method are ugly.
+uses a simple, empiric method to produce slurs. In some cases, its
+results are ugly.
@cindex Adjusting slurs
Breath marks are entered using @code{\breathe}.
-@lilypond[fragment,relative]
+@lilypond[fragment,relative,verbatim]
c'4 \breathe d4
@end lilypond
@internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent},
@inputfileref{input/regression,note-group-bracket.ly}.
-@refbugs
-
-Bracket endings should be angled/slanted. (TODO)
-
-
-
-
@node Articulations
@section Articulations
Other symbols can be added using the syntax
-@var{note}@code{-\}@var{name}. Again, they can be forced up or down
-using @code{^} and @code{_}.
+@var{note}@code{-\}@var{name}, e.g. @code{c4-\fermata}. Again, they
+can be forced up or down using @code{^} and @code{_}.
@cindex accent
@cindex marcato
<<c'' c'''-3>>-(_\thumb <<d'' d'''-3>>-)_\thumb-]
@end lilypond
-Fingering for chords can be notated like this:
-
-@c TODO: confusing example.
+Fingerings for chords can also be added to individual notes
+of the chord by adding them after the pitches
@lilypond[verbatim,singleline,fragment,relative=1]
<< c-1 e-2 g-3 b-5 >> 4
+@end lilypond
+
+Setting @code{fingerHorizontalDirection} will put the fingerings next
+to the note head.
+
+@lilypond[verbatim,singleline,fragment,relative=1]
\property Voice.fingerHorizontalDirection = #LEFT
- << c-1 es-3 g-5 >> 4
+ << c-1 es-2 g-4 bes-5 >> 4
\property Voice.fingerHorizontalDirection = #RIGHT
- << c-1 e-2 g-3 b-5 >>4
- \property Voice.fingerHorizontalDirection = #LEFT
- << c_1 e-2 g-3 b^5 >>4
+ << c-1 es-2 g-4 bes-5 >> 4
@end lilypond
@seealso
@refbugs
Timing information is not remembered at the start of an alternative,
-so you have to reset timing information after a repeat, e.g. using a
-bar-check (See @ref{Bar check}), setting @code{Score.measurePosition}
-or entering @code{\partial}. Similarly, slurs or ties are also not
-repeated.
+so after a repeat timing information must be reset by hand, for
+example by setting @code{Score.measurePosition} or entering
+@code{\partial}. Similarly, slurs or ties are also not repeated.
@node Manual repeat commands
repeats. Its value is a Scheme list of repeat commands, where each repeat
command can be
-@table @code
-@item 'start-repeat
- Print a |: bar line
-@item 'end-repeat
- Print a :| bar line
-@item (volta . @var{text})
- Print a volta bracket saying @var{text}. The text can be specified as
+@table @asis
+@item the symbol @code{start-repeat},
+ which prints a @code{|:} bar line.
+@item The symbol @code{end-repeat},
+ which prints a @code{:|} bar line
+@item The list @code{(volta @var{text})}
+ which prints a volta bracket saying @var{text}. The text can be specified as
a text string or as a markup text, see @ref{Text markup}. Do not
forget to change the font, as the default number font does not contain
alphabetic characters.
-@item (volta . #f)
- Stop a running volta bracket
+@item The list @code{(volta #f)}, which
+ stops a running volta bracket
@end table
@lilypond[verbatim, fragment]
@seealso
-Tremolo beams are @internalsref{Beam} objects. Single stem tremolos are
-@internalsref{StemTremolo}. @internalsref{TremoloEvent}.
+Tremolo beams are @internalsref{Beam} objects. Single stem tremolos
+are @internalsref{StemTremolo}. The music expression is
+@internalsref{TremoloEvent}.
@refbugs
-The single stem tremolo @emph{must} be entered without @code{@{} and
+The single stem tremolo must be entered without @code{@{} and
@code{@}}.
@node Tremolo subdivisions
@internalsref{DoublePercentRepeat}.
-@refbugs
-
-Single measure and double measure percent-repeats cannot be nested.
@node Rhythmic music
@section Rhythmic music
@cindex percussion
@cindex drums
-To typeset more than one piece of percussion to be played by the same
-musician one typically uses a multiline staff where each staff
-position refers to a specific piece of percussion.
+A percussion part for more than one instrument typically uses a
+multiline staff where each position in the staff refers to one piece
+of percussion.
@syntax
Percussion staves are typeset with help of a set of Scheme
functions. The system is based on the general MIDI drum-pitches.
-Include @file{ly/drumpitch-init.ly} to use drum pitches. This file
+Include @file{drumpitch-init.ly} to use drum pitches. This file
defines the pitches from the Scheme variable @code{drum-pitch-names},
the definition of which can be read in @file{scm/drums.scm}. Each
piece of percussion has a full name and an abbreviated name, and both
the existing list:
@example
-#(define mydrums (append `(
+#(set-drum-kit mydrums (append `(
(bassdrum default #f ,(ly:make-pitch -1 2 0))
(lowtom diamond #f ,(ly:make-pitch -1 6 0))
-) drums ))
+) (get-drum-kit 'drums)))
@end example
The file @file{drumpitch-init.ly} replaces the normal pitch names, so
}
@end lilypond
-@node Percussion midi output
-@subsection Percussion midi output
+@node Percussion MIDI output
+@subsection Percussion MIDI output
-In order to produce correct midi output you need to produce two score
-blocks---one for the paper and one for the midi output. To use the
+In order to produce correct MIDI output you need to produce two score
+blocks---one for the paper and one for the MIDI output. To use the
percussion channel you set the property @code{instrument} to
-@code{'drums}. Because the drum-pitches themself are similar to the
-general midi pitches all you have to do is to insert the voices with
-none of the scheme functions to get the correct midi output:
+@code{'drums}. Because the drum-pitches themselves are similar to the
+general MIDI pitches all you have to do is to insert the voices with
+none of the scheme functions to get the correct MIDI output:
@example
\score @{
@refbugs
-This scheme is to be considered a temporary implementation.
+This scheme is a temporary implementation.
@node Piano music
\autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
@end example
The autochanger switches on basis of pitch (central C is the turning
-point), and it looks ahead skipping over rests to switch rests in
+point), and it looks ahead skipping over rests to switch in
advance. Here is a practical example:
@lilypond[verbatim,singleline,quote]
s1*2
} > }
@end lilypond
-Spacer rests are used to prevent the bottom staff from
+
+@noindent
+In this example, spacer rests are used to prevent the bottom staff from
terminating too soon.
@example
\translator Staff = @var{staffname} @var{music}
@end example
+
+@noindent
The string @var{staffname} is the name of the staff. It switches the
current voice from its current staff to the Staff called
@var{staffname}. Typically @var{staffname} is @code{"up"} or
@code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
note or chord.
-The symbols that are printed can be modified by setting
-@code{pedal@var{X}Strings}, where @var{X} is one of the pedal types:
-Sustain, Sostenuto or UnaCorda. Refer to the generated documentation
-of @internalsref{SustainPedal} for more information.
+@lilypond[fragment,verbatim]
+ c'4-\sustainDown c'4-\sustainUp
+@end lilypond
+
+What is printed can be modified by setting @code{pedal@var{X}Strings},
+where @var{X} is one of the pedal types: @code{Sustain},
+@code{Sostenuto} or @code{UnaCorda}. Refer to the generated
+documentation of @internalsref{SustainPedal} for more information.
Pedals can also be indicated by a sequence of brackets, by setting the
@code{pedal-type} property of @internalsref{SustainPedal} objects:
@lilypond[fragment,verbatim]
-\property Staff.SustainPedal \override #'pedal-type = #'bracket
+ \property Staff.SustainPedal \override #'pedal-type = #'bracket
c''4-\sustainDown d''4 e''4
a'4-\sustainUp-\sustainDown
f'4 g'4 a'4-\sustainUp
Unix-like systems. Some additional instructions for Microsoft Windows
are given at the end of this section.
-Begin by opening a terminal window and starting a text editor.
-For example, you could open an xterm and execute @code{joe}. In your
-text editor, enter the following input and save the file as
+Begin by opening a terminal window and starting a text editor. For
+example, you could open an xterm and execute
+@code{joe}.@footnote{There are macro files for VIM addicts, and there
+is a @code{LilyPond-mode} for Emacs addicts. If it has not been
+installed already, then refer to the file @file{INSTALL.txt}}. In
+your text editor, enter the following input and save the file as
@file{test.ly}:
@quotation
symbols that are printed above or below notes. We only give an
example; a more elaborate explanation is in @ref{Constructing a
tweak}.
+
@lilypond[relative 1]
c2-\fermata
\property Voice.Script \set #'padding = #3
$(web-ext:%=-path '*/out-www/*.%' -or) -false \
> $(outdir)/weblist
echo '<META HTTP-EQUIV="refresh" content="2;URL=Documentation/out-www/">' > $(builddir)/index.html
- cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
+ cd $(builddir) && ls *.html >> $(outdir)/weblist
cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
{
Parse_start* ps = (Parse_start*) data;
- ps->start_location_.error (_("GUILE signaled an error for the expression begining here"));
+ ps->start_location_.error (_("GUILE signaled an error for the expression beginning here"));
if (scm_ilength (args) > 2)
scm_display_error_message (gh_cadr (args), gh_caddr(args), scm_current_error_port());
/*
Record a stack of the current pedal spanners, so if more than one pedal
occurs simultaneously then extra space can be added between them.
-
-
- Why 4, why not 3. Why not 3423 ? ---hwn.
*/
- Spanner *previous_ [4];
+ Link_array<Spanner> previous_;
int spanner_count_;
/*
Left and right flare widths of a \___/, as specified by the grob
property edge-widen.
+
+ UGR. No GC protection.
+
*/
Drul_array<SCM> edge_width_drul_;
Pedal_info *p = info_list_;
spanner_count_ = 0;
- for (int i = 0; i < 3; ++i)
- previous_[i] = 0;
-
+ previous_.clear ();
char * names [] = { "Sostenuto", "Sustain", "UnaCorda", 0 };
char **np = names ;
SCM s = SCM_EOL;
SCM strings = get_property ( ("pedal" + String (p->name_) + "Strings").to_str0 ());
- if (scm_ilength (strings) >= 3)
+ if (scm_ilength (strings) < 3)
{
- if (p->req_l_drul_[STOP] && p->req_l_drul_[START])
+ Music * m = p->req_l_drul_[START];
+ if (!m) m = p->req_l_drul_ [STOP];
+
+ String msg = _ ("Need 3 strings for piano pedals. No pedal made. ");
+ if (m)
+ m->origin().warning (msg);
+ else
+ warning (msg)
+
+ return ;
+ }
+
+
+ if (p->req_l_drul_[STOP] && p->req_l_drul_[START])
+ {
+ if (pedaltype == ly_symbol2scm ("text"))
{
- if (pedaltype == ly_symbol2scm ("text"))
+ if (!p->start_req_)
{
- if (!p->start_req_)
- {
- p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
- }
- else
- {
- s = ly_cadr (strings);
- }
- p->start_req_ = p->req_l_drul_[START];
+ p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
}
- }
- else if (p->req_l_drul_[STOP])
- {
- if (pedaltype == ly_symbol2scm ("text"))
+ else
{
- if (!p->start_req_)
- {
- p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
- }
- else
- {
- s = ly_caddr (strings);
- spanner_count_ --;
- }
- p->start_req_ = 0;
+ s = ly_cadr (strings);
}
+ p->start_req_ = p->req_l_drul_[START];
}
- else if (p->req_l_drul_[START])
+ }
+ else if (p->req_l_drul_[STOP])
+ {
+ if (pedaltype == ly_symbol2scm ("text"))
{
- p->start_req_ = p->req_l_drul_[START];
- s = ly_car (strings);
- if (pedaltype == ly_symbol2scm ("text"))
+ if (!p->start_req_)
{
- spanner_count_ ++;
- previous_[spanner_count_] = p->line_spanner_;
- if (spanner_count_ > 1)
- // add extra space below the previous already-occuring pedal
- Side_position_interface::add_support (p->line_spanner_,
- previous_[spanner_count_ - 1]);
+ p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
}
+ else
+ {
+ s = ly_caddr (strings);
+ spanner_count_ --;
+ if (previous_.size ())
+ previous_.pop();
+ }
+ p->start_req_ = 0;
}
-
- if (gh_string_p (s))
+ }
+ else if (p->req_l_drul_[START])
+ {
+ p->start_req_ = p->req_l_drul_[START];
+ s = ly_car (strings);
+ if (pedaltype == ly_symbol2scm ("text"))
{
- String propname = String (p->name_) + "Pedal";
- b = get_property (propname.to_str0 ());
- p->item_ = new Item (b);
- p->item_->set_grob_property ("text", s);
- Axis_group_interface::add_element (p->line_spanner_, p->item_);
+ spanner_count_ ++;
+
+ /*
+ Code dup?! see below.
+ */
+ if (previous_.size ())
+ // add extra space below the previous already-occuring pedal
+ Side_position_interface::add_support (p->line_spanner_,
+ previous_.top ());
+ previous_.push ( p->line_spanner_);
+ }
+ }
+
+ if (gh_string_p (s))
+ {
+ String propname = String (p->name_) + "Pedal";
+ b = get_property (propname.to_str0 ());
+ p->item_ = new Item (b);
+ p->item_->set_grob_property ("text", s);
+ Axis_group_interface::add_element (p->line_spanner_, p->item_);
- announce_grob (p->item_,
- (p->req_l_drul_[START]
- ? p->req_l_drul_[START]
- : p->req_l_drul_[STOP])->self_scm ());
+ announce_grob (p->item_,
+ (p->req_l_drul_[START]
+ ? p->req_l_drul_[START]
+ : p->req_l_drul_[STOP])->self_scm ());
- }
- if (pedaltype == ly_symbol2scm ("text"))
- {
- p->req_l_drul_[START] = 0;
- p->req_l_drul_[STOP] = 0;
- }
+ }
+
+ if (pedaltype == ly_symbol2scm ("text"))
+ {
+ p->req_l_drul_[START] = 0;
+ p->req_l_drul_[STOP] = 0;
}
}
p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
}
else if (!p->req_l_drul_[START])
- spanner_count_ -- ;
-
+ {
+ spanner_count_ -- ;
+ if (previous_.size())
+ previous_.pop();
+ }
+
assert (!p->finished_bracket_ && p->bracket_);
Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
*/
SCM ew = p->bracket_->get_grob_property ("edge-widen");
+
+ /*
+ WTF is this doing here?
+
+ This must go to the backend.
+
+ --HWN.
+ */
edge_width_drul_[LEFT] = ly_car (ew);
edge_width_drul_[RIGHT] = ly_cdr (ew);
if (!p->req_l_drul_[STOP])
{
- spanner_count_ ++;
- previous_[spanner_count_] = p->line_spanner_;
- if (spanner_count_ > 1)
+ /*
+ code dup.
+ */
+ spanner_count_ ++;
+ if (previous_.size())
// position new pedal spanner below the current one
- Side_position_interface::add_support (p->line_spanner_, previous_[spanner_count_ - 1]);
+ Side_position_interface::add_support (p->line_spanner_, previous_.top());
+
+ previous_.push (p->line_spanner_);
}
}
Perhaps make separate function for pedal-bracket.
*/
+/*
+ UGH UGH UGH .
+
+ This is broken broken.
+
+ All the tweak props should be unnecessary.
+
+ This should not be linked with Text_spanner.
+ */
void
Text_spanner::setup_pedal_bracket(Spanner *me)
Interval e;
Real padding = 0;
- if (gh_number_p (pa) )
+ if (gh_number_p (pa))
padding = gh_scm2double (pa);
do
width[d] = 0;
height[d] = 0;
shorten[d] = 0;
- if ( ly_number_pair_p (ew) )
+ if (ly_number_pair_p (ew))
width[d] += gh_scm2double (index_get_cell (ew, d));
- if ( !broken[d] && (ly_number_pair_p (eh) ) )
+ if (!broken[d] && (ly_number_pair_p (eh)))
height[d] += gh_scm2double (index_get_cell (eh, d));
- if ( ly_number_pair_p (sp) )
+ if (ly_number_pair_p (sp))
shorten[d] += gh_scm2double (index_get_cell (sp, d));
}
while (flip (&d) != LEFT);
Real extra_short = 0;
// For 'Mixed' style pedals, i.e. a bracket preceded by text: Ped._____|
// need to shorten by the extent of the text grob
- if ( to_boolean (me->get_grob_property ("text-start")) )
+ if (to_boolean (me->get_grob_property ("text-start")))
{
height[LEFT] = 0;
extra_short = padding;
Spanner *orig_span = dynamic_cast<Spanner*> (me->original_);
- bool first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me);
-
- bool last_bracket = orig_span && (orig_span->broken_intos_.top () == (Spanner*)me);
+ bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me);
+
+ bool broken_last_bracket = orig_span && (orig_span->broken_intos_.top () == (Spanner*)me);
- bool no_vertical_start = orig_span && !first_bracket;
- bool no_vertical_end = orig_span && !last_bracket;
+ bool no_vertical_start = orig_span && !broken_first_bracket;
+ bool no_vertical_end = orig_span && !broken_last_bracket;
SCM s = me->get_grob_property ("bars");
Grob * endbar = unsmob_grob (ly_car (s));
SCM glyph = endbar->get_grob_property("glyph");
mol.add_molecule (start);
mol.add_molecule (end);
- if (first_bracket)
+ if (!orig_span || broken_first_bracket)
{
SCM text = me->get_grob_property ("text");
SCM properties = me->get_property_alist_chain (SCM_EOL);
{
SCM c = ly_car (cs);
- if (gh_pair_p (c) && ly_car (c) == ly_symbol2scm ("volta")
+ if (gh_pair_p (c)
+ && ly_car (c) == ly_symbol2scm ("volta")
&& gh_pair_p (ly_cdr (c)))
{
if (ly_cadr (c) == SCM_BOOL_F)
%doc DEDICATION
%doc README.txt
%doc AUTHORS.txt
-
+%doc INSTALL.txt
%if %{info}
%{_infodir}/*
(_ ("DIM"), '', 'default-music-fontsize', _ ("default fontsize for music. DIM is assumed to be in points")),
(_ ("DIM"), '', 'default-lilypond-fontsize', _ ("deprecated, use --default-music-fontsize")),
(_ ("OPT"), '', 'extra-options', _ ("pass OPT quoted to the lilypond command line")),
- (_ ("DIM"), '', 'force-music-fontsize', _ ("force fontsize for all inline lilypond. DIM is assumed be to in points")),
+ (_ ("DIM"), '', 'force-music-fontsize', _ ("force fontsize for all inline lilypond. DIM is assumed to be in points")),
(_ ("DIM"), '', 'force-lilypond-fontsize', _ ("deprecated, use --force-music-fontsize")),
('', 'h', 'help', _ ("this help")),
(_ ("DIR"), 'I', 'include', _ ("include path")),
if verbose_p:
traceback.print_exc ()
else:
- ly.warning (_("Running LaTeX falied. Rerun with --verbose for a trace."))
+ ly.warning (_("Running LaTeX failed. Rerun with --verbose for a trace."))
if page_images_p:
ly.make_ps_images (outbase + '.ps' )