lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme function help


From: David Kastrup
Subject: Re: scheme function help
Date: Mon, 06 May 2013 15:59:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stjepan Horvat <address@hidden> writes:

> When i do this

[...]

> and David yours makes
>
> (make-music
>   'SequentialMusic
>   'elements
>   (list (make-music
>           'SequentialMusic
>           'elements
>           (list (make-music (quote MarkEvent) (quote label) "A")
>                 (make-music
>                   'NoteEvent
>                   'duration
>                   (ly:make-duration 2 0 1)
>                   'pitch
>                   (ly:make-pitch 0 0 0))))))

I have no idea what you are referring to.  Nothing I proposed causes
this result with the input you gave.

In general, your approach is fundamentally flawed: it is very bad idea
to write code relying on user-specified music to be of a particular type
(in this case, SequentialMusic) without verifying it.  Either treat it
as an opaque block and wrap it in its own SequentialMusic wrapper, or
check that it _is_ SequentialMusic before doing operations that would
only make sense on SequentialMusic.

-- 
David Kastrup




reply via email to

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