Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not mind, I am 
also happy with the simpler solution.


Attached is a revised version that issues a proper warning if style is set 
to #'default or some other unsupported value, such that the dot is not 
found.


Should I apply it?

Greetings,
JuergenIndex: ChangeLog
===
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.5395
diff -u -r1.5395 ChangeLog
--- ChangeLog   10 Oct 2006 13:38:32 -  1.5395
+++ ChangeLog   11 Oct 2006 10:03:50 -
@@ -1,3 +1,10 @@
+2006-10-10  Jürgen Reuter  [EMAIL PROTECTED]
+
+   * mf/parmesan-dots.mf (new), mf/parmesan-generic.mf,
+   ly/engraver-init.ly: Added vaticana-style augmentum dot glyph.
+
+   * lily/dots.cc: Added style property for dots.
+
 2006-10-10  Han-Wen Nienhuys  [EMAIL PROTECTED]
 
* scm/output-lib.scm (fingering::calc-text): use origin
Index: lily/dots.cc
===
RCS file: /cvsroot/lilypond/lilypond/lily/dots.cc,v
retrieving revision 1.79
diff -u -r1.79 dots.cc
--- lily/dots.cc11 Feb 2006 11:35:18 -  1.79
+++ lily/dots.cc11 Oct 2006 10:03:50 -
@@ -14,6 +14,7 @@
 #include lookup.hh
 #include staff-symbol-referencer.hh
 #include directional-element-interface.hh
+#include international.hh
 
 MAKE_SCHEME_CALLBACK (Dots, print, 1);
 SCM
@@ -26,7 +27,17 @@
 
   if (scm_is_number (c))
 {
-  Stencil d = Font_interface::get_default_font (sc)-find_by_name (string 
(dots.dot));
+  SCM scm_style = sc-get_property (style);
+  string style =;
+  if (scm_is_symbol (scm_style))
+   style = ly_symbol2string (scm_style);
+  string idx =  dots.dot + style;
+  Stencil d = Font_interface::get_default_font (sc)-find_by_name (idx);
+  if (d.is_empty ())
+   {
+ sc-warning (_f (dot `%s' not found, idx.c_str ()));
+ return SCM_EOL;
+   }
   Real dw = d.extent (X_AXIS).length ();
 
   /*
@@ -55,5 +66,6 @@
 
   /* properties */
   direction 
-  dot-count);
-
+  dot-count 
+  style 
+  );
Index: mf/parmesan-generic.mf
===
RCS file: /cvsroot/lilypond/lilypond/mf/parmesan-generic.mf,v
retrieving revision 1.10
diff -u -r1.10 parmesan-generic.mf
--- mf/parmesan-generic.mf  6 Jan 2006 09:13:23 -   1.10
+++ mf/parmesan-generic.mf  11 Oct 2006 10:03:50 -
@@ -33,6 +33,7 @@
input parmesan-flags;
input parmesan-timesig;
input parmesan-scripts;
+   input parmesan-dots;
 else:
 
 fi
Index: ly/engraver-init.ly
===
RCS file: /cvsroot/lilypond/lilypond/ly/engraver-init.ly,v
retrieving revision 1.309
diff -u -r1.309 engraver-init.ly
--- ly/engraver-init.ly 4 Oct 2006 10:32:26 -   1.309
+++ ly/engraver-init.ly 11 Oct 2006 10:03:50 -
@@ -765,6 +765,7 @@
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
   \override Custos #'neutral-direction = #DOWN
+  \override Dots #'style = #'vaticana
 }
 
 \context {
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Han-Wen Nienhuys

Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour 
between setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.




+   input parmesan-dots;


I'm missing this file in the patch.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:

Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.





Ok.


+   input parmesan-dots;


I'm missing this file in the patch.



Sorry, it's still the same one as in the previously sent mail (cvs diff -u 
unfortunately only spits out cvs diff: mf/parmesan-dots.mf is a new 
entry, no comparison available for new files).  It's attached to this 
mail once again.


Greetings,
Juergenfet_begingroup (dots);

save dot_diam;

3 dot_diam# = staff_space# - stafflinethickness#;
define_whole_blacker_pixels (dot_diam);

fet_beginchar (duration dot, dotvaticana);
pickup pencircle scaled dot_diam;

lft x0 = 0;
top y0 = vround (.5 dot_diam);

drawdot z0;

set_char_box (0, dot_diam#, .5 dot_diam#, .5 dot_diam#);
fet_endchar;

fet_endgroup (dots);
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Juergen Reuter

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:


why not simply do

 string style =
 if (scm_is_symbol (scm_style))
   style = ly_symbol2string (scm_style);
 string idx =  dots.dot + style;




Because, historically, there is no difference in lily's behaviour between 
setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.




By the way, it has not completely been removed.  The code related to the 
longa note bug reported last week by Ralph Little for example still 
contains some reminiscences to the old #'default feature.


Greetings,
Juergen


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: dots grob

2006-10-11 Thread Han-Wen Nienhuys

Juergen Reuter schreef:

On Wed, 11 Oct 2006, Han-Wen Nienhuys wrote:

Because, historically, there is no difference in lily's behaviour 
between setting style to #'default and #'().  However, if you do not 


that must have been a long time ago; I think I've tried to remove this 
feature for some time now.





Ok.


+input parmesan-dots;


I'm missing this file in the patch.



Sorry, it's still the same one as in the previously sent mail (cvs diff 
-u unfortunately only spits out cvs diff: mf/parmesan-dots.mf is a new 
entry, no comparison available for new files).  It's attached to this 
mail once again.


ok. Please apply.

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: FYI: Status of Ancient Notation Implementation

2006-10-11 Thread Juergen Reuter

On Sun, 8 Oct 2006, Juergen Reuter wrote:


* The longa notes bug (cp.
 http://lists.gnu.org/archive/html/lilypond-devel/2006-10/msg00022.html)
 has been tracked down to a general problem in output-lib.scm (see
 http://lists.gnu.org/archive/html/lilypond-devel/2006-10/msg00050.html
 for details).  However, to fix it properly, note-head::calc-glyph-name
 should be completely rewritten (i.e. add test for empty style value in
 case statement and handle it identically as default style; also
 replace case statement by completely different way of dispatch to gain
 speed, e.g. with a hashtable or alist or...), which goes beyond my
 scheme skills.  Any help from scheme/guile gurus is appreciated!


Attached patch should fix this one and theoretically even *speed up* glyph 
name lookup, since it removes obsolete scheme code.  Instead of trying to 
fix the scheme code, I added a new longa note head to the feta font.  It 
looks exactly like a brevis head, but with a stem like quarter note. 
Maximae are not handled by this patch, but I actually have not ever seen a 
Maxima in modern font, so this is a generally open issue to be handled 
separately.


May I apply this patch?

Greetings,
JuergenIndex: ChangeLog
===
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.5397
diff -u -r1.5397 ChangeLog
--- ChangeLog   11 Oct 2006 19:54:32 -  1.5397
+++ ChangeLog   11 Oct 2006 20:12:37 -
@@ -7,6 +7,10 @@
 
* mf/parmesan-heads.mf: Fix typo in comment.
 
+   * mf/feta-bolletjes.mf, scm/output-lib.scm: Fix longa notes bug by
+   adding longa head to feta font and removing obsolete default
+   mapping scheme code.
+
 2006-10-10  Han-Wen Nienhuys  [EMAIL PROTECTED]
 
* scm/output-lib.scm (fingering::calc-text): use origin
Index: mf/feta-bolletjes.mf
===
RCS file: /cvsroot/lilypond/lilypond/mf/feta-bolletjes.mf,v
retrieving revision 1.79
diff -u -r1.79 feta-bolletjes.mf
--- mf/feta-bolletjes.mf4 Oct 2006 16:00:19 -   1.79
+++ mf/feta-bolletjes.mf11 Oct 2006 20:12:37 -
@@ -148,6 +148,77 @@
 %
 % dimensions aren't entirely right.
 %
+def draw_longa (expr up) =
+   save stemthick, fudge;
+
+   stemthick# = 2 stafflinethickness#;
+   define_whole_blacker_pixels (stemthick);
+
+   fudge = hround (blot_diameter / 2);
+
+   draw_outside_ellipse (1.80, 0, 0.707, 0);
+   undraw_inside_ellipse (1.30, 125, 0.68, 2 stafflinethickness#);
+
+   pickup pencircle scaled stemthick;
+
+   if up:
+   bot y1 = -d;
+   y2 = h;
+   rt x1 - fudge = 0;
+   x1 = x2;
+
+   fudge + lft x3 = w;
+   x4 = x3;
+   top y4 = h + 3.0 staff_space;
+   y3 = y1;
+   else:
+   bot y1 = -d - 3.0 staff_space;
+   top y2 = h;
+   rt x1 - fudge = 0;
+   x1 = x2;
+
+   fudge + lft x3 = w;
+   x4 = x3;
+   y4 = y2;
+   bot y3 = -d;
+   fi;
+
+   draw_gridline (z1, z2, stemthick);
+   draw_gridline (z3, z4, stemthick);
+enddef;
+
+
+fet_beginchar (Longa notehead, u-2);
+   draw_longa (true);
+
+   draw_staff (-2, 2, 0);
+fet_endchar;
+
+fet_beginchar (Longa notehead, d-2);
+   draw_longa (false);
+
+   draw_staff (-2, 2, 0);
+fet_endchar;
+
+
+if test  0:
+   fet_beginchar (Longa notehead, u-2);
+   draw_longa (true);
+
+   draw_staff (-2, 2, 0.5);
+   fet_endchar;
+
+   fet_beginchar (Longa notehead, d-2);
+   draw_longa (false);
+
+   draw_staff (-2, 2, 0.5);
+   fet_endchar;
+fi;
+
+
+%
+% dimensions aren't entirely right.
+%
 def draw_brevis =
save stemthick, fudge;
 
Index: scm/output-lib.scm
===
RCS file: /cvsroot/lilypond/lilypond/scm/output-lib.scm,v
retrieving revision 1.115
diff -u -r1.115 output-lib.scm
--- scm/output-lib.scm  10 Oct 2006 13:38:32 -  1.115
+++ scm/output-lib.scm  11 Oct 2006 20:12:37 -
@@ -119,6 +119,10 @@
(log (min 2 (ly:grob-property grob 'duration-log
 
 (case style
+  ;; default style is directly handled in note-head.cc as a
+  ;; special case (HW says, mainly for performance reasons).
+  ;; Therefore, style default does not appear in this case
+  ;; statement.  -- jr
   ((xcircle) 2xcircle)
   ((harmonic) 0harmonic)
   ((baroque) 
@@ -137,16 +141,6 @@
   (string-append (number-string log) (symbol-string style
   ((neomensural)
(string-append (number-string log) (symbol-string style)))
-  ((default)
-   ;; The default font in mf/feta-bolletjes.mf defines a brevis, but
-   ;; neither a longa nor a maxima.  Hence let us, for the moment,
-   ;; take 

Re: FYI: Status of Ancient Notation Implementation

2006-10-11 Thread Han-Wen Nienhuys

Juergen Reuter schreef:
font.  It looks exactly like a brevis head, but with a stem like quarter 
note. Maximae are not handled by this patch, but I actually have not 
ever seen a Maxima in modern font, so this is a generally open issue to 
be handled separately.


May I apply this patch?


cool.
I've applied it already (after viewing the font glyph)

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: FYI: Status of Ancient Notation Implementation

2006-10-11 Thread Graham Percival

Juergen Reuter wrote:
Graham, what do you think, should this patch be applied?  Without this 
patch, the reader of the documentation immediately sees that there must 
be something wrong but is left alone, as the figure does not show what 
is explained in the text.   With the attached patch, the reader will 
(hopefully) see that episem to some extent works (to the same extent as 
in the lily 2.7.x series), but there is an explanation in the @refbugs 
paragraph that states that the episem feature is rather buggy.


Yes, please apply.  @refbugs is the right place for this info; the main 
body of the docs should explain things clearly.


Cheers,
- Graham


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel