+2005-10-17 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * python/convertrules.py (FatalConversionError.subber): conversion
+ rule for #'callbacks
+
+ * input/regression/override-nest.ly: new function.
+
+ * lily/parser.yy (music_property_def): allow \override #'a #'b =
+ #c too.
+
+ * lily/context-property.cc (lookup_nested_property): new function.
+ (evict_from_alist): new function.
+ (general_pushpop_property): new function.
+ (execute_general_pushpop_property): rewrite. Support nested
+ properties too.
+
2005-10-16 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/beam.cc: use length-fraction too.
-\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.4.0"
+\version "2.7.13"
\header{
texidoc="
texidoc = "With balloon texts, objects in the output can be marked,
with lines and explanatory text added."
}
-\version "2.7.10"
+\version "2.7.13"
\layout{ raggedright = ##t }
\relative c' {
%% by hand:
- \once\override Stem #'print-function = #Balloon_interface::print
- \once\override Stem #'balloon-original-callback = #Stem::print
- \once\override Stem #'balloon-text = #"I'm a stem"
- \once\override Stem #'balloon-text-offset = #'(3 . 4)
- \once\override Stem #'balloon-text-props
+ \once\override Stem #'callbacks #'stencil = #Balloon_interface::print
+ \once\override Stem #'balloon-original-callback = #Stem::print
+ \once\override Stem #'balloon-text = #"I'm a stem"
+ \once\override Stem #'balloon-text-offset = #'(3 . 4)
+ \once\override Stem #'balloon-text-props
= #'((font-family . roman))
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The meaning of @code{|} is stored in the
identifier @code{pipeSymbol}."
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header
{
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "@cindex Beaming Presets
There are presets for the @code{auto-beam} engraver in the case of common
"
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright= ##t }
\relative c'' {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="Simple beams on middle staffline are allowed to be
texidoc = "Beams that are not strictly concave are damped
according to their concaveness. "
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Fully concave beams should be horizontal. Informally spoken,
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Cross staff (kneed) beams do not cause extreme slopes."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Beams can be typeset over fixed distance aligned staves, beam
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "@cindex Beam Damp
Beams are less steep than the notes they encompass. " }
\layout{
\layout{ raggedright = ##t}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="Beamed stems have standard lengths if possible. Quantization is switched off in this example."
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Beams should behave reasonably well, even under extreme circumstances.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "In french style beaming, the stems do not go between beams."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc=" Funky kneed beams with beamlets also work. The beamlets
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "In complex configurations of knee beaming, according to
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="@cindex Beam Isknee
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Point-symmetric beams should receive the same
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Kneed beams (often happens with cross-staff beams)
}
-\version "2.7.12"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Explicit beams may cross barlines. "
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc=" Beams on ledgered notes should always reach the middle staff
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\relative c''{
\time 3/8
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
texidoc = "The number of beams does not change on a rest."
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="Beams in unnatural direction, have shortened stems, but do not look too short."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Automatic beaming works also in ternary time sigs."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Beaming can be also given explicitly."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Breathing signs are available in different tastes: commas (default),
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="Property chordChanges: display chord names only when
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The property @code{chordNameExceptions} can used
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The layout of the major 7 can be tuned with
@code{majorSevenSymbol}."
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Scripts can also be attached to chord elements."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "
Tremolo repeats can be constructed for short tremolos (total duration smaller than 1/4) too. Only some of the beams are connected to the stems.
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0" \header {
+\version "2.7.13" \header {
texidoc = "Octavation signs may be added to clefs. These
octavation signs may be placed below or above (meaning an octave
-\version "2.6.0"
+\version "2.7.13"
\header{
raggedright= ##t
}
-\version "2.7.10"
+\version "2.7.13"
\new PianoStaff <<
\context Staff = "up" {
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc = "Clusters are a device to denote that a complete range of
notes is to be played."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Single head notes may collide. "
}
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\relative <<
\new Staff {
}
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
<< <a c>2\\ { <b d>4 <b d>4 } >>
<< { <a c>2 } \\ { <b d>4. <b e>8 } >>
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "If collision resolution finds dotted note head must
on the right side."
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright= ##t }
% todo: b2 (up) + b8 down looks strange compared to c2up + b8. (down)
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Note heads in collisions should be merged if
they have the same positions in the extreme note heads.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc =
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "If NoteCollision has merge-differently-dotted = ##t note
}
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
{
\relative c'' \new Staff {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Oppositely stemmed chords, meshing into each other,
are resolved."
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
In addition to normal collision rules, there is support for polyphony,
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Each grob can have a color assigned to it.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Completion heads are broken across bar lines. This was
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Custodes may be engraved in various styles."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Dots move to the right when a collision with the (up)flag happens."
}
-\version "2.6.0" \header{
+\version "2.7.13" \header{
texidoc=" Noteheads can have dots, and rests too.
}
-\version "2.6.0"
+\version "2.7.13"
drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
drl = \drummode {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Broken crescendi should be open on one side."
}
-\version "2.6.0"
+\version "2.7.13"
\header {texidoc = "Dynamic letters are kerned, and their weight
matches that of the hairpin signs. The dynamic scripts should be
respectively."
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc=" Dynamics appear below or above the staff. If multiple
dynamics are linked with (de)crescendi, they should be on the same
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Crescendi may start off-notes, however, they should not collapse into flat lines."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = " Easy-notation (or Ez-notation) prints names in note heads.
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "
Fermatas over multimeasure rests are positioned as over normal rests.
}
-\version "2.7.12"
+\version "2.7.13"
\paper {
raggedright = ##t
}
}
-\version "2.7.12"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.7.12"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "With the new chord syntax, it is possible to associate
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Automatic fingering tries to put fingering instructions
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "
The line-spanners connects to the Y position of the note on the next line.
}
-\version "2.6.0"
+\version "2.7.13"
\paper {
% change for other default global staff size.
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "The magnification can be set for any font. Note
that this does not change variable symbols such as beams or slurs.
" }
-\version "2.6.0"
+\version "2.7.13"
\header {
passed to LaTeX and dvips to help it find the uncb font."
}
-\version "2.6.0"
+\version "2.7.13"
\paper
{
%% regression test for fret diagram markups
-\version "2.6.0"
+\version "2.7.13"
\paper {
-\version "2.7.10"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "The autobeamer is not confused by grace notes."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Bar line should come before the grace note."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace notes do tricky things with timing. If a measure
\layout { raggedright= ##t }
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
c4 d8[
\grace { e32[ d c d] } e8]
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc="@cindex Grace End
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "In nested syntax, graces are still properly handled."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Also in the nested syntax here, grace notes appear rightly."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Graces notes may have the same duration as the main note."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace notes may be put in a @code{partcombine}r."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Stripped version of trip.ly. Staves should be of correct length."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Pieces may begin with grace notes."
}
would lead to beam quanting program. "
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Here @code{startGraceMusic} should set @code{no-stem-extend} to
true; the two grace beams should be the same here.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace notes in different voices/staves are synchronized."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "There are three different kinds of grace types: the base
grace switches to smaller type, the appoggiatura inserts also a slur, and the
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "When grace notes are entered with unfolded repeats,
line breaks take place before grace notes.
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header{
staves synchronized with the notes."
}
-\version "2.6.0"
+\version "2.7.13"
skips =
{
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="Hairpin crescendi may be dashed. "
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc =
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
textFlat = \markup {\smaller \flat}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Instrument names are also printed on partial starting measures."
}
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Staff margins are also markings attached to barlines. They should be
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "Each clef have own accidental placing rules. " }
#(set-global-staff-size 16)
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "By setting @code{Staff.keySignature} directly,
key signatures can be set invidually per pitch.
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Key signatures may appear on key changes, even without a barline.
"
}
-\version "2.7.10"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
#(set-default-paper-size "a6" 'landscape)
pattern = \relative { a b c d \break }
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t}
\relative c'' {
\time 2/4
texidoc = "Ledger lines are shortened when they are very close. This ensures
that ledgers lines stay separate."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
withPaddingA = #(def-music-function (parser location padding music) (number? ly:music?)
texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
}
-\version "2.6.0"
+\version "2.7.13"
\paper {
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "With the @code{\\lyricsto} mechanism, individual lyric
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="Polyphonic rhythms and rests do not disturb
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header
{
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
bla -- bla -- bla -- bla --
\override LyricHyphen #'minimum-length = #0.7
- \override LyricHyphen #'spacing-procedure =
+ \override LyricHyphen #'callbacks #'springs-and-rods =
#Hyphen_spanner::set_spacing_rods
bla -- bla -- bla -- bla
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "In lyrics, hyphens may be used."
}
}
-\version "2.7.2"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "Melismata are triggered by manual beams."
texidoc = "Lyrics are not lowered despite the presence of an octavation 8."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
\context {
\Staff
}
}
-\version "2.7.4"
+\version "2.7.13"
-\version "2.7.8"
+\version "2.7.13"
\header {
texidoc = "The epsfile markup command reads an EPS file"
}
-\version "2.6.0"
+\version "2.7.13"
#(let* ((port (open-output-file "box.eps")))
texidoc = "The note markup function may be used to make metronome
markings. It works for a variety of flag, dot and duration settings."
}
-\version "2.6.0"
+\version "2.7.13"
{ c4^\markup {
\note #"1" #1
-\version "2.6.0"
+\version "2.7.13"
{
\fatText
texidoc = "Use \\score block as markup command."
}
-\version "2.6.0"
+\version "2.7.13"
tuning = \markup {
\score {
-\version "2.6.0"
+\version "2.7.13"
\header {texidoc="Markup scripts may be stacked."}
\layout { raggedright = ##t}
{
}
-\version "2.6.0"
+\version "2.7.13"
{
f'1-\markup {
-\version "2.6.0" % to be updated
+\version "2.7.13" % to be updated
#(def-markup-command (upcase paper props str) (string?)
"Upcase the string characters. Syntax: \\upcase #\"string\""
}
-\version "2.7.0"
+\version "2.7.13"
\markup {
this is normal text
}
-\version "2.6.0"
+\version "2.7.13"
%% TODO: should have 2/4 + 5/8 time sig style.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Mensural ligatures show different shapes, depending on the
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "There is limited support for mensural notation: note head
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
\tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "The multimeasure rest is centered exactly between bar lines."
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "There are both long and short instrument names.
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
<<
-\version "2.6.0"
+\version "2.7.13"
\header {
R2.^"4"
R2.*3_\markup { \roman "a1b2c3" }
R2.*10^"inner"^"top"_"inner"_"bot"
- \override MultiMeasureRestText #'spacing-procedure
+ \override MultiMeasureRestText #'callbacks #'springs-and-rods
= #Multi_measure_rest::set_text_rods
R2.^"very very very very very very long text"
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
@code{\bar}, but is implemented completely in Scheme."
}
-\version "2.6.0"
+\version "2.7.13"
myBar = #(def-music-function (parser location bar-type) (string?)
(context-spec-music
}
-\version "2.7.10"
+\version "2.7.13"
#(define (notes-to-skip m)
"Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips.
}
>>
-\version "2.6.0"
+\version "2.7.13"
-\version "2.6.0"
+\version "2.7.13"
% possible rename to staff-something. -gp
\header{ texidoc = "@cindex Staff Remove
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc=" By default, text is set with empty horizontal dimensions.
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Note heads are flipped on the stem to prevent collisions.
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
{
to the @code{tonic} property."
}
-\version "2.6.0"
+\version "2.7.13"
fragment = {
\key c \major
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Note head shapes may be set from several choices.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Note head lines (e.g. glissando)
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc=" The number of stafflines of a staff can be set. Ledger
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
"
}
-\version "2.6.0"
+\version "2.7.13"
%% . There must be a minimum distance between the octavation line and the
%% topmost staff line, taking into account the height of the closing
--- /dev/null
+\version "2.7.13"
+\header {
+
+ texidoc = "Sublist of grob property lists may be also tuned. In the
+next example, the @code{beamed-lengths} property of the @code{Stem}
+grob is tweaked."
+
+}
+
+\relative {
+ \override Stem #'details #'beamed-lengths = #'(8 8 8)
+ c8[ c]
+}
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
}
-\version "2.7.12"
+\version "2.7.13"
#(set-global-staff-size 11)
first system can be forced to be uniform."
}
-\version "2.7.11"
+\version "2.7.13"
\book {
\score {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="The a2 string is printed only on notes (i.e. not on rests),
and only after chords, solo or polyphony."
"
}
-\version "2.6.0"
+\version "2.7.13"
vone = \relative a' { g4 g f f e e d d }
vtwo = \relative a' { e4 e f f g g a a }
"
}
-\version "2.6.0"
+\version "2.7.13"
vone =
\header { texidoc = " Multimeasure rests are printed after solos, both
for solo1 and for solo2." }
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
\new Staff
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
<<
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
\new Staff
vone = \relative a' { d4 r8 d8 d8 r8 d8 r8 d2 ~ d2 ~ d4 }
vtwo = \relative g' { g4. g8 r2 g4 r4 r2 g4 }
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright= ##t }
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
vone = \relative a' {
g2 g g g4 g f' c c( c) c c c ~ c
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Unterminated piano pedal brackets run to the end of the piece. "
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "The standard piano pedals style comes with Ped symbols.
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="@code{PhrasingSlur}s go over normal slurs."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Distances between prefatory items (e.g. clef, bar,
}
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
<<
{ \grace e8 d2 }
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Once properties take effect during a single time step only."
}
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
}
-\version "2.6.0"
+\version "2.7.13"
A = \relative c' { c4 d e f | \cueDuring #"qB" #1 { R1 } | }
B = \relative c' { \cueDuring #"qA" #1 { R1 } | f4 e d c | }
@code{rest-event} is not in @code{quotedEventTypes}."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
}
\paper { raggedright= ##t }
-\version "2.6.0"
+\version "2.7.13"
quoted = \relative c'' {
R1
\grace g16 f4 \grace a16 bes4 \grace b16 c4 c4
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
@code{rest-event} is not in @code{quotedEventTypes}."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
}
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
\relative c'' {
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
}
-\version "2.7.6"
+\version "2.7.13"
\relative c'' \new Voice {
\set countPercentRepeats = ##t
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Measure repeats may be nested with beat repeats."
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Within a bar, beat repeats denote that a music snippet should be
played again."
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "Volta repeats may be unfolded through the music
function @code{\unfoldRepeats}."
-\version "2.7.10"
+\version "2.7.13"
\header {
texidoc = "Unfolding tremolo repeats. All fragments fill one
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "When too few alternatives are present, the first
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
fig = \relative c' {
<a c e>8[ r <c e a> r <e a c> r <a c e>]
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Rests should not collide with beams, stems and noteheads. Rests may
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Whole and half rests moving outside the staff should get
ledger lines."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Rests can have pitches--these will be affected by
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\new Staff \relative c' {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header
{
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Scripts can be stacked. The order is determined by a
priority field, but when objects have the same priority, the input
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright= ##t }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
foollilypondbook = "
\score
"
-\version "2.6.0"
+\version "2.7.13"
foollilypondbook = "
\score
"
-\version "2.6.0"
+\version "2.7.13"
foollilypondbook = "
\score
"
-\version "2.6.0"
+\version "2.7.13"
foollilypondbook = "
\score
"
-\version "2.6.0"
+\version "2.7.13"
foollilypondbook = "
\score
"
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Slurs behave decently when broken across a linebreak.
-\version "2.6.0"
+\version "2.7.13"
\header {texidoc = "@cindex Slur, dotted, dashed
The appearance of slurs may be changed from solid to dotted or dashed.
"
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="Slurs should not get confused by augmentation dots. With a lot
of dots, the problems becomes more visible."
texidoc = "Some composers use slurs both above and below chords.
This can be typeset by setting @code{doubleSlurs}"
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
\relative {
texidoc = "Dynamics avoid collision with slur."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
indent = 0\mm
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header {
the given pair. "
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##T }
\relative {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Slurs should look nice and symmetric. The curvature may increase
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc ="Slurs may be placed over rest. The slur will avoid colliding with
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##t
% #(define debug-slur-scoring #t)
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
scripts can be moved manually."
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
indent = 0\mm
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "Symmetric figures should lead to symmetric slurs."
-\version "2.6.0"
+\version "2.7.13"
\header
{
texidoc = "Symmetric figures should lead to symmetric slurs."
\layout {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\relative c'' {
\time 2/4
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Accidentals in different staves do not affect the
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Accidentals do not influence the amount of stretchable space.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Accidentals sticking out to the left
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Downstem notes following a barline are
printed with some extra space. This is an optical correction similar
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Clef changes at the start of a line get much more space
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="Broken engraving of a bar at the end of a line does not upset
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "
A voicelet (a very short voice to get polyphonic chords correct)
should not confuse the spacing engine."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
this does not disrupt the flow of the notes."
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
\context {
\Score
- \override NonMusicalPaperColumn #'print-function = #Paper_column::print
- \override PaperColumn #'print-function = #Paper_column::print
+ \override NonMusicalPaperColumn #'callbacks #'stencil = #Paper_column::print
+ \override PaperColumn #'callbacks #'stencil = #Paper_column::print
\override NonMusicalPaperColumn #'font-family = #'roman
\override PaperColumn #'font-family = #'roman
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Spacing uses the duration of the notes, but disregards
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Grace note spacing. "
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "For knees, the spacing correction is such that the
-\version "2.6.0" \header{
+\version "2.7.13" \header{
texidoc = "Concurrent tuplets should be equidistant on all staffs.
-\version "2.6.0"
+\version "2.7.13"
\header {
}
-\version "2.7.4"
+\version "2.7.13"
\paper { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Rests get a little less space, since they are narrower.
However, the quarter rest in feta font is relatively wide, causing this
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Notes that are shorter than the common shortest note get a
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Upstem notes before a barline are printed with some extra
-\version "2.6.0"
+\version "2.7.13"
\header{
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "For juxtaposed chords with the same direction, a
slight optical correction is used. It is constant, and works only if
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
}
-\version "2.7.4"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.7.4"
+\version "2.7.13"
\paper {
raggedright = ##t
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="Space from a normal note (or barline) to a grace note is
}
-\version "2.7.4"
+\version "2.7.13"
\relative c''
<<
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Span bars are drawn only between staff bar lines. By setting
bar lines to transparent, they are shown only between systems.
}
-\version "2.7.4"
+\version "2.7.13"
\paper { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc = "Staves can be started and stopped at command. "
}
-\version "2.6.0"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
#(layout-set-staff-size 6)
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The staff is a grob (graphical object) which may be adjusted as well, for example, to have 6 thick lines and a slightly large @code{staff-space}.
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "Stanza numbers are put left of their lyric. They
are aligned in a column." }
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
\header {
}
-\version "2.6.0"
+\version "2.7.13"
\layout { raggedright = ##t }
\relative {
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
Stem tremolos or rolls are tremolo signs that look like beam segments
-\version "2.7.0"
+\version "2.7.13"
\header { texidoc=" You can write stencil callbacks in Scheme, thus
providing custom glyphs for notation elements. A simple example is
\relative c' {
c4 e
- \override NoteHead #'print-function
+ \override NoteHead #'callbacks #'stencil
=
#(parenthesize-callback Note_head::print)
g bes
- \revert NoteHead #'print-function
- \override Beam #'print-function
+ \revert NoteHead #'callbacks % stencil
+
+ \override Beam #'callbacks #'stencil
=
#(parenthesize-callback Beam::print)
}
-\version "2.6.0"
+\version "2.7.13"
\paper {
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The size of every system is correctly determined; this
\layout {
\context {
\Score
- \override System #'print-function = #box-grob-stencil
+ \override System #'callbacks #'stencil = #box-grob-stencil
}
}
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc = "By setting betweensystempadding to a negative
value, it is possible to eliminate the anti-collision constraints.
Then setting @code{betweensystemspace} to a low (nonzero) value,
-\version "2.6.0"
+\version "2.7.13"
\header {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc =
"
}
-\version "2.6.0"
+\version "2.7.13"
\new TabStaff {
-\version "2.6.0"
+\version "2.7.13"
\header{ texidoc = "@cindex Tabulature
A sample tablature, with both normal staff and tab.
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "The @code{\\tag} command marks music expressions with a
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc= "Text spanners should not repeat start text when broken."
}
}
-\version "2.6.0"
+\version "2.7.13"
\paper { raggedright = ##t }
\relative {
texidoc = "Ties behave properly at line breaks."
}
-\version "2.7.8"
+\version "2.7.13"
\paper { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Tie engraver uses @code{busyGrobs} to keep track of
}
-\version "2.7.7"
+\version "2.7.13"
\paper {
indent = #0.0
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Tieing a grace to the to a following grace or main note works."
}
}
-\version "2.7.7"
+\version "2.7.13"
\layout {
raggedright = ##t
raggedright = ##t
}
-\version "2.7.7"
+\version "2.7.13"
frag =
\relative c'' {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Trill spanner"
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
raggedright = ##T
}
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "In combination with a beam, the bracket of the tuplet
}
-\version "2.7.4"
+\version "2.7.13"
\paper {
raggedright = ##t
start of the next non-tuplet note. "
}
-\version "2.7.4"
+\version "2.7.13"
\paper { raggedright = ##t
indent = 0.0 }
}
-\version "2.6.0"
+\version "2.7.13"
\layout {
indent = 0.0\mm
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc=" Tuplets may be nested."
}
-\version "2.6.0"
+\version "2.7.13"
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Tuplets may contain rests. "
raggedright = ##t
}
-\version "2.6.0"
+\version "2.7.13"
\new Voice {
\relative c'' {
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc = "Horizontal tuplet brackets are shifted vertically
-\version "2.6.0"
+\version "2.7.13"
\header{
texidoc="
-\version "2.6.0"
+\version "2.7.13"
%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
-\version "2.6.0"
+\version "2.7.13"
\header { texidoc= "
-\version "2.6.0"
+\version "2.7.13"
\header {
texidoc ="Broken volta spanners behave correctly at their left edge in all cases."
}
\layout { raggedright = ##t }
-\version "2.6.0"
+\version "2.7.13"
vmus = { \repeat volta 2 c1 \alternative { d e } }
since staff lines are in a different layer. "
}
-\version "2.6.0"
+\version "2.7.13"
\paper
{
Clef_engraver::set_glyph ()
{
SCM glyph_sym = ly_symbol2scm ("glyph");
- SCM glyph = get_property ("clefGlyph");
-
SCM basic = ly_symbol2scm ("Clef");
execute_pushpop_property (context (), basic, glyph_sym, SCM_UNDEFINED);
- execute_pushpop_property (context (), basic, glyph_sym, glyph);
+ execute_pushpop_property (context (), basic, glyph_sym, get_property ("clefGlyph"));
}
/**
else if (ly_symbol2scm ("accepts") == tag
|| ly_symbol2scm ("denies") == tag)
accept_mods_ = scm_cons (scm_list_2 (tag, sym), accept_mods_);
- else if (ly_symbol2scm ("poppush") == tag
- || ly_symbol2scm ("pop") == tag
+ else if (ly_symbol2scm ("pop") == tag
|| ly_symbol2scm ("push") == tag
|| ly_symbol2scm ("assign") == tag
|| ly_symbol2scm ("unset") == tag)
#include "warn.hh"
#include "paper-column.hh"
-/*
- Grob descriptions (ie. alists with layout properties) are
- represented as a (ALIST . BASED-ON) pair, where BASED-ON is the
- alist defined in a parent context. BASED-ON should always be a tail
- of ALIST.
-*/
+SCM
+lookup_nested_property (SCM alist,
+ SCM grob_property_path)
+{
+ if (scm_is_pair (grob_property_path))
+ {
+ SCM sym = scm_car (grob_property_path);
+ SCM handle = scm_assq (sym, alist);
+
+ if (handle == SCM_BOOL_F)
+ return SCM_EOL;
+ else
+ return lookup_nested_property (scm_cdr (handle),
+ scm_cdr (grob_property_path));
+ }
+ else
+ return alist;
+}
/*
- Push or pop (depending on value of VAL) a single entry (ELTPROP . VAL)
- entry from a translator property list by name of PROP
+ copy ALIST leaving out SYMBOL. Copying stops at ALIST_END
*/
+SCM
+evict_from_alist (SCM symbol,
+ SCM alist,
+ SCM alist_end)
+{
+ SCM new_alist = SCM_EOL;
+ SCM *tail = &new_alist;
+
+ while (alist != alist_end)
+ {
+ if (ly_is_equal (scm_caar (alist), symbol))
+ {
+ alist = scm_cdr (alist);
+ break;
+ }
+
+ *tail = scm_cons (scm_car (alist), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
+ alist = scm_cdr (alist);
+ }
+
+ *tail = alist;
+ return new_alist;
+}
void
-execute_pushpop_property (Context *trg,
- SCM prop, SCM eltprop, SCM val)
+general_pushpop_property (Context *context,
+ SCM context_property,
+ SCM grob_property_path,
+ SCM new_value
+ )
{
- SCM prev = SCM_EOL;
- if (scm_is_symbol (prop) && scm_is_symbol (eltprop))
+ if (!scm_is_symbol (context_property)
+ || !scm_is_symbol (scm_car (grob_property_path)))
{
- if (val != SCM_UNDEFINED)
- {
- Context *where = trg->where_defined (prop, &prev);
+ warning (_ ("need symbol arguments for \\override and \\revert"));
+ if (do_internal_type_checking_global)
+ assert (false);
+ }
- /*
- Don't mess with MIDI.
- */
- if (!where)
- return;
+ execute_general_pushpop_property (context, context_property,
+ grob_property_path, new_value);
+}
- if (where != trg)
- {
- SCM base = updated_grob_properties (trg, prop);
- prev = scm_cons (base, base);
- trg->internal_set_property (prop, prev);
- }
- if (!scm_is_pair (prev))
- {
- programming_error ("Grob definition should be cons");
- return;
- }
+/*
+
+ Grob descriptions (ie. alists with layout properties) are
+ represented as a (ALIST . BASED-ON) pair, where BASED-ON is the
+ alist defined in a parent context. BASED-ON should always be a tail
+ of ALIST.
- SCM prev_alist = scm_car (prev);
+ Push or pop (depending on value of VAL) a single entry entry from a
+ translator property list by name of PROP. GROB_PROPERTY_PATH
+ indicates nested alists, eg. '(beamed-stem-lengths details)
+
+*/
+void
+execute_general_pushpop_property (Context *context,
+ SCM context_property,
+ SCM grob_property_path,
+ SCM new_value
+ )
+{
+ SCM current_context_val = SCM_EOL;
+ if (new_value != SCM_UNDEFINED)
+ {
+ Context *where = context->where_defined (context_property, ¤t_context_val);
- if (scm_is_pair (prev_alist) || prev_alist == SCM_EOL)
- {
- bool ok = type_check_assignment (eltprop, val, ly_symbol2scm ("backend-type?"));
+ /*
+ Don't mess with MIDI.
+ */
+ if (!where)
+ return;
- /*
- tack onto alist:
- */
- if (ok)
- scm_set_car_x (prev, scm_acons (eltprop, val, prev_alist));
- }
- else
- {
- // warning here.
- }
+ if (where != context)
+ {
+ SCM base = updated_grob_properties (context, context_property);
+ current_context_val = scm_cons (base, base);
+ context->internal_set_property (context_property, current_context_val);
}
- else if (trg->where_defined (prop, &prev) == trg)
+
+ if (!scm_is_pair (current_context_val))
{
- SCM prev_alist = scm_car (prev);
- SCM daddy = scm_cdr (prev);
+ programming_error ("Grob definition should be cons");
+ return;
+ }
- SCM new_alist = SCM_EOL;
- SCM *tail = &new_alist;
+ SCM prev_alist = scm_car (current_context_val);
+ SCM symbol = scm_car (grob_property_path);
+ SCM target_alist
+ = lookup_nested_property (prev_alist,
+ scm_reverse (scm_cdr (grob_property_path)));
- while (prev_alist != daddy)
- {
- if (ly_is_equal (scm_caar (prev_alist), eltprop))
- {
- prev_alist = scm_cdr (prev_alist);
- break;
- }
-
- *tail = scm_cons (scm_car (prev_alist), SCM_EOL);
- tail = SCM_CDRLOC (*tail);
- prev_alist = scm_cdr (prev_alist);
- }
+ target_alist = scm_acons (symbol, new_value, target_alist);
- if (new_alist == SCM_EOL && prev_alist == daddy)
- trg->unset_property (prop);
- else
+ bool ok = true;
+ if (!scm_is_pair (scm_cdr (grob_property_path)))
+ {
+ ok = type_check_assignment (symbol, new_value, ly_symbol2scm ("backend-type?"));
+
+ /*
+ tack onto alist. We can use set_car, since
+ updated_grob_properties() in child contexts will check
+ for changes in the car.
+ */
+ if (ok)
{
- *tail = prev_alist;
- trg->internal_set_property (prop, scm_cons (new_alist, daddy));
+ scm_set_car_x (current_context_val, target_alist);
}
}
+ else
+ {
+ execute_general_pushpop_property (context,
+ context_property,
+ scm_cdr (grob_property_path),
+ target_alist
+ );
+ }
}
- else
+ else if (context->where_defined (context_property, ¤t_context_val) == context)
{
- warning (_ ("need symbol arguments for \\override and \\revert"));
- if (do_internal_type_checking_global)
- assert (false);
+ SCM current_value = scm_car (current_context_val);
+ SCM daddy = scm_cdr (current_context_val);
+ SCM symbol = scm_car (grob_property_path);
+ SCM new_alist = evict_from_alist (symbol, current_value, daddy);
+
+ if (new_alist == daddy)
+ context->unset_property (context_property);
+ else
+ context->internal_set_property (context_property, scm_cons (new_alist, daddy));
}
}
+void
+execute_pushpop_property (Context *context,
+ SCM context_property,
+ SCM grob_property,
+ SCM new_value
+ )
+{
+ general_pushpop_property (context, context_property,
+ scm_list_1 (grob_property),
+ new_value);
+}
+
/*
PRE_INIT_OPS is in the order specified, and hence must be reversed.
*/
SCM type = scm_car (entry);
entry = scm_cdr (entry);
- if (type == ly_symbol2scm ("push") || type == ly_symbol2scm ("poppush"))
+ if (type == ly_symbol2scm ("push"))
{
- SCM val = scm_cddr (entry);
- val = scm_is_pair (val) ? scm_car (val) : SCM_UNDEFINED;
-
- execute_pushpop_property (tg, scm_car (entry), scm_cadr (entry), val);
+ SCM context_prop = scm_car (entry);
+ SCM val = scm_cadr (entry);
+ SCM grob_prop_path = scm_cddr (entry);
+ execute_general_pushpop_property (tg, context_prop, grob_prop_path, val);
+ }
+ else if (type == ly_symbol2scm ("pop"))
+ {
+ SCM context_prop = scm_car (entry);
+ SCM val = SCM_UNDEFINED;
+ SCM grob_prop_path = scm_cdr (entry);
+ execute_general_pushpop_property (tg, context_prop, grob_prop_path, val);
}
else if (type == ly_symbol2scm ("assign"))
tg->internal_set_property (scm_car (entry), scm_cadr (entry));
Context (Object_key const *);
/* properties: */
- void execute_pushpop_property (SCM prop, SCM sym, SCM val);
SCM internal_get_property (SCM name_sym) const;
SCM properties_as_alist () const;
void internal_set_property (SCM var_sym, SCM value);
void apply_property_operations (Context *tg, SCM pre_init_ops);
void execute_pushpop_property (Context *trg, SCM prop, SCM eltprop, SCM val);
+void execute_general_pushpop_property (Context *context,
+ SCM context_property, SCM grob_property_path, SCM val);
SCM updated_grob_properties (Context *tg, SCM sym);
Context *find_context_below (Context *where,
SCM type_sym, String id);
}
| OVERRIDE simple_string embedded_scm '=' embedded_scm {
$$ = scm_list_4 (ly_symbol2scm ("push"),
- scm_string_to_symbol ($2), $3, $5);
+ scm_string_to_symbol ($2), $5, $3);
+ }
+ | OVERRIDE simple_string embedded_scm embedded_scm '=' embedded_scm {
+ $$ = scm_list_5 (ly_symbol2scm ("push"),
+ scm_string_to_symbol ($2), $6, $4, $3);
}
| REVERT simple_string embedded_scm {
$$ = scm_list_3 (ly_symbol2scm ("pop"),
music_property_def:
OVERRIDE context_prop_spec embedded_scm '=' scalar {
$$ = property_op_to_music (scm_list_4 (
- ly_symbol2scm ("poppush"),
+ ly_symbol2scm ("push"),
scm_cadr ($2),
- $3, $5));
- $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+ $5, $3));
+ $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+ }
+ | OVERRIDE context_prop_spec embedded_scm embedded_scm '=' scalar {
+ $$ = property_op_to_music (scm_list_5 (
+ ly_symbol2scm ("push"),
+ scm_cadr ($2),
+ $6, $4, $3));
+ $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
}
| REVERT context_prop_spec embedded_scm {
$$ = property_op_to_music (scm_list_3 (
SCM symbol = scm_cadr (op);
SCM args = scm_cddr (op);
SCM grob_val = SCM_UNDEFINED;
- SCM grob_sym = SCM_UNDEFINED;
+ SCM grob_path = SCM_UNDEFINED;
SCM val = SCM_UNDEFINED;
if (tag == ly_symbol2scm ("assign"))
}
else if (tag == ly_symbol2scm ("unset"))
m = MY_MAKE_MUSIC ("PropertyUnset");
- else if (tag == ly_symbol2scm ("poppush")
- || tag == ly_symbol2scm ("push"))
+ else if (tag == ly_symbol2scm ("push"))
{
m = MY_MAKE_MUSIC ("OverrideProperty");
- grob_sym = scm_car (args);
- grob_val = scm_cadr (args);
+ grob_val = scm_car (args);
+ grob_path = scm_cdr (args);
+ m->set_property ("pop-first", SCM_BOOL_T);
}
else if (tag == ly_symbol2scm ("pop")) {
m = MY_MAKE_MUSIC ("RevertProperty");
- grob_sym = scm_car (args);
+ grob_path = scm_cdr (args);
}
m->set_property ("symbol", symbol);
m->set_property ("value", val);
if (grob_val != SCM_UNDEFINED)
m->set_property ("grob-value", grob_val);
-
- if (grob_sym != SCM_UNDEFINED)
- {
- bool itc = do_internal_type_checking_global;
- /* UGH.
- */
- bool autobeam = ly_is_equal (symbol, ly_symbol2scm ("autoBeamSettings"));
- if (autobeam)
- do_internal_type_checking_global = false;
- m->set_property ("grob-property", grob_sym);
- if (autobeam)
- do_internal_type_checking_global = itc;
- }
-
- if (tag == ly_symbol2scm ("poppush"))
- m->set_property ("pop-first", SCM_BOOL_T);
-
+ if (grob_path != SCM_UNDEFINED)
+ m->set_property ("grob-property-path", grob_path);
return m;
}
return g;
}
+SCM
+get_property_path (Music *m)
+{
+ SCM grob_property_path = m->get_property ("grob-property-path");
+
+ SCM eprop = m->get_property ("grob-property");
+ if (scm_is_symbol (eprop))
+ {
+ grob_property_path = scm_list_1 (eprop);
+ }
+
+ return grob_property_path;
+}
+
void
Push_property_iterator::process (Moment m)
{
SCM sym = get_music ()->get_property ("symbol");
if (check_grob (get_music (), sym))
{
- SCM eprop = get_music ()->get_property ("grob-property");
+ SCM grob_property_path = get_property_path (get_music ());
SCM val = get_music ()->get_property ("grob-value");
if (to_boolean (get_music ()->get_property ("pop-first"))
&& !to_boolean (get_music ()->get_property ("once")))
- execute_pushpop_property (get_outlet (), sym, eprop, SCM_UNDEFINED);
+
+ execute_general_pushpop_property (get_outlet (), sym, grob_property_path, SCM_UNDEFINED);
- execute_pushpop_property (get_outlet (), sym, eprop, val);
+ execute_general_pushpop_property (get_outlet (), sym, grob_property_path, val);
}
Simple_music_iterator::process (m);
}
SCM sym = mus->get_property ("symbol");
if (check_grob (mus, sym))
{
- SCM eprop = mus->get_property ("grob-property");
+ SCM grob_property_path = get_property_path (mus);
- execute_pushpop_property (tg, sym, eprop, SCM_UNDEFINED);
+ execute_general_pushpop_property (tg, sym, grob_property_path, SCM_UNDEFINED);
}
return SCM_UNSPECIFIED;
}
if (check_grob (get_music (), sym))
{
- SCM eprop = get_music ()->get_property ("grob-property");
- execute_pushpop_property (get_outlet (), sym, eprop, SCM_UNDEFINED);
+ SCM grob_property_path = get_property_path (get_music ());
+ execute_general_pushpop_property (get_outlet (), sym, grob_property_path, SCM_UNDEFINED);
}
Simple_music_iterator::process (m);
}
conversions.append (((2, 7, 12), conv,
'''outputProperty -> overrideProperty'''))
-def conv (str):
- if re.search(r'(spacing-procedure|after-line-breaking-callback|before-line-breaking-callback|print-function)', str):
- error_file.write ("""
-Conversion rules for 2.7.13 layout engine refactoring haven't been written yet.
+def conv (str):
+ def subber (match):
+ newkey = {'spacing-procedure': 'springs-and-rods',
+ 'after-line-breaking-callback' : 'after-line-breaking',
+ 'before-line-breaking-callback' : 'before-line-breaking',
+ 'print-function' : 'stencil'} [match.group(3)]
+ what = match.group (1)
+ grob = match.group (2)
-""")
+ if what == 'revert':
+ return "revert %s #'callbacks %% %s\n" % (grob, newkey)
+ elif what == 'override':
+ return "override %s #'callbacks #'%s" % (grob, newkey)
+ else:
+ raise 'urg'
+ return ''
- raise FatalConversionError ()
-
+ 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)
return str
conversions.append (((2, 7, 13), conv,
(define-public ((add-balloon-text object-name text off) grob orig-context cur-context)
"Usage: see input/regression/balloon.ly "
(let* ((meta (ly:grob-property grob 'meta))
+ (callbacks (ly:grob-property grob 'callbacks))
(nm (if (pair? meta) (cdr (assoc 'name meta)) "nonexistant"))
- (cb (ly:grob-property grob 'print-function)))
- (if (equal? nm object-name)
+ (cb-handle (assoc 'stencil callbacks))
+ (cb (if cb-handle (cdr cb-handle) #f)))
+ (if (and (equal? nm object-name)
+ cb)
(begin
- (set! (ly:grob-property grob 'print-function) Balloon_interface::print)
+ (ly:grob-set-callback! grob 'stencil Balloon_interface::print)
(set! (ly:grob-property grob 'balloon-original-callback) cb)
(set! (ly:grob-property grob 'balloon-text) text)
(set! (ly:grob-property grob 'balloon-text-offset) off)