(Top): document #'callbacks.
(Top): document nested \override.
* input/regression/figured-bass.ly: update for slash and pluses.
* input/regression/figured-bass-continuation-forbid.ly (Module):
new file.
* scm/translation-functions.scm (format-new-bass-figure): use
slashed-digit if diminished is set.
(format-new-bass-figure): add + if 'augmented is set.
* scm/define-markup-commands.scm (slashed-digit): new command slashed-digit.
* input/test/piano-staff-distance.ly: remove file.
* Documentation/user/advanced-notation.itely (Formatting cue
notes): use length-fraction for making stems/beams smaller.
* lily/parser.yy (bass_figure): accept \+ \! and / as figured bass
modifications.
* lily/new-figured-bass-engraver.cc: new property
centerFiguredBassContinuations
* Documentation/user/changing-defaults.itely (Difficult tweaks):
use callbacks.
* python/convertrules.py (FatalConversionError.subber): conversion
rule for #'callbacks
* lily/parser.yy (music_property_def): allow \override #'a #'b =
#c too.
2005-10-17 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * Documentation/topdocs/NEWS.tely (Top): mention John Mandereau.
+ (Top): document #'callbacks.
+ (Top): document nested \override.
+
+ * input/regression/figured-bass.ly: update for slash and pluses.
+
+ * input/regression/figured-bass-continuation-forbid.ly (Module):
+ new file.
+
+ * scm/translation-functions.scm (format-new-bass-figure): use
+ slashed-digit if diminished is set.
+ (format-new-bass-figure): add + if 'augmented is set.
+
+ * scm/define-markup-commands.scm (slashed-digit): new command slashed-digit.
+
+ * input/test/piano-staff-distance.ly: remove file.
+
+ * Documentation/user/advanced-notation.itely (Formatting cue
+ notes): use length-fraction for making stems/beams smaller.
+
+ * lily/parser.yy (bass_figure): accept \+ \! and / as figured bass
+ modifications.
+
+ * lily/new-figured-bass-engraver.cc: new property
+ centerFiguredBassContinuations
+
* Documentation/user/changing-defaults.itely (Difficult tweaks):
use callbacks.
@itemize @bullet
@item
-Major internal cleanups.
+Support for figured bass has been rewritten. Now it supports
+continuation lines, slashed figures, and its figures, brackets, and alignments may
+tuned separately.
+
+@lilypond[raggedright,fragment]
+<<
+\relative { c4 c c c }
+\figures {
+ \set useBassFigureExtenders = ##t
+ <6+ 4 3> <6 4 3> <4 3+> <5/ 7/\+>
+} >>
+@end lilypond
+
+This rewrite was sponsored by Trent Johnston and John Mandereau.
+
+@item
+Major internal cleanups: for each grob, a subproperty in
+@code{callbacks} property defines the procedure which computes it.
+
+@verbatim
+\override Beam #'callbacks #'direction
+ = #(lambda (grob)
+ (if (4 > (ly:grob-array-length (ly:grob-object 'stems)))
+ DOWN
+ UP))
+@end verbatim
+
+@noindent
+With this code fragment, the direction of a beam is decided to be up
+or down, depending on the number of stems in the beam.
+
+@item
+Subproperties, like the @code{details} field of @code{Slur} and
+@code{Tie} may now be tuned with @code{\override}. For example,
+
+@verbatim
+\override Stem #'details #'beamed-lengths = #'(4 4 3)
+@end verbatim
+
+@noindent
+shortens the stems in beams.
@item
The default paper size may now be set from the command line using
This feature was sponsored by Trevor Bača.
-@item
-Support for figured bass has been rewritten. Now it supports
-continuation lines, and its figures, brackets, and alignments may
-tuned separately.
-
-@lilypond[raggedright,fragment]
-<<
-\relative { c4 c c c }
-\figures {
- \set useBassFigureExtenders = ##t
- <6+ 4 3> <6 4 3> <4 3+>
-} >>
-@end lilypond
-This rewrite was sponsored by Trent Johnston.
@item
Vertical alignments of staves can now be tuned easily for individual
@item
Texts over multi measure rests can stretch the corresponding measure,
-if the appropriate @code{spacing-procedure} property is set.
+if the appropriate @code{spring-and-rods} callback is set.
@lilypond[relative=2,fragment,raggedright]
-\override MultiMeasureRestText #'spacing-procedure
+\override MultiMeasureRestText #'callbacks #'springs-and-rods
= #Multi_measure_rest::set_text_rods
c1 R1 R1^"Very long long long text"
@end lilypond
@lilypond[verbatim,raggedright]
smaller = {
\set fontSize = #-2
- \override Stem #'length = #5.5
+ \override Stem #'length-fraction = #0.8
\override Beam #'thickness = #0.384
- \override Beam #'space-function =
- #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
+ \override Beam #'length-fraction = #0.8
}
\addquote clarinet \relative {
c1 ~ \break c2 ~ c
}
@end lilypond
-@end ignore
@noindent
When applying this trick, the new @code{after-line-breaking} callback
\header {
- texidoc = "Pairs of congruent figured bass extender lines are vertically centered.
- "
+ texidoc = "Pairs of congruent figured bass extender lines are
+vertically centered if @code{figuredBassCenterContinuations} is set to
+true."
}
}
\figures {
\set useBassFigureExtenders = ##t
+ \set figuredBassCenterContinuations = ##t
<6+ 4 3>4 <6 4 3> r
<6+ 4 3>4 <6 4 3> <4 3+> r
}
--- /dev/null
+\header {
+
+ texidoc = "By adorning a bass figure with @code{\\!}, an extender
+ may be forbidden. "
+
+}
+\version "2.7.13"
+\paper { raggedright = ##t }
+
+\figures {
+ \set useBassFigureExtenders = ##t
+ <4 6 7>
+ <4\! 6 7->
+ }
texidoc = " Figured bass is created by the FiguredBass context which
responds to figured bass events and rest events. You must enter these
using the special @code{\figuremode @{ @}} mode, which allows you to
-type numbers, like @code{<4 6+>}.
+type numbers, like @code{<4 6+>} and add slashes and pluses.
-You can also enter markup strings. The vertical alignment may also be
-tuned.
+You can also enter markup strings. The vertical alignment may also be tuned.
"
}
\figures {
<3 [5 7]>
- <3 [5] 7 [9 11]>
+ <3\+ [5/] 7/ [9 11]>
<3+ 5- 7!>
<3 _! 5 _- 7>
<3 _ 5 _ 7>
-\version "2.6.0"
+\version "2.7.13"
%% +.ly: Be the first .ly file for lys-to-tely.py.
%% Better to make lys-to-tely.py include "introduction.texi" or
%% other .texi documents too?
-\version "2.7.10"
+\version "2.7.13"
\header {
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc= "@cindex make-music Fingering
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
"
}
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
\time 5/4
-\version "2.7.10"
+\version "2.7.13"
% TODO: split ancient-font into seperate files; possibly in
% different locations.
\header {
-\version "2.6.0"
+\version "2.7.13"
% TODO: move stuff from ancient-font into here? See comment
% for ancient-font.ly
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Bars Always
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Bar line lyric only
You can move @code{Bar_engraver} and @code{Span_bar_engraver} to
a different engraving context, if you want, for example, bar lines
%% need procedure, since lyrics doesn't have a staff_sym engraver.
- \override BarLine #'bar-size-procedure = #(lambda (x) 3.0)
+ \override BarLine #'bar-size = #3.0
}
\context{
\ChoirStaff
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc = "@cindex Bar Number Every Fifth Reset
" }
-\version "2.6.0"
+\version "2.7.13"
\relative c'{
\override Score.BarNumber #'break-visibility = #end-of-line-invisible
\set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
\override Score.BarNumber #'font-size = #2
- \override Score.BarNumber #'print-function
+ \override Score.BarNumber #'callbacks #'stencil
= #(make-stencil-boxer 0.1 0.25 Text_interface::print)
\repeat unfold 5 { c1 } \bar "|"
- \override Score.BarNumber #'print-function
+ \override Score.BarNumber #'callbacks #'stencil
= #(make-stencil-circler 0.1 0.25 Text_interface::print)
\repeat unfold 4 { c1 } \bar "|."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="@cindex Bar Number Show All
By default, bar numbers are printed only in the first measure. This
}
-\version "2.6.0"
+\version "2.7.13"
wipeNote = {
\once \override NoteHead #'transparent = ##t
-%% \version "2.6.0"
+%% \version "2.7.13"
%% keep for now, although merging into beam-auto-override is a possibility.
\header {
%% ugh
-%% \version "2.6.0"
+%% \version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="@cindex Beam Position Control
-%%\version "2.6.0"
+%%\version "2.7.13"
\header{
texidoc="@cindex Beam Count
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Boxed Stencil
\layout{raggedright = ##t}
\relative c'' {
- \override TextScript #'print-function =
+ \override TextScript #'callbacks #'stencil =
#(make-stencil-boxer 0.1 0.3 Text_interface::print)
c'4^"foo"
- \override Stem #'print-function =
+ \override Stem #'callbacks #'stencil =
#(make-stencil-boxer 0.05 0.25 Stem::print)
- \override Score.RehearsalMark #'print-function =
+ \override Score.RehearsalMark #'callbacks #'stencil =
#(make-stencil-boxer 0.15 0.3 Text_interface::print)
b8
- \revert Stem #'print-function
+ \revert Stem #'callbacks % stencil
+
c4. c4 \mark "F" c1
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Capital Letters
The font can be changed to small caps.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = " Chord names are generated from a list pitches. The
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Chord Names German
The english naming of chords (default) can be changed to german
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Circle
\mark \default
c2 d^\markup{\circle \finger "2"}
\override Score.BarNumber #'break-visibility = #all-visible
-\override Score.BarNumber #'print-function
+\override Score.BarNumber #'callbacks #'stencil
= #(make-stencil-circler 0.1 0.25 Text_interface::print)
}
\ No newline at end of file
-\version "2.5.20"
+\version "2.7.13"
\header {
texidoc = "@cindex compound time
@cindex plus
\relative {
%% compound time signature hack
\time 5/8
- \override Staff.TimeSignature #'print-function
+ \override Staff.TimeSignature #'callbacks #'stencil
= #(lambda (grob) (compound-time grob "2" "3" "8"))
#(override-auto-beam-setting '(end 1 8 5 8) 1 4)
c8 c c8 c c
-\version "2.6.0"
+\version "2.7.13"
% Ugh, we need to override some LaTeX titling stuff
" }
-\version "2.6.0"
+\version "2.7.13"
\include "gregorian-init.ly"
-\version "2.6.0"
+\version "2.7.13"
% probably should be merged into refman.
\header{
texidoc = "@cindex Dynamic Piu Forte
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="In polyphonic notation, many voices can share a staff: In
%% texidoc = "Include file for engraver example."
-\version "2.4.0"
+\version "2.7.13"
topVoice = \relative c' {
\key d\major
es8([ g] a[ fis])
-\version "2.7.6"
+\version "2.7.13"
\header {
texidoc = "The notation problem, creating a certain symbol,
-\version "2.6.0"
+\version "2.7.13"
% definitely wil be renamed to something.
%{
texidoc = "Frets are supported as markup commands."
}
-\version "2.6.0"
+\version "2.7.13"
\score {
<<
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Gregorian Scripts
-\version "2.6.0"
+\version "2.7.13"
#(if (not (defined? 'pieceTagLine))
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Instrument Name Grandstaff
You can have a name for the whole @code{GrandStaff} in addition to
individual @code{Staff}s. " }
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Ancient Vaticana
Vaticana ligature uses four staff lines, special clef, and
-\version "2.6.0"
+\version "2.7.13"
% MERGE with title.ly -gp
%{
-\version "2.6.0"
+\version "2.7.13"
% TODO:
% check with ancient- stuff. rename, merge, something. -gp
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="@cindex Ancient Mensural Note Heads
-\version "2.7.10"
+\version "2.7.13"
% possible rename to scheme- or something like that. -gp
\header { texidoc = "@cindex Scheme Move Text
Objects, like text, can be moved around by using some Scheme code.
-\version "2.7.10"
+\version "2.7.13"
\include "deutsch.ly"
% possible rename to scheme- something. -gp
% TODO: ask if it needs to have so many empty bars in the middle. -gp
-\version "2.7.10"
+\version "2.7.13"
pat = \transpose c c' \repeat unfold 2 {
<< { \context Staff = "up" {r8 e16 f g e f g } }
-\version "2.6.0"
+\version "2.7.13"
% possible rename to scheme- something. -gp
\header { texidoc = "@cindex Scheme Music Creation
-\version "2.6.0"
+\version "2.7.13"
% possible rename to bar-lines-foo. -gp
\header{ texidoc = "@cindex Bar Lines Remove
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Key Signature End of Line
\header { texidoc = "Ossia fragments can be done with starting and
stopping staves. " }
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
<<
-\version "2.6.0"
+\version "2.7.13"
% check with invisible-notes or blank-notes. possible rename. -gp
\header{ texidoc = "@cindex Partial Blank
When entering partially typeset music (i.e. for students to be
+++ /dev/null
-
-\header
-{
-
- texidoc = "It is possible to have different staff distances between
-the staffs of a piano system, but it requires some advanced Scheme code.
-Currently, this is for testing purposes. "
-
-}
-
-\version "2.6.0"
-
-#(define ((futz-alignment-callback distance count) grob axis)
-
- "Check if we're the system number COUNT, and if yes, set fixed distance to
-DISTANCE; then call the original callback. "
- (let*
- ((a (ly:grob-parent grob axis))
- (o (ly:grob-original a))
- (bs (if (ly:grob? o)
- (ly:spanner-broken-into o)
- #f))
- )
-
-
- (if (and (list? bs)
- (< count (length bs))
- (equal? (list-ref bs count) a)
- )
- (ly:grob-set-property! a 'forced-distance distance))
-
- (Align_interface::fixed_distance_alignment_callback grob axis)) )
-
-\score {
- \relative c'' \context PianoStaff
- \with {
- verticalAlignmentChildCallback = #(futz-alignment-callback 20 1)
-
- %% Every cross staff beam will trigger
- %% alignment unless autokneeing is switched off
- \override Beam #'auto-knee-gap = #'()
- } <<
-
- \context Staff = "up" {
-
- \time 2/4
- c8[
- \change Staff = down
- \once \override Stem #'direction = #UP
- c8
- \change Staff = up
- c c ](
- |
- \break
-
- c8[)
- \change Staff = down
- \once \override Stem #'direction = #UP
- c8
- \change Staff = up
- c c ](
- }
- \context Staff = "down" {
- \skip 1 }
-
- >>
- \layout { raggedright = ##T }
-}
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "
@cindex Preset Extent
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "@cindex Rests
-\version "2.7.10"
+\version "2.7.13"
% possible rename to scheme-something.
\header { texidoc="@cindex Scheme Reverse Music
Symmetric, or palindromical music can be produced, first, by printing
% this chart is used in the manual too.
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Script Abbreviations
Some articulations may be entered using an abbreviation.
-\version "2.6.0"
+\version "2.7.13"
% this chart is used in the manual too.
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Slur Minimum Length
By setting the minimum length of a slur, notes are more separated. "
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc="@cindex Smart Transpose
}
-\version "2.6.0"
+\version "2.7.13"
\paper {
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header{ texidoc="@cindex Nested Staff Groups
Staffs can be nested in various combinations. Here, @code{StaffGroup}
-\version "2.7.6"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Staff Size
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Stem Extend
Extending stems to the center line may be prevented using @code{no-stem-extend}.
-\version "2.6.0"
+\version "2.7.13"
\header {texidoc = "@cindex Tablature hammer
A hammer in tablature can be faked with slurs. "
}
-\version "2.6.0"
+\version "2.7.13"
\header {
}
-\version "2.6.0"
+\version "2.7.13"
\score {
\new Staff \relative c'' {
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex text spanner
Text spanners can be used in the similar manner than markings for pedals
used contemporary pieces with many time signature changes. "
}
-\version "2.7.6"
+\version "2.7.13"
\layout {
raggedright = ##T
}
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc = "Applying the standard function @code{unfold-repeats} unfolds
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
% TODO: huh? what's this file about? -gp
\header { texidoc = "
the @code{voltaOnThisStaff} property to true for the @code{ChordNames} context and to false for the topmost ordinary @code{Staff} context."
}
-\version "2.6.0"
+\version "2.7.13"
\score { <<
\new ChordNames \with {
voltaOnThisStaff = ##t
--- /dev/null
+/*
+ grob-array-scheme.cc -- implement Grob_array bindings.
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
+#include "grob-array.hh"
+#include "grob.hh"
+
+LY_DEFINE (ly_grob_array_length, "ly:grob-array-length",
+ 1, 0, 0,
+ (SCM grob_arr),
+ "Return the grob_array length.")
+{
+ Grob_array *me = unsmob_grob_array (grob_arr);
+ SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array");
+ return scm_from_int (me->size ());
+}
+
+
+LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref",
+ 2, 0, 0,
+ (SCM grob_arr, SCM index),
+ "Retrieve the @code{index} element of @code{grob-arr}.")
+{
+ Grob_array *me = unsmob_grob_array (grob_arr);
+ SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array");
+ SCM_ASSERT_TYPE (scm_is_integer (index), index, SCM_ARG2, __FUNCTION__, "integer");
+
+ int i = scm_to_int (index);
+ if (i < 0 || i >= me->size ())
+ {
+ scm_out_of_range (NULL, scm_from_size_t (i));
+ }
+
+ return me->grob (i)->self_scm ();
+}
+
return E_CLOSE;
case '[':
return E_BRACKET_OPEN;
+ case '+':
+ return E_PLUS;
case ']':
return E_BRACKET_CLOSE;
case '~':
Item *figure_item_;
Music *current_music_;
+ bool force_no_continuation_;
Figure_group ()
{
+ force_no_continuation_ = false;
continuation_line_ = 0;
number_ = SCM_EOL;
alteration_ = SCM_EOL;
{
return
current_music_
+ && !force_no_continuation_
&& ly_is_equal (number_,
current_music_->get_property ("figure"))
&& ly_is_equal (alteration_,
&& ly_is_equal (groups_[i].number_, fig))
{
groups_[i].current_music_ = m;
-
+ groups_[i].force_no_continuation_
+ = to_boolean (m->get_property ("no-continuation"));
continuation_ = true;
return true;
}
return;
alignment_ = 0;
- center_repeated_continuations();
-
+ if (to_boolean (get_property ("figuredBassCenterContinuations")))
+ center_repeated_continuations();
groups_.clear ();
}
bool use_extenders = to_boolean (get_property ("useBassFigureExtenders"));
if (!use_extenders)
{
- center_repeated_continuations ();
+ if (to_boolean (get_property ("figuredBassCenterContinuations")))
+ center_repeated_continuations ();
alignment_ = 0;
for (int i = 0; i < groups_.size (); i++)
{
"bass-figure-event rest-event",
/* read */
+ "figuredBassCenterContinuations "
"implicitBassFigures "
"newFiguredBassFormatter "
"figuredBassAlterationDirection "
%token E_OPEN "\\("
%token E_BRACKET_CLOSE "\\]"
%token E_ANGLE_OPEN "\\<"
+%token E_PLUS "\\+"
%token E_TILDE "\\~"
%token EXTENDER "__"
-/* These used at all?
- %token FIGURE_BRACKET_CLOSE
- %token FIGURE_BRACKET_OPEN
-
-parser.yy:348.8-25: warning: symbol `"\\>"' used more than once as a literal string
-parser.yy:352.8-24: warning: symbol `"\\<"' used more than once as a literal string
+/*
+If we give names, Bison complains.
*/
%token FIGURE_CLOSE /* "\\>" */
%token FIGURE_OPEN /* "\\<" */
%type <book> book_body
%type <i> bare_unsigned
-%type <i> bass_mod
+%type <i> figured_bass_alteration
%type <i> dots
%type <i> exclamations
%type <i> optional_rest
%type <scm> assignment_id
%type <scm> bare_number
%type <scm> bass_figure
+%type <scm> figured_bass_modification
%type <scm> br_bass_figure
%type <scm> bass_number
%type <scm> chord_body_elements
| full_markup { $$ = $1; }
;
-bass_mod:
+figured_bass_alteration:
'-' { $$ = -2; }
| '+' { $$ = 2; }
| '!' { $$ = 0; }
$$ = $1;
unsmob_music ($1)->set_property ("bracket-stop", SCM_BOOL_T);
}
- | bass_figure bass_mod {
+ | bass_figure figured_bass_alteration {
Music *m = unsmob_music ($1);
if ($2) {
SCM salter = m->get_property ("alteration");
m->set_property ("alteration", scm_from_int (0));
}
}
+ | bass_figure figured_bass_modification {
+ Music *m = unsmob_music ($1);
+ if ($2 == ly_symbol2scm ("plus"))
+ {
+ m->set_property ("augmented", SCM_BOOL_T);
+ }
+ else if ($2 == ly_symbol2scm ("slash"))
+ {
+ m->set_property ("diminished", SCM_BOOL_T);
+ }
+ else if ($2 == ly_symbol2scm ("exclamation"))
+ {
+ m->set_property ("no-continuation", SCM_BOOL_T);
+ }
+ }
;
+figured_bass_modification:
+ E_PLUS {
+ $$ = ly_symbol2scm ("plus");
+ }
+ | E_EXCLAMATION {
+ $$ = ly_symbol2scm ("exclamation");
+ }
+ | '/' {
+ $$ = ly_symbol2scm ("slash");
+ }
+ ;
+
br_bass_figure:
bass_figure {
$$ = $1;
\name CueVoice
\alias Voice
fontSize = #-4
- \override Stem #'lengths = #'(2.5 2.5 3.0 3.0)
+ \override Stem #'length-fraction = #(magstep -4)
+ \override Beam #'length-fraction = #(magstep -4)
}
\context {
str = re.sub(r"(override|revert)\s*([a-zA-Z.]+)\s*#'(spacing-procedure|after-line-breaking-callback"
+ r"|before-line-breaking-callback|print-function)",
subber, str)
+
+ if re.search ('bar-size-procedure', str):
+ error_file.write (NOT_SMART % "bar-size-procedure")
+ if re.search ('space-function', str):
+ error_file.write (NOT_SMART % "space-function")
+ if re.search ('verticalAlignmentChildCallback', str):
+ error_file.write ('verticalAlignmentChildCallback has been deprecated')
return str
conversions.append (((2, 7, 13), conv,
"extra vertical extent, same format as @var{minimumVerticalExtent}")
+ (figuredBassCenterContinuations ,boolean? "Whether to vertically center pairs of extender lines.")
(figuredBassAlterationDirection ,ly:dir? "Where to put
alterations relative to the main figure.")
(followVoice ,boolean? "If set, note heads are tracked across staff
(avoid-slur . inside)
(cautionary-style . parentheses)
(callbacks . ((stencil . ,Accidental_interface::print)
- (after-line-breaking . ,Accidental_interface::after_line_breaking)))
-
+ (after-line-breaking
+ . ,Accidental_interface::after_line_breaking)
+ ))
(meta . ((class . Item)
(interfaces . (accidental-interface
font-interface))))))
(AccidentalSuggestion
- . (
-
- (callbacks . ((stencil . ,Accidental_interface::print)))
+ . ((callbacks . ((stencil . ,Accidental_interface::print)))
(X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
,Self_alignment_interface::aligned_on_self))
(self-alignment-X . ,CENTER)
(Text_interface::interpret_markup layout props
(number->markletter-string number->mark-alphabet-vector num)))
+
+
+(def-markup-command (slashed-digit layout props num) (integer?)
+ "A feta number, with slash. This is for use in the context of
+figured bass notation"
+ (let*
+ ((mag (magstep (chain-assoc-get 'font-size props 0)))
+ (thickness
+ (* mag
+ (chain-assoc-get 'thickness props 0.16)))
+ (dy (* mag 0.15))
+ (number-stencil (interpret-markup layout
+ (prepend-alist-chain 'font-encoding 'fetaNumber props)
+ (number->string num)))
+ (num-x (interval-widen (ly:stencil-extent number-stencil X)
+ (* mag 0.2)))
+ (num-y (ly:stencil-extent number-stencil Y))
+ (slash-stencil
+ (ly:make-stencil
+ `(draw-line
+ ,thickness
+ ,(car num-x) ,(- (interval-center num-y) dy)
+ ,(cdr num-x) ,(+ (interval-center num-y) dy))
+ num-x num-y
+ )))
+
+ (ly:stencil-add number-stencil
+ (cond
+ ((= num 5) (ly:stencil-translate slash-stencil
+ ;;(cons (* mag -0.05) (* mag 0.42))
+ (cons (* mag -0.00) (* mag -0.07))
+
+ ))
+ ((= num 7) (ly:stencil-translate slash-stencil
+ ;;(cons (* mag -0.05) (* mag 0.42))
+ (cons (* mag -0.00) (* mag -0.15))
+
+ ))
+
+ (else slash-stencil)))
+ ))
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the note command.
(articulation-type ,string? "key for script definitions alist.
TODO: consider making type into symbol ")
+ (augmented ,boolean? "This figure is for an augmented figured bass (with +) sign.")
(associated-context ,string? "Name of the Voice context associated with this \\newaddlyrics section")
(bass ,boolean? "Set if this note is a bass note in a chord")
(cautionary ,boolean? "If set, this alteration needs cautionary accidental")
descend in the context tree.")
(denominator ,integer? "denominator in a time signature")
(digit ,integer? "digit for fingering")
+ (diminished ,boolean? "This bass figure should be slashed.")
(direction ,ly:dir? "Print this up or down?")
(drum-type ,symbol? "Which percussion instrument to play this note on.")
(error-found ,boolean? "If true, a parsing error was found in this expression")
(define-public (format-new-bass-figure figure event context)
(let* ((fig (ly:music-property event 'figure))
(fig-markup (if (number? figure)
- (markup #:number (number->string figure 10))
+ (if (eq? #t (ly:music-property event 'diminished))
+ (markup #:slashed-digit figure)
+ (markup #:number (number->string figure 10)))
#f
))
(alt (ly:music-property event 'alteration))
(alteration->text-accidental-markup alt))
#f))
+ (plus-markup (if (eq? #t (ly:music-property event 'augmented))
+ (markup #:number "+")
+ #f))
(alt-dir (ly:context-property context 'figuredBassAlterationDirection))
)
#:pad-x 0.2 alt-markup
)))
+ (if plus-markup
+ (set! fig-markup
+ (markup #:put-adjacent
+ fig-markup
+ X LEFT
+ #:pad-x 0.2 plus-markup)))
+
(if (markup? fig-markup)
(markup #:fontsize -2 fig-markup)
- empty-markup)))
+ empty-markup)
+
+ ))