lilypond-user
[Top][All Lists]

## Re: Temporary polyphonic passages in TabStaff

 From: Mats Bengtsson Subject: Re: Temporary polyphonic passages in TabStaff Date: Tue, 26 Jan 2010 14:35:05 +0100 User-agent: Internet Messaging Program (IMP) H3 (4.0.5)

```Quoting Federico Bruni <address@hidden>:
```
```But, beside that, the thing is: if I use \new Voice in that example,
LilyPond thinks it's part of a new Staff. Instead, I want to just
create a new voice, which should be then interpreted as
belonging to both (Staff)Voice and TabVoice in the StaffGroup of \score
block.
Is this possible?
```
```
```
The answer has already been given, namely to use the method shown in the second example of http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Common-notation-for-percussion#Percussion-staves The trick is to use the standard <<{...} \\ {...}>> construct for polophony. If you use version 2.12 or earlier, you also have to explicitly instantiate two TabVoice contexts (just replace DrumVoice by TabVoice in the example) called "1" and "2" (these names are hard coded and cannot be changed). If you use version 2.13, there's no need to explicitly instantiate these TabVoice contexts, LilyPond will automatically do the right thing when it sees a << \\ >> construct.
```
/Mats

```
```
Here's a minimal example:

\version "2.13.11"

guitar = \relative c' {

% Monophony
c4 d e f |

%% Temporary polyphony
<<
{
\voiceOne
c4 d e f |
}
\new Voice {
\voiceTwo
c,1 | % TODO: this is not printed in TabStaff, just in a new Staff
}
>>

% Back to monophony
\oneVoice
c'4 d e f |

}

\score {
\new StaffGroup <<
\new Staff <<
\clef "G_8"
\guitar
>>
\new TabStaff <<
\guitar
>>
>>
}

```
```

```