staff-size.
* scripts/convert-ly.py (conv): add conversion rule.
* lily/music-output-def.cc (LY_DEFINE): ly_output_def_scope: new
function.
* scm/paper.scm: new file.
(set-staff-size): new function
(set-paper-size): new function
* lily/parser.yy (music_output_def_body): restructure definition,
so first Scheme statement in \paper also happens in new scope.
* lily/system.cc (post_processing): move uniquify_list () to
dumping molecule stage.
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): set
barCheckSynchronize to #f. Warning: this will mess up scores that
use barchecks to shorten measures.
* mf/feta-bolletjes.mf (overdone_heads): make note heads rounder
at 20pt too.
* Documentation/user/tutorial.itely (Printing lyrics): document
\lyricsto
* lily/my-lily-lexer.cc: \newaddlyrics -> \lyricsto
* Documentation/user/refman.itely (Fermatas): document \lyricsto
* lily/new-lyric-combine-music-iterator.cc (process): don't crash
if Voice is not found.
* VERSION: release 2.1.10
* lily/parser.yy (markup): MARKUP_HEAD_EMPTY
* lily/system.cc (output_lines): revert uniquify_list() patch,
strange side effects seen.
2004-01-16 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * ly/paper*.ly: remove files.
+
+ * scm/paper.scm (set-staff-size): new function: set default
+ staff-size.
+
+ * scripts/convert-ly.py (conv): add conversion rule.
+
+ * lily/music-output-def.cc (LY_DEFINE): ly_output_def_scope: new
+ function.
+
+ * scm/paper.scm: new file.
+ (set-staff-size): new function
+ (set-paper-size): new function
+
+ * lily/parser.yy (music_output_def_body): restructure definition,
+ so first Scheme statement in \paper also happens in new scope.
+
+ * lily/system.cc (post_processing): move uniquify_list () to
+ dumping molecule stage.
+
+ * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): set
+ barCheckSynchronize to #f. Warning: this will mess up scores that
+ use barchecks to shorten measures.
+
+ * mf/feta-bolletjes.mf (overdone_heads): make note heads rounder
+ at 20pt too.
+
+ * Documentation/user/tutorial.itely (Printing lyrics): document
+ \lyricsto
+
+ * lily/my-lily-lexer.cc: \newaddlyrics -> \lyricsto
+
+ * Documentation/user/refman.itely (Fermatas): document \lyricsto
+
+ * lily/new-lyric-combine-music-iterator.cc (process): don't crash
+ if Voice is not found.
+
+ * VERSION: release 2.1.10
+
* input/{test,regression}/: remove old-relative
* lily/lexer.ll: add empty markup signature.
@tab lyric hyphen
@tab
@lilypond[fragment,relative 1]
-\addlyrics \notes { g'4 g }
- \context Lyrics \lyrics { twin -- kle }
+ \notes { g'4 g }
+ \lyricsto "" \new LyricsVoice \lyrics { twin -- kle }
@end lilypond
@item @code{\chords @{ c:dim f:maj7 @}}
@node The Lyrics context
@subsection The Lyrics context
-Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
+Lyrics are printed by interpreting them in @internalsref{LyricsVoice} context:
@example
- \context Lyrics \lyrics @dots{}
+ \context LyricsVoice \lyrics @dots{}
@end example
@cindex automatic syllable durations
-@cindex @code{\addlyrics}
+@cindex @code{\lyricsto}
@cindex lyrics and melodies
This will place the lyrics according to the durations that were
entered. The lyrics can also be aligned under a given melody
automatically. In this case, it is no longer necessary to enter the
correct duration for each syllable. This is achieved by combining the
-melody and the lyrics with the @code{\addlyrics} expression:
+melody and the lyrics with the @code{\lyricsto} expression:
@example
-\addlyrics
- \notes @dots{}
- \context Lyrics @dots{}
+\lyricsto @var{name} \new LyricsVoice @dots{}
@end example
-@cindex staff order, with @code{\addlyrics}
+This aligns the lyrics to the notes of the @internalsref{Voice}
+context called @var{name}, which has to exist. Therefore, normally
+the @code{Voice} is specified first, and then the lyrics are specified
+with @code{\lyricsto}.
-Normally, this will put the lyrics below the staff. For different or
-more complex orderings, the best way is to setup the hierarchy of
-staves and lyrics first, e.g.
+For different or more complex orderings, the best way is to setup the
+hierarchy of staves and lyrics first, e.g.
@example
\context ChoirStaff \notes <<
- \context Lyrics = sopr @{ s1 @}
- \context Staff = soprStaff @{ s1 @}
- \context Lyrics = tenor @{ s1 @}
- \context Staff = tenorStaff @{ s1 @}
+ \context LyricsVoice = sopranoLyrics @{ s1 @}
+ \context Voice = soprano @{ @emph{music} @}
+ \context LyricsVoice = tenor @{ s1 @}
+ \context Voice = tenorLyrics @{ @emph{music} @}
>>
@end example
and then combine the appropriate melodies and lyric lines:
@example
- \addlyrics
- \context Staff = soprStaff @emph{the music}
- \context Lyrics = sopr @emph{the lyrics}
+ \lyricsto "soprano" \new LyricsVoice @emph{the lyrics}
@end example
-putting both together, you would get
-@example
-\context ChoirStaff \notes <<
- \context Lyrics = @dots{}
- \context Staff = @dots{}
- \addlyrics @dots{}
->>
-@end example
+An example is in @inputfileref{input/template,satb.ly}.
+
+When multiple stanzas are put on the same melody, it can happen that
+two stanzas have melismata in different locations. This can be
+remedied by switching off melismata for one
+@internalsref{LyricsVoice}. This is achieved by setting
+the @code{ignoreMelismata} property to @code{#t}. An example is shown
+in @inputfileref{input/regression,lyric-combine-new.ly}.
+
@cindex SATB
@cindex choral score
Internals: @internalsref{LyricCombineMusic}, @internalsref{Lyrics}
-Examples: @inputfileref{input/template,satb.ly}.
-
+Examples: @inputfileref{input/template,satb.ly},
+@inputfileref{input/regression,lyric-combine-new.ly}.
+
@refbugs
-@code{\addlyrics} is not automatic enough: melismata are not detected
-automatically, and melismata are not stopped when they hit a rest. A
-melisma on the last note in a melody is not printed.
+@code{\lyricsto} is not automatic enough: melismata are not detected
+automatically, and melismata are not stopped when they hit a rest.
@node More stanzas
@subsection More stanzas
-
@cindex phrasing, in lyrics
The complete example is shown here:
@lilypond[singleline,verbatim]
\score {
-\addlyrics
- \notes \relative c'' \context Voice = duet { \time 3/4
+ << \notes \relative c'' \context Voice = duet { \time 3/4
g2 e4 a2 f4 g2. }
- \lyrics \context Lyrics <<
- \context LyricsVoice = "duet-1" {
- \property LyricsVoice . stanza = "Bert"
- Hi, my name is bert. }
- \context LyricsVoice = "duet-2" {
- \property LyricsVoice . stanza = "Ernie"
+ \lyrics << \lyricsto "duet" \new LyricsVoice {
+ \property LyricsVoice . stanza = "1"
+ Hi, my name is bert. }
+ \lyricsto "duet" \new LyricsVoice {
+ \property LyricsVoice . stanza = "2"
Ooooo, ch\'e -- ri, je t'aime. }
- >>
+ >> >>
}
@end lilypond
@lilypond[raggedright,verbatim,noindent]
\include "gregorian-init.ly"
\score {
- \addlyrics
\context VaticanaVoice {
\property Score.BarNumber \set #'transparent = ##t
\notes {
\[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
}
}
- \context Lyrics \lyrics {
+ \lyricsto "" \new LyricsVoice \lyrics {
San- ctus, San- ctus, San- ctus
}
}
@cindex staff size, setting
@cindex @code{paper} file
-The Feta font provides musical symbols at seven different sizes.
-These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
-26 point. The point size of a font is the height of the corresponding
-staff (excluding line thicknesses).
+The Feta font provides musical symbols at eight seven different
+sizes. Each font is tuned for a different staff size, which are listed
+in the following table:
+
+@multitable @columnfractions .3 .3 .4
-Definitions for these sizes are the files @file{paperSZ.ly}, where
+@item @b{name}
+@tab @b{staff height (pt)}
+@tab @b{staff height (mm)}
+@tab @b{use}
+
+@item feta11
+@tab 11.22
+@tab 3.9
+@tab pocket scores
+
+@item feta13
+@tab 12.60pt
+@tab 4.4mm
+@tab
+
+@item feta14
+@tab 14.14pt
+@tab 5.0mm
+@tab
+
+@item feta16
+@tab 15.87pt
+@tab 5.6mm
+@tab
+
+@item feta18
+@tab 17.82pt
+@tab 6.3mm
+@tab song books
+
+@item feta20
+@tab 17.82pt
+@tab 7.0mm
+@tab standard parts
+
+@item feta23
+@tab 22.45 pt
+@tab 7.9mm
+@tab
+
+@item feta20
+@tab 25.2 pt
+@tab 8.9mm
+@tab
+@c modern rental material ?
+
+@end multitable
+
+These standard sizes can be used by including the file @file{paperSZ.ly}, where
@code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
of these files, the variables @code{paperEleven},
-@code{paperThirteen}, @code{paperSixteen},
+@code{paperThirteen}, @code{paperSixteen}, @code{paperEightteen},
@code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
are defined respectively. The default @code{\paper} block is also
set. These files should be imported at toplevel, i.e.
\score @{ ... @}
@end example
+Sizes can also be
+
+
The default font size settings for each staff heights are generated
from the 20pt style sheet. For more details, see the file
@file{scm/font.scm}.
+ of starting from 11 point
+(. These fonts are 11 point, 13 point, 16 point, 20 point, 23 point,
+and 26 point. The point size of a font is the height of the
+corresponding staff (excluding line thicknesses).
+
+Definitions for these sizes are the files
+
+
@node Line breaking
@subsection Line breaking
Like notes, lyrics are also a form of music, but they must not be
printed on a staff, which is the default way to print music. To print
-them as lyrics, they must be marked with @code{ \new Lyrics}:
+them as lyrics, they must be marked with @code{ \new LyricsVoice}:
@example
- \new Lyrics \lyrics @{ I want to break free @}
+ \new LyricsVoice \lyrics @{ I want to break free @}
@end example
The melody for this song is as follows:
@end lilypond
The lyrics can be set to these notes, combining both with the
-@code{\addlyrics} keyword:
+@code{\lyricsto} keyword:
@example
- \addlyrics
- \notes @{ @dots{} @}
- \new Lyrics @dots{}
+ \lyricsto "@var{name}" \new LyricsVoice @dots{}
@end example
+where @var{name} identifies to which melody the lyrics should be
+aligned. In this case, there is only one melody, so we can leave it
+empty.
The final result is
@lilypond[verbatim,linewidth=6.0cm]
\score {
- \notes {
- \addlyrics
- \relative c' {
+ \notes <<
+ \relative c' \new Voice {
\partial 8
c8
\times 2/3 { f g g } \times 2/3 { g4( a2) }
}
- \new Lyrics \lyrics { I want to break free }
- }
+ \lyricsto "" \new LyricsVoice \lyrics { I want to break free }
+ >>
\paper{ }
}
@end lilypond
@end example
@lilypond[]
\score {
- \notes {
- \addlyrics
- \relative c' {
- \partial 8
+ \notes <<
+ \relative c' \new Voice {
+ \partial 8
c8
- \times 2/3 { f g g } \times 2/3 { g4( a2) }
-
- %% ugh, this is to deal with bugs in the extender implementation
- \hideNotes
- c32
- }
- \new Lyrics \lyrics { I want to break free __ }
- }
- \paper{ linewidth = 9.0 \cm }
+ \times 2/3 { f g g } \times 2/3 { g4( a2) } }
+ \lyricsto "" \new LyricsVoice \lyrics { I want to break free __ }
+ >>
+ \paper{ }
}
@end lilypond
@end example
@lilypond[singleline]
\score {
- \addlyrics \notes \relative f' { \time 2/4
+ << \notes \relative f' { \time 2/4
f4 f c' c' }
- \new Lyrics \lyrics { Twin -- kle twin -- kle
- }
-\paper { linewidth = 6.0 \cm }
+ \new Lyrics \lyrics { Twin -- kle twin -- kle }
+ >>
+ \paper { raggedright = ##t }
}
-
@end lilypond
More options, like putting multiple lines of lyrics below a melody are
\score @{
<<
\context ChordNames \chords @{ @emph{chords} @}
- \addlyrics
- \notes @emph{the melody}
- \context Lyrics \lyrics @{ @emph{the text} @}
+ \notes @emph{the melody}
+ \lyricsto "" \new LyricsVoice \lyrics @{ @emph{the text} @}
>>
\paper @{ @}
@}
\score {
<<
\context ChordNames \chords { r8 c2:sus4 f }
- \addlyrics
\notes \relative c' {
\partial 8
c8
\times 2/3 { f g g } \times 2/3 { g4( a2) } }
- \context Lyrics \lyrics { I want to break free __ }
+ \new LyricsVoice \lyricsto "" \lyrics { I want to break free __ }
>>
\paper{ raggedright = ##t }
}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=1
-PATCH_LEVEL=10
+PATCH_LEVEL=11
MY_PATCH_LEVEL=
}
-\version "2.1.7"
+\version "2.1.10"
manuscriptBreak = { \break }
+
+
+
\paper {
- staffheight = 6.0 \mm
-
- #(define fonts (scale-font-list (/ (* 6 mm) (* 20 pt)) ))
-
- \include "params-init.ly"
+ #(set-staff-size (* 6.0 1 ))
linewidth = #(* mm 160)
indent = 8\mm
interscoreline = 2.\mm
\score {
<< \time 6/8
- \new Staff {
+ \new Staff <<
\context Staff \modernAccidentals
- \melody }
+ \melody >>
\new Lyrics <<
- \newaddlyrics "singer" \new LyricsVoice \firstVerse
- \newaddlyrics "singer" \new LyricsVoice \secondVerse
+ \lyricsto "singer" \new LyricsVoice \firstVerse
+ \lyricsto "singer" \new LyricsVoice \secondVerse
>>
\new PianoStaff <<
\property PianoStaff.instrument = \markup {
footer = "Mutopia-2001/04/27-xx"
}
-\version "2.1.7"
+\version "2.1.10"
dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
allLyrics = {
% maybe should be bigger by default, in grob-description.scm ?
- \newaddlyrics "leise" \new LyricsVoice {
+ \lyricsto "leise" \new LyricsVoice {
\lyricVerseOne
\lyricVerseTwo
\lyricThrough
+\version "2.1.10"
\header {
texidoc = "With the newaddlyrics mechanism, individual lyric lines
\autoBeamOff
c2( d4) e8[ c b c] f4
}
- \newaddlyrics "bla" \lyrics \new LyricsVoice { bla ab blob blob }
- \newaddlyrics "bla" \lyrics \new LyricsVoice {
+ \lyricsto "bla" \lyrics \new LyricsVoice { bla ab blob blob }
+ \lyricsto "bla" \lyrics \new LyricsVoice {
bla
\property LyricsVoice . ignoreMelismata = ##t
blob
}
- \new Lyrics << \newaddlyrics "bla" \lyrics \new LyricsVoice { nes ted lyrics voice with more words than no tes } >>
+ \new Lyrics << \lyricsto "bla" \lyrics \new LyricsVoice { nes ted lyrics voice with more words than no tes } >>
>>
}
-\version "2.1.7"
+\version "2.1.10"
\header {
texidoc ="Polyphonic rhythms and rests don't disturb
-@code{\newaddlyrics}."
+@code{\lyricsto}."
}
\voiceTwo
ees'8 r8 r8 r8 ees' r8 r8 r8
}
- \newaddlyrics "two" \lyrics \new LyricsVoice {
+ \lyricsto "two" \lyrics \new LyricsVoice {
Do na
}
- \lyrics \newaddlyrics "one" \new LyricsVoice
+ \lyrics \lyricsto "one" \new LyricsVoice
{
Do mi nus ex
}
-\version "2.1.7"
+\version "2.1.10"
\header{
texidoc =
<<
\context Voice = "foo" \sopran
- \context LyricsVoice \newaddlyrics foo \text
+ \context LyricsVoice \lyricsto foo \text
>>
\paper { linewidth = 5.0\cm
}
-\version "2.1.9"
+\version "2.1.10"
\header {
texidoc = "Lyric phrasing:
d16[ e f g]
}
- \lyrics \newaddlyrics "bla" \context LyricsVoice {
+ \lyrics \lyricsto "bla" \context LyricsVoice {
al tijd
izzz
} >>
-\version "2.1.7"
+\version "2.1.10"
\header{
texidoc="Lyric phrasing
a a a8 ( a) a4
}
\context Lyrics <<
- \new LyricsVoice \newaddlyrics "v" \lyrics {
+ \new LyricsVoice \lyricsto "v" \lyrics {
\property LyricsVoice . stanza = "1:"
Start sentence melisma end.
}
- \new LyricsVoice \newaddlyrics "v" \lyrics {
+ \new LyricsVoice \lyricsto "v" \lyrics {
\property LyricsVoice . stanza = "2:"
x x x __ x.
}
-\version "2.1.7"
+\version "2.1.10"
\header
{
texidoc = "Melismata are triggered by manual beams."
\property Staff.autoBeaming = ##f
c8 c8[ c8 c8] c8 }
- \newaddlyrics "" \new LyricsVoice \lyrics { bla bla bla }
+ \lyricsto "" \new LyricsVoice \lyrics { bla bla bla }
>>
\paper { raggedright = ##t }
}
-\version "2.1.7"
+\version "2.1.10"
\header
{
texidoc = "Popsong format: chords, melody and lyrics."
\autoBeamOff
\melody
}
- \newaddlyrics "one" \new LyricsVoice \text
+ \lyricsto "one" \new LyricsVoice \text
>>
\paper { }
\midi { }
-\version "2.1.7"
+\version "2.1.10"
\header {
texidoc = "Melody and lyrics."
\property Staff.autoBeaming = ##f
\melody
}
- \newaddlyrics "one" \new Lyrics \text
+ \lyricsto "one" \new Lyrics \text
>>
\paper { }
\midi { }
-\version "2.1.7"
+\version "2.1.10"
\header {
texidoc ="Lyrics between two staffs."
\context Staff = upper {
\context Voice = singer \upper
}
- \newaddlyrics "singer" \new LyricsVoice \text
+ \lyricsto "singer" \new LyricsVoice \text
\context Staff = lower <<
\clef bass
\lower
\autoBeamOff
\melody
}
- \newaddlyrics mel \new LyricsVoice \text
+ \lyricsto mel \new LyricsVoice \text
\context PianoStaff <<
\context Staff = upper \upper
-\version "2.1.7"
+\version "2.1.10"
\header {
texidoc = "
\context LyricsVoice = basses { s1 }
- \context LyricsVoice = sopranos \newaddlyrics sopranos \sopWords
- \context LyricsVoice = altos \newaddlyrics altos \altoWords
- \context LyricsVoice = tenors \newaddlyrics tenors \tenorWords
- \context LyricsVoice = basses \newaddlyrics basses \bassWords
+ \context LyricsVoice = sopranos \lyricsto sopranos \sopWords
+ \context LyricsVoice = altos \lyricsto altos \altoWords
+ \context LyricsVoice = tenors \lyricsto tenors \tenorWords
+ \context LyricsVoice = basses \lyricsto basses \bassWords
>>
\paper {
@code{caesura}.
" }
-\version "2.1.7"
+\version "2.1.10"
\include "gregorian-init.ly"
\caesura
g4( a) g e( f) e
}
- \newaddlyrics "" \new LyricsVoice \lyrics {
+ \lyricsto "" \new LyricsVoice \lyrics {
Blah blub, blah blam.
Blah blub, blah blam.
Blah blub, blah blam.
return true;
}
+void
+completize_extender (Spanner* sp)
+{
+ if (!sp->get_bound (RIGHT))
+ {
+ SCM heads = sp->get_grob_property ("heads");
+ if (gh_pair_p (heads))
+ {
+ Item* it = dynamic_cast<Item*> (unsmob_grob (gh_car (heads)));
+ if (it)
+ sp->set_bound (RIGHT, it);
+ }
+ }
+}
+
+
+
void
Extender_engraver::finalize ()
{
if (extender_)
{
- extender_->warning (_ ("unterminated extender"));
+ completize_extender (extender_);
+
+ if (!extender_->get_bound (RIGHT))
+ extender_->warning (_ ("unterminated extender"));
typeset_grob (extender_);
extender_ = 0;
}
if (finished_extender_)
{
- finished_extender_->warning (_("unterminated extender"));
+ completize_extender (finished_extender_);
+
+ if (!finished_extender_->get_bound (RIGHT))
+ finished_extender_->warning (_("unterminated extender"));
typeset_grob (finished_extender_);
finished_extender_ =0;
}
if (!live())
{
return 0;
-
}
SCM mol = get_grob_property ("molecule");
if (unsmob_molecule (mol))
return unsmob_molecule (mol);
- mol = get_uncached_molecule ();
+ mol = get_uncached_molecule ();
if (live ())
{
SCM_VALIDATE_MODULE (1, module);
return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);
+#undef FUNC_NAME
}
-SCM export_function ;
+SCM export_function;
void
ly_export (SCM module, SCM namelist)
else
return SCM_EOL;
}
+
+LY_DEFINE(ly_output_def_scope,
+ "ly:output-def-scope",
+ 1, 0,0,
+ (SCM def),
+ "Get the scope inside @var{def}."
+ )
+{
+ Music_output_def *op = unsmob_music_output_def (def);
+ SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
+
+ return op->scope_;
+}
+
+
+LY_DEFINE(ly_output_def_clone,
+ "ly:output-def-clone",
+ 1, 0,0,
+ (SCM def),
+ "Clone @var{def}."
+ )
+{
+ Music_output_def *op = unsmob_music_output_def (def);
+ SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
+
+ SCM s = op->clone ()->self_scm ();
+ scm_gc_unprotect_object (s);
+ return s;
+}
+
{"header", HEADER},
{"key", KEY},
{"lyrics", LYRICS},
+ {"lyricsto", NEWADDLYRICS},
{"mark", MARK},
{"markup", MARKUP},
{"midi", MIDI},
{"name", NAME},
{"new", NEWCONTEXT},
- {"newaddlyrics", NEWADDLYRICS},
{"notes", NOTES},
{"octave", OCTAVE},
{"once", ONCE},
New_lyric_combine_music_iterator::process (Moment )
{
find_thread ();
+ if (!music_context_)
+ return ;
if (!music_context_->daddy_trans_)
{
%type <music> music_property_def context_change
%type <scm> Music_list
%type <scm> property_operation context_mod translator_mod optional_context_mod
-%type <outputdef> music_output_def_body
+%type <outputdef> music_output_def_body music_output_def_head
%type <music> shorthand_command_req
%type <music> post_event tagged_post_event
%type <music> command_req verbose_command_req
}
;
-music_output_def_body:
- MIDI '{' {
+music_output_def_head:
+ MIDI {
Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultmidi"));
$$ = p;
THIS->lexer_->add_scope (p->scope_);
}
- | PAPER '{' {
+ | PAPER {
Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultpaper"));
Paper_def *p = 0;
if (id)
THIS->lexer_->add_scope (p->scope_);
$$ = p;
}
- | PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
- Music_output_def * o = unsmob_music_output_def ($3);
- $$ =o;
+ ;
- THIS->lexer_->add_scope (o->scope_);
+
+music_output_def_body:
+ music_output_def_head '{' {
+
}
- | MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
+ | music_output_def_head '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
Music_output_def * o = unsmob_music_output_def ($3);
$$ = o;
-
+ THIS->lexer_->remove_scope ();
THIS->lexer_->add_scope (o->scope_);
}
| music_output_def_body assignment {
}
| music_output_def_body translator_spec_block {
$$->assign_translator ($2);
-
}
| music_output_def_body tempo_event {
/*
if (i && arr[i] == arr[i-1])
continue;
- SCM_SETCAR(s, arr[i]);
- s = SCM_CDR(s);
+ SCM_SETCAR(s, arr[i]);
+
+ if (i < len - 1)
+ s = SCM_CDR(s);
}
SCM_SETCDR(s, SCM_EOL);
+ delete arr;
return l;
}
*/
for (int i=0; i < broken_intos_.size (); i++)
{
- SCM al = broken_intos_[i]->get_grob_property ("all-elements");
-
/*
don't do this: strange side effects.
*/
+ // SCM al = broken_intos_[i]->get_grob_property ("all-elements");
// al = uniquify_list (al);
}
-
-
if (verbose_global_b)
progress_indication (_f ("Element count %d.", count + element_count ()));
}
}
+
+ const int LAYER_COUNT= 3;
+
+
+
void
System::post_processing (bool last_line)
{
generate all molecules to trigger all font loads.
(ugh. This is not very memory efficient.) */
+
+ SCM all = get_grob_property ("all-elements") ;
+ all = uniquify_list (all);
+
+ /*
+ triger font loads first.
+
+ This might seem inefficient, but Molecules are cached per grob
+ anyway.
+ */
this->get_molecule();
- for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+ for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
{
- unsmob_grob (ly_car (s))->get_molecule ();
+ Grob * g = unsmob_grob (ly_car (s));
+ g->get_molecule ();
}
+
/*
font defs;
*/
% Do units first; must be done before any units are specified.
\paper {
- unit = "mm"
- mm = 1.0
- in = 25.4
- pt = #(/ in 72.27)
- cm = #(* 10 mm)
+ unit = "mm"
+ mm = 1.0
+ in = 25.4
+ pt = #(/ in 72.27)
+ cm = #(* 10 mm)
+
+ texsetting = ""
+ pssetting = ""
+ scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"% UGH.
+
+
+ #(define font-defaults
+ '((font-family . music)
+ (font-shape . upright)
+ (baseline-skip . 2)
+ (word-space . 0.6)
+ (font-series . medium)
+ ))
+
+ #(set-paper-size "a4")
+ \include "engraver-init.ly"
}
-papersize = "a4"
-paperfile = \papersize + "-init.ly"
-\include "generic-paper-init.ly"
-\include "paper20-init.ly"
+%{
+
+; note:
+; you can add fonts manually in the paper block by issuing
+
+#(set! fonts (append ...myfonts... fonts))
+
+for the format of myfonts, see font.scm
+
+%}
+
+
+paperEleven = \paper {
+ #(paper-set-staff-size (* 11.0 pt))
+}
+
+paperThirteen = \paper {
+ #(paper-set-staff-size (* 13.0 pt))
+}
+
+paperSixteen = \paper {
+ #(paper-set-staff-size (* 16.0 pt))
+}
+
+paperEightteen = \paper {
+ #(paper-set-staff-size (* 18.0 pt))
+}
+
+paperTwenty = \paper {
+ #(paper-set-staff-size (* 20.0 pt))
+}
+
+paperTwentythree = \paper {
+ #(paper-set-staff-size (* 23.0 pt))
+}
+
+paperTwentysix = \paper {
+ #(paper-set-staff-size (* 26.0 pt))
+}
+\paper { \paperTwenty }
\include "dynamic-scripts-init.ly"
\include "spanners-init.ly"
time-signature
custos
)
- barCheckSynchronize = ##t
+ barCheckSynchronize = ##f
%% chord names:
chordNameFunction = #ignatzek-chord-names
-\version "1.9.8"
-\paper {
- texsetting = ""
- pssetting = ""
- scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"% UGH.
-
-}
+++ /dev/null
-% paper-as5-init.ly
-
-\version "1.9.8"
-
-paperAsFive = \paper {
- staffheight = 5.\char
-
- #(define fonts (as-make-font-list 'as5))
-
- \translator { \StaffContext barSize = #5 }
-
- % no beam-slope
- %\translator { \VoiceContext beamHeight = #0 }
- \include "params-as-init.ly"
-}
-
-\paper { \paperAsFive }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper-as5-init.ly"
+++ /dev/null
-% paper-as9-init.ly
-
-\version "1.9.8"
-
-paperAsNine = \paper {
- staffheight = 9.\char
-
- %\translator { \StaffContext barSize = \staffheight }
-
- #(define fonts (as-make-font-list 'as9))
-
- \include "params-as-init.ly"
-}
-
-\paper { \paperAsNine }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper-as9-init.ly"
+++ /dev/null
-\version "1.9.8"
-% paper-init.ly
-
-%% Why som complicated? /MB
-%linewidth20 = \hsize - 2.5 * \staffheight
-%textheight20 = \vsize - 5.0 * \staffheight
-%linewidth = \staffheight/20.0 * \linewidth20
-%textheight = \staffheight/20.0 * \textheight20
-
-linewidth = \hsize - 2.\cm
-% Leave the textheight calculation to the geometry package. /MB
-%textheight = \vsize - 4.\cm
-raggedright = ##f
-packed = ##f
-indent = \linewidth / 14.0
-
+++ /dev/null
-% paper11-init.ly
-
-\version "1.9.8"
-
-paperEleven = \paper {
- staffheight = 11.0\pt
- #(define fonts (scale-font-list (/ 11. 20.)))
-
- \include "params-init.ly"
-}
-
-\paper { \paperEleven }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper11-init.ly"
+++ /dev/null
-% paper13-init.ly
-
-
-\version "1.9.8"
-
-paperThirteen = \paper {
- staffheight = 13.0\pt
- #(define fonts (scale-font-list (/ 13. 20.)))
-
- \include "params-init.ly"
-}
-
-\paper { \paperThirteen }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper13-init.ly"
+++ /dev/null
-% paper16-init.ly
-
-
-\version "1.9.8"
-
-paperSixteen = \paper {
- staffheight = 16.0\pt
- #(define fonts (scale-font-list (/ 16. 20.)))
- \include "params-init.ly"
-}
-
-\paper { \paperSixteen }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper16-init.ly"
+++ /dev/null
-% paper19-init.ly
-
-
-\version "1.9.8"
-
-paperNineteen = \paper {
- staffheight = 18.0\pt
- #(define fonts (scale-font-list (/ 18.0 20.0) ))
-
- \include "params-init.ly"
-}
-
-\paper { \paperNineteen }
-
+++ /dev/null
-\version "1.9.8"
-
-\include "paper19-init.ly"
+++ /dev/null
-% paper20-init.ly
-
-
-\version "1.9.8"
-
-paperTwenty = \paper {
- staffheight = 20.0\pt
- #(define fonts (scale-font-list 1.0))
-
- \include "params-init.ly"
-}
-
-\paper { \paperTwenty }
-
-
-%{
-
-; note:
-; you can add fonts manually in the paper block by issuing
-
-#(set! fonts (append ...myfonts... fonts))
-
-for the format of myfonts, see font.scm
-
-%}
+++ /dev/null
-\version "1.9.8"
-
-\include "paper20-init.ly"
+++ /dev/null
-% paper23-init.ly
-
-
-\version "1.9.8"
-
-paperTwentythree = \paper {
- staffheight = 23.0\pt
- #(define fonts (scale-font-list (/ 23. 20.)))
- \include "params-init.ly"
-}
-
-\paper { \paperTwentythree }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper23-init.ly"
+++ /dev/null
-% paper26-init.ly
-
-\version "1.9.8"
-
-paperTwentysix = \paper {
- staffheight = 26.0\pt
- #(define fonts (scale-font-list (/ 26. 20.)))
- \include "params-init.ly"
-}
-
-\paper { \paperTwentysix }
+++ /dev/null
-\version "1.9.8"
-
-\include "paper26-init.ly"
\version "2.1.1"
-% JUNKME.
-%% deprecated
-papersizename = \papersize
-
-% DO NOT change this without fixing -f ps output
-papersize = \papersize
-
-% FIXME
-% direct PostScript line height for single line staves
-lineheight = 14
-
-paperfile = \papersize + "-init.ly"
-
-% paperfile = "a4-init.ly"
-
-\include \paperfile
-\include "paper-init.ly"
-
-staffspace = #(/ staffheight 4.0)
-linethickness = 0.5 \pt
-outputscale = #(/ staffheight 4.0)
-
-% don't do full 2x for ledger, otherwise no white is left.
-ledgerlinethickness = #(+ linethickness (/ staffspace 10))
-
-% 2/3 stafflinethickness in 20pt staffheight
-% this parameter is independent of the output size.
-blotdiameter = 0.35 \pt
-interscoreline = 4. \mm
-
-
-
-
-%%
-%% TODO: baseline-skip, word-space should come from the font.
-%%
-#(define font-defaults
- '((font-family . music)
- (font-shape . upright)
- (baseline-skip . 2)
- (word-space . 0.6)
- (font-series . medium)
- ))
-
-
-
-\include "engraver-init.ly"
fet_endchar;
fet_beginchar("Quart notehead", "2", "quarthead")
- draw_outside_ellipse (1.54 - puff_up_factor / 2.0, 32, 0.707, 0);
+ draw_outside_ellipse (1.42 - puff_up_factor / 3.0, 32, 0.707, 0);
black_notehead_width# := charwd;
fet_endchar;
%%%%%%%%%%%%%%%%
+%% testing shapes.
+
+if 0 = 1 :
+
+
fet_beginchar("Quart noteheadPQ", "2PQ", "quartheadPQ")
draw_outside_ellipse (1.0 - puff_up_factor / 2.0, 32, 0.707, 0);
fet_endchar;
draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 40, 0.707, 0);
fet_endchar;
+fi
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+++ /dev/null
-% parmesan19.mf
-% part of LilyPond's pretty-but-neat music font
-
-staffsize#:=19pt#;
-
-input feta-autometric;
-fet_beginfont("parmesan", 19);
-
-test := 0;
-
-input parmesan-generic;
-
-fet_endfont("parmesan");
-
-end.
-
"define-grob-properties.scm"
"define-grobs.scm"
"define-grob-interfaces.scm"
+
+ "paper.scm"
))
(index-cell (cdr result) dir))
) )
+
(define (no-origin) "")
(define-public (tex-output-expression expr port)
- (display (eval expr this-module) port )
- )
+ (display (eval expr this-module) port ))
--- /dev/null
+; paper.scm - manipulate the paper block.
+;
+; (C) 2004 Han-Wen Nienhuys
+
+; the functions are fairly basic here.
+
+
+
+(define-public (paper-set-staff-size sz)
+ "Function to be called inside a \\paper{} block to set the staff size."
+ (let*
+ ((m (current-module))
+ (ss (/ sz 4))
+ (pt (eval 'pt m))
+ (mm (eval 'mm m)) )
+
+ (module-define! m 'fonts (scale-font-list (/ sz (* 20 pt))))
+ (module-define! m 'staffheight sz)
+ (module-define! m 'staff-space ss)
+ (module-define! m 'linethickness (* 0.5 pt))
+ (module-define! m 'outputscale ss)
+ (module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
+ (module-define! m 'blotdiameter (* 0.35 pt))
+ (module-define! m 'interscoreline (* 4 mm))
+ ))
+
+(define-public (set-staff-size sz)
+ "Set the default staff size, where SZ is thought to be in PT."
+ (let*
+ ((old-mod (current-module))
+ (pap (eval '$defaultpaper old-mod))
+ (new-paper (ly:output-def-clone pap))
+ (new-scope (ly:output-def-scope new-paper))
+ )
+ (set-current-module new-scope)
+ (paper-set-staff-size (* sz (eval 'pt new-scope)))
+ (set-current-module old-mod)
+ (module-define! old-mod '$defaultpaper new-paper)
+ ))
+
+
+(define paper-alist
+ '(("a4" . (cons (* 210 mm) (* 297.9 mm)))
+ ("a3" . (cons (* 297.9 mm) (* 420 mm)))
+ ("legal" . (cons (* 8.5 in) (* 14.0 in)))
+ ("letter" . (cons (* 8.5 in) (* 11.0 in)))
+ ("tabloid" . (cons (* 11.0 in) (* 17.0 in)))) )
+
+;; todo: take dimension arguments.
+
+(define-public (set-paper-size name)
+ (let*
+ ((entry (assoc name paper-alist))
+ (m (current-module))
+ (mm (eval 'mm m))
+ )
+
+ (if (pair? entry)
+ (begin
+ (set! entry (eval (cdr entry) m))
+ (module-define! m 'papersize name)
+ (module-define! m 'papersizename name)
+ (module-define! m 'hsize (car entry))
+ (module-define! m 'vsize (cdr entry))
+ (module-define! m 'linewidth (- (car entry) (* 20 mm)))
+ (module-define! m 'raggedright #f)
+ (module-define! m 'packed #f)
+ (module-define! m 'indent (/ (car entry) 4)) )
+ (ly:warning (string-append "Unknown papersize: " name))
+ )))
conversions.append (((2,1,7), conv, """\\translator Staff -> \\change Staff"""))
+def conv (str):
+ str =re.sub (r"\\newaddlyrics", r"\\lyricsto", str)
+ return str
+
+conversions.append (((2,1,10), conv, """\\newaddlyrics -> \\lyricsto"""))
+
+def conv (str):
+ str = re.sub (r'\\include\s*"paper([0-9]+)(-init)?.ly"',
+ r"#(set-staff-size \1)", str)
+ return str
+
+conversions.append (((2,1,11), conv, """\\include "paper16.ly" -> #(set-staff-size 16) """))
+
################################
# END OF CONVERSIONS