lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with transposition


From: David Kastrup
Subject: Re: Problem with transposition
Date: Thu, 02 May 2013 15:18:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

fazer666 <address@hidden> writes:

> fazer666 <fazer666 <at> free.fr> writes:

> OK, let's write it shorter (just as example, it's only a excerpt of my whole 
> code) :
>
> \score 
> {
>   <<
>     \chords
>     {
>       \transposition bes
>       gis,1:m7.5- cis:7
>     }
>     \new Staff \relative g'
>     {
>       \transposition bes
>       b8 d fis2~ fis8 gis | f2 cis' |
>     }
>   >>
> }
>
> This doesn't work : in midi file melody is OK (I hear F# for gis
> written in code) but chords doesn't (I hear B chord for b written in
> code. I should hear A chord).

This is arguably a bug, and here is the synopsis:

\transposition bes basically is the same as
\set Staff.instrumentTransposition = #{ bes #}

and the ChordNames context created by \chords does not count as Staff.
So this likely creates a staff of its own independent from the
ChordNames and keeps its transposition in there.  Two ways out: the one
that likely should get into LilyPond proper would be
\layout {
  \ChordNames
  \alias "Staff"
}
and then overrides for Staff should arrive in ChordNames.  Since
ChordNames is not accepted into a Staff (at least not by default) that
should not be a source for different problems but I am not sure that we
don't have user code examples where ChordNames _are_ made to be accepted
into a Staff.

At any rate, something that should work nicely enough in LilyPond 2.16
would be

\chords \with { \transposition bes } { ... }

since then LilyPond ignores that the override is supposed to apply at
Staff level.

> What am I doing wrong ?

In this case, likely triggering a bug.  Don't do that.

-- 
David Kastrup




reply via email to

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