[Top][All Lists]

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

Change pitch in part of a music fragment

From: Jean-Julien Fleck
Subject: Change pitch in part of a music fragment
Date: Sat, 1 Dec 2018 20:29:59 +0100


I have a music fragment stored in a variable:

myfragment = \relative c' {c d e f g a b c d e f g}

The fragment was initially written for another instrument than the one I'm targeting so that the range is not big enough to play the whole fragment without octaviation. Here, for example, the target instrument would need use 

\relative c' {c d e f g a b c, d e f g} % note the comma after the middle c

Is it possible to use the variable \myfragment and manually tell lilypond (without editing the code of the fragment) that, for example here from the third time of the second measure until the end of the third measure, I would like to octaviate ?

The goal is obviously to be able to switch instruments without copy/pasting global music fragment but just locally tell lilypond to octaviate when needed for a given instrument.

Thanks for any hint.

JJ Fleck
Physique et Informatique
PCSI1 Lycée Kléber

reply via email to

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