2010/12/23 Michael Ellis <michael.f.el...@gmail.com>:
> 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.

that sounds strange -- from what you write, it sounds like a problem
with the NoteNames context rather than with what you feed into it...
Can you give a simple example where that happens? Have you tried if
something simple like
  \context NoteNames { \repeat unfold 40 c'4 }
can provoke the same problem?

> 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 <jakob.be...@gmail.com> wrote:
>>
>> #(define (filterEvent event)
>>         (let ((name (ly:music-property event 'name)))
>>              (or
>>                (eq? name 'EventChord)
>>                (eq? name 'NoteEvent)
>>                (eq? name 'RelativeOctaveMusic)
>>                (eq? name 'SequentialMusic))))
>>
>> onlynotes = #(define-music-function (P L M) (ly:music?)
>>                                    (music-filter filterEvent M))
>>
>> { %\displayMusic
>>  \onlynotes
>>  \relative c'' { \key a \major cis d16 } }
>> ---------
>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to