Positioning of a tiny voice

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Positioning of a tiny voice

Noeck
Hi,

I would like to add small notes into an already populated staff.
It is the right hand of a piano staff and I don’t want real voices with
their shifts. The tiny font size distinguishes the "upper" voice
already. It should have the least impact possible on the "music" voice.

Here is one example measure:


\version "2.19.84"

upper = \relative {
  \tiny
  \stemUp
  s4 b''
}

music = \relative {
  \key e \minor
  \time 2/4
  b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
}

\new Staff << \upper \music >>


How to move the b'' exactly on top of the chord below?
What to do about this warning?

warning: this Voice needs a \voiceXx or \shiftXx setting
  b'8 <b, e g>16 c' <
                     b, e g b>8 <b e g>16 b'


Cheers,
Joram

Reply | Threaded
Open this post in threaded view
|

Re: Positioning of a tiny voice

Kieren MacMillan
Hi Joram,

> How to move the b'' exactly on top of the chord below?
> What to do about this warning?

Does this workaround/hack suit your needs?

%%%
\version "2.19.83"

upper = \relative {
 \tiny
 \stemUp
  s4 b''
}

music = \relative {
 \key e \minor
 \time 2/4
 b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
}

\new Staff { \voices 1,2 << \music \\ { \voiceThree \shiftOff \upper } >> }
%%%

Hope it helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Positioning of a tiny voice

Noeck
> Does this workaround/hack suit your needs?

Hi Kieren,

unfortunately not, because the "music" voice should behave like a
\oneVoice. But the following works for me:

\new Staff <<
  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>


Why did you use \voices 1,2 in your example?
And I’d like to understand why it does not work without the \\. I
thought that this was just a shorthand for \voiceOne and …Two
respectively. Thank you!

Best,
Joram

Reply | Threaded
Open this post in threaded view
|

Re: Positioning of a tiny voice

Kieren MacMillan
Hi Joram,

> the following works for me:
> \new Staff <<
>  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>

Glad you found a solution!

> Why did you use \voices 1,2 in your example?

Bad coding… Here’s a better snippet (including your \oneVoice fix):

%%%
\version "2.19.83"

upper = \relative {
 \tiny
  s4 b''
}

music = \relative {
 \key e \minor
 \time 2/4
 b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
}

\new Staff { \voices 1,3 << { \oneVoice \music } \\ { \shiftOff \upper } >> }
%%%

> And I’d like to understand why it does not work without the \\.
> I thought that this was just a shorthand for \voiceOne and …Two

No… << >> takes whatever’s inside and combines it into a single voice.

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Positioning of a tiny voice

David Kastrup
In reply to this post by Noeck
Noeck <[hidden email]> writes:

> Hi,
>
> I would like to add small notes into an already populated staff.
> It is the right hand of a piano staff and I don’t want real voices with
> their shifts. The tiny font size distinguishes the "upper" voice
> already. It should have the least impact possible on the "music" voice.
>
> Here is one example measure:
>
>
> \version "2.19.84"
>
> upper = \relative {
>   \tiny
>   \stemUp
>   s4 b''
> }
>
> music = \relative {
>   \key e \minor
>   \time 2/4
>   b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
> }
>
> \new Staff << \upper \music >>
>
>
> How to move the b'' exactly on top of the chord below?
> What to do about this warning?
>
> warning: this Voice needs a \voiceXx or \shiftXx setting
>   b'8 <b, e g>16 c' <
>                      b, e g b>8 <b e g>16 b'
You could try


\version "2.19.84"

upper = \relative {
  \tiny
  \stemUp
  s4 b''
}

music = \relative {
  \key e \minor
  \time 2/4
  b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
}

\new Staff << \new Voice \with { \override NoteColumn.ignore-collision = ##t } \upper
              \new Voice \music >>



--
David Kastrup
Reply | Threaded
Open this post in threaded view
|

Re: Positioning of a tiny voice

David Kastrup
In reply to this post by Kieren MacMillan
Kieren MacMillan <[hidden email]> writes:

> Hi Joram,
>
>> the following works for me:
>> \new Staff <<
>>  { \oneVoice \music } \\ { \voiceThree \shiftOff \upper } >>
>
> Glad you found a solution!
>
>> Why did you use \voices 1,2 in your example?
>
> Bad coding… Here’s a better snippet (including your \oneVoice fix):
>
> %%%
> \version "2.19.83"
>
> upper = \relative {
>  \tiny
>   s4 b''
> }
>
> music = \relative {
>  \key e \minor
>  \time 2/4
>  b'8 <b, e g>16 c' <b, e g b>8 <b e g>16 b'
> }
>
> \new Staff { \voices 1,3 << { \oneVoice \music } \\ { \shiftOff \upper } >> }
> %%%
>
>> And I’d like to understand why it does not work without the \\.
>> I thought that this was just a shorthand for \voiceOne and …Two
>
> No… << >> takes whatever’s inside and combines it into a single voice.

Not really.  << >> takes all items inside and interprets them in
parallel at the _current_ context level.  So with \new Staff << \upper
\music >>, the <<>> occurs at Staff level.  The first note event in
either sequence triggers the creation of a Voice context, but those
sequences trigger their own, separate Voices.

If we had \new Voice << ... >> your description would have been
correct.  Actually, I'd have used something like

\new Voice = "main" { \voices 1,"main" << \upper \\ \music >> }

myself here (that keeps \music in the main voice) but that's not really
sufficient since you'd want to switch off NoteColumn.ignore-collision
also.  So see my separate proposal.

--
David Kastrup