lilypond-user
[Top][All Lists]
Advanced

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

Re: voice solfege sequence


From: MING TSANG
Subject: Re: voice solfege sequence
Date: Sun, 20 Apr 2014 14:46:47 -0700 (PDT)

Hi, Thomas:
On Sunday, April 20, 2014 8:36:04 AM, Thomas Morley <address@hidden> wrote:
2014-04-20 14:30 GMT+02:00 Thomas Morley <address@hidden>:
> 2014-04-20 3:23 GMT+02:00 Thomas Morley <address@hidden>:
>> 2014-04-19 23:25 GMT+02:00 MING TSANG <address@hidden>:
>>> The color solfege will be showing on the lower
>>> stack in both case.
>
>> I found no convincing method to set the color for the TextScript, though.
>> I used a workaround, hoping someone else comes up with a better solution.
>
> Hi again,
>
> I found a way to clear the 'tweaks for newgrob:
>
> #(define (solfege-engraver lst dir)
>    (make-engraver
>      (acknowledgers
>      ((note-head-interface engraver grob source)
>        (let* (
>              (context (ly:translator-context engraver))
>              (tonic-pitch (ly:context-property context 'tonic))
>              (tonic-index (ly:pitch-notename tonic-pitch))
>              (event (ly:grob-property grob 'cause))
>              (event-copy (ly:event-deep-copy event))
>              (grob-pitch (ly:event-property event 'pitch))
>              (grob-index (ly:pitch-notename grob-pitch))
>              (delta (modulo (- grob-index tonic-index) 7))
>              (name (list-ref lst delta))
>              (newgrob (ly:engraver-make-grob engraver 'TextScript event-copy))

Please delete the following two lines:


>              (newgrob-cause (ly:grob-property newgrob 'cause))
>              (newgrob-tweaks (ly:event-property newgrob-cause 'tweaks))

)
>
>          ;; clear 'tweaks for newgrob
>          (ly:event-set-property! event-copy 'tweaks '())
>          (if (string= name "Hb")  (set! name "B"))
>          ;; Give newgrob 'outside-staff-priority depending on
>          ;; grob 'staff-position
>          (set! (ly:grob-property newgrob 'outside-staff-priority)
>                (+ (ly:grob-property newgrob 'outside-staff-priority)
>                  (* dir (ly:grob-property grob 'staff-position))))
>          (set! (ly:grob-property newgrob 'text) name)
>          (set! (ly:grob-property newgrob 'direction) dir) )))))
>
> HTH,
>  Harm

Thank you for modify the solfege-engraver.  
I copy and paste into the .ly file and ran.  Result: The below staff seems working, but "\xup" suppose to put the solfege above staff and now it is put below the staff instead - and the stacking is not right.  Any idea?

Emmanuel,
Ming.


Attachment: teat_num-nate-sequence.ly
Description: Text Data

Attachment: 2014-04-20_173755.png
Description: PNG image


reply via email to

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