lilypond-user
[Top][All Lists]
Advanced

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

Re: Can't use NoteNames twice in score block ??


From: Michael Ellis
Subject: Re: Can't use NoteNames twice in score block ??
Date: Thu, 23 Dec 2010 11:25:23 -0500

Thanks, Jakob! I didn't understand that a music-filter acts recursively on containers and their contents.  I had some vague notion that it simply passed or rejected elements at the top  level of a list.  Your example is what I needed.  For my purposes I needed to add RestEvent and TransposedMusic to the list of types but that was a logical extension once I saw the pattern.

#(define (filterEvent event)
        (let ((name (ly:music-property event 'name)))
             (or
               (eq? name 'EventChord)
               (eq? name 'NoteEvent)
               (eq? name 'RestEvent)
               (eq? name 'RelativeOctaveMusic)
               (eq? name 'TransposedMusic)
               (eq? name 'SequentialMusic))))   

With this, I can now create multiple staff scores with solfege symbols under each staff.  The only problem remaining is that the page layout is apparently not taking into account the extra vertical space needed for the solfege text, so I get incomplete systems at the bottom of the page. The layout has no problems if I remove the NoteNames contexts that generate the solfege.  

Do I need to add some other types to my filter or is this another problem altogether?

Cheers,
Mike


On Thu, Dec 23, 2010 at 5:15 AM, jakob lund <address@hidden> wrote:
#(define (filterEvent event)
        (let ((name (ly:music-property event 'name)))
             (or
               (eq? name 'EventChord)
               (eq? name 'NoteEvent)
               (eq? name 'RelativeOctaveMusic)
               (eq? name 'SequentialMusic))))

(P L M) (ly:music?)
                                   (music-filter filterEvent M))

{ %\displayMusic
 \onlynotes
 \relative c'' { \key a \major cis d16 } }
---------


reply via email to

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