+1.3.130.jcn1
+============
+
+* Bugfix: don't display repeat colons for zero height bar lines; fixes
+repeat barlines in lyrics.
+
+* Fixed markup definition and implementation, added baseline-skip
+property; this makes multi-line markup text a lot easier.
+
+* Bugfix: chordChanges works with other rhythm of accompaniment, and
+silly chord name typo fixes.
+
+1.3.130
+=======
1.3.129.jcn2
============
Rhythm staff (clef, x-notehead)
- markup text
-
postscript, scheme output?
(links to?) using/existance of ly2dvi, lilypond-book
@subsubsection Text scripts
@cindex Text scripts
-FIXME: markup
-
-In addition, it is possible to place arbitrary strings of text or
-@TeX{} above or below notes by using a string instead of an
-identifier: @code{c^"text"}. Fingerings
-can be placed by simply using digits. All of these note ornaments
-appear in the printed output but have no effect on the MIDI rendering of
-the music.
+In addition, it is possible to place arbitrary strings of text or markup
+text (see @ref{Text markup}) above or below notes by using a string
+instead of an identifier: @code{c^"text"}. It is possible to use @TeX{}
+commands, but this should be avoided because this makes it impossible
+for LilyPond to compute the exact length of the string, which may lead
+to collisions. Also, @TeX{} commands won't work with direct postscript
+output. Fingerings can be placed by simply using digits. All of these
+note ornaments appear in the printed output but have no effect on the
+MIDI rendering of the music.
@c . {Fingerings}
@unnumberedsubsubsec Fingerings
@menu
-* Text markup::
+* Text markup::
@end menu
@node Text markup
@subsection Text markup
+@cindex text markup
+@cindex markup text
LilyPond has an internal mechanism to typeset texts: you can
form text markup expressions by composing scheme expressions
Formally, Scheme markup text is defined as follows:
@example
-text: string | (markup sentence)
-sentence: text | sentence text
-markup: property | abbrev | style
+text: string | (head? text+)
+head: markup | (markup+)
+markup-item: property | abbrev | @var{fontstyle}
property: (@var{key} . @var{value})
abbrev: @code{rows lines roman music bold italic named super sub text}
-style: @var{fontstyle}
@end example
-The @var{key}-@var{value} pair is a grob property. [Why is this
-useful?] The following abbreviations are currently defined:
+The markup is broken down and converted into a list of grob properties,
+which are prepended to the grop's property list. The
+@var{key}-@var{value} pair is a grob property.
+@ignore
+[Why is this useful?]
+
+?Snapnie: markup text is eerste item dat voldoet aan mijn gewelfdige,
+ideale idee van direct-en-eenmalig-per-item te zetten properties, ipv
+gehaspel via \property en hopen dat je property (enkel) in juiste item
+terecht gaat komen. Heb je deze wel bewust meegemaakt:
+
+Sender: jan@appel.lilypond.org
+To: Han-Wen <hanwen@cs.uu.nl>
+Subject: (elt) properties
+Organization: Jan at Appel
+From: janneke@gnu.org
+Date: 01 Nov 2000 10:39:10 +0100
+Message-ID: <m3og00av5t.fsf@appel.lilypond.org>
+User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Lines: 77
+Xref: appel.lilypond.org vers:1991
+
+Hi,
+
+Wat ik vooral mis, is een koele manier om een propertie eenmalig aan
+een element te hangen. Hoop dat je zinvol over wilt meedenken; zie
+het monster van les-nereides. Misschien dat we 't niet moeten doen
+voor 1.4 maar wachten tot properties nog wat verder
+uitgekristalliseerd zijn?
+
+Nu moet je
+
+ \property Voice.Stem \push #'length = #'6
+ a
+ \property Voice.Stem \pop #'length
+ b
+
+waarmee je in feite zeg tegen de stem-engraver: vanaf nu aan moet je
+alle stems 6 lang maken (maakt stem); onee, doe maar weer default
+lengte.
+
+Maar dat is eigenlijk niet wat je bedoelt, wat je zou willen is net
+zo'n directe interface als wat we nu hebben voor markup text, bv. iets
+van:
+
+ a+#'(Stem::length . 6) b
+
+Bij markup text kun je direct en eenmalig een reeks properties aan een
+enkel item toevoegen; iets wat je volgens mij vaak nodig hebt.
+
+Ik zat eerst te denken aan ``request properties'': properties
+toevoegen aan request, die dan worden doorgegeven aan alle items die
+door dat request worden gemaakt.
+
+Maar misschien zuigt dat wel te vreselijk en moeten we iets van
+``volatile'' properties maken.
+
+Btw,
+
+ \property Voice.Slur \push #'dash = #1
+ \property Voice.Slur \pop #'dash
+ a()b
+ \property Voice.Slur \push #'direction = #-1
+ \property Voice.Slur \pop #'direction
+ ()c
+
+of de kluts waar ik brr van word, eigenlijk ook alleen doenbaar is
+voor wat veelgebruikte properties:
+
+ slurDotted = \property Voice.Slur \push #'dash = #1
+ slurNoDots = \property Voice.Slur \pop #'dash
+ slurUp = \property Voice.Slur \push #'direction = #1
+ slurDown = \property Voice.Slur \push #'direction = #-1
+ slurBoth = \property Voice.Slur \pop #'direction
+
+ [..]
+
+ \slurDotted\slurDown
+ a()b
+ ()c
+ \slurNoDots\slurBoth
+
+zou toch graag meer iets in trant van, als je begrijpt wat ik bedoel
+
+ Slur+#'((dash . 1) (direction . 1))
+ b () c
+ Slur-#'(dash direction)
+
+ofwel
+
+ a(+#'((dash . 1) (direction . 1))
+ )b(+#'((dash . 1) (direction . 1))
+ )c
+@end ignore
+
+The following abbreviations are currently
+defined:
@table @code
@item rows
@var{fontstyle} may be any of @code{finger volta timesig mmrest mark
script large Large dynamic}
-
+@ignore
[kern, raise ??]
-
-[I still think that the semantics are weird, but well]
+Wat is daarmee, zijn toch gewoon grob properties van text-interface?
+@end ignore
@c .{Local emacs vars}
@c Local variables:
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=130
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
\score {
\context StaffGroup <
\notes \context Staff {
- b1 b1 \bar "|.";
+ b1 \bar "|:"; b1 \bar ":|";
}
\lyrics\context Lyrics <
\context LyricsVoiceWithBars {
-% thisContextHasSpanBarEngraver1 added
- ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1. Here.
+% thisContextHasBarEngraver1 added
+ ThisContextCertainlyHasBarEngraverAddedButThereHasBeenSomethingFunnyBefore1. Here.
}
\context LyricsVoice {
- this4 one has no SpanBarEngraverAddedToContext1
+ this4 one has no BarEngraverAddedToContext1
}
>
\notes \context Staff = SB { b1 b1 }
linewidth = -1.0\cm;
\translator {
\LyricsContext
- \consists "Span_bar_engraver";
\accepts "LyricsVoiceWithBars";
}
\translator {
\LyricsVoiceContext
+ \consists "Bar_engraver";
\name "LyricsVoiceWithBars";
}
\translator {
\version "1.3.120";
-% TODO:
-%
-% * centre non-melismata lyrics (where there's only one verse!) under
-% notehead:
-%
-% l c c c l
-% ___
-% | | | | | | |
-% x|()x| x| x| x| x|( )x|
-% Oh_____say can you see
-%
-% NOT!
-%
-%
-% * slur/lyric clash
-%
-
\header{
title="The Star Spangled Banner";
subtitle="The United States National Anthem";
\clef treble;
\property Staff.automaticMelismata = ##t
\context Voice = one \transpose c'' {
- \stemUp
+ \voicOne
\staffBVoiceB
\bar "|.";
}
\context Voice = two \transpose c'' {
- \stemDown
+ \voiceTwo
\staffBVoiceC
}
>
\clef bass;
\property Staff.VoltaBracket = \turnOff
\context Voice = three {
- \stemUp
+ \voiceOne
\staffCVoiceB
}
\context Voice = four {
- \stemDown
+ \voiceTwo
\staffCVoiceC
}
>
\GrandStaffContext
\accepts "Lyrics";
}
-% We have a Span_bar_engraver in GrandStaff; we only get grief if we add it here too.
-% \translator {
-% \LyricsContext
-% \consists "Span_bar_engraver";
-% }
\translator {
\LyricsVoiceContext
\consists "Bar_engraver";
-\header{
-texidoc="
-Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
-lyrics don't collide with barlines.
-";
-}
-
-\score {
- \context StaffGroup <
- \notes \context Staff {
- b1 b1 \bar "|.";
- }
- \lyrics\context Lyrics <
- \context LyricsVoiceWithBars {
-% thisContextHasSpanBarEngraver1 added
- ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1. Here.
- }
- \context LyricsVoice {
- this4 one has no SpanBarEngraverAddedToContext1
- }
- >
- \notes \context Staff = SB { b1 b1 }
- >
- \paper {
- linewidth = -1.0\cm;
- \translator {
- \LyricsContext
- \accepts "LyricsVoiceWithBars";
- }
- \translator {
- \LyricsVoiceContext
- \consists "Bar_engraver";
- \name "LyricsVoiceWithBars";
- }
-
- }
-}
\score{
\notes\relative c''{
\stemUp
+% {
a-"text"
b-#"texta"
c-#'(bold "textb")
(italic "three"))
f-#'(finger "3")
g-#'(music (named "noteheads-2" "flags-u3"))
-
- b-#'(rows "a" ((kern . 3) ((raise . 2) "b")) "c")
- c-#'(rows "1" ((kern . -3) ((raise . -2) "2")) "3")
-
+ b-#'(rows "a" (((kern . 3) (raise . 2)) "b") "c")
+ c-#'(rows "1" (((raise . -2) (kern . -1)) "2") "3")
+% }
+ d-#'(lines "Violoncello" " e" "Contrabasso")
+ e-#'((lines (baselineskip . 0) (kern . 1.5)) "Violoncello" " e" "Contrabasso")
+ e-#'(((baselineskip . 0) (kern . 1.5) lines) "Violoncello" " e" "Contrabasso")
}
\paper{
linewidth = -1.\mm;
-\version "1.3.120";
+\version "1.3.130";
\include "paper16.ly";
>
\context Staff = clarinets <
\property Staff.midiInstrument = #"clarinet"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Clarinetti" (rows "(B" ,text-flat ")")))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Cl." (rows "(B" ,text-flat ")")))
+ \property Staff.instrument = #`(lines
+ "2 Clarinetti" (rows "(B" ,text-flat ")"))
+ \property Staff.instr = #`(lines
+ "Cl." (rows "(B" ,text-flat ")"))
\property Staff.transposing = #-2
\notes \key f \major;
\context Voice=one \partcombine Voice
\context StaffGroup = brass <
\context Staff = frenshHorns <
\property Staff.midiInstrument = #"french horn"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Corni" (rows "(E" ,text-flat ")")))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Cor." (rows "(E" ,text-flat ")")))
+ \property Staff.instrument = #`(lines
+ "2 Corni" (rows "(E" ,text-flat ")"))
+ \property Staff.instr = #`(lines
+ "Cor." (rows "(E" ,text-flat ")"))
\property Staff.transposing = #3
\notes \key c \major;
\context Voice=one \partcombine Voice
>
\context Staff = trumpets <
\property Staff.midiInstrument = #"clarinet"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Trombe" (rows "(C)")))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Tbe." (rows "(C)")))
+ \property Staff.instrument = #`(lines
+ "2 Trombe" (rows "(C)"))
+ \property Staff.instr = #`(lines
+ "Tbe." (rows "(C)"))
\context Voice=one \partcombine Voice
\context Thread=one \tromboI
\context Thread=two \tromboII
\context StaffGroup = timpani <
\context Staff = timpani <
\property Staff.midiInstrument = #"timpani"
- \property Staff.instrument = #'((kern . 0.5)
- (lines "2 Timpani" "(C-G)"))
+ \property Staff.instrument = #'(lines
+ "2 Timpani" "(C-G)")
\property Staff.instr = #"Timp."
\clef bass;
\timpani
\staffCombinePianoStaffProperties
\context Staff=one <
\property Staff.midiInstrument = #"cello"
- \property Staff.instrument = #'((kern . 0.5)
- (lines "Violoncello" (rows " e") (rows "Contrabasso")))
+ \property Staff.instrument = #'(lines
+ "Violoncello" " e" "Contrabasso")
\property Staff.instr = "Vc."
\clef bass;
>
if (Stem::has_interface (i.elem_l_)
|| Slur::has_interface (i.elem_l_)
+ // || Tie::has_interface (i.elem_l_)
+ || i.elem_l_->has_interface (ly_symbol2scm ("tie-interface"))
/*
Usually, dynamics are removed by *_devnull_engravers for the
second voice. On the one hand, we don't want all dynamics for
{
return thin;
}
- else if (str == "|.")
+ else if (str == "|." || (h == 0 && str == ":|"))
{
m.add_at_edge (X_AXIS, LEFT, thick, 0);
m.add_at_edge (X_AXIS, LEFT, thin, kern);
}
- else if (str == ".|")
+ else if (str == ".|" || (h == 0 && str == "|:"))
{
m.add_at_edge (X_AXIS, RIGHT, thick, 0);
m.add_at_edge (X_AXIS, RIGHT, thin, kern);
{
chord_name_p_ = 0;
chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL));
- last_chord_ = SCM_EOL;
+ last_chord_ = chord_;
}
void
chord_name_p_->set_grob_property ("chord", chord_);
announce_grob (chord_name_p_, 0);
SCM s = get_property ("chordChanges");
- if (to_boolean (s) && last_chord_ != SCM_EOL
+ if (to_boolean (s) && gh_car (last_chord_) != SCM_EOL
&& gh_equal_p (chord_, last_chord_))
chord_name_p_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T);
}
}
chord_name_p_ = 0;
- last_chord_ = chord_;
+ if (gh_car (chord_) != SCM_EOL)
+ last_chord_ = chord_;
chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL));
}
DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
static Molecule text2molecule (Grob *me, SCM text, SCM properties);
static Molecule string2molecule (Grob *me, SCM text, SCM properties);
- static Molecule markup_sentence2molecule (Grob *me, SCM markup_sentence, SCM properties);
+ static Molecule markup_text2molecule (Grob *me, SCM markup_text, SCM properties);
private:
static Molecule lookup_character (Grob *me, Font_metric*, SCM char_name);
/*
- TEXT : STRING | (MARKUP SENTENCE)
- MARKUP: PROPERTY | ABBREV
- SENTENCE: TEXT | SENTENCE TEXT
- PROPERTY: (key . value)
- ABBREV: rows lines roman music bold italic named super sub text, or any font-style
- */
-
-/*
- FIXME:
-
- rewrite routines and syntax to be like
TEXT: STRING
- | (head-expression* TEXT*)
- ;
-
- head-expression is a list, containing a tag and a variable number of
- arguments. If necessary, the number of arguments can be stored in a alist,
+ | (MARKUP? TEXT+)
+ ;
- '(
- (tag1 . argcount1)
- (tag2 . argcount2)
+ HEAD: MARKUP-ITEM | (MARKUP-ITEM+)
- ... etc
+ MARKUP-ITEM: PROPERTY | ABBREV | FONT-STYLE
+ PROPERTY: (key . value)
+ ABBREV: rows lines roman music bold italic named super sub text
- )
-
- or even entries like
-
- (tag . (argcount function-to-handle-the-tag ))
-
- use baselineskip for setting (lines ...)
-
*/
Molecule
if (!gh_pair_p (gh_car (text)) && gh_string_p (gh_car (text)))
return string2molecule (me, gh_car (text), alist_chain);
else
- return markup_sentence2molecule (me, text, alist_chain);
+ return markup_text2molecule (me, text, alist_chain);
}
return Molecule ();
}
}
Molecule
-Text_item::markup_sentence2molecule (Grob *me, SCM markup_sentence,
- SCM alist_chain)
+Text_item::markup_text2molecule (Grob *me, SCM markup_text,
+ SCM alist_chain)
{
SCM sheet = me->paper_l ()->style_sheet_;
SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
- SCM markup = gh_car (markup_sentence);
- SCM sentence = gh_cdr (markup_sentence);
-
+ SCM markup = gh_car (markup_text);
+ SCM text = gh_cdr (markup_text);
+
+#if 1
SCM p = gh_cons (gh_call2 (f, sheet, markup), alist_chain);
+#else
+ SCM pp = gh_call2 (f, sheet, markup);
+ gh_newline ();
+ scm_write (pp, scm_current_error_port ());
+ gh_newline ();
+ SCM p = gh_cons (pp, alist_chain);
+#endif
+
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
Axis align = X_AXIS;
SCM a = ly_assoc_chain (ly_symbol2scm ("align"), p);
if (gh_pair_p (a) && gh_number_p (gh_cdr (a)))
align = (Axis)gh_scm2int (gh_cdr (a));
- Real staff_space = Staff_symbol_referencer::staff_space (me);
- Real kern = 0;
+ Real baseline_skip = 0;
+ SCM b = ly_assoc_chain (ly_symbol2scm ("baseline-skip"), p);
+ if (gh_pair_p (b) && gh_number_p (gh_cdr (b)))
+ baseline_skip = gh_scm2double (gh_cdr (b)) * staff_space;
+
+ Array<Real> kern (2);
+ kern[0] = 0; // zucht
+ kern[1] = 0;
SCM k = ly_assoc_chain (ly_symbol2scm ("kern"), p);
if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
- kern = gh_scm2double (gh_cdr (k)) * staff_space;
+ kern[align] = gh_scm2double (gh_cdr (k)) * staff_space;
Real raise = 0;
SCM r = ly_assoc_chain (ly_symbol2scm ("raise"), p);
if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
raise = gh_scm2double (gh_cdr (r)) * staff_space;
-#if 0
- Offset o (align == X_AXIS ? kern : 0,
- (align == Y_AXIS ? - kern : 0) + raise);
-#else
- Offset o (0, (align == Y_AXIS ? - kern : 0) + raise);
-#endif
-
+ Offset o (0, (align == Y_AXIS ? - kern[align] : 0) + raise);
+
Molecule mol;
- while (gh_pair_p (sentence))
+ while (gh_pair_p (text))
{
- /* Ugh: this (kerning) only works if 'kern' is the first modifier of a
- markup. I guess the only solution is to rewrite markup definition,
- see above. */
- Molecule m = text2molecule (me, gh_car (sentence), p);
- Real m_kern = 0;
+ Molecule m = text2molecule (me, gh_car (text), p);
SCM m_p = SCM_EOL;
- if (gh_pair_p (gh_car (sentence)))
- m_p = gh_cons (gh_call2 (f, sheet, gh_caar (sentence)), alist_chain);
+ if (gh_pair_p (gh_car (text)))
+ m_p = gh_cons (gh_call2 (f, sheet, gh_caar (text)), alist_chain);
SCM m_k = ly_assoc_chain (ly_symbol2scm ("kern"), m_p);
+ Real m_kern = kern[align];
if (gh_pair_p (m_k) && gh_number_p (gh_cdr (m_k)))
m_kern = gh_scm2double (gh_cdr (m_k)) * staff_space;
if (!m.empty_b ())
{
m.translate (o);
+ if (align == Y_AXIS && baseline_skip)
+ m_kern += baseline_skip - m.extent (Y_AXIS)[UP];
mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, m_kern);
}
- sentence = gh_cdr (sentence);
+ text = gh_cdr (text);
}
return mol;
}
\consistsend "Axis_group_engraver";
\consists "Separating_line_group_engraver";
\consists "Chord_name_engraver";
+ \consists "Skip_req_swallow_translator";
}
+
ChordNamesContext = \translator {
\type "Engraver_group_engraver";
\name ChordNames;
tieBoth = \property Voice.Tie \revert #'direction
cadenzaOn = \property Score.timing = ##f
-cadenzaOff = { \property Score.timing = ##t
- \property Score.measurePosition = #(make-moment 0 1)
- }
+cadenzaOff = {
+ \property Score.timing = ##t
+ \property Score.measurePosition = #(make-moment 0 1)
+}
oneVoice = {
- \stemBoth
- \tieBoth
- \shiftOff
+ \stemBoth
+ \slurBoth
+ \tieBoth
+ \shiftOff
+}
+
+voiceOne = {
+ \stemUp
+ \slurUp
+ \tieUp
}
-voiceOne = { \stemUp
- \tieUp
+voiceTwo = {
+ \stemDown
+ \slurDown
+ \tieDown
}
-voiceTwo = { \stemDown
- \tieDown
- }
voiceThree = {
- \stemUp
- \shiftOn
+ \stemUp
+ \slurUp
+ \tieUp
+ \shiftOn
}
voiceFour = {
- \stemDown
- \shiftOn
+ \stemDown
+ \slurDown
+ \tieDown
+ \shiftOn
}
slurDotted = \property Voice.Slur \override #'dashed = #1
\staffCombinePianoStaffProperties
\context Staff=oneBassi {
\property Staff.midiInstrument = #"cello"
- \property Staff.instrument = #'((kern . 0.5)
- (lines "Violoncello" (rows " e") (rows "Contrabasso")))
+ \property Staff.instrument = #'(lines
+ "Violoncello" " e" "Contrabasso")
\property Staff.instr = #"Vc."
\clef "bass";
clarinettiStaff = \context Staff = clarinetti <
\property Staff.midiInstrument = #"clarinet"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Clarinetti" (rows "(B" ,text-flat ")")))
+ \property Staff.instrument = #`(lines
+ "2 Clarinetti" (rows "(B" ,text-flat ")"))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Cl." (rows "(B" ,text-flat ")")))
+ \property Staff.instr = #`(lines "Cl." (rows "(B" ,text-flat ")"))
% urg: can't; only My_midi_lexer:<non-static> () parses pitch?
%\property Staff.transposing = "bes"
corniStaff = \context Staff = corni <
\property Staff.midiInstrument = #"french horn"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Corni" (rows "(E" ,text-flat ")")))
+ \property Staff.instrument = #`(lines
+ "2 Corni" (rows "(E" ,text-flat ")"))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Cor." (rows "(E" ,text-flat ")")))
+ \property Staff.instr = #`(lines "Cor." (rows "(E" ,text-flat ")"))
% urg: can't; only My_midi_lexer:<non-static> () parses pitch?
%\property Staff.transposing = "es"
timpaniStaff = \context Staff = timpani <
\property Staff.midiInstrument = #"timpani"
- \property Staff.instrument = #'((kern . 0.5)
- (lines "2 Timpani" "(C-G)"))
+ \property Staff.instrument = #'(lines
+ "2 Timpani" "(C-G)")
\property Staff.instr = #"Timp."
\clef "bass";
\Time
\context Staff=trombe {
\property Staff.midiInstrument = #"trumpet"
- \property Staff.instrument = #`((kern . 0.5)
- (lines "2 Trombe" (rows "(C)")))
- \property Staff.instr = #`((kern . 0.5)
- (lines "Tbe." (rows "(C)")))
+ \property Staff.instrument = #`(lines "2 Trombe" (rows "(C)"))
+ \property Staff.instr = #`(lines "Tbe." (rows "(C)"))
\notes { \key c \major; }
\End
(pitch->text pitch))
(define (pitch->chord-name-text-banter pitch)
- (pitch->text-banter))
+ (pitch->text-banter pitch))
(define (pitch->note-name-text-banter pitch)
- (pitch->text-banter))
+ (pitch->text-banter pitch))
(define (step->text pitch)
(string-append
))
(define (markup-to-properties sheet markup)
- ;;(display "markup: `")
- ;;(write markup)
- ;;(display "'\n")
+ ;; (display "markup: `")
+ ;; (write markup)
+ ;; (display "'\n")
+
(if (pair? markup)
- (list markup)
+ (if (and (symbol? (car markup)) (not (pair? (cdr markup))))
+ (if (equal? '() (cdr markup))
+ (markup-to-properties sheet (car markup))
+ (list markup))
+
+ (if (equal? '() (cdr markup))
+ (markup-to-properties sheet (car markup))
+ (append (markup-to-properties sheet (car markup))
+ (markup-to-properties sheet (cdr markup)))))
+
+ ;; markup is single abbreviation
(let ((entry (assoc markup
;; assoc-chain?
(append (cdr (assoc 'abbreviation-alist sheet))
(cdr entry)
(list (cons markup #t))))))
+
; fixme, how's this supposed to work?
; and why don't we import font-setting from elt?
(define (style-to-font-name sheet style)
(molecule-callback . ,Text_item::brew_molecule)
(break-align-symbol . Instrument_name)
(visibility-lambda . ,begin-of-line-visible)
+ (baseline-skip . 2)
(font-family . roman)
(meta . ,(grob-description "InstrumentName" font-interface text-interface break-aligned-interface))
))
(molecule-callback . ,Text_item::brew_molecule)
(no-spacing-rods . #t)
(padding . 0.5)
+ (baseline-skip . 2)
(font-family . roman)
(font-shape . italic)
(meta . ,(grob-description "TextScript" text-script-interface text-interface side-position-interface font-interface ))
(grob-property-description 'bar-size number? "size of a bar line.")
(grob-property-description 'bars list? "list of barline pointers.")
(grob-property-description 'barsize-procedure procedure? "Procedure that computes the size of a bar line.")
+(grob-property-description 'baseline-skip number? "Baseline skip to use for multiple lines of text.")
(grob-property-description 'bass list? " musical-pitch, optional.")
(grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
(grob-property-description 'beam-space-function procedure? "function returning space given multiplicity.")
Scheme markup text. It is defined as follows:
@example
-
-TEXT : STRING | (MARKUP SENTENCE)
-SENTENCE: TEXT | SENTENCE TEXT
-MARKUP: PROPERTY | ABBREV
-PROPERTY: (key . value)
-ABBREV: rows lines roman music bold italic named super sub text, or any font-style
+text: string | (head? text+)
+head: markup | (markup+)
+markup-item: property | abbrev | @var{fontstyle}
+property: (@var{key} . @var{value})
+abbrev: @code{rows lines roman music bold italic named super sub text}
@end example
-So, TEXT is either a string, or a list of which the CAR is a MARKUP.
-MARKUP is either a CONS: an grob property '(key . value) or a symbol:
-a predefined abbreviation for a list of grob properties.
-
The following abbreviations are currently defined:
@table @samp
(lily-interface
'text-interface
"A scheme markup text"
- '(text align lookup raise kern magnify)))
+ '(text align baseline-skip lookup raise kern magnify)))
(define dot-column-interface
(lily-interface