@uref{http://foundation.gnome.org/legal/} board members pledge
to keep certain matters confidential
-every security team of every linux distribution and OS
+every security team of every GNU/Linux distribution and OS
@end example
In fact, Karl Fogel's @qq{Producing Open Source Software}
One little feature to notice here - these are all absolute file
locations - the line prior to this used relative locations. And
-none of these files exist, either. (Further note - I'm assuming
-all these lines of make I'm following are autogenerated, but
-that'll be something else to discover.)
+none of these files exist, either.
+
+(Further note - I'm assuming all these lines of make I'm following are
+autogenerated, but that'll be something else to discover.)
+
+JM: @emph{``No, these lines are not useful in LilyPond (this is why
+you think they are autogenerated), but they are part of StepMake,
+which was meant to be a package to be installed as a build system over
+autoconf/make in software project source trees.''}
Next in @file{stepmake.make}:
@example
$(outdir)/%.ly: %.lym4
- $(M4) $< | sed "s/\`/,/g" > $@
+ $(M4) $< | sed "s/\`/,/g" > $@@
$(outdir)/%: %.in
- rm -f $@
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ rm -f $@@
+ cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@@
@end example
I believe the first rule is for *.ly files, and has a prerequisite
stepmake/stepmake/generic-vars.make has this:
@smallexample
-LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
+LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@@ &&) true
@end smallexample
-$@ is the name of the target - WWW-1 in this case.
+$@@ is the name of the target - WWW-1 in this case.
In GNUmakefile.in we find:
(From the make manual:
-To this end, after reading in all makefiles, make will consider each as a goal target and
-attempt to update it. If a makefile has a rule which says how to update it (found either
-in that very makefile or in another one) or if an implicit rule applies to it (see Chapter 10
-[Using Implicit Rules], page 103), it will be updated if necessary. After all makefiles have
-been checked, if any have actually been changed, make starts with a clean slate and reads
-all the makefiles over again. (It will also attempt to update each of them over again, but
-normally this will not change them again, since they are already up to date.)
+To this end, after reading in all makefiles, make will consider each
+as a goal target and attempt to update it. If a makefile has a rule
+which says how to update it (found either in that very makefile or in
+another one) or if an implicit rule applies to it (see Chapter 10
+[Using Implicit Rules], page 103), it will be updated if
+necessary. After all makefiles have been checked, if any have actually
+been changed, make starts with a clean slate and reads all the
+makefiles over again. (It will also attempt to update each of them
+over again, but normally this will not change them again, since they
+are already up to date.)
So my assumption seems correct)
"
@end example
-@noindent
-Then, you should get these translated strings into compiled snippets in
-@file{Documentation/snippets}, see @q{General guidelines} in @ref{Adding
-and editing snippets}.
-
@code{@@example} blocks need not be verbatim copies, e.g. variable
names, file names and comments should be translated.
considered to function successfully.
Developers on Windows who are unable to build LilyPond should
-get help from a Linux or OSX developer to do the make tests.
+get help from a GNU/Linux or OSX developer to do the make tests.
@node Verify regression tests
@node LilyDev
@section LilyDev
-There is a disk image of a @q{remix} of Ubuntu Linux available for
+There is a disk image of a @q{remix} of Ubuntu GNU/Linux available for
download which includes all the necessary software and tools to compile
both LilyPond and the documentation. Called the
@qq{Ubuntu LilyPond Developer Remix}, but known simply as @qq{LilyDev}
and extremely difficult on MacOS, LilyDev can be installed and run
inside a @q{virtual machine} on any of these operating systems without
disturbing your main operating system. The LilyDev disk image can also
-be burnt to a DVD and installed like any other Ubuntu Linux
+be burnt to a DVD and installed like any other Ubuntu GNU/Linux
distribution.
Most virtualization software can be used but we recommend VirtualBox as
it is available for all major operating systems and is easy to install
& configure.
-If you are not familiar with Linux, it may be beneficial to read a
+If you are not familiar with GNU/Linux, it may be beneficial to read a
couple of @qq{introduction to Ubuntu} web pages.
Some contributors have recommended a free PDF:
@end example
To configure an environment variable in bash (the default for most
-Linux distributions),
+GNU/Linux distributions),
@example
export LILYPOND_WEB_MEDIA_GIT=$HOME/dir/of/lilypond-extra/
of this directory depends (a) on whether you obtained LilyPond
by downloading a precompiled binary from lilypond.org
or whether you installed it from a package manager (i.e.
-distributed with Linux, or installed under fink or cygwin) or
+distributed with GNU/Linux, or installed under fink or cygwin) or
compiled it from source, and (b) on which operating system it is
being used:
@strong{Downloaded from lilypond.org}
@itemize @bullet
-@item Linux
+@item GNU/Linux
Navigate to
@example
@funindex \set
@funindex set
+When automatic beaming is enabled, the placement of automatic beams
+is determined by three context properties:
+@code{baseMoment}, @code{beatStructure}, and @code{beamExceptions}.
+If a @code{beamExceptions} rule is defined for the time signature in
+force, that rule is used to determine the beam placement. If no
+@code{beamExceptions} rule is defined for the time signature in force,
+the beam placement is determined by the settings of @code{baseMoment}
+and @code{beatStructure}.
+
+By default, @code{beamExceptions} rules are defined for most common
+time signatures, so the @code{beamException} rules must be disabled
+if automatic beaming is to be based on @code{baseMoment} and
+@code{beatStructure}. The @code{beamExceptions} rules are disabled
+by
+
+@example
+\set Timing.beamExceptions = #'()
+@end example
+
+
+@subsubheading @i{Beaming based on @code{baseMoment} and @code{beatStructure}}
+
In most instances, automatic beams will end at the end of a beat.
The ending points for beats are determined by the context properties
@code{baseMoment} and @code{beatStructure}. @code{beatStructure}
c16^"(3+2)" c c c c |
@end lilypond
+If a common time signature is being used, @code{beamExceptions}
+@emph{must} be disabled to enable @code{beatStructure} to work.
+The @code{\set Timing.beamExceptions = #'()} command can always
+be included if beaming is being determined by @code{beatStructure}.
+
+@lilypond[quote,relative=2,verbatim]
+\time 4/4
+a8^"default" a a a a a a a
+
+\set Timing.baseMoment = #(ly:make-moment 1 4)
+\set Timing.beatStructure = #'(1 1 1 1)
+a8^"no change" a a a a a a a
+
+\set Timing.beamExceptions = #'()
+\set Timing.baseMoment = #(ly:make-moment 1 4)
+\set Timing.beatStructure = #'(1 1 1 1)
+a8^"changed" a a a a a a a
+@end lilypond
+
Beam setting changes can be limited to specific contexts. If no
setting is included in a lower-level context, the setting of the
enclosing context will apply.
the time signature. Any exceptions to this default can be found in
@file{scm/time-signature-settings.scm}.
+@subsubheading @i{Beaming based on @code{beamExceptions}}
+
Special autobeaming rules (other than ending a beam on a beat)
are defined in the @code{beamExceptions} property.
r4. a8 a a |
@end lilypond
-@i{@strong{How automatic beaming works}}
+@subsubheading @i{How automatic beaming works}
When automatic beaming is enabled, the placement of automatic beams
is determined by the context properties
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "percussion, preparing-parts, really-simple, rhythms, specific-notation"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "world-music"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "expressive-marks, really-cool, scheme-language, text"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "contexts-and-engravers, midi, real-music"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.42"
+\version "2.15.43"
\header {
lsrtags = "fretted-strings"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "chords, simultaneous-notes, workaround"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "editorial-annotations, scheme-language, tweaks-and-overrides"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "pitches, really-cool, scheme-language"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "contemporary-notation, percussion, real-music, rhythms"
piano-template-simple.ly
piano-template-with-centered-lyrics.ly
piano-template-with-melody-and-lyrics.ly
+using-autochange-with-more-than-one-voice.ly
vocal-ensemble-template-with-automatic-piano-reduction.ly
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "contemporary-notation, editorial-annotations, vocal-music, workaround"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "text"
separating-key-cancellations-from-key-signature-changes.ly
transposing-pitches-with-minimum-accidentals-smart-transpose.ly
tweaking-clef-properties.ly
+using-autochange-with-more-than-one-voice.ly
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "winds"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "headword"
time-signature-in-parentheses.ly
tweaking-clef-properties.ly
use-square-bracket-at-the-start-of-a-staff-group.ly
+using-autochange-with-more-than-one-voice.ly
volta-below-chords.ly
volta-multi-staff.ly
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "paper-and-layout"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "rhythms, tweaks-and-overrides"
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.15.40"
+\version "2.15.43"
\header {
lsrtags = "headword"
--- /dev/null
+%% 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.
+\version "2.14.2"
+
+\header {
+ lsrtags = "keyboards, pitches, staff-notation"
+
+ texidoc = "
+Using @code{autochange} with more than one voice.
+
+"
+ doctitle = "Using autochange with more than one voice"
+} % begin verbatim
+
+\score
+{
+ \new PianoStaff
+ <<
+ \new Staff = "up" {
+ <<
+ \set Timing.beamExceptions = #'()
+ \set Timing.beatStructure = #'(4)
+ \new Voice {
+ \voiceOne
+ \autochange
+ \relative c' {
+ g8 a b c d e f g
+ g,8 a b c d e f g
+ }
+ }
+
+ \new Voice {
+ \voiceTwo
+ \autochange
+ \relative c' {
+ g8 a b c d e f g
+ g,,8 a b c d e f g
+ }
+ }
+ >>
+ }
+
+ \new Staff = "down" {
+ \clef bass
+ }
+ >>
+}
Setting up the server to run LilyPond in a chroot jail is a complicated
task. The steps are listed below. Examples in the steps are from
-Ubuntu Linux, and may require the use of @code{sudo} as appropriate.
+Ubuntu GNU/Linux, and may require the use of @code{sudo} as appropriate.
@itemize
can do.
The commands to define rules in a makefile differ
-according to platform; for instance the various forms of Linux and
+according to platform; for instance the various forms of GNU/Linux and
MacOS use @code{bash}, while Windows uses @code{cmd}. Note that on
MacOS X, you need to configure the system to use the command-line
interpreter. Here are some example makefiles, with versions for both
-Linux/MacOS and Windows.
+GNU/Linux/MacOS and Windows.
The first example is for an orchestral work in four
movements with a directory structure as follows:
@c ref is duplicated to avoid underlining ref as image.
@ref{Unix, @sourceimage{logo-linux,,,}
@sourceimage{logo-freebsd,,,}}
-@ref{Unix, Unix (Linux and FreeBSD)}
+@ref{Unix, Unix (GNU/Linux and FreeBSD)}
@item
@ref{MacOS X, @sourceimage{logo-macosx,,,}}
Frescobaldi is lightweight, yet powerful LilyPond music and text editor
with a built-in PDF viewer. It is easy to use and will run on all major
-operating systems (Linux, Mac OS X and Windows).
+operating systems (GNU/Linux, Mac OS X and Windows).
@divEnd
@c used for news about the upcoming release; see CG 10.2
+@newsItem
+@subsubheading Lilypond 2.15.95 released! @emph{August 11, 2012}
+
+We are excited to announce the release of LilyPond 2.15.95.
+With this release, development on version 2.15 is frozen for the
+upcoming 2.16 stable release and only open to bug fixes.
+
+All users are urged to try this version to ensure the best
+quality of the upcoming stable release. If you discover any
+problems, please send us @ref{Bug reports}.
+
+New features since 2.14.2 are listed in the @qq{Changes} manual
+on the website section about @ref{Development}.
+
+@newsEnd
+
@newsItem
@subsubheading LilyPond 2.15.42 released! @emph{August 02, 2012}
warmly encouraged!
@newsEnd
-
-
-@newsItem
-@subsubheading Release candidate withdrawn @emph{July 11, 2012}
-
-We have discovered a regression since 2.14.2, so lilypond 2.15.41
-is no longer a candidate for the 2.16.0 release. However, please
-continue testing it -- we would like to discover (and fix!) any
-more regressions as soon as possible. If you discover any
-problems, please send us @ref{Bug reports}.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading Release candidate 8 of 2.16 - LilyPond 2.15.41 released! @emph{July 4, 2012}
-
-LilyPond 2.15.41 is out; this is the eighth release candidate of
-the upcoming 2.16 stable release. All users are invited to
-experiment with this version. New features since 2.14.2 are
-listed in the @qq{Changes} manual on the website section about
-@ref{Development}.
-
-There are no known Critical issues with this release. If no
-Critical bugs are found, then the official 2.16.0 release will be
-on 18 July 2012. If you discover any problems, please send us
-@ref{Bug reports}.
-
-@newsEnd
@end ignore
+@newsItem
+@subsubheading Release candidate withdrawn @emph{July 11, 2012}
+
+We have discovered a regression since 2.14.2, so lilypond 2.15.41
+is no longer a candidate for the 2.16.0 release. However, please
+continue testing it -- we would like to discover (and fix!) any
+more regressions as soon as possible. If you discover any
+problems, please send us @ref{Bug reports}.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading Release candidate 8 of 2.16 - LilyPond 2.15.41 released! @emph{July 4, 2012}
+
+LilyPond 2.15.41 is out; this is the eighth release candidate of
+the upcoming 2.16 stable release. All users are invited to
+experiment with this version. New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
+
+There are no known Critical issues with this release. If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 18 July 2012. If you discover any problems, please send us
+@ref{Bug reports}.
+
+@newsEnd
+
+
@newsItem
@subsubheading LilyPond 2.15.40 released! @emph{June 05, 2012}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=15
-PATCH_LEVEL=43
+PATCH_LEVEL=96
MY_PATCH_LEVEL=
VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.42
+VERSION_DEVEL=2.15.95
#define LEFT_and_RIGHT(d) \
Direction d = LEFT; d != CENTER; d = (d == LEFT ? RIGHT : CENTER)
-
/**
if d > 0: the max operator
if d < 0: the min operator
#include <sys/types.h>
#include <unistd.h>
-
int main (int argc, const char *argv[])
{
std::cout << "pid(" << getpid () << ")" << std::endl;
<g e>8( <es fis a> <d f b> <c e c'>) r8 r |
r8 c'( e,) f r a |
\once \override DynamicLineSpanner #'padding =#3
- r8 << { s8 s8 } << { fis(\> g)\!
+ r8 << { s8\> s8\! } << { fis( g)
} \\ { c,4 } >> >> r8 <e c g> <e c g> |
<d c a>4. r8 \clef bass <d b f> <d b f> |
e,16_" "_\markup { \bold\italic cresc. } g c g e g d gis b gis d gis |
--- /dev/null
+\version "2.15.42"
+\header {
+ texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test set-global-staff size 10 (with layout-set-staff-size)."
+}
+
+#(set-global-staff-size 10)
+
+\score {
+ <<
+ \context Staff = "s1" \with {
+ \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+ } {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #0.75
+ } {
+ s1 \bar ":|"
+ }
+ >>
+}
+
+\score {
+ <<
+ \context Staff = "s1" {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #2
+ \override StaffSymbol #'line-count = #4
+ } {
+ s1 \bar ":|"
+ }
+ >>
+
+ \layout {
+ #(layout-set-staff-size 30)
+ }
+}
--- /dev/null
+\version "2.15.42"
+\header {
+ texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test set-global-staff size 30 (with layout-set-staff-size)."
+}
+
+#(set-global-staff-size 30)
+
+\score {
+ <<
+ \context Staff = "s1" \with {
+ \override StaffSymbol #'staff-space = #0.65
+ } {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #0.7
+ \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+ } {
+ s1 \bar ":|"
+ }
+ >>
+}
+
+\score {
+ <<
+ \context Staff = "s1" \with {
+ \override StaffSymbol #'staff-space = #0.25
+ } {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #0.3
+ \override StaffSymbol #'line-count = #4
+ } {
+ s1 \bar ":|"
+ }
+ >>
+
+ \layout {
+ #(layout-set-staff-size 10)
+ }
+}
--- /dev/null
+\version "2.15.42"
+\header {
+ texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test layout-set-staff-size."
+}
+
+\score {
+ <<
+ \context Staff = "s1" \with {
+ \override StaffSymbol #'staff-space = #0.4
+ } {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #0.5
+ } {
+ s1 \bar ":|"
+ }
+ >>
+
+ \layout {
+ #(layout-set-staff-size 10)
+ }
+}
+
+\score
+{
+ <<
+ \context Staff = "s1" \with {
+ \override StaffSymbol #'staff-space = #0.7
+ } {
+ s1 \bar ":|"
+ }
+
+ \context Staff = "s2" \with {
+ \override StaffSymbol #'staff-space = #0.75
+ } {
+ s1 \bar ":|"
+ }
+ >>
+}
--- /dev/null
+\version "2.15.42"
+\header {
+ texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves."
+}
+
+
+mus = \context Voice { \relative f' { d e f g \bar ":|" } }
+
+\new Staff {
+ <<
+ \mus
+ \context Voice { s1^"standard staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-6 -4 -2 0 2)
+} {
+ <<
+ \clef french
+ \mus
+ \context Voice { s1^"excentric staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-count = #4
+} {
+ <<
+ \mus
+ \context Voice { s1^"standard four-line staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-2 0 2 4)
+} {
+ <<
+ \mus
+ \context Voice { s1^"excentric four-line staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-7 -4)
+} {
+ <<
+ \clef french
+ \mus
+ \context Voice { s1^"very excentric staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'staff-space = #1.5
+ \override StaffSymbol #'line-positions = #'(-2 0)
+} {
+ <<
+ \mus
+ \context Voice { s1^"as wide as previous" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-2.9 -2)
+} {
+ <<
+ \mus
+ \context Voice { s1^"narrow staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-4 -3 -2)
+} {
+ <<
+ \mus
+ \context Voice { s1^"dense staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-4 -3 -2)
+ \override StaffSymbol #'staff-space = #0.8
+} {
+ <<
+ \mus
+ \context Voice { s1^"denser staff" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-6 -2 0 5)
+} {
+ <<
+ \mus
+ \context Voice { s1^"irregular staff, standard spacing" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-4 -2 -1)
+ \override StaffSymbol #'staff-space = #1.5
+} {
+ <<
+ \mus
+ \context Voice { s1^"irregular staff, nonstandard spacing" }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'thickness = #4
+} {
+ <<
+ \clef french
+ \mus
+ \context Voice {
+ s1^"thick-lined staff"
+ }
+ >>
+}
+
+\new Staff \with {
+ \override StaffSymbol #'line-positions = #'(-2)
+} {
+ <<
+ \mus
+ \context Voice { s1^"single line staff (zero height)" }
+ >>
+}
+
+\new Staff {
+ \stopStaff
+ <<
+ \mus
+ \context Voice { s1^"no staff" }
+ >>
+}
}
\version "2.15.32"
+#(ly:expect-warning (_ "(De)crescendo with unspecified starting volume in MIDI."))
+#(ly:expect-warning (_ "(De)crescendo with unspecified starting volume in MIDI."))
ignoreMelisma = \set ignoreMelismata = ##t
ignoreMelismaOff = \unset ignoreMelismata
\override StaffSymbol #'staff-space = #0
} {
\relative c' {
- c1
+ c1 \bar ":|"
}
}
return;
}
- Real delta_v = grow_dir_ * 0.1;
-
Real start_v = dynamics_[0]->volume_;
if (dynamics_.back ()->volume_ < 0)
- dynamics_.back ()->volume_ = max (min (start_v + grow_dir_ * 0.25, max_volume_), min_volume_);
+ {
+ // The dynamic spanner does not end with an explicit dynamic script
+ // event. Adjust the end volume by at most 1/4 of the available
+ // volume range in this case.
+ dynamics_.back ()->volume_ = max (min (start_v + grow_dir_ * (max_volume_ - min_volume_) * 0.25, max_volume_), min_volume_);
+ }
- delta_v = dynamics_.back ()->volume_ - dynamics_[0]->volume_;
+ Real delta_v = dynamics_.back ()->volume_ - dynamics_[0]->volume_;
Moment start = dynamics_[0]->get_column ()->when ();
// we need two translations: the normal one and
// the one of the lowest segment
- int idx[] = {i, extreme};
+ size_t idx[] = {i, extreme};
Real translations[2];
for (int j = 0; j < 2; j++)
Real shift = d * min (d * (beam_y - d * minimum_distance - rest_dim), 0.0);
shift /= staff_space;
- Real rad = Staff_symbol_referencer::line_count (rest) * staff_space / 2;
/* Always move discretely by half spaces */
shift = ceil (fabs (shift * 2.0)) / 2.0 * sign (shift);
+ Interval staff_span = Staff_symbol_referencer::staff_span (rest);
+ staff_span *= staff_space / 2;
+
/* Inside staff, move by whole spaces*/
- if ((rest_extent[d] + staff_space * shift) * d
- < rad
- || (rest_extent[-d] + staff_space * shift) * -d
- < rad)
+ if (staff_span.contains (rest_extent[d] + staff_space * shift)
+ || staff_span.contains (rest_extent[-d] + staff_space * shift))
shift = ceil (fabs (shift)) * sign (shift);
return scm_from_double (offset + staff_space * shift);
* more than half the size of the staff, such that the endings of
* the line are in the middle of a staff space.
*/
- int lines = Staff_symbol_referencer::line_count (me);
- int height = lines / 2; // little more than half of staff size
- if ((lines & 1) != (height & 1))
- height++; // ensure endings are centered in staff space
+ Interval ydim = Staff_symbol_referencer::staff_span (me);
+ ydim.widen (-0.25 * ydim.delta ());
+ for (UP_and_DOWN (i))
+ {
+ int const int_dim = (int) ydim[i];
+ if (int_dim == ydim[i]
+ && Staff_symbol_referencer::on_staff_line (me, int_dim))
+ ydim[i] += i;
+ }
+
+ ydim *= 1.0 / Staff_symbol_referencer::staff_space (me);
Interval xdim (0, thickness);
- Interval ydim (-0.5 * height, +0.5 * height);
Box b (xdim, ydim);
Stencil out = Lookup::round_filled_box (b, blotdiameter);
return out.smobbed_copy ();
{
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
- Real staff_size;
Real thickness = Staff_symbol_referencer::line_thickness (me);
thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
- if (Staff_symbol_referencer::get_staff_symbol (me))
- staff_size = (Staff_symbol_referencer::line_count (me) - 1) * staff_space;
- else
- staff_size = 0.0;
-
Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
// like a "|" type bar
Interval xdim (0, thickness);
- Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
+ Interval ydim = Staff_symbol_referencer::staff_span (me);
+ ydim *= staff_space / 2;
Box b (xdim, ydim);
Stencil out = Lookup::round_filled_box (b, blotdiameter);
return out.smobbed_copy ();
{
Grob *me = unsmob_grob (smob);
Real staff_space = Staff_symbol_referencer::staff_space (me);
- Real staff_size;
Real thickness = Staff_symbol_referencer::line_thickness (me);
thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
- if (Staff_symbol_referencer::get_staff_symbol (me))
- staff_size = (Staff_symbol_referencer::line_count (me) - 1) * staff_space;
- else
- staff_size = 0.0;
-
Real blotdiameter = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
// like a "||" type bar
Interval xdim (0, thickness);
- Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
+ Interval ydim = Staff_symbol_referencer::staff_span (me);
+ ydim *= staff_space / 2;
Box b (xdim, ydim);
Stencil line1 = Lookup::round_filled_box (b, blotdiameter);
Stencil line2 (line1);
if (unit)
{
Rational const now_unit = e->main_part_ / unit->main_part_;
- if (now_unit.den() > 1)
+ if (now_unit.den () > 1)
{
/*
within a unit - go to the end of that
*/
result = unit->main_part_
- * (Rational (1) - (now_unit - now_unit.trunc_rat ()));
+ * (Rational (1) - (now_unit - now_unit.trunc_rat ()));
}
else
{
}
LY_DEFINE (ly_context_mod_apply_x, "ly:context-mod-apply!",
- 2, 0, 0, (SCM context, SCM mod),
- "Apply the context modification @var{mod} to @var{context}.")
+ 2, 0, 0, (SCM context, SCM mod),
+ "Apply the context modification @var{mod} to @var{context}.")
{
LY_ASSERT_SMOB (Context, context, 1);
LY_ASSERT_SMOB (Context_mod, mod, 2);
apply_property_operations (unsmob_context (context),
- unsmob_context_mod (mod)->get_mods ());
+ unsmob_context_mod (mod)->get_mods ());
scm_remember_upto_here_1 (context);
return SCM_UNSPECIFIED;
}
}
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}.")
+ 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);
= to_dir (me->get_property ("neutral-direction"));
int pos = Staff_symbol_referencer::get_rounded_position (me);
- int sz = Staff_symbol_referencer::line_count (me) - 1;
string font_char = "custodes." + style + ".";
if (pos < neutral_pos)
font_char += "d";
if (adjust)
- font_char += (((pos ^ sz) & 0x1) == 0) ? "1" : "0";
+ font_char += Staff_symbol_referencer::on_line (me, pos) ? "1" : "0";
else
font_char += "2";
return scm_from_bool (result);
}
-
LY_DEFINE (ly_broadcast, "ly:broadcast",
2, 0, 0, (SCM disp, SCM ev),
"Send the stream event @var{ev} to the dispatcher @var{disp}.")
static SCM
accumulate_types (void * /* closure */,
- SCM key,
- SCM val,
- SCM result)
+ SCM key,
+ SCM val,
+ SCM result)
{
if (scm_is_pair (val))
return scm_cons (key, result);
#include "performer.hh"
#include "audio-item.hh"
#include "stream-event.hh"
+#include "international.hh"
#include "translator.icc"
Drul_array<Stream_event *> span_events_;
Drul_array<Direction> grow_dir_;
Real last_volume_;
+ bool last_volume_initialized_;
Audio_dynamic *absolute_;
Audio_span_dynamic *span_dynamic_;
Audio_span_dynamic *finished_span_dynamic_;
Dynamic_performer::Dynamic_performer ()
{
- last_volume_ = 0.5;
+ last_volume_ = 0.0;
+ last_volume_initialized_ = false;
script_event_ = 0;
absolute_ = 0;
span_events_[LEFT]
{
if (span_events_[STOP] || script_event_)
{
+ // End of a dynamic spanner, or an explicit dynamic script event.
finished_span_dynamic_ = span_dynamic_;
span_dynamic_ = 0;
}
if (span_events_[START])
{
+ // Start of a dynamic spanner. Create a new Audio_span_dynamic for
+ // collecting changes in dynamics within this spanner.
span_dynamic_ = new Audio_span_dynamic (equalize_volume (0.1), equalize_volume (1.0));
announce_element (Audio_element_info (span_dynamic_, span_events_[START]));
span_dynamic_->grow_dir_ = grow_dir_[START];
+
+ if (!last_volume_initialized_ && !script_event_)
+ {
+ // No explicit dynamic script events have occurred yet, but there is
+ // nevertheless a dynamic spanner. Initialize last_volume_ to a
+ // value within the available range.
+ span_events_[START]->origin ()->warning (_ ("(De)crescendo with unspecified starting volume in MIDI."));
+ last_volume_ = equalize_volume (0.5);
+ last_volume_initialized_ = true;
+ }
}
if (script_event_
|| span_dynamic_
|| finished_span_dynamic_)
{
+ // New change in dynamics.
absolute_ = new Audio_dynamic ();
if (script_event_)
{
+ // Explicit dynamic script event: determine the volume.
SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
SCM svolume = SCM_EOL;
last_volume_
= absolute_->volume_ = equalize_volume (volume);
+ last_volume_initialized_ = true;
}
Audio_element_info info (absolute_, script_event_);
else if (absolute_)
{
last_volume_ = absolute_->volume_;
+ last_volume_initialized_ = true;
}
absolute_ = 0;
if (mus)
{
if (!mus->is_mus_type ("footnote-event"))
- {
- mus->origin ()->programming_error (_ ("Must be footnote-event."));
- return;
- }
+ {
+ mus->origin ()->programming_error (_ ("Must be footnote-event."));
+ return;
+ }
footnotify (info.grob (), mus->to_event (context ())->unprotect ());
string grobname = info.grob ()->name ();
for (vsize i = 0; i < events_.size (); i++)
- {
- SCM name = events_[i]->get_property ("symbol");
- if (scm_is_symbol (name)
- && grobname == ly_symbol2string (name))
- {
- footnotify (info.grob (), events_[i]->self_scm ());
- // Event has exhausted its footnote
- events_[i]->set_property ("symbol", SCM_EOL);
- }
- }
+ {
+ SCM name = events_[i]->get_property ("symbol");
+ if (scm_is_symbol (name)
+ && grobname == ly_symbol2string (name))
+ {
+ footnotify (info.grob (), events_[i]->self_scm ());
+ // Event has exhausted its footnote
+ events_[i]->set_property ("symbol", SCM_EOL);
+ }
+ }
}
}
SCM p = get_property ("EventClasses");
ancestor_lookup_ = scm_make_hash_table (scm_length (p));
- for (;scm_is_pair (p); p = scm_cdr (p))
+ for (; scm_is_pair (p); p = scm_cdr (p))
scm_hashq_set_x (ancestor_lookup_, scm_caar (p), scm_car (p));
accepts_list_ = scm_list_1 (ly_symbol2scm ("Score"));
int hidden_state_;
SCM eval_scm (SCM, char extra_token = 0);
public:
- SCM eval_scm_token (SCM sval) { return eval_scm (sval, '#'); }
+ SCM eval_scm_token (SCM sval) { return eval_scm (sval, '#'); }
SCM extra_tokens_;
YYSTYPE *lexval_;
Input *lexloc_;
static void _ ## T ## _adder () \
{ \
T *t = new T; \
- T::static_description_ = \
- scm_permanent_object (t->static_translator_description ()); \
+ T::static_description_ = \
+ scm_permanent_object (t->static_translator_description ()); \
add_translator (t); \
} \
SCM T::translator_description () const \
{
if (r.is_infinity ())
{
- if (r > Rational(0))
- return scm_inf ();
+ if (r > Rational (0))
+ return scm_inf ();
return scm_difference (scm_inf (), SCM_UNDEFINED);
}
if (scm_is_true (scm_inf_p (r)))
{
if (scm_is_true (scm_positive_p (r)))
- {
- Rational r;
- r.set_infinite (1);
- return r;
- }
+ {
+ Rational r;
+ r.set_infinite (1);
+ return r;
+ }
else
- {
- Rational r;
- r.set_infinite (-1);
- return r;
- }
+ {
+ Rational r;
+ r.set_infinite (-1);
+ return r;
+ }
}
return Rational (scm_to_int64 (scm_numerator (r)),
ly_is_rational (SCM n)
{
return (scm_is_real (n)
- && (scm_is_true (scm_exact_p (n))
- || scm_is_true (scm_inf_p (n))));
+ && (scm_is_true (scm_exact_p (n))
+ || scm_is_true (scm_inf_p (n))));
}
SCM
" a pair of rationals (@var{m},@tie{}@var{g}), where @var{m} is"
" the timing for the main notes, and @var{g} the timing for"
" grace notes. In absence of grace notes, @var{g}@tie{}is zero.\n"
- "\n"
- "For compatibility reasons, it is possible to write two"
- " numbers specifying numerator and denominator instead of"
+ "\n"
+ "For compatibility reasons, it is possible to write two"
+ " numbers specifying numerator and denominator instead of"
" the rationals. These forms cannot be mixed, and the two-"
- "argument form is disambiguated by the sign of the second"
- " argument: if it is positive, it can only be a denominator"
- " and not a grace timing."
-)
+ "argument form is disambiguated by the sign of the second"
+ " argument: if it is positive, it can only be a denominator"
+ " and not a grace timing."
+ )
{
LY_ASSERT_TYPE (ly_is_rational, m, 1);
if (SCM_UNBNDP (g))
{
LY_ASSERT_TYPE (ly_is_rational, g, 2);
if (scm_is_true (scm_positive_p (g)))
- {
- LY_ASSERT_TYPE (scm_is_integer, m, 1);
- LY_ASSERT_TYPE (scm_is_integer, g, 2);
- return Moment (Rational (scm_to_int64 (m),
- scm_to_int64 (g))).smobbed_copy ();
- }
+ {
+ LY_ASSERT_TYPE (scm_is_integer, m, 1);
+ LY_ASSERT_TYPE (scm_is_integer, g, 2);
+ return Moment (Rational (scm_to_int64 (m),
+ scm_to_int64 (g))).smobbed_copy ();
+ }
return Moment (ly_scm2rational (m),
- ly_scm2rational (g)).smobbed_copy ();
+ ly_scm2rational (g)).smobbed_copy ();
}
LY_ASSERT_TYPE (scm_is_integer, m, 1);
return ly_rational2scm (unsmob_moment (mom)->main_part_);
}
-
LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
1, 0, 0, (SCM mom),
"Extract numerator from main timing.")
m->transpose (delta);
}
else if (prop == ly_symbol2scm ("elements")
- || prop == ly_symbol2scm ("articulations"))
+ || prop == ly_symbol2scm ("articulations"))
transpose_music_list (val, delta);
else if (prop == ly_symbol2scm ("pitch-alist")
&& scm_is_pair (val))
programming_error ("Not a music type");
Stream_event *e = new Stream_event (c->make_event_class (class_name),
- mutable_property_alist_);
+ mutable_property_alist_);
Moment length = get_length ();
if (length.to_bool ())
e->set_property ("length", length.smobbed_copy ());
full_collide = full_collide || (close_half_collide
&& distant_half_collide)
|| ( distant_half_collide // like full_ for wholes and longer
- && (up_ball_type <= 0 || down_ball_type <= 0));
+ && (up_ball_type <= 0 || down_ball_type <= 0));
/* Determine which chord goes on the left, and which goes right.
Up-stem usually goes on the right, but if chords just 'touch' we can put
Grob *stem = unsmob_grob (head_down->get_object ("stem"));
extract_grob_set (stem, "note-heads", heads);
for (vsize i = 0; i < heads.size (); i++)
- unsmob_grob (heads[i]->get_object ("dot"))
- ->set_property ("direction", scm_from_int (dir));
+ if (Grob *dot = unsmob_grob (heads[i]->get_object ("dot")))
+ dot->set_property ("direction", scm_from_int (dir));
}
}
{
if (Paper_score *ps = system_specs_[i].pscore_)
{
- vector<Grob*> cols = ps->root_system ()->used_columns ();
+ vector<Grob *> cols = ps->root_system ()->used_columns ();
// No indent, "infinite" line width, ragged.
Column_x_positions pos = get_line_configuration (cols, numeric_limits<Real>::max (), 0, true);
if (sky)
first_skyline.merge ((*sky)[UP]);
first_skyline.shift (indent);
- minimum_distance = first_skyline.distance (bottom_skyline_) - bottom_loose_baseline_ ;
+ minimum_distance = first_skyline.distance (bottom_skyline_) - bottom_loose_baseline_;
}
bottom_skyline_ = down_skyline;
elements_.push_back (Element (elts, minimum_offsets, minimum_distance, padding));
form = scm_list_1 (c);
}
if (multiple)
- form = scm_list_3 (ly_symbol2scm ("apply"),
- ly_symbol2scm ("values"),
- form);
+ form = scm_list_3 (ly_symbol2scm ("apply"),
+ ly_symbol2scm ("values"),
+ form);
return scm_cons (form, make_input (ps->start_location_));
}
if (!mmrest_event_)
{
mmrest_event_ = new Stream_event
- (handles_[in].get_context ()->make_event_class
- (ly_symbol2scm ("multi-measure-rest-event")));
+ (handles_[in].get_context ()->make_event_class
+ (ly_symbol2scm ("multi-measure-rest-event")));
mmrest_event_->set_property ("duration", SCM_EOL);
mmrest_event_->unprotect ();
}
if (!unisono_event_)
{
unisono_event_ = new Stream_event
- (out->make_event_class (ly_symbol2scm ("unisono-event")));
+ (out->make_event_class (ly_symbol2scm ("unisono-event")));
unisono_event_->unprotect ();
}
if (!solo_one_event_)
{
solo_one_event_ = new Stream_event
- (first_iter_->get_outlet ()->make_event_class
- (ly_symbol2scm ("solo-one-event")));
+ (first_iter_->get_outlet ()->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")));
+ (second_iter_->get_outlet ()->make_event_class
+ (ly_symbol2scm ("solo-two-event")));
solo_two_event_->unprotect ();
}
void
Phrasing_slur_engraver::derived_mark () const
{
- for (vsize i=start_events_.size(); i--;)
+ for (vsize i = start_events_.size (); i--;)
scm_gc_mark (start_events_[i]->self_scm ());
- for (vsize i=stop_events_.size(); i--;)
+ for (vsize i = stop_events_.size (); i--;)
scm_gc_mark (stop_events_[i]->self_scm ());
}
for (vsize j = stop_events_.size (); --j > i;)
{
if (id == robust_scm2string (stop_events_[j]->get_property ("spanner-id"), ""))
- stop_events_.erase (stop_events_.begin() + j);
+ stop_events_.erase (stop_events_.begin () + j);
}
}
else
Stream_event *c = unsmob_stream_event (slurs_[j]->get_property ("cause"));
- if (!c) {
- slurs_[j]->programming_error ("phrasing slur without a cause");
- continue;
- }
+ if (!c)
+ {
+ slurs_[j]->programming_error ("phrasing slur without a cause");
+ continue;
+ }
Direction slur_dir = to_dir (c->get_property ("direction"));
}
LY_DEFINE (ly_pitch_tones, "ly:pitch-tones",
- 1, 0, 0, (SCM pp),
+ 1, 0, 0, (SCM pp),
"Calculate the number of tones of@tie{}@var{pp} from"
" middle@tie{}C as a rational number.")
{
return ly_rational2scm (unsmob_pitch (pp)->tone_pitch ());
}
-
LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
1, 0, 0, (SCM pp),
"Calculate the number of quarter tones of@tie{}@var{pp} from"
for (vsize k = 0;
k < need_pure_heights_from_neighbors[pos[j]].size ();
k++)
- if (!in_same_column(need_pure_heights_from_neighbors[pos[j]][k],
- pure_relevants_[i]))
+ if (!in_same_column (need_pure_heights_from_neighbors[pos[j]][k],
+ pure_relevants_[i]))
Pointer_group_interface::add_grob
- (need_pure_heights_from_neighbors[pos[j]][k],
- ly_symbol2scm ("neighbors"),
- pure_relevants_[i]);
+ (need_pure_heights_from_neighbors[pos[j]][k],
+ ly_symbol2scm ("neighbors"),
+ pure_relevants_[i]);
}
need_pure_heights_from_neighbors_.clear ();
s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|S|:");
else // { segno, start }
s = robust_scm2string (get_property ("startRepeatSegnoType"), ".S|:");
- else
- if (end) // { segno, end }
- s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S");
- else // { segno }
- s = robust_scm2string (get_property ("segnoType"), "S");
- else
- if (start)
- if (end) // { start, end }
- s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
- else // { start }
- s = robust_scm2string (get_property ("startRepeatType"), "|:");
- else
- if (end) // { end }
- s = robust_scm2string (get_property ("endRepeatType"), ":|");
+ else if (end) // { segno, end }
+ s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S");
+ else // { segno }
+ s = robust_scm2string (get_property ("segnoType"), "S");
+ else if (start)
+ if (end) // { start, end }
+ s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
+ else // { start }
+ s = robust_scm2string (get_property ("startRepeatType"), "|:");
+ else if (end) // { end }
+ s = robust_scm2string (get_property ("endRepeatType"), ":|");
/*
TODO: line breaks might be allowed if we set whichBar to "".
for (LEFT_and_RIGHT (d))
vector_sort (ordered_rests[d], rest_shift_less);
-
for (LEFT_and_RIGHT (d))
{
if (ordered_rests[d].size () < 1)
Real y = dir * max (0.0,
-dir * restdim[-dir] + dir * notedim[dir] + minimum_dist);
- int stafflines = Staff_symbol_referencer::line_count (me);
- if (!stafflines)
- {
- programming_error ("no staff line count");
- stafflines = 5;
- }
-
// move discretely by half spaces.
int discrete_y = dir * int (ceil (y / (0.5 * dir * staff_space)));
+ Interval staff_span = Staff_symbol_referencer::staff_span (rest);
+ staff_span.widen (1);
// move by whole spaces inside the staff.
- if (fabs (Staff_symbol_referencer::get_position (rest)
- + discrete_y) < stafflines + 1)
+ if (staff_span.contains
+ (Staff_symbol_referencer::get_position (rest) + discrete_y))
{
discrete_y = dir * int (ceil (dir * discrete_y / 2.0) * 2.0);
}
{
Grob *me = unsmob_grob (smob);
int duration_log = scm_to_int (me->get_property ("duration-log"));
- int line_count = Staff_symbol_referencer::line_count (me);
Real ss = Staff_symbol_referencer::staff_space (me);
bool position_override = scm_is_number (me->get_property ("staff-position"));
make a semibreve rest hang from the next line,
except for a single line staff
*/
- if (duration_log == 0 && line_count > 1)
+ if (duration_log == 0 && Staff_symbol_referencer::line_count (me) > 1)
pos += 2;
/*
SCM unlistened = SCM_EOL;
for (; scm_is_pair (arts); arts = scm_cdr (arts))
{
- SCM art = scm_car (arts);
+ SCM art = scm_car (arts);
if (c->event_source ()->is_listened_class
- (unsmob_stream_event (art)->get_property ("class")))
+ (unsmob_stream_event (art)->get_property ("class")))
listened = scm_cons (art, listened);
else
unlistened = scm_cons (art, unlistened);
void
Slur_engraver::derived_mark () const
{
- for (vsize i=start_events_.size(); i--;)
+ for (vsize i = start_events_.size (); i--;)
scm_gc_mark (start_events_[i]->self_scm ());
- for (vsize i=stop_events_.size(); i--;)
+ for (vsize i = stop_events_.size (); i--;)
scm_gc_mark (stop_events_[i]->self_scm ());
}
for (vsize j = stop_events_.size (); --j > i;)
{
if (id == robust_scm2string (stop_events_[j]->get_property ("spanner-id"), ""))
- stop_events_.erase (stop_events_.begin() + j);
+ stop_events_.erase (stop_events_.begin () + j);
}
}
else
Stream_event *c = unsmob_stream_event (slurs_[j]->get_property ("cause"));
- if (!c) {
- slurs_[j]->programming_error ("slur without a cause");
- continue;
- }
+ if (!c)
+ {
+ slurs_[j]->programming_error ("slur without a cause");
+ continue;
+ }
Direction slur_dir = to_dir (c->get_property ("direction"));
* 2.0 / staff_space_;
if (fabs (pos - my_round (pos)) < 0.2
- && Staff_symbol_referencer::on_line (on_staff, (int) rint (pos))
- && Staff_symbol_referencer::line_count (on_staff) - 1 >= rint (pos))
+ && Staff_symbol_referencer::on_staff_line (on_staff, (int) rint (pos)))
y += 1.5 * staff_space_ * dir_ / 10;
return y;
for (LEFT_and_RIGHT (d))
if (spanned_drul_[d])
scm_gc_mark (spanned_drul_[d]->self_scm ());
- ;
+ ;
for (vsize i = broken_intos_.size (); i--;)
scm_gc_mark (broken_intos_[i]->self_scm ());
void
Staff_symbol_engraver::derived_mark () const
{
- for (LEFT_and_RIGHT (d)) {
- if (span_events_[d])
- scm_gc_mark (span_events_[d]->self_scm ());
- }
+ for (LEFT_and_RIGHT (d))
+ {
+ if (span_events_[d])
+ scm_gc_mark (span_events_[d]->self_scm ());
+ }
}
Staff_symbol_engraver::~Staff_symbol_engraver ()
size.
*/
- Interval staff_span =
- Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_);
+ Interval staff_span
+ = Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_);
staff_span.widen (-1);
- bool const within_staff = staff_span.contains(pos);
+ bool const within_staff = staff_span.contains (pos);
if (head_positions_slice (columns[LEFT]).contains (pos)
|| head_positions_slice (columns[RIGHT]).contains (pos)
|| within_staff)
Real top_y = tip_y + conf->dir_ * height;
Real top_pos = 2 * top_y / details_.staff_space_;
Real round_top_pos = rint (top_pos);
- Interval staff_span =
- Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_);
+ Interval staff_span
+ = Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_);
if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_,
int (round_top_pos))
&& staff_span[UP] * 0.5 > top_y)
#include "font-interface.hh"
#include "international.hh"
#include "output-def.hh"
+#include "staff-symbol.hh"
#include "staff-symbol-referencer.hh"
#include "text-interface.hh"
#include "warn.hh"
else
m = numbered_time_signature (me, n, d);
- if (Staff_symbol_referencer::line_count (me) % 2 == 0)
- m.translate_axis (Staff_symbol_referencer::staff_space (me) / 2, Y_AXIS);
+ /*
+ position the signature centred on the staff line
+ nearest to the middle of the staff
+ */
+ if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me))
+ {
+ std::vector<Real> const linepos = Staff_symbol::line_positions (staff);
+ if (!linepos.empty ())
+ {
+ Interval const span = Staff_symbol::line_span (staff);
+ Real const mid = span.center ();
+ Real pos = linepos.front ();
+ Real dist = fabs (pos - mid);
+ for (std::vector<Real>::const_iterator
+ i = linepos.begin (), e = linepos.end ();
+ ++i != e;)
+ {
+ double const d = fabs (*i - mid);
+ if (d < dist)
+ {
+ pos = *i;
+ dist = d;
+ }
+ }
+
+ m.translate_axis
+ (pos * Staff_symbol_referencer::staff_space (me) / 2, Y_AXIS);
+ }
+ }
return m.smobbed_copy ();
}
for (SCM s = ev->get_property ("tweaks");
scm_is_pair (s); s = scm_cdr (s))
{
- if (scm_is_pair (scm_caar (s))) {
- if (SCM_UNBNDP (grobname))
- grobname = scm_from_locale_symbol (info.grob ()->name ().c_str ());
- if (scm_is_eq (scm_caaar (s), grobname))
- info.grob ()->set_property (scm_cdaar (s), scm_cdar (s));
- } else if (direct)
- info.grob ()->set_property (scm_caar (s), scm_cdar (s));
+ if (scm_is_pair (scm_caar (s)))
+ {
+ if (SCM_UNBNDP (grobname))
+ grobname = scm_from_locale_symbol (info.grob ()->name ().c_str ());
+ if (scm_is_eq (scm_caaar (s), grobname))
+ info.grob ()->set_property (scm_cdaar (s), scm_cdar (s));
+ }
+ else if (direct)
+ info.grob ()->set_property (scm_caar (s), scm_cdar (s));
}
}
}
Real blotdiameter)
{
bool on_staffline = Staff_symbol_referencer::on_line (me, pos);
- int interspaces = Staff_symbol_referencer::line_count (me) - 1;
- bool above_staff = pos > interspaces;
+ bool above_staff = pos > Staff_symbol_referencer::staff_span (me)[UP];
if (delta_pitch > -1)
{
\consists "Tie_performer"
\consists "Note_performer"
\consists "Beam_performer"
+ autoBeaming = ##f % needed for consistent melismata with engravers
\consists "Slur_performer"
}
\consists "Tie_performer"
\consists "Note_performer"
\consists "Beam_performer"
+ autoBeaming = ##f % needed for consistent melismata with engravers
\consists "Slur_performer"
}
\consists "Tie_performer"
\consists "Note_performer"
\consists "Beam_performer"
+ autoBeaming = ##f % needed for consistent melismata with engravers
\consists "Slur_performer"
}
\context {
\Voice
\name TabVoice
+ autoBeaming = ##f % needed for consistent melismata with engravers
}
\context {
\name Score
melismaBusyProperties = #default-melisma-properties
+ autoBeaming = ##t % needed for consistent melismata with engravers
instrumentName = #"bright acoustic"
midiChannelMapping = #'staff
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.15.42\n"
+"Project-Id-Version: lilypond 2.15.95\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2012-08-02 18:31+0100\n"
+"POT-Creation-Date: 2012-08-11 14:29+0200\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"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "cannot find or create: `%s'"
msgstr ""
-#: custos.cc:88
+#: custos.cc:87
#, c-format
msgid "custos `%s' not found"
msgstr ""
msgid "unterminated (de)crescendo"
msgstr ""
+#. No explicit dynamic script events have occurred yet, but there is
+#. nevertheless a dynamic spanner. Initialize last_volume_ to a
+#. value within the available range.
+#: dynamic-performer.cc:129
+msgid "(De)crescendo with unspecified starting volume in MIDI."
+msgstr ""
+
#: episema-engraver.cc:75
msgid "already have an episema"
msgstr ""
msgid "cannot resolve rest collision: rest direction not set"
msgstr ""
-#: rest-collision.cc:158 rest-collision.cc:272
+#: rest-collision.cc:157 rest-collision.cc:266
msgid "too many colliding rests"
msgstr ""
-#: rest.cc:193
+#: rest.cc:192
#, c-format
msgid "rest `%s' not found"
msgstr ""
#. If there is no such symbol, we default to the numbered style.
#. (Here really with a warning!)
-#: time-signature.cc:94
+#: time-signature.cc:122
#, c-format
msgid "time signature symbol `%s' not found; reverting to numbered style"
msgstr ""
msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr =%ul"
msgstr ""
-#: vaticana-ligature.cc:95
+#: vaticana-ligature.cc:94
msgid "flexa-height undefined; assuming 0"
msgstr ""
-#: vaticana-ligature.cc:100
+#: vaticana-ligature.cc:99
msgid "ascending vaticana style flexa"
msgstr ""
msgid "giving up"
msgstr ""
-#: parser.yy:162 parser.yy:176 /home/gperciva/src/lilypond/lily/parser.yy:162
-#: /home/gperciva/src/lilypond/lily/parser.yy:176
+#: parser.yy:161 parser.yy:175
msgid "Too much lookahead"
msgstr ""
-#: parser.yy:835 parser.yy:1256 /home/gperciva/src/lilypond/lily/parser.yy:835
-#: /home/gperciva/src/lilypond/lily/parser.yy:1256
+#: parser.yy:835 parser.yy:1284
msgid "not a context mod"
msgstr ""
-#: parser.yy:1027 /home/gperciva/src/lilypond/lily/parser.yy:1027
+#: parser.yy:1027
msgid "\\paper cannot be used in \\score, use \\layout instead"
msgstr ""
-#: parser.yy:1051 /home/gperciva/src/lilypond/lily/parser.yy:1051
+#: parser.yy:1051
msgid "need \\paper for paper block"
msgstr ""
-#: parser.yy:1176 /home/gperciva/src/lilypond/lily/parser.yy:1176
+#: parser.yy:1204
msgid "Ignoring non-music expression"
msgstr ""
-#: parser.yy:2016 /home/gperciva/src/lilypond/lily/parser.yy:2016
+#: parser.yy:2044
msgid "only \\consists and \\remove take non-string argument."
msgstr ""
-#: parser.yy:2029 /home/gperciva/src/lilypond/lily/parser.yy:2029
+#: parser.yy:2057
msgid "Grob name should be alphanumeric"
msgstr ""
-#: parser.yy:2233 /home/gperciva/src/lilypond/lily/parser.yy:2233
+#: parser.yy:2261
msgid "not a rhythmic event"
msgstr ""
-#: parser.yy:2329 parser.yy:2334
-#: /home/gperciva/src/lilypond/lily/parser.yy:2329
-#: /home/gperciva/src/lilypond/lily/parser.yy:2334
+#: parser.yy:2357 parser.yy:2362
msgid "have to be in Lyric mode for lyrics"
msgstr ""
-#: parser.yy:2449 /home/gperciva/src/lilypond/lily/parser.yy:2449
+#: parser.yy:2477
msgid "expecting string as script definition"
msgstr ""
-#: parser.yy:2609 parser.yy:2653
-#: /home/gperciva/src/lilypond/lily/parser.yy:2609
-#: /home/gperciva/src/lilypond/lily/parser.yy:2653
+#: parser.yy:2637 parser.yy:2681
#, c-format
msgid "not a duration: %d"
msgstr ""
-#: parser.yy:2772 /home/gperciva/src/lilypond/lily/parser.yy:2772
+#: parser.yy:2800
msgid "have to be in Note mode for notes"
msgstr ""
-#: parser.yy:2827 /home/gperciva/src/lilypond/lily/parser.yy:2827
+#: parser.yy:2855
msgid "have to be in Chord mode for chords"
msgstr ""
-#: parser.yy:3087 /home/gperciva/src/lilypond/lily/parser.yy:3087
+#: parser.yy:3115
msgid "not a markup"
msgstr ""
-#: lexer.ll:224
+#: lexer.ll:218
msgid "stray UTF-8 BOM encountered"
msgstr ""
-#: lexer.ll:227
+#: lexer.ll:221
msgid "Skipping UTF-8 BOM"
msgstr ""
-#: lexer.ll:285
+#: lexer.ll:279
#, c-format
msgid "Renaming input to: `%s'"
msgstr ""
-#: lexer.ll:302
+#: lexer.ll:296
msgid "quoted string expected after \\version"
msgstr ""
-#: lexer.ll:306
+#: lexer.ll:300
msgid "quoted string expected after \\sourcefilename"
msgstr ""
-#: lexer.ll:310
+#: lexer.ll:304
msgid "integer expected after \\sourcefileline"
msgstr ""
-#: lexer.ll:333
+#: lexer.ll:327
msgid "\\maininput not allowed outside init files"
msgstr ""
-#: lexer.ll:357
+#: lexer.ll:351
#, c-format
msgid "wrong or undefined identifier: `%s'"
msgstr ""
-#: lexer.ll:383
+#: lexer.ll:377
msgid "string expected after \\include"
msgstr ""
-#: lexer.ll:393
+#. backup rule
+#: lexer.ll:387
msgid "end quote missing"
msgstr ""
-#: lexer.ll:551
+#: lexer.ll:558
msgid "Brace found at end of lyric. Did you forget a space?"
msgstr ""
-#: lexer.ll:662
+#: lexer.ll:672
msgid "Brace found at end of markup. Did you forget a space?"
msgstr ""
-#: lexer.ll:674
+#: lexer.ll:684
msgid "EOF found inside a comment"
msgstr ""
-#: lexer.ll:770
+#: lexer.ll:782
#, c-format
msgid "invalid character: `%s'"
msgstr ""
-#: lexer.ll:881
+#: lexer.ll:903 lexer.ll:904
#, c-format
msgid "unknown escaped string: `\\%s'"
msgstr ""
-#: lexer.ll:1164
+#: lexer.ll:1186 lexer.ll:1187
msgid "non-UTF-8 input"
msgstr ""
-#: lexer.ll:1208
+#: lexer.ll:1230 lexer.ll:1231
#, c-format
msgid "file too old: %s (oldest supported: %s)"
msgstr ""
-#: lexer.ll:1209
+#: lexer.ll:1231 lexer.ll:1232
msgid "consider updating the input with the convert-ly script"
msgstr ""
-#: lexer.ll:1215
+#: lexer.ll:1237 lexer.ll:1238
#, c-format
msgid "program too old: %s (file requires: %s)"
msgstr ""
(fallbackval (ly:modules-lookup (list header) fallbackvar))
(val (if overrideval overrideval fallbackval)))
(if val
- (format port "/~a (~a)\n" field (metadata-encode (markup->string val))))))
+ (format port "/~a (~a)\n" field (metadata-encode (markup->string val (list header)))))))
(display "[ " port)
(metadata-lookup-output 'pdfcomposer 'composer "Author")
(format port "/Creator (LilyPond ~a)\n" (lilypond-version))
(case (car (string->list (substring test-string 0 1)))
((#\s) (let ((size (get-numeric-from-key test-string)))
(set! props (prepend-alist-chain 'size size props))))
+ ((#\t) (let ((th (get-numeric-from-key test-string)))
+ (set! props (prepend-alist-chain 'thickness th props))))
((#\f) (let* ((finger-code (get-numeric-from-key test-string))
(finger-id (case finger-code
((0) 'none)
Default:@tie{}1.
@item
-@code{t:}@var{number} -- Set the line thickness (in staff spaces).
-Default:@tie{}0.05.
+@code{t:}@var{number} -- Set the line thickness (relative to normal
+line thickness).
+Default:@tie{}0.5.
@item
@code{h:}@var{number} -- Set the height of the diagram in frets.
;;; convert a full markup object to an approximate pure string representation
-(define-public (markup->string m)
+(define-public (markup->string m . argscopes)
+(let* ((scopes (if (pair? argscopes) (car argscopes) '())))
;; markup commands with one markup argument, formatting ignored
(define markups-first-argument '(list
bold-markup box-markup caps-markup dynamic-markup finger-markup
translate-scaled-markup with-url-markup scale-markup ))
;; helper functions to handle string cons like string lists
- (define (markup-cons->string-cons c)
- (if (not (pair? c)) (markup->string c)
- (cons (markup->string (car c)) (markup-cons->string-cons (cdr c)))))
+ (define (markup-cons->string-cons c scopes)
+ (if (not (pair? c)) (markup->string c scopes)
+ (cons (markup->string (car c) scopes) (markup-cons->string-cons (cdr c) scopes))))
(define (string-cons-join c)
(if (not (pair? c)) c
(string-join (list (car c) (string-cons-join (cdr c))) "")))
(cond
((string? m) m)
((null? m) "")
+ ((not (pair? m)) "")
;; handle \concat (string-join without spaces)
((and (pair? m) (equal? (car m) concat-markup))
- (string-cons-join (markup-cons->string-cons (cadr m))) )
+ (string-cons-join (markup-cons->string-cons (cadr m) scopes)) )
;; markup functions with the markup as first arg
((member (car m) (primitive-eval markups-first-argument))
- (markup->string (cadr m)))
+ (markup->string (cadr m) scopes))
;; markup functions with markup as second arg
((member (car m) (primitive-eval markups-second-argument))
- (markup->string (cddr m)))
+ (markup->string (cddr m) scopes))
+
+ ;; fromproperty-markup reads property values from the header block:
+ ((equal? (car m) fromproperty-markup)
+ (let* ((varname (symbol->string (cadr m)))
+ ;; cut off the header: prefix from the variable name:
+ (newvarname (if (string-prefix? "header:" varname) (substring varname 7) varname))
+ (var (string->symbol newvarname))
+ (mod (make-module 1)))
+ ;; Prevent loops by temporarily clearing the variable we have just looked up
+ (module-define! mod var "")
+ (markup->string (ly:modules-lookup scopes var) (cons mod scopes))))
;; ignore all other markup functions
((markup-function? (car m)) "")
;; handle markup lists
((list? m)
- (string-join (map markup->string m) " "))
+ (string-join (map (lambda (mm) (markup->string mm scopes)) m) " "))
- (else "ERROR, unable to extract string from markup")))
+ (else "ERROR, unable to extract string from markup"))))
def make_all_downloads(macroName, version):
make_download("download"+macroName+"LinuxNormal", "linux-x86/",
- "linux-x86.sh", version, "1", "Linux x86")
+ "linux-x86.sh", version, "1", "GNU/Linux x86")
make_download("download"+macroName+"LinuxBig", "linux-64/",
- "linux-64.sh", version, "1", "Linux 64")
+ "linux-64.sh", version, "1", "GNU/Linux 64")
make_download("download"+macroName+"LinuxPPC", "linux-ppc/",
- "linux-ppc.sh", version, "1", "Linux PPC")
+ "linux-ppc.sh", version, "1", "GNU/Linux PPC")
make_download("download"+macroName+"FreeBSDNormal", "freebsd-x86/",
"freebsd-x86.sh", version, "1", "FreeBSD i386")