lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is cross voice parenthesis arpeggios possible?


From: Thomas Morley
Subject: Re: Is cross voice parenthesis arpeggios possible?
Date: Sun, 18 Jan 2015 23:03:21 +0100

2015-01-18 19:35 GMT+01:00 Urs Liska <address@hidden>:
> Am 18.01.2015 um 19:08 schrieb Thomas Morley:
>
>> 2015-01-18 18:31 GMT+01:00 Samuel DA MOTA <address@hidden>:
>>>
>>> Hi,
>>>
>>> On the following documentation, it explains how to create arpeggios
>>> across notes in different voices.
>>>
>>> http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-as-lines#arpeggio
>>>
>>> I tried to tweak the example to get parenthesis arpeggios across
>>> voices, with no success.
>>>
>>> Can anyone help me?
>>> --
>>> Samuel DA MOTA
>>
>> Do you mean?: [...]
>>
>> The predefined arpeggioParenthesis is made for Bottom-context.
>> Simply add the correct context to the definition.
>
>
> Hm.
> How should anyone know this or find this out?
> From the referenced page from the NR it clearly looks like arpeggios are
> exclusively styled using the predefined commands, so when that doesn't help
> it's hard to see that it is possible at all.
>
> If you already know that predefined commands are actually shorthands for
> overriding grob properties you may think about following the link "See also:
> Internals reference" to
> http://lilypond.org/doc/v2.19/Documentation/internals/arpeggio
> On this page you would have to realize that
>
>  stencil (stencil):
>
>     ly:arpeggio::print
>
>     The symbol to print.
>
> is the property you are looking for, which is far from self-evident IMO (I
> would actually expect some property setting a 'style or whatever).
>
> And even if you'd already know that overriding the stencil might be what
> you're looking for, how would you know what to use to override it with?
> Where is ly:arpeggio::brew-chord-slur documented? In any case nowhere you'd
> reach it on that track.
>
> I would consider following the link "arpeggio-interface" to
> http://lilypond.org/doc/v2.19/Documentation/internals/arpeggio_002dinterface
> but there is absolutely nothing that helps.
>
> Apart from the current example of someone looking for an arpeggioParenthesis
> this once more shows how difficult it is to get one's way through the
> documentation.
>
> In short: this leads to asking on lilypond-user to be the most promising
> approach. Usually you'll get an answer here but I think there should be ways
> to make all this information easier to retrieve. Unfortunately I don't have
> a clue how one could do that ...
>
> Urs

Hi Urs,

best solution would be to have an easy to understand and easy to
document input-code.
Something like \shape:

[-]\shape displacements item (from NR)
Where 'item' is some kind of curve.
(When people struggle with \shape then because of the 'displacements',
not for 'item')

I tried to find something like that for 'arpeggioParenthesis' with the
possibility to specify the context, but let it default to 'Bottom.

I'm ashamed I couldn't figure how to use a function with an optional
argument for it.

Best I found is:

#(define* (parenthesized-arpeggio #:optional (ctx "Bottom"))
  #{
    \override #ctx . Arpeggio.stencil = #ly:arpeggio::brew-chord-slur
    \override #ctx . Arpeggio.X-extent = #ly:grob::stencil-width
    \revert #ctx . Arpeggio.dash-definition
  #})

But it seems it isn't possible to use it like:
\parenthesized-arpeggio Staff
(like a music-function)

@David K, any chance to make it work?


You can use it with the following syntax, though:
$(parenthesized-arpeggio)
or
$(parenthesized-arpeggio "Staff")
etc

Using it with cross-Staff-Arpeggios in PianoStaff will require an
additional _manual_ override for 'X-extent, though.
The default-procedure, 'ly:grob::stencil-width' returns a warning and
bad output.
A bug?

Cheers,
  Harm

Full code and examples:

\version "2.19.15"

#(define* (parenthesized-arpeggio #:optional (ctx "Bottom"))
  #{
    \override #ctx . Arpeggio.stencil = #ly:arpeggio::brew-chord-slur
    \override #ctx . Arpeggio.X-extent = #ly:grob::stencil-width
    \revert #ctx . Arpeggio.dash-definition
  #})


\relative c'' {
  $(parenthesized-arpeggio)
  <g b d g>4\arpeggio
  <g b d g>4\arpeggio
  <g b d g>4\arpeggio
}

\new Staff
  \with {
    \consists "Span_arpeggio_engraver"
  }
  \relative c'' {
    \set Staff.connectArpeggios = ##t
    <<
      \new Voice {
                \voiceOne
                <g b d g>4\arpeggio
                <g b d g>4\arpeggio
                $(parenthesized-arpeggio "Staff")
                <g b d g>4\arpeggio
      }
      \new Voice {
                \voiceTwo
                g,4\arpeggio
                g4\arpeggio
                g4\arpeggio
      }
    >>
  }

\new PianoStaff
  \relative c'' {
    \set PianoStaff.connectArpeggios = ##t
    <<
      \new Staff {
                <g b d g>4\arpeggio
                <g b d g>4\arpeggio
                $(parenthesized-arpeggio "PianoStaff")
                %% X-extent has to be set manual,
                %% using 'ly:grob::stencil-width' will return a warning and
                %% not convincing output
                \override PianoStaff.Arpeggio.X-extent = #'(-1 . 0)
                <g b d g>4\arpeggio
      }
      \new Staff {
                g,4\arpeggio
                g4\arpeggio
                g4\arpeggio
      }
    >>
  }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]