lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatically identify beats


From: Thomas Morley
Subject: Re: Automatically identify beats
Date: Sun, 7 Oct 2018 21:26:09 +0200

Am So., 7. Okt. 2018 um 18:00 Uhr schrieb David Kastrup <address@hidden>:
>
> Thomas Morley <address@hidden> writes:
>
> > If you have too much time, you may have a look at ‘scheme-engraver.ly’
> > from
> > http://lilypond.org/doc/v2.13/input/regression/collated-files.html The
> > newer file uses the great 'make-engraver'-macro (by David Kastrup).
> > Otoh, this macro hides an engraver _is_ a list (which is obvious, if
> > you look in the older file).
>
> An engraver is not a list, just like it isn't a string like
> "Note_engraver".  That's just how you _specify_ an engraver.  If it's a
> list, the Scheme_engraver type will be used for actually instantiating
> an engraver (which is bound to a particular context), initialized using
> the list contents.

Hi David,

I don't understand the subtleties.
Could you elaborate a bit using the examples below.

testI =
  #(list
    (cons 'initialize
     (lambda (trans)
       (write trans))))

testII =
  #(lambda (ctx) testI)

\layout {
  \context {
    \Voice
    \consists #testI
    \consists #testII
  }
}

{ R1 }

testI is a list, testII a procedure using testI.
Both return #<Translator Scheme_engraver >, though.

Thanks,
  Harm



reply via email to

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