On Tue, 10 Sept 2024 at 17:04, Walt North <
waltnorth@gmail.com>
wrote:
>
> Is there any way to do this? What follows is a made up
example. I have a melody that may be shared across different
string instruments.
>
> I'd like to be able to reuse the melody notes and not
repeat that for each instrument. The different instruments may
require different restrain option, minimum frets and/or string
numbers throughout the piece.
Hello,
This seems to work.
guitarTweaks = {
s1 |
\set restrainOpenStrings = ##t
\set minimumFret = #3
s4\3 s4*3 |
}
banjoTweaks = {
s1 |
\set restrainOpenStrings = ##f
\set minimumFret = #5
s4\4 s4*3 |
}
\markup Guitar
\score {
\new TabStaff {
\new TabVoice {
<<
\melody
\guitarTweaks
>>
}
}
}
\markup Banjo
\score {
\new TabStaff \with {
stringTunings = #banjo-open-g-tuning
} {
\new TabVoice {
<<
\melody
\banjoTweaks
>>
}
}
}
Kind regards,
Xavier