[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: resetting accidentals at word breaks
From: |
Fr. Samuel Springuel |
Subject: |
Re: resetting accidentals at word breaks |
Date: |
Sun, 10 May 2020 16:39:46 -0400 |
> On 30 Apr, 2020, at 4:24 AM, Lukas-Fabian Moser <address@hidden> wrote:
>
> Hi Fr. Samuel,
>
>> So far I’ve determined that the articulations property is a music-list, but
>> I can’t seem to figure out how to look inside the music-list to see if it
>> contains a HyphenEvent. I tried using (member 'HyphenEvent <music-list>)
>> (and memq and memv) to look at this, but this is always coming back false
>> (i.e. not seeing the HyphenEvent). Any hints from the scheme professionals?
>
> Me not being a scheme professional by any means, nevertheless try:
>
> #(define (hyphen? mus) (music-is-of-type? mus 'hyphen-event))
> #(define (lyric? mus) (music-is-of-type? mus 'lyric-event))
>
> #(display (map
> (lambda (j) (if (lyric? j)
> (any hyphen? (ly:music-property j
> 'articulations))))
> (ly:music-property words_one 'elements)))
>
That got me over the hump and with some additional work, I’ve come up with the
attached. In addition to the combining lyrics function, this example also
integrates the NullLyrics definition and the bar insertion engraver. For
testing purposes it inserts a visible bar, though when I actually use it I’ll
change that to an empty bar. Comments are welcome.
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036
PAX ☧ ΧΡΙΣΤΟΣ
auto-empty-bar-between-words.ly
Description: Binary data