Greetings,

I'm trying to reuse a melody with slight modifications.

I would like to be able to remove stem directives from a melody when it is
played alone

without having to copy, paste and remove

Can I do something like harmonyAlone = (string-replace \harmony "\stemDown"
"")

 

or 

melodyMinor = {c'2 g'2 es'2. d'4 |  c' es' d' c' | b d' g2  }

melodyMajor = {} %replace es with e

 

\version "2.24.3"

%I would like to be able to remove stem directives from a melody when it is
played alone

% without having to copy, paste and remove

% Can I do something like harmonyAlone = (string-replace \harmony
"\stemDown" "")

melody = {r4 \stemUp g'4 a' b' c''1}

harmony={r4 \stemDown g' fis' f' e'1}

harmonyAlone = \harmony %magic happens here

\layout {}

\score{

\new Staff <<{\melody} \\ {\harmony } >>

}

\score{

\new Staff \harmonyAlone

}

 

 

 

Be content; it is your birthright.

 

Peter

 

Reply via email to