Han-Wen,

thank you for your very fast and helpful answers!

A few more comments/questions/suggestions.

>>   \once \override NoteHead #'style = #'harmonic
>>   \once \override NoteHead #'glyph-name = #'"2harmonic"
> 
> if you set glyph-name, style is no longer necessary.

That's what I thought beforehand, too. But leaving out 'style' results
in ordinary noteheads instead. See for yourself (picture of output
attached):

-- begin code --
%\version "2.11.12" %% same with v2.10.10
\layout { ragged-right = ##t }

{
  % %This produces the harmonic notehead
  \once \override NoteHead #'style = #'harmonic
  \once \override NoteHead #'glyph-name = #'"0harmonic"
  f'1

  %% This yields an ordinary notehead
  \once \override NoteHead #'glyph-name = #'"0harmonic"
  f'1
}
-- end code --

Is this a bug?


>> [... how to control the choice of noteheads with note durations ...]
>>
> see scm/output-lib.scm, function note-head::calc-glyph-name.

Thanks, that's precisely what I was looking for.


>> [... Why do black diamonds of harmonic style not exist yet? ...]
>>
> AFAIK, they only exist in the open form, and Trevor's use of the black
> form is not canonical.

Taking this into account, I considered it best not to mess with the
existing harmonic style because it could cause confusion in users
familiar with them. Moreover, existing *.ly files would suddenly spit
out "wrong" or unexpected output. I therefore inserted two further style
definitions in scm/output-lib.scm which can serve as a replacement. To wit,

 1) "harmonic-black", which prints noteheads with the same diamond
    as the ordinary "harmonic" style, but all noteheads are filled
    black.

 2) "harmonic-mixed", which prints quarter and shorter notes in black,
    whereas longer ones get the "regular" diamond.

One of them is probably redundant. But I thought that for people like
Trevor it might be nice to have a harmonic style which behaves in a way
analogous to, say, neomensural. On the other hand, if you need black
notes throughout, it might be awkward to continuously override the
settings. Any objections against both styles or other suggestions? Or is
it completely inappropriate to add any additional "artificial" styles?


Concerning the naming of the new black diamond glyph I decided to stick
with "s2harmonic" for the time being because it underlines the
parallelism to neomensural and the other styles where the black notehead
is called "s2neomensural", etc. To further keep up this similarity I
also added a glyph called "s1harmonic" which is entirely identical to
the open diamond but in a way "closes the gap" between "s0" and "s2"
(although it is used nowhere at all). IMHO this provides some sort of
consistency in the naming. Agree?


Since Trevor urged me to do so and in case there is interest to include
the changes in a future version, I attached patches for the two modified
files mf/parmesa-heads.mf and scm/output-lib.scm, incorporating the
changes as described. Is there a more canonical place to submit them?
Also, if there are suggestions for a different solution, just tell me,
so that I can adapt the files and resend the patches if desired. (BTW,
are there any naming conventions for patches?)


>> [...] is the *.mf file the right place at all to make changes?
> 
> yes, but do take the hints in mf/README at heart.

Thanks for the hint. I had read them before, but since I only reused
existing functions and did not add my own metafont code, I am confident
that everything is fine.


>> [... about ragged outlines when viewing the pdf output in xpdf ...] 
> It might be related to the version of fontforge that you use. 

It's the newest Debian package available. However, I did not use
FontForge to modify the glyph and was not aware that it plays a role in
the compilation process of lilypond (thus indirectly influencing the
viewing of pdf files). How does it do this?


Thanks again and best regards
Max

PNG image

--- scm/output-lib.scm.old      2007-01-25 00:21:49.000000000 +0100
+++ scm/output-lib.scm  2007-01-25 00:20:55.000000000 +0100
@@ -168,6 +168,9 @@
       ;; statement.  -- jr
       ((xcircle) "2xcircle")
       ((harmonic) "0harmonic")
+      ((harmonic-black) "2harmonic")
+      ((harmonic-mixed) (if (<= log 1) "0harmonic"
+                                       "2harmonic"))
       ((baroque) 
        ;; Oops, I actually would not call this "baroque", but, for
        ;; backwards compatibility to 1.4, this is supposed to take
--- mf/parmesan-heads.mf.old    2007-01-25 00:30:11.000000000 +0100
+++ mf/parmesan-heads.mf        2007-01-25 00:29:41.000000000 +0100
@@ -192,6 +192,20 @@
        charwy := 0;
 fet_endchar;
 
+fet_beginchar("Harmonic notehead (Neo-mensural open)",
+             "s1harmonic")
+       draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#);
+       charwx := head_width#;
+       charwy := 0;
+fet_endchar;
+
+fet_beginchar("Harmonic notehead (Neo-mensural black)",
+             "s2harmonic")
+       draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
+       charwx := head_width#;
+       charwy := 0;
+fet_endchar;
+
 fet_beginchar("Neo-mensural semibrevis head","s0neomensural")
       draw_neomensural_open_head (staff_space#, noteheight#);
 fet_endchar;
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to