[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: resetting accidentals at word breaks
From: |
Lukas-Fabian Moser |
Subject: |
Re: resetting accidentals at word breaks |
Date: |
Thu, 30 Apr 2020 10:24:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
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)))
*Question to the acutal experts:* In some snippets I found on the
user-list, there are constructions like:
#(define (name-of music)
(ly:music-property music 'name))
#(define (lyric? music)
(eq? (name-of music) 'LyricEvent))
in contrast to my above definition of "lyric?" using music-is-of-type?.
1) Which variant is to be preferred?
2) What is the difference between 'LyricEvent and 'lyric-event ?
Lukas
- Re: resetting accidentals at word breaks, (continued)
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/23
- Re: resetting accidentals at word breaks, Aaron Hill, 2020/04/23
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/25
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/25
- Re: resetting accidentals at word breaks, David Wright, 2020/04/25
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/28
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/28
- Re: resetting accidentals at word breaks, David Wright, 2020/04/29
- Re: resetting accidentals at word breaks, Fr. Samuel Springuel, 2020/04/29
- Re: resetting accidentals at word breaks,
Lukas-Fabian Moser <=