[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (de)cresendi syntax
Re: (de)cresendi syntax
Tue, 17 Mar 2009 10:20:29 +0100
Le 16 mars 2009 16:31, Graham Percival <address@hidden> a écrit :
> I don't think anybody else has replied, so I'll take a stab at it.
I've been working at a draft reply for a few days, but never found
what I was looking for.
> What about reserving \< \> \! **only** for hairpins, and \cr
> \endCr \dim \endDim **only** for text? ok, we'd need extra
> commands for decresc and decr, but this way we could avoid the
> \crescTextXXX stuff entirely.
Yes. Yes. Yes. We certainly need that.
> Again, I'd rather use text for text dynamics. What about \cresc
> #"cresc. poco a poco" ? i.e. if \cresc is used by itself, it
> prints "cresc.", but if you provide the optional argument, that's
> used instead of the default text?
Yes, but I'd really like to use this \cresc command of yours *after*
the note (not before, as it is now).
> This is the sticking point in my mind. Are you able to modify it
> yourself (including Carl's help in "yourself")? If so, then we
> can have a long discussion about the new dynamic syntax. I'd
> encourage you to experiment with changing the parser before we
> get into lots of details about the new syntax, though.
The parser can certainly be rewritten (like Reinhold did for \tempo).
However, I think we can take advantage of the (make-music
('DynamicEvent ('tweaks ('text "")))) trick that you've been using
(and so have I).
The only drawback for now is that you can't specify a string as an
argument without using a music function :
instead of a'\cresc #"my text"
you have to first define a make-dyn-from-this-text function, and then
predefine your text:
#(make-dyn-from-this-text "my text")
and only then use
Whereas with a music function, you can simply do:
\cresc #"mytext" a'
... but then again, the command has to be used *before* the note and
this has many drawbacks (plus a big deal of inconsistency through the
code, that i can tell: see for instance
-- or, line 300, the awful mess with text spanners...)
Which is why, rather than a C++ parser change, what I'd really like to
have is a (define-music-tweak) function, that could act like
define-music-function but that would *not* take the music as an
argument, that would just take the string and cons' it as a 'tweak