[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AccidentalSuggestion only for cautionary accidentals?
From: |
Alexander Kobel |
Subject: |
Re: AccidentalSuggestion only for cautionary accidentals? |
Date: |
Sat, 14 Sep 2019 16:50:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
Hi Malte,
I second your opinion about cautionary accidentals as used in musica
ficta. As a workaround, the following probably produces what you want:
- automatic accidentals are untouched (which might actually _not_ be
what you want)
- ! gets typeset as Accidental
- ? gets typeset as AccidentalSuggestion
Not heavily tested, but it does the job for me. YMMV.
cautionaryAsSuggestions =
#(define-music-function (m) (ly:music?)
;; Caveat: not usable for chords!
(music-map
(lambda (ev)
(if (and (ly:music-property ev 'force-accidental #f)
(ly:music-property ev 'cautionary #f))
(make-music 'SequentialMusic
'elements (list (make-music 'ContextSpeccedMusic
'context-type 'Bottom
'element (make-music 'PropertySet 'once #t
'value #t 'symbol 'suggestAccidentals))
(music-map (lambda (orig)
(ly:music-set-property! orig
'cautionary #f)
orig)
ev)))
ev))
m))
#(set! toplevel-music-functions
(cons cautionaryAsSuggestions toplevel-music-functions))
HTH,
Alexander
On 31.08.19 20:37, Malte Meyn wrote:
> Hi list,
>
> currently setting suggestAccidentals to ##t lets the Accidental_engraver
> make AccidentalSuggestion grobs instead of both Accidental and
> AccidentalCautionary grobs. Shouldn’t this replacement be done only for
> cautionary accidentals? When transcribing mensural music, one needs both
> Accidental grobs (for accidentals present in the facsimile) and
> AccidentalSuggestion grobs (for implicit musical ficta accidentals). Any
> opinions on that?
>
> Cheers,
> Malte
>
> %%%%%%%%%%%%%%%%%%%%%%
>
> \version "2.19.83"
>
> \markup { without suggestAccidentals: }
> \relative {
> \time 2/1
> \set Staff.timeSignatureFraction = 2/2
> c''1 d
> bes1 a2 g
> a d1 cis?2
> d\breve
> }
>
> \markup { current output: }
> \relative {
> \set suggestAccidentals = ##t
> \time 2/1
> \set Staff.timeSignatureFraction = 2/2
> c''1 d
> bes1 a2 g
> a d1 cis?2
> d\breve
> }
>
> \markup { suggested output: }
> \relative {
> \time 2/1
> \set Staff.timeSignatureFraction = 2/2
> c''1 d
> bes1 a2 g
> a d1 \once \set suggestAccidentals = ##t cis?2
> d\breve
> }
>
> _______________________________________________
> bug-lilypond mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-lilypond
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: AccidentalSuggestion only for cautionary accidentals?,
Alexander Kobel <=