Hi,
Here comes my old favourite patch in a new version for
1.1.1, hope it makes into the release this time.
I had to fix a minor type in midi-walker.cc in order to be
able to compile.
I encountered a couple of problems:
- When running configure, I get the warning:
Using local stepmake: ${prefix}/share/stepmake not found
- Strangely enough, the original 1.1.1 version of input/test/time.fly
doesn't work. I had to remove some '|' in order to make Lilypond
understand all the \time commands.
- I sometimes get an error I can't track down. If I for example
uncomment the commented lines in time.fly, I get the error:
Line ... [0guile: Wrong type to apply: #<unknown-type (0x7f . 0x4026a148) @ 0x4026a150>
Similarly for input/test/keys.fly:
Line ... [0guile: Wrong type to apply: #<unknown-type (0x7f . 0x401f3dd8) @ 0x401f3de0>
Again it helps to uncomment one or two lines.
- There are still some parts missing in the symbol lookup,
e.g. brackets, double bars a.s.o.
/Mats
-------------------------
Generated by (address unknown) using package-diff 0.62,
>From = lilypond-1.1.1, To = lilypond-1.1.1.mb1
usage
cd lilypond-source-dir; patch -E -p1 < lilypond-1.1.1.mb1.diff
Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
and possibly make outdirs.
--state
1.1.1
1.1.1.mb1
++state
diff -urN ../lilypond-1.1.1/Documentation/tex/refman.yo ./Documentation/tex/refman.yo
--- ../lilypond-1.1.1/Documentation/tex/refman.yo Tue Oct 13 16:05:24 1998
+++ ./Documentation/tex/refman.yo Tue Nov 3 00:08:06 1998
@@ -347,7 +347,7 @@
subsect(Basic Note Specification)
A note specification has the form
-var(pitch)[var(octavespec)][code(!)][var(duration)].
+var(pitch)[var(octavespec)][code(!)][code(?)][var(duration)].
The pitch of the note is specified by the note's name.
LilyPond has predefined note names for various languages. The default
@@ -395,9 +395,11 @@
context.
A reminder accidental can be forced by
using the optional exclamation mark `code(!)'
-on a pitch.
+on the pitch.
+A cautionary accidental, i.e., an accidental within paranthesis
+can be obtained using the optional question mark `code(?)' on the pitch.
mudela(fragment,verbatim,center)(
-cis' d' e' cis' c'! d' e' c'
+cis' d' e' cis' c'? d' e' c'!
)
@@ -951,8 +953,14 @@
file(.ly) extension must be given, and the filename must be quoted.
(An unquoted string will not work here.)
-dit(code(\key) var(pitch)code(;)) Change key signature to that of
-var(pitch)-major.
+dit(code(\key) var(pitch) var(type) code(;)) Change the key signature.
+var(type) should be code(\major) or code(\minor) to get
+var(pitch)-major or var(pitch)-minor, respectively. The second
+argument is optional, the default is major keys.
+The var(\type) argument can also be given as an integer, which tells
+the number of semitones that should be added to the pitch given in the
+subsequent code(\key) commands to get the corresponding major key,
+e.g. code(\minor) is defined as 3.
dit(code(\keysignature) var(pitchseq)code(;))
Specify an arbitrary key signature. The pitches from var(pitch) will
@@ -1295,9 +1303,6 @@
dit(code(defaultBarType)) Sets the default type of bar line. See
code(\bar) keyword.
-
-
-
dit(code(keyoctaviation)) If set to 1, then keys are the same in all
octaves. If set to 0 then the key signature for different octaves can
be different and is specified independently: code(\keysignature bes
@@ -1323,16 +1328,16 @@
dit(code(timeSignatureStyle)) Changes the default two-digit layout
for time signatures. The following values are recognized:
description(
- dit(code(C)): 4/4 and 2/2 are typeset as C and struck C,
+ dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
respectively. All other time signatures are written with two digits.
- dit(code(old)): 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
+ dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
old-style mensuration marks. All other time signatures are
written with two digits.
- dit(code(1)): All time signatures are typeset with a single
+ dit(code(1)) All time signatures are typeset with a single
digit, e.g. 3/2 is written as 3.
dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
code(old3/4), code(old4/4), code(old6/4) or
- code(old9/4)): Tells Lilypond to use a specific symbol as time
+ code(old9/4)) Tells Lilypond to use a specific symbol as time
signature.
)
The different time signature characters are shown below with
@@ -1439,6 +1444,10 @@
dit(code(\infinity)) Used for setting the Score.beamslopedamping
property. Is actually equal to 10000.
dit(code(\left)) Used for setting textalignment property. Is equal to -1.
+dit(code(\major)) Used as the second argument of the code(\key)
+command to get a major key.
+dit(code(\minor)) Used as the second argument of the code(\key)
+command to get a minor key.
dit(code(\mf)) Print mezzoforte symbol on preceeding note.
dit(code(\mp)) Print mezzopiano symbol on preceeding note.
dit(code(\nobreak)) Prevent a line break in music by using a large
diff -urN ../lilypond-1.1.1/Documentation/tex/tutorial.yo
./Documentation/tex/tutorial.yo
--- ../lilypond-1.1.1/Documentation/tex/tutorial.yo Mon Oct 12 14:10:54 1998
+++ ./Documentation/tex/tutorial.yo Tue Nov 3 00:08:06 1998
@@ -696,10 +696,12 @@
\clef "treble"; c'4
\clef "alto"; c'4
)
-dit(code(\key) var(pitch)) This command changes the current key signature. The
- key signature is printed at the start of every line. The argument
- is the name of the corresponding major key. The key of C-minor can
- thus be specified as `code(\key es)'.
+dit(code(\key) var(pitch) var(type)) This command changes the current
+ key signature. The key signature is printed at the start of every
+ line. The var(type) argument is set to code(\major) or code(\minor)
+ to get major or minor keys, respectively. Omitting the second
+ argument gives major keys. The key of C-minor can thus be specified
+ as `code(\key es)' or `code(\key \c minor)'.
dit(code(\keysignature) var(pitchlist))
diff -urN ../lilypond-1.1.1/NEWS ./NEWS
--- ../lilypond-1.1.1/NEWS Mon Nov 2 16:25:15 1998
+++ ./NEWS Tue Nov 3 00:09:44 1998
@@ -1,3 +1,13 @@
+pl 1.mb1
+ - Support for cautionary accidentals. , i.e. accidentals
+ within parantheses. Syntax: 'cis?'. Try input/test/accid.fly
+ Note that the font has changed.
+ - bf: No unnecessary warnings about time signatures
+ - Added optional second argument of \key. Set to \major or \minor
+ to get a major or minor key. Default: major.
+ - bf: Compilation error in midi-walker.cc
+
+
pl 0.uu5
- fixed MIDI output.
diff -urN ../lilypond-1.1.1/TODO ./TODO
--- ../lilypond-1.1.1/TODO Mon Nov 2 12:31:22 1998
+++ ./TODO Tue Nov 3 00:08:06 1998
@@ -269,8 +269,6 @@
* integrate midi-elts from mi2mu and lily?
- * cautionary accidental
-
* score-bar-scripts
FMR: Free memory read:
* This is occurring while in:
@@ -487,7 +485,6 @@
* Keys:
- merge key{item} & localkey{item}?
- - Major/Minor
- spacing, national styles?
* Support for TAB
diff -urN ../lilypond-1.1.1/VERSION ./VERSION
--- ../lilypond-1.1.1/VERSION Mon Nov 2 17:22:06 1998
+++ ./VERSION Tue Nov 3 00:51:32 1998
@@ -2,7 +2,7 @@
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=1
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=mb1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
diff -urN ../lilypond-1.1.1/init/declarations.ly ./init/declarations.ly
--- ../lilypond-1.1.1/init/declarations.ly Fri Oct 23 14:23:13 1998
+++ ./init/declarations.ly Tue Nov 3 00:08:06 1998
@@ -33,6 +33,9 @@
break = { \penalty = 10000; }
nobreak = { \penalty = -10000; }
+major = 0
+minor = 3
+
\include "property.ly"
\include "scm.ly"
diff -urN ../lilypond-1.1.1/input/test/accid.fly ./input/test/accid.fly
--- ../lilypond-1.1.1/input/test/accid.fly Thu Jan 1 01:00:00 1970
+++ ./input/test/accid.fly Tue Nov 3 00:08:06 1998
@@ -0,0 +1,6 @@
+\time 3/4;
+cisis'' cisis! cisis? |
+cis cis! cis? |
+c c! c? |
+ces ces! ces? |
+ceses ceses! ceses? |
diff -urN ../lilypond-1.1.1/input/test/keys.ly ./input/test/keys.ly
--- ../lilypond-1.1.1/input/test/keys.ly Mon Oct 12 14:10:54 1998
+++ ./input/test/keys.ly Tue Nov 3 00:08:06 1998
@@ -6,8 +6,8 @@
\score {
\notes
{
- \key bes; c1 \key c; c1
+ \key bes; c1 \key c \minor; c1
\break
- \key bes; c1 \key d;\break c1
+ \key bes \major; c1 \key d;\break c1
}
}
diff -urN ../lilypond-1.1.1/input/test/time.fly ./input/test/time.fly
--- ../lilypond-1.1.1/input/test/time.fly Mon Oct 5 12:22:05 1998
+++ ./input/test/time.fly Tue Nov 3 00:50:36 1998
@@ -1,111 +1,113 @@
\property Staff.timeSignatureStyle = "C"
\time 1/1;
-c''1^"timeSignatureStyle = \"C\"" |
-\time 2/2;
-c1 |
-\time 3/4;
-c2. |
-\time 4/4;
-c1 |
-\time 5/4;
-c2. c2 |
-\time 6/4;
-c1. |
-\time 3/2;
-c1. |
-\time 7/4;
-c1 c2. |
-\time 8/4;
-c\breve |
-\time 9/4;
-c2. c2. c2. |
+c''1^"timeSignatureStyle = \"C\""
+\time 2/2;
+c1
+\time 3/4;
+c2.
+\time 4/4;
+c1
+\time 5/4;
+c2. c2
+\time 6/4;
+c1.
+\time 3/2;
+c1.
+\time 7/4;
+c1 c2.
+\time 8/4;
+c\breve
+\time 9/4;
+c2. c2. c2.
\break
\property Staff.timeSignatureStyle = "old"
-\time 1/1;
-c1^"timeSignatureStyle = \"old\"" |
-\time 2/2;
-c1 |
-\time 3/4;
-c2. |
-\time 4/4;
-c1 |
-\time 5/4;
-c2. c2 |
-\time 6/4;
-c1. |
-\time 3/2;
-c1. |
-\time 7/4;
-c1 c2. |
-\time 8/4;
-c\breve |
-\time 9/4;
-c2. c2. c2. |
+\time 1/1;
+c1^"timeSignatureStyle = \"old\""
+\time 2/2;
+c1
+\time 3/4;
+c2.
+\time 4/4;
+c1
+\time 5/4;
+c2. c2
+\time 6/4;
+c1.
+\time 3/2;
+c1.
+\time 7/4;
+c1 c2.
+\time 8/4;
+c\breve
+\time 9/4;
+c2. c2. c2.
\break
\property Staff.timeSignatureStyle = ""
-\time 1/1;
-c1^"timeSignatureStyle = \"\"" |
-\time 2/2;
-c1 |
-\time 3/4;
-c2. |
-\time 4/4;
-c1 |
-\time 5/4;
-c2. c2 |
-\time 6/4;
-c1. |
-\time 3/2;
-c1. |
-\time 7/4;
-c1 c2. |
-\time 8/4;
-c\breve |
-\time 9/4;
-c2. c2. c2. |
+\time 1/1;
+c1^"timeSignatureStyle = \"\""
+\time 2/2;
+c1
+\time 3/4;
+c2.
+\time 4/4;
+c1
+\time 5/4;
+c2. c2
+\time 6/4;
+c1.
+\time 3/2;
+c1.
+\time 7/4;
+c1 c2.
+\time 8/4;
+c\breve
+\time 9/4;
+c2. c2. c2.
\break
\property Staff.timeSignatureStyle = "1"
-\time 1/1;
-c1^"timeSignatureStyle = \"1\"" |
-\time 2/2;
-c1 |
-\time 3/4;
-c2. |
-\time 4/4;
-c1 |
-\time 5/4;
-c2. c2 |
-\time 6/4;
-c1. |
-\time 3/2;
-c1. |
-\time 7/4;
-c1 c2. |
-\time 8/4;
-c\breve |
-\time 9/4;
-c2. c2. c2. |
+\time 1/1;
+c1^"timeSignatureStyle = \"1\""
+\time 2/2;
+c1
+\time 3/4;
+c2.
+%{ % Error if these lines are uncommented:
+ % Line ... [0guile: Wrong type to apply: #<unknown-type (0x7f . 0x4026a148) @
+0x4026a150>
+\time 4/4;
+c1
+%}
+\time 5/4;
+c2. c2
+\time 6/4;
+c1.
+\time 3/2;
+c1.
+\time 7/4;
+c1 c2.
+\time 8/4;
+c\breve
+\time 9/4;
+c2. c2. c2.
\break
\property Staff.timeSignatureStyle = "old9/4"
\property Staff.textalignment = \center
-\time 1/1;
-c1^"old9/4" |
-\property Staff.timeSignatureStyle = "old6/4"
-\time 2/2;
-c1^"old6/4" |
+\time 1/1;
+c1^"old9/4"
+\property Staff.timeSignatureStyle = "old6/4"
+\time 2/2;
+c1^"old6/4"
\property Staff.timeSignatureStyle = "old3/2"
-\time 3/4;
-c2.^"old3/2" |
+\time 3/4;
+c2.^"old3/2"
\property Staff.timeSignatureStyle = "old4/4"
-\time 4/4;
-c1^"old4/4" |
+\time 4/4;
+c1^"old4/4"
\property Staff.timeSignatureStyle = "old2/2"
-\time 5/4;
-c2.^"old2/2" c2 |
+\time 5/4;
+c2.^"old2/2" c2
\property Staff.timeSignatureStyle = "C4/4"
-\time 6/4;
-c1.^"C4/4" |
+\time 6/4;
+c1.^"C4/4"
\property Staff.timeSignatureStyle = "C2/2"
-\time 3/2;
-c1.^"C2/2" |
-
+\time 3/2;
+c1.^"C2/2"
diff -urN ../lilypond-1.1.1/lily/command-request.cc ./lily/command-request.cc
--- ../lilypond-1.1.1/lily/command-request.cc Mon Nov 2 17:17:37 1998
+++ ./lily/command-request.cc Tue Nov 3 00:08:06 1998
@@ -322,7 +322,7 @@
Key_change_req::Key_change_req()
{
- minor_b_ = false;
+ modality_i_ = 0;
ordinary_key_b_= false;
}
@@ -366,7 +366,7 @@
bool
Key_change_req::minor_b() const
{
- return minor_b_;
+ return modality_i_ == 3;
}
int
diff -urN ../lilypond-1.1.1/lily/include/command-request.hh
./lily/include/command-request.hh
--- ../lilypond-1.1.1/lily/include/command-request.hh Fri Oct 23 16:57:47 1998
+++ ./lily/include/command-request.hh Tue Nov 3 00:08:06 1998
@@ -132,7 +132,7 @@
class Key_change_req : public Command_req {
public:
Array<Musical_pitch> pitch_arr_;
- bool minor_b_;
+ int modality_i_;
bool ordinary_key_b_;
Key_change_req();
@@ -147,7 +147,6 @@
int sharps_i();
void transpose (Musical_pitch d);
- /// is minor key?
bool minor_b() const;
};
diff -urN ../lilypond-1.1.1/lily/include/lily-guile.hh ./lily/include/lily-guile.hh
--- ../lilypond-1.1.1/lily/include/lily-guile.hh Mon Nov 2 12:03:52 1998
+++ ./lily/include/lily-guile.hh Tue Nov 3 00:20:35 1998
@@ -37,6 +37,7 @@
#include "array.hh"
#include "scalar.hh"
+SCM lambda_scm (String str, Array<int> args_arr);
SCM lambda_scm (String str, Array<Real> args_arr);
SCM lambda_scm (String str, Array<Scalar> args_arr);
diff -urN ../lilypond-1.1.1/lily/include/lookup.hh ./lily/include/lookup.hh
--- ../lilypond-1.1.1/lily/include/lookup.hh Fri Oct 23 17:51:28 1998
+++ ./lily/include/lookup.hh Tue Nov 3 00:15:20 1998
@@ -11,6 +11,7 @@
#define LOOKUP_HH
#include "atom.hh"
+#include "molecule.hh"
#include "fproto.hh"
#include "scalar.hh"
#include "direction.hh"
@@ -29,9 +30,9 @@
Lookup (Symtables const&);
~Lookup ();
- Atom accidental (int) const;
+ Molecule accidental (int, bool cautionary) const;
void add (String, Symtable*);
- Atom afm_find (String) const;
+ Atom afm_find (String, bool warn=true) const;
Atom ball (int) const;
Atom bar (String, Real height) const;
Atom beam (Real, Real, Real) const;
@@ -53,8 +54,8 @@
Atom text (String style, String text) const;
Atom vbrace (Real &dy) const;
Atom vbracket (Real &dy) const;
- Atom special_time_signature (String, Array<Real>) const;
- Atom time_signature (Array<Real>) const;
+ Atom special_time_signature (String, Array<int>) const;
+ Atom time_signature (Array<int>) const;
Paper_def * paper_l_;
Symtables *symtables_p_;
diff -urN ../lilypond-1.1.1/lily/include/musical-pitch.hh
./lily/include/musical-pitch.hh
--- ../lilypond-1.1.1/lily/include/musical-pitch.hh Tue Sep 15 19:22:42 1998
+++ ./lily/include/musical-pitch.hh Tue Nov 3 00:08:06 1998
@@ -29,6 +29,8 @@
int octave_i_;
/// 0 natural, 1 sharp, etc
int accidental_i_;
+ /// Used for cautionary accidentals
+ bool cautionary_b_;
void init () ;
Musical_pitch to_relative_octave (Musical_pitch);
diff -urN ../lilypond-1.1.1/lily/include/musical-request.hh
./lily/include/musical-request.hh
--- ../lilypond-1.1.1/lily/include/musical-request.hh Fri Oct 23 17:16:52 1998
+++ ./lily/include/musical-request.hh Tue Nov 3 00:08:06 1998
@@ -110,6 +110,8 @@
/// force/supress printing of accidental.
bool forceacc_b_;
+ /// Cautionary, i.e. parenthesized accidental.
+ bool cautionary_b_;
Note_req();
bool do_equal_b (Request*) const;
REQUESTMETHODS(Note_req);
diff -urN ../lilypond-1.1.1/lily/include/time-signature.hh
./lily/include/time-signature.hh
--- ../lilypond-1.1.1/lily/include/time-signature.hh Fri Oct 23 17:51:28 1998
+++ ./lily/include/time-signature.hh Mon Nov 2 23:58:38 1998
@@ -26,7 +26,7 @@
virtual Molecule*brew_molecule_p() const;
public:
Time_signature () ;
- Array<Real> args_;
+ Array<int> args_;
String time_sig_type_str_;
DECLARE_MY_RUNTIME_TYPEINFO;
diff -urN ../lilypond-1.1.1/lily/key-engraver.cc ./lily/key-engraver.cc
--- ../lilypond-1.1.1/lily/key-engraver.cc Mon Nov 2 12:02:05 1998
+++ ./lily/key-engraver.cc Tue Nov 3 00:08:06 1998
@@ -114,8 +114,7 @@
else
{
p = r->pitch_arr_[0].semitone_pitch ();
- if (r->minor_b ())
- p += 3;
+ p += r->modality_i_;
}
/* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */
int no_of_acc = (7*p) % 12;
diff -urN ../lilypond-1.1.1/lily/key-item.cc ./lily/key-item.cc
--- ../lilypond-1.1.1/lily/key-item.cc Mon Oct 19 12:09:05 1998
+++ ./lily/key-item.cc Tue Nov 3 00:08:06 1998
@@ -133,9 +133,8 @@
|| (old_pitch_arr_[i] == pitch_arr_[j]
&& old_acc_arr_[i] != acc_arr_[j]))
{
- Atom a =lookup_l ()->accidental (0);
- a.translate_axis (calculate_position(old_pitch_arr_[i],
old_acc_arr_[i]) * inter, Y_AXIS);
- Molecule m (a);
+ Molecule m =lookup_l ()->accidental (0,false);
+ m.translate_axis (calculate_position(old_pitch_arr_[i],
+old_acc_arr_[i]) * inter, Y_AXIS);
output->add_at_edge (X_AXIS, RIGHT, m);
}
}
@@ -153,9 +152,8 @@
for (int i =0; i < pitch_arr_.size(); i++)
{
- Atom a =lookup_l ()->accidental (acc_arr_[i]);
- a.translate_axis (calculate_position(pitch_arr_[i], acc_arr_[i]) * inter,
Y_AXIS);
- Molecule m (a);
+ Molecule m =lookup_l ()->accidental (acc_arr_[i],false);
+ m.translate_axis (calculate_position(pitch_arr_[i], acc_arr_[i]) * inter,
+Y_AXIS);
output->add_at_edge (X_AXIS, RIGHT, m);
}
if (pitch_arr_.size())
diff -urN ../lilypond-1.1.1/lily/lily-guile.cc ./lily/lily-guile.cc
--- ../lilypond-1.1.1/lily/lily-guile.cc Mon Nov 2 12:03:53 1998
+++ ./lily/lily-guile.cc Tue Nov 3 00:20:13 1998
@@ -64,6 +64,23 @@
#endif
SCM
+lambda_scm (String str, Array<int> args_arr)
+{
+ if (str.empty_b ())
+ {
+ str = "empty";
+ args_arr.clear ();
+ }
+ SCM args_scm = SCM_EOL;
+ for (int i = args_arr.size () - 1; i >= 0; i--)
+ args_scm = gh_cons (gh_int2scm (args_arr[i]), args_scm);
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o (str.ch_l ()), args_scm)));
+ return scm;
+}
+
+SCM
lambda_scm (String str, Array<Scalar> args_arr)
{
if (str.empty_b ())
diff -urN ../lilypond-1.1.1/lily/local-key-engraver.cc ./lily/local-key-engraver.cc
--- ../lilypond-1.1.1/lily/local-key-engraver.cc Mon Nov 2 12:02:05 1998
+++ ./lily/local-key-engraver.cc Tue Nov 3 00:08:06 1998
@@ -67,6 +67,11 @@
key_item_p_ = new Local_key_item;
announce_element (Score_element_info (key_item_p_, 0));
}
+ if (note_l->cautionary_b_)
+ {
+ note_l->pitch_.cautionary_b_ = true;
+ }
+
key_item_p_->add (note_l->pitch_);
key_item_p_->add_support (support_l);
local_key_.set (note_l->pitch_);
diff -urN ../lilypond-1.1.1/lily/local-key-item.cc ./lily/local-key-item.cc
--- ../lilypond-1.1.1/lily/local-key-item.cc Fri Oct 23 15:03:48 1998
+++ ./lily/local-key-item.cc Tue Nov 3 00:08:06 1998
@@ -70,10 +70,10 @@
Real dy =
(c0_position_i_ + accidental_pitch_arr_[i].notename_i_)
* paper()->internote_f ();
- Atom a (lookup_l ()->accidental (accidental_pitch_arr_[i].accidental_i_));
+ Molecule m (lookup_l ()->accidental (accidental_pitch_arr_[i].accidental_i_,
+ accidental_pitch_arr_[i].cautionary_b_));
- a.translate_axis (dy, Y_AXIS);
- Molecule m(a);
+ m.translate_axis (dy, Y_AXIS);
octave_mol_p->add_at_edge (X_AXIS, RIGHT, m);
}
diff -urN ../lilypond-1.1.1/lily/lookup.cc ./lily/lookup.cc
--- ../lilypond-1.1.1/lily/lookup.cc Mon Nov 2 12:03:53 1998
+++ ./lily/lookup.cc Tue Nov 3 00:15:31 1998
@@ -53,10 +53,20 @@
delete symtables_p_;
}
-Atom
-Lookup::accidental (int j) const
+Molecule
+Lookup::accidental (int j, bool cautionary) const
{
- return afm_find (String ("accidentals") + String ("-") + to_str (j));
+ Molecule m(afm_find (String ("accidentals") + String ("-") + to_str (j)));
+ if (cautionary)
+ {
+ m.add_at_edge(X_AXIS, LEFT,
+ Molecule(afm_find (String ("accidentals") + String ("-("))))
+;
+ m.add_at_edge(X_AXIS, RIGHT,
+ Molecule(afm_find (String ("accidentals") + String ("-)"))))
+;
+ }
+ return m;
}
void
@@ -66,7 +76,7 @@
}
Atom
-Lookup::afm_find (String s) const
+Lookup::afm_find (String s, bool warn) const
{
if (!afm_p_)
{
@@ -75,7 +85,7 @@
*mlog << "]" << flush ;
DOUT << this->afm_p_->str ();
}
- Adobe_font_char_metric m = afm_p_->find_char (s);
+ Adobe_font_char_metric m = afm_p_->find_char (s, warn);
Atom a;
if (m.code () < 0)
@@ -229,24 +239,20 @@
}
Atom
-Lookup::special_time_signature (String s, Array<Real> arr) const
+Lookup::special_time_signature (String s, Array<int> arr) const
{
- String symbolname = "timesig-" + s;
- if (!arr.empty ())
- symbolname += to_str (arr[0]);
- if (arr.size () >1)
- symbolname += "/" + to_str (arr[1]);
+ // First guess: s contains only the signature style
+ assert (arr.size () >1);
+ String symbolname = "timesig-" + s + to_str (arr[0]) + "/" + to_str (arr[1]);
- Atom a = afm_find (symbolname);
+ Atom a = afm_find (symbolname, false);
if (!a.empty ())
return a;
-#if 0 //guess we covered this
- // Try if the full name was given
- a = afm_find ("timesig-"+s);
+ // Second guess: s contains the full signature name
+ a = afm_find ("timesig-"+s, false);
if (!a.empty ())
return a;
-#endif
// Resort to default layout with numbers
return time_signature (arr);
@@ -302,7 +308,7 @@
}
Atom
-Lookup::time_signature (Array<Real> a) const
+Lookup::time_signature (Array<int> a) const
{
Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
s.lambda_ = (lambda_scm (s.str_, a));
diff -urN ../lilypond-1.1.1/lily/midi-walker.cc ./lily/midi-walker.cc
--- ../lilypond-1.1.1/lily/midi-walker.cc Mon Nov 2 16:12:15 1998
+++ ./lily/midi-walker.cc Mon Nov 2 23:27:09 1998
@@ -110,9 +110,9 @@
if (!p)
return;
p->channel_i_ = track_l_->number_i_;
-
- if (Midi_item *mi = dynamic_cast<Midi_note*>(p))
- do_start_note (mi);
+
+ if (Midi_note *mn = dynamic_cast<Midi_note*>(p))
+ do_start_note (mn);
else
output_event (ptr()->audio_column_l_->at_mom (), p);
}
diff -urN ../lilypond-1.1.1/lily/musical-pitch.cc ./lily/musical-pitch.cc
--- ../lilypond-1.1.1/lily/musical-pitch.cc Tue Sep 15 19:22:42 1998
+++ ./lily/musical-pitch.cc Tue Nov 3 00:08:06 1998
@@ -21,6 +21,7 @@
notename_i_ = 0;
octave_i_ = 0;
accidental_i_ = 0;
+ cautionary_b_ = false;
}
void
diff -urN ../lilypond-1.1.1/lily/musical-request.cc ./lily/musical-request.cc
--- ../lilypond-1.1.1/lily/musical-request.cc Mon Nov 2 11:58:26 1998
+++ ./lily/musical-request.cc Tue Nov 3 00:08:06 1998
@@ -185,6 +185,7 @@
Note_req::Note_req ()
{
+ cautionary_b_ = false;
forceacc_b_ = false;
}
@@ -195,7 +196,11 @@
{
#ifndef NPRINT
Melodic_req::do_print ();
- if (forceacc_b_)
+ if (cautionary_b_)
+ {
+ DOUT << " force cautionary accidental\n";
+ }
+ else if (forceacc_b_)
{
DOUT << " force accidental\n";
}
diff -urN ../lilypond-1.1.1/lily/parser.yy ./lily/parser.yy
--- ../lilypond-1.1.1/lily/parser.yy Fri Oct 23 17:27:04 1998
+++ ./lily/parser.yy Tue Nov 3 00:08:06 1998
@@ -248,6 +248,7 @@
%type <i> abbrev_type
%type <i> int unsigned
%type <i> script_dir
+%type <i> optional_modality
%type <id> identifier_init simple_identifier_init block_identifier
%type <duration> steno_duration notemode_duration
%type <duration> entered_notemode_duration explicit_duration
@@ -910,10 +911,11 @@
$$ = new Clef_change_req (*$2);
delete $2;
}
- | KEY NOTENAME_PITCH {
+ | KEY NOTENAME_PITCH optional_modality {
Key_change_req *key_p= new Key_change_req;
key_p->pitch_arr_.push(*$2);
key_p->ordinary_key_b_ = true;
+ key_p->modality_i_ = $3;
$$ = key_p;
delete $2;
}
@@ -970,6 +972,15 @@
}
;
+optional_modality:
+ /* empty */ {
+ $$ = 0;
+ }
+ | int {
+ $$ = $1;
+ }
+ ;
+
sup_quotes:
'\'' {
$$ = 1;
@@ -1027,6 +1038,10 @@
}
| steno_notepitch '!' {
$$->forceacc_b_ = ! $$->forceacc_b_;
+ }
+ | steno_notepitch '?' {
+ $$->forceacc_b_ = ! $$->forceacc_b_;
+ $$->cautionary_b_ = ! $$->cautionary_b_;
}
;
diff -urN ../lilypond-1.1.1/lily/time-signature-engraver.cc
./lily/time-signature-engraver.cc
--- ../lilypond-1.1.1/lily/time-signature-engraver.cc Mon Nov 2 11:58:27 1998
+++ ./lily/time-signature-engraver.cc Mon Nov 2 23:59:15 1998
@@ -35,7 +35,7 @@
Time_signature_change_req *req = timing_grav_l->time_signature_req_l();
if (req)
{
- Array<Real> args;
+ Array<int> args;
args.push (req->beats_i_);
args.push (req->one_beat_i_);
diff -urN ../lilypond-1.1.1/lily/time-signature.cc ./lily/time-signature.cc
--- ../lilypond-1.1.1/lily/time-signature.cc Fri Oct 23 17:51:29 1998
+++ ./lily/time-signature.cc Tue Nov 3 00:01:21 1998
@@ -26,7 +26,7 @@
{
if (time_sig_type_str_[0]=='1')
{
- Array<Real> tmparr = args_;
+ Array<int> tmparr = args_;
tmparr[1]= 0;
s = lookup_l ()->time_signature (tmparr);
}
diff -urN ../lilypond-1.1.1/mf/feta-toevallig.mf ./mf/feta-toevallig.mf
--- ../lilypond-1.1.1/mf/feta-toevallig.mf Fri Oct 23 14:23:14 1998
+++ ./mf/feta-toevallig.mf Tue Nov 3 00:08:06 1998
@@ -247,7 +247,38 @@
currentpicture := currentpicture shifted (w/2,0);
- fet_endchar;
+
+fet_endchar;
+
+
+def draw_paren =
+ save leftindent;
+ leftindent# := .2 interline#;
+ define_pixels(leftindent);
+ set_char_box(0, .5 interline#+stafflinethickness#,
+ interline#, interline#);
+ z1 = (leftindent,h);
+ z2 = (w-stafflinethickness,0);
+ z3 = (leftindent,-d);
+
+ penpos1(stafflinethickness, 35);
+ penpos2(2 stafflinethickness, 0);
+ penpos3(stafflinethickness, -35);
+
+ penlabels(1,2,3);
+ fill z2l{down} .. simple_serif(z3l, z3r, 90) .. z2r{up}
+ .. simple_serif(z1r, z1l, 90) .. z2l{down} -- cycle;
+enddef;
+
+fet_beginchar("Right paranthesis", ")", "rightparen")
+ draw_paren;
+fet_endchar;
+
+fet_beginchar("Left paranthesis", "(", "leftparen")
+ draw_paren;
+ currentpicture := currentpicture xscaled -1;
+ set_char_box(charwd, charbp, chardp, charht);
+fet_endchar;
fet_endgroup("accidentals");
diff -urN ../lilypond-1.1.1/mutopia/gallina.ly ./mutopia/gallina.ly
--- ../lilypond-1.1.1/mutopia/gallina.ly Mon Oct 12 14:10:55 1998
+++ ./mutopia/gallina.ly Tue Nov 3 00:08:06 1998
@@ -29,8 +29,8 @@
/Mats
-
-Tested Features: Note placement, multipart score, figured base, \breve
+Tested Features: Note placement, multipart score, figured base, \breve,
+ time signature styles
%}
%{
@@ -47,8 +47,28 @@
\version "1.0.7";
-vi1=\notes \relative c'' {
+global = \notes {
+ \property StaffGroup.timeSignatureStyle = "old"
+ \time 4/4;
+ \tempo 4=80;
+ \skip 1*31;
+ \property StaffGroup.timeSignatureStyle = "1"
+ \time 3/2;
+ \bar ":|:";
+ \tempo 2=140;
+ \skip 1.*15;
+ \property StaffGroup.timeSignatureStyle = "old"
\time 4/4;
+ \tempo 4=80;
+ \skip 1;
+ \bar ":|:";
+ \skip 1*13;
+ \bar "|.";
+}
+
+vi1=\type Staff = vi1 <
+\global
+\notes \relative c'' {
[d8 d d d] d4 [a16 b c a] |
[b8 g ][ g g16 a][ b8 g ][ g g16 a] |
@@ -80,9 +100,8 @@
[c8 g ][ g g16 f] e4 d |
r8 g [g g16 f] e4 d |
r8 [d16 a ][ b8 b16 c] a2 |
- b1 |
- \time 3/2;
- \tempo 2=140;
+ b1 |
+
r4 d d d d d |
e1. |
r4 c c c c c |
@@ -98,8 +117,7 @@
a4 [c8 b] a4 [b8 c] f,4 [g8 a] |
d,4 g g g g g |
a [d,8 c] b4 [c8 d] a2 |
- \time 4/4;
- \tempo 4=80;
+
b1 |
[d8 d d d] d4 [a16 b c a] |
[b8 g ][ g g16 a] [b8 g ][ g g16 a] |
@@ -114,11 +132,11 @@
fis4 g2 fis!4 |
\cadenza 1;
g\breve
- \bar "|.";
-}
+}>
-vi2=\notes \relative c'' {
- \time 4/4;
+vi2=\type Staff = vi2 <
+\global
+\notes \relative c'' {
r1 | r | r |
[d8 d d d] d4 [a16 b c a] |
@@ -149,7 +167,7 @@
e4 d r8 [c16 g ][ b8 b16 c] |
a4 g2 fis4 |
g1 |
- \time 3/2;
+
r1. |
r4 [g'8 f] e4 [f8 g] c,4 [d8 e] |
a,1. |
@@ -165,7 +183,7 @@
c,4 a a a a a |
b [d8 c] b4 [c8 d] d,4 e |
fis2 g fis! |
- \time 4/4;
+
g1 |
r1 | r1 |
[g'8 g g g] g4 [d16 e f d] |
@@ -179,13 +197,13 @@
[a d c b ][ a g fis e] d4 d' |
\cadenza 1;
b\breve
- \bar "|.";
-}
+}>
-bc=\notes\transpose c'{
+bc=\type Staff = bc <
+\global
+\notes\transpose c'{
\clef "bass";
- \time 4/4;
G2 d^"4 3" | G1 |
g2 c4 G | d1^"3 4 3" |
@@ -203,7 +221,7 @@
G1^"3 4 3" | c4 B c g |
c B c G | d1^"3 4 3" |
G1 |
- \time 3/2;
+
g1. | c |
f | d^"\\textsharp" |
g | c |
@@ -212,8 +230,9 @@
d^"\\textsharp" | e |
f | g1 B2 |
d1.^"3 4 3" |
- \time 4/4;
+
G1 |
+ \bar ":|:";
g2 fis | g G |
g1^"3 4 3" | c |
G^"3 4 3" | c2 G |
@@ -222,12 +241,10 @@
) d^"3 4 3" |
\cadenza 1;
G\breve
- \bar "|.";
-}
+}>
\score{
\type StaffGroup <
- \property StaffGroup.timeSignatureStyle = "old"
\vi1
\vi2
\bc
diff -urN ../lilypond-1.1.1/tex/lilyponddefs.tex ./tex/lilyponddefs.tex
--- ../lilypond-1.1.1/tex/lilyponddefs.tex Fri Oct 9 17:03:33 1998
+++ ./tex/lilyponddefs.tex Tue Nov 3 00:08:06 1998
@@ -165,7 +165,7 @@
%compatibility
%urg
-\fetdef\repeatcolon{18}
+\fetdef\repeatcolon{20}
\def\repeatbar{\repeatstopbar}
\def\startrepeat{\repeatstartbar}
\def\repeatbarstartrepeat{\repeatstopstart}