lilypond-user
[Top][All Lists]
Advanced

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

Re: Transposing instruments


From: David Kastrup
Subject: Re: Transposing instruments
Date: Fri, 08 Jun 2012 14:03:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Gilles Sadowski <address@hidden> writes:

>> oboe      = \relative c'' { \key g \minor      d16 d8. ~ d4 }
>> clarinetB = \relative c'' { \transposition bes c16 c8. ~ c4 }
>> hornF     = \relative c'' { \transposition f   d16 d8. ~ d4 }
>> 
>> \score
>> {
>>   <<
>>     \new Staff \with { midiInstrument="oboe"        } { \oboe }
>>     \new Staff \with { midiInstrument="clarinet"    } { \clarinetB }
>>     \new Staff \with { midiInstrument="french horn" } { \hornF }
>>   >>
>>   \layout {}
>>   \midi {}
>> }
>> 
>> I think this is straight forward as the \transposition affects the
>> MIDI output only. And: it's well documented, I must admit.
>> http://www.lilypond.org/doc/v2.15/Documentation/notation/displaying-pitches#instrument-transpositions
>
> It is not more coding; and it is more efficient in the long term
> (maintenance): the more you separate contents (notes) from layout (\key,
> \transpose, \transposition), the eaiser it is to change one or the other.

>> >     \transposition bes { % make MIDI sound right
>> >       \transpose bes c { % transpose to clarinet notation
>> >          <<
>> >            \global
>> >            \transpose c bes { % transpose to concert pitch
>> >             \clarinetNotes
>> >            }
>> >          >>
>> >        }
>> >      }

If you really, really, really want to have the key from the default
declarations, it is much more straightforward to write

\transposition bes % This does not take an argument, it is a declaration
<< \transpose bes c \global  % default key shown in clarinet transposition
   \clarinetNotes
>>

-- 
David Kastrup




reply via email to

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