lilypond-devel
[Top][All Lists]
Advanced

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

Re: triggering translation from engraver


From: David Kastrup
Subject: Re: triggering translation from engraver
Date: Wed, 23 Aug 2017 18:22:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> Jan-Peter Voigt <address@hidden> writes:
>>
>>> Do you have another idea how to do that?
>>
>> Timing is established by iterators and they work on music expressions,
>> not events.  So you need to have an iterator in the race from the start.
>> Few iterators have variable length.  The sequential iterator can have an
>> elements-callback delivering music expressions.  Those can have a
>> structure and/or length determined at callback time.
>>
>> Kicking this into orderly operation does not seem like it would be
>> reasonably workable.
>>
>> Iterators are not user-definable at the moment.  Either a general
>> facility or a more specific "wait-iterator" would seem warranted.
>
> You might want to use \lyricsto to add your private control context to
> the Score context.  When switching off everything that can track
> melismata, you might get woken up once per event regardless of how long
> your actual expressions are.
>
> But it might make more sense to work on actual infrastructure for this
> rather than fudging around with existing facilities not intended for it.

Here is an example of fudging around (I don't understand all warnings,
but then LilyPond likely does not understand what I am doing here
either):

\layout {
  \context {
    \name "TimeKeeper"
    \type "Engraver_group"
    \consists "Script_engraver"
    \consists #(make-engraver
                ((process-music this)
                 (let ((grob (ly:engraver-make-grob this 'TextScript '())))
                  (set! (ly:grob-property grob 'text) "!"))))
  }
  \context {
    \Score
    \accepts "TimeKeeper"
  }
}

\fixed c'
\new Score = "myscore" <<
  \new TimeKeeper \lyricsto Score = "myscore" {
    \repeat unfold 200 \skip 1
  }
  \new Staff { c2 d e f a b c }
  \new Staff {
    \tuplet 3/2 2 { c2 d4 c f g c8 8 8 }
  }
>>

-- 
David Kastrup

reply via email to

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