}
div.separator {
- background: transparent url(../pictures/squiggle.jpg) no-repeat 40% 60%;
+ background: transparent url(../pictures/squiggle.jpg) no-repeat 50% 50%;
height: 36px;
- clear: both;
padding: 10px;
+ margin: 0 13em 0 0;
}
div#news {
}
div.news-item {
+ padding: 1em 0;
}
.news-item .subsubheading {
padding : 0em;
border-left: 2px;
margin: 0em;
+ width: 67%;
}
.normal-table table td {
@cindex repeat with upbeat (上拍を持つ繰り返し)
@cindex upbeat in a repeat (繰り返しの中にある上拍)
-@cindex anacrucis in a repeat (繰り返しの中にある弱拍)
-@cindex repeat with anacrucis (弱拍を持つ繰り返し)
+@cindex anacrusis in a repeat (繰り返しの中にある弱拍)
+@cindex repeat with anacrusis (弱拍を持つ繰り返し)
@cindex repeat with pickup (ピックアップを持つ繰り返し)
@cindex pickup in a repeat (繰り返しの中にあるピックアップ)
@funindex \partial
@c due to crazy intervals of banjo music, absolute pitch is recommended
@lilypond[quote,ragged-right,verbatim]
-\new TabStaff <<
- \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
- \set TabStaff.stringTunings = #banjo-open-g-tuning
- {
- \stemDown
- g8 d' g'\5 a b g e d' |
- g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
- g4
+music = {
+ g8 d' g'\5 a b g e d' |
+ g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
+ g4
+}
+
+<<
+ \new Staff \with { \omit StringNumber }
+ { \clef "treble_8" \music }
+ \new TabStaff \with {
+ tablatureFormat = #fret-number-tablature-format-banjo
+ stringTunings = #banjo-open-g-tuning
}
+ { \music }
>>
@end lilypond
@example
\book @{
\score @{ @dots{} @}
- \layout @{ @dots{} @}
+ \paper @{ @dots{} @}
@}
\book @{
\score @{ @dots{} @}
- \layout @{ @dots{} @}
+ \paper @{ @dots{} @}
@}
\book @{
\score @{ @dots{} @}
- \layout @{ @dots{} @}
+ \paper @{ @dots{} @}
@}
@end example
c1
@end lilypond
-A single repeat with more than one alternate ending:
+Multiple repeats with one alternate ending:
@lilypond[verbatim,quote,relative=2]
\repeat volta 4 { c4 d e f | }
@cindex repeat with upbeat
@cindex upbeat in a repeat
-@cindex anacrucis in a repeat
-@cindex repeat with anacrucis
+@cindex anacrusis in a repeat
+@cindex repeat with anacrusis
@cindex repeat with pickup
@cindex pickup in a repeat
@funindex \partial
@emph{sans} font and the monospaced @emph{typewriter} font -- these
last two families are determined by the Pango installation.
+@warning{There are no default fonts associated with the @emph{sans}
+and @emph{typewriter} font-families. An input file that specifies
+either of these can lead to different output on different computers.
+To ensure consistent output among multiple platforms, fonts must be
+specified by name, and those fonts must be available on any system
+that processes the file. See @ref{Single entry fonts} and
+@ref{Entire document fonts}.}
+
Each family may include different shapes and series. The following
example demonstrates the ability to select alternate families, shapes,
series and sizes. The value supplied to @code{font-size} is the
@end lilypond
The command @code{\addlyrics} cannot handle polyphonic settings.
+Also, it cannot be used to associate lyrics to a @code{TabVoice}.
For these cases one should use @code{\lyricsto}.
@subheading Using associatedVoice
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.16.0
\version "2.16.0"
\header {
texidoc = "
Accordion discant-specific symbols are added using @code{\\markup}. The
-vertical placement of the symbols can be tweaked by changing the
-@code{\\raise} arguments.
-
-
-
+placement of the symbols can be tweaked by changing the
+@code{\\translate-scaled} arguments. @code{\\translate-scaled} is
+used here rather than @code{\\translate} in order to let the
+positioning of the symbol parts adapt to changes of @code{font-size}.
"
doctitle = "Accordion-discant symbols"
} % begin verbatim
accBasson = ^\markup {
\combine
\discant
- \raise #0.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
}
% een korig 8 en 16 voets register
\combine
\discant
\combine
- \raise #0.5 \dot
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
+ \translate-scaled #'(0 . 1.5) \dot
}
accVCello = ^\markup {
\combine
\discant
\combine
- \raise #0.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
\combine
- \raise #1.5 \dot
- \translate #'(1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(1 . 1.5) \dot
}
% 4-8-16 voets register
\combine
\discant
\combine
- \raise #0.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
\combine
- \raise #1.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accTrombon = ^\markup {
\combine
\discant
\combine
- \raise #0.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
\combine
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
\combine
- \translate #'(1 . 0) \raise #1.5 \dot
- \translate #'(-1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
}
% eenkorig 4 en 16 voets register
\combine
\discant
\combine
- \raise #0.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accMaster = ^\markup {
\combine
\discant
\combine
- \raise #0.5 \dot
+ \translate-scaled #'(0 . 0.5) \dot
\combine
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
\combine
- \translate #'(1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(1 . 1.5) \dot
\combine
- \translate #'(-1 . 0) \raise #1.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(-1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accAccord = ^\markup {
\combine
\discant
\combine
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
\combine
- \translate #'(1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(1 . 1.5) \dot
\combine
- \translate #'(-1 . 0) \raise #1.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(-1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accMusette = ^\markup {
\combine
\discant
\combine
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
\combine
- \translate #'(1 . 0) \raise #1.5 \dot
- \translate #'(-1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
}
accCeleste = ^\markup {
\combine
\discant
\combine
- \raise #1.5 \dot
- \translate #'(-1 . 0) \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
}
accOboe = ^\markup {
\combine
\discant
\combine
- \raise #1.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accClarin = ^\markup {
\combine
\discant
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
}
accPiccolo = ^\markup {
\combine
\discant
- \raise #2.5 \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
accViolin = ^\markup {
\combine
\discant
\combine
- \raise #1.5 \dot
+ \translate-scaled #'(0 . 1.5) \dot
\combine
- \translate #'(1 . 0) \raise #1.5 \dot
- \raise #2.5 \dot
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
}
\relative c'' {
--- /dev/null
+\version "2.16.0"
+
+\header {
+ lsrtags = "keyboards, specific-notation, symbols-and-glyphs, workaround"
+
+ texidoc = "
+Accordion discant-specific symbols are added using @code{\\markup}. The
+placement of the symbols can be tweaked by changing the
+@code{\\translate-scaled} arguments. @code{\\translate-scaled} is
+used here rather than @code{\\translate} in order to let the
+positioning of the symbol parts adapt to changes of @code{font-size}.
+"
+ doctitle = "Accordion-discant symbols"
+}
+
+discant = \markup {
+ \musicglyph #"accordion.discant"
+}
+dot = \markup {
+ \musicglyph #"accordion.dot"
+}
+
+\layout { ragged-right = ##t }
+
+% 16 voets register
+accBasson = ^\markup {
+ \combine
+ \discant
+ \translate-scaled #'(0 . 0.5) \dot
+}
+
+% een korig 8 en 16 voets register
+accBandon = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \translate-scaled #'(0 . 1.5) \dot
+}
+
+accVCello = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(1 . 1.5) \dot
+}
+
+% 4-8-16 voets register
+accHarmon = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accTrombon = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \combine
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
+}
+
+% eenkorig 4 en 16 voets register
+accOrgan = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accMaster = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 0.5) \dot
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \combine
+ \translate-scaled #'(1 . 1.5) \dot
+ \combine
+ \translate-scaled #'(-1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accAccord = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \combine
+ \translate-scaled #'(1 . 1.5) \dot
+ \combine
+ \translate-scaled #'(-1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accMusette = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \combine
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
+}
+
+accCeleste = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(-1 . 1.5) \dot
+}
+
+accOboe = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accClarin = ^\markup {
+ \combine
+ \discant
+ \translate-scaled #'(0 . 1.5) \dot
+}
+
+accPiccolo = ^\markup {
+ \combine
+ \discant
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+accViolin = ^\markup {
+ \combine
+ \discant
+ \combine
+ \translate-scaled #'(0 . 1.5) \dot
+ \combine
+ \translate-scaled #'(1 . 1.5) \dot
+ \translate-scaled #'(0 . 2.5) \dot
+}
+
+\relative c'' {
+ c4 d\accBasson e f
+ c4 d\accBandon e f
+ c4 d\accVCello e f
+ c4 d\accHarmon e f
+ c4 d\accTrombon e f
+ \break
+ c4 d\accOrgan e f
+ c4 d\accMaster e f
+ c4 d\accAccord e f
+ c4 d\accMusette e f
+ c4 d\accCeleste e f
+ \break
+ c4 d\accOboe e f
+ c4 d\accClarin e f
+ c4 d\accPiccolo e f
+ c4 d\accViolin e f
+}
@divClass{normal-table}
@multitable @columnfractions .3 .3 .3
@headitem Introduction
+
@item
@docLinkSplit{Learning,learning,@manualDevelLearningSplit}
@tab
@docLinkBig{Essay,essay,@manualDevelEssayBig}
@tab
@docLinkPdf{Essay,essay,@manualDevelEssayPdf}
+@end multitable
+@multitable @columnfractions .3 .3 .3
@headitem Regular
@item
@docLinkBig{Snippets,snippets,@manualDevelSnippetsBig}
@tab
@docLinkPdf{Snippets,snippets,@manualDevelSnippetsPdf}
+@end multitable
+@multitable @columnfractions .3 .3 .3
@headitem Infrequent
@item
@docLinkBig{Internals,internals,@manualDevelInternalsBig}
@tab
@docLinkPdf{Internals,internals,@manualDevelInternalsPdf}
+@end multitable
@ifset web_version
+@multitable @columnfractions .3
@headitem Downloadable
@item
@doctarballDevel
+@end multitable
@end ifset
-@end multitable
@divEnd
@divEnd
@c used for news about the upcoming release; see CG 10.2
@newsItem
-@subsubheading LilyPond 2.17.21 released! @emph{June 30, 2013}
+@subsubheading LilyPond 2.17.22 released! @emph{July 14, 2013}
-We are happy to announce the release of LilyPond 2.17.21. This
+We are happy to announce the release of LilyPond 2.17.22. This
release contains the usual number of bugfixes and enhancements, and contains
some work in progress. You will have access to the very latest features, but
some may be incomplete, and you may encounter bugs and crashes. If you require
a stable version of Lilypond, we recommend using the 2.16 version.
+This update cures the issue with the Windows version crashing with a problem
+with positioning text.
+
@newsEnd
@newsItem
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subsubheading LilyPond 2.17.21 released! @emph{June 30, 2013}
+
+We are happy to announce the release of LilyPond 2.17.21. This
+release contains the usual number of bugfixes and enhancements, and contains
+some work in progress. You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes. If you require
+a stable version of Lilypond, we recommend using the 2.16 version.
+
+@newsEnd
+
@newsItem
@subsubheading LilyPond 2.17.20 released! @emph{June 9, 2013}
# avoid 404s -- so that we can take action if any occur in /stats
+# Comment from Phil 9 July 2013 to allow tracking file through build
User-agent: *
Disallow: /doc/v1.6/
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=17
-PATCH_LEVEL=22
+PATCH_LEVEL=23
MY_PATCH_LEVEL=
VERSION_STABLE=2.16.2
-VERSION_DEVEL=2.17.21
+VERSION_DEVEL=2.17.22
(l (split-file-name file))
(dir (car l))
(base (cadr l)))
- (LilyPond-command-expand
- (concat (substring string 0 b)
- (shell-quote-argument (concat dir base))
- (let ((entry (assoc (substring string b e)
- LilyPond-expand-alist)))
- (if entry (cdr entry) ""))
- (substring string e))
- file))
+ (concat (substring string 0 b)
+ (shell-quote-argument (concat dir base))
+ (LilyPond-command-expand
+ (concat
+ (let ((entry (assoc (substring string b e)
+ LilyPond-expand-alist)))
+ (if entry (cdr entry) ""))
+ (substring string e))
+ file)))
string)))
(defun LilyPond-shell-process (name buffer command)
in scheme."
}
-#(define my-grob-descriptions '())
-
-#(define my-event-classes (ly:make-context-mod))
-
-defineEventClass =
-#(define-void-function (parser location class parent)
- (symbol? symbol?)
- (ly:add-context-mod
- my-event-classes
- `(apply
- ,(lambda (context class parent)
- (ly:context-set-property!
- context
- 'EventClasses
- (event-class-cons
- class
- parent
- (ly:context-property context 'EventClasses '()))))
- ,class ,parent)))
-
-\defineEventClass #'scheme-text-span-event #'span-event
+#(define-event-class 'scheme-text-span-event 'span-event)
#(define (add-grob-definition grob-name grob-entry)
(let* ((meta-entry (assoc-get 'meta grob-entry))
(set! meta-entry (assoc-set! meta-entry 'interfaces
ifaces-entry))
(set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
- (set! my-grob-descriptions
+ (set! all-grob-descriptions
(cons (cons grob-name grob-entry)
- my-grob-descriptions))))
+ all-grob-descriptions))))
#(add-grob-definition
'SchemeTextSpanner
\layout {
\context {
\Global
- \grobdescriptions #my-grob-descriptions
- #my-event-classes
+ \grobdescriptions #all-grob-descriptions
}
\context {
\Voice
\new Voice
{
- \unset Staff.minimumVerticalExtent
\override Score.RehearsalMark.font-size = #20
\slurDown c4 ( g4 c''4)
\layout{
\context{
\TabStaff
- \override TimeSignature.stencil = ##f
+ \omit TimeSignature
}
\context{
\TabVoice
\remove "Beam_engraver"
\remove "Stem_engraver"
- \override TupletBracket.number-visibility = ##f
+ \omit TupletNumber
}
}
Context *ctx = unsmob_context (context);
return ctx->events_below ()->self_scm ();
}
-
-LY_DEFINE (ly_make_event_class, "ly:make-event-class",
- 2, 0, 0, (SCM context, SCM type),
- "Make an event class (a list of types) from the given @var{type}"
- " within the global context containing @var{context}.")
-{
- LY_ASSERT_SMOB (Context, context, 1);
- LY_ASSERT_TYPE (ly_is_symbol, type, 2);
-
- Context *ctx = unsmob_context (context);
- return ctx->make_event_class (type);
-}
definition_mods_ = SCM_EOL;
event_source_ = 0;
events_below_ = 0;
- ancestor_lookup_ = SCM_UNDEFINED;
smobify_self ();
}
bool ok = true;
- if (val != SCM_EOL)
- ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+ ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+
if (ok)
set_property (sym, val);
}
void
Context::internal_send_stream_event (SCM type, Input *origin, SCM props[])
{
- Stream_event *e = new Stream_event (make_event_class (type), origin);
+ Stream_event *e = new Stream_event
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"), type),
+ origin);
for (int i = 0; props[i]; i += 2)
{
e->set_property (props[i], props[i + 1]);
return 0;
}
-SCM
-Context::make_event_class (SCM event_type)
-{
- if (SCM_UNBNDP (ancestor_lookup_))
- ancestor_lookup_ = get_global_context ()->ancestor_lookup_;
- return scm_hashq_ref (ancestor_lookup_, event_type, SCM_EOL);
-}
-
Output_def *
Context::get_output_def () const
{
if (me->events_below_)
scm_gc_mark (me->events_below_->self_scm ());
- scm_gc_mark (me->ancestor_lookup_);
-
return me->properties_scm_;
}
/* TODO: Remove Music code when it's no longer needed */
if (Music *m = unsmob_music (cause))
{
- cause = m->to_event (context ())->unprotect ();
+ cause = m->to_event ()->unprotect ();
}
if (e->get_property ("cause") == SCM_EOL
&& (unsmob_stream_event (cause) || unsmob_grob (cause)))
return;
}
- footnotify (info.grob (), mus->to_event (context ())->unprotect ());
+ footnotify (info.grob (), mus->to_event ()->unprotect ());
// This grob has exhausted its footnote
info.grob ()->set_property ("footnote-music", SCM_EOL);
else
globaldef->apply_default_property_operations (this);
- SCM p = get_property ("EventClasses");
-
- ancestor_lookup_ = scm_make_hash_table (scm_length (p));
- for (; scm_is_pair (p); p = scm_cdr (p))
- scm_hashq_set_x (ancestor_lookup_, scm_caar (p), scm_car (p));
-
default_child_ = ly_symbol2scm ("Score");
accepts_list_ = scm_list_1 (default_child_);
}
virtual Moment now_mom () const;
virtual Context *get_default_interpreter (string context_id = "");
- // It would make some sense to have the following just available in
- // a global context. It would be decidedly tricky, however, to have
- // it initialized before the constructor of its Context base class
- // was able to trigger garbage collection.
- SCM ancestor_lookup_;
- SCM make_event_class (SCM);
-
bool is_alias (SCM) const;
void add_alias (SCM);
void add_context (Context *trans);
#include "moment.hh"
#include "pitch.hh"
#include "prob.hh"
-#include "context.hh"
#define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
bool internal_is_music_type (SCM) const;
- Stream_event *to_event (Context *) const;
+ Stream_event *to_event () const;
DECLARE_SCHEME_CALLBACK (relative_callback, (SCM, SCM));
Pitch to_relative_octave (Pitch);
{
Real start_;
Real end_;
- Real start_height_;
+ Real y_intercept_;
Real slope_;
void precompute (Real start, Real start_height, Real end_height, Real end);
Real intersection_x (Building const &other) const;
void leading_part (Real chop);
bool conceals (Building const &other, Real x) const;
+ Real shift_to_intersect (Real x, Real y) const;
};
class Skyline
yyterminate ();
}
-<maininput>. {
+<maininput>{ANY_CHAR} {
while (include_stack_.size () > main_input_level_
&& close_input ())
;
bool
type_check_assignment (SCM sym, SCM val, SCM type_symbol)
{
- bool ok = true;
-
- /*
- Always succeeds.
-
-
- TODO: should remove #f from allowed vals?
- */
- if (val == SCM_EOL || val == SCM_BOOL_F)
- return ok;
// If undefined, some internal function caused it...should never happen.
assert (val != SCM_UNDEFINED);
scm_throw (ly_symbol2scm ("ly-file-failed"), scm_list_3 (ly_symbol2scm ("typecheck"),
sym, val));
- warning (_ ("doing assignment anyway"));
+ warning (_ ("skipping assignment"));
+ return false;
}
- else
+
+ /*
+ Always succeeds.
+
+
+ TODO: should remove #f from allowed vals?
+ */
+ if (val == SCM_EOL || val == SCM_BOOL_F)
+ return true;
+
+ if (val != SCM_EOL
+ && ly_is_procedure (type)
+ && scm_call_1 (type, val) == SCM_BOOL_F)
{
- if (val != SCM_EOL
- && ly_is_procedure (type)
- && scm_call_1 (type, val) == SCM_BOOL_F)
- {
- ok = false;
- SCM typefunc = ly_lily_module_constant ("type-name");
- SCM type_name = scm_call_1 (typefunc, type);
-
- warning (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
- ly_symbol2string (sym).c_str (),
- print_scm_val (val),
- ly_scm2string (type_name).c_str ()));
- progress_indication ("\n");
- }
+ SCM typefunc = ly_lily_module_constant ("type-name");
+ SCM type_name = scm_call_1 (typefunc, type);
+
+ warning (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
+ ly_symbol2string (sym).c_str (),
+ print_scm_val (val),
+ ly_scm2string (type_name).c_str ()));
+ progress_indication ("\n");
+ return false;
}
- return ok;
+ return true;
}
/* some SCM abbrevs
ES TODO: This method should probably be reworked or junked.
*/
Stream_event *
-Music::to_event (Context *c) const
+Music::to_event () const
{
SCM class_name = ly_camel_case_2_lisp_identifier (get_property ("name"));
if (!internal_is_music_type (class_name))
programming_error ("Not a music type");
- Stream_event *e = new Stream_event (c->make_event_class (class_name),
- mutable_property_alist_);
+ Stream_event *e = new Stream_event
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"), class_name),
+ mutable_property_alist_);
Moment length = get_length ();
if (length.to_bool ())
e->set_property ("length", length.smobbed_copy ());
for (; scm_is_pair (art_mus); art_mus = scm_cdr (art_mus))
{
Music *m = unsmob_music (scm_car (art_mus));
- art_ev = scm_cons (m->to_event (c)->unprotect (), art_ev);
+ art_ev = scm_cons (m->to_event ()->unprotect (), art_ev);
}
e->set_property ("articulations", scm_reverse_x (art_ev, SCM_EOL));
}
void
Music::send_to_context (Context *c)
{
- Stream_event *ev = to_event (c);
+ Stream_event *ev = to_event ();
c->event_source ()->broadcast (ev);
ev->unprotect ();
}
if (!mmrest_event_)
{
mmrest_event_ = new Stream_event
- (handles_[in].get_context ()->make_event_class
- (ly_symbol2scm ("multi-measure-rest-event")));
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
+ ly_symbol2scm ("multi-measure-rest-event")));
mmrest_event_->set_property ("duration", SCM_EOL);
mmrest_event_->unprotect ();
}
if (playing_state_ != UNISONO
&& newstate == UNISONO)
{
- Context *out = (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
- ->get_outlet ();
if (!unisono_event_)
{
unisono_event_ = new Stream_event
- (out->make_event_class (ly_symbol2scm ("unisono-event")));
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
+ ly_symbol2scm ("unisono-event")));
unisono_event_->unprotect ();
}
+ Context *out = (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
+ ->get_outlet ();
out->event_source ()->broadcast (unisono_event_);
playing_state_ = UNISONO;
}
if (!solo_one_event_)
{
solo_one_event_ = new Stream_event
- (first_iter_->get_outlet ()->make_event_class
- (ly_symbol2scm ("solo-one-event")));
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
+ ly_symbol2scm ("solo-one-event")));
solo_one_event_->unprotect ();
}
if (!solo_two_event_)
{
solo_two_event_ = new Stream_event
- (second_iter_->get_outlet ()->make_event_class
- (ly_symbol2scm ("solo-two-event")));
+ (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
+ ly_symbol2scm ("solo-two-event")));
solo_two_event_->unprotect ();
}
descend_to_bottom_context ();
Context *c = get_outlet ();
- Stream_event *ev = get_music ()->to_event (c);
+ Stream_event *ev = get_music ()->to_event ();
SCM arts = ev->get_property ("articulations");
if (scm_is_pair (arts))
assert (!isinf (slope_) && !isnan (slope_));
if (isinf (start))
- assert (start_height == end_height);
-
- start_height_ = start_height;
+ {
+ assert (start_height == end_height);
+ y_intercept_ = start_height;
+ }
+ else
+ y_intercept_ = start_height - slope_ * start;
}
-// Because of the way slope is calculated as a ratio of usually small
-// differences, its precision is not sufficient for extrapolating
-// significantly from the original interval. For that reason, we
-// don't store the y0 value that would allow more precalculation by using
-// y = x * slope + y0
-// rather than
-// y = (x - xstart) * slope + ystart
-
inline Real
Building::height (Real x) const
{
- return (isinf (x) || isinf (start_)) ? start_height_
- : slope_ * (x - start_) + start_height_;
+ return isinf (x) ? y_intercept_ : slope_ * x + y_intercept_;
}
void
Building::print () const
{
- printf ("%f (x - x0) + %f from %f to %f\n", slope_, start_height_, start_, end_);
+ printf ("%f x + %f from %f to %f\n", slope_, y_intercept_, start_, end_);
}
inline Real
Building::intersection_x (Building const &other) const
{
- Real ret = start_
- - (other.start_height_ - start_height_
- - other.slope_ * (other.start_ - start_))
- /(other.slope_ - slope_);
- /* A numerically symmetric version would be
- x = (x1+x0)/2 - (y1-y0 - (s1+s0)(x1-x0)/2)/(s1-s0)
- */
+ Real ret = (y_intercept_ - other.y_intercept_) / (other.slope_ - slope_);
return isnan (ret) ? -infinity_f : ret;
}
end_ = chop;
}
+// Returns a shift s such that (x + s, y) intersects the roof of
+// this building. If no such shift exists, returns infinity_f.
+Real
+Building::shift_to_intersect (Real x, Real y) const
+{
+ // Solve for s: y = (x + s)*m + b
+ Real ret = (y - y_intercept_ - slope_ * x) / slope_;
+
+ if (ret >= start_ && ret <= end_ && !isinf (ret))
+ return ret;
+ return infinity_f;
+}
+
static Real
first_intersection (Building const &b, list<Building> *const s, Real start_x)
{
// conceals and intersection_x involve multiplication and
// division. Avoid that, if we can.
- if (c.start_height_ == -infinity_f)
+ if (c.y_intercept_ == -infinity_f)
{
if (c.end_ > b.end_)
return b.end_;
return b.end_;
}
-// conceals returns true if *this is strictly above other at x
-
bool
Building::conceals (Building const &other, Real x) const
{
- return height (x) > other.height (x);
+ if (slope_ == other.slope_)
+ return y_intercept_ > other.y_intercept_;
+
+ /* their slopes were not equal, so there is an intersection point */
+ Real i = intersection_x (other);
+ return (i <= x && slope_ > other.slope_)
+ || (i > x && slope_ < other.slope_);
}
// Remove redundant empty buildings from the skyline.
for (i = buildings_.begin (); i != buildings_.end (); i++)
{
- if (last_empty && i->start_height_ == -infinity_f)
+ if (last_empty && i->y_intercept_ == -infinity_f)
{
list<Building>::iterator last = i;
last--;
buildings_.erase (i);
i = last;
}
- last_empty = (i->start_height_ == -infinity_f);
+ last_empty = (i->y_intercept_ == -infinity_f);
}
assert (buildings_.front ().start_ == -infinity_f);
for (right = buildings_.begin (); right != buildings_.end (); right++)
{
- if (center != buildings_.begin () && center->start_height_ == -infinity_f)
+ if (center != buildings_.begin () && center->y_intercept_ == -infinity_f)
{
Real p1 = left->height (left->end_);
- Real p2 = right->start_height_;
+ Real p2 = right->height (right->start_);
*center = Building (center->start_, p1, p2, center->end_);
left = center;
// Optimization: if the other skyline is empty at this point,
// we can avoid testing some intersections. Just grab as many
// buildings from s1 as we can, and shove them onto the output.
- if (c.start_height_ == -infinity_f
+ if (c.y_intercept_ == -infinity_f
&& c.end_ >= b.end_)
{
list<Building>::iterator i = s1->begin ();
while (i != s1->end () && i->end_ <= c.end_)
i++;
- s1->front ().start_height_ = s1->front ().height (x);
s1->front ().start_ = x;
result->splice (result->end (), *s1, s1->begin (), i);
x = result->back ().end_;
Real end = first_intersection (b, s2, x);
if (s2->empty ())
{
- b.start_height_ = b.height (last_end);
b.start_ = last_end;
result->push_back (b);
break;
if (end >= x)
{
b.leading_part (end);
- b.start_height_ = b.height (last_end);
b.start_ = last_end;
last_end = b.end_;
result->push_back (b);
while (i != buildings->end ())
{
Real x1 = i->start_;
- Real y1 = i->start_height_;
+ Real y1 = i->height (i->start_);
Real x2 = i->end_;
Real y2 = i->height (i->end_);
bool operator () (Building const &b1, Building const &b2)
{
return b1.start_ < b2.start_
- || (b1.start_ == b2.start_ && b1.start_height_ > b2.start_height_);
+ || (b1.start_ == b2.start_ && b1.height (b1.start_) > b2.height (b1.start_));
}
};
{
list<Building>::iterator end = buildings_.end ();
for (list<Building>::iterator i = buildings_.begin (); i != end; i++)
- i->start_height_ += sky_ * r;
+ i->y_intercept_ += sky_ * r;
}
void
{
i->start_ += s;
i->end_ += s;
+ i->y_intercept_ -= s * i->slope_;
}
}
{
if (i->start_ > -infinity_f)
{
- Real height = i->start_height_;
+ Real height = i->height (i->start_);
if (height > -infinity_f)
{
// Add the sloped building that pads the left side of the current building.
list<Building>::const_iterator i;
for (i = buildings_.begin (); i != buildings_.end (); ++i)
{
- ret = max (ret, i->start_height_);
+ ret = max (ret, i->height (i->start_));
ret = max (ret, i->height (i->end_));
}
{
for (list<Building>::const_iterator i (buildings_.begin ());
i != buildings_.end (); i++)
- if (i->start_height_ > -infinity_f)
+ if (i->y_intercept_ > -infinity_f)
return i->start_;
return infinity_f;
{
for (list<Building>::const_reverse_iterator i (buildings_.rbegin ());
i != buildings_.rend (); ++i)
- if (i->start_height_ > -infinity_f)
+ if (i->y_intercept_ > -infinity_f)
return i->end_;
return -infinity_f;
Skyline::set_minimum_height (Real h)
{
Skyline s (sky_);
- s.buildings_.front ().start_height_ = h * sky_;
+ s.buildings_.front ().y_intercept_ = h * sky_;
merge (s);
}
if (!buildings_.size ())
return true;
Building b = buildings_.front ();
- return b.end_ == infinity_f && b.start_height_ == -infinity_f;
+ return b.end_ == infinity_f && b.y_intercept_ == -infinity_f;
}
void
\defaultchild "Score"
\description "Hard coded entry point for LilyPond. Cannot be tuned."
\grobdescriptions #all-grob-descriptions
- EventClasses = #all-event-classes
}
\context {
\accepts Score
\defaultchild Score
\description "Hard coded entry point for LilyPond. Cannot be tuned."
- EventClasses = #all-event-classes
}
\context {
TELY_FILES := $(call src-wildcard,*.tely)
TEXI_FILES := $(call src-wildcard,*.texi)
-MASTER_TEXI_FILES := $(TEXI_FILES) $(TELY_FILES:%.tely=$(outdir)/%.texi)
+MASTER_TEXI_FILES := $(TEXI_FILES:%=$(outdir)/%) $(TELY_FILES:%.tely=$(outdir)/%.texi)
TEXINFO_MANUALS =\
$(TELY_FILES:%.tely=%)\
$(DO_TEXI_DEP) $(EXTRACT_TEXI_FILENAMES) --split=node $<
# Build the English website
-$(OUT)/index.html: $(top-src-dir)/Documentation/web.texi $(xref-files)
+$(OUT)/index.html: $(top-src-dir)/Documentation/web.texi $(version-files) $(xref-files)
$(DO_TEXI_DEP) $(TEXI2HTML) $<
# Build translated websites
$(eval $(foreach l,$(WEB_LANGS),\
-$(eval $(OUT)/$(l)/index.html: $(top-src-dir)/Documentation/$(l)/web.texi $(xref-files); \
+$(eval $(OUT)/$(l)/index.html: $(top-src-dir)/Documentation/$(l)/web.texi $(version-files) $(xref-files); \
$$(DO_TEXI_DEP) $$(TEXI2HTML) --lang="$(l)" $$<; ) \
))
set_char_box (r# + accreg_linethickness# / 2,
r# + accreg_linethickness# / 2,
- 0, 2 r# + 0.7 accreg_linethickness#);
+ 0.35 accreg_linethickness# / 2,
+ 2 r# + 0.35 accreg_linethickness# / 2);
+
+ local_copy (transform)(currenttransform);
+ currenttransform :=
+ currenttransform shifted (0, -vround (0.35 accreg_linethickness));
lh = vround (2/3 r);
lt = vround (0.7 accreg_linethickness);
set_char_box (r# + accreg_linethickness# / 2,
r# + accreg_linethickness# / 2,
- 0, 2 r# + 0.7 accreg_linethickness#);
+ 0.35 accreg_linethickness#,
+ 2 r# + 0.35 accreg_linethickness#);
+
+ local_copy (transform)(currenttransform);
+ currenttransform :=
+ currenttransform shifted (0, -vround (0.35 accreg_linethickness));
lh = vround r;
lt = vround (0.7 accreg_linethickness);
set_char_box (r# + accreg_linethickness# / 2,
r# + accreg_linethickness# / 2,
- 0, 2 r# + 0.7 accreg_linethickness#);
+ 0.35 accreg_linethickness#,
+ 2 r# + 0.35 accreg_linethickness#);
+
+ local_copy (transform)(currenttransform);
+ currenttransform :=
+ currenttransform shifted (0, -vround (0.35 accreg_linethickness));
lh = vround (1/2 r);
lt = vround (0.7 accreg_linethickness);
set_char_box (accreg_lh# + accreg_linethickness# / 2,
accreg_lh# + accreg_linethickness# / 2,
- 0, 3 accreg_lh# + accreg_linethickness#);
+ 0.5 accreg_linethickness#,
+ 3 accreg_lh# + 0.5 accreg_linethickness#);
+
+ local_copy (transform)(currenttransform);
+ currenttransform :=
+ currenttransform shifted (0, -vround (0.5 accreg_linethickness));
h := 3 lh + lt;
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.17.21\n"
+"Project-Id-Version: lilypond 2.17.22\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2013-06-30 16:32+0100\n"
+"POT-Creation-Date: 2013-07-14 10:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "removing this vertical group"
msgstr ""
-#: axis-group-interface.cc:706
+#: axis-group-interface.cc:704
#, c-format
msgid "\"%s\" is not a valid outside-staff-placement-directive"
msgstr ""
-#: axis-group-interface.cc:777
+#: axis-group-interface.cc:774
msgid "an outside-staff object should have a direction, defaulting to up"
msgstr ""
msgid "need symbol arguments for \\override and \\revert"
msgstr ""
-#: context.cc:150
+#: context.cc:149
#, c-format
msgid "cannot find or create new `%s'"
msgstr ""
-#: context.cc:229
+#: context.cc:228
#, c-format
msgid "cannot find or create `%s' called `%s'"
msgstr ""
-#: context.cc:426
+#: context.cc:425
#, c-format
msgid "cannot find or create: `%s'"
msgstr ""
msgid "`~a' failed (~a)\n"
msgstr ""
-#: backend-library.scm:90
+#: backend-library.scm:93
#, scheme-format
msgid "Converting to `~a'...\n"
msgstr ""
#. Do not try to guess the name of the png file,
#. GS produces PNG files like BASE-page%d.png.
-#: backend-library.scm:99
+#: backend-library.scm:102
#, scheme-format
msgid "Converting to ~a..."
msgstr ""
-#: backend-library.scm:137
+#: backend-library.scm:140
#, scheme-format
msgid "Writing header field `~a' to `~a'..."
msgstr ""
-#: backend-library.scm:187
+#: backend-library.scm:190
#, scheme-format
msgid "missing stencil expression `~S'"
msgstr ""
msgid "unknown parent class `~a'"
msgstr ""
+#: define-event-classes.scm:107
+#, scheme-format
+msgid "Cannot redefine event class `~S'"
+msgstr ""
+
+#: define-event-classes.scm:109
+#, scheme-format
+msgid "Undefined parent event class `~S'"
+msgstr ""
+
#: define-markup-commands.scm:985
msgid "no systems found in \\score markup, does it have a \\layout block?"
msgstr ""
(apply translator-property-description x))
`(
- (EventClasses ,cheap-list? "The initial list of event classes.")
(associatedVoiceContext ,ly:context? "The context object of the
@code{Voice} that has the melody for this @code{Lyrics}.")
(acons elt lineage alist))
classlist class))))
+(define all-event-classes
+ (fold (lambda (elt classlist)
+ (event-class-cons (cdr elt) (car elt) classlist))
+ '() event-classes))
+
+;; Maps event-class to a list of ancestors (inclusive)
+(define ancestor-lookup (make-hash-table (length all-event-classes)))
+
+(define (ancestor-lookup-initialize)
+ (hash-clear! ancestor-lookup)
+ (for-each (lambda (ent) (hashq-set! ancestor-lookup (car ent) ent))
+ all-event-classes))
+
+(ancestor-lookup-initialize)
+(call-after-session ancestor-lookup-initialize)
+
;; Each class will be defined as
;; (class parent grandparent .. )
;; so that (eq? (cdr class) parent) holds.
+(define-public (define-event-class class parent)
+ "Defines a new event @code{class} derived from @code{parent}, a
+previously defined event class."
+ (let ((parentclass (ly:make-event-class parent)))
+ (cond
+ ((ly:make-event-class class)
+ (ly:error (_ "Cannot redefine event class `~S'") class))
+ ((not parentclass)
+ (ly:error (_ "Undefined parent event class `~S'" parentclass)))
+ (else
+ (hashq-set! ancestor-lookup
+ class
+ (cons class parentclass))))
+ *unspecified*))
+
+;; TODO: Allow entering more complex classes, by taking unions.
+(define-public (ly:make-event-class leaf)
+ (hashq-ref ancestor-lookup leaf))
+
(define-public (ly:in-event-class? ev cl)
"Does event @var{ev} belong to event class @var{cl}?"
(memq cl (ly:event-property ev 'class)))
-(define-public all-event-classes
- (fold (lambda (elt classlist)
- (event-class-cons (cdr elt) (car elt) classlist))
- '() event-classes))
-
;; does this exist in guile already?
(define (map-tree f t)
(cond
;; TODO: junk the meta field in favor of something more compact?
-(define-public all-grob-descriptions
+(define-session-public all-grob-descriptions
`(
(Accidental
. (
;;;; You should have received a copy of the GNU General Public License
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-(define doc-context (ly:make-global-context $defaultlayout))
-
(define (music-props-doc)
(make <texi-node>
#:name "Music properties"
(define music-types->names (make-hash-table 61))
(filter-map (lambda (entry)
(let* ((class (ly:camel-case->lisp-identifier (car entry)))
- (classes (ly:make-event-class doc-context class)))
+ (classes (ly:make-event-class class)))
(if classes
(map
(lambda (cl)
(let* ((namesym (car obj))
(props (cdr obj))
(class (ly:camel-case->lisp-identifier namesym))
- (classes (ly:make-event-class doc-context class))
+ (classes (ly:make-event-class class))
(accept-list (if classes
(human-listify
(map ref-ify