Folks,
the following question came up (well, by me) in the recent thread start
by Urs Liska "Combine Text/Lyrics with bass figures":
The LilyPond parser (?) has some notion of "current duration": A note
with explicit duration sets the next duration that is assumed if none is
given. Hence { a4 b a b8 a b } will create three crotchets followed by
three quavers.
Is it possible to access this "current duration" from a music or scheme
function?
a) for reading: in order to create events with the same duration that
any note would get if directly entered?
(This is possible by using #{ $pitch #} and the like, but that does not
make the duration in itself scheme-readable.)
Something like { a8. \myFunction c16 } where \myFunction, for instance,
displays "I would create a 8."
b) for writing: in order to tell the parser which duration to assume for
the next explicitly entered note (if it does not have an explicit
duration) ?
Something like { a4 \myGunction b a } where \myGunction performs some
magic such that the following b a are interpreted as b8 a8?
Best
Lukas
- Access "current duration" from music function... Lukas-Fabian Moser
-