--- /dev/null
+<!if this file ./Documentation/footer.html.in is present, it is included>
+<!automatically by add-html-footer, and replaces the simple standard footer>
+<!substitutions: package.Name, package.Name, ENV:WEBMASTER, ENV:WEBMASTER>
+<hr>
+Return to <a href=%s>%s's home page</a>.
+<p>
+Please send GNU LilyPond questions and comments to
+
+<a href="mailto:gnu-music-discuss@gnu.org">
+<em>gnu-music-discuss@gnu.org</em></a>.
+<p>
+
+Please send comments on these web pages to
+
+<a href="mailto:%s"><em>%s</em></a>,
+send other FSF & GNU inquiries and questions to
+
+<a href="mailto:gnu@gnu.org"><amp>gnu@gnu.org</em></a>.<p>
+<p>
+<!Copyright (C) 1998 Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111, USA>
+<!hmm, is this ok?>
+Copyright (c) 1997, 1998 Han-Wen Nienhuys and Jan Nieuwenhuizen.
+<p>
+Verbatim copying and distribution of this entire article is
+permitted in any medium, provided this notice is preserved.<p>
+
the explanation of how lyrics mode parses words seems ridiculous.
Is there a simple way to explain this, or is the behavior
too complicated for a reasonable explanation?
+ \relative and \tranpose and \times make it necessary to specify
+ an explicit \type staff, or bizarre things happen.
+ catalan.ly
+ accordion symbols
+ extender* (see extender.ly)
+ \repeat & \alternative -> probably should have an example
)
whentexinfo(notableofcontents())
-article(Mudela 1.0.7 / LilyPond 1.0.15 Reference Manual)
+article(Mudela 1.0.7 / LilyPond 1.1.8 Reference Manual)
(Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen)
(nop()PIPETHROUGH(date "+%B %d, %Y")()()nop())
file(init.)var(ext) must contain the code(\maininput) keyword or LilyPond
will not read the user specified file.
+When LilyPond processes file(filename.ly) it will produce file(filename.tex) as
+output. If file(filename.ly) contains a second code(\paper) keyword, then
+LilyPond will produce file(filename-1.tex) as well. Subsequent code(\paper)
+keywords will produces sequentially numbered file names. Several files can be
+specified; they will each be processed independently.
sect(Syntax)
letter and are entirely alphanumeric. It is also impossible to refer
to an identifier whose name is the same as the name of a keyword. The
following words are keywords:
-verb(absdynamic header musicalpitch remove times
-accepts in name score translator
-bar include notenames script transpose
-cadenza key notes shape type
-clef keysignature paper skip version
-cm lyrics partial spandynamic
-consists maininput penalty symboltables
-duration mark property table
-font midi pt tempo
-grouping mm relative time)
+verb(absdynamic grouping mm relative symboltables
+accepts header musicalpitch remove table
+alternative in name repeat tempo
+bar include notenames scm time
+cadenza key notes scmfile times
+clef keysignature paper score translator
+cm lyrics partial script transpose
+consists maininput penalty shape type
+duration mark property skip version
+font midi pt spandynamic)
The right hand side of an identifier assignment is parsed completely
when the assignment is made. It therefore must have any context
_ _ _ _ % 4 words, each one a space
))
+It is possible to create words that break the rules by prefixing them with the
+dollar sign code($). Regardless of the context, a word beginning with code($)
+extends until the next white space character. Such words can contain numbers
+(even in Note mode), or other forbidden characters. The dollar sign can be
+used to create and access identifiers that could not otherwise be used.
COMMENT(
These modes are of a lexical nature. Normal and Note mode largely
mudela(fragment,verbatim,center)(
[a'8 a'] [a'16 a' a' a']
)
+If you want to put beams over chords, you will find that the obvious
+construction does not work. You must do the following:
+mudela(fragment,verbatim,center)(<[a'8 c''> b' <c'' e''> <a' c'']>)
+The bracket characters must appear immediately adjacent to a note.
In order to create triplets, you must use a length multiplier after
the brackets. An open bracket code([) followed by a fraction
c''-\open c''-\flageolet c''-\reverseturn
c''-\trill
c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent
- c''-\upprall c''-\downprall }
+ c''-\upprall c''-\downprall c''-\thumb}
\type Lyrics \lyrics{
accent marcato staccatissimo fermata stopped
staccato tenuto upbow downbow lheel rheel ltoe rtoe turn
open flageolet reverseturn
trill prall
- mordent prallprall prallmordent uprall downprall }>
+ mordent prallprall prallmordent uprall downprall thumb}>
\paper{linewidth = 5.875\in;
indent = 0.0;
}
terminated with code(\rced). There are also shorthands for these
marks. A crescendo can be started with code(\<) and a decrescendo can
be started with code(\>). Either one can be terminated with code(\!).
+Note that code(\!) must go before the last note of the dynamic mark whereas
+code(\rc) and code(\rced) go after the last note. Because these marks are
+bound to notes, if you want to get several marks during one note, you must use
+spacer notes.
+mudela(fragment,verbatim,center)(
+c'' \< \! c'' d'' \decr e'' \rced
+< f''1 {s4 \< \! s4 \> \! s2 } >)
Tremolo marks can be printed by a note by adding code(:)[var(length)]
after the note. The length must be at least 8. A var(length) value
code(\translator) block. It specifies what contexts are allowed with the
context that is being defined. See Section ref(translators).
+dit(code(\alternative) code({) var(music1) var(music2) ... code(}))
+Specifies alternative endings. Must come after a code(\repeat) keyword.
+
dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at
measure boundaries, replaces the regular bar symbol with a special
symbol. The argument var(bartype) is a string which specifies the
mudela(center)(
\score{
\notes{\cadenza 1; \clef alto; c'4_"\kern -10mm alto"
+ \clef scarlatti; c'4_"\kern -4mm scarlatti"
\clef mezzosoprano; c'4^"\kern -10mm mezzosoprano"
\clef soprano; c'4_"\kern -10mm soprano"
\clef treble; c'4^"\kern -6mm treble"
top of the file describing the file's contents. If a file has
multiple code(\score) blocks, then a header should appear in
each score block describing its contents. Tools like code(ly2dvi) can
-use this information for generating titles. Some possible key values
-are: title, opus, description, composer, enteredby, and copyright.
+use this information for generating titles. Key values that are used
+by ly2dvi are: title, subtitle, composer, opus, poet, instrument,
+metre, arranger, and piece.
dit(code(\in)) Specify a dimension in inches.
code(\translator) block. Specifies that a performer or engraver named
var(string) should be removed. See Section ref(translators).
+dit(code(\repeat) var(count) code({) var(music) code(}))
+Repeats the specified
+music var(count) times. Alternative endings can be specified by adding a
+code(\alternative) keyword after the code(\repeat).
+
+dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code.
+
+dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified
+file.
+
dit(code(\score) var(statementlist)) Create a Score context. This
is the top level notation context.
COMMENT(this still needs work)
force slurs down. The shorthands code(\slurup), code(\slurdown), and
code(\slurboth) are available.
+dit(code(tieYDirection)) Set to code(\free) for free choice of tie
+direction, set to code(\up) to force ties up, set to code(\down) to
+force ties down.
+
dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and
a larger value for dashed slurs. Identifiers code(\slurnormal) and
code(\slurdotted) are predefined to set the first two settings.
dit(code(Lyric_engraver)) Engraves lyrics. Normally in code(LyricVoice).
dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
produced with code(R). Normally in code(Voice).
-dit(code(Note_heads_engraver)) Engraves note heads. Normally in code(Voice).
-Removing this gives a fatal error.
-COMMENT(Perhaps should be Note_head_engraver)
dit(code(Piano_bar_engraver))
dit(code(Pitch_squash_engraver)) Treat all pitches as middle C. Used in
code(RhythmicStaff). Note that the notes move, but the locations of
In code(LyricVoice).
COMMENT( Should this be named Plet_req_swallow_translator? )
dit(code(Priority_horizontal_align_engraver))
+dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and
+ code(RhythmicStaff).
dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
dit(code(Rest_engraver)) Engraves rests. Normally in code(Voice).
dit(code(Rhythmic_column_engraver))
dit(code(Timing_engraver)) Responsible for synchronizing timing information
from staffs. Normally in code(Score). In order to create polyrhythmic music,
this engraver should be removed from code(Score) and placed in code(Staff).
+dit(code(Tuplet_engraver)) Engraves tuplet brackets? In code(Staff).
dit(code(Vertical_align_engraver))
)
))
DEFINEMACRO(beginbold)(0)(whenhtml(htmlcommand(<font size=4><strong>)))
-DEFINEMACRO(endbold)(0)(whenhtml(htmlcommand(</strong><font size=3>)))
+DEFINEMACRO(endbold)(0)(whenhtml(htmlcommand(</strong></font>)))
redef(htmlnewfile)(0)()
setchapterstring()
Most of the items are marked in the code as well, with full explanation.
grep for TODO and ugh/ugr/urg
-
BUGS:
-
* gallina barlines.
+ * fix height of / collisions with lyrics (chords),
+ see input/test/vertical-text.ly
+
+ * repeat/volta:
+ - one volta spanner per score
+ - repeat bars span staffs
+ - placement alternative number
+ - dimensions of volta bracket
+
+ * who is trying to print too (small/big) piano braces all the time?
+ warning: piano brace too small (16.000pt)
+
+
* latex bla.tex broken (titles / \lilyfooter stuff?)
* msgfmt -o check?
* space after bars?
* [/3 c8 c16 c c c]/1
-
+
* fix singleStaffBracket
-
+
* repeat bars: need distance after ":|" and before "|:"
* The time signature warnings still remain, will be fixed later.
- Summary of minor spelling irregularities:
+ii Summary of minor spelling irregularities:
- capitalization/use of underscores in property names
- * fix Score.skipBars
-
- * repeat bars: need distance after ":|" and before "|:"
+ * fix SkipBars -> skipBars
* \shape 1st dim skipped?
portato= \script { "portato" 0 -1 0 1 0 }
STUFF
+ * uniformise recent feta contributions.
+
+ * check out legal/(c) matters for scores.
* move option processing out of gh_enter
* revise documentation
- * abbrev -> tremolo
-
* junking \skip req in lyrics
* Language:
* rename
- plet -> tuplet
- measure -> bar
+ - abbrev -> tremolo
- abbreviation-beam -> (measured/unmeasured) tremolo
- partial -> anacrouse
* add to MIDI output:
- tempo change
- ornaments (and trills?)
- - repeat
+ - repeat/volta
- slurs
- accents
- dynamics
* relative mode for pitch entering
- * bracket: volta 1,2
-
* configure pitch_byte
* rest name configurable
* revise calcideal
- * volta
-
IDEAS
* Output data structures of Mudela in XML/SGML.
AC_CHECK_LIB(guile, scm_boot_guile)\
)
if test "$ac_cv_lib_guile_scm_shell" != yes -a \
- "$ac_cv_lib_scm_boot_guile" != yes ; then
+ "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
fi
])
%}
% \type "Hara_kiri_line_group_engraver";
+ \consists "Repeat_engraver";
\consists "Bar_engraver";
\consists "Clef_engraver";
\consists "Key_engraver";
\consists "Local_key_engraver";
\consists "Time_signature_engraver";
- \consists "Repeat_engraver";
\consists "Staff_symbol_engraver";
\consists "Collision_engraver";
\consists "Rest_collision_engraver";
- \consists "Tuplet_engraver";
+
%{
Uncomment to get bar numbers on single staff systems:
\consists "Pitch_squash_engraver";
\consists "Separating_line_group_engraver";
\name RhythmicStaff;
- \consists "Bar_engraver";
+
\consists "Repeat_engraver";
+ \consists "Bar_engraver";
\consists "Time_signature_engraver";
\consists "Staff_symbol_engraver";
\accepts "Voice";
\consists "Font_size_engraver";
\consists "Slur_engraver";
\consists "Ties_engraver";
+ \consists "Tuplet_engraver";
\consists "Note_heads_engraver" ;
\consists "Skip_req_swallow_translator";
};
barColumnPriority = "0";
marginBreakPriority = "-4";
+ \consists "Repeat_engraver";
\consists "Bar_engraver";
\consists "Clef_engraver";
- \consists "Repeat_engraver";
\consists "Key_engraver";
\consists "Time_signature_engraver";
\consists "Local_key_engraver";
defaultClef = treble;
\consists "Timing_engraver";
+
\consists "Bar_column_engraver";
\consists "Bar_number_engraver";
\consists "Mark_engraver";
"bars" = \table {
"empty" "emptybar" 0
- "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "" "emptybar" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
"|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 16.0\pt
"||" "doublebar" 1 0.0\pt 4.0\pt 0.0\pt 16.0\pt
"|." "finishbar" 1 -4.0\pt 0.0\pt 0.0\pt 16.0\pt
}
- "meters" = \table {
- "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- }
-
% dims ignored for this table
"param" = \table {
- "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 80.0\pt
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 32.0\pt 112.0\pt
"bracket" "staffbracket" 1 0.0\pt 4.0\pt 16.0\pt 128.0\pt
"extender" "extender" 1 0.0\pt 0.0\pt 1.0\pt 160.0\pt
"time_signature" "generalmeter" 2 0.0\pt 10.0\pt -8.0\pt 8.0\pt
}
- "beamslopes" = \table {
- "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt
- "horizontal" "rulesym" 2
- }
}
"bars" = \table {
"empty" "emptybar" 0
- "" "" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
+ "" "emptybar" 0 0.0\pt 0.0\pt 0.0\pt 16.0\pt
"|" "maatstreep" 1 0.0\pt 0.64\pt 0.0\pt 20.0\pt
"||" "doublebar" 1 0.0\pt 5.0\pt 0.0\pt 20.0\pt
"|." "finishbar" 1 -5.0\pt 0.0\pt 0.0\pt 20.0\pt
":|:" "repeatbarstartrepeat" 0 0.0\pt 20.0\pt 0.0\pt 20.0\pt
}
- "meters" = \table {
- "C" "fourfourmeter" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- "C2" "allabreve" 0 0.0\pt 10.0\pt -5.0\pt 5.0\pt
- }
-
% dims ignored for this table
"param" = \table {
"bracket" "staffbracket" 1 0.0\pt 0.0\pt 20.0\pt 160.0\pt
"extender" "extender" 1 0.0\pt 0.0\pt 1.0\pt 160.0\pt
"rule" "rulesym" 2
- "brace" "pianobrace" 1 0.0\pt 0.0\pt 40.0\pt 100.0\pt
+ "brace" "pianobrace" 1 0.0\pt 0.0\pt 40.0\pt 140.0\pt
"time_signature" "generalmeter" 2 0.0\pt 10.0\pt -5.0\pt 5.0\pt
"stem" "stem" 2
"fill" "hbox{}" 0
}
-
- "beamslopes" = \table {
- "slope" "beamslope" 2 2.0\pt 64.0\pt 0.0\pt 0.0\pt
- "horizontal" "rulesym" 2
- }
}
--- /dev/null
+\score{
+ <
+ \type Staff \notes\relative c''{
+ c c c c
+ \repeat 2 { { d d d d } }
+ \alternative { { a a a a } { a a a a } }
+ }
+ \type Lyrics \lyrics {
+ De eer- ste < { maat } { moet } >
+ \repeat 2 { { } }
+ \alternative <
+ { en dan twee keer }
+ { een koe- plet _ }
+ >
+ en dan nog dit er ach- ter aan
+ }
+ >
+}
[g8. g16] fis4.~a,8 [d8 e8] fis2 [b8 b8] a4. a8 a,4 d2 s4
}
-$text1 = \lyrics{
- Oh4 __ say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8
+$text = \lyrics{
+ Oh4 __ \repeat 2 { { } }
+ \alternative <
+ { say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8
so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
- ing. Whose8. broad16
-}
-
-$text2 = \lyrics{
- _4 stripes and bright stars,2 through8 the8 per-4 il- ous fight,2
- O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly
- _ _ _
-}
-
-$text3 = \lyrics{
+ ing. Whose8. broad16 }
+ { stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
+ O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly }
+ >
stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8
burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
our16 flag4 was still there,2 Oh4 say, does that star- span-
\key D;
\partial 4;
\skip 4;
- \bar "|:";
\skip 2.*8;
- \bar ":|";
\skip 2.*16;
\skip 2.;
\bar "|.";
\notes \transpose c'' {\voicetwo \$staff1_voice_2 }
>
\type Lyrics = one \lyrics <
-% urg, too much distance between two texts; fixme first
-% \$text1
-% { \$text2 \$text3 }
- { \$text1 \$text3 }
+ \$text
>
\type Staff=staffB <
\global
\score{
<
- \type Staff = o \notes\relative c,,, { \stemdown [c8 c c c] }
- \type Lyrics \lyrics{ BLA bla }
- \type Staff = t \notes\relative c''''' { \stemup [c8 c c c] }
+ \type Staff = o \notes\relative c,,, {
+ \stemdown [c8 c c c] c4 c4 \break [c8 c c c] c4 c4
+ }
+ \type Lyrics \lyrics{
+ BLA bla _2 < { BLA bla } { BLA bla } > _2
+ }
+ \type Staff = t \notes\relative c''''' {
+ \stemup [c8 c c c] c4 c [c8 c c c] c4 c
+ }
>
\paper{
castingalgorithm = \Wordwrap;
struct Graphical_element;
struct Graphical_axis_group;
-struct Mark_req;
-struct Music_output;
-struct Musical_pitch;
-struct Music_output_def;
struct Global_translator;
struct Hara_kiri_line_group_engraver;
struct Hara_kiri_vertical_group_spanner;
struct Lookup;
struct Lyric_item;
struct Lyric_req;
-struct My_lily_lexer;
+struct Mark_req;
struct Measure_grouping_req;
struct Melodic_req;
struct Midi_def;
struct Multi_measure_rest;
struct Multi_measure_rest_req;
struct Multi_measure_rest_engraver;
-struct Musical_script_req;
-struct Music_list;
+struct Music;
struct Musical_req;
struct Musical_span_req;
-struct Music;
+struct Musical_script_req;
+struct Music_list;
+struct Music_list_iterator;
+struct Music_output;
+struct Music_output_def;
+struct Musical_pitch;
struct Music_sequence;
-struct Music_wrapper_iterator;
struct Music_wrapper;
+struct Music_wrapper_iterator;
+struct My_lily_lexer;
struct My_lily_parser;
struct Note_column;
struct Note_column_engraver;
#include "lily-proto.hh"
-class Lyric_engraver : public Engraver {
- Lyric_req* lreq_l_;
- Text_item *lyric_item_p_;
+class Lyric_engraver : public Engraver
+{
protected:
virtual void do_pre_move_processing();
virtual bool do_try_music (Music*);
virtual void do_process_requests();
virtual void do_post_move_processing();
+
public:
- VIRTUAL_COPY_CONS(Translator);
-
Lyric_engraver();
+ VIRTUAL_COPY_CONS(Translator);
+
+private:
+ Link_array<Lyric_req> lyric_req_l_arr_;
+ Link_array<Text_item> text_p_arr_;
};
+
#endif // LYRIC_ENGRAVER_HH
--- /dev/null
+/*
+ music-list-iterator.hh -- declare Music_list_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+
+#ifndef MUSIC_LIST_ITERATOR_HH
+#define MUSIC_LIST_ITERATOR_HH
+
+#include "music-iterator.hh"
+#include "pcursor.hh"
+#include "plist.hh"
+
+class Music_list_iterator : public Music_iterator
+{
+public:
+ Music_list_iterator ();
+ virtual ~Music_list_iterator ();
+
+ virtual void construct_children ();
+ virtual Moment next_moment () const;
+ virtual bool ok () const;
+
+protected:
+ Music_list* music_list_l () const;
+
+ virtual void do_print () const;
+ virtual void do_process_and_next (Moment);
+};
+
+#endif // MUSIC_LIST_ITERATOR_HH
#ifndef REPEATED_MUSIC_ITERATOR_HH
#define REPEATED_MUSIC_ITERATOR_HH
-#include "music-wrapper-iterator.hh"
-#include "sequential-music-iterator.hh"
+#include "music-list-iterator.hh"
-class Repeated_music_iterator : public Music_iterator
+class Repeated_music_iterator : public Music_list_iterator
{
public:
Repeated_music_iterator ();
- ~Repeated_music_iterator ();
+ virtual ~Repeated_music_iterator ();
virtual void construct_children ();
virtual Moment next_moment () const;
protected:
virtual Repeated_music* repeated_music_l () const;
+
virtual void do_print () const;
virtual void do_process_and_next (Moment);
private:
Music_iterator* repeat_iter_p_;
- Sequential_music_iterator* alternative_iter_p_;
+ Music_list_iterator* alternative_iter_p_;
};
#endif /* REPEATED_MUSIC_ITERATOR_HH */
/*
- Sequential_music-iter.hh -- declare Sequential_music_iterator
+ Sequential_music-iterator.hh -- declare Sequential_music_iterator
source file of the GNU LilyPond music typesetter
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#ifndef SEQUENTIAL_MUSIC_ITER_HH
-#define SEQUENTIAL_MUSIC_ITER_HH
+#ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
+#define SEQUENTIAL_MUSIC_ITERATOR_HH
-#include "music-iterator.hh"
-#include "pcursor.hh"
+#include "music-list-iterator.hh"
/** Sequential_music iteration: walk each element in turn, and
construct an iterator for every element.
*/
-class Sequential_music_iterator : public Music_iterator
+class Sequential_music_iterator : public Music_list_iterator
{
public:
Sequential_music_iterator ();
- ~Sequential_music_iterator ();
+ virtual ~Sequential_music_iterator ();
virtual void construct_children ();
virtual Moment next_moment () const;
virtual bool ok () const;
protected:
- Sequential_music * sequential_music_l() const;
+ Sequential_music* sequential_music_l () const;
virtual void do_print() const;
virtual void do_process_and_next (Moment);
void set_Sequential_music_translator();
};
-#endif // SEQUENTIAL_MUSIC_ITER_HH
+#endif // SEQUENTIAL_MUSIC_ITERATOR_HH
--- /dev/null
+/*
+ simultaneous-music-iterator.hh -- declare Simultaneous_music_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SIMULTANEOUS_MUSIC_ITERATOR_HH
+#define SIMULTANEOUS_MUSIC_ITERATOR_HH
+
+#include "music-list-iterator.hh"
+
+class Simultaneous_music_iterator : public Music_list_iterator
+{
+public:
+ Simultaneous_music_iterator ();
+ virtual ~Simultaneous_music_iterator ();
+
+ virtual void construct_children ();
+ virtual Moment next_moment () const;
+ virtual bool ok () const;
+
+protected:
+ Simultaneous_music* simultaneous_music_l () const;
+
+ virtual void do_print () const;
+ virtual void do_process_and_next (Moment);
+
+private:
+ Pointer_list<Music_iterator*> children_p_list_;
+};
+
+#endif // SIMULTANEOUS_MUSIC_ITERATOR_HH
#include "main.hh"
#include "lily-guile.hh"
+SCM
+array_to_list (SCM *a , int l)
+{
+ SCM list = SCM_EOL;
+ for (int i= l; i--; )
+ {
+ list = gh_cons (a[i], list);
+ }
+ return list;
+}
+
Lookup::Lookup ()
{
a.dim_ = m.B_;
a.dim_[X_AXIS] *= 1 / 1000.0;
a.dim_[Y_AXIS] *= 1 / 1000.0;
- Array<Real> arr;
- arr.push (m.code ());
- a.lambda_ = (lambda_scm ("char", arr));
+
+
+ a.lambda_ = gh_list (ly_symbol ("char"),
+ gh_int2scm (m.code ()),
+ SCM_UNDEFINED);
a.str_ = "afm_find: " + s;
a.font_ = font_;
return a;
Atom
Lookup::bar (String str, Real h) const
{
- Array<Real> arr;
- arr.push (h);
+
Atom a = (*symtables_p_) ("bars")->lookup (str);
- a.lambda_ = (lambda_scm (a.str_, arr));
- a.str_ = "bar";
+
+
+ a.lambda_ = gh_list (ly_symbol (a.str_.ch_C()),
+ gh_double2scm (h),
+ SCM_UNDEFINED);
+
+
a.dim_.y () = Interval (-h/2, h/2);
a.font_ = font_;
return a;
Real min_y = (0 <? height) - thick/2;
Real max_y = (0 >? height) + thick/2;
- Array<Real> arr;
- arr.push (width);
- arr.push (slope);
- arr.push (thick);
-
Atom a;
- a.lambda_ = (lambda_scm ("beam", arr));
- a.str_ = "beam";
+ a.lambda_ = gh_list (ly_symbol ("beam"),
+ gh_double2scm (width),
+ gh_double2scm (slope),
+ gh_double2scm (thick),
+ SCM_UNDEFINED);
+
a.dim_[X_AXIS] = Interval (0, width);
a.dim_[Y_AXIS] = Interval (min_y, max_y);
return a;
SCM
offset2scm (Offset o)
{
- return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]), SCM_UNDEFINED);
+ return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]),
+ SCM_UNDEFINED);
}
Atom
sc[i] = offset2scm (controls[i]);
}
- // (lambda (o) (dashed-slur o thick dash '(stuff))
a.lambda_ =
- gh_append2 (ly_lambda_o (),
- gh_list (gh_append2 (ly_func_o ("dashed-slur"),
- gh_cons (gh_double2scm (thick),
- gh_cons (gh_double2scm (dash),
- gh_list (ly_quote_scm (gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED)), SCM_UNDEFINED)))), SCM_UNDEFINED));
+ gh_list (ly_symbol ("dashed-slur"),
+ gh_double2scm (thick),
+ gh_double2scm (dash),
+ ly_quote_scm (array_to_list (sc, 4)),
+ SCM_UNDEFINED);
a.str_ = "dashed_slur";
return a;
Lookup::extender (Real width) const
{
Atom a = (*symtables_p_) ("param")->lookup ("extender");
- Array<Real> arr;
- arr.push (width);
- a.lambda_ = (lambda_scm (a.str_, arr));
+ a.lambda_ = gh_list (ly_symbol (a.str_),
+ gh_double2scm (width),
+ SCM_UNDEFINED);
a.str_ = "extender";
a.font_ = font_;
return a;
Atom
Lookup::rule_symbol (Real height, Real width) const
{
- Atom a = (*symtables_p_) ("param")->lookup ("rule");
- Array<Real> arr;
- arr.push (height);
- arr.push (width);
- a.lambda_ = (lambda_scm (a.str_, arr));
- a.str_ = "rule_symbol";
+ Atom a;
+ a.lambda_ = gh_list (ly_symbol ("rulesym"),
+ gh_double2scm (height),
+ gh_double2scm (width),
+ SCM_UNDEFINED);
a.dim_.x () = Interval (0, width);
a.dim_.y () = Interval (0, height);
return a;
a.dim_.x () = Interval (0,0);
a.dim_.y () = Interval (y1,y2);
- Array<Real> arr;
-
Real stem_width = paper_l_->get_var ("stemthickness");
- arr.push (-stem_width /2);
- arr.push (stem_width);
- arr.push (y2);
- arr.push (-y1);
- a.lambda_ = (lambda_scm ("stem", arr));
- a.str_ = "stem";
+ a.lambda_ = gh_list (ly_symbol ("stem"),
+ gh_double2scm(-stem_width /2),
+ gh_double2scm(stem_width),
+ gh_double2scm(y2),
+ gh_double2scm(-y1),
+ SCM_UNDEFINED);
+
a.font_ = font_;
return a;
}
Atom
Lookup::text (String style, String text) const
{
- Array<Scalar> arr;
-
- arr.push (text);
Atom a = (*symtables_p_) ("style")->lookup (style);
- a.lambda_ = lambda_scm (a.str_, arr);
+
+ a.lambda_ = gh_list(ly_symbol (a.str_),
+ gh_str02scm (text.ch_C()),
+ SCM_UNDEFINED);
+
Real font_w = a.dim_.x ().length ();
Real font_h = a.dim_.y ().length ();
-// urg
-// if (!cmr_dict.length_i ())
if (!cmr_dict.elem_b ("roman"))
{
//brrrr
}
DOUT << "\n" << to_str (w) << "\n";
a.dim_.x () = Interval (0, w);
- a.str_ = "text";
a.font_ = font_;
return a;
}
Lookup::time_signature (Array<int> a) const
{
Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
- s.lambda_ = (lambda_scm (s.str_, a));
-
+ s.lambda_ = gh_list (ly_symbol (s.str_),
+ gh_int2scm (a[0]),
+ gh_int2scm (a[1]),
+ SCM_UNDEFINED);
return s;
}
-/*
- should be handled via Tex_ code and Lookup::bar ()
- */
Atom
Lookup::vbrace (Real &y) const
{
- Atom a = (*symtables_p_) ("param")->lookup ( "brace");
- Interval ydims = a.dim_[Y_AXIS];
- Real min_y = ydims[LEFT];
- Real max_y = ydims[RIGHT];
- Real step = 1.0 PT;
-
- if (y < min_y)
- {
- warning (_ ("piano brace")
- + " " + _ ("too small") + " (" + print_dimen (y) + ")");
- y = min_y;
- }
- if (y > max_y)
- {
- warning (_ ("piano brace")
- + " " + _ ("too big") + " (" + print_dimen (y) + ")");
- y = max_y;
- }
-
-
- int idx = int (rint ( (y- min_y)/step)) + 1;
-
- Array<Real> arr;
- arr.push (idx);
- a.lambda_ = (lambda_scm (a.str_, arr));
- a.str_ = "brace";
+ Atom a;
+ a.lambda_ = gh_list (ly_symbol ("pianobrace"),
+ gh_double2scm (y),
+ SCM_UNDEFINED
+ );
a.dim_[Y_AXIS] = Interval (-y/2,y/2);
a.font_ = font_;
return a;
{
Atom a;
Real height = paper_l_->staffheight_f () / 6;
- Array<Real> arr;
- arr.push (width);
- arr.push (height);
- arr.push (continued ? height/2 : 0);
+
String hairpin = String (decresc ? "de" : "") + "crescendo\n";
- a.lambda_ = (lambda_scm (hairpin, arr));
- a.str_ = "hairpin";
+ a.lambda_ = gh_list (ly_symbol (hairpin),
+ gh_double2scm (width),
+ gh_double2scm (height),
+ gh_double2scm (continued ? height/2 : 0.0),
+ SCM_UNDEFINED);
a.dim_.x () = Interval (0, width);
a.dim_.y () = Interval (-2*height, 2*height);
a.font_ = font_;
Atom
Lookup::plet (Real dy , Real dx, Direction dir) const
{
- Array<Real> arr;
- arr.push (dx);
- arr.push (dy);
- arr.push (dir);
Atom a;
- a.lambda_ = (lambda_scm ("tuplet", arr));
- a.str_ = "plet";
+ a.lambda_ = gh_list(ly_symbol ("tuplet"),
+ gh_double2scm (dx),
+ gh_double2scm (dy),
+ gh_int2scm (dir));
return a;
}
+
Atom
Lookup::slur (Array<Offset> controls) const
{
assert (controls.size () == 8);
-
Real dx = controls[3].x () - controls[0].x ();
Real dy = controls[3].y () - controls[0].y ();
Atom a;
scontrols[i] = offset2scm (controls[indices[i]]);
- a.lambda_ =
- gh_append2 (ly_lambda_o (),
- gh_list (gh_append2 (ly_func_o ("slur"),
- gh_list (ly_quote_scm (gh_list (scontrols[0],
- scontrols[1],
- scontrols[2],
- scontrols[3],
- scontrols[4],
- scontrols[5],
- scontrols[6],
- scontrols[7],
- SCM_UNDEFINED)),
- SCM_UNDEFINED)
- ),
- SCM_UNDEFINED)
- );
-
-
- a.str_ = "slur";
+ a.lambda_ =gh_list (ly_symbol ("slur"),
+ ly_quote_scm (array_to_list (scontrols, 8)),
+ SCM_UNDEFINED);
a.dim_[X_AXIS] = Interval (0, dx);
a.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
+ " " + _ ("too small") + " (" + print_dimen (y) + ")");
// y = min_y;
}
- Array<Real> arr;
- arr.push (y);
- a.lambda_ = (lambda_scm ("bracket", arr));
+
+ a.lambda_ = gh_list (ly_symbol ("bracket"),
+ gh_double2scm (y),
+ SCM_UNDEFINED);
a.str_ = "vbracket";
a.dim_[Y_AXIS] = Interval (-y/2,y/2);
a.dim_[X_AXIS] = Interval (0,4 PT);
Atom
Lookup::volta (Real w, bool last_b) const
{
- Array<Real> arr;
- arr.push (w);
- arr.push (last_b);
Atom a;
- a.lambda_ = (lambda_scm ("volta", arr));
+ a.lambda_ = gh_list (ly_symbol ("volta"),
+ gh_double2scm (w),
+ gh_int2scm (last_b),
+ SCM_UNDEFINED);
a.str_ = "volta";
+ Real interline_f = paper_l_->interline_f ();
+ a.dim_[Y_AXIS] = Interval (-interline_f / 2, interline_f / 2);
+ a.dim_[X_AXIS] = Interval (0, w);
return a;
}
source file of the GNU LilyPond music typesetter
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "lyric-engraver.hh"
#include "lookup.hh"
#include "paper-def.hh"
#include "main.hh"
+#include "dimensions.hh"
+
+ADD_THIS_TRANSLATOR(Lyric_engraver);
Lyric_engraver::Lyric_engraver()
{
- lreq_l_ =0;
- lyric_item_p_ =0;
}
bool
Lyric_engraver::do_try_music (Music*r)
{
- if (Lyric_req * lr = dynamic_cast <Lyric_req *> (r))
+ if (Lyric_req* l = dynamic_cast <Lyric_req *> (r))
{
- lreq_l_ = lr;
+ lyric_req_l_arr_.push (l);
return true;
}
return false;
void
Lyric_engraver::do_process_requests()
{
- if (lreq_l_)
+ if (text_p_arr_.size ())
+ return;
+
+ Scalar style = get_property ("textstyle");
+ Scalar alignment = get_property ("textalignment");
+ for (int i=0; i < lyric_req_l_arr_.size (); i++)
{
- Text_def *td_p = new Text_def;
- td_p->text_str_ = lreq_l_->text_str_;
- td_p->align_dir_ = LEFT;
- Scalar style = get_property ("textstyle");
+ Lyric_req* request_l = lyric_req_l_arr_[i];
+ Text_def* text_p = new Text_def;
+ text_p->text_str_ = request_l->text_str_;
+ text_p->align_dir_ = LEFT;
if (style.length_i ())
- {
- td_p->style_str_ = style;
- }
- Scalar alignment = get_property ("textalignment");
+ text_p->style_str_ = style;
if (alignment.isnum_b())
- {
- td_p->align_dir_= (Direction)(int)alignment;
- }
+ text_p->align_dir_= (Direction)(int)alignment;
- lyric_item_p_ = new Text_item (td_p);
-
- lyric_item_p_->dir_ = DOWN;
- lyric_item_p_->fat_b_ = true;
- announce_element (Score_element_info (lyric_item_p_, lreq_l_));
+ Text_item* item_p = new Text_item (text_p);
+ item_p->dir_ = DOWN;
+ item_p->fat_b_ = true;
+ // urg
+ // item_p->translate (Offset (0, (i - 1) * item_p->height ().length_i ()));
+// if (i && ((Text_def*)text_p_arr_[i - 1]->tdef_p_)->text_str_.length_i ())
+ // urg, when/how can one get the heigt of this thing?
+ item_p->translate (Offset (0, - i * 12 PT));
+ text_p_arr_.push (item_p);
+ announce_element (Score_element_info (item_p, request_l));
}
}
void
Lyric_engraver::do_post_move_processing()
{
- lreq_l_ =0;
}
void
Lyric_engraver::do_pre_move_processing()
{
- if (lyric_item_p_)
+ for (int i=0; i < text_p_arr_.size (); i++)
{
- typeset_element (lyric_item_p_);
- lyric_item_p_ =0;
+ typeset_element (text_p_arr_[i]);
}
+ text_p_arr_.clear ();
+ lyric_req_l_arr_.clear ();
}
-
-
-ADD_THIS_TRANSLATOR(Lyric_engraver);
#include "debug.hh"
#include "music-list.hh"
#include "music-iterator.hh"
-#include "sequential-music-iterator.hh"
#include "property-iterator.hh"
-#include "chord-iterator.hh"
#include "request-iterator.hh"
+#include "sequential-music-iterator.hh"
+#include "simultaneous-music-iterator.hh"
#include "translator-group.hh"
#include "translation-property.hh"
#include "change-iterator.hh"
--- /dev/null
+/*
+ Music_list-iterator.cc -- implement Music_list_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "music-list-iterator.hh"
+#include "music-list.hh"
+
+Music_list_iterator::Music_list_iterator ()
+{
+}
+
+Music_list_iterator::~Music_list_iterator ()
+{
+}
+
+void
+Music_list_iterator::construct_children ()
+{
+}
+
+void
+Music_list_iterator::do_print() const
+{
+}
+
+void
+Music_list_iterator::do_process_and_next (Moment)
+{
+}
+
+Music_list*
+Music_list_iterator::music_list_l () const
+{
+ return (Music_list *) music_l_;
+}
+
+Moment
+Music_list_iterator::next_moment () const
+{
+ return 0;
+}
+
+bool
+Music_list_iterator::ok () const
+{
+ return false;
+}
+
Music_list* m = new Music_list;
$$ = new Sequential_music (m);
}
- | ALTERNATIVE '{' Music_list '}' {
- $$ = new Sequential_music ($3);
+ | ALTERNATIVE Simultaneous_music {
+ $$ = $2;
+ }
+ | ALTERNATIVE Sequential_music {
+ $$ = $2;
}
;
Repeated_music: REPEAT unsigned '{' Music '}' Alternative_music {
// s/r conflicts -> '{' '}'
- Sequential_music* s = (Sequential_music*)$6;
- $$ = new Repeated_music ($4, $2, s);
+ Music_sequence* m = dynamic_cast <Music_sequence*> ($6);
+ assert (m);
+ $$ = new Repeated_music ($4, $2, m);
}
;
{
if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
{
- repeated_music_arr_.push (r);
- stop_mom_arr_.push (now_moment () + r->repeat_p_->duration ()
- + r->alternative_p_->music_p_list_p_->top ()->duration ());
+ Moment stop_mom = now_moment () + r->repeat_p_->duration ()
+ + r->alternative_p_->music_p_list_p_->top ()->duration ();
Moment alt_mom = now_moment () + r->repeat_p_->duration ();
+ /*
+ TODO:
+ figure out what we don't want.
+
+ we don't want to print more than one set of
+ |: :| and volta brackets on one staff.
+
+ counting nested repeats, it seems safest to forbid
+ two pieces of alternative music to start at the same time.
+ */
+ for (int i = 0; i < alternative_start_mom_arr_.size (); i++)
+ if (alternative_start_mom_arr_[i] == alt_mom)
+ return false;
+ repeated_music_arr_.push (r);
+ stop_mom_arr_.push (stop_mom);
for (PCursor<Music*> i (r->alternative_p_->music_p_list_p_->top ()); i.ok (); i++)
{
alternative_music_arr_.push (i.ptr ());
Repeated_music_iterator *urg = (Repeated_music_iterator*)this;
delete urg->repeat_iter_p_;
urg->repeat_iter_p_ = 0;
- urg->alternative_iter_p_ = dynamic_cast<Sequential_music_iterator*>
- (get_iterator_p (repeated_music_l ()->alternative_p_));
+ urg->alternative_iter_p_ = dynamic_cast<Music_list_iterator*>
+ (get_iterator_p ((Music*)repeated_music_l ()->alternative_p_));
}
}
if (alternative_iter_p_)
--- /dev/null
+/*
+ Simultaneous_music-iterator.cc -- implement Simultaneous_music_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "translator-group.hh"
+#include "debug.hh"
+#include "simultaneous-music-iterator.hh"
+
+#include "music-list.hh"
+
+Simultaneous_music_iterator::Simultaneous_music_iterator ()
+{
+}
+
+Simultaneous_music_iterator::~Simultaneous_music_iterator ()
+{
+}
+
+void
+Simultaneous_music_iterator::construct_children()
+{
+ int j = 0;
+ for (PCursor<Music*> i (simultaneous_music_l ()->music_p_list_p_->top());
+ i.ok(); j++, i++)
+ {
+ Music_iterator * mi = get_iterator_p (i.ptr());
+ if (mi->ok())
+ {
+ if (simultaneous_music_l ()->translator_type_str_.empty_b ())
+ set_translator (mi->report_to_l()->ancestor_l (0));
+ children_p_list_.bottom().add (mi);
+ }
+ else
+ delete mi;
+ }
+}
+
+
+void
+Simultaneous_music_iterator::do_print() const
+{
+#ifndef NPRINT
+ for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok (); i++)
+ {
+ i->print();
+ }
+#endif
+}
+
+void
+Simultaneous_music_iterator::do_process_and_next (Moment until)
+{
+ for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok ();)
+ {
+ if (i->next_moment() == until)
+ {
+ i->process_and_next (until);
+ }
+ if (!i->ok())
+ delete i.remove_p();
+ else
+ i++;
+ }
+ Music_iterator::do_process_and_next (until);
+}
+
+
+
+
+Moment
+Simultaneous_music_iterator::next_moment() const
+{
+ Moment next;
+ next.set_infinite (1);
+ for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok (); i++)
+ next = next <? i->next_moment() ;
+ return next;
+}
+
+
+
+bool
+Simultaneous_music_iterator::ok() const
+{
+ return children_p_list_.size();
+}
+
+Simultaneous_music*
+Simultaneous_music_iterator::simultaneous_music_l ()const
+{
+ return ( Simultaneous_music *) music_l_;
+}
a.translate_axis (-(align_dir_ + 1)* guess_width_f (a) / 2, X_AXIS);
// urg 1/1 is too much; see input/test/vertical-text.ly
- a.translate_axis (a.dim_.y ().length () * 9 / 10, Y_AXIS);
+// a.translate_axis (a.dim_.y ().length () * 9 / 10, Y_AXIS);
+ // fine for one lyric, urg for lyric chord
+ a.translate_axis (a.dim_.y ().length () * 2 / 5, Y_AXIS);
return a;
}
if (dir_<0) // should do something better anyway.
mol_p->translate_axis (mol_p->extent ().y ().left , Y_AXIS);
mol_p->translate_axis (coordinate_offset_f_, Y_AXIS);
+ // fine for one lyric, urg for lyric chord
+ mol_p->translate_axis (a.dim_.y ().length (), Y_AXIS);
return mol_p;
}
enddef;
-for h := 2 staffsize# step 1 pt# until (6 * staffsize#):
+for h := 2 staffsize# step 1 pt# until (7 * staffsize#):
draw_brace(h, interline# );
endfor
AC_CHECK_LIB(guile, scm_boot_guile)\
)
if test "$ac_cv_lib_guile_scm_shell" != yes -a \
- "$ac_cv_lib_scm_boot_guile" != yes ; then
+ "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
fi
])
import sys
import os
+import time
from string import *
import getopt
import __main__
banner_file = ''
news_file=''
news =''
+footer = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
+of %s<!%s%s>\n'
+builtstr = '\n<hr><font size=-1>\n\
+This page was built from %s-%s by\
+<address><br>%s <<a href=mailto:%s>%s</a>>, at %s.</address><p></font>'
+
(options, files) = getopt.getopt(sys.argv[1:], 'hp:', ['help', 'news=', 'index=', 'package='])
def help ():
package = Package (topdir)
packager = Packager ()
+if package.NAME == 'LILYPOND':
+ package.Name = 'GNU LilyPond'
+
def set_vars():
os.environ["CONFIGSUFFIX"] = 'www';
if os.name == 'nt':
set_vars ()
-backstr = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
-of ' + package.Name + '\n'
-builtstr = '\n<hr><font size=-1>\n\
-This page was built from ' + package.name + '-%s by <p>\n\
-<address><br>%s <<a href=mailto:%s>%s</a>></address>\n\
-<p></font>'
-
def footstr(index):
- s = backstr % index
- s = s + builtstr % (version_tuple_to_str (package.version), fullname,
- packager.mail, packager.mail)
+ try:
+ footer = gulp_file (package.topdir + '/Documentation/footer.html.in')
+ except:
+ pass
+ s = footer % (index, package.Name, packager.webmaster, packager.webmaster)
+ s = s + builtstr % (package.Name,
+ version_tuple_to_str (package.version), fullname,
+ packager.mail, packager.mail,
+ time.strftime ('%c %Z', time.localtime (time.time ())))
return s
banner = footstr (index_file)
except KeyError:
m= '(address unknown)'
self.mail= m
+ try:
+ m= os.environ['WEBMASTER']
+ except KeyError:
+ m= self.mail
+ self.webmaster= m
def full_version_tup(tup):
\font\bracefontsixteen = feta-braces16
\font\fingerfontsixteen = feta-nummer4
\font\markfontsixteen = feta-nummer10
- \font\fetanummerjsixteen = feta-nummer6
+ \font\fetanummerjsixteen = feta-nummer5
\def\currentsize{sixteen}
}