[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accidentals from note grob
From: |
Thomas Morley |
Subject: |
Re: Accidentals from note grob |
Date: |
Thu, 1 Aug 2019 12:31:08 +0200 |
Am Do., 1. Aug. 2019 um 12:03 Uhr schrieb Nils Nommensen
<address@hidden>:
>
> Hello everyone,
>
> Is there any way to get the accidentals that belong to a specific notehead
> grob?
> When calling ly:grob-basic-properties on the notehead grob, you get a list
> with an attribute "parenthesis-friens", which has the object accidental-grob.
> However, it seems that this is not actually a grob object, because I can't
> call ly:grob-properties on it.
>
> Is there any way to do this? Any help would be greatly appreciated.
Via 'parenthesis-friends you'll get a list with names of grobs, i.e.
symbols, not the grob itself.
In IR 3.2.77 note-head-interface you'll find the 'accidental-grob in
"internal properties", to be called from NoteHead-grob via
ly:grob-object:
\version "2.19.83"
#(define get-accidental
(lambda (note)
(let* ((acc (ly:grob-object note 'accidental-grob)))
(if (ly:grob? acc)
(begin
(format #t "\n~a:\n~y" acc (ly:grob-properties acc))
(ly:grob-set-property! acc 'color red))))))
{
\once \override NoteHead.after-line-breaking = #get-accidental
cis'
<b dis' \tweak after-line-breaking #get-accidental fis'>
}
HTH,
Harm
- Accidentals from note grob, Nils Nommensen, 2019/08/01
- Re: Accidentals from note grob,
Thomas Morley <=
- Message not available
- Re: Accidentals from note grob, Thomas Morley, 2019/08/01
- Re: Accidentals from note grob, Nils Nommensen, 2019/08/01
- Re: Accidentals from note grob, Thomas Morley, 2019/08/01
- Re: Accidentals from note grob, Nils Nommensen, 2019/08/01
- Re: Accidentals from note grob, Thomas Morley, 2019/08/01
- Re: Accidentals from note grob, Nils Nommensen, 2019/08/02
- Re: Accidentals from note grob, Urs Liska, 2019/08/02
- Re: Accidentals from note grob, Nils Nommensen, 2019/08/02