lilypond-devel
[Top][All Lists]
Advanced

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

Re: [GLISS] non-timed or non-musical events "z" "y"


From: David Kastrup
Subject: Re: [GLISS] non-timed or non-musical events "z" "y"
Date: Wed, 26 Sep 2012 16:30:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Reinhold Kainhofer <address@hidden> writes:

> On 26/09/2012 14:34, David Kastrup wrote:
>> David Kastrup <address@hidden> writes:
>>
>>> Werner LEMBERG <address@hidden> writes:
>>>
>>>>>> It would be tremendously helpful if you can show possible syntax
>>>>>> *alternatives* instead of just pretending to be a naysayer.
>>>>> I've posted actual working definitions for that purpose.
>>>> It seems I've missed that, lost in the many examples you've given to
>>>> demonstrate what doesn't work.
>>>>> They would definitely simplify the kind of entry you are asking for.
>>>> Please repeat.
>>> Sigh.
>>>
>>> at =
>>> #(define-music-function (parser location time event music)
>>>   (ly:duration? ly:music? ly:music?)
>>>   "Place @var{event} at a relative duration @var{time} in relation
>>> to @var{music}."
>>>   #{ << { \skip $time <>$event } $music >> #})
>>>
>>> {
>>>   \at 4 \<
>>>   \at 1*2/3 \!
>>>   c'1\p
>>> }
>> [12 days later, and no followup again]
>>
>> Let's just continue pretending me to be a naysayer then.
>
> You demonstrated that a solution is possible, but quite inconsistent with
> the lilypond language: You have to write the dynamic BEFORE the note,
> although it should be printed AFTER the note...

One can, of course, exchange the order of arguments.  However, then
adding several arguments becomes more awkward:

at =
#(define-music-function (parser location music event time)
  (ly:music? ly:music? ly:duration?)
  "Place @var{event} at a relative duration @var{time} in relation
to @var{music}."
  #{ \context Voice << { \skip $time <>$event } $music >> #})

{
  \at {
       \at { c'1\p } \< 4
      } \! 1*2/3
}

In this case, we might get the same result, however, by specifying the
second duration not in relation to the "main" event but to the already
delayed event:

after =
#(define-music-function (parser location music time event)
  (ly:music? ly:duration? ly:music?)
  "Place @var{event} at a relative duration @var{time} in relation
to @var{music}."
  #{ \context Voice << { \skip $time <>$event } <>$music >> #})

{
  \after { c'1\p } 4 \after \< 1*1/6 \!
}

This is now in "time order" but I am not really convinced that it is
less confusing.

-- 
David Kastrup




reply via email to

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