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: Thu, 25 Oct 2018 23:04:22 +0200

Am Do., 25. Okt. 2018 um 14:30 Uhr schrieb David Kastrup <address@hidden>:
>
> Thomas Morley <address@hidden> writes:
>
> > Am Di., 9. Okt. 2018 um 01:24 Uhr schrieb David Kastrup <address@hidden>:
> >>
> >> David Kastrup <address@hidden> writes:
> >>
> >> > namely a bunch of Translator_creator s creating C++ engravers (maybe the
> >> > print expression should at least mention _which_ C++ engraver in order
> >> > to make them look less similar)
> >>
> >> which is actually pretty hard since the Translator_creator type is
> >> identical for all C++ translators and is just instantiated with an
> >> allocator function able to create the required type of C++ translator.
> >> So basically all a Translator_creator instance can do is, well, create a
> >> translator.  It has no other type-dependent information and I would not
> >> want to create a translator when printing just so that I can look up its
> >> name.
> >>
> >> So 2.21 material.
> >>
> >> --
> >> David Kastrup
> >
> > For the record.
> >
> >>From a users point of view, you can already use ly:translator-name.
> > (Works for all tested guile-versions)
>
> Oh.  Well, that's for registered translator creators, apparently.  That
> would imply that ly:translator-name no longer works for actual
> translators, just for registered translator creators.
>
> I think that this may be a regression as compared to previous behavior
> where you could get the name of an actual translator (the first argument
> of most engraver callbacks).
>
> More involved than I remembered.
>
> --
> David Kastrup

Hi David,

nothing new, merely to confirm:

I checked several ly-versions (since 2.8.0) with

#(let*  ((all-trans (ly:get-all-translators))
         (first-three (take all-trans 3)))
(format #t
"\n\nLilyPond-version:\n\t~a
First three from (ly:get-all-translators):\n\t~a
Check with ly:translator?:\n\t~a
Their names from ly:translator-name:\n\t~a"
  (lilypond-version)
  first-three
  (map ly:translator? first-three)
  (map ly:translator-name first-three)))

The results differ somewhere after 2.18.2:

LilyPond-version:
    2.18.2
First three from (ly:get-all-translators):
    (#<Translator Dynamic_align_engraver > #<Translator
Custos_engraver > #<Translator Cluster_spanner_engraver >)
Check with ly:translator?:
    (#t #t #t)
Their names from ly:translator-name:
    (Dynamic_align_engraver Custos_engraver Cluster_spanner_engraver)

LilyPond-version:
    2.19.82
First three from (ly:get-all-translators):
    (#<Translator_creator> #<Translator_creator> #<Translator_creator>)
Check with ly:translator?:
    (#f #f #f)
Their names from ly:translator-name:
    (Bend_engraver Grace_beam_engraver Figured_bass_position_engraver)

Cheers,
  Harm



reply via email to

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