Sometimes guitarists want the same piece two ways: with an added
TabStaff while learning and without the TabStaff when performing (for
brevity). But the code needed to tailor the tab generation also screws
up the notation when you don't want tab.
My music code has extensive use of "\set TabStaff.minimumFret" which
works fine when generating an explicit TabStaff.
But attempts to generate only an ordinary Staff from the same music code
are garbled by the automatic TabStaff that gets generated from all the
TabStaff settings embedded in that code.
MWE-TabStaff.ly is attached, and here is its output showing scores with
and without an explicit TabStaff
MWE-TabStaff.png
Commenting out the "\set TabStaff.minimumFret" works (no TabStaff
shown), but that also alters the explicit TabStaff and is not an option.
What's the easiest way to suppress the implicit TabStaff while
maintaining common code for both with/without tab?
Tags come to mind but I don't like the clutter or the hassle.
I'm hoping for a context setting that I could add somewhere (like in
\layout) to make an explicitly declared TabStaff produce no output.
I looked at TabStaff in the IR but didn't find anything at that level to
silence the whole thing. Also looked at Keeping contexts alive in the
NR for clues on how to suppress it.
How can I keep all my embedded TabStaff settings without showing an
implicit TabStaff?
TIA,
Jeff
\version "2.24.3"
\header { tagline = ##f }
#(ly:set-option 'tall-page-formats 'png)
#(ly:set-option 'use-paper-size-for-page #f)
mus = { \set TabStaff.minimumFret = #5
a b c' }
\score {
\new StaffGroup <<
\new Staff { \clef "treble_8" \mus }
\new TabStaff { \mus }
>>
}
\score {
\new Staff { \clef "treble_8" \mus }
}