Yes, transpose will do that for sections of notes. However that means
putting the original section of notes into one set of tweaks and the
transposed section into the other set of tweaks and putting more skips
into the original melody line. Which partially defeats reusing one
melody line because I end up breaking the original melody into multiple
pieces. My original thought was to have one clean melody line and then
just make necessary tweaks to it for different instruments. One can
argue whether an octave change for some note sections in a melody line
counts as the "original" melody but that's a whole other conversation.
Having said that, however, for my particular needs I only have a small
number of sections to make the octave change so it's not a big deal. If
I had many sections this would get somewhat cumbersome.
Thanks, for the feedback. For my current purposes this will work.
\version "2.24.2"
MelodyTwo = \relative c' {
d4 d d d
}
melody = \relative c' {
c4 d e f |
c d e f |
s4 c c c | % first note needs to be octave higher.
s4 s s s | % this section needs to have different octave
e4 e e e | % back to same octave.
}
guitarTweaks = {
s1 |
\set restrainOpenStrings = ##f
\set minimumFret = #3
s4\3 s4*3 |
c'4 s s s |
\transpose c c' {\MelodyTwo} |
s1 |
}
banjoTweaks = {
s1 |
\set restrainOpenStrings = ##f
\set minimumFret = #1
s4\3 s4*3 |
c''4 s s s |
\MelodyTwo |
s1 |
}
\markup Guitar
\score {
\new TabStaff {
\new TabVoice {
<<
\melody
\guitarTweaks
>>
}
}
}
\markup Banjo
\score {
\new TabStaff \with {
stringTunings = #banjo-open-g-tuning
} {
\new TabVoice {
<<
\melody
\banjoTweaks
>>
}
}
}