lilypond-devel
[Top][All Lists]
Advanced

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

Re: Syntax change proposal:


From: David Kastrup
Subject: Re: Syntax change proposal:
Date: Thu, 26 Jul 2012 12:09:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Trevor Daniels" <address@hidden> writes:

> David Kastrup wrote Thursday, July 26, 2012 10:01 AM
>
>
>> Keith OHara <address@hidden> writes:
>> 
>>> If I make a function 
>>>   \dichrom3D { c4 d e f } 3.7
>>> that engraves a passage so that the notes appear to float 3.7 staff-spaces
>>> above the paper when viewed with red/cyan 3D glasses, 
>>>
>>> then if I use it on an isolated note \dichrom3D e 2.9
>>> I get a dotted-half-note e floating 9.0 staff-spaces above the page.
>
> I'm not sure I've followed all this discussion, but if it is or
> becomes possible to write a music function like \dichrom3D
> which /silently/ behaves differently if one of its real arguments
> happens to begin with a sequence that can be interpreted as
> a duration, then we've definitely gone astray.
>
> Please tell me I've misunderstood something.

hup =
#(define-music-function (parser location m s) (ly:music? number?)
  #{ \set Staff.middleCOffset = #s \applyContext #ly:set-middle-C!
     #m \unset Staff.middleCOffset #})

\hup { c4 d e f } 4

already works.

\hup e4 2 is supposed to work as well, but apparently does not at the
moment.  Probably something that needs fixing.

Using music functions in the context of layout definitions will require
in the worst case using

\notemode { ... }

in which case interpretation becomes unproblematic.

-- 
David Kastrup



reply via email to

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