[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to enter explicit voices for use in Staff and TabStaff?
From: |
Thomas Morley |
Subject: |
How to enter explicit voices for use in Staff and TabStaff? |
Date: |
Fri, 27 Mar 2015 02:45:45 +0100 |
Hi all,
consider the following code:
\version "2.19.17"
mus =
\relative c'' {
<<
{ \voiceOne c r c r }
{ \voiceTwo r a r a}
>>
}
<<
\new Staff << \clef "G_8" \mus >>
\new TabStaff \mus
>>
It returns some warnings.
Although it could be resolved using the <<{...}\\{...}>> construct,
let us think about how to use explicit voices.
Though, using \new Voice like:
mus =
\relative c'' {
<<
{ \voiceOne c r c r }
\new Voice { \voiceTwo r a r a}
>>
}
<<
\new Staff << \clef "G_8" \mus >>
\new TabStaff \mus
>>
ouputs an additional Staff, entering TabVoice would output an
additional TabStaff.
It's absolut clear to me why this happens, though how to code that
Staff _and_ TabStaff behave as wanted?
Best would be to have a neutral Bottom-context.
Though, I found no way to do it within LilyPond, best I can come up with is:
mus =
\relative c'' {
<<
{ \voiceOne c r c r }
%\new Voice { \voiceTwo r a r a}
#(context-spec-music #{ \voiceTwo r a r a #} 'Bottom "foo")
>>
}
<<
\new Staff << \clef "G_8" \mus >>
\new TabStaff \mus
>>
Is there a better way to do it?
Or any chance to get a neutral 'Bottom-context for use with LilyPond-syntax?
Cheers,
Harm
- How to enter explicit voices for use in Staff and TabStaff?,
Thomas Morley <=