* input/mutopia/F.Schubert/standchen.ly: use newaddlyrics.
* lily/event.cc (to_relative_octave): add octave-check.
* Documentation/user/refman.itely (Line breaking): add noBreak.
* scm/new-markup.scm (normalsize-markup): add function.
(sans-markup): new function.
2004-01-15 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/sequential-iterator.cc (run_always): implement run_always().
+
+ * input/mutopia/F.Schubert/standchen.ly: use newaddlyrics.
+
+ * lily/event.cc (to_relative_octave): add octave-check.
+
+ * Documentation/user/refman.itely (Line breaking): add noBreak.
+
* scm/new-markup.scm (normalsize-markup): add function.
(sans-markup): new function.
@itemize @bullet
+@item
+A more concise syntax for checking octaves was introduced. A note may
+be followed by @code{=}@var{quotes} which indicates what its absolute
+octave should be. In the following example,
+
+@example
+ \relative c'' @{ c='' b=' d,='' @}
+@end example
+
+@noindent
+the @code{d} will generate a warning, because a @code{d''} is
+expected, but a @code{d'} is found.
+
@item There is a new mechanism for putting lyrics to melodies.
With this mechanism, @code{LyricVoice}s can be put melodies
individually, allowing for different melismatic sections in every
@subsection Octave check
-Octave checks make octave errors easier to correct.
-The syntax is
+Octave checks make octave errors easier to correct: a note may be
+followed by @code{=}@var{quotes} which indicates what its absolute
+octave should be. In the following example,
+@example
+ \relative c'' @{ c='' b=' d,='' @}
+@end example
+
+@noindent
+the @code{d} will generate a warning, because a @code{d''} is
+expected, but a @code{d'} is found. In the output, the octave is
+corrected this and the following notes.
+
+There is also a syntax that is separate from the notes.
@example
\octave @var{pitch}
@end example
For linebreaks at regular intervals use @code{\break} separated by
skips and repeated with @code{\repeat}:
@example
-<< \repeat unfold 7 @{ s1 * 4 \break @}
+<< \repeat unfold 7 @{
+ s1 \noBreak s1 \noBreak
+ s1 \noBreak s1 \break @}
@emph{the real music}
>>
@end example
@noindent
This makes the following 28 measures (assuming 4/4 time) be broken every
-4 measures.
+4 measures, and only there.
+
+@refcommands
+
+@code{\break}, @code{\noBreak}
+@cindex @code{\break}
+@cindex @code{\noBreak}
@seealso
e2 r4 |
}
-lyricVerseOne = \lyrics{
+lyricVerseOne = \lyrics {
Lei -- se fle -- hen mei -- ne Lie -- der
durch die Nacht zu dir;
in den stil -- len Hain her nie -- der,
Lieb -- chen, komm zu mir!
- Fl\"us -- ternd schlan -- ke Wip -- fel rau -- schen
+ Flüs -- ternd schlan -- ke Wip -- fel rau -- schen
in des Mon -- des Licht,
in des Mon -- des Licht;
- des Ver -- r\"a -- ters feind -- lich Lau -- schen
- f\"urch -- te, Hol -- de, nicht,
- f\"urch -- te, Hol -- de, nicht.
+ des Ver -- rä -- ters feind -- lich Lau -- schen
+ fürch -- te, Hol -- de, nicht,
+ fürch -- te, Hol -- de, nicht.
}
lyricVerseTwo = \lyrics{
- H\"orst die Nach -- ti -- gal -- len schla -- gen?
+ Hörst die Nach -- ti -- gal -- len schla -- gen?
ach! sie fle -- hen dich,
- mit der T\"o -- ne s\"u -- "\ss en" Kla -- gen
- fle -- hen sie f\"ur mich.
+ mit der Tö -- ne sü -- "\ss en" Kla -- gen
+ fle -- hen sie für mich.
Sie -- ver -- "steh'n" des Bu -- sens Seh -- nen,
ken -- nen Lieb -- es -- schmerz,
ken -- nen Lieb -- es -- schmerz,
- r\"uh -- ren mit den Sil -- ber -- t\"o -- nen
+ rüh -- ren mit den Sil -- ber -- tö -- nen
jed -- es wei -- che Herz,
jed -- es wei -- che Herz.
}
lyricThrough = \lyrics{
La\ss auch dir die Brust be -- we -- gen
- Lieb -- chen, h\"o -- re mich!
+ Lieb -- chen, hö -- re mich!
be -- bend harr' ich dir ent -- ge -- gen!
- komm, be -- gl\"uk -- ke mich!
- komm, be -- gl\"uk -- ke mich, __
- be -- gl\"uk -- ke mich!
+ komm, be -- glük -- ke mich!
+ komm, be -- glük -- ke mich, __
+ be -- glük -- ke mich!
}
trebleIntro = \notes\relative c{
- r8^"\bf M\\\"a\\ss ig"\pp <g' c>-. <c es>-. <g c>-. <c es>-. <g c>-. |
+ r8^"\bf Mäßig"\pp <g' c>-. <c es>-. <g c>-. <c es>-. <g c>-. |
r8 <as c>-. <c es>-. <as c>-. <c es>-. <as c>-. |
r8 <as c>-. <c d>-. <as c>-. <c d>-. <as c>-. |
r8 <g b>-. <b d>-. <g b>-. <b d>-. <g b>-. |
\bar "|."
}
-allLyrics = \lyrics {
+allLyrics = {
% maybe should be bigger by default, in grob-description.scm ?
- \property Lyrics . LyricText \override #'font-size = #2
- \property Lyrics . LyricHyphen \override #'maximum-length = #1.5
- \context LyricsVoice = "leise-1" { \lyricVerseOne
- \lyricVerseTwo
- \lyricThrough
+ \newaddlyrics "leise" \new LyricsVoice {
+ \lyricVerseOne
+ \lyricVerseTwo
+ \lyricThrough
} }
-lyricStaff = \context Lyrics {
- \allLyrics
-}
-
-vocals = \context Voice \notes {
+vocals = \context Voice = leise \notes {
\clef treble
% certainly no auto-beaming for vocals
\autoBeamOff
R1 * 3/4 * 6
}
-vocalStaff = \context Staff = vocal<<
- \property Staff.midiInstrument = "synth voice"
- \context Voice = "leise" << \global
- \vocals >>
->>
-
-treble = {
- \clef treble
+trebleStaff = \context Staff = treble<<
+ \property Staff.midiInstrument = "acoustic grand"
+ \global
+ {\clef treble
\property Voice.autoBeamSettings \override #'(begin * * * *) = #(ly:make-moment 0 1)
\trebleIntro
\trebleVerseOne
\trebleEentje
\trebleVerseOne
- \trebleThrough
-}
+ \trebleThrough }
+>>
-trebleStaff = \context Staff = treble<<
+bassStaff = \context Staff = bass<<
\property Staff.midiInstrument = "acoustic grand"
\global
- \treble
->>
-bass = {
\clef bass
- \bassIntro
+ {\bassIntro
\bassVerseOne
\bassEentje
\bassVerseOne
- \bassThrough
-}
-
-bassStaff = \context Staff = bass<<
- \property Staff.midiInstrument = "acoustic grand"
- \global
- \bass
->>
-
-grandStaff = \context PianoStaff <<
-
- \trebleStaff
- \bassStaff
+ \bassThrough}
>>
\score{
- <<
-
-%{
- Transpose as you like for your voice
- Range untransposed is c' to f'' (for tenors and sopranos)
- \transpose c' a gives a' to d'' (for basses, who sing an octave down)
-
- \addlyrics
- \notes \transpose c' a \vocalStaff
- \lyricStaff
- \notes \transpose c' a \grandStaff
-%}
-
- \addlyrics
- \vocalStaff
- \lyricStaff
- \grandStaff
+ <<
+ \new Staff <<
+ \property Staff.midiInstrument = "synth voice"
+ %% insert \transpose if necessary, depending on voice range.
+ \global
+ \vocals
>>
- \paper {
- % Use
- % textheight = 280.\mm
- % linewidth = 190.\mm
- % to get this on 3 pages of a4.
-
- % Mandatory Mutopia settings yield 4 pages :(
- textheight = 270.0\mm
- linewidth = 180.0\mm
-
- \translator { \RemoveEmptyStaffContext }
- }
- \midi{
- \tempo 4 = 54
- }
+ \allLyrics
+ \context PianoStaff <<
+ \trebleStaff
+ \bassStaff
+ >>
+ >>
+ \paper {
+ % Use
+ % textheight = 280.\mm
+ % linewidth = 190.\mm
+ % to get this on 3 pages of a4.
+
+ % Mandatory Mutopia settings yield 4 pages :(
+ textheight = 270.0\mm
+ linewidth = 180.0\mm
+
+ \translator { \RemoveEmptyStaffContext }
+ }
+ \midi{
+ \tempo 4 = 54
+ }
}
*/
+/*
+ TODO: there should be more space in the following situation
+
+
+ Natural + downstem
+
+ |_
+ | | X
+ |_| |
+ | |
+
+ */
SCM
Accidental_placement::position_accidentals (Grob * me)
{
virtual void acknowledge_grob (Grob_info);
virtual void process_music ();
void create_items ();
- TRANSLATOR_DECLARATIONS( Bar_number_engraver );
+ TRANSLATOR_DECLARATIONS(Bar_number_engraver );
};
"@table @code\n"
"@item (minimum-space . @var{spc}))\n"
" Pad space until the distance is @var{spc}\n"
- "@item (fixed-space} . @var{spc})\n"
+ "@item (fixed-space . @var{spc})\n"
" Set a fixed space\n"
"@item (semi-fixed-space . @var{spc})\n"
" Set a space. Half of it is fixed and half is stretchable. \n"
{
Pitch new_pit = *old_pit;
new_pit = new_pit.to_relative_octave (last);
+
+ SCM check = get_mus_property ("absolute-octave");
+ if (gh_number_p (check) &&
+ new_pit.get_octave () != gh_scm2int (check))
+ {
+ String s =_("Failed octave check, got: ");
+ s += new_pit.to_string ();
+ new_pit = Pitch (gh_scm2int (check),
+ new_pit.get_notename (),
+ new_pit.get_alteration ());
+
+ s += " expected ";
+ s += new_pit.to_string ();
+ origin ()->warning (s);
+ }
+
set_mus_property ("pitch", new_pit.smobbed_copy ());
return new_pit;
protected:
virtual void process (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
-
+ virtual bool run_always () const;
protected:
Moment here_mom_;
Music_iterator * iter_;
%type <i> exclamations questions dots optional_rest
%type <i> bass_mod
%type <scm> grace_head
+%type <scm> oct_check
%type <scm> context_mod_list
%type <scm> lyric_element
%type <scm> bass_number br_bass_figure bass_figure figure_list figure_spec
$$ = a;
}
;
-
+
+oct_check:
+ /**/ { $$ = SCM_EOL; }
+ | '=' { $$ = gh_int2scm (0); }
+ | '=' sub_quotes { $$ = gh_int2scm ($2); }
+ | '=' sup_quotes { $$ = gh_int2scm ($2); }
+ ;
+
sup_quotes:
'\'' {
$$ = 1;
;
simple_element:
- pitch exclamations questions optional_notemode_duration optional_rest {
+ pitch exclamations questions oct_check optional_notemode_duration optional_rest {
Input i = THIS->pop_spot ();
if (!THIS->lexer_->note_state_b ())
THIS->parser_error (_ ("Have to be in Note mode for notes"));
Music *n = 0;
- if ($5)
+ if ($6)
n = MY_MAKE_MUSIC("RestEvent");
else
n = MY_MAKE_MUSIC("NoteEvent");
n->set_mus_property ("pitch", $1);
- n->set_mus_property ("duration", $4);
+ n->set_mus_property ("duration", $5);
+ if (gh_number_p ($4))
+ {
+ int q = gh_scm2int ($4);
+ n->set_mus_property ("absolute-octave", gh_int2scm (q-1));
+ }
if ($3 % 2)
n->set_mus_property ("cautionary", SCM_BOOL_T);
}
IMPLEMENT_CTOR_CALLBACK (Sequential_iterator);
+
+bool
+Sequential_iterator::run_always () const
+{
+ return iter_ ? iter_->run_always () : false;
+}
The direction of the Tie is more complicated (See [Ross] p136 and
further).
+
+ (what about linebreaks? )
+
*/
Direction
Tie::get_default_dir (Grob*me)
{
Item * sl = head (me,LEFT) ? Rhythmic_head::get_stem (head (me,LEFT)) :0;
Item * sr = head (me,RIGHT) ? Rhythmic_head::get_stem (head (me,RIGHT)) :0;
-
if (sl && sr)
{
if (get_grob_direction (sl) == UP
black_notehead_width# := charwd;
fet_endchar;
+%%%%%%%%%%%%%%%%
+
fet_beginchar("Quart noteheadPQ", "2PQ", "quartheadPQ")
draw_outside_ellipse (1.0 - puff_up_factor / 2.0, 32, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadAA", "2AA", "quartheadAA")
- draw_outside_ellipse (1.2 - puff_up_factor / 2.0, 32, 0.707, 0);
+ draw_outside_ellipse (1.35 - puff_up_factor / 2.0, 32, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadAB", "2AB", "quartheadAB")
- draw_outside_ellipse (1.3 - puff_up_factor / 2.0, 32, 0.707, 0);
+ draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 32, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadAC", "2AC", "quartheadAC")
- draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 32, 0.707, 0);
-
+ draw_outside_ellipse (1.45 - puff_up_factor / 2.0, 32, 0.707, 0);
fet_endchar;
+
fet_beginchar("Quart noteheadAD", "2AD", "quartheadAD")
draw_outside_ellipse (1.5 - puff_up_factor / 2.0, 32, 0.707, 0);
-
fet_endchar;
+
+fet_beginchar("Quart noteheadAD", "2AE", "quartheadAD")
+ draw_outside_ellipse (1.55 - puff_up_factor / 2.0, 32, 0.707, 0);
+fet_endchar;
+
+fet_beginchar("Quart noteheadAD", "2AF", "quartheadAD")
+ draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 32, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadAD", "2AG", "quartheadAD")
+ draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 32, 0.707, 0);
+fet_endchar;
+
+
fet_beginchar("Quart noteheadBA", "2BA", "quartheadBA")
- draw_outside_ellipse (1.2 - puff_up_factor / 2.0, 35, 0.707, 0);
-
+ draw_outside_ellipse (1.35 - puff_up_factor / 2.0, 35, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadBB", "2BB", "quartheadBB")
- draw_outside_ellipse (1.3 - puff_up_factor / 2.0, 35, 0.707, 0);
+ draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 35, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadBC", "2BC", "quartheadBC")
- draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 35, 0.707, 0);
+ draw_outside_ellipse (1.45 - puff_up_factor / 2.0, 35, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadBD", "2BD", "quartheadBD")
draw_outside_ellipse (1.5 - puff_up_factor / 2.0, 35, 0.707, 0);
-
fet_endchar;
+fet_beginchar("Quart noteheadBD", "2BE", "quartheadBD")
+ draw_outside_ellipse (1.55 - puff_up_factor / 2.0, 35, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadBD", "2BF", "quartheadBD")
+ draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 35, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadBD", "2BG", "quartheadBD")
+ draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 35, 0.707, 0);
+fet_endchar;
+
+
+
fet_beginchar("Quart noteheadCA", "2CA", "quartheadCA")
- draw_outside_ellipse (1.2 - puff_up_factor / 2.0, 38, 0.707, 0);
-
+ draw_outside_ellipse (1.35 - puff_up_factor / 2.0, 40, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadCB", "2CB", "quartheadCB")
- draw_outside_ellipse (1.3 - puff_up_factor / 2.0, 38, 0.707, 0);
-
+ draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 40, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadCC", "2CC", "quartheadCC")
- draw_outside_ellipse (1.4 - puff_up_factor / 2.0, 38, 0.707, 0);
-
+ draw_outside_ellipse (1.45 - puff_up_factor / 2.0, 40, 0.707, 0);
fet_endchar;
fet_beginchar("Quart noteheadCD", "2CD", "quartheadCD")
- draw_outside_ellipse (1.5 - puff_up_factor / 2.0, 38, 0.707, 0);
+ draw_outside_ellipse (1.5 - puff_up_factor / 2.0, 40, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadCD", "2CE", "quartheadCD")
+ draw_outside_ellipse (1.55 - puff_up_factor / 2.0, 40, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadCD", "2CF", "quartheadCD")
+ draw_outside_ellipse (1.6 - puff_up_factor / 2.0, 40, 0.707, 0);
+fet_endchar;
+fet_beginchar("Quart noteheadCD", "2CG", "quartheadCD")
+ draw_outside_ellipse (1.65 - puff_up_factor / 2.0, 40, 0.707, 0);
fet_endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(music-property-description 'span-type string? "What kind of spanner should be created?
TODO: consider making type into symbol")
+(music-property-description 'absolute-octave integer?
+ "The absolute octave for a octave check note.")
(music-property-description 'articulations music-list?
"Articulation events specifically for this note.")
(music-property-description 'articulation-type string? "key for script definitions alist.
(define-public (simple-markup paper props . rest)
"A simple text-string; @code{\\markup @{ foo @}} is equivalent with
-@code{\markup @{ \simple #\"foo\" @}}.
+@code{\\markup @{ \\simple #\"foo\" @}}.
"
(Text_item::interpret_markup paper props (car rest)))