From 4c98b01aebe68dfd73d4954ad67143d4a85a250b Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 12 Apr 1999 23:18:13 +0300
Subject: [PATCH] patch::: 1.1.39.jcn1: jcn1

pl 39.jcn1
	- Musical_pitch::str (): use names from notename table
---
 NEWS                          |  3 +++
 VERSION                       |  2 +-
 input/star-spangled-banner.ly | 10 +++++-----
 lily/include/musical-pitch.hh |  3 +++
 lily/musical-pitch.cc         | 21 +++------------------
 lily/parser.yy                |  7 ++++---
 ly/params.ly                  | 25 ++++++-------------------
 7 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/NEWS b/NEWS
index 1306606e52..9759d8c368 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+pl 39.jcn1
+	- Musical_pitch::str (): use names from notename table
+
 pl 39
 	- \property textstyle -> textStyle
 
diff --git a/VERSION b/VERSION
index 9d08f1f68b..76ebe35e32 100644
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 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.
diff --git a/input/star-spangled-banner.ly b/input/star-spangled-banner.ly
index 177e20b8e0..3264326c85 100644
--- a/input/star-spangled-banner.ly
+++ b/input/star-spangled-banner.ly
@@ -22,18 +22,18 @@ $staff1_voice_1 = \notes {
   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 { 
@@ -43,7 +43,7 @@ $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 
 }
 
@@ -54,7 +54,7 @@ $staff2_voice_2 = \notes {
   \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
diff --git a/lily/include/musical-pitch.hh b/lily/include/musical-pitch.hh
index d4d0a60854..bed6d852a6 100644
--- a/lily/include/musical-pitch.hh
+++ b/lily/include/musical-pitch.hh
@@ -11,6 +11,7 @@
 #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
@@ -21,6 +22,8 @@
 */
 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
diff --git a/lily/musical-pitch.cc b/lily/musical-pitch.cc
index 35df93bcc5..eaf7ab5b7a 100644
--- a/lily/musical-pitch.cc
+++ b/lily/musical-pitch.cc
@@ -10,6 +10,8 @@
 #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;
@@ -78,22 +80,10 @@ Musical_pitch::transpose (Musical_pitch delta)
   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)
     {
@@ -107,11 +97,6 @@ Musical_pitch::str () const
       while (o--)
 	s += to_str (',');
     }
-#if 0  
-  if (octave_i_)
-    s  += String ((octave_i_> 0)? "^": "_") + to_str (octave_i_);
-#endif
-  
   return s;
 }
 
diff --git a/lily/parser.yy b/lily/parser.yy
index 300834a248..953ea68aab 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -260,8 +260,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <tempo> 	tempo_request
 %type <notenametab> notenames_body notenames_block chordmodifiers_block
 
-
-
+%expect 8
 
 %left '-' '+'
 %left '*' '/'
@@ -349,7 +348,9 @@ notenames_body:
 	}
 	| 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;
 	}
diff --git a/ly/params.ly b/ly/params.ly
index 6d50217687..a3deb476d0 100644
--- a/ly/params.ly
+++ b/ly/params.ly
@@ -95,11 +95,6 @@ notewidth = (\quartwidth + \wholewidth) / 2.0;
 
 % ugh
 barsize = \staffheight;
-rulethickness = \staffline;
-
-% stem should be thinner?
-stemthickness = \staffline;
-
 
 gourlay_energybound = 100000.;
 %{
@@ -109,24 +104,16 @@ on a line.  Decreasing it greatly reduces computation time
 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;
-- 
2.39.5