On 2015/04/04 20:20:33, dak wrote:
On 2015/04/04 16:17:20, david.nalesnik wrote:

> Music is used.  For example, looking at what sort of object must be
produced
by
> \shape:
>
> #(display (car (ly:music-function-signature shape)))
>
> ==>
>
> (#<primitive-procedure ly:music?> . #<Prob: Music C++: Music((void .
#t))((name
> . Music) (types general-music)) >
> )
>
> This patch would leave an empty entry for types.  That doesn't
matter here --
> The predicate ly:music? works just fine.  I just wonder if there
would ever be
> cause to recognize Music by its types, as for example, a engraver
would
> recognize NoteEvent by note-event.

The usual way to recognize music types is by music-is-of-type? and the
name is
not generally used except for subclassing.  Music would likely not be
interesting though.

Of course "general-music" could be used to group music objects, too.
However, from what I can gather, it is a remnant of times past when
engravers accepted Music objects by way of "general music" (instead of
stream events) and figured out what specific kind they were there.


https://codereview.appspot.com/222090043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to