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: jakob lund
Subject: Re: Can't use NoteNames twice in score block ??
Date: Thu, 23 Dec 2010 22:28:49 +0100

2010/12/23 Michael Ellis <address@hidden>:
> 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 <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))))
>>
>> onlynotes = #(define-music-function (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]