lilypond-user
[Top][All Lists]
Advanced

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

Re: how to avoid double sharps in \transpose?


From: Jean Abou Samra
Subject: Re: how to avoid double sharps in \transpose?
Date: Sat, 4 Feb 2023 21:45:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

On 04/02/2023 21:07, Kenneth Flak wrote:

> 
> This comes out correctly:
> 
> patright = {
>      <b d' g'>2 <c' e' g'> |
> }
> 
> right  = {
> #@(map (lambda (p) #{ \transpose c #p \patright #})
>         (event-chord-pitches #{ <c df d ef e f fs g af a bf b> #}))
> }
> 
> This, however, transposes the g c sequence to b e instead on the first 
> iteration:
> 
> patleft = {
>    g'2 c'
> }
> 
> left = {
> #@(map (lambda (p) #{ \transpose c #p \patleft #})
>         (event-chord-pitches #{ <c df d ef e f fs g af a bf b> #}))
> }
> 
> (note I also have to transpose patleft up one octave to get it on the same 
> stave as before...)


Not for me here, this prints the expected output:

\version "2.24.0"

\language english

patleft = {
   g'2 c'
}

left = {
#@(map (lambda (p) #{ \transpose c #p \patleft #})
        (event-chord-pitches #{ <c df d ef e f fs g af a bf b> #}))
}

{ \left }


If something like what you describe happens in the context of your score,
it most likely means that you accidentally shared the same music expression
between two different places. It might help to read

https://lilypond.org/doc/v2.25/Documentation/notation/how-to-prevent-sharing-of-music-expressions

(N.B. This section is new in the 2.25 documentation, but the
same applies in 2.24 or pretty much any version as far back
as I can remember.)


> I don't find any docs for event-chord-pitches anywhere...


All Scheme functions are documented here:

https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions

Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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