[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Staff.connectArpeggios not connecting all arpeggios
From: |
Rick Hansen (aka RickH) |
Subject: |
Re: Staff.connectArpeggios not connecting all arpeggios |
Date: |
Mon, 25 Sep 2006 12:40:10 -0700 (PDT) |
Perfect, thanks a lot.
Yes, I was unaware that \arpeggioBracket just changed the current stencil, I
mistakenly thought it was "active" like \arpeggio different only by what it
renders. I will re-wrap them similar to your example.
Mats Bengtsson-4 wrote:
>
> I think you have misunderstood what the macro \arpeggioBracket does.
> It doesn't draw an arpeggio itself, it just tells that all future
> arpeggios should be drawn as brackets instead of squiggled lines.
>
> Also, the macro only sets the arpeggio type in the current Voice
> context, whereas if you set connectArpeggios, they will be drawn within
> the Staff context. The solution to this is to redefine the normal
> \arpeggioBracket macro (which is defined in ly/property-init.ly)
> so that it does the setting at the Staff level. I have also added a new
> macro \arpeggioNormal that reverts to the default layout. Then, your
> example could look something like:
>
> arpeggioBracket =
> \override Staff.Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
>
>
> arpeggioNormal = \revert Staff.Arpeggio #'stencil
>
> varVoiceMelody = \relative c'' {
> %1
> \arpeggioBracket e4 \arpeggio \arpeggioNormal g\arpeggio
> \arpeggioBracket e\arpeggio \arpeggioNormal e\arpeggio
> |
> %2
> \arpeggioBracket e\arpeggio gs\arpeggio \arpeggioBracket e\arpeggio
> e\arpeggio
> |
> %3
> e1\arpeggio
> |
> }
>
> varVoiceInner = \relative c' {
> \stemDown
> %1
> s4 <e g c>\arpeggio s <e g c>\arpeggio
> |
> %2
> s4 <d b' d>\arpeggio s <e gs d' e>\arpeggio
> |
> %3
> s1
> |
> }
>
> varVoiceBass = \relative c'' {
> %1
> \arpeggioBracket c,2\arpeggio g2\arpeggio
> |
> %2
> e2\arpeggio b'2\arpeggio
> |
> %3
> e1\arpeggio
> |
> }
>
> \new Staff \with {
> \consists Span_arpeggio_engraver
> }
> {
> \set Staff.connectArpeggios = ##t
> \clef "treble"
> \key c \major
> \time 4/4
> <<
> \new Voice="voiceMelody" { \voiceOne \varVoiceMelody \oneVoice }
> \\
> \new Voice="voiceInner" { \voiceThree \stemNeutral
> \varVoiceInner
> \oneVoice } \\
> \new Voice="voiceBass" { \voiceTwo \varVoiceBass \oneVoice }
> >>
> \oneVoice
>
> }
>
>
> Of course, you could also redefine the \arpeggioBracket command to only
> do the setting \once.
>
> /Mats
>
>
> Quoting "Rick Hansen (aka RickH)" <address@hidden>:
>
>>
>> In the short example that follows the regular \arpeggio is connecting
>> itself
>> nicely across all 3 voices. However \arpeggioBracket fails to connect
>> itself. The desire in measures 1 and 2 below is to have beats 2 and 4
>> have
>> standard arpeggios and beats 1 and 3 to have bracket arpeggios. The 3rd
>> measure just demonstrates that the standard arpeggio connects fine in a
>> situation where I would need to use \arpeggioBracket. (\arpeggioBracket
>> is
>> very common to classical guitar notation where voices need to be sounded
>> simultaneously.)
>>
>> The example below will run as-is.
>>
>> How can I get \arpeggioBracket to appear across voices on all beats 1 and
>> 3
>> of this example?
>>
>>
>>
>> %EXAMPLE BEGIN
>>
>> \version "2.9.17"
>> \include "english.ly"
>>
>> varVoiceMelody = \relative c'' {
>> %1
>> e4\arpeggioBracket g\arpeggio e\arpeggioBracket e\arpeggio
>> |
>> %2
>> e\arpeggioBracket gs\arpeggio e\arpeggioBracket e\arpeggio
>> |
>> %3
>> e1\arpeggio
>> |
>> }
>>
>> varVoiceInner = \relative c' {
>> \stemDown
>> %1
>> s4 <e g c>\arpeggio s <e g c>\arpeggio
>> |
>> %2
>> s4 <d b' d>\arpeggio s <e gs d' e>\arpeggio
>> |
>> %3
>> s1
>> |
>> }
>>
>> varVoiceBass = \relative c'' {
>> %1
>> c,2\arpeggioBracket g2\arpeggioBracket
>> |
>> %2
>> e2\arpeggioBracket b'2\arpeggioBracket
>> |
>> %3
>> e1\arpeggio
>> |
>> }
>>
>> \new Staff \with {
>> \consists Span_arpeggio_engraver
>> }
>> {
>> \set Staff.connectArpeggios = ##t
>> \clef "treble"
>> \key c \major
>> \time 4/4
>> <<
>> \new Voice="voiceMelody" { \voiceOne \varVoiceMelody \oneVoice } \\
>> \new Voice="voiceInner" { \voiceThree \stemNeutral \varVoiceInner
>> \oneVoice } \\
>> \new Voice="voiceBass" { \voiceTwo \varVoiceBass \oneVoice }
>> >>
>> \oneVoice
>>
>> }
>>
>>
>> %EXAMPLE END
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Staff.connectArpeggios-not-connecting-all-arpeggios-tf2333306.html#a6491878
>> Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
>>
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
>
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
--
View this message in context:
http://www.nabble.com/Staff.connectArpeggios-not-connecting-all-arpeggios-tf2333306.html#a6493818
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.