I don't know if the following code is well written (suggestions are pretty welcome!!) but it works as I like (:)) and let me generate two different output according the tag midiOut or screenOut.
\version "2.19.40"
mynote = c
mynoteExp = {\mynote}
mynoteDouble = {<\mynote' \mynote>}
cC = {\tag #'midiOut \mynoteDouble
\tag #'screenOut \mynoteExp }
music =
{
\time 3/4 \clef bass
\cC
}
\score
{
\keepWithTag #'screenOut \music
\layout {}
}
\score
{
\keepWithTag #'midiOut \music
\layout {}
\midi {}
}
In the attached capture.png you can see the two different output, the first when using screenOut and the second using midiOut.
* * *
Now I would like to be able to increase the lenght of the musical _expression_ contained in the cC variable.
\changePitch {a2} \cC
but this does not work.
Here it is the whole code (I highlighted the differences compared to the previous example)
\include "changePitch.ly"
mynoteDouble = {<\mynote' \mynote>}
cC = {\tag #'midiOut \mynoteDouble
\tag #'screenOut \mynoteExp }
\keepWithTag #'screenOut \music
\keepWithTag #'midiOut \music
and in the attached file capture2 you can find the output for this second scenario.
Consider that:
- the variable cC will always contain a single note or a single chord
- I tried using changepitch but any other (possibly simpler) way is welcome
Any suggestion?
Thank you, g.