lilypond-user
[Top][All Lists]
Advanced

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

Re: Function or command to omit only certain accidentals of a chord?


From: Caagr98
Subject: Re: Function or command to omit only certain accidentals of a chord?
Date: Wed, 31 Jan 2018 22:11:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

In that case, you could use something like this:

⋘
\version "2.19.80"

nth =
#(define-music-function
  (n tweak mus) (integer? ly:music? ly:music?)
  (single tweak (list-ref (ly:music-property mus 'elements) n))
  mus)

{
  <a cis>
  \nth 1 \omit Accidental <a cis> % Remember, zero-indexed
}
⋙

If you could be a bit more specific about your goal (hiding all sharps? Hiding 
accidentals on even-indexed notes? Hiding accidentals specifically on cis?), 
that would make it possible to make a more specific function for your goals.

(Note that this function can only be used inline, so it won't work with 
edition-engraver or similar.)


On 01/31/18 21:56, Stefano Troncaro wrote:
> I just tried it, but unfortunately it appears to only work when used inside 
> the chord, and I need to find a way to do it from outside.//
> 
> 2018-01-31 17:39 GMT-03:00 Caagr98 <address@hidden <mailto:address@hidden>>:
> 
>     You could try \single instead of \once, as in <a \single \omit Accidental 
> cs,>.
> 
>     On 01/31/18 21:27, Stefano Troncaro wrote:
>     > Hello again everyone!
>     >
>     > Suppose I have the following example:
>     >
>     > \version "2.19.80" \language "english" command = { %What should go here 
> to omit the sharp while keeping the natural? } \score { \new Staff { \new 
> Voice \relative c'' { \key b \minor \accidentalStyle modern \partial 4 <as 
> c,> |
>     >       <b b,> \command <a cs,> <g d~> <fs d>
>     >     } } }
>     >
>     > If for whatever reason I wanted to omit the sharp while keeping the 
> natural sign of the <a cs,>, obviously \once \omit Accidental won't work. I'm 
> at a loss as to how to tackle this problem, and looking through the 
> documentation hasn't helped.
>     >
>     > Does anyone have an idea?
>     > Stéfano
>     >
>     >
>     > _______________________________________________
>     > lilypond-user mailing list
>     > address@hidden <mailto:address@hidden>
>     > https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <https://lists.gnu.org/mailman/listinfo/lilypond-user>
>     >
> 
> 



reply via email to

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