On 19/02/16 03:11, Peter Crighton wrote:
% As discussed on the User mailing list, isolated durations are currently not
% accepted as expressions of type ly:music?, thus making it impossible to
% create functions expecting either music or isolated durations with an
% arbitrary number of post events.
% http://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00478.html
Example code not quoted: it demonstrated a limitedly useful circumvention rather than the problem. One straightforward fix would be to provide for supporting an event-list? predicate that would then deliver an arbitrary-length (including zero) list of post-events. Another somewhat more cumbersome way would be to allow the PostEvents container music type (used in some restricted manners inside of the parser) to package multiple events also for post-event function arguments. However, that would likely complicate matters for the user since it might make that music event pop up in a number of places where it's never seen before.
For better or worse, this issue here is only about allowing bare rhythmic durations, previously allowed only inside of music sequences, as proper function arguments.
Diff:
Issue 4779: Accept isolated durations as music function arguments
Also contains commits:
Use new arguments of make_duration
Let make_duration accept preexisting durations and factor
Let make_music_from_simple accept numbers/durations
parser.yy: factor out "multipliers" from "multiplied_duration"
parser.yy: Remove redundant duration_length
http://codereview.appspot.com/288380043
Passes make, make check and a full make doc.
Patch on countdown for March 4th - there is a comment on Rietveld from HoangMinh but it is not clear what point is being made.
Patch counted down - please push
author David Kastrup dak@gnu.org
Thu, 25 Feb 2016 15:40:14 +0000 (16:40 +0100)
committer David Kastrup dak@gnu.org
Fri, 4 Mar 2016 11:37:16 +0000 (12:37 +0100)
commit ce2a857e5a40690ef05451afcbb7c0dbc49bd718