lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implement framework for post-fix text (de)cresc spanners


From: Reinhold Kainhofer
Subject: Re: Implement framework for post-fix text (de)cresc spanners
Date: Sun, 12 Apr 2009 00:28:06 +0200
User-agent: KMail/1.11.2 (Linux/2.6.27-11-generic; KDE/4.2.2; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Samstag, 11. April 2009 20:33:47 address@hidden wrote:
> I never realized this would be so simple, but it strikes me as a bit of
> a hack.
>
> In your sample text dynamic spanners, there seems to be an element of
> redundancy in the event properties; you could easily junk
> '(de)crescendoSpanner and '(de)crescendoText, using 'text only to
> trigger the change, 

Yes, but I decided against it, since the global setting shows the same 
redundancy.
\set #'crescendoSpanner = #'text
\set #'crescendoText = #"blah"
I wanted to stay consistent for global and for one-time settings.

However, I totally agree that this is redundant, so I would also not mind 
junking the global crescendoSpanner as well (although it gives us flexibility 
should we want to introduce other spanner types than hairpin and text).

> http://codereview.appspot.com/39047/diff/1/2
> File lily/new-dynamic-engraver.cc (right):
>
> http://codereview.appspot.com/39047/diff/1/2#newcode76
> Line 76: SCM spanner_type = evt->get_property (name);
> This looks weird to me, since you're taking advantage of the fact that
> the event properties you're setting look like context properties.

No, I simply check if the event property with the same name exists. If it 
does, it takes precedence. What I'm taking advantage of that I assume that the 
event property and the global setting have the same name.

> You'd
> need a method which does the reverse of camel_case_to_lisp_identifier ()
> so that the events would be converted from e.g. crescendo-spanner ->
> crescendoSpanner.

Huh? Sorry, but I don't understand what you want to say here. Can you please 
elaborate?

Cheers,
Reinhold

- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJ4Rl3TqjEwhXvPN0RApgwAKDC/jJxn69zQgLUklKCviFbiFAvKwCgs3Ha
eeq0/YPhHKEMCNZLqDgT32Y=
=lOSc
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]