+2002-03-24 Han-Wen <hanwen@cs.uu.nl>
+
+ * VERSION: 1.5.47 released
+
+ * lily/line-spanner.cc (line_atom): change line-thickness to thickness
+
+ * lily/porrectus.cc: change line-thickness to thickness, change
+ stem-direction to direction.
+
+ * scm/backend-documentation-lib.scm (check-dangling-properties):
+ Automatically detect doc'ed properties that are not in an interface
+
+ * scm/grob-property-description.scm: property cleanup. Remove many
+ paper-column props that are non-existent.
+
+ * lily/grob.cc (Grob): only use molecule_extent_proc as default if
+ the grob has a molecule-callback.
+
+ * lily/*.cc: remove many set_interface() calls, and their
+ implementations.
+
+ * input/regression/spacing-knee.ly: new file
+
+ * input/regression/spacing-clef-first-note.ly: new file
+
+ * lily/staff-spacing.cc (get_spacing_params): different spacing
+ for pref matter to note at start of line, halfway during line.
+
+ * lily/note-spacing.cc (stem_dir_correction): apply 2nd stem direction
+ correction only if stems have same direction (i.e. not for
+ stem-clef combination).
+ (stem_dir_correction): maximal correction for knees.
+
+ * lily/*.cc: many updates to interface descriptions.
+
+ * lily/grob.cc (internal_set_grob_property): add interface check
+ for every set_grob_property call
+
+ * lily/*.cc: document interface stuff in C++
+
+ * lily/grob-interface.cc: new file. Add grob interfaces from C++.
+
+ * lily/volta-bracket.cc: naming: change volta spanner to
+ volta-bracket.
+
+ * input/bugs/*.ly: cleanup, remove lots of files.
+
+ * buildscripts/mf-to-table.py (write_ps_encoding): generate
+ .encoding file. WARNING: upgrade to pktrace 1.0.3
+
+ * mf/feta-toevallig.mf: change PS name for parentheses.
+
+2002-03-23 Mats Bengtsson <mats.bengtsson@s3.kth.se>
+
+ * scripts/ly2dvi.py (ly_paper_to_latexpaper): Use the correct unit
+ also for textheight
+
2002-03-23 Han-Wen <hanwen@cs.uu.nl>
+ * lily/scope.cc: remove file .
+
+ * lily/include/scope.hh: remove file. Remove Scope class
+
* VERSION: 1.5.46
* lily/beam.cc (score_slopes_dy, score_stem_lengths,
score_forbidden_quants): ): take out of SCM, pass parameters so
grob props are read only once. (wtk1-fugue2 from 31 sec to 14
secs).
+ (calc_stem_y): robustness: take care of last_visible_stem == 0.
+
* lily/lily-guile.cc (ly_unit): return internal unit.
* buildscripts/clean-fonts.sh: added search paths /var/cache/fonts
and /usr/share/texmf/fonts
+ * scripts/ly2dvi.py: Read unit from paper vars (43.jcn3).
+
2002-03-22 Han-Wen <hanwen@cs.uu.nl>
* lily/text-spanner.cc (brew_molecule): add #'thickness
@lilypondfile[printfilename]{lyrics-bar.ly}
+@lilypondfile[printfilename]{spacing-knee.ly}
+
+
+
@lilypondfile[printfilename]{non-empty-text.ly}
@lilypondfile[printfilename]{prefatory-spacing-matter.ly}
+@lilypondfile[printfilename]{spacing-clef-first-note.ly}
+
@lilypondfile[printfilename]{spacing-bar-stem.ly}
* Figured bass support
-* Improved grace notes
+* Improved beam formatting.
+
+* Improved grace notes.
* Better spacing.
* More ancient notation support.
-* Some entry optimizations
+* Some entry optimizations.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
-PATCH_LEVEL=46
+PATCH_LEVEL=47
MY_PATCH_LEVEL=
for m in charmetrics:
file.write (r'''\def\%s%s{\char%d}%s''' % (nm, m['tex'], m['code'],'\n'))
+def write_ps_encoding (file, global_info, charmetrics):
+ encs = ['.notdef'] * 256
+ for m in charmetrics:
+ encs[m['code']] = m['tex']
+
+ file.write ('/FetaEncoding [\n')
+ for m in range(0,256):
+ file.write (' /%s %% %d\n' % (encs[m], m))
+ file.write ('] def\n')
+
def write_fontlist (file, global_info, charmetrics):
nm = global_info['FontFamily']
file.write (r"""
(options, files) = getopt.getopt(
sys.argv[1:], 'a:d:hl:o:p:t:',
- ['afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
+ ['enc=', 'afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
+enc_nm = ''
texfile_nm = ''
depfile_nm = ''
afmfile_nm = ''
outdir_prefix = a
elif o == '--tex' or o == '-t':
texfile_nm = a
+ elif o == '--enc':
+ enc_nm = a
elif o == '--ly' or o == '-':
lyfile_nm = a
elif o== '--help' or o == '-h':
write_afm_metric (afm, g,m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
+ write_ps_encoding (open (enc_nm, 'w'), g, m)
+
write_deps (open (depfile_nm, 'wb'), deps, [base + '.dvi', texfile_nm, afmfile_nm])
if lyfile_nm != '':
write_fontlist(open (lyfile_nm, 'w'), g, m)
+++ /dev/null
-\version "1.3.148"
-\score {
- \context Staff \notes\relative c''<
- \context Voice=one {
- \voiceOne
- e2->
- }
- \context Voice=two {
- \voiceTwo
- f,2->
- }
- >
-}
\ No newline at end of file
+++ /dev/null
-\version "1.3.148"
-\header {
-texidoc="setting staff symbol properties the normal way is broken"
- title = "ancient font test"
- date = "2000"
-}
-
-
-
-\include "paper26.ly"
-
-global = \notes {
- \property Score.timing = ##f
-% \property Staff.TimeSignature \override #'style = #'old
-}
-
-upperVoice = \context Staff = upperVoice <
- \global
- \property Staff.StaffSymbol \override #'line-count = #4
- \notes \transpose c' {
- \property Voice.NoteHead \override #'style = #'mensural
- \property Voice.Stem \override #'stem-centered = ##t
- \property Staff.Custos \override #'style = #'vaticana
- \clef "vaticana_fa2"
- c2 d e f g
-
-% \property Staff.clefGlyph = #"clefs-vaticana_do"
-% \property Staff.clefPosition = #1
-% \property Staff.clefOctavation = #0
- \clef "vaticana_do2"
-
- a b c'
- b a g f
- \clef "vaticana_fa1"
- e d c1 \bar "|"
-
- \property Staff.Custos \override #'style = #'medicaea
- \clef "medicaea_fa2"
- c2 d e f g
- \clef "medicaea_do2"
- a b c'
- b a g f
- \clef "medicaea_fa1"
- e d c1 \bar "|"
-
- \property Staff.Custos \override #'style = #'hufnagel
- \clef "hufnagel_fa2"
- c2 d e f g
- \clef "hufnagel_do2"
- a b c'
- b a g f
- \clef "hufnagel_fa1"
- e d c1 \bar "||"
- }
->
-
-lowerVoice = \context Staff = lowerNotes <
- \global
- \property Staff.StaffSymbol \override #'line-count = #5
- \notes \transpose c' {
- \property Voice.NoteHead \override #'style = #'mensural
- \property Voice.Stem \override #'stem-centered = ##t
- \property Staff.Custos \override #'style = #'mensural
- \clef "mensural1_c2"
- c2 d e f g
- \property Staff.forceClef = ##t
- \clef "mensural1_c2"
- a b c'
- b a g f
- \clef "mensural2_c2"
- e d c1 \bar "|"
-
- \clef "mensural2_c2"
- c2 d e f g
- \property Staff.forceClef = ##t
- \clef "mensural3_c2"
- a b c'
- b a g f
- \clef "mensural3_c2"
- e d c1 \bar "|"
-
- \clef "mensural1_f"
- c2 d e f g
- \property Staff.forceClef = ##t
- \clef "mensural1_f"
- a b c'
- b a g f
- \clef "mensural2_f"
- e d c1 \bar "|"
-
- \property Staff.forceClef = ##t
- \clef "mensural2_f"
- c2 d e f g
- \clef "mensural_g"
- a' b' c''
- b' a' g' f'
- \property Staff.forceClef = ##t
- \clef "mensural_g"
- e' d' c'1 \bar "|"
-
- \property Staff.forceClef = ##t
- \clef "mensural_g"
- c'2 d' e' f' g'
- \clef "hufnagel_do_fa"
- a b c'
- b a g f
- \property Staff.forceClef = ##t
- \clef "hufnagel_do_fa"
- e d c1 \bar "||"
- }
->
-
-\score {
- \context ChoirStaff <
- \upperVoice
- \lowerVoice
- >
- \paper {
-% \paperTwentysix
- linewidth = 17.25\cm
- textheight = 26.0\cm
- indent = 0.0
- \translator {
- \StaffContext
- \consists Custos_engraver
-% Custos \override #'style = #'mensural
- \remove Time_signature_engraver
-% StaffSymbol \override #'line-count = #4
- }
- }
-}
-
\version "1.3.148"
\header {
+
texidoc="The Automatic beamer does not put @strong{unfinished} beams
on the last notes of a score."
}
+++ /dev/null
-\header {
-texidoc="Automatic beamer behaves differently in different measuere locations."
-}
-\version "1.3.148"
-
-\score { \notes {
-
- [\times 2/3 {c16 c c} c8]
- [\times 2/3 {c16 c c} c8]}}
+++ /dev/null
-
-
-
-\score{<
- \notes \relative c'' \context Staff=violin{
- \time 3/4
-s2.
- \grace a b4
- }
- \notes \relative c'' \context Staff=violoncello{
- \time 3/4
- \clef tenor
-s2. \clef bass b4
- }
->
-\paper{
- linewidth=-1
-}
-}
-
+++ /dev/null
-\header {
-texidoc = "context level weirdness. after some commands, explicit
- \context Voice commands must be inserted; otherwise subsequent property
- settings fail silently"
-}
-
-% from les-nereides.ly
-
- #(define (make-text-checker text)
- (lambda (elt) (equal? text (ly-get-grob-property elt 'text))))
-
-\score {
- \context PianoStaff <
- \context Staff=upper \notes\relative c' {
- \property Score.timing = ##f
-
- \outputproperty #(make-text-checker "foe") #'extra-offset = #'(-2 . 4)
- c-"foe"
-
- \translator Staff=lower
-
- % staff switch moves us
- % implicitely to staff level: text-checker won't see "foe"
- \outputproperty #(make-text-checker "foe") #'extra-offset = #'(-2 . 4)
- c-"foe"
-
- % get back to Voice level: it works again
- \context Voice
- \outputproperty #(make-text-checker "foe") #'extra-offset = #'(-2 . 4)
- c-"foe"
-
- \clef treble
-
- % clef change moves us
- % implicitely to staff level: text-checker won't see "foe"
- \outputproperty #(make-text-checker "foe") #'extra-offset = #'(-2 . 4)
- c-"foe"
-
- % get back to Voice level: it works again
- \context Voice
- \outputproperty #(make-text-checker "foe") #'extra-offset = #'(-2 . 4)
- c-"foe"
-
- }
- \context Staff=lower \notes\relative c' {
- s
- }
- >
- \paper {
- linewidth = -1.0
- }
-}
\ No newline at end of file
+\header {
+ texidoc = "Tie code is not prepared for staff changes."
+}
\version "1.4.8"
\header {
texidoc = " Spacing for one staff in polymetric music should
-be not hampered by a staff in another time signature."
+be not hampered by a staff in another time signature.
+
+FIXME example was broken at some point.
+"
}
\score{
+++ /dev/null
-\header {
-
-texidoc="
-
- Interpreting music...
- m.ly:3:14: warning: No ties were created!:
- <c4 g' e'>~
- <c g' e'>
-
- MIDI output to `m.midi'...
-"
-}
-
-chordexamples = \notes \relative c' {
- <c4 g' e'>~<c g' e'>
- <c4 g' e'>~<cis4 gis' e'>
- <c4 g' e'>~<\context Voice = x {<cis4 gis'>} e'>
- <c e g>~<a cis e g bes>
-}
-
-\score {
- \context PianoStaff <
- \context Staff = upper <
- \clef treble
- \context Voice = i { \voiceOne \chordexamples }
- >
- >
- \paper { }
- \midi { \tempo 4 = 120 }
-}
-
+++ /dev/null
-\header{
- texidoc="no tie is generated for first chord of score. workaround: begin
-with s1*0 spacer note."
- }
-
-\score {
- \context Staff \notes {
- % s1*0
- <a1> ~ <a>
- }
-}
\ No newline at end of file
+++ /dev/null
-\version "1.3.148"
-
-
- % ?
-
-\score {
-\notes \context Voice = VA \relative c'' {
- \grace {[b8^1 c^2]} d4^3
-}
-\paper {linewidth = -1. }}
+%
+% Autoknee-ing triggers hara-kiri too early.
+%
\score { \notes \transpose c'''
\context PianoStaff <
+++ /dev/null
-\version "1.3.148"
-%docme -- geen id, lijkt ok?
-
-\include "paper20.ly"
-Sopnotes = \notes {
- \time 4/4
- \key g \major
- \clef treble
- \partial 8 * 3
- e'8 f'8 g'8 |
- d'8 d'16 d'16 e'8. e'16 g'8 g'8 f'8 f'8
-}
-
-\score {
- \notes
- <
- \context Staff="sop"
- <
- \Sopnotes
- >
- >
- \paper {
- \translator {
- \StaffContext
- autoBeamSettings \override #'(end * * * * ) = #(make-moment 1 8)
- }
- }
-}
+++ /dev/null
-\version "1.3.148"
-
-\header { texidoc= "Spacing after clef/key should be stretched
-equidistantly for large stretching, but should stay clear of prefatory
-matter for small stretching. Support in the spacing engine for
-separate spring constants for stretching/shrinking is needed"
-}
-
-foo = \notes\relative c'' { \key as \major f }
-
-\score {
-
- < \foo
- >
-}
+
+% ??
+
\version "1.3.148"
\score{
[) a'8. gis16 fis8. cis16] |
}
\paper{
- linewidth = 3.0\cm
+ linewidth = 3.5\cm
indent = .0
}
}
\version "1.3.148"
+
\header{
texidoc="separate staff-size is clumsy with \override.
Also, it doesn't seem to work anymore."
\version "1.3.148"
\header{
-texidoc="what about this. -> regression?"
+
+ texidoc= "The 8th notes should have regular spacing. (TODO: check
+ with printed ed.) "
+
+
}
\score {
\notes \relative c' <
\context Staff = SA { c4. c8 \times 2/3 { [c8 c c] } }
-\context Staff = SB { c8 c c c c c }
+\context Staff = SB { [c8 c c c c c] }
>
\paper { linewidth = -1. }
+++ /dev/null
-\version "1.3.148"
-
-\header {
- texidoc="Positioning of last ties is incorrect ties between 2-1 and 1-1
- durations differ."
-}
-
-\score {
- \context Staff <
- \context Voice = a \notes\relative c'' {
- \voiceOne
- r2 a2 a1~a
- }
- \context Voice = y \notes\relative c' {
- \voiceTwo
- r2 a2~a1~a
- }
- >
- \paper {
- linewidth = 100 * \staffspace
- }
-}
+++ /dev/null
-\version "1.3.148"
-
-\header {
-texidoc = "Simple beams. This broke somewhere < 1.3.110
-"
- title = "Gammes Chromatiques"
- composer = ""
- filename = "gammes_chromatiques.ly"
-}
-
-%{
- - At bar 3 of 2nd score, stems are too big (or the beams are
- badly positionned)
-%}
-
-exI = \notes \relative c' {
- \repeat "volta" 2 {
- \times 2/3 {c8( cis d} \times 2/3 {dis e f}
- \times 2/3 {fis g gis} \times 2/3 {a bes b} |
- \property Voice.TupletBracket \override #'tuplet-number-visibility = ##f
- \property Voice.TupletBracket \override #'tuplet-bracket-visibility = ##f
- \times 2/3 {c8 cis d} \times 2/3 {dis e f}
- \times 2/3 {fis g gis} \times 2/3 {a bes b} |
- \times 2/3 {c b bes} \times 2/3 {a aes g}
- \times 2/3 {fis f e} \times 2/3 {ees d des} |
- \times 2/3 {c b bes} \times 2/3 {a aes g}
- \times 2/3 {fis f e} \times 2/3 {ees d )des}
- }
- c1 || \break
-}
-
-\score { \context Staff { \notes { \exI } } }
(let* (
(fn (ly-get-default-font grob))
- (pclose (ly-find-glyph-by-name fn "accidentals-)"))
- (popen (ly-find-glyph-by-name fn "accidentals-("))
+ (pclose (ly-find-glyph-by-name fn "accidentals-rightparen"))
+ (popen (ly-find-glyph-by-name fn "accidentals-leftparen"))
(subject (callback grob))
; remember old size
--- /dev/null
+\header {
+
+ texidoc = "clef changes at the start of a line get much more space
+than clef changes halfway the line."
+
+}
+
+\score {\notes {
+ < \context Staff = SA {
+ c2
+ \clef bass e16 f a
+ \clef treble b
+ }
+ \context Staff = SB {
+ c4 c4 c4
+ }>
+ }
+ \paper { linewidth = -1.
+\translator { \StaffContext
+ TimeSignature = \turnOff
+ }
+
+ }}
--- /dev/null
+\header {
+texidoc = "For knees, the spacing correction is such that the
+stems are put at regular distances.
+"
+ }
+\score { \notes
+{
+[g''8 g g'' g'']
+
+ }
+\paper { linewidth = -1. }
+ }
+
\property Voice.Porrectus \override #'style = #'vaticana
\property Voice.Porrectus \override #'solid = ##t
\property Voice.Porrectus \override #'add-stem = ##t
- \property Voice.Porrectus \override #'stem-direction = #-1
- \property Voice.Porrectus \override #'line-thickness = #0.5
+ \property Voice.Porrectus \override #'direction = #-1
+ \property Voice.Porrectus \override #'thickness = #0.5
\key es \major
\clef "vaticana_fa2"
c!1 des! e! f! ges!
\property Voice.Porrectus \override #'solid = ##f
\property Voice.Porrectus \override #'add-stem = ##t
\property Voice.Porrectus \override #'stem-direction = #1
- \property Voice.Porrectus \override #'line-thickness = #0.7
+ \property Voice.Porrectus \override #'thickness = #0.7
% \property Voice.Porrectus \override #'auto-properties = ##t
-% \property Voice.Porrectus \override #'porrectus-width = #3.0
+% \property Voice.Porrectus \override #'width = #3.0
\key a \major
% IMPORTANT NOTE:
if (!key_item_p_)
{
key_item_p_ = new Item (get_property ("Accidentals"));
- Local_key_item::set_interface (key_item_p_);
- Staff_symbol_referencer::set_interface (key_item_p_);
SCM c0 = get_property ("centralCPosition");
if (gh_number_p (c0))
Staff_symbol_referencer::set_position (key_item_p_, gh_scm2int (c0));
Axis_group_interface::add_element (me, s);
}
-
-void
-Align_interface::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("align-interface"));
-
- Axis_group_interface::set_interface (me);
-}
-
void
Align_interface::set_axis (Grob*me,Axis a)
{
return me && me->has_interface (ly_symbol2scm ("align-interface"));
}
+
+ADD_INTERFACE (Align_interface, "align-interface",
+ " Order grobs top to bottom/left to right/right to left etc.",
+ "forced-distance stacking-dir align-dir threshold alignment-done center-element elements axes");
+
+
+
+ADD_INTERFACE (Foobar, "aligned-interface",
+ "read by align-interface",
+ "minimum-space-pair extra-space");
return ly_interval2scm (arpeggio.extent (X_AXIS) * 1.5);
}
+
+
+ADD_INTERFACE (Arpeggio, "arpeggio-interface",
+ "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads.",
+ "stems arpeggio-direction");
+
Axis_group_engraver::initialize ()
{
staffline_p_ = get_spanner_p ();
- Axis_group_interface::set_interface (staffline_p_);
- Axis_group_interface::set_axes (staffline_p_, Y_AXIS, Y_AXIS);
Grob * it = unsmob_grob (get_property ("currentCommandColumn"));
Hara_kiri_engraver::get_spanner_p () const
{
Spanner * sp = new Spanner (get_property ("HaraKiriVerticalGroup"));
- Hara_kiri_group_spanner::set_interface (sp);
+
return sp;
}
return me && me->has_interface (ly_symbol2scm ("axis-group-interface"));
}
-void
-Axis_group_interface::set_interface (Grob*me)
-{
- if (!has_interface (me))
- {
- me->set_interface (ly_symbol2scm ("axis-group-interface"));
- }
-}
+
+ADD_INTERFACE (Axis_group_interface, "axis-group-interface",
+ "a group of coupled grobs",
+ "axes");
return SCM_UNSPECIFIED;
}
-void
-Bar_line::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("bar-line-interface"));
-}
bool
Bar_line::has_interface (Grob*m)
else
return gh_int2scm (0);
}
+
+
+
+ADD_INTERFACE (Bar_line, "bar-line-interface",
+ "Bar line.
+
+This is a request to print a special bar symbol. It replaces the
+regular bar symbol with a special
+symbol. The argument @var{bartype} is a string which specifies the
+kind of bar to print. Options are @code{:|}
+@cindex |A@@@code{:|}
+,
+@code{|:}
+@cindex |B@@@code{|:}
+, @code{:|:}
+@cindex |C@@@code{:|:}
+,
+@code{||}
+@cindex |D@@@code{||}
+, @code{|.}
+@cindex |E@@@code{|.}
+,
+@code{.|}
+@cindex |F@@@code{.|}
+, and @code{.|.}
+@cindex |G@@@code{.|.}
+.
+
+These produce, respectively, a right repeat, a left repeat, a double
+repeat, a double bar, a start bar, an end bar, and a thick double bar.
+If @var{bartype} is set to @code{empty} then nothing is printed,
+but a line break is allowed at that spot.
+"
+,
+ "bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function");
TODO:
take some y-position (chord/beam/nearest?) into account
- scmify forced-fraction */
+ scmify forced-fraction
+
+ TODO:
+
+ why is shorten stored in beam, and not directly in stem?
+
+*/
void
Beam::set_stem_shorten (Grob *m)
{
/*
TODO:
+
- Make all demerits customisable
- - One sensible check per demerit
+
+ - One sensible check per demerit (what's this --hwn)
+
- Add demerits for quants per se, as to forbid a specific quant
entirely
- */
+
+*/
MAKE_SCHEME_CALLBACK (Beam, quanting, 1);
SCM
Beam::quanting (SCM smob)
-/*
-
-TODO:
-use filter and standard list functions.
-
-*/
int
Beam::visible_stem_count (Grob *me)
{
return me->has_interface (ly_symbol2scm ("beam-interface"));
}
+
+ADD_INTERFACE (Beam, "beam-interface",
+ "A beam.
+
+#'thickness= weight of beams, in staffspace
+ ",
+ "concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
+
if (!align_l_)
{
align_l_ = new Item (get_property ("BreakAlignment"));
- Break_align_interface::set_interface (align_l_);
+
announce_grob (align_l_, SCM_EOL);
Item * edge = new Item (get_property ("LeftEdge"));
{
group = new Item (get_property ("BreakAlignGroup"));
- Axis_group_interface::set_interface (group);
- Axis_group_interface::set_axes (group, X_AXIS,X_AXIS);
-
group->set_grob_property ("break-align-symbol", align_name);
group->set_parent (align_l_, Y_AXIS);
announce_grob(group, item_l->self_scm());
Axis_group_interface::add_element (me, toadd);
}
-void
-Break_align_interface::set_interface (Grob*me)
-{
- Align_interface::set_interface (me);
- Align_interface::set_axis (me,X_AXIS);
-}
-
void
Break_align_interface::do_alignment (Grob *me)
{
int idx = 0;
- while (extents[idx].empty_b ())
+ while (idx < extents.size () && extents[idx].empty_b ())
idx++;
Array<Real> offsets;
}
+
+ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface",
+ "Items that are aligned in prefatory matter.
+
+The spacing of these items is controlled by the space-alist
+property. It contains a list break-align-symbols with a specification
+of the associated space. The space definition is either (extra-space
+. @var{number}), which adds space after the symbol, (minimum-space
+. @var{ms}), which pads the space until it it is @var{ms}.
+
+
+Special keys for the alist are 'first-note and 'next-note, signifyign
+the first note on a line, and the next note halfway a line.
+
+",
+ "break-align-symbol break-alignment-done space-alist");
+
+ADD_INTERFACE (Break_align_interface, "break-alignment-interface",
+ "See @ref{break-aligned-interface}.",
+ "break-alignment-done");
+
+
+
SCM b = get_property ("BreathingSign");
breathing_sign_p_ = new Item (b);
- Breathing_sign::set_interface (breathing_sign_p_);
-
announce_grob(breathing_sign_p_, breathing_sign_req_l_->self_scm());
breathing_sign_req_l_ = 0;
}
return gh_double2scm (inter_f * sz * d);
}
-void
-Breathing_sign::set_interface (Grob *b)
-{
- Staff_symbol_referencer::set_interface (b);
-}
+ADD_INTERFACE(Breathing_sign, "breathing-sign-interface",
+ "A breathing sign.",
+ "direction");
return mol.smobbed_copy ();
}
+
+
+ADD_INTERFACE (Chord_name, "chord-name-interface",
+ "generate a chord name",
+ "pitches chord inversion bass begin-of-line-visible");
+
if (flags)
{
stem_tremolo_ = new Item (get_property ("StemTremolo"));
- Stem_tremolo::set_interface (stem_tremolo_);
-
announce_grob(stem_tremolo_, repeat_->self_scm());
- stem_tremolo_->set_grob_property ("tremolo-flags",
+ stem_tremolo_->set_grob_property ("flag-count",
gh_int2scm (flags));
}
Item *c= new Item (get_property ("Clef"));
announce_grob(c, SCM_EOL);
- Staff_symbol_referencer::set_interface (c);
-
clef_p_ = c;
}
SCM cpos = get_property ("clefPosition");
}
-void
-Clef::set_interface (Grob* me)
-{
- me->set_interface (ly_symbol2scm ("clef-interface"));
-}
MAKE_SCHEME_CALLBACK (Clef,brew_molecule,1)
SCM
return SCM_EOL;
}
}
+
+
+ADD_INTERFACE (Clef, "clef-interface",
+ "A clef sign",
+ "non-default full-size-change glyph-name");
+
if (!col_p_)
{
col_p_ = new Item (get_property ("NoteCollision"));
- Axis_group_interface::set_interface (col_p_);
- Axis_group_interface::set_axes (col_p_, X_AXIS, Y_AXIS);
-
announce_grob (col_p_, SCM_EOL);
}
Axis_group_interface::add_element (me, ncol_l);
me->add_dependency (ncol_l);
}
+
+
+ADD_INTERFACE (Collision, "note-collision-interface",
+ "An object that handles collisions between notes with different
+stem directions and horizontal shifts. Most of the interesting
+properties are to be set in @ref{note-column-interface}",
+ "merge-differently-dotted note-width collision-done");
{
Item *note_p = new Item (get_property ("NoteHead"));
- Staff_symbol_referencer::set_interface (note_p);
-
Music * req = note_req_l_arr_[i];
if (scratch_note_reqs_.size())
{
/* TODO:
- merge create_ledger_line () and Note_head::create_ledger_line ()
-
- rewrite create_ledger_line () to support short and thin ledger lines
if (gh_symbol_p (scm_style))
{
String style = ly_scm2string (scm_symbol_to_string (scm_style));
+
+ /*
+ DOCME:
+
+ Why would we want it differently? What's the meaning of adjust ?
+ */
bool adjust =
to_boolean (me->get_grob_property ("adjust-if-on-staffline"));
{
return m && m->has_interface (ly_symbol2scm ("custos-interface"));
}
+
+
+ADD_INTERFACE (Custos, "custos-interface",
+ "A custos is a staff context symbol that appears at the end of a
+ staff line with monophonic musical contents (i.e. with a single
+ voice). It anticipates the pitch of the first note of the following
+ line and thus helps the player or singer to manage line breaks
+ during performance, thus enhancing readability of a score.
+
+ Custodes were frequently used in music notation until the 16th
+ century. There were different appearences for different notation
+ styles. Nowadays, they have survived only in special forms of
+ musical notation such as via the editio vaticana dating back to the
+ beginning of the 20th century.
+
+[TODO: add to glossary]",
+ "style adjust-if-on-staffline neutral-position");
#include "axis-group-interface.hh"
#include "stem.hh"
+/*
+ TODO: let Dot_column communicate with stem via Note_column.
+ */
+
MAKE_SCHEME_CALLBACK (Dot_column,force_shift_callback,2);
SCM
Dot_column::force_shift_callback (SCM element_smob, SCM axis)
}
}
+
+
+
+ADD_INTERFACE (Dot_column, "dot-column-interface",
+ "Interface that groups dots so they form a column",
+ "stem");
+
+
+ADD_INTERFACE (Dots, "dots-interface",
+ "The dots to go with a notehead/rest. A separate interface, since they
+are a party in collision resolution.
+#'direction is the Direction to handle staff-line collisions in.",
+ "direction dot-count");
+
+
line_spanner_ = new Spanner (get_property ("DynamicLineSpanner"));
Side_position_interface::set_axis (line_spanner_, Y_AXIS);
- Axis_group_interface::set_interface (line_spanner_);
- Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS);
Music * rq = accepted_spanreqs_drul_[START];
if (script_req_l_)
script_p_->set_grob_property ("text",
script_req_l_->get_mus_property ("text"));
- Side_position_interface::set_direction (script_p_, DOWN);
-
if (Direction d = script_req_l_->get_direction ())
Directional_element_interface::set (line_spanner_, d);
else
{
cresc_p_ = new Spanner (get_property ("TextSpanner"));
- cresc_p_->set_interface (ly_symbol2scm ("dynamic-interface"));
cresc_p_->set_grob_property ("type", s);
-
daddy_trans_l_->set_property ((start_type
+ "Spanner").ch_C(), SCM_UNDEFINED);
s = get_property ((start_type + "Text").ch_C ());
/*
- '''Done: eliminating useless broadcast/acknowledge'''
+ Done: eliminating useless broadcast/acknowledge
One cause for translation slowness: grob broadcasted/acknowledges
-(b/a): every grob is b/a'd to all peer-engravers and all
+ (b/a): every grob is b/a-ed to all peer-engravers and all
parent-engravers. This means that lots of (often) useless b/a is done
for large scores (the top-level engravers gets to know every detail of
every voice, thread, etc. Measurements indicate this is 10% of the
-interpretation time:
+ interpretation time:
-standchen
+ standchen
old: (pre 1.5.13) 10.28
new: 8.73
list itself, GC for the structure, looking up the list during the
acks.
- */
+*/
SCM find_acknowledge_engravers (SCM gravlist, SCM meta);
void
Engraver_group_engraver::acknowledge_grobs ()
ENTER_DESCRIPTION(Figured_bass_engraver,
-/* descr */ "Make volta brackets",
+/* descr */ "Make figured bass numbers.",
/* creats*/ "BassFigure",
/* acks */ "",
/* reads */ "",
return ly_str02scm ("cmr10");
}
+
+
+
+ADD_INTERFACE (Font_interface, "font-interface",
+ "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)",
+ "font-magnification font-style font font-series font-shape font-family font-name font-design-size font-relative-size");
--- /dev/null
+#include "protected-scm.hh"
+#include "grob-interface.hh"
+#include "lily-guile.hh"
+#include "grob.hh"
+#include "warn.hh"
+
+Protected_scm all_ifaces;
+
+
+void add_interface (const char * symbol,
+ const char * descr,
+ const char * vars)
+{
+ SCM s = ly_symbol2scm (symbol);
+ SCM d = gh_str02scm (descr);
+ SCM l = parse_symbol_list (vars);
+
+
+ ly_add_interface(s,d,l);
+}
+
+SCM
+ly_add_interface (SCM a, SCM b, SCM c)
+{
+ SCM_ASSERT_TYPE (gh_symbol_p(a), a, SCM_ARG1, __FUNCTION__, "symbol");
+ SCM_ASSERT_TYPE (gh_string_p(b), b, SCM_ARG2, __FUNCTION__, "string");
+ SCM_ASSERT_TYPE (gh_list_p(c), c, SCM_ARG3, __FUNCTION__, "list of syms");
+ if (!gh_vector_p (all_ifaces))
+ {
+ all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
+ }
+
+ SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
+
+ scm_hashq_set_x (all_ifaces, a, entry);
+
+
+ return SCM_UNSPECIFIED;
+}
+
+
+SCM
+ly_all_grob_interfaces ()
+{
+ return all_ifaces;
+}
+
+void
+init_iface_funcs ()
+{
+ scm_c_define_gsubr ("ly-add-interface", 3, 0, 0,
+ (Scheme_function_unknown)ly_add_interface);
+ scm_c_define_gsubr ("ly-all-grob-interfaces", 0, 0, 0,
+ (Scheme_function_unknown)ly_all_grob_interfaces);
+}
+
+ADD_SCM_INIT_FUNC(giface, init_iface_funcs);
+
+void
+check_interfaces_for_property (Grob *me, SCM sym)
+{
+ SCM ifs = me->get_grob_property ("interfaces");
+
+
+ bool found = false;
+ for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
+ {
+ SCM iface = scm_hashq_ref (all_ifaces , gh_car (ifs), SCM_BOOL_F);
+ if (iface == SCM_BOOL_F)
+ {
+ String msg = to_str ("Unknown interface `%s'",
+ ly_scm2string (scm_symbol_to_string (gh_car(ifs))).ch_C());
+ programming_error (msg);
+ continue;
+ }
+
+ found= found || (scm_memq (sym, gh_caddr (iface)) != SCM_BOOL_F);
+ }
+
+ if (!found)
+ {
+ String str = to_str("Grob %s has no interface for property %s",
+ me->name ().ch_C(),
+ ly_symbol2string(sym).ch_C());
+ programming_error (str);
+ }
+}
/*
Should change default to be empty?
*/
- if (cb != SCM_BOOL_F && !gh_procedure_p (cb) && !gh_pair_p (cb))
+ if (cb != SCM_BOOL_F
+ && !gh_procedure_p (cb) && !gh_pair_p (cb)
+ && gh_procedure_p (get_grob_property ("molecule-callback"))
+ )
cb = molecule_extent_proc;
dim_cache_[a].dimension_ = cb;
if (gh_pair_p (meta))
{
SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
-
- set_grob_property ("interfaces",ly_cdr (ifs));
+
+ /*
+ do it directly to bypass interface checks.
+ */
+ mutable_property_alist_ = gh_cons (gh_cons (ly_symbol2scm ("interfaces"),
+ gh_cdr (ifs)),
+ mutable_property_alist_);
}
}
}
#endif
+extern void check_interfaces_for_property (Grob *me, SCM sym);
+
void
Grob::internal_set_grob_property (SCM s, SCM v)
{
#ifndef NDEBUG
if (internal_type_checking_global_b)
- assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+ {
+ assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+ check_interfaces_for_property(this, s);
+ }
#endif
Molecule *
Grob::get_molecule () const
{
+ if (immutable_property_alist_ == SCM_EOL)
+ {
+ return 0;
+
+ }
+
SCM mol = get_grob_property ("molecule");
if (unsmob_molecule (mol))
return unsmob_molecule (mol);
/* now: sc && sc->line_l () == line */
if (!line)
return sc->self_scm();
- /*
- This was introduced in 1.3.49 as a measure to prevent
- programming errors. It looks expensive (?). TODO:
- benchmark , document when (what kind of programming
- errors) this happens.
- */
+ /*
+ This was introduced in 1.3.49 as a measure to prevent
+ programming errors. It looks expensive (?).
+
+ TODO:
+
+ benchmark , document when (what kind of programming
+ errors) this happens.
+ */
if (sc->common_refpoint (line, X_AXIS)
&& sc->common_refpoint (line, Y_AXIS))
{
gh_procedure_p (dim_cache_[a].dimension_));
}
-/*
- TODO: add
-
- Grob *refpoint
-
- to arguments?
- */
Interval
Grob::extent (Grob * refp, Axis a) const
{
return scm_memq (k, ifs) != SCM_BOOL_F;
}
-void
-Grob::set_interface (SCM k)
-{
- if (has_interface (k))
- return ;
- else
- {
- set_grob_property ("interfaces",
- gh_cons (k, get_grob_property ("interfaces")));
- }
-}
-
ADD_SCM_INIT_FUNC (scoreelt, init_functions);
IMPLEMENT_TYPE_P (Grob, "ly-grob?");
+
+ADD_INTERFACE (Grob, "grob-interface",
+ "All grobs support this",
+ "X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause
+Y-extent-callback molecule-callback font-relative-size extra-offset
+staff-symbol interfaces dependencies no-spacing-rods extra-extent-X causes
+layer extra-extent-Y minimum-extent-X minimum-extent-Y transparent");
+
+ADD_INTERFACE (Hairpin, "hairpin-interface",
+ "hairpin crescendo.
+
+padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
+
+",
+ "grow-direction thickness height padding");
+
}
-void
-Hara_kiri_group_spanner::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("hara-kiri-group-interface"));
-}
bool
me->add_dependency (n);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("items-worth-living"),n);
}
+
+
+ADD_INTERFACE (Hara_kiri_group_spanner,"hara-kiri-group-interface",
+ " As Vertical_group_spanner, but keep track of interesting items. If
+we don't contain any interesting items after linebreaking, then
+gracefully commit suicide. Objective: don't disgrace Lily by
+typesetting empty lines in orchestral scores.",
+ "items-worth-living");
+
elt_l_ = s;
}
+
+
+ADD_INTERFACE (Hyphen_spanner, "lyric-hyphen-interface",
+ "A centred hyphen is a simple line between lyrics used to divide
+syllables. The length of the hyphen line should stretch based on the
+size of the gap between syllables.",
+ "thickness height minimum-length maximum-length word-space");
+
--- /dev/null
+/*
+ interface.hh -- declare Interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef INTERFACE_HH
+#define INTERFACE_HH
+
+
+void add_interface (const char * symbol,
+ const char * descr,
+ const char * vars);
+
+SCM ly_add_interface (SCM, SCM, SCM);
+
+#define ADD_INTERFACE(cl,a,b,c) \
+void cl ## _init_ifaces() {\
+ add_interface(a,b,c);\
+}\
+ADD_SCM_INIT_FUNC(cl ## ifaces, cl ## _init_ifaces);\
+
+
+#endif /* INTERFACE_HH */
+
#include "lily-proto.hh"
#include "smobs.hh"
#include "dimension-cache.hh"
+#include "grob-interface.hh"
/**
for administration of what was done already
static SCM ly_get_grob_property (SCM, SCM);
bool has_interface (SCM intf);
- void set_interface (SCM intf);
virtual void handle_broken_dependencies ();
virtual void handle_prebroken_dependencies ();
DECLARE_SCHEME_CALLBACK (y_extent, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_parent_callback, (SCM ,SCM));
static void add_element (Grob *me, Grob *e);
- static void set_interface (Grob*me);
static bool has_interface (Grob*);
static void consider_suicide (Grob*me);
static void add_interesting_item (Grob * me , Grob* n);
class Rhythmic_req;
class Scaled_font_metric;
class Scheme_hash_table;
-class Scope;
class Score;
class Grob;
class Score_engraver;
/**
Definition of how to output lilypond.
-
- TODO: smobify, remove Music_output_def_identifier.
-
- TODO: remove Scope structure. Scheme_hash_table has all the info.
*/
class Music_output_def
{
Scheme_hash_table * translator_tab_;
Scheme_hash_table * variable_tab_;
- Scope *translator_p_dict_p_;
- Scope *scope_p_;
SCM scaled_fonts_;
SCM style_sheet_;
class Music_output
{
public:
- Scope * header_l_;
+ Scheme_hash_table * header_l_;
String default_out_str_;
String origin_str_;
int errorlevel_i_;
String main_input_str_;
void * lexval_l;
Scheme_hash_table * toplevel_variable_tab_;
- Scope * scope_p_;
-
bool main_input_b_;
/*
Protected_scm chordmodifier_tab_;
Protected_scm pitchname_tab_;
- Link_array<Scope> scope_l_arr_;
+ Link_array<Scheme_hash_table> scope_l_arr_;
Keyword_table * keytable_p_;
int errorlevel_i_;
void push_lyric_state ();
void pop_state ();
void LexerError (char const *);
- void set_identifier (String str, SCM);
+ void set_identifier (SCM name_str, SCM);
bool note_state_b () const;
bool chord_state_b () const;
bool lyric_state_b () const;
public:
Duration default_duration_;
- Scope *default_header_p_;
+ Scheme_hash_table *default_header_p_;
int fatal_error_i_;
Sources * source_l_;
static bool has_interface (Grob*);
static void get_spacing (Grob *me, Item* , Real, Real, Real*, Real*);
- static Real stem_dir_correction (Grob *me, Item * next_col);
+ static Real stem_dir_correction (Grob *me, Item * next_col, Real incr);
static Item * right_column (Grob*);
static Item * left_column (Grob*);
};
void output_int_def (String k, int v);
void output_Real_def (String k, Real v);
void output_String_def (String k, String v);
- void output_scope (Scope*, String prefix);
+ void output_scope (Scheme_hash_table*, String prefix);
void output_version ();
void output_font_def (int i, String str);
void output_font_switch (int i);
void output_scheme (SCM scm);
void write_header_field_to_file (String filename, SCM, SCM);
- void write_header_fields_to_file (Scope *);
+ void write_header_fields_to_file (Scheme_hash_table *);
};
#endif // PAPER_OUTPUTTER_HH
+++ /dev/null
-/*
- scope.hh -- declare Scope
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef SCOPE_HH
-#define SCOPE_HH
-
-#include "lily-proto.hh"
-#include "lily-guile.hh"
-
-class Scheme_hash_table;
-
-/*
- Junk this almost-void class.
- */
-class Scope {
- Scheme_hash_table *id_dict_;
- Scope (Scope const &);
-public:
- SCM to_alist () const;
- bool elem_b (String ) const;
- bool elem_b (SCM s) const;
-
- bool try_retrieve (SCM key, SCM *val) const;
-
- SCM scm_elem (String) const;
- SCM scm_elem (SCM) const;
-
-
- void set (String, SCM);
- Scope (Scheme_hash_table*);
-
- friend class Scope_iter;
-};
-#endif /* SCOPE_HH */
-
#include "lily-proto.hh"
-/**
-*/
struct Separation_item
{
-
static bool has_interface (Grob*);
static Interval my_width (Grob*) ;
static void add_item (Grob*,Item*);
/// set a minimum distance
static void add_rod (Grob*me, Grob * to, Real distance);
static void add_spring (Grob*me,Grob * to, Real dist, Real strength, bool);
- static void set_interface (Grob*);
+
static void remove_interface (Grob*);
static SCM get_minimum_distances (Grob*);
static SCM get_ideal_distances (Grob*);
DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
static bool has_interface (Grob*);
- static void set_interface (Grob*);
-
static void set_spacing_hints (Grob*me) ;
};
#endif
class Tie_column
{
public:
- static void set_interface (Grob*me);
static bool has_interface (Grob*);
static void add_tie (Grob*me,Grob*);
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
#include "spanner.hh"
#include "lily-guile.hh"
#include "line-of-score.hh"
+#include "group-interface.hh"
Item::Item (SCM s)
: Grob (s)
{
broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
+ Group_interface::add_thing (this, ly_symbol2scm ("interfaces"), ly_symbol2scm ("item-interface"));
+
}
/**
{
return dynamic_cast<Item*> (unsmob_grob (s));
}
+
+ADD_INTERFACE(Item,
+ "item-interface",
+ "",
+ "visibility-lambda breakable")
item_p_->set_grob_property ("old-accidentals", get_property ("lastKeySignature"));
item_p_->set_grob_property ("new-accidentals", get_property ("keySignature"));
- Staff_symbol_referencer::set_interface (item_p_);
announce_grob(item_p_, keyreq_l_ ? keyreq_l_->self_scm() : SCM_EOL);
}
struct Key_signature_interface
{
-
- static void set_interface (Grob*);
- static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
};
return mol.smobbed_copy ();
}
-bool
-Key_signature_interface::has_interface (Grob*m)
-{
- return m && m->has_interface (ly_symbol2scm ("key-signature-interface"));
-}
-
+ADD_INTERFACE (Key_signature_interface, "key-signature-interface",
+ "A group of accidentals.",
+ "c0-position old-accidentals new-accidentals");
}
/*
- LIST has the form "sym1 sym2 sym3"
+ LIST has the form "sym1 sym2 sym3\nsym4\nsym5"
+
+ i.e. \n and ' ' can be used interchangeably as separators.
*/
SCM
parse_symbol_list (const char * list)
char * s = strdup (list);
char *orig = s;
SCM create_list = SCM_EOL;
+
+ for (char * p = s; *p; p++)
+ {
+ if (*p == '\n')
+ *p = ' ' ;
+ }
+
if (!s[0] )
s = 0;
+
+
while (s)
{
char *next = strchr (s, ' ');
+++ /dev/null
-/*
- line-group-engraver-group.cc -- implement Line_group_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "command-request.hh"
-#include "bar-line.hh"
-#include "debug.hh"
-#include "line-group-group-engraver.hh"
-#include "paper-column.hh"
-#include "axis-group-interface.hh"
-#include "spanner.hh"
-
-
-Line_group_engraver_group::Line_group_engraver_group ()
-{
- staffline_p_ =0;
-}
-
-
-void
-Line_group_engraver_group::typeset_grob (Grob *elem)
-{
- if (!elem->get_parent (Y_AXIS))
- Axis_group_interface::add_element (staffline_p_, elem);
- Engraver_group_engraver::typeset_grob (elem);
-}
-
-
-void
-Line_group_engraver_group::finalize ()
-{
- Engraver_group_engraver::finalize ();
- Grob * it
- = unsmob_grob (get_property ("currentCommandColumn"));
-
- staffline_p_->set_bound (RIGHT,it);
- Engraver_group_engraver::typeset_grob (staffline_p_);
- staffline_p_ = 0;
-}
-
-void
-Line_group_engraver_group::initialize ()
-{
- create_line_spanner ();
- Grob * it
- = unsmob_grob (get_property ("currentCommandColumn"));
- staffline_p_->set_bound (LEFT,it);
-
- Engraver::announce_grob (staffline_p_, SCM_EOL);
-}
-
-void
-Line_group_engraver_group::create_line_spanner ()
-{
- staffline_p_ = new Spanner (SCM_EOL);
- Axis_group_interface::set_interface (staffline_p_);
- Axis_group_interface::set_axes (staffline_p_, Y_AXIS,Y_AXIS);
-}
-
-ENTER_DESCRIPTION(Line_group_engraver_group,
- "",
- "",
- "",
- "",
- "");
-
Real thick = me->paper_l ()->get_var ("stafflinethickness");
- SCM s = me->get_grob_property ("line-thickness");
+ SCM s = me->get_grob_property ("thickness");
if (gh_number_p (s))
thick *= gh_scm2double (s);
}
+
+ADD_INTERFACE (Line_spanner, "line-spanner-interface",
+ "Generic line drawn between two objects, eg. for use with glissandi.
+gap is measured in staff-spaces. ",
+ "gap dash-period dash-length thickness type");
+
+
Molecule
Local_key_item::parenthesize (Grob*me, Molecule m)
{
- Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-("));
- Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-)"));
+ Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-leftparen"));
+ Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-rightparen"));
m.add_at_edge (X_AXIS, LEFT, Molecule (open), 0);
m.add_at_edge (X_AXIS, RIGHT, Molecule (close), 0);
return m;
}
-/* HW says: maybe move to tie.cc
+/*
+ HW says: maybe move to tie.cc
Note, tie should not kill all accidentals when broken, only the ones
that are indicated by a property tie-break-reminder, I guess
{
return m && m->has_interface (ly_symbol2scm ("accidentals-interface"));
}
-void
-Local_key_item::set_interface (Grob*m)
-{
- m->set_interface (ly_symbol2scm ("accidentals-interface"));
-}
+
+
+
+ADD_INTERFACE (Local_key_item, "accidentals-interface",
+ "Accidentals",
+ "accidentals left-padding right-padding paren-cautionaries cautionary-size");
return m;
}
-/*
- TODO: should use slope instead? Angle gives nasty rad <-> degree
- conversions.
-*/
Molecule
Lookup::repeat_slash (Real w, Real s, Real t)
{
}
+
+
+ADD_INTERFACE (Lyric_extender,"lyric-extender-interface",
+ "The extender is a simple line at the baseline of the lyric
+that helps show the length of a melissima (tied/slurred note).",
+ "word-space height right-trim-amount");
#include "midi-def.hh"
#include "performance.hh"
#include "debug.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
Midi_def::Midi_def ()
{
Midi_def::get_tempo_i (Moment one_beat_mom)
{
SCM wis = ly_symbol2scm ("whole-in-seconds");
- Moment *w = unsmob_moment (scope_p_->scm_elem (wis));
+ Moment *w = unsmob_moment (variable_tab_->get (wis));
Moment wholes_per_min = Moment (60);
if (!w)
Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
Moment m = Moment (1)/Moment (beats_per_second * one_beat_mom);
- scope_p_->set ("whole-in-seconds", m.smobbed_copy ());
+ variable_tab_->set (ly_symbol2scm ("whole-in-seconds"), m.smobbed_copy ());
}
SCM
-make_molecule (SCM expr, SCM xext, SCM yext)
+ly_make_molecule (SCM expr, SCM xext, SCM yext)
{
- /*
- TODO: typechecking.
- */
+ SCM_ASSERT_TYPE (ly_number_pair_p (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
+ SCM_ASSERT_TYPE (ly_number_pair_p (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");
+
Box b (ly_scm2interval (xext), ly_scm2interval(yext));
Molecule m (b, expr);
return m.smobbed_copy ();
static void
molecule_init ()
{
- scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) make_molecule);
+ scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) ly_make_molecule);
scm_c_define_gsubr ("ly-fontify-atom", 2, 0, 0, (Scheme_function_unknown) ly_fontify_atom);
scm_c_define_gsubr ("ly-align-to!", 3, 0, 0, (Scheme_function_unknown) ly_align_to_x);
scm_c_define_gsubr ("ly-add-molecule", 2, 0,0,(Scheme_function_unknown) ly_add_molecule);
{
mmrest_p_ = new Spanner (get_property ("MultiMeasureRest"));
- Multi_measure_rest::set_interface (mmrest_p_);
- Staff_symbol_referencer::set_interface (mmrest_p_);
-
announce_grob(mmrest_p_, busy_span_req_l_->self_scm());
start_measure_i_
= gh_scm2int (get_property ("currentBarNumber"));
#include "text-item.hh"
#include "percent-repeat-item.hh"
-
-void
-Multi_measure_rest::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("multi-measure-rest-interface"));
-}
-
bool
Multi_measure_rest::has_interface (Grob*me)
{
return SCM_UNSPECIFIED;
}
+
+
+ADD_INTERFACE (Multi_measure_rest,"multi-measure-rest-interface",
+ "A rest that spans a whole number of measures. For typesetting the
+numbers, fields from font-interface may be used.
+
+padding is the space between number and rest. Measured in staffspace.
+
+",
+ "columns measure-count expand-limit minimum-width padding");
#include "scm-hash.hh"
#include "dictionary.hh"
-#include "scope.hh"
#include "debug.hh"
#include "music-output-def.hh"
#include "global-translator.hh"
variable_tab_ = new Scheme_hash_table;
translator_tab_ = new Scheme_hash_table;
- scope_p_ = new Scope (variable_tab_);
- translator_p_dict_p_ = new Scope (translator_tab_);
smobify_self ();
scm_gc_unprotect_object (variable_tab_->self_scm ());
style_sheet_ = SCM_EOL;
scaled_fonts_ = SCM_EOL;
+
smobify_self ();
scm_gc_unprotect_object (variable_tab_->self_scm ());
scm_gc_unprotect_object (translator_tab_->self_scm ());
-
-
- scope_p_ = new Scope (variable_tab_);
- translator_p_dict_p_ = new Scope (translator_tab_);
style_sheet_ = scm_list_copy (s.style_sheet_);
scaled_fonts_ = scm_list_copy (s.scaled_fonts_);
assert (tp);
- String s;
+ SCM s = ly_symbol2scm ("");
if (gh_string_p (tp->type_name_))
- s = ly_scm2string (tp->type_name_);
+ s = scm_string_to_symbol (tp->type_name_);
- translator_p_dict_p_->set (s, transdef);
+ translator_tab_->set (s, transdef);
}
/*
#include "debug.hh"
#include "source-file.hh"
#include "main.hh"
-#include "scope.hh"
#include "input.hh"
#include "moment.hh"
{
keytable_p_ = new Keyword_table (the_key_tab);
toplevel_variable_tab_ = new Scheme_hash_table ;
- scope_p_ = new Scope (toplevel_variable_tab_);
-
- scope_l_arr_.push (scope_p_);
+ scope_l_arr_.push (toplevel_variable_tab_);
errorlevel_i_ = 0;
main_input_b_ = false;
}
void
-My_lily_lexer::set_identifier (String name_str, SCM s)
+My_lily_lexer::set_identifier (SCM name, SCM s)
{
- if (lookup_keyword (name_str) >= 0)
+ assert (gh_string_p (name));
+
+ if (lookup_keyword (ly_scm2string (name)) >= 0)
{
- warning (_f ("Identifier name is a keyword: `%s'", name_str));
+ size_t sz;
+ char * str = gh_scm2newstr (name, &sz) ;
+ warning (_f ("Identifier name is a keyword: `%s'", str));
+ free (str);
}
- scope_l_arr_.top ()->set (name_str, s);
+ scope_l_arr_.top ()->set (scm_string_to_symbol (name), s);
}
My_lily_lexer::~My_lily_lexer ()
{
delete keytable_p_;
scm_gc_unprotect_object (toplevel_variable_tab_->self_scm ());
- delete scope_p_ ;
}
#include "main.hh"
#include "parser.hh"
#include "file-results.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
My_lily_parser::My_lily_parser (Sources * source_l)
{
My_lily_parser::~My_lily_parser ()
{
delete lexer_p_;
- delete default_header_p_;
+ if (default_header_p_)
+ scm_gc_unprotect_object (default_header_p_->self_scm());
}
void
Music_output_def *id = unsmob_music_output_def (me->lexer_p_->lookup_identifier ("$defaultpaper"));
Paper_def *p = dynamic_cast<Paper_def*> (id->clone ());
- SCM al = p->translator_p_dict_p_->to_alist ();
+ SCM al = p->translator_tab_->to_alist ();
SCM l = SCM_EOL;
for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
{
return h1 - h2;
}
-void
-Note_column::set_interface (Grob* me)
-{
- me->set_interface (ly_symbol2scm ("note-column-interface"));
-
- Axis_group_interface::set_interface (me);
- Axis_group_interface::set_axes (me, X_AXIS, Y_AXIS);
-}
-
Item *
Note_column::stem_l (Grob*me)
{
return 0;
}
+
+
+
+ADD_INTERFACE (Note_column,"note-column-interface",
+ "Stem and noteheads combined",
+ "arpeggio note-heads rest-collision rest horizontal-shift stem accidentals force-hshift");
+
*/
left_ledger_protusion *= 0.66;
- right_ledger_protusion *= 0.8;
+ right_ledger_protusion *= 0.9;
}
Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
return gh_number_p (result) ? gh_scm2double (result) : 0.0;
}
+
+ADD_INTERFACE (Note_head,"note-head-interface",
+ "Note head",
+ "accidentals-grob style stem-attachment-function");
+
{
Item *note_p = new Item (get_property ("NoteHead"));
- Staff_symbol_referencer::set_interface (note_p);
-
Music * req = note_req_l_arr_[i];
Duration dur = *unsmob_duration (req->get_mus_property ("duration"));
{
it = it -> find_prebroken_piece (col_dir);
}
+
/*
some kind of mismatch, eg. a note column, that is behind a
linebreak.
*/
if (!it)
continue;
+
+ if (d == RIGHT && right_col != it->column_l ())
+ continue;
+
+ if (Separation_item::has_interface (it))
+ {
+ extents[d].unite (Separation_item::my_width (it));
+ continue;
+ }
extents[d].unite (it->extent (it->column_l (), X_AXIS));
if (d == RIGHT)
*space += 0.5 * (( -extents[RIGHT][LEFT]) >? 0);
}
- *space += stem_dir_correction (me, right_col);
+ *space += stem_dir_correction (me, right_col, increment);
}
Item *
TODO: have to check wether the stems are in the same staff.
- TODO: also correct for bar lines in RIGHT-ITEMS. Should check if
- the barline is the leftmost object of the break alignment.
-
*/
Real
-Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)
+Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
+ Real increment)
{
Drul_array<Direction> stem_dirs(CENTER,CENTER);
Drul_array<Interval> stem_posns;
Drul_array<SCM> props(me->get_grob_property ("left-items"),
me->get_grob_property ("right-items"));
+ Drul_array<Grob*> beams_drul(0,0);
Real correction = 0.0;
stem_dirs[LEFT] = stem_dirs[RIGHT] = CENTER;
goto exit_func ;
}
+ beams_drul[d] = Stem::beam_l (stem);
+
+
Direction sd = Stem::get_direction (stem);
if (stem_dirs[d] && stem_dirs[d] != sd)
{
if (correct &&stem_dirs[LEFT] *stem_dirs[RIGHT] == -1)
{
-
- intersect = stem_posns[LEFT];
- intersect.intersect(stem_posns[RIGHT]);
- correct = correct && !intersect.empty_b ();
+ if (beams_drul[LEFT] == beams_drul[RIGHT])
+ {
+ /*
+ this is a knee: maximal correction.
+ */
+
+ correction = increment* stem_dirs[LEFT];
+ }
+ else
+ {
+ intersect = stem_posns[LEFT];
+ intersect.intersect(stem_posns[RIGHT]);
+ correct = correct && !intersect.empty_b ();
- if (!correct)
- return 0.0;
- /*
- Ugh. 7 is hardcoded.
- */
- correction = abs (intersect.length ());
- correction = (correction/7) <? 1.0;
- correction *= stem_dirs[LEFT] ;
- correction *= gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+ if (!correct)
+ return 0.0;
+
+ correction = abs (intersect.length ());
- if (!bar_yextent.empty_b())
- {
- correction *= 0.5;
+
+ /*
+ Ugh. 7 is hardcoded.
+ */
+ correction = (correction/7) <? 1.0;
+ correction *= stem_dirs[LEFT] ;
+ correction *= gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+
+ if (!bar_yextent.empty_b())
+ {
+ correction *= 0.5;
+ }
}
}
- else if (correct)
+ else if (correct && stem_dirs[LEFT] *stem_dirs[RIGHT] == UP)
{
/*
Correct for the following situation:
return correction;
}
+
+
+
+ADD_INTERFACE (Note_spacing,"note-spacing-interface",
+ "",
+ "left-items right-items stem-spacing-correction");
+
Paper_column::Paper_column (SCM l)
: Item (l) // guh.?
{
- Axis_group_interface::set_interface (this);
- Axis_group_interface::set_axes (this, X_AXIS, X_AXIS);
- Spaceable_grob::set_interface (this);
-
line_l_=0;
rank_i_ = -1;
}
return t.smobbed_copy ();
}
+
+
+
+ADD_INTERFACE (Paper_column, "paper-column-interface",
+ "",
+ "between-cols when bounded-by-me shortest-playing-duration shortest-starter-duration");
#include "debug.hh"
#include "scaled-font-metric.hh"
#include "main.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
#include "file-results.hh" // urg? header_global_p
#include "paper-outputter.hh"
SCM
Paper_def::get_scmvar (String s) const
{
- return scope_p_->scm_elem (ly_symbol2scm (s.ch_C ()));
+ return variable_tab_->get (ly_symbol2scm (s.ch_C ()));
}
Paper_def::get_realvar (SCM s) const
{
SCM val ;
- if (!scope_p_->try_retrieve (s, &val))
+ if (!variable_tab_->try_retrieve (s, &val))
{
programming_error ("unknown paper variable: " + ly_symbol2string (s));
return 0.0;
Real sc = 1.0;
SCM ssc;
- if (scope_p_->try_retrieve (ly_symbol2scm ("outputscale"), &ssc))
+ if (variable_tab_->try_retrieve (ly_symbol2scm ("outputscale"), &ssc))
{
sc = gh_scm2double (ssc);
}
return unsmob_metrics (ly_cdr (met));
SCM ssc;
- if (scope_p_->try_retrieve (ly_symbol2scm ("outputscale"), &ssc))
+ if (variable_tab_->try_retrieve (ly_symbol2scm ("outputscale"), &ssc))
{
m /= gh_scm2double (ssc);
}
#include "debug.hh"
#include "font-metric.hh"
#include "main.hh"
-#include "scope.hh"
-
+#include "scm-hash.hh"
#include "lily-version.hh"
#include "paper-def.hh"
#include "file-results.hh"
}
void
-Paper_outputter::output_scope (Scope *scope, String prefix)
+Paper_outputter::output_scope (Scheme_hash_table *scope, String prefix)
{
SCM al = scope->to_alist ();
for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
}
void
-Paper_outputter::write_header_fields_to_file (Scope * header)
+Paper_outputter::write_header_fields_to_file (Scheme_hash_table * header)
{
if (dump_header_fieldnames_global.size ())
{
#include "paper-column.hh"
#include "paper-score.hh"
#include "paper-column.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
#include "gourlay-breaking.hh"
#include "paper-outputter.hh"
#include "file-results.hh"
if (global_header_p)
{
- Scope gh (global_header_p);
- outputter_l_->output_scope (&gh, "lilypond");
- outputter_l_->write_header_fields_to_file (&gh);
+
+ outputter_l_->output_scope (global_header_p, "lilypond");
+ outputter_l_->write_header_fields_to_file (global_header_p);
}
if (header_l_)
{
outputter_l_->output_comment (_ ("Outputting Score, defined at: "));
outputter_l_->output_comment (origin_str_);
- if (paper_l_->scope_p_)
- outputter_l_->output_scope (paper_l_->scope_p_, "lilypondpaper");
+ if (paper_l_->variable_tab_)
+ outputter_l_->output_scope (paper_l_->variable_tab_, "lilypondpaper");
SCM scm = scm_list_n (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
outputter_l_->output_scheme (scm);
#include "property-iterator.hh"
#include "file-results.hh"
#include "input.hh"
-#include "scope.hh"
#include "relative-music.hh"
#include "lyric-combine-music.hh"
#include "transposed-music.hh"
String *string; // needed by the lexer as temporary scratch area.
Music *music;
Score *score;
- Scope *scope;
Scheme_hash_table *scmhash;
Music_output_def * outputdef;
}
| output_def {
if (dynamic_cast<Paper_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultpaper", $1->self_scm ());
+ THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ());
else if (dynamic_cast<Midi_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultmidi", $1->self_scm ());
+ THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ());
}
| embedded_scm {
// junk value
lilypond_header_body:
{
$$ = new Scheme_hash_table;
-
- Scope *sc = new Scope ($$);
- THIS->lexer_p_-> scope_l_arr_.push (sc);
+ THIS->lexer_p_-> scope_l_arr_.push ($$);
}
| lilypond_header_body assignment {
lilypond_header:
HEADER '{' lilypond_header_body '}' {
$$ = $3;
- delete THIS->lexer_p_-> scope_l_arr_.pop ();
+ THIS->lexer_p_->scope_l_arr_.pop ();
}
;
ip.warning (_ ("Identifier should have alphabetic characters only"));
}
- THIS->lexer_p_->set_identifier (ly_scm2string ($1), $4);
+ THIS->lexer_p_->set_identifier ($1, $4);
/*
TODO: devise standard for protection in parser.
p = new Midi_def;
$$ = p;
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
}
| PAPER '{' {
Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
p = dynamic_cast<Paper_def*> (id->clone ());
else
p = new Paper_def;
- THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
+ THIS-> lexer_p_-> scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
Music_output_def *p = unsmob_music_output_def ($3);
p = p->clone ();
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
Music_output_def *p = unsmob_music_output_def ($3);
p = p->clone ();
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| music_output_def_body assignment {
return m.smobbed_copy ();
}
-
-
-
+ADD_INTERFACE (Percent_repeat_item_interface,"percent-repeat-interface",
+ "Repeats that look like percent signs",
+ "slope thickness");
// push a new phrasing_slur onto stack.
// (use temp. array to wait for all phrasing_slur STOPs)
Grob* phrasing_slur = new Spanner (get_property ("PhrasingSlur"));
- Slur::set_interface (phrasing_slur);
+ Slur::set_interface (phrasing_slur); // can't remove.
SCM s = get_property ("phrasingSlurBeginAttachment");
if (gh_symbol_p (s))
{
Chris Jackson <chris@fluffhouse.org.uk> - extended to support
bracketed pedals.
+
TODO: support for __| |__ or __| Ped instead of ___/\__ for pedal up-down
- */
+
+*/
#include "engraver.hh"
#include "musical-request.hh"
{
p->line_spanner_ = new Spanner (get_property ( ( String (p->name_) + "PedalLineSpanner").ch_C() ));
Side_position_interface::set_axis (p->line_spanner_, Y_AXIS);
- Axis_group_interface::set_interface (p->line_spanner_);
- Axis_group_interface::set_axes (p->line_spanner_, Y_AXIS, Y_AXIS);
Music * rq = (p->req_l_drul_[START] ? p->req_l_drul_[START] : p->req_l_drul_[STOP]);
announce_grob (p->line_spanner_, rq->self_scm ());
}
p->current_bracket_req_ = p->req_l_drul_[START];
p->bracket_p_ = new Spanner (get_property ("PianoPedalBracket"));
- p->bracket_p_->set_interface (ly_symbol2scm ("piano-pedal-interface"));
// Set a property so that the molecule-creating function will know whether the left edge should be flared \___
p->bracket_p_->set_grob_property("left-widen", gh_bool2scm((bool) p->req_l_drul_[STOP]) );
bool solid = to_boolean (me->get_grob_property ("solid"));
bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
- SCM stem_direction_scm = me->get_grob_property ("stem-direction");
+ /*
+
+ TODO:
+
+ ugr. why not called direction?
+
+ */
+ SCM stem_direction_scm = me->get_grob_property ("direction");
Direction stem_direction =
gh_number_p (stem_direction_scm) ? to_dir (stem_direction_scm) : DOWN;
if (!stem_direction)
stem_direction = DOWN;
+
+ /*
+ TODO: revise name.
+ */
bool auto_properties = to_boolean (me->get_grob_property ("auto-properties"));
if (auto_properties)
// determine add_stem and stem_direction automatically from durations
Molecule molecule;
- SCM line_thickness_scm = me->get_grob_property ("line-thickness");
+ SCM line_thickness_scm = me->get_grob_property ("thickness");
Real line_thickness;
if (gh_number_p (line_thickness_scm))
{
Real thickness =
line_thickness * me->paper_l ()->get_var ("stafflinethickness");
- SCM porrectus_width_scm = me->get_grob_property ("porrectus-width");
+ SCM porrectus_width_scm = me->get_grob_property ("width");
Real porrectus_width;
if (gh_number_p (porrectus_width_scm))
{
molecule.translate_axis (ypos_correction, Y_AXIS);
return molecule;
}
+
+
+ADD_INTERFACE (Porrectus,"porrectus-interface",
+ "A porrectus ligature, joining two note heads into a single grob.",
+ "left-head right-head width add-stem auto-properties solid direction");
+
return;
rest_collision_p_ = new Item (get_property ("RestCollision"));
- Rest_collision::set_interface (rest_collision_p_);
+
announce_grob(rest_collision_p_, SCM_EOL);
for (int i=0; i< note_column_l_arr_.size (); i++)
Rest_collision::add_column (rest_collision_p_,note_column_l_arr_[i]);
TODO: look at horizontal-shift to determine ordering between rests
for more than two voices.
-
*/
SCM
Rest_collision::do_shift (Grob *me, SCM elts)
return SCM_UNSPECIFIED;
}
-void
-Rest_collision::set_interface (Grob*me)
-{
- me->set_extent_callback (SCM_EOL, X_AXIS);
- me->set_extent_callback (SCM_EOL, Y_AXIS);
-}
-
+ADD_INTERFACE (Rest_collision,"rest-collision-interface",
+ "Move around ordinary rests (not multi-measure-rests) to avoid
+conflicts.",
+ "maximum-rest-count minimum-distance elements");
if (rest_req_l_ && !rest_p_)
{
rest_p_ = new Item (get_property ("Rest"));
- Rhythmic_head::set_interface (rest_p_);
+
int durlog = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
{
return m && m->has_interface (ly_symbol2scm ("rest-interface"));
}
+
+
+ADD_INTERFACE (Rest,"rest-interface",
+ "a rest",
+ "style");
+
if (!note_column_)
{
note_column_ = new Item (get_property ("NoteColumn"));
- Note_column::set_interface (note_column_);
announce_grob(note_column_, SCM_EOL);
}
-void
-Rhythmic_head::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("rhythmic-head-interface"));
-}
bool
Rhythmic_head::has_interface (Grob*me)
{
return me && me->has_interface (ly_symbol2scm ("rhythmic-head-interface"));
}
+
+
+ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
+ "Note head or rest",
+ "dot stem duration-log");
+
/*
- TODO: verzin iets tegen optie code bloot
-
-
- other interesting stuff to add:
+add these as well:
@item -T,--no-timestamps
don't timestamp the output
+++ /dev/null
-/*
- scope.cc -- implement Scope
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "scope.hh"
-#include "string.hh"
-#include "scm-hash.hh"
-
-Scope::Scope (Scheme_hash_table * st)
-{
- assert (st);
- id_dict_ =st;
-}
-
-bool
-Scope::elem_b (String s) const
-{
- return id_dict_->elem_b (ly_symbol2scm (s.ch_C ()));
-}
-
-bool
-Scope::elem_b (SCM s) const
-{
- return id_dict_->elem_b (s);
-}
-
-
-SCM
-Scope::scm_elem (SCM s)const
-{
- return id_dict_->get (s);
-}
-
-SCM
-Scope::scm_elem (String s) const
-{
- return scm_elem (ly_symbol2scm (s.ch_C ()));
-}
-
-
-void
-Scope::set (String s, SCM id)
-{
- return id_dict_->set (ly_symbol2scm (s.ch_C ()), id);
-}
-
-SCM
-Scope::to_alist () const
-{
- return id_dict_->to_alist ();
-}
-
-bool
-Scope::try_retrieve (SCM k , SCM *v)const
-{
- return id_dict_->try_retrieve (k, v);
-}
-
/*
TODO: use property Score.breakForbidden = #t
*/
-
void
Score_engraver::forbid_breaks ()
{
#include "ly-smobs.icc"
-#include "scm-hash.hh"
#include "score.hh"
#include "debug.hh"
#include "music-output-def.hh"
#include "music-iterator.hh"
#include "music.hh"
#include "global-translator.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
#include "cpu-timer.hh"
#include "main.hh"
#include "paper-def.hh"
Score::run_translator (Music_output_def *odef_l)
{
/*
- TODO: this is not very elegant....
+ We want to know if we want to store locations, since they take a
+ lot of overhead.
+
*/
store_locations_global_b = (gh_eval_str ("point-and-click") != SCM_BOOL_F);
if (!header_p_)
header_p_ = new Scheme_hash_table; // ugh
- Scope bla (header_p_);
- output->header_l_ = &bla;
+
+ output->header_l_ = header_p_;
output->origin_str_ = location_str ();
progress_indication ("\n");
#include "score.hh"
#include "string.hh"
#include "paper-def.hh"
-#include "scope.hh"
#include "debug.hh"
#include "parray.hh"
#include "file-path.hh"
return SCM_UNSPECIFIED;
}
+
+ADD_INTERFACE (Script_column,"script-column-interface",
+ "An interface that sorts scripts according to their @code{script-priority}",
+ "");
+
+
return me->has_interface (ly_symbol2scm ("script-interface"));
}
-void
-Script::set_interface (Grob*me)
-{
- return me->set_interface (ly_symbol2scm ("script-interface"));
-}
+
+ADD_INTERFACE (Text_script,"text-script-interface",
+ "Any text script",
+ "script-priority");
+
+ADD_INTERFACE (Skript, "script-interface",
+ "",
+ "script-priority script-molecule staff-support");
}
-void
-Separating_group_spanner::set_interface (Grob*)
-{
-}
-
bool
Separating_group_spanner::has_interface (Grob*)
{//todo
assert (false);
}
+
+
+
+ADD_INTERFACE (Separating_group_spanner,"separation-spanner-interface",
+ "Spanner that containing @code{separation-item-interface} grobs to calculate rods",
+ "");
/*
- single-malt-grouping-item.cc -- implement Separation_item
+ separation-item.cc -- implement Separation_item
source file of the GNU LilyPond music typesetter
s->add_dependency (i);
}
+/*
+ DOCME:
+
+ why don't we use extent()
+ */
Interval
Separation_item::my_width (Grob *me)
{
+
+
+ADD_INTERFACE (Separation_item,"separation-item-interface",
+ "Item that computes widths to generate spacing rods.
+
+Calc dimensions for the Separating_group_spanner; this has to be
+an item to get dependencies correct. It can't be an grob_group
+since these usually are in a different X_group
+",
+ "elements");
/*
- TODO: handling of grace notes is excuisite pain. This handling
+ TODO: handling of grace notes is exquisite pain. This handling
should be formally specified and then the implementation verified.
*/
Skip events till UNTIL. We don't do any other side effects such as
descending to child iterator contexts, because they might depend on
\context specs and \translator changes being executed
+
TODO: build support for grace notes here.
*/
void
}
+
+
+ADD_INTERFACE (Side_position_interface,"side-position-interface",
+ "Position a victim object (this one) next to other objects (the support).
+#'direction = where to put the victim object (left or right?)
+",
+ "side-support-elements direction-source direction side-relative-direction minimum-space padding self-alignment-X self-alignment-Y");
// push a new slur onto stack.
// (use temp. array to wait for all slur STOPs)
Grob* slur = new Spanner (get_property ("Slur"));
- Slur::set_interface (slur);
+ Slur::set_interface (slur); // cannot remove yet!
SCM s = get_property ("slurBeginAttachment");
if (gh_symbol_p (s))
{
/*
[TODO]
+
* should avoid stafflines with horizontal part.
+
* begin and end should be treated as a/acknowledge Scripts.
+
* smart changing of endings
+
* smart changing of (Y-?)offsets to avoid ugly beziers
(along-side-stem)
+
*/
#include "directional-element-interface.hh"
}
+ADD_INTERFACE (Slur,"slur-interface",
+ "A slur",
+ "slope-limit de-uglify-parameters details attachment direction attachment-offset beautiful y-free control-points extremity-rules extremity-offset-alist thickness dashed");
+
}
-void
-Spaceable_grob::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("spaceable-grob-interface"));
-}
+ADD_INTERFACE (Spaceable,"spaceable-grob-interface",
+ "An grob (generally a Paper_column) that takes part in the
+spacing problem. ",
+ "penalty minimum-distances ideal-distances
+left-neighbors right-neighbors");
+
Real space, fixed;
fixed = 0.0;
- bool expand_only;
- Real base = note_spacing (me, lc, rc, shortest, &expand_only);
- Note_spacing::get_spacing (sp, rc, base, increment, &space, &fixed);
- space -=base;
+ bool dummy;
+
+ if (d == LEFT)
+ {
+ /*
+ The note spacing should be taken from the musical
+ columns.
+
+ */
+ Real base = note_spacing (me, lc, rc, shortest, &dummy);
+ Note_spacing::get_spacing (sp, rc, base, increment, &space, &fixed);
+
+ space -= increment;
+
+ dists[d] = dists[d] >? space;
+ }
+ else
+ {
+ Real space, fixed_space;
+ Staff_spacing::get_spacing_params (sp,
+ &space, &fixed_space);
+
+ dists[d] = dists[d] >? fixed_space;
+ }
- dists[d] = dists[d] >? space;
}
}
while (flip (&d) != LEFT);
/*
- Read hints from L (todo: R) and generate springs.
+ Read hints from L and generate springs.
*/
void
Spacing_spanner::breakable_column_spacing (Item* l, Item *r)
return dist;
}
+
+
+ADD_INTERFACE (Spacing_spanner,"spacing-spanner-interface",
+ " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
+The space taken by a note is determined by the formula
+
+
+
+where TIME is the amount of time a note occupies. The value of C is
+chosen such that the smallest space within a measure is
+arithmetic_basicspace:
+
+C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
+
+The smallest space is the one following the shortest note in the
+measure, or the space following a hypothetical 1/8 note. Typically
+arithmetic_basicspace is set to a value so that the shortest note
+takes about two noteheads of space (ie, is followed by a notehead of
+space):
+
+@example
+2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
+
+@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
+@{ assuming: SHORTEST <= 1/8 @}
+
+= arithmetic_multiplier *
+( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
+
+= arithmetic_multiplier * arithmetic_basicspace
+
+@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
+
+= quartwidth * arithmetic_basicspace
+
+=>
+
+arithmetic_basicspace = 2/1 = 2
+
+
+If you want to space your music wider, use something like:
+
+arithmetic_basicspace = 4.;
+
+@end example",
+ "spacing-increment shortest-duration-space");
+
if (bar_l_arr_.size () >= 2 && !spanbar_p_)
{
spanbar_p_ = new Item (get_property ("SpanBar"));
- Span_bar::set_interface (spanbar_p_);
+
spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
announce_grob (spanbar_p_, SCM_EOL);
MAKE_SCHEME_CALLBACK (Span_bar,brew_molecule,1);
-/**
- * Limitations/Bugs:
- *
- * (1) Elements from 'me->get_grob_property ("elements")' must be
- * ordered according to their y coordinates relative to their common
- * axis group parent. Otherwise, the computation goes mad. (TODO:
- * apply a sort algorithm that ensures this precondition.) However,
- * until now, I have seen no case where lily has not fulfilled this
- * precondition.
- *
- * (2) This method depends on bar_engraver not being removed from
- * staff context. If bar_engraver is removed, the size of the staff
- * lines is evaluated as 0, which results in a solid span bar line
- * with faulty y coordinate.
+/*
+ Limitations/Bugs:
+
+ (1) Elements from 'me->get_grob_property ("elements")' must be
+ ordered according to their y coordinates relative to their common
+ axis group parent. Otherwise, the computation goes mad.
+
+ (TODO:
+ apply a sort algorithm that ensures this precondition.) However,
+ until now, I have seen no case where lily has not fulfilled this
+ precondition.
+
+ (2) This method depends on bar_engraver not being removed from
+ staff context. If bar_engraver is removed, the size of the staff
+ lines is evaluated as 0, which results in a solid span bar line
+ with faulty y coordinate.
*/
/*
return gh_double2scm (iv.length ());
}
-void
-Span_bar::set_interface (Grob *me)
-{
- Bar_line::set_interface (me);
-
- me->set_interface (ly_symbol2scm ("span-bar-interface"));
- me->set_extent_callback (SCM_EOL, Y_AXIS);
-}
bool
Span_bar::has_interface (Grob*m)
{
return m && m->has_interface (ly_symbol2scm ("span-bar-interface"));
}
+
+ADD_INTERFACE (Span_bar,"span-bar-interface",
+ "A bar line that spans other barlines (typically used to get cross-staff barlines.",
+ "");
+
+
#include "paper-outputter.hh"
#include "paper-column.hh"
#include "line-of-score.hh"
-
#include "group-interface.hh"
void
{
spanned_drul_[LEFT]=0;
spanned_drul_[RIGHT]=0;
+ Group_interface::add_thing (this, ly_symbol2scm ("interfaces"), ly_symbol2scm ("spanner-interface"));
+
+
}
Spanner::Spanner (Spanner const &s)
{
return dynamic_cast<Spanner*> (unsmob_grob (s));
}
+
+ADD_INTERFACE(Spanner,
+ "spanner-interface",
+ "",
+ "minimum-length");
*fixed = 1.0;
Grob * separation_item=0;
-
+ Item * me_item = dynamic_cast<Item*> (me);
+
for (SCM s = me->get_grob_property ("left-items");
gh_pair_p (s); s = gh_cdr(s))
{
if (!scm_list_p (alist))
return ;
- SCM space_def = scm_sloppy_assq (ly_symbol2scm ("begin-of-note"), alist);
+
+ SCM space_def = scm_sloppy_assq (ly_symbol2scm ("first-note"), alist);
+ if (me_item->break_status_dir () == CENTER)
+ {
+ SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
+ if (gh_pair_p (nndef ))
+ space_def = nndef;
+ }
+
if (!gh_pair_p (space_def))
{
programming_error ("Unknown prefatory spacing. ");
*space += next_notes_correction (me, last_grob);
}
+
+
+ADD_INTERFACE (Staff_spacing,"staff-spacing-interface",
+ "",
+ "left-items right-items");
}
-void
-Staff_symbol_referencer::set_interface (Grob * e)
-{
- e->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
-}
+
+
+ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
+ "Object whose Y position is meaning with reference to a staff
+symbol. Objects that have this interface should include
+Staff_symbol_referencer::callback in their Y-offset-callback.
+",
+ "staff-position");
{
return m && m->has_interface (ly_symbol2scm ("staff-symbol-interface"));
}
+
+
+
+ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
+ "This spanner draws the lines of a staff. The middle line is
+position 0.",
+ "staff-space line-count invisible-staff");
+
if (!stem_p_)
{
stem_p_ = new Item (get_property ("Stem"));
- Stem::set_interface (stem_p_);
- Staff_symbol_referencer::set_interface (stem_p_);
-
+
stem_p_->set_grob_property ("duration-log", gh_int2scm (duration_log));
if (tremolo_req_l_)
if (requested_type)
{
tremolo_p_ = new Item (get_property ("StemTremolo"));
- Stem_tremolo::set_interface (tremolo_p_);
-
announce_grob(tremolo_p_, tremolo_req_l_->self_scm());
+
/*
The number of tremolo flags is the number of flags of
the tremolo-type minus the number of flags of the note
- (duration_log > 2 ? duration_log - 2 : 0);
if (tremolo_flags < 0)
tremolo_flags = 0;
- tremolo_p_->set_grob_property ("tremolo-flags",
+ tremolo_p_->set_grob_property ("flag-count",
gh_int2scm (tremolo_flags));
}
}
lengthen stem if necessary
*/
-void
-Stem_tremolo::set_interface (Grob *me)
-{
- me->set_interface (ly_symbol2scm ("stem-tremolo"));
-}
-
bool
Stem_tremolo::has_interface (Grob *me)
{
- return me->has_interface (ly_symbol2scm ("stem-tremolo"));
+ return me->has_interface (ly_symbol2scm ("stem-tremolo-interface"));
}
MAKE_SCHEME_CALLBACK (Stem_tremolo,dim_callback,2);
if (beam)
{
Real dy = 0;
- SCM s = beam->get_grob_property ("dy");
- if (gh_number_p (s))
- dy = gh_scm2double (s);
+ SCM s = beam->get_grob_property ("positions");
+ if (gh_pair_p (s))
+ {
+ dy = -gh_scm2double (gh_car (s)) +gh_scm2double (gh_cdr (s));
+ }
Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
- Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
dydx = dx ? dy/dx : 0;
a.translate (Offset (-width/2, width / 2 * dydx));
int tremolo_flags;
- SCM s = me->get_grob_property ("tremolo-flags");
+ SCM s = me->get_grob_property ("flag-count");
if (gh_number_p (s))
tremolo_flags = gh_scm2int (s);
else
me->set_grob_property ("stem", s->self_scm ());
}
+
+ADD_INTERFACE (Stem_tremolo,"stem-tremolo-interface",
+ "",
+ "stem beam-width beam-thickness flag-count");
}
else
{
- n->set_grob_property ("rest", n->self_scm ());
+ /*
+ Apparently, this is never used.
+ */
+#if 0
+ me->set_grob_property ("rest", n->self_scm ());
+#endif
}
}
bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend"));
- if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
- st = 0.0;
+ if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
+ st = 0.0;
return st;
}
return m && m->has_interface (ly_symbol2scm ("stem-interface"));
}
-void
-Stem::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("stem-interface"));
-}
+ADD_INTERFACE (Stem,"stem-interface",
+ "A stem",
+ "thickness stem-info beamed-lengths beamed-minimum-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head heads direction length style no-stem-extend flag-style dir-forced");
+
Syllable_group *vi = new Syllable_group;
return vi->smobbed_self ();
}
+
+
+ADD_INTERFACE (Lyric_syllable,"lyric-syllable-interface",
+ "a single piece of lyrics",
+ "word-space alignment ignore-length-mismatch begin-alignment end-alignment");
+
return mol;
}
-void
-System_start_delimiter::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("system-start-delimiter-interface"));
-}
bool
System_start_delimiter::has_interface (Grob*me)
return Molecule (b, at);
}
+
+
+
+ADD_INTERFACE (System_start_delimiter,"system-start-delimiter-interface",
+ "#'style can be bar-line, bracket or brace",
+ "bar-line-collapse-height brace-collapse-height bracket-collapse-height thickness arch-height arch-angle arch-thick arch-width bracket-thick glyph");
: Spanner (s)
{
rank_i_ = 0;
-
- Axis_group_interface::set_interface (this);
- Axis_group_interface::set_axes (this, Y_AXIS,X_AXIS);
}
int
return acs;
}
+
+
+
+ADD_INTERFACE (System,"system-interface",
+ "Super grob, parent of all:
+
+The columns of a score that form one line. The toplevel grob. Any
+grob has a Line_of_score as both X and Y reference point. The
+Paper_score contains one grob of this type. Control enters the
+Grob dependency calculation from this single Line_of_score
+object.",
+ "between-system-string spacing-procedure before-line-breaking-callback after-line-breaking-callback all-elements columns");
return mol.smobbed_copy ();
}
+
+
+
+ADD_INTERFACE (Text_item,"text-interface",
+ "A scheme markup text",
+ "text align baseline-skip lookup raise kern word-space magnify");
/*
TODO:
- vertical start / vertical end (fixme-name) |
- - contination types (vert. star, vert. end) |-> eat volta-spanner
+ - contination types (vert. star, vert. end) |-> eat volta-bracket
- more styles
- more texts/positions
*/
me->set_grob_property ("shorten-pair", gh_cons ( gh_double2scm ( shorten[LEFT] ),
gh_double2scm ( shorten[RIGHT] ) ));
}
+
+
+
+ADD_INTERFACE (Pianopedal,"piano-pedal-interface",
+ "",
+ "pedal-type edge-width edge-height shorten-pair text-start left-widen right-widen");
+
+
+
+ADD_INTERFACE (Text_spanner,"text-spanner-interface",
+ "generic text spanner",
+ "dash-period dash-length edge-height edge-width edge-text shorten-pair type");
+
-void
-Tie_column::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("tie-column-interface"));
- me->set_extent_callback (SCM_EOL, X_AXIS);
- me->set_extent_callback (SCM_EOL, Y_AXIS) ;
-}
bool
Tie_column::has_interface (Grob*me)
set_directions (unsmob_grob (smob));
return SCM_UNSPECIFIED;
}
+
+
+
+ADD_INTERFACE (Tie_column,"tie-column-interface",
+ "that sets tie directions in a tied chord",
+ "direction");
+
Spanner * p = new Spanner (basic);
- Tie::set_interface (p);
+ Tie::set_interface (p); // cannot remove.
Tie::set_head (p,LEFT, dynamic_cast<Item*> (unsmob_grob (ly_car (pair))));
Tie::set_head (p,RIGHT, dynamic_cast<Item*> (unsmob_grob (ly_cdr (pair))));
else for (SCM s = head_list; gh_pair_p (s); s = ly_cdr (s))
{
Grob * p = new Spanner (basic);
- Tie::set_interface (p);
+ Tie::set_interface (p); // cannot remove yet!
Tie::set_head (p, LEFT, dynamic_cast<Item*> (unsmob_grob (ly_caar (s))));
Tie::set_head (p, RIGHT, dynamic_cast<Item*> (unsmob_grob (ly_cdar (s))));
if (tie_p_arr_.size () > 1 && !tie_column_p_)
{
tie_column_p_ = new Spanner (get_property ("TieColumn"));
- Tie_column::set_interface (tie_column_p_);
+
for (int i = tie_p_arr_.size (); i--;)
Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]);
announce_grob(tie_column_p_, SCM_EOL);
Tie::set_interface (Grob*me)
{
me->set_grob_property ("heads", gh_cons (SCM_EOL, SCM_EOL));
- me->set_interface (ly_symbol2scm ("tie-interface"));
}
bool
}
+
+ADD_INTERFACE (Tie,"tie-interface",
+ "A tie connecting two noteheads.
+direction = Forced direction for all ties",
+ "y-offset staffline-clearance control-points heads details thickness x-gap direction minimum-length");
return m;
}
+
+
+ADD_INTERFACE (Time_signature,"time-signature-interface",
+ "A time signature, in different styles.
+ The following values for 'style are are recognized:
+
+ @table @samp
+ @item @code{C}
+ 4/4 and 2/2 are typeset as C and struck C, respectively. All
+ other time signatures are written with two digits.
+
+ @item @code{old}
+ 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
+ typeset with old-style mensuration marks. All other time
+ signatures are written with two digits.
+
+ @item @code{1xxx}
+ All time signatures are typeset with a single
+ digit, e.g. 3/2 is written as 3. (Any symbol starting
+ with the digit @code{1} will do.)
+
+ @item @code{C}@var{M}@code{/}@var{N},
+@code{old}@var{M}@code{/}@var{N} or
+ @code{old6/8alt}
+ Tells LilyPond to use a specific symbol as time signature,
+ regardless of the actual time signature.
+ @end table
+
+See also the test-file @file{input/test/time.ly}.
+",
+ "fraction style");
#include "paper-column.hh"
#include "paper-def.hh"
#include "text-item.hh"
-#include "tuplet-spanner.hh"
+#include "tuplet-bracket.hh"
#include "stem.hh"
#include "note-column.hh"
#include "dimensions.hh"
#include "staff-symbol-referencer.hh"
/*
- TODO:
- staff-line collisions for horizontal tuplet brackets.
-
TODO:
in the case that there is no bracket, but there is a (single) beam,
*/
-
-void
-Tuplet_bracket::set_interface (Grob*me)
-{
- me->set_interface (ly_symbol2scm ("tuplet-bracket"));
-}
-
MAKE_SCHEME_CALLBACK (Tuplet_bracket,brew_molecule,1);
SCM
Tuplet_bracket::brew_molecule (SCM smob)
}
+bool
+Tuplet_bracket::has_interface (Grob*me)
+{
+ return me->has_interface (ly_symbol2scm ("tuplet-bracket-interface"));
+}
+
+
+
+
+ADD_INTERFACE (Tuplet_bracket,"tuplet-bracket-interface",
+ "A bracket with a number in the middle, used for tuplets.",
+ "columns number-gap delta-y tuplet-bracket-visibility tuplet-number-visibility thick direction");
+
#include "command-request.hh"
-#include "tuplet-spanner.hh"
+#include "tuplet-bracket.hh"
#include "note-column.hh"
#include "time-scaled-music.hh"
#include "beam.hh"
continue;
Spanner* glep = new Spanner (get_property ("TupletBracket"));
- Tuplet_bracket::set_interface (glep);
+
if (i >= started_span_p_arr_.size ())
started_span_p_arr_.push (glep);
else
#include "engraver.hh"
#include "translator-group.hh"
-#include "volta-spanner.hh"
+#include "volta-bracket.hh"
#include "item.hh"
#include "note-column.hh"
#include "bar-line.hh"
started_mom_ = now_mom () ;
volta_span_p_ = new Spanner (get_property ("VoltaBracket"));
- Volta_spanner::set_interface (volta_span_p_);
+
announce_grob (volta_span_p_, SCM_EOL);
volta_span_p_->set_grob_property ("text", start_str_);
}
if (Note_column::has_interface (item))
{
if (volta_span_p_)
- Volta_spanner::add_column (volta_span_p_,item);
+ Volta_bracket_interface::add_column (volta_span_p_,item);
}
if (Bar_line::has_interface (item))
{
if (volta_span_p_)
- Volta_spanner::add_bar (volta_span_p_, item);
+ Volta_bracket_interface::add_bar (volta_span_p_, item);
if (end_volta_span_p_)
- Volta_spanner::add_bar (end_volta_span_p_ , item);
+ Volta_bracket_interface::add_bar (end_volta_span_p_ , item);
}
}
else if (Staff_symbol::has_interface (i.grob_l_))
-#(define (grace-beam-space-function multiplicity)
- (* (if (<= multiplicity 3) 0.816 0.844) 0.8))
-
-
startGraceMusic = {
\property Voice.Stem \override #'direction = #1
\property Voice.Stem \override #'length = #6
stopGraceMusic = {
\property Staff.Accidentals \revert #'font-relative-size
- \property Voice.Beam \revert #'space-function
\property Voice.Beam \revert #'thickness
\property Voice.Stem \revert #'flag-style
Begin3
Title: LilyPond
-Version: 1.5.46
-Entered-date: 23MRT02
+Version: 1.5.47
+Entered-date: 24MRT02
Description: @BLURB@
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.5.46.tar.gz
+ 1000k lilypond-1.5.47.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.5.46.tar.gz
+ 1000k lilypond-1.5.47.tar.gz
Copying-policy: GPL
End
%define name lilypond
-%define version 1.5.46
+%define version 1.5.47
%define release 1mdk
Name: %{name}
%define info yes
Name: lilypond
-Version: 1.5.46
+Version: 1.5.47
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.46.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.47.tar.gz
Summary: Create and print music notation
URL: http://www.lilypond.org/
BuildRoot: /tmp/lilypond-install
Distribution: SuSE Linux 7.0 (i386)
Name: lilypond
-Version: 1.5.46
+Version: 1.5.47
Release: 2
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.46.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.47.tar.gz
# music notation software for.. ?
Summary: A program for printing sheet music.
URL: http://www.lilypond.org/
LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log) $(PARMESAN_FILES:.mf=.log))
TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex) $(PARMESAN_FILES:.mf=.tex))
AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(PARMESAN_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES)))
+ENC_FILES=$(TEXTABLES:.tex=.enc)
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
INSTALLATION_DIR=$(datadir)/fonts/source
#MAKE_PFA_FILES=1
PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+
ifdef MAKE_PFA_FILES
ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map
INSTALLATION_OUT_DIR4=$(datadir)/fonts/type1
##
## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
- $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
+$(outdir)/%.afm $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+ $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
local-clean:
rm -f mfplain.mem mfplain.log
endgroup;
enddef;
-fet_beginchar("Pedal asterisk", "*", "pedal-asterisk")
+fet_beginchar("Pedal asterisk", "*", "pedalasterisk")
set_char_box(0, 7/9pedalh#, 0, pedalh#);
z0 = (1/2w, h - 1/2w);
for i = 0 upto 7:
% code := 44; % - = 45
-fet_beginchar("Pedal dash", "-", "pedal-dash")
+fet_beginchar("Pedal dash", "-", "pedaldash")
set_char_box(0, 3penw#, 0, pedalbh#);
pickup pencircle scaled penh;
penstroke z1e{dir 40}..tension 1.2 ..z2e{dir 40};
fet_endchar;
-fet_beginchar("Pedal dot", ".", "pedal-dot")
+fet_beginchar("Pedal dot", ".", "pedaldot")
set_char_box(0, penw#, 0, penw#);
pickup pencircle scaled penw;
draw (1/2penw,1/2penw);
% code := 79; % P = 80
-fet_beginchar("Pedal P", "P", "pedal-P")
+fet_beginchar("Pedal P", "P", "pedalP")
set_char_box(0, 5/6pedalh#, 0, pedalh#);
draw_pedal_P;
fet_endchar;
% code := 99; % d = 100
-fet_beginchar("Pedal d", "d", "pedal-d")
+fet_beginchar("Pedal d", "d", "pedald")
set_char_box(0, 2/3pedalh#, 0, 7/8pedalh#);
draw_pedal_d;
fet_endchar;
-fet_beginchar("Pedal e", "e", "pedal-e")
+fet_beginchar("Pedal e", "e", "pedale")
set_char_box(0, 2/5pedalh#, 0, pedalbh#);
draw_pedal_e;
fet_endchar;
% The pre 1.3.59 user-scm kerning sucks, but I'm not struck by
% the looks of this either.
%
-fet_beginchar("Pedal Ped", "Ped", "pedal-Ped")
+fet_beginchar("Pedal Ped", "Ped", "pedalPed")
P_width# = 5/6pedalh#;
e_width# = 2/5pedalh#;
d_width# = 2/3pedalh#;
% Extendable Trill symbol.
% Not yet used
% Rename me to Trill, rename Trill to Tr?
-fet_beginchar("Trill-element","trill-element","trill-element");
+fet_beginchar("Trill-element","trill-element","trillelement");
save height, overshoot;
height# = staff_space#;
width# = 0.8height#;
.. simple_serif(z1r, z1l, 90) .. z2l{down} -- cycle;
enddef;
-fet_beginchar("Right Parenthesis", ")", "rightparen")
+fet_beginchar("Right Parenthesis", "rightparen", "rightparen")
draw_paren;
fet_endchar;
-fet_beginchar("Left Parenthesis", "(", "leftparen")
+fet_beginchar("Left Parenthesis", "leftparen", "leftparen")
draw_paren;
currentpicture := currentpicture xscaled -1;
set_char_box(charwd, charbp, chardp, charht);
(typename (type-name type))
(desc (object-property sym 'backend-doc)))
- (cons (string-append "@code{" name "} "
+
+ (if (equal? desc #f)
+ (error "Unknown property " sym)
+
+ (cons (string-append "@code{" name "} "
"(" typename ")"
": "
; index gets too messy
; "@vindex " name "\n"
-
-
)
- desc)))
+ desc))))
(define (document-grob-property sym grob-description )
+ "Document SYM, filling in default values."
(let* ((handle (assoc sym grob-description))
(defval (if (eq? handle #f)
"(unset)"
(scm->texi (cdr handle))))
(propdoc (backend-property->texi sym)))
-
+
(cons (car propdoc) (string-append (cdr propdoc)
"\nDefault value: "
- defval))))
+ defval)))
+ )
(define (document-interface where interface grob-description)
+
(let* ((level (if (eq? where 'grob) 3 2))
(name (car interface))
(desc (cadr interface))
(props (caddr interface))
- (docfunc (lambda (x)
+ (docfunc (lambda (pr)
(document-grob-property
- x grob-description )))
+ pr grob-description )))
(docs (map docfunc props)))
(string-append
(node (interface-name name))
(document-interface 'self interface '()))))
+
;; First level grob description
(define (document-grob iname description)
(processing iname)
(let* ((metah (assoc 'meta description))
- (meta (if (pair? metah)
- (cdr metah)
- '((properties . ()) (name . "huh?"))
- ))
-
+ (meta (cdr metah))
(name (cdr (assoc 'name meta)))
- (ifaces (cdr (assoc 'interface-descriptions meta)))
- (ifacedoc (map (lambda (x)
- (document-interface 'grob x description))
- (reverse ifaces))))
+ (ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
+ (ifacedoc (map (lambda (iface)
+ (document-interface 'grob iface description))
+ (reverse ifaces)))
+ )
+
(string-append
(node (grob-name name))
(texi-section 2 (grob-name name) #f)
(map engraver-name engraver-names)))))
(apply string-append ifacedoc))))
-
+
+
+
(define (engraver-makes-grob? name-symbol grav)
(memq name-symbol (assoc 'grobs-created (Translator::description grav)))
)
(define interface-description-alist
- (map (lambda (x) (cons (string->symbol x) (eval-string x)))
- (interface-names)))
+ (hash-fold
+ (lambda (key val prior)
+ (cons (cons key val) prior)
+ )
+ '() (ly-all-grob-interfaces)))
(set! interface-description-alist (sort interface-description-alist alist<?))
+
+;;;;;;;;;; check for dangling backend properties.
+(define (mark-interface-properties entry)
+ (map (lambda (x) (set-object-property! x 'iface-marked #t)) (caddr (cdr entry)))
+ )
+
+(map mark-interface-properties interface-description-alist)
+
+(define (check-dangling-properties prop)
+ (if (not (object-property prop 'iface-marked))
+ (error "\nDangling property: " prop))
+ )
+
+(map check-dangling-properties all-backend-properties)
+
+;;;;;;;;;;;;;;;;
+
+(define (lookup-interface name)
+ (let* (
+ (entry (hashq-ref (ly-all-grob-interfaces) name #f))
+ )
+
+ (if (equal? entry #f)
+ (error "Unknown interface" name))
+
+ entry
+))
+
+;(write (map car interface-description-alist) (current-error-port))
+;(display (lookup-interface 'volta-bracket-interface))
+
(define (document-all-interfaces name)
(string-append
(texi-node-menu name (map (lambda (x)
texi)
)
)
-
+
+;;;;;;;;;;;;;;;;
+
;; are described...
(define no-copies #f)
+
+
(let* ((doc (string-append
(document-music "LilyPond music properties")
(document-paper "LilyPond interpretation contexts")
. (
(molecule-callback . ,Local_key_item::brew_molecule)
(X-offset-callbacks . (,Side_position_interface::aligned_side))
+ (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(after-line-breaking-callback . ,Local_key_item::after_line_breaking)
(direction . -1)
(left-padding . 0.2)
(right-padding . 0.5)
(paren-cautionaries . #t)
(font-family . music)
- (meta . ,(grob-description accidentals-interface font-interface side-position-interface))
+ (meta . ((interfaces . (accidentals-interface staff-symbol-referencer-interface font-interface side-position-interface))))
))
(Arpeggio
(X-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . -1)
(staff-position . 0.0)
- (meta . ,(grob-description arpeggio-interface side-position-interface font-interface))
+ (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface font-interface))))
))
(BarLine
(time-signature . (extra-space . 0.75))
(custos . (minimum-space . 2.0))
(clef . (minimum-space . 1.0))
- (begin-of-note . (extra-space . 1.3))
+ (first-note . (extra-space . 1.3))
))
;;
(thin-kern . 3.0)
(hair-thickness . 1.6)
(thick-thickness . 6.0)
- (meta . ,(grob-description bar-line-interface font-interface))
+ (meta . ((interfaces . (bar-line-interface font-interface))))
))
(font-family . roman)
(font-relative-size . -1)
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
- (meta . ,(grob-description
- side-position-interface
- text-interface font-interface break-aligned-interface))
- ))
+ (meta .
+ ((interfaces . (side-position-interface
+ text-interface
+ font-interface break-aligned-interface))))
+
+ ))
(BassFigure
. (
(padding . 0.1)
(kern . 0.2)
(thickness . 1.0)
- (meta . ,(grob-description text-interface font-interface ))
+ (meta . ((interfaces . (text-interface font-interface))))
))
(Beam
. (
,Beam::check_concave
,Beam::slope_damping
,Beam::quanting
- ))
-
+ ))
+
+ ;; TODO: should be in SLT.
(thickness . 0.48) ; in staff-space
(before-line-breaking-callback . ,Beam::before_line_breaking)
(after-line-breaking-callback . (,Beam::after_line_breaking
,Beam::end_after_line_breaking))
-; (quant-score-functions . (
-; ,Beam::score_stem_lengths
-; ))
(neutral-direction . -1)
(dir-function . ,beam-dir-majority-median)
(beamed-stem-shorten . (1.0 0.5))
(damping . 1)
(auto-knee-gap . 7)
(font-name . "cmr10")
- (meta . ,(grob-description beam-interface))
+ (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface))))
))
(BreakAlignment
. (
(breakable . #t)
(stacking-dir . 1)
- (axes 0)
- (meta . ,(grob-description
- axis-group-interface
- )
- )
- ))
+ (axes . (0))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (meta . ((interfaces . (break-alignment-interface axis-group-interface)))))
+ )
(BreakAlignGroup
. (
(axes . (0))
(X-offset-callbacks . (,Break_align_interface::alignment_callback))
-
- (meta . ,(grob-description axis-group-interface))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (meta . ((interfaces . (break-aligned-interface axis-group-interface))))
))
(BreathingSign
. (
(break-align-symbol . breathing-sign)
- (breakable . #t )
+ (breakable . #t)
(space-alist . (
(key-signature . (minimum-space . 1.5))
(staff-bar . (minimum-space . 1.5))
(clef . (minimum-space . 2.0))
- (begin-of-note . (minimum-space . 1.0))
+ (first-note . (minimum-space . 1.0))
))
(molecule-callback . ,Text_item::brew_molecule)
(lookup . name)
(text . "scripts-rcomma")
(Y-offset-callbacks . (,Breathing_sign::offset_callback))
(visibility-lambda . ,begin-of-line-invisible)
- (meta . ,(grob-description break-aligned-interface text-interface font-interface))
+ (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface))))
))
(Clef
(staff-bar . (minimum-space . 3.7))
(key-signature . (minimum-space . 4.0))
(time-signature . (minimum-space . 4.2))
- (begin-of-note . (minimum-space . 5.0))
+ (first-note . (minimum-space . 5.0))
+ (next-note . (extra-space . 0.5))
))
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
- (meta . ,(grob-description clef-interface font-interface break-aligned-interface ))
+ (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface))))
))
(ChordName
(after-line-breaking-callback . ,Chord_name::after_line_breaking)
(chord-name-function . ,default-chord-name-function)
(font-family . roman)
- (meta . ,(grob-description font-interface text-interface chord-name-interface))
+ (meta . ((interfaces . (font-interface text-interface chord-name-interface))))
))
(Custos
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(font-family . music)
(space-alist . (
- (begin-of-note . (minimum-space . 0.0))
+ (first-note . (minimum-space . 0.0))
))
- (meta . ,(grob-description custos-interface staff-symbol-referencer-interface break-aligned-interface) )
+ (meta . ((interfaces . (custos-interface staff-symbol-referencer-interface break-aligned-interface))))
))
(DotColumn
. (
- (axes 0)
+ (axes . (0))
(direction . 1)
(X-extent-callback . ,Axis_group_interface::group_extent_callback)
-
(X-offset-callbacks . (,Dot_column::side_position))
- (meta . ,(grob-description dot-column-interface axis-group-interface))
+ (meta . ((interfaces . (dot-column-interface axis-group-interface))))
))
(Dots
(dot-count . 1)
(staff-position . 0.0)
(Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
- (meta . ,(grob-description font-interface dots-interface ))
+ (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface))))
))
(DoublePercentRepeat .
(thickness . 0.48)
(break-align-symbol . staff-bar)
(visibility-lambda . ,begin-of-line-invisible)
- (meta . ,(grob-description font-interface percent-repeat-interface))
- ))
+ (meta . ((interfaces . (font-interface percent-repeat-interface))))
+ ))
(DynamicText
. (
(font-family . dynamic)
(font-shape . italic)
(self-alignment-Y . 0)
- (meta . ,(grob-description font-interface text-interface dynamic-interface))
+ (meta . ((interfaces . (font-interface text-interface dynamic-interface))))
))
(DynamicLineSpanner
. (
- (axes . ( 1))
+ (axes . (1))
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+
(padding . 0.6)
(minimum-space . 1.2)
(direction . -1)
- (meta . ,(grob-description dynamic-interface axis-group-interface side-position-interface))
+ (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface))))
))
(LeftEdge
(staff-bar . (extra-space . 0.0))
(breathing-sign . (minimum-space . 0.0))
(clef . (extra-space . 1.0))
- (begin-of-note . (extra-space . 0.0))
+ (first-note . (extra-space . 0.0))
(key-signature . (extra-space . 0.0))
))
- (meta . ,(grob-description break-aligned-interface))
+ (meta . ((interfaces . (break-aligned-interface))))
))
(Fingering
(font-family . number)
(font-relative-size . -3)
(font-shape . upright)
- (meta . ,(grob-description finger-interface font-interface
- text-script-interface text-interface side-position-interface))
+ (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface))))
))
. (
(Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
(Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
- (axes 1)
- (meta . ,(grob-description axis-group-interface hara-kiri-group-interface))
+ (axes . (1))
+ (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface))))
))
(Hairpin
(dash-length . 4.0)
(self-alignment-Y . 0)
(Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
- (meta . ,(grob-description hairpin-interface dynamic-interface))
+ (meta . ((interfaces . (hairpin-interface dynamic-interface))))
))
(InstrumentName
(visibility-lambda . ,begin-of-line-visible)
(baseline-skip . 2)
(font-family . roman)
- (meta . ,(grob-description font-interface text-interface break-aligned-interface))
+ (meta . ((interfaces . (font-interface side-position-interface text-interface break-aligned-interface))))
))
(KeySignature
(space-alist . (
(time-signature . (extra-space . 1.25))
(staff-bar . (extra-space . 1.1))
- (begin-of-note . (extra-space . 2.5))
+ (first-note . (extra-space . 2.5))
))
+ (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(break-align-symbol . key-signature)
(visibility-lambda . ,begin-of-line-visible)
(breakable . #t)
- (meta . ,(grob-description key-signature-interface font-interface break-aligned-interface))
+ (meta . ((interfaces . (key-signature-interface font-interface break-aligned-interface))))
))
(maximum-length . 100)
(molecule-callback . ,Hyphen_spanner::brew_molecule)
(Y-extent-callback . ,Grob::point_dimension_callback)
- (meta . ,(grob-description lyric-hyphen-interface ))
+ (meta . ((interfaces . (lyric-hyphen-interface))))
))
(LyricExtender
(height . 0.8) ; stafflinethickness;
(right-trim-amount . 0.5)
(Y-extent-callback . ,Grob::point_dimension_callback)
- (meta . ,(grob-description lyric-extender-interface))
+ (meta . ((interfaces . (lyric-extender-interface))))
))
(LyricText
(end-alignment . 2)
(font-family . roman)
(font-shape . upright)
- (meta . ,(grob-description lyric-syllable-interface text-interface font-interface ))
+ ;; duh, side-position-interface?
+ (meta . ((interfaces . (lyric-syllable-interface side-position-interface text-interface font-interface))))
))
(Porrectus
(style . mensural)
(auto-properties . #f)
(solid . #f)
- (porrectus-width . 2.4)
- (line-thickness . 1.0)
+ (width . 2.4)
+ (thickness . 1.0)
(add-stem . #t)
- (stem-direction . 1)
+ (direction . 1)
(molecule-callback . ,Porrectus::brew_molecule)
- (meta . ,(grob-description porrectus-interface))
+ (meta . ((interfaces . (porrectus-interface))))
))
(RehearsalMark
(font-relative-size . 1)
(visibility-lambda . ,end-of-line-invisible)
(padding . 0.8)
- (meta . ,(grob-description mark-interface side-position-interface))
+ (meta . ((interfaces . (text-interface font-interface mark-interface side-position-interface))))
))
(MultiMeasureRest
(minimum-width . 12.5) ; staffspace
(font-family . number)
(font-relative-size . 1)
- (meta . ,(grob-description multi-measure-rest-interface rest-interface font-interface ))
+ (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
))
(NoteCollision
. (
- (axes 0 1)
+ (axes . (0 1))
;; Ugh, should not be hard-coded.
(note-width . 1.321)
- (meta . ,(grob-description
- note-collision-interface axis-group-interface
- ))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (meta . ((interfaces . (note-collision-interface axis-group-interface))))
))
(NoteColumn
. (
(axes . (0 1))
- (meta . ,(grob-description axis-group-interface note-column-interface))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (meta . ((interfaces . (axis-group-interface note-column-interface))))
))
(NoteHead
(molecule-callback . ,Note_head::brew_molecule)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(stem-attachment-function . ,note-head-style->attachment-coordinates)
- (meta . ,(grob-description rhythmic-head-interface font-interface note-head-interface))
+ (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface))))
))
(Glissando
(X-extent-callback . #f)
(Y-extent-callback . #f)
(molecule-callback . ,Line_spanner::brew_molecule)
- (meta . ,(grob-description line-spanner-interface))
+ (meta . ((interfaces . (line-spanner-interface))))
))
(VoiceFollower
(X-extent-callback . #f)
(Y-extent-callback . #f)
(molecule-callback . ,Line_spanner::brew_molecule)
- (meta . ,(grob-description line-spanner-interface))
+ (meta . ((interfaces . (line-spanner-interface))))
))
(NoteName
. (
(molecule-callback . ,Text_item::brew_molecule)
(font-family . roman)
- (meta . ,(grob-description note-name-interface font-interface))
+ (meta . ((interfaces . (note-name-interface text-interface font-interface))))
))
(OctavateEight
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
(font-family . roman)
- (meta . ,(grob-description text-interface font-interface ))
+ (meta . ((interfaces . (text-interface side-position-interface font-interface))))
))
(PaperColumn
. (
- (axes 0)
- ; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8")
- (meta . ,(grob-description paper-column-interface axis-group-interface spaceable-element-interface))
+ (axes . (0))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+
+; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+ (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
))
(PhrasingSlur
(after-line-breaking-callback . ,Slur::after_line_breaking)
(extremity-rules . ,default-slur-extremity-rules)
(extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
- (de-uglify-parameters . ( 1.5 0.8 -2.0))
+ (de-uglify-parameters . (1.5 0.8 -2.0))
(Y-extent-callback . ,Slur::height)
(details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
(bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
(attachment . (#f . #f))
(attachment-offset . ((0 . 0) . (0 . 0)))
(slope-limit . 0.8)
- (meta . ,(grob-description slur-interface))
+ (meta . ((interfaces . (slur-interface))))
))
(NonMusicalPaperColumn
. (
- (axes 0)
- ; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8")
- (meta . ,(grob-description paper-column-interface
- axis-group-interface spaceable-element-interface))
+ (axes . (0))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+
+ ;; debugging stuff: print column number.
+; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+
+
+ (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
))
(PercentRepeat
(thickness . 0.48)
(minimum-width . 12.5) ; staffspace
(font-family . music)
- (meta . ,(grob-description multi-measure-rest-interface font-interface percent-repeat-interface))
+ (meta . ((interfaces . (multi-measure-rest-interface font-interface percent-repeat-interface))))
))
(PianoPedalBracket ;; an example of a text spanner
(edge-height . (1.0 . 1.0))
(shorten-pair . (0.0 . 0.0))
(thickness . 1.0)
- (meta . ,(grob-description piano-pedal-interface))
+ (meta . ((interfaces . (piano-pedal-interface))))
))
(RepeatSlash
(molecule-callback . , Percent_repeat_item_interface::beat_slash)
(thickness . 0.48)
(slope . 1.7)
- (meta . ,(grob-description percent-repeat-interface))
+ (meta . ((interfaces . (percent-repeat-interface))))
))
(Rest
. (
(molecule-callback . ,Rest::brew_molecule)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(minimum-beam-collision-distance . 1.5)
- (meta . ,(grob-description
- rhythmic-head-interface
- staff-symbol-referencer-interface
- rest-interface))
- ))
+ (meta . (
+ (interfaces . (font-interface
+ rhythmic-head-interface
+ staff-symbol-referencer-interface
+ rest-interface))
+ ))))
(RestCollision
. (
(minimum-distance . 0.75)
- (meta . ,(grob-description rest-collision-interface ))
+ (meta . ((interfaces . (rest-collision-interface))))
))
(Script
(X-offset-callbacks . (,Side_position_interface::centered_on_parent))
(before-line-breaking-callback . ,Script::before_line_breaking)
(font-family . music)
- (meta . ,(grob-description script-interface side-position-interface font-interface))
+ (meta . ((interfaces . (script-interface side-position-interface font-interface))))
))
(ScriptColumn
. (
(before-line-breaking-callback . ,Script_column::before_line_breaking)
- (meta . ,(grob-description script-column-interface))
+ (meta . ((interfaces . (script-column-interface))))
))
(Slur
(after-line-breaking-callback . ,Slur::after_line_breaking)
(extremity-rules . ,default-slur-extremity-rules)
(extremity-offset-alist . ,default-slur-extremity-offset-alist)
- (de-uglify-parameters . ( 1.5 0.8 -2.0))
+ (de-uglify-parameters . (1.5 0.8 -2.0))
(Y-extent-callback . ,Slur::height)
(details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
(bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
(attachment . (#f . #f))
(attachment-offset . ((0 . 0) . (0 . 0)))
(slope-limit . 0.8)
- (meta . ,(grob-description slur-interface))
+ (meta . ((interfaces . (slur-interface))))
))
(SpacingSpanner
(shortest-duration-space . 2.0)
(spacing-increment . 1.2)
- (X-extent-callback . #f)
- (Y-extent-callback . #f)
-
- (meta . ,(grob-description spacing-spanner-interface))
+ (meta . ((interfaces . (spacing-spanner-interface))))
))
(SpanBar
(molecule-callback . ,Span_bar::brew_molecule)
(visibility-lambda . ,begin-of-line-invisible)
(X-extent-callback . ,Span_bar::width_callback)
+ (Y-extent-callback . ())
(breakable . #t)
(glyph . "|")
(before-line-breaking-callback . ,Span_bar::before_line_breaking)
(thin-kern . 3.0)
(hair-thickness . 1.6)
(thick-thickness . 6.0)
- (meta . ,(grob-description span-bar-interface bar-line-interface ))
+ (meta . ((interfaces . (span-bar-interface bar-line-interface))))
))
(StanzaNumber
(break-align-symbol . clef)
(visibility-lambda . ,begin-of-line-visible)
(font-family . roman)
- (meta . ,(grob-description break-aligned-interface text-interface font-interface))
+ (meta . ((interfaces . (break-aligned-interface text-interface font-interface))))
))
(StaffSpacing
. (
(breakable . #t)
- (X-extent-callback . #f)
(stem-spacing-correction . 0.4)
- (Y-extent-callback . #f)
- (meta . ,(grob-description staff-spacing-interface))
+ (meta . ((interfaces . (staff-spacing-interface))))
))
(NoteSpacing
. (
- (X-extent-callback . #f)
- (Y-extent-callback . #f)
(stem-spacing-correction . 0.5)
(space-factor . 1.0)
- (meta . ,(grob-description note-spacing-interface))
+ (meta . ((interfaces . (note-spacing-interface))))
))
(StaffSymbol
(staff-space . 1.0)
(line-count . 5)
(layer . 0)
- (meta . ,(grob-description staff-symbol-interface ))
+ (meta . ((interfaces . (staff-symbol-interface))))
))
(SostenutoPedal
(font-family . roman)
(font-shape . italic)
(self-alignment-X . 0)
- (meta . ,(grob-description text-interface font-interface))
+ (meta . ((interfaces . (text-interface font-interface))))
))
(SostenutoPedalLineSpanner
. (
- (axes . ( 1))
+ (axes . (1))
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+
(padding . 1.2)
(minimum-space . 1.0)
(direction . -1)
- (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+ (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
))
(Stem
(X-offset-callbacks . (,Stem::off_callback))
(X-extent-callback . ,Stem::dim_callback)
(Y-extent-callback . ,Stem::height)
+ (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(adjust-if-on-staffline . #t)
(font-family . music)
- (meta . ,(grob-description stem-interface font-interface))
+ (meta . ((interfaces . (stem-interface font-interface))))
))
(StemTremolo
(beam-width . 2.0) ; staff-space
(beam-thickness . 0.48) ; staff-space
- (meta . ,(grob-description stem-tremolo-interface ))
+ (meta . ((interfaces . (stem-tremolo-interface))))
))
(SeparationItem
. (
- (meta . ,(grob-description separation-item-interface ))
+ (meta . ((interfaces . (separation-item-interface))))
))
(SeparatingGroupSpanner
. (
(spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
- (meta . ,(grob-description separation-spanner-interface))
+ (meta . ((interfaces . (separation-spanner-interface))))
))
(SustainPedal
(padding . 0.0) ;; padding relative to SustainPedalLineSpanner
(pedal-type . text)
(X-offset-callbacks . (,Side_position_interface::aligned_on_self))
- (meta . ,(grob-description piano-pedal-interface side-position-interface font-interface))
+ (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface side-position-interface font-interface))))
))
(SustainPedalLineSpanner
. (
- (axes . ( 1))
+ (axes . (1))
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+
(padding . 1.2)
(minimum-space . 1.0)
(direction . -1)
- (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+ (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
))
(System
. (
(axes . (0 1))
- (meta . ,(grob-description line-of-score-interface axis-group-interface))
+ (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+ (meta . ((interfaces . (system-interface axis-group-interface))))
))
(SystemStartBrace
(collapse-height . 5.0)
(font-family . braces)
(Y-extent-callback . #f)
- (meta . ,(grob-description system-start-delimiter-interface font-interface))
+ (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
))
(SystemStartBracket
(arch-width . 1.5)
(bracket-collapse-height . 1)
(thickness . 0.25)
- (meta . ,(grob-description system-start-delimiter-interface ))
+ (meta . ((interfaces . (system-start-delimiter-interface))))
))
(SystemStartBar
(glyph . "bar-line")
(thickness . 1.6)
(after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
- (meta . ,(grob-description system-start-delimiter-interface ))
+ (meta . ((interfaces . (system-start-delimiter-interface))))
))
(TextScript
;; todo: add X self alignment?
(baseline-skip . 2)
(font-family . roman)
- (meta . ,(grob-description text-script-interface text-interface side-position-interface font-interface ))
+ (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface))))
))
(TextSpanner
(width-correct . -1)
(direction . 1)
- (meta . ,(grob-description text-spanner-interface font-interface))
+ (meta . ((interfaces . (text-spanner-interface font-interface))))
))
(Tie
(x-gap . 0.2)
(y-offset . 0.6)
(minimum-length . 2.5)
- (meta . ,(grob-description tie-interface ))
+ (meta . ((interfaces . (tie-interface))))
))
(TieColumn
. (
(after-line-breaking-callback . ,Tie_column::after_line_breaking)
- (meta . ,(grob-description tie-column-interface ))
+ (X-extent-callback . ())
+ (Yoo-extent-callback . ())
+ (meta . ((interfaces . (tie-column-interface))))
))
(TimeSignature
(break-align-symbol . time-signature)
(visibility-lambda . ,all-visible)
(space-alist . (
- (begin-of-note . (extra-space . 2.0))
+ (first-note . (extra-space . 2.0))
(staff-bar . (minimum-space . 2.0))
))
(breakable . #t)
(style . C)
(font-family . number)
- (meta . ,(grob-description time-signature-interface font-interface))
+ (meta . ((interfaces . (time-signature-interface font-interface))))
))
(TupletBracket
(font-family . roman)
(font-shape . italic)
(font-relative-size . -1)
- (meta . ,(grob-description text-interface
- tuplet-bracket-interface font-interface))
+ (meta . ((interfaces . (text-interface tuplet-bracket-interface font-interface))))
))
(UnaCordaPedal
(pedal-type . text)
(padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
(X-offset-callbacks . (,Side_position_interface::aligned_on_self))
- (meta . ,(grob-description text-interface font-interface))
+ (meta . ((interfaces . (text-interface font-interface))))
))
(UnaCordaPedalLineSpanner
. (
- (axes . ( 1))
+ (axes . (1))
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
(padding . 1.2)
(minimum-space . 1.0)
(direction . -1)
- (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+ (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
))
(VoltaBracket
. (
- (molecule-callback . ,Volta_spanner::brew_molecule)
+ (molecule-callback . ,Volta_bracket_interface::brew_molecule)
(direction . 1)
(padding . 1)
(font-style . volta)
(minimum-space . 5)
(font-family . number)
(font-relative-size . -2)
- (meta . ,(grob-description volta-bracket-interface side-position-interface font-interface))
+ (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface))))
))
(VerticalAlignment
. (
- (axes 1)
+ (axes . (1))
(Y-extent-callback . ,Axis_group_interface::group_extent_callback)
- (X-extent-callback . #f)
(stacking-dir . -1)
- (meta . ,(grob-description align-interface axis-group-interface))
+ (meta . ((interfaces . (align-interface axis-group-interface))))
))
(VerticalAxisGroup
. (
- (axes 1)
- (meta . ,(grob-description axis-group-interface))
+ (axes . (1))
+ (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+
+ (meta . ((interfaces . (axis-group-interface))))
))
- )
- )
+ )
+ )
(define (completize-grob-entry x)
"transplant assoc key into 'name entry of 'meta of X
"
- (let* ((name-sym (car x))
- (entry (cdr x))
- (metaentry (cdr (assoc 'meta entry)))
- (new-metaentry (assoc-set! metaentry 'name name-sym))
- )
- (cons name-sym (assoc-set! entry 'meta new-metaentry))
- ))
+ (let* ((name-sym (car x))
+ (grob-entry (cdr x))
+ (metaentry (cdr (assoc 'meta grob-entry)))
+ (ifaces-entry
+ (cdr (assoc 'interfaces metaentry)))
+
+ )
+ (set! metaentry (assoc-set! metaentry 'name name-sym))
+ (set! metaentry (assoc-set! metaentry 'interfaces
+ (cons 'grob-interface ifaces-entry)))
+ (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
+ (cons name-sym grob-entry)))
(set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
(grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
(grob-property-description 'beam-thickness number? "thickness, measured in staffspace.")
(grob-property-description 'beam-width number? "width of the tremolo sign.")
-(grob-property-description 'beamAuto boolean? "enable autobeaming?.")
(grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
(grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
(grob-property-description 'beamed-stem-shorten number? "shorten beamed stems in forced direction.")
(grob-property-description 'beaming number-pair? "number of beams extending to left and right.")
-(grob-property-description 'beams list? "list of beam ptrs.")
(grob-property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied. It correlates with the enclosed area between noteheads and slurs. A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
-(grob-property-description 'before-grace-spacing-factor number? " stretch space this much if there are grace notes before the column.")
(grob-property-description 'before-line-breaking-callback procedure? "Procedure taking grob as argument.
This procedure is called (using dependency resolution) before line breaking, but after generating discretionary items. Return value is ignored.")
-(grob-property-description 'before-musical-spacing-factor number? "space before musical columns (eg. taken by accidentals) get this much
-stretched when they follow a musical column, in absence of grace
-notes. 0.0 means no extra space (accidentals are ignored).")
+(grob-property-description 'between-cols pair? "Where to attach a loose column to")
(grob-property-description 'between-system-string string? "string
to dump between two systems. Useful for forcing pagebreaks.")
(grob-property-description 'bounded-by-me list? "list of spanners that have this
(grob-property-description 'bar-line-collapse-height number? "Minimum height of system start delimiter bar-line glyphs. If equal or smaller, the bar-line is removed.")
(grob-property-description 'brace-collapse-height number? "Minimum height of system start delimiter brace glyphs. If equal or smaller, the brace is removed.")
(grob-property-description 'bracket-collapse-height number? "Minimum height of system start delimiter bracket glyphs. If equal or smaller, the bracket is removed.")
-(grob-property-description 'column-space-strength number? "relative strength of space following breakable columns (eg. prefatory matter).")
(grob-property-description 'columns list? "list of grobs, typically containing paper-columns, list of note-columns.")
-(grob-property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
(grob-property-description 'control-points list? "List of 4 offsets (number-pairs) that form control points for the tie/slur shape.")
(grob-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams .")
(grob-property-description 'dash-length number? "the length of a dash.")
@end table
")
-(grob-property-description 'dir-list list? "list of stem directions, needed for optical spacing correction.")
(grob-property-description 'direction dir? "up or down, left or right?.")
(grob-property-description 'direction-source ly-grob? "in case side-relative-direction is set, which grob to get the direction from .")
(grob-property-description 'dot ly-grob? "reference to Dots object.")
(grob-property-description 'dot-count integer? "number of dots.")
(grob-property-description 'duration-log integer? "2-log of the notehead duration, i.e. 0=whole note, 1 = half note, etc.")
-(grob-property-description 'dy number? "set by beam: vertical travel height")
+
(grob-property-description 'edge-height pair? "a cons that specifies the heights of the vertical edges '(LEFT-height . RIGHT-height).")
(grob-property-description 'edge-width pair? "a cons that specifies the widths of the slanted edges '(LEFT-width . RIGHT-width).")
(grob-property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text).")
.")
(grob-property-description 'height number? "in staffspace.")
(grob-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting. This is used by @ref{note-collision-interface}.")
-(grob-property-description 'horizontal-space number? "amount of space to add after a note (in staff-space).")
(grob-property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
(grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
(grob-property-description 'inversion list? " musical-pitch, optional.")
(grob-property-description 'layer number? "The output layer [0..2]. The default is 1.")
(grob-property-description 'left-padding number? "space left of accs.")
+(grob-property-description 'right-head ly-grob? "")
+(grob-property-description 'left-head ly-grob? "")
+
(grob-property-description 'left-widen boolean? "Whether the left edge of a piano pedal bracket should be widened by the first element of edge-width.")
(grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.")
work: @code{\override} is processed after the StaffSymbol is created,
and will have no effect.
")
-(grob-property-description 'line-thickness number? "the thickness[stafflinethickness] of the line.")
(grob-property-description 'lookup symbol? "lookup method: 'value for plain text, 'name for character-name.")
(grob-property-description 'magnify number? "the magnification factor. FIXME: doesn't work for feta fonts.")
-(grob-property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
(grob-property-description 'maximum-length number? "don't make Grob longer than this")
(grob-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.")
(grob-property-description 'measure-count integer? "number of measures for a multimeasure rest.")
(grob-property-description 'note-heads list? "List of note head grobs")
(grob-property-description 'number-gap number? "size of the gap for tohe number in a tuplet.")
(grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
-(grob-property-description 'origin ly-input-location? "location in input file of the definition.")
-(grob-property-description 'outer-stem-length-limit number? "catch
-suspect beam slopes, set slope to zero if outer stem is lengthened
-more than this (in staffspace).")
-
(grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
-(grob-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket .")
(grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.")
(grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.")
(grob-property-description 'penalty number? "Penalty for breaking at
as a real penalty.")
(grob-property-description 'pitches list? "list of musical-pitch.")
-(grob-property-description 'porrectus-width number? "width of the porrectus ligature measured in staff space.")
(grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
(grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
(grob-property-description 'right-padding number? "space right of accs.")
spacing tuples: format = (SYMBOL . (TYPE . DISTANCE)), where TYPE can be
minimum-space or extra-space.")
-(grob-property-description 'space-factor number? "Scale horizontal spacing up by this amount.")
(grob-property-description 'spacing-procedure procedure? "procedure
taking grob as argument. This is called after
before-line-breaking-callback, but before the actual line breaking
does the stem attach to the notehead? Function takes a symbol argument
being the style. It returns a (X . Y) pair, specifying location in
terms of note head bounding box.")
-(grob-property-description 'stem-direction dir? "up or down?.
-
-[docme: why not direction]
-")
(grob-property-description 'stem-end-position number? "Where does the stem end (the end is opposite to the support-head.")
-(grob-property-description 'stem-length number? "length of stem.")
+
(grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity.")
(grob-property-description 'stem-spacing-correction number? "optical correction amount. [TODO: doco] ")
(grob-property-description 'stems list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
-(grob-property-description 'stretch-distance number-pair? "pair of distances.")
(grob-property-description 'style symbol? "a string determining what style of glyph is typeset. Valid choices depend on the function that is reading this property. .")
(grob-property-description 'support-head ly-grob? "the note head at
one end of the stem.")
(grob-property-description 'ignore-length-mismatch boolean? "if #t, stanzas with shorter lyrics can be moved away from their respective note-head by the lyric alignment code.")
(grob-property-description 'begin-alignment number? "proportion of lyric length from beginning to align with note-head for left-aligned lyrics.")
(grob-property-description 'end-alignment number? "proportion of lyric length from end to align with note-head for right-aligned lyrics.")
+(grob-property-description 'width number? "width of a grob measured in staff space.")
(grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
(grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
(grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
-(grob-property-description 'y number? "set by beam: position of left edge.")
-
;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;; INTERNAL
(grob-property-description 'accidentals-grob ly-grob? "accidentals for this note.")
(grob-property-description 'causes list? "list of cause objects.")
-(grob-property-description 'tremolo-flags number? "")
+(grob-property-description 'flag-count number? "")
(grob-property-description 'chord-tremolo boolean? "if set, this beam is a tremolo. TODO: use interface for this!")
(grob-property-description 'chord pair? "?")
(grob-property-description 'begin-of-line-visible boolean? "?")
; should include default value?
-
-;;; FIXME: naming.
-;;; Score elements are called `objects' now and then, which gets
-;;; rather confusing, we now have `elements', `items', `spanners'
-;;; and `objects'.
-
-
-;;; TODO: this should be done through C++ macros, in order to have
-;;; tighter coupling between the C++ and its doco.
-
-(define all-interfaces '())
-
-(define (lily-interface symbol description props)
- (set! all-interfaces (acons symbol (list symbol
- description
- props) all-interfaces)
- )
- )
-
-(define (grob-description . interfaces)
- (let* ((ifs (cons grob-interface interfaces))
- (props (map caddr ifs))
- ; (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
- ; (apply append props)))
- (syms (map car ifs))
- )
- (list (cons 'separator "\n\n\n") ;easy printing.
- (cons 'interfaces syms)
- (cons 'interface-descriptions ifs)
- ; (cons 'interface-descriptions (cadr merged))
- ;; description of the grob itself?
- ; (cons 'properties prop-typep-pairs)
- )))
-
-
-(lily-interface
- 'grob-interface
- "All grobs support this"
- '(
- X-offset-callbacks
- Y-offset-callbacks
- X-extent-callback
- Y-extent-callback
- molecule-callback
- font-relative-size
- extra-offset
- interfaces
- dependencies
- no-spacing-rods
- extra-extent-X
- extra-extent-Y
- minimum-extent-X
- minimum-extent-Y
- origin
- transparent
- ))
-
-
-(lily-interface
- 'beam-interface
- "A beam.
-
-#'thickness= weight of beams, in staffspace
- "
- '(auto-knee-gap
- beamed-stem-shorten
- damping
- flag-width-function
- neutral-direction
- outer-stem-length-limit
- positions
- slope-limit
- thickness
- )
- )
-
-(lily-interface
- 'staff-spacing-interface
- ""
- '(
- ))
-
-(lily-interface
- 'note-spacing-interface
- ""
- '(
- ))
-
-(lily-interface
- 'clef-interface
- "A clef sign"
- '(
- non-default
- full-size-change
- glyph
- ))
-
-
-
-(lily-interface
- 'axis-group-interface
- "a group of coupled grobs"
- '(
- axes
- ))
-
-
-(lily-interface
- 'note-column-interface
- "Stem and noteheads combined"
- '(
- note-heads
- horizontal-shift
- force-hshift
- ))
-
-
-(lily-interface
- 'stem-interface
- "A stem"
- '(
- thickness
- beamed-lengths
- beamed-minimum-lengths
- lengths
- beam
- stem-shorten
- duration-log
- beaming
- neutral-direction
- stem-end-position
- support-head
- heads
- direction
- length
- style
- flag-style
- dir-forced
- ))
-
-
-
-(lily-interface
- 'slur-interface
- "A slur"
- '(
- de-uglify-parameters
- details
- attachment
- direction
- attachment-offset
- beautiful
- y-free
- control-points
- extremity-rules
- extremity-offset-alist
- thickness
- dashed
-
- )
- )
-
-
-
-(lily-interface
- 'side-position-interface
- "Position a victim object (this one) next to other objects (the support).
-#'direction = where to put the victim object (left or right?)
-"
- '(
- side-support-elements
- direction-source
- direction
- side-relative-direction
- minimum-space
- padding
- self-alignment-X
- self-alignment-Y
-
- )
- )
-
-
-(lily-interface
- 'accidentals-interface
- "Accidentals"
- '(accidentals
- left-padding
- right-padding
- paren-cautionaries
- cautionary-size
- ))
-
-
-
-(lily-interface
- 'line-of-score-interface
- "Super grob, parent of all:
-
-The columns of a score that form one line. The toplevel grob. Any
-grob has a Line_of_score as both X and Y reference point. The
-Paper_score contains one grob of this type. Control enters the
-Grob dependency calculation from this single Line_of_score
-object."
- '(
- between-system-string
- spacing-procedure
- before-line-breaking-callback
- after-line-breaking-callback
- all-elements
- columns
- ))
-
-
-(lily-interface
- 'note-head-interface
- "Note head"
- '( style stem-attachment-function ))
-
-
-(lily-interface
- 'note-name-interface
+(ly-add-interface
+'note-name-interface
"Note name"
- '( style ))
-
-
-
-(lily-interface
- 'rhythmic-head-interface
- "Note head or rest"
- '(
- dot
- stem
- duration-log
- ))
-
-
-(lily-interface
- 'rest-interface
- "a rest"
- '(style ))
-
-
-(lily-interface
- 'tuplet-bracket-interface
- "A bracket with a number in the middle, used for tuplets."
- '(
- columns
- number-gap
- delta-y
- tuplet-bracket-visibility
- tuplet-number-visibility
- thick
- direction
- ))
-
-
-(lily-interface
- 'align-interface
- " Order grobs top to bottom/left to right/right to left etc."
- '(
- stacking-dir
- align-dir
- threshold
- alignment-done
- center-element
- elements
- axes
- ))
-
-
-(lily-interface
- 'aligned-interface
- "read by align-interface"
- '(
- minimum-space
- extra-space
- ))
-
-
-(lily-interface
- 'break-aligned-interface
- "Items that are aligned in prefatory matter"
- '(
- break-align-symbol
- space-alist
- visibility-lambda
- breakable
- ))
-
-
-(lily-interface
- 'chord-name-interface
- "generate a chord name"
- '( pitches inversion bass))
-
-
-(lily-interface
- 'time-signature-interface
- "A time signature, in different styles.
- The following values for 'style are are recognized:
-
- @table @samp
- @item @code{C}
- 4/4 and 2/2 are typeset as C and struck C, respectively. All
- other time signatures are written with two digits.
-
- @item @code{old}
- 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
- typeset with old-style mensuration marks. All other time
- signatures are written with two digits.
-
- @item @code{1xxx}
- All time signatures are typeset with a single
- digit, e.g. 3/2 is written as 3. (Any symbol starting
- with the digit @code{1} will do.)
-
- @item @code{C}@var{M}@code{/}@var{N},
-@code{old}@var{M}@code{/}@var{N} or
- @code{old6/8alt}
- Tells LilyPond to use a specific symbol as time signature,
- regardless of the actual time signature.
- @end table
-
-See also the test-file @file{input/test/time.ly}.
-"
- '(fraction style ))
-
-
-(lily-interface
- 'bar-line-interface
- "Bar line.
-
-This is a request to print a special bar symbol. It replaces the
-regular bar symbol with a special
-symbol. The argument @var{bartype} is a string which specifies the
-kind of bar to print. Options are @code{\":|\"}
-@cindex \"|A@@@code{:|}
-,
-@code{\"|:\"}
-@cindex \"|B@@@code{|:}
-, @code{\":|:\"}
-@cindex \"|C@@@code{:|:}
-,
-@code{\"||\"}
-@cindex \"|D@@@code{||}
-, @code{\"|.\"}
-@cindex \"|E@@@code{|.}
-,
-@code{\".|\"}
-@cindex \"|F@@@code{.|}
-, and @code{\".|.\"}
-@cindex \"|G@@@code{.|.}
-.
-
-These produce, respectively, a right repeat, a left repeat, a double
-repeat, a double bar, a start bar, an end bar, and a thick double bar.
-If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
-but a line break is allowed at that spot.
-
-"
- '(bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
-
-
-(lily-interface
- 'hairpin-interface
- "hairpin crescendo.
-
-padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
-
-"
- '( grow-direction thickness height padding
- ))
-
-
-(lily-interface
- 'arpeggio-interface
- "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
- '(stems arpeggio-direction))
-
-
-
-(lily-interface
- 'note-collision-interface
- "An object that handles collisions between notes with different
-stem directions and horizontal shifts. Most of the interesting
-properties are to be set in @ref{note-column-interface}"
- '(merge-differently-dotted note-width))
-
-
-
-(lily-interface
- 'custos-interface
- "A custos is a staff context symbol that appears at the end of a
- staff line with monophonic musical contents (i.e. with a single
- voice). It anticipates the pitch of the first note of the following
- line and thus helps the player or singer to manage line breaks
- during performance, thus enhancing readability of a score.
-
- Custodes were frequently used in music notation until the 16th
- century. There were different appearences for different notation
- styles. Nowadays, they have survived only in special forms of
- musical notation such as via the editio vaticana dating back to the
- beginning of the 20th century.
-
-[TODO: add to glossary]"
-
- '(style))
-
-
-
+ '(style))
-
-
- (lily-interface
- 'dots-interface
- "The dots to go with a notehead/rest. A separate interface, since they
-are a party in collision resolution.
-#'direction is the Direction to handle staff-line collisions in."
- '(direction dot-count))
-
-
- (lily-interface
- 'font-interface
- "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
- '(font-style font-series font-shape font-family font-name
-font-design-size font-relative-size)
- )
-
-
-
- (lily-interface
- 'text-interface
- "A scheme markup text"
- '(text align baseline-skip lookup raise kern magnify))
-
-
- (lily-interface
- 'dot-column-interface
- "Interface that groups dots so they form a column"
- '( )
- )
-
-
- (lily-interface
- 'dynamic-interface
+(ly-add-interface
+ 'dynamic-interface
"Any kind of loudness sign"
'()
)
+(ly-add-interface
+ 'finger-interface
+ "A fingering instruction"
+ '()
+ )
-
- (lily-interface
- 'finger-interface
- "A fingering instruction"
- '()
- )
-
-
- (lily-interface
- 'separation-spanner-interface
- "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
- '()
- )
-
- (lily-interface
- 'text-script-interface
- "Any text script"
- '()
- )
-
-
- (lily-interface
- 'grace-alignment-interface
- "put grace notes in line"
- '(
- horizontal-space
- )
- )
-
-
- (lily-interface
- 'hara-kiri-group-interface
- " As Vertical_group_spanner, but keep track of interesting items. If
-we don't contain any interesting items after linebreaking, then
-gracefully commit suicide. Objective: don't disgrace Lily by
-typesetting empty lines in orchestral scores."
- '( items-worth-living )
-)
-
-
- (lily-interface
- 'line-spanner-interface
- "Generic line drawn between two objects, eg. for use with glissandi.
-gap is measured in staff-spaces. "
-
- '(gap dash-period dash-length line-thickness type
- ))
-
-
- (lily-interface
- 'lyric-hyphen-interface
- "A centred hyphen is a simple line between lyrics used to divide
-syllables. The length of the hyphen line should stretch based on the
-size of the gap between syllables."
-
- '( thickness height minimum-length word-space
- ))
-
-
- (lily-interface
- 'key-signature-interface
- "A group of accidentals."
- '(
- c0-position
- old-accidentals
- new-accidentals
- ))
-
-
- (lily-interface
- 'lyric-extender-interface
- "The extender is a simple line at the baseline of the lyric
-that helps show the length of a melissima (tied/slurred note)."
- '(
- word-space
- height
- right-trim-amount
- ))
-
-
-
- (lily-interface
- 'lyric-syllable-interface
- "a single piece of lyrics"
- '(
- word-space
- alignment
- ignore-length-mismatch
- begin-alignment
- end-alignment
- ))
-
-
-
- (lily-interface
- 'mark-interface
- "a rehearsal mark"
- '(
- ))
-
-
- (lily-interface
- 'multi-measure-rest-interface
- "A rest that spans a whole number of measures. For typesetting the
-numbers, fields from font-interface may be used.
-
-padding is the space between number and rest. Measured in staffspace.
-
-"
- '( columns expand-limit minimum-width padding))
-
-
- (lily-interface
- 'paper-column-interface
- ""
-
- '(column-space-strength before-musical-spacing-factor
-stem-spacing-correction before-grace-spacing-factor when bounded-by-me
-dir-list shortest-playing-duration shortest-starter-duration
-contains-grace extra-space stretch-distance ))
-
-
- (lily-interface
- 'piano-pedal-interface
- ""
- '(pedal-type
- edge-width
- edge-height
- shorten-pair
- left-widen
- right-widen
- ))
-
-
- (lily-interface
- 'porrectus-interface
- "A porrectus ligature, joining two note heads into a single grob."
- '(
- ))
-
-
- (lily-interface
- 'spaceable-element-interface
- "An grob (generally a Paper_column) that takes part in the
-spacing problem. "
- '(penalty
- minimum-distances
- ideal-distances
- dir-list
- ))
-
-
- (lily-interface
- 'rest-collision-interface
- "Move around ordinary rests (not multi-measure-rests) to avoid
-conflicts."
- '(
- maximum-rest-count
- minimum-distance
- elements
- ))
-
-
- (lily-interface
- 'script-interface
- ""
- '(
- script-priority
- ))
-
-
- (lily-interface
- 'script-column-interface
- "An interface that sorts scripts according to their @code{script-priority}"
- '( ))
-
-
-
- (lily-interface
- 'spacing-spanner-interface
- " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
-The space taken by a note is determined by the formula
-
-
-
-where TIME is the amount of time a note occupies. The value of C is
-chosen such that the smallest space within a measure is
-arithmetic_basicspace:
-
-C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
-
-The smallest space is the one following the shortest note in the
-measure, or the space following a hypothetical 1/8 note. Typically
-arithmetic_basicspace is set to a value so that the shortest note
-takes about two noteheads of space (ie, is followed by a notehead of
-space):
-
-@example
-2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
-
-@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
-@{ assuming: SHORTEST <= 1/8 @}
-
-= arithmetic_multiplier *
-( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
-
-= arithmetic_multiplier * arithmetic_basicspace
-
-@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
-
-= quartwidth * arithmetic_basicspace
-
-=>
-
-arithmetic_basicspace = 2/1 = 2
-
-
-If you want to space your music wider, use something like:
-
-arithmetic_basicspace = 4.;
-
-@end example"
- '(
-spacing-increment
-shortest-duration-space
-
- ))
-
-
- (lily-interface
- 'staff-symbol-referencer-interface
-
- "Object whose Y position is meaning with reference to a staff
-symbol. Objects that have this interface should include
-Staff_symbol_referencer::callback in their Y-offset-callback.
-"
- '(
- staff-symbol
- staff-position
- ))
-
-
- (lily-interface
- 'staff-symbol-interface
- "This spanner draws the lines of a staff. The middle line is
-position 0."
- '(
- staff-space
- line-count
- invisible-staff
- ))
-
-
- (lily-interface
- 'stem-tremolo-interface
- ""
- '( stem beam-width beam-thickness
- ))
-
-
- (lily-interface
- 'separation-item-interface
- "Item that computes widths to generate spacing rods.
-
-Calc dimensions for the Separating_group_spanner; this has to be
-an item to get dependencies correct. It can't be an grob_group
-since these usually are in a different X_group
-"
- '(
- elements
- ))
-
-
- (lily-interface
- 'system-start-delimiter-interface
- "#'style can be bar-line, bracket or brace"
- '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
- thickness arch-height arch-angle arch-thick
- arch-width bracket-thick glyph ))
-
-
- (lily-interface
- 'text-spanner-interface
- "generic text spanner"
- '(
- dash-period
- dash-length
- line-thickness
- edge-height
- edge-width
- edge-text
- shorten-pair
- type
-))
-
-
- (lily-interface
- 'tie-interface
- "A tie connecting two noteheads.
-direction = Forced direction for all ties"
-
- '(
- staffline-clearance
- control-points
- heads
- details
- thickness
- x-gap
- direction
- minimum-length
- ))
-
-
-
-
- (lily-interface
- 'tie-column-interface
- "that sets tie directions in a tied chord"
- '(direction
- ))
-
-(lily-interface
- 'percent-repeat-interface
- "Repeats that look like percent signs"
- '(slope thickness))
-
-(lily-interface
- 'volta-bracket-interface
- "Volta bracket with number"
- '(
- bars
- thickness
- height
- ))
-
-
-(lily-interface
- 'span-bar-interface
- "A bar line that spans other barlines (typically used to get cross-staff barlines."
+(ly-add-interface
+ 'mark-interface
+ "a rehearsal mark"
'(
))
-
-
-(primitive-eval (cons
- 'begin
- (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
- all-interfaces)))
-
-
-(define (interface-names) (map (lambda (x) (symbol->string (car x))) all-interfaces))
-
-
s = s + '\\include{%s}\n' \
% string.join (extra['latexheaders'], '}\n\\include{')
+ unit = extra['unit'][-1]
+
textheight = ''
if extra['textheight']:
- textheight = ',textheight=%fpt' % extra['textheight'][0]
+ textheight = ',textheight=%f%s' % (extra['textheight'][0], unit)
orientation = 'portrait'
if extra['orientation']:
orientation = extra['orientation'][0]
- unit = extra['unit'][-1]
# set sane geometry width (a4-width) for linewidth = -1.
maxlw = max (extra['linewidth'] + [-1])
if maxlw < 0:
$(outdir)/%.pfa: %.mf
- pktrace --simplify --keep-trying $(basename $(@F))
+ pktrace -I $(outdir)/ --pfa --simplify --keep-trying $(basename $(@F))
mv $(basename $(@F)).pfa $(outdir)
$(outdir)/%.pfb: %.mf
- pktrace --simplify --keep-trying $(basename $(@F))
+ pktrace -I $(outdir)/ --pfb --simplify --keep-trying $(basename $(@F))
mv $(basename $(@F)).pfb $(outdir)
#%.afm: