summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2005-08-19 10:13:08 +0000
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2005-08-19 10:13:08 +0000
commite3083e01ee49567d2ef3e7215423e6188d31fc6d (patch)
tree507fdefc93c2894d16141f303a091a211835da2a
parent78d519306d13bbd4979b03c9f0aefa33b476fe2a (diff)
* lily/volta-engraver.cc (process_music): use
Text_interface::is_markup() for setting the 'text property of the volta bracket. * input/mutopia/claop.py (accents): update syntax to 2.6 * scm/define-context-properties.scm (all-user-translation-properties): add countPercentRepeats. * Documentation/user/basic-notation.itely (Measure repeats): add isolated percent example.
-rw-r--r--ChangeLog16
-rw-r--r--Documentation/topdocs/NEWS.tely6
-rw-r--r--Documentation/user/basic-notation.itely10
-rw-r--r--input/mutopia/claop.py59
-rw-r--r--input/regression/repeat-percent-count.ly6
-rw-r--r--lily/percent-repeat-engraver.cc27
-rw-r--r--lily/volta-bracket.cc3
-rw-r--r--lily/volta-engraver.cc2
-rw-r--r--scm/define-context-properties.scm2
9 files changed, 89 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e2e1d94ef..d7748423d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-08-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/volta-engraver.cc (process_music): use
+ Text_interface::is_markup() for setting the 'text property of the
+ volta bracket.
+
+ * input/mutopia/claop.py (accents): update syntax to 2.6
+
+ * scm/define-context-properties.scm
+ (all-user-translation-properties): add countPercentRepeats.
+
+ * Documentation/user/basic-notation.itely (Measure repeats): add
+ isolated percent example.
+
2005-08-18 Graham Percival <gpermus@gmail.com>
* input/ {various}: change direction #1, #-1 to
@@ -55,7 +69,7 @@
* lily/context-def.cc (instantiate): check for
Engraver_group_engraver and Performer_group_performer not
- Engraver/Performer. Fixes crashes when doing \with { \consist .. }
+ Engraver/Performer. Fixes crashes when doing \with { \consists .. }
2005-08-18 Jan Nieuwenhuizen <janneke@gnu.org>
diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely
index acf469eb3c..109d1d09f7 100644
--- a/Documentation/topdocs/NEWS.tely
+++ b/Documentation/topdocs/NEWS.tely
@@ -38,9 +38,11 @@ This document is also available in @uref{NEWS.pdf,PDF}.
@itemize @bullet
@item
-Percent repeats get incremental numbers to indicate how many repeats there are.
+With the @code{countPercentRepeats} property,
+percent repeats get incremental numbers to indicate how many repeats there are.
-@lilypond[relative=2,fragment,raggedright]
+@lilypond[relative=2,fragment,raggedright]
+\set countPercentRepeats = ##t
\repeat percent 4 { c1 }
\time 2/4
\repeat percent 4 { c2 c2 }
diff --git a/Documentation/user/basic-notation.itely b/Documentation/user/basic-notation.itely
index 607054fc3d..999ef0bf8e 100644
--- a/Documentation/user/basic-notation.itely
+++ b/Documentation/user/basic-notation.itely
@@ -2934,6 +2934,16 @@ Percent repeats must be declared within a @code{Voice} context.
}
@end lilypond
+Isolated percents can also be printed. This is done by putting a multi
+measure rest, with a different print function,
+
+
+@lilypond[fragment,verbatim]
+\override MultiMeasureRest #'print-function
+ = #Multi_measure_rest::percent
+R1
+@end lilypond
+
@seealso
diff --git a/input/mutopia/claop.py b/input/mutopia/claop.py
index b472de991a..49843c5f7e 100644
--- a/input/mutopia/claop.py
+++ b/input/mutopia/claop.py
@@ -167,8 +167,8 @@ def print1(ch) :
elif cr=='d':
namestr="e'"
elif cr=='X':
- namestr="\\property Staff.NoteHead \\override #'style = #'cross c'"
- accstr="-^ \\property Staff.NoteHead \\revert #'style"
+ namestr="\\override Staff.NoteHead #'style = #'cross c'"
+ accstr="-^ \\revert Staff.NoteHead #'style"
else:
print 'foo', cr, chr(ch), ch == 'd', "A%sA" % cr
raise 'foo'
@@ -236,7 +236,7 @@ for i in range(0,32):
sys.stdout.write ('%%{\n %s \n %%}' % copyright)
sys.stdout.write (r"""
-\include "paper11.ly"
+#(set-global-staff-size 11)
\header {
title = "CLA(O)P II"
@@ -254,12 +254,15 @@ sys.stdout.write (r"""
for st in range(1,voices+1):
str=stemme(st)
ststr=chr((st-1)/24+ord('A')) + chr ((st-1)%24+ord('A'))
- sys.stdout.write( """
-
-stemme%s = \\notes {\n\\clef percussion
-\\property Staff.instrument = \"%d\"\n
-\\property Staff.instr = \"%d\"\n
-\\property Score.currentBarNumber = #%d\n""" % (ststr,st,st,start_measure))
+ sys.stdout.write(r'''
+
+stemme%s = {
+\clef percussion
+\set Staff.instrument = "%d"
+\set Staff.instr = "%d"
+\set Score.currentBarNumber = #%d
+'''
+ % (ststr,st,st,start_measure))
for i in range(start_measure-1, start_measure-1+no_measures):
print16(str[i*16:i*16+16])
@@ -269,14 +272,13 @@ stemme%s = \\notes {\n\\clef percussion
sys.stdout.write (r"""
-\score {
- \notes <
- \property Score.BarNumber \override #'padding = #2.5
- \property Score.autoBeamSettings \override
- #'(end * * * *) = #(ly:make-moment 1 4)
- \property Score.skipBars = ##t
- \context StaffGroup <
- \property StaffGroup.Stem \override #'direction = #up
+<<
+ \override Score.BarNumber #'padding = #2.5
+ \override Score.autoBeamSettings
+ #'(end * * * *) = #(ly:make-moment 1 4)
+ \set Score.skipBars = ##t
+ \context StaffGroup <<
+ \override StaffGroup.Stem #'direction = #up
""")
@@ -286,21 +288,22 @@ for st in range(1,voices+1):
sys.stdout.write (r"""\context Staff="%s" \%s
""" % (ststr,ststr))
-sys.stdout.write (r""">
- >
- \paper {
+sys.stdout.write (r""">>
+>>
+#(set-default-paper-size "a3")
+\paper {
linewidth = 26.0\cm
indent = 0
textheight = 38.0\cm
%hsize = 30.0 \cm
%vsize = 42.0 \cm
-
- \translator {
- \StaffContext
- StaffSymbol \override #'line-count = #3
- minimumVerticalExtent = #'(-3 . 3)
- }
- }
-
+}
+\context
+{
+ \translator {
+ \StaffContext
+ \override StaffSymbol #'line-count = #3
+ minimumVerticalExtent = #'(-3 . 3)
+ }
}
""")
diff --git a/input/regression/repeat-percent-count.ly b/input/regression/repeat-percent-count.ly
index a1382d94a8..cab8ce4a2e 100644
--- a/input/regression/repeat-percent-count.ly
+++ b/input/regression/repeat-percent-count.ly
@@ -2,8 +2,9 @@
\header {
- texidoc = "Percent repeats get incremental numbers to indicate the repeat
-counts, but only if there are more than two repeats."
+ texidoc = "Percent repeats get incremental numbers when
+@code{countPercentRepeats} is set, to indicate the repeat counts, but
+only if there are more than two repeats."
}
@@ -11,6 +12,7 @@ counts, but only if there are more than two repeats."
\version "2.7.6"
\relative c'' \new Voice {
+ \set countPercentRepeats = ##t
\time 4/4
\repeat "percent" 4 { c1 }
\time 2/4
diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc
index 924098c4af..51213abcda 100644
--- a/lily/percent-repeat-engraver.cc
+++ b/lily/percent-repeat-engraver.cc
@@ -153,7 +153,8 @@ Percent_repeat_engraver::process_music ()
Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
percent_->set_bound (LEFT, col);
- if (total_count_ > 2)
+ if (total_count_ > 2
+ && to_boolean (get_property ("countPercentRepeats")))
{
percent_counter_
= make_spanner ("PercentRepeatCounter", repeat_->self_scm ());
@@ -172,7 +173,8 @@ Percent_repeat_engraver::process_music ()
{
double_percent_ = make_item ("DoublePercentRepeat", repeat_->self_scm ());
- if (total_count_ > 2)
+ if (total_count_ > 2
+ && to_boolean (get_property ("countPercentRepeats")))
{
double_percent_counter_
= make_item ("DoublePercentRepeatCounter",
@@ -259,10 +261,21 @@ Percent_repeat_engraver::stop_translation_timestep ()
}
ADD_TRANSLATOR (Percent_repeat_engraver,
- /* doc */ "Make whole bar and double bar repeats.",
+ /* doc */
+ "Make whole bar and double bar repeats.",
+
/* create */
- "PercentRepeat DoublePercentRepeat "
- "PercentRepeatCounter DoublePercentRepeatCounter",
- /* accept */ "repeated-music",
- /* read */ "measureLength currentCommandColumn",
+ "PercentRepeat "
+ "DoublePercentRepeat "
+ "PercentRepeatCounter "
+ "DoublePercentRepeatCounter",
+
+ /* accept */
+ "repeated-music",
+
+ /* read */
+ "measureLength "
+ "currentCommandColumn "
+ "countPercentRepeats",
+
/* write */ "");
diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc
index 6899cba2c1..505e97a75b 100644
--- a/lily/volta-bracket.cc
+++ b/lily/volta-bracket.cc
@@ -98,7 +98,8 @@ Volta_bracket_interface::print (SCM smob)
{
SCM text = me->get_property ("text");
SCM properties = me->get_property_alist_chain (SCM_EOL);
- SCM snum = Text_interface::interpret_markup (layout->self_scm (), properties, text);
+ SCM snum = Text_interface::interpret_markup (layout->self_scm (),
+ properties, text);
Stencil num = *unsmob_stencil (snum);
mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc
index c113ee9bad..25adb6f473 100644
--- a/lily/volta-engraver.cc
+++ b/lily/volta-engraver.cc
@@ -160,7 +160,7 @@ Volta_engraver::process_music ()
}
if (!volta_span_
- && (scm_is_string (start_string_) || scm_is_pair (start_string_)))
+ && Text_interface::is_markup (start_string_))
{
started_mom_ = now_mom ();
diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm
index da0bbfd9f9..d357dc92d8 100644
--- a/scm/define-context-properties.scm
+++ b/scm/define-context-properties.scm
@@ -150,6 +150,8 @@ symbol go, measured in half staff spaces from the center of the staff.")
(connectArpeggios ,boolean? " If set, connect arpeggios across
piano staff.")
+ (countPercentRepeats ,boolean? "If set, produce counters for
+percent repeats. ")
(createKeyOnClefChange ,boolean? "Print a key signature whenever the clef is changed.")
(createSpacing ,boolean? "Create @code{StaffSpacing} objects?
Should be set for staves.")