Documentation/user/preface.itely,
Documentation/user/introduction.itely: Revised.
Removing leading spaces which distorts output if info files are read
with stand-alone info.
Removing superfluous inter-word spaces which also distorts output
for stand-alone info.
* lily/grob-interface.cc: Adding copyright.
(check_interfaces_for_property): Improve format of warning message.
+2004-04-03 Werner Lemberg <wl@gnu.org>
+
+ * Documentation/user/dedication.itely,
+ Documentation/user/preface.itely,
+ Documentation/user/introduction.itely: Revised.
+ Removing leading spaces which distorts output if info files are read
+ with stand-alone info.
+ Removing superfluous inter-word spaces which also distorts output
+ for stand-alone info.
+
+ * lily/grob-interface.cc: Adding copyright.
+ (check_interfaces_for_property): Improve format of warning message.
+
2004-04-03 Han-Wen Nienhuys <hanwen@xs4all.nl>
* buildscripts/mf-to-table.py (base): add DesignSize comment.
2004-04-03 Han-Wen Nienhuys <hanwen@xs4all.nl>
* buildscripts/mf-to-table.py (base): add DesignSize comment.
- We would like to dedicate this program to all the friends that we
- met through music.
+We would like to dedicate this program to all the friends that we
+met through music.
The images below illustrate the difference between traditional
engraving and typical computer output, and the third picture shows how
LilyPond mimics the traditional look. The left picture shows a scan
The images below illustrate the difference between traditional
engraving and typical computer output, and the third picture shows how
LilyPond mimics the traditional look. The left picture shows a scan
-of a flat symbol from a Henle edition published in 2000. In the
-center show symbol from a hand engraved B@"{a}renreiter edition of the
+of a flat symbol from a Henle edition published in 2000. The center
+depicts a symbol from a hand-engraved B@"{a}renreiter edition of the
same music. The left scan illustrates typical flaws of computer
print: the staff lines are thin, the weight of the flat symbol matches
the light lines and it has a straight layout with sharp corners. By
same music. The left scan illustrates typical flaws of computer
print: the staff lines are thin, the weight of the flat symbol matches
the light lines and it has a straight layout with sharp corners. By
@c introduce illustrating aspects of engraving, spacing...
In spacing, the distribution of space should reflect the durations
between notes. However, many modern scores adhere to the durations
@c introduce illustrating aspects of engraving, spacing...
In spacing, the distribution of space should reflect the durations
between notes. However, many modern scores adhere to the durations
-with mathematical precision, which leads to a poor result. In the
+with mathematical precision, which leads to poor results. In the
next example a motive is printed twice. It is printed once using
exact mathematical spacing, and once with corrections. Can you
spot which fragment is which?
next example a motive is printed twice. It is printed once using
exact mathematical spacing, and once with corrections. Can you
spot which fragment is which?
This is a common characteristic of typography. Layout should be
pretty, not only for its own sake, but especially because it helps the
reader in his task. For performance material like sheet music, this is
This is a common characteristic of typography. Layout should be
pretty, not only for its own sake, but especially because it helps the
reader in his task. For performance material like sheet music, this is
-doubly important: musicians have a limited amount of attention. The
+of double importance: musicians have a limited amount of attention. The
less attention they need for reading, the more they can focus on
playing itself. In other words, better typography translates to better
performances.
less attention they need for reading, the more they can focus on
playing itself. In other words, better typography translates to better
performances.
automatically, so manual overrides are less and less necessary.
When we started we wrote the LilyPond program entirely in the C++
automatically, so manual overrides are less and less necessary.
When we started we wrote the LilyPond program entirely in the C++
-programming language, the program's functionality was set in stone by
+programming language; the program's functionality was set in stone by
the developers. That proved to be unsatisfactory for a number of
reasons:
@itemize @bullet
@item When LilyPond makes mistakes,
the developers. That proved to be unsatisfactory for a number of
reasons:
@itemize @bullet
@item When LilyPond makes mistakes,
- users need to override formatting decisions. Therefore, the user
-must access to the formatting engine. Hence, rules and settings cannot
-be fixed by us at compile time, but they must be accessible for users
-at run-time.
+users need to override formatting decisions. Therefore, the user must
+have access to the formatting engine. Hence, rules and settings cannot
+be fixed by us at compile time but must be accessible for users at
+run-time.
@item Engraving is a matter of visual judgment, and therefore a matter of
taste. As knowledgeable as we are, users can disagree with our
personal decisions. Therefore, the definitions of typographical style
must also be accessible to the user.
@item Engraving is a matter of visual judgment, and therefore a matter of
taste. As knowledgeable as we are, users can disagree with our
personal decisions. Therefore, the definitions of typographical style
must also be accessible to the user.
-@item Finally, we continually refine the formatting algorithms, so we
+@item Finally, we continually refine the formatting algorithms, so we
need a flexible approach to rules. The C++ language forces a certain
method of grouping rules that do not match well with how music
notation works.
need a flexible approach to rules. The C++ language forces a certain
method of grouping rules that do not match well with how music
notation works.
@end itemize
These problems have been addressed by integrating the GUILE
@end itemize
These problems have been addressed by integrating the GUILE
Some variables have a preset value. For example, the thickness of many
lines---a characteristic of typographical style---are preset
Some variables have a preset value. For example, the thickness of many
lines---a characteristic of typographical style---are preset
-variables. Changing them gives a different typographical impression
+variables. Changing them gives a different typographical impression.
@lilypond[quote,raggedright]
fragment = \notes {
@lilypond[quote,raggedright]
fragment = \notes {
@end lilypond
Formatting rules are also preset variables: each object has variables
@end lilypond
Formatting rules are also preset variables: each object has variables
-containing procedures. These procedure perform the actual formatting,
+containing procedures. These procedures perform the actual formatting,
and by substituting different ones, we can change behavior. In the
and by substituting different ones, we can change behavior. In the
-following example, the rule that note head objects use to produce
-their symbol is changed during the music fragment
+following example, the rule which note head objects use to produce
+their symbol is changed during the music fragment.
@lilypond[quote,raggedright]
#(define (mc-squared grob orig current)
@lilypond[quote,raggedright]
#(define (mc-squared grob orig current)
Common music notation is a system of recording music that has evolved
over the past 1000 years. The form that is now in common use, dates
Common music notation is a system of recording music that has evolved
over the past 1000 years. The form that is now in common use, dates
-from the early renaissance. Although, the basic form (i.e. note heads on a
+from the early renaissance. Although the basic form (i.e., note heads on a
5-line staff) has not changed, the details still change to express the
innovations of contemporary notation. Hence, it encompasses some 500
years of music. Its applications range from monophonic melodies to
5-line staff) has not changed, the details still change to express the
innovations of contemporary notation. Hence, it encompasses some 500
years of music. Its applications range from monophonic melodies to
How can we get a grip on such a many-headed beast, and force it into
the confines of a computer program? We have broken up the problem of
How can we get a grip on such a many-headed beast, and force it into
the confines of a computer program? We have broken up the problem of
-notation (as opposed to engraving, i.e. typography) into digestible
+notation (as opposed to engraving, i.e., typography) into digestible
and programmable chunks: every type of symbol is handled by a separate
module, a so-called plug-in. Each plug-in is completely modular and
independent, so each can be developed and improved separately. People
and programmable chunks: every type of symbol is handled by a separate
module, a so-called plug-in. Each plug-in is completely modular and
independent, so each can be developed and improved separately. People
-that translate musical ideas to graphic symbols are called copyists or
+who translate musical ideas to graphic symbols are called copyists or
engravers, so by analogy, each plug-in is called @code{engraver}.
In the following example, we see how we start out with a plug-in for
engravers, so by analogy, each plug-in is called @code{engraver}.
In the following example, we see how we start out with a plug-in for
-The @code{Clef_engraver} defines a reference point for the staff
+the @code{Clef_engraver} defines a reference point for the staff
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
-And the @code{Stem_engraver} adds stems
+and the @code{Stem_engraver} adds stems.
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
@end lilypond
In this situation, the accidentals and staff are shared, but the
@end lilypond
In this situation, the accidentals and staff are shared, but the
-stems, slurs, beams, etc. are private to each voice. Hence, engravers
-should be grouped. The engravers for note heads, stems, slurs, etc. go
+stems, slurs, beams, etc., are private to each voice. Hence, engravers
+should be grouped. The engravers for note heads, stems, slurs, etc., go
into a group called ``Voice context,'' while the engravers for key,
into a group called ``Voice context,'' while the engravers for key,
-accidental, bar, etc. go into a group called ``Staff context.'' In the
+accidental, bar, etc., go into a group called ``Staff context.'' In the
case of polyphony, a single Staff context contains more than one Voice
context. In polyphonic notation, many voices can share a staff.
case of polyphony, a single Staff context contains more than one Voice
context. In polyphonic notation, many voices can share a staff.
-Similarly, more Staff contexts can be put into a single Score context
+Similarly, more Staff contexts can be put into a single Score context.
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
@lilypond[quote,raggedright]
\include "engraver-example.lyinc"
@example
c'4 d'8
@end example
@example
c'4 d'8
@end example
-a quarter note C1 (middle C) and eighth note D1 (D above middle C)
+a quarter note C1 (middle C) and an eighth note D1 (D above middle C)
@lilypond[quote,fragment]
c'4 d'8
@end lilypond
@lilypond[quote,fragment]
c'4 d'8
@end lilypond
-Combine this simultaneously with two other notes by enclosing in << and >>
+@noindent
+Chords can be constructed with < and > enclosing the notes
@end example
@lilypond[quote,fragment,relative=1]
@end example
@lilypond[quote,fragment,relative=1]
-\new Voice { <<c4 d4 e4>> }
This expression is put in sequence by enclosing it in curly braces
This expression is put in sequence by enclosing it in curly braces
+@code{@{@tie{}@dots{}@tie{}@}}
@end example
@lilypond[quote,relative=1]
@end example
@lilypond[quote,relative=1]
-\new Voice { <<c4 d4 e4>> f4 }
+\new Voice { <c d e>4 f4 }
-
-The above is another expression, and therefore, it many combined again
-with a simultaneous expression; in this case, a half note
+
+@noindent
+The above is an expression also, and thus it may be combined again with
+another simultaneous expression (a half note) using <<, @code{\\}, and >>
-<< @{ <<c4 d4 e4>> f4 @} g2 >>
+<< g2 \\ @{ <c d e>4 f4 @} >>
@end example
@lilypond[quote,fragment,relative=2]
\new Voice { << g2 \\ { <c d e>4 f4 } >> }
@end lilypond
@end example
@lilypond[quote,fragment,relative=2]
\new Voice { << g2 \\ { <c d e>4 f4 } >> }
@end lilypond
Such recursive structures can be specified neatly and formally in a
context-free grammar. The parsing code is also generated from this
grammar. In other words, the syntax of LilyPond is clearly and
Such recursive structures can be specified neatly and formally in a
context-free grammar. The parsing code is also generated from this
grammar. In other words, the syntax of LilyPond is clearly and
We have written LilyPond as an experiment of how to condense the art
of music engraving into a computer program. Thanks to all that hard
work, the program can now be used to perform useful tasks. The
We have written LilyPond as an experiment of how to condense the art
of music engraving into a computer program. Thanks to all that hard
work, the program can now be used to perform useful tasks. The
-simplest application is printing notes
+simplest application is printing notes.
@lilypond[quote,relative=1]
\time 2/4 c4 c g'4 g a4 a g2
@end lilypond
@noindent
@lilypond[quote,relative=1]
\time 2/4 c4 c g'4 g a4 a g2
@end lilypond
@noindent
-By adding chord names and lyrics we obtain a lead sheet
+By adding chord names and lyrics we obtain a lead sheet.
@lilypond[quote,raggedright]
\score {
@lilypond[quote,raggedright]
\score {
Polyphonic notation and piano music can also be printed. The following
Polyphonic notation and piano music can also be printed. The following
-example combines some more exotic constructs
+example combines some more exotic constructs.
@lilypondfile[quote,raggedright]{screech-boink.ly}
@lilypondfile[quote,raggedright]{screech-boink.ly}
This manual also shows an application: the input format is text, and
can therefore be easily embedded in other text-based formats such as
This manual also shows an application: the input format is text, and
can therefore be easily embedded in other text-based formats such as
-La@TeX{}, HTML or in the case of this manual, Texinfo. By means of a
+La@TeX{}, HTML, or in the case of this manual, Texinfo. By means of a
special program, the input fragments can be replaced by music images
in the resulting PostScript or HTML output files. This makes it easy
to mix music and text in documents.
special program, the input fragments can be replaced by music images
in the resulting PostScript or HTML output files. This makes it easy
to mix music and text in documents.
@end ifhtml
@emph{@ref{Changing defaults}}
explains how to fine tune layout.
@end ifhtml
@emph{@ref{Changing defaults}}
explains how to fine tune layout.
@item
@ifhtml
The chapter
@item
@ifhtml
The chapter
The
@end ifhtml
@emph{@ref{Literature list}}
The
@end ifhtml
@emph{@ref{Literature list}}
- contains a set of useful reference books, for those who wish to know
- more on notation and engraving.
-
+contains a set of useful reference books, for those who wish to know
+more on notation and engraving.
@end itemize
Once you are an experienced user, you can use the manual as reference:
@end itemize
Once you are an experienced user, you can use the manual as reference:
@end ifhtml
The program reference is a set of heavily cross linked HTML pages,
@end ifhtml
The program reference is a set of heavily cross linked HTML pages,
-which documents the nit-gritty details of each and every LilyPond
-class, object and function. It is produced directly from the
+which document the nit-gritty details of each and every LilyPond
+class, object, and function. It is produced directly from the
formatting definitions used.
Almost all formatting functionality that is used internally, is
available directly to the user. For example, all variables that
formatting definitions used.
Almost all formatting functionality that is used internally, is
available directly to the user. For example, all variables that
-control thicknesses, distances, etc, can be changed in input
+control thickness values, distances, etc., can be changed in input
files. There are a huge number of formatting options, and all of them
are described in the generated documentation. Each section of the
notation manual has a @b{See also} subsection, which refers to the
files. There are a huge number of formatting options, and all of them
are described in the generated documentation. Each section of the
notation manual has a @b{See also} subsection, which refers to the
have clickable links.
@item
have clickable links.
@item
@ifhtml
(available @uref{../../../input/template/out-www/collated-files.html,here})
@end ifhtml
@ifhtml
(available @uref{../../../input/template/out-www/collated-files.html,here})
@end ifhtml
After you have gone through the tutorial, you should be able to write
input files. In practice, writing files from scratch turns out to be
intimidating. To give you a head start, we have collected a number of
After you have gone through the tutorial, you should be able to write
input files. In practice, writing files from scratch turns out to be
intimidating. To give you a head start, we have collected a number of
-often-used formats in example files. These files can be used as a
-start; simply copy the template and add notes in the appropriate
-places.
+often-used formats in example files; simply copy the template and add
+notes in the appropriate places.
@ifhtml
(available @uref{../../../../input/test/out-www/collated-files.html,here})
@end ifhtml
@ifhtml
(available @uref{../../../../input/test/out-www/collated-files.html,here})
@end ifhtml
@ifhtml
(available @uref{../../../input/regression/out-www/collated-files.html,here})
@end ifhtml
@ifhtml
(available @uref{../../../input/regression/out-www/collated-files.html,here})
@end ifhtml
LilyPond in one file. The collection is primarily there to help us
debug problems, but it can be instructive to see how we exercise the
program. The format is similar to the the tips and tricks document.
LilyPond in one file. The collection is primarily there to help us
debug problems, but it can be instructive to see how we exercise the
program. The format is similar to the the tips and tricks document.
it is wonderful, and on some days it just does not work, but you keep
playing, day after day.
it is wonderful, and on some days it just does not work, but you keep
playing, day after day.
-Like making music, working on LilyPond is can be dull work, and on
+Like making music, working on LilyPond can be dull work, and on
some days it feels like plodding through a morass of bugs.
Nevertheless, it has become a part of our life, and we keep doing it.
Probably the most important motivation is that our program actually
some days it feels like plodding through a morass of bugs.
Nevertheless, it has become a part of our life, and we keep doing it.
Probably the most important motivation is that our program actually
-#include "protected-scm.hh"
+/*
+ grob-interface.cc -- implement graphic objects interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "protected-scm.hh"
#include "grob-interface.hh"
#include "lily-guile.hh"
#include "grob.hh"
#include "grob-interface.hh"
#include "lily-guile.hh"
#include "grob.hh"
SCM d = scm_makfrom0str (descr);
SCM l = parse_symbol_list (vars);
SCM d = scm_makfrom0str (descr);
SCM l = parse_symbol_list (vars);
ly_add_interface (s,d,l);
}
ly_add_interface (s,d,l);
}
{
SCM_ASSERT_TYPE (gh_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
SCM_ASSERT_TYPE (gh_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");
{
SCM_ASSERT_TYPE (gh_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
SCM_ASSERT_TYPE (gh_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");
- SCM_ASSERT_TYPE (gh_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
+ SCM_ASSERT_TYPE (gh_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
if (!gh_vector_p (all_ifaces))
if (!gh_vector_p (all_ifaces))
- {
- all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
- }
+ all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
scm_hashq_set_x (all_ifaces, a, entry);
SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
scm_hashq_set_x (all_ifaces, a, entry);
return SCM_UNSPECIFIED;
}
return SCM_UNSPECIFIED;
}
void
check_interfaces_for_property (Grob const *me, SCM sym)
{
void
check_interfaces_for_property (Grob const *me, SCM sym)
{
- SCM ifs = me->get_property ("interfaces");
+ SCM ifs = me->get_property ("interfaces");
bool found = false;
for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
bool found = false;
for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
- String str = to_string ("Grob %s has no interface for property %s",
+ String str = to_string ("Grob `%s' has no interface for property `%s'",
me->name ().to_str0 (),
ly_symbol2string (sym).to_str0 ());
me->name ().to_str0 (),
ly_symbol2string (sym).to_str0 ());
- programming_error (str);
+ programming_error (str);