+pl 39.jcn1
+ - Musical_pitch::str (): use names from notename table
+
pl 39
- \property textstyle -> textStyle
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=39
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
fis'4 g'4 a'4 a'2 g'8 fis'8 e'4 fis'4
g'4 g'2 g'4 fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 fis4 gis4 a2 a4
d'4 d'4 d'8()cis'8 b4 b4 b4 e'4 g'8 ()fis'8 e'8()d'8
- d'4~cis'4 a8. a16 d'4.~e'8 fis'8 g'8 a'2 d'8 e'8 fis'4. g'8
+ d'4()cis'4 a8. a16 d'4.()e'8 fis'8 g'8 a'2 d'8 e'8 fis'4. g'8
e'4 d'2 s4
}
$staff1_voice_2 = \notes {
a8.()fis16
- \repeat 2 { a,4 d4 e4 d4~fis4 fis8. fis16 fis4 d4 d4 cis2
+ \repeat 2 { a,4 d4 e4 d4()fis4 fis8. fis16 fis4 d4 d4 cis2
e8 e8 a4. a8 a4 a2 a8. a16 a4 a4 a4 }
\alternative { { fis4 d4 a8. fis16 } { fis4 d4 r4 } }
a4 a4 d'4 d'2 a8 a8 cis'4 cis'4 cis'4 cis'2 a4 a4. a8 a4 a2
a8. a16 d4 d4 d4 cis2 e4 fis4 e4 d4 d4 d4 dis4 g4 g8()dis8 e4 e2
- e8. e16 d4.~a8 a8 a8 a2 g8 g8 a4. a8 g4 fis2 s4
+ e8. e16 d4.()a8 a8 a8 a2 g8 g8 a4. a8 g4 fis2 s4
}
$staff2_voice_1 = \notes {
\alternative { { fis4 d4 r4 } { fis4 d4 r4 } }
d4 e4 fis4 fis'2 e'8 d'8 e'4 e'4 e'4 e'2 cis'4 d'4. cis'8 d'4 e'2
e'8. e'16 a4 a4 e4 e2 cis'4 a4 a4 a4 g4 g4 b4 b4 b4 b4 a2
- cis'8. cis'16 a4.~cis'8 d'8 d'8 d'2 d'8 d'8 d'4. d'8 cis'4
+ cis'8. cis'16 a4.()cis'8 d'8 d'8 d'2 d'8 d'8 d'4. d'8 cis'4
a2 s4
}
\alternative { { fis4 d4 r4 } { fis4 d4 r4 } }
d4 d4 d4 d2 d8 d8 a4 a4 a4 a2 a,4 d4. e8 fis8 g8 a2 g8. g16
fis4 d4 e4 a,2 a4 d4 e4 fis4 g4 g4 fis4 e4 e8()fis8 g8()gis8 a2
- g8. g16 fis4.~a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4
+ g8. g16 fis4.()a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4
}
text = \lyrics
#define MUSICAL_PITCH_HH
#include "lily-proto.hh"
+#include "array.hh"
#include "input.hh"
/** A "tonal" pitch. This is a pitch as it figures in diatonal western
*/
struct Musical_pitch : public Input
{
+ static String name_str_arr_arr_[7][5];
+
Musical_pitch (int notename=0, int accidental=0, int octave=0);
/// 0 is c, 6 is b
#include "debug.hh"
#include "main.hh"
+String Musical_pitch::name_str_arr_arr_[7][5];
+
Musical_pitch::Musical_pitch (int n, int a, int o)
{
notename_i_ = n;
accidental_i_ -= delta_acc;
}
-
-#if 0
-// nice test for internationalisation strings
-char const *accname[] = {"double flat", "flat", "natural",
- "sharp" , "double sharp"};
-#else
-char const *accname[] = {"eses", "es", "", "is" , "isis"};
-#endif
-
String
Musical_pitch::str () const
{
- int n = (notename_i_ + 2) % 7;
- String s = to_str (char(n + 'a'));
- if (accidental_i_)
- s += String (accname[accidental_i_ + 2]);
+ String s = name_str_arr_arr_[notename_i_ % 7][accidental_i_ + 2];
if (octave_i_ > 0)
{
while (o--)
s += to_str (',');
}
-#if 0
- if (octave_i_)
- s += String ((octave_i_> 0)? "^": "_") + to_str (octave_i_);
-#endif
-
return s;
}
%type <tempo> tempo_request
%type <notenametab> notenames_body notenames_block chordmodifiers_block
-
-
+%expect 8
%left '-' '+'
%left '*' '/'
}
| notenames_body STRING '=' explicit_musical_pitch {
(*$$)[*$2] = *$4;
-
+ int n = ($4->notename_i_ + 10 * 7) % 7;
+ int a = $4->accidental_i_ + 2;
+ Musical_pitch::name_str_arr_arr_[n][a] = *$2;
delete $4;
delete $2;
}
% ugh
barsize = \staffheight;
-rulethickness = \staffline;
-
-% stem should be thinner?
-stemthickness = \staffline;
-
gourlay_energybound = 100000.;
%{
gourlay_maxmeasures = 10.;
castingalgorithm = \Gourlay;
-%{
-Ross. page 151
-
-bar_kern = 0.5 * \interline;
-bar_thinkern = 0.75 * \interline;
-barthick_thick = 0.5* \interline;
-barthick_score = 0.13333* \interline;
-barthick_thin = 0.1*\interline;
-Can't be, these are ugly! Changed to old (TeX) values.
-
-% barline should be thicker!
+% relative thickness of thin lines 1.6 : 1 : 0.8
+stemthickness = 0.8*\staffline;
+rulethickness = \staffline;
+barthick_thin = 1.6*\staffline;
-%}
+barthick_thick = 6.0* \staffline;
bar_kern = 3.0 * \staffline;
bar_thinkern = 3.0 * \staffline;
-barthick_thick = 6.0* \staffline;
-barthick_thin = 1.6*\staffline;
+
tuplet_thick = 1.0*\staffline;
volta_thick = 1.6*\staffline;