lilypond-devel
[Top][All Lists]
Advanced

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

Re: Inconsistency in \cr, \cresc, \<, \dim handling


From: Reinhold Kainhofer
Subject: Re: Inconsistency in \cr, \cresc, \<, \dim handling
Date: Fri, 21 Dec 2007 13:10:38 +0100
User-agent: KMail/1.9.7

Am Friday, 21. December 2007 schrieben Sie:
> When you say that it "cannot be automated", I assume you refer to the
> musicxml2ly converter or some similar application.

Well, yes, that's one case, the other is simple search and replace in a text 
editor when you want to switch somel hairpin crescendi to text or vice versa. 
Currently, you have to search the \<, and then put the \setTextCresc before 
the corresponding note, find the end of the crescendo and put 
\setHairpinCresc after the end to reset the setting (assuming that the global 
preferences are hairpin crescendi...).
This is a particular problem with musicxml2ly, since each crescendo would need 
to store whether it changed to text crescendi, so that I can reset that after 
the end of the crescendo (where I also need to find the appropriate spot for 
this setting, since the end of the crescendo is one of many postfix 
attributes of a note...).

> Since the \cr and \dim are implemented as music functions which always
> have a prefix syntax, I don't see any simple solution.

Exactly, that's the inconsistency that I'm pointing at: \<, \cr, \> are 
defined with postfix syntax, while the textual counterparts \cresc and \dim 
are defined with prefix syntax, so you can't easily switch between them by a 
search and replace! 

> Of course, you can easily define your own music functions to implement
> hairpin crescendo, which at least gives consistency, if that's your main
> problem. However, then all of these functions have to be supplied before 
> the note.

Actually, I'm looking for the opposite: I'm looking for a postfix command, 
which creates a single text crescendo without affecting the global setting 
(i.e. without having to use \setTextCresc and \setHairpinCresc manually, 
which has to be done manually and might mess up global preferences). However, 
all my attempts so far failed miserably...

> > What I really want is:
> > {
> >   b2\< b2\! | % produces hairpin crescendo
> >   b2\cresc b2\! | % produces text crescendo
> >   b2\dim b2\! | % produces text diminuendo
> >   b2\> b2\! | % produces hairpin decrescendo
> > }

Cheers,
Reinhold



-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/




reply via email to

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