Originally created by: *anonymous
Originally created by: colingh...@gmail.com
Barikavily reported here:
http://lists.gnu.org/archive/html/bug-lilypond/2012-05/msg00217.html
Original post:
-------------------------
> I'm not top posting.
% Ambitus is not correct in the case of:
% Manually defined clefs (here the example of the standard choral tenor clef)
% Semitone staves
\version "2.15.35"
\new Staff \with { \consists Ambitus_engraver } {
\set Staff.middleCPosition = #1
c' c''
}
\new Staff \with { \consists Ambitus_engraver } {
\set staffLineLayoutFunction = #ly:pitch-semitones
c' c''
}
--------------------------
I think the first example is expected behaviour but the second one is a new bug.
http://lilypond.org/doc/v2.15/Documentation/notation/displaying-pitches#ambitus
http://lilypond.org/doc/v2.15/Documentation/notation/displaying-pitches#clef
https://code.google.com/p/lilypond/issues/list?can=1&q=ambitus
Originally posted by: dak@gnu.org
I don't expect LilyPond to guess ahead, so I would only expect reasonably correct results when using
\new Staff \with
{ \consists Ambitus_engraver
middleCPosition = #1 }
{
c' c''
}
\new Staff \with
{ \consists Ambitus_engraver
staffLineLayoutFunction = #ly:pitch-semitones }
{
c' c''
}
However, this "time-invariant" way of establishing the settings does not actually produce a result different from the original example, and so definitely a fix seems required.
Originally posted by: colingh...@gmail.com
My analysis of this bug report was incorrect.
Both of the cases reported by Barikavily are unexpected behaviour, not just the second one.
Cheers,
Colin.
Diff:
If I remember correctly, in the regtests or somewhere else a complete rewrite of the Ambitus_engraver in Scheme was done. It hasn't become the default because Scheme engravers could not be registered, documented and used identically to C++ engravers, making it a compatibility problem. Now this might still be a performance issue, but overall I think that now that registering Scheme engravers is equivalent to registering C++ engravers in all respect (and we do have a few already), it might be feasible to revisit the decision to move this into the Scheme realm for good since it makes it more accessible to tinkering.
Ok, I’ll look for that rewrite. (Edit: It’s Snippet 805)
I haven’t done many changes yet but part 1 of this issue (
middleCPosition
) already works. For part 2 (staffLineLayoutFunction
) I tried to copy from note-heads-engraver.cc but I haven’t found a way to convertPitch
toSCM
in order to feed it toscm_call_1
(see also line 85 of note-heads-engraver.cc).Last edit: Malte Meyn 2018-09-30
Diff:
Passes make, make check and a full make doc.
Patch counted down - please push.
How about countdown? ;)
Patch counted down - please push.
commit 23576463b257bded39a3b69779b6f308a067f19d
Author: Malte Meyn lilypond@maltemeyn.de
Date: Sat Dec 8 15:42:47 2018 +0100
commit a1bde204301ab4655b14b9225c04fb32c1268be2
Author: Malte Meyn lilypond@maltemeyn.de
Date: Wed Oct 24 18:38:12 2018 +0200