fazer666 <[email protected]> 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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user