From 93b77aa12dbd429c50555d9ed8888220c7999fcf Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:53:28 +0000 Subject: [PATCH] lilypond-0.1.7 --- Documentation/mudela-course.doc | 3 ++- Documentation/mudela-man.doc | 17 +++++++++-------- lily/gourlay-breaking.cc | 6 +++++- lily/include/command-request.hh | 29 ++++++++++++++++++++++++----- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/Documentation/mudela-course.doc b/Documentation/mudela-course.doc index a918c5df2e..369cfc745c 100644 --- a/Documentation/mudela-course.doc +++ b/Documentation/mudela-course.doc @@ -41,7 +41,8 @@ chords by \verb+<+ and \verb+>+. \begin[verbatim]{mudela} \score { \melodic { % {...} is a voice - c'4 g'4 % c and g are pitches, 4 is the duration (quaver) + c'4 g'4 % c and g are pitches, 4 is the duration + % (crotchet/quarter note) c''4 ''c4 % c' is 1 octave up, 'c 1 down. % <...> is a chord } diff --git a/Documentation/mudela-man.doc b/Documentation/mudela-man.doc index 8e3d0de2ea..a4cb803430 100644 --- a/Documentation/mudela-man.doc +++ b/Documentation/mudela-man.doc @@ -24,7 +24,8 @@ effective language for defining music. We call this language (rather arrogantly) The Musical Definition Language or Mudela, for short.\footnote{If anybody comes up with a better name, we'd gladly take this. Gourlay already uses Musical Description Language, - G-Sharp Score Definition Language. We're not being original here} + G-Sharp Score Definition Language. ISO standard 10743 defines a + Standard Music Description Language. We're not being original here} The first aim of Mudela is to define a piece of music, being complete from both from a musical typesetting, as from a musical performing @@ -218,10 +219,10 @@ meaning of \verb+_+ and the resolution of words You enter a note by giving the name and the reciprocal of the duration: \begin[fragment,verbatim]{mudela} -a'4 % dutch names +a'4 % Dutch names \end{mudela} -is a A-1 pitched quaver. The ' signifies an octave change. A-1 is 440 +is a A-1 pitched crotchet. The ' signifies an octave change. A-1 is 440 Hz concert-pitch. \verb+c'+ is also known as the central c. More examples: \begin[fragment,verbatim]{mudela} @@ -235,11 +236,11 @@ a'' % 880 The last one is an A flat, (just below 110 Hz concert-pitch). The \verb+*2/3+ signifies that this note is part of a triplet (3 in stead of 2). The -duration is one and a half quaver (\verb+4.+) times 2/3. +duration is one and a half quarter note (\verb+4.+) times 2/3. Notenames are just a special kind of identifiers, and can be declared for any language appropriate (see \file{init/dutch.ly}). The default language -for notenames is defined to be dutch. In dutch, the notenames are +for notenames is defined to be Dutch. In Dutch, the notenames are a,b,c,d,e,f and g. Sharps are formed by adding the extension "is", flats by adding ``es'' @@ -334,7 +335,7 @@ a4 \dynamic { 0 } % 0 = fff, 7 = ppp Mudela defines the following dynamic identifiers: \begin{verbatim} -ppp pp p mp mf df ff fff % df iso f, f is a notename. +ppp pp p mp mf f ff fff \end{verbatim} and the following abbreviations: \begin{verbatim} @@ -492,7 +493,7 @@ You can set the voicegroup of a voice with the command \verb+\group+, e.g., In this example, the two oboe voices share one staff and are initially in the voicegroup called "oboes". They will share beams, dynamics etc. -After two quavers, oboeI "pushes" its group: a new voicegroup is +After two quarter notes, oboeI "pushes" its group: a new voicegroup is created, called "oboes+solo". The \verb+\group "-"+ command makes the voice enter "oboes" again. @@ -547,7 +548,7 @@ same syntax as grouping: \end{verbatim} Make the piece start with a partial measure [english translation?] -lasting 1 3/4 quaver. +lasting 1 3/4 quarter notes. These commands are also "voice elements", and constitute simple mudela (consisting of stuff with duration 0). diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 03f6d3cd7c..6a0d2376a4 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -145,14 +145,18 @@ Gourlay_breaking::do_solve()const Array final_breaks; + Array lines; /* skip 0-th element, since it is a "dummy" elt*/ for (int i = optimal_paths.size()-1; i> 0; ) { final_breaks.push ( i ); assert ( i > optimal_paths[i].prev_break_i_); + + // there was no "feasible path" + if (!optimal_paths[i].line_config_.config.size() ) + return lines; i = optimal_paths[i].prev_break_i_; } - Array lines; for (int i= final_breaks.size(); i--; ) lines.push ( optimal_paths[final_breaks[i]].line_config_ ); diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 11a1e44bdf..5d173ca9f9 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -1,5 +1,5 @@ /* - command-request.hh -- declare Non musical requests + command-request.hh -- declare non-musical requests source file of the GNU LilyPond music typesetter @@ -12,6 +12,7 @@ #include "request.hh" #include "varray.hh" +#include "duration.hh" /** Request which are assumed to be "happening" before the musical requests. */ @@ -34,6 +35,8 @@ public: class Command_script_req : public Command_req, public Script_req { public: + // huh? + Command_script_req(); REQUESTMETHODS(Command_script_req, commandscript); }; @@ -49,15 +52,29 @@ public: class Timing_req : public Command_req { public: REQUESTMETHODS(Timing_req, timing); + virtual Tempo_req * tempo(){return 0; } + Tempo_req(); }; +class Tempo_req : public Timing_req +{ +public: + Duration dur_; + int metronome_i_; + + Tempo_req(); + REQUESTMETHODS(Tempo_req, tempo); + bool do_equal_b(Request *)const; +}; + class Partial_measure_req : public Timing_req { public: Moment duration_; Partial_measure_req(Moment); REQUESTMETHODS(Partial_measure_req, partial); + bool do_equal_b(Request*)const; }; /** @@ -67,9 +84,9 @@ class Meter_change_req : public Timing_req { public: int beats_i_, one_beat_i_; - int compare(Meter_change_req const&); Meter_change_req(); void set(int,int); + bool do_equal_b(Request*)const; REQUESTMETHODS(Meter_change_req, meterchange); }; @@ -78,6 +95,7 @@ class Cadenza_req : public Timing_req { public: /// turn on? bool on_b_; + bool do_equal_b(Request*)const; Cadenza_req(bool); REQUESTMETHODS(Cadenza_req,cadenza); }; @@ -85,7 +103,7 @@ public: /// check if we're at start of a measure. class Barcheck_req : public Timing_req { public: - + bool do_equal_b(Request *)const; REQUESTMETHODS(Barcheck_req,barcheck); }; @@ -93,7 +111,7 @@ class Measure_grouping_req : public Timing_req { public: Array beat_i_arr_; Array elt_length_arr_; - + bool do_equal_b(Request *)const; REQUESTMETHODS(Measure_grouping_req, measuregrouping); }; @@ -103,7 +121,8 @@ class Bar_req : public Command_req { public: String type_str_; Bar_req(String); - int compare(const Bar_req&)const; + bool do_equal_b(Request*)const; + REQUESTMETHODS(Bar_req,bar); }; -- 2.39.5