[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to check clef type?
From: |
Marc Hohl |
Subject: |
Re: how to check clef type? |
Date: |
Sun, 08 Jan 2012 17:16:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16 |
Am 07.01.2012 23:56, schrieb Janek Warchoł:
2012/1/7 address@hidden<address@hidden>:
On Jan 7, 2012, at 1:49 AM, Janek Warchoł wrote:
Hi,
i'm inside Clef_engraver::create_clef () - line 130 of lily/clef-engraver.cc
I'd like to do sth based on the clef type (G, F or C). What condition
should i use? I thought this
if (ly_scm2string (clef_->get_property ("glyph-name")) == "G")
would work, but it doesn't.
The glyph name would be "clefs.G".
Thanks!
However, my code doesn't work properly. I attach a patch and the
output i get from the following input:
{ \clef "treble_8" c' }
{ \clef "treble^8" c' }
{ \clef "bass^8" c' }
{ \clef "alto^8" c' }
{ c' \clef "bass^8" }
{ \clef "bass^15" c' }
I don't have any idea why change clef isn't small.
Are you sure the attached patch is up-to-date with your work?
I get a small change clef in the fifth line, see attachment.
I know why the
octavation in the last line is wrongly aligned, but i don't know how
to fix it (i tried manipulating X-offset instead of X-alignment but it
didn't work). Could you point me in the right direction?
Sorry - can't help on that. But generally, wouldn't it be better to
store the
offsets in an alist, so that each (glyph . direction) pair has an offset
number?
You'll have to take clefs.G_change and the likes into account, too, so the
if-else-constructs will be rather clumsy.
Just my 2 ct.
Marc
cheers,
Janek
PS in case attachments get lost from e-mail, here's a link:
http://www.sendspace.com/file/2fnvcn
_______________________________________________
lilypond-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-devel
clefs.pdf
Description: Adobe PDF document