Re: print bass staff not always

2019-01-22 Thread Andrew Bernard
Hi Gianmaria,

I am indebted to you for introducing me to the word escamotage. I have
never heard it before!

Andrew
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: print bass staff not always

2019-01-22 Thread Gianmaria Lari
I found an issue with \RemoveEmptyStaves. It also remove \Dynamics.

So, if I write something like this

\version "2.19.82"
\score {
  \new PianoStaff { <<
\new Staff {a4 b c' d'}
\new Dynamics {s4\pp}
  >> }
  \layout {
\context {
  \PianoStaff
  \RemoveEmptyStaves
  \remove "Keep_alive_together_engraver"
  \override VerticalAxisGroup.remove-first = ##t
}
  }
}

the music dynamic is not engraved. How can I fix this? Normally I put the
dynamics in the same staff as music but in this case the score is pretty
complex and I would prefer use a specific "staff". Is there any solution to
this?

Thank you, g.
P.S. To Andrew: well as you saw my english it's pretty imprecise. So if you
will be patient from me you will teach a lot of new words
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: print bass staff not always

2019-01-22 Thread Andrew Bernard
Hi Giammaria,

No, it's a valid English word!

Andrew


On Tue, 22 Jan 2019 at 19:58, Gianmaria Lari 
wrote:

>
> P.S. To Andrew: well as you saw my english it's pretty imprecise. So if
> you will be patient from me you will teach a lot of new words
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Title Position Off

2019-01-22 Thread Lukas-Fabian Moser

Am 22.01.19 um 02:13 schrieb Aaron Hill:

I forgot \with-dimensions-from was a thing:


#(define-markup-command (faux-raise layout props amount arg) (number? 
markup?)

  (interpret-markup layout props
    (markup #:with-dimensions-from arg (#:raise amount arg



Now that's immensely useful! Of course not for everyday use, but 
sometimes you want to tell Lilypond: Trust me, I know what I'm doing, 
trust translate it a bit with respect to the position you'd normally 
use. (Similar to the extra-offset property for grobs).


So, one might add:

#(define-markup-command (extra-offset layout props amounts arg) 
(number-pair? markup?)

   (interpret-markup layout props
 (markup #:with-dimensions-from arg (#:translate amounts arg

Best
Lukas


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2019-01-22 Thread David Kastrup
Valentin Villenave  writes:

> On 1/21/19, Aaron Hill  wrote:
>> That seems like such a useful pattern.
>
> Agreed.
>
>> Why is it only mentioned once
>> and buried away in extending.pdf?  Also, there is no use of it in the
>> entirety of the LSR.
>
> Well, grob-transformer is a relatively new function (it was introduced
> after 2.18, which makes it unvailable on the LSR for now). You can,
> however, find plenty of LSR snippets where the stencil is rewritten as
> a lambda function (just not with grob-transformer)…

That wouldn't help here since the point of grob-transformer is to have
the "old" value available (where the definition of "old" can be tricky
when there are other local modifications around).

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


define and define-markup-command

2019-01-22 Thread Paolo Cantamessa
Hello guys,
I need to undesrtand how work "define" and "define-markup-command".

This work: 
#(define (testA txt mus y-offset)
   #{\markup \vcenter {
 #txt
 \column {
   \null
   \vspace #1
   \score {
 { $mus }
 \layout {
   indent = 0
   \override Score.Clef.space-alist.time-signature = #'(extra-space
. 0.5)
   \override Score.TimeSignature.space-alist.first-note =
#'(extra-space . 0)
 }
   }
   \vspace #(1+ y-offset)
   \null
 }
 \hspace #.5
   } #})

\relative c'' {
  \set Staff.instrumentName = #(testA "Strumento" #{ c''4 #} -.01)
  c4 d e f
}


This doesn't work:
#(define-markup-command (testB props layout txt mus y-offset)(markup?
ly:music? number?)
   (interpret-markup props layout #{
 \markup \vcenter {
   #txt
   \column {
 \null
 \vspace #1
 \score {
   { $mus }
   \layout {
 indent = 0
 \override Score.Clef.space-alist.time-signature =
#'(extra-space . 0.5)
 \override Score.TimeSignature.space-alist.first-note =
#'(extra-space . 0)
   }
 }
 \vspace #(1+ y-offset)
 \null
   }
   \hspace #.5
 } #}))


\relative c'' {
  \set Staff.instrumentName = ""%\markup \testB "Strumento" { c''4 } #-.01
  c4 d e f
}



[image: Mailtrack]

Sender
notified by
Mailtrack

22/01/19,
18:13:16
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Making espressivo longer

2019-01-22 Thread Andrew Bernard
What is the current best practice for scaling espressivo indicators, making
them longer?

There's a scale function in the archives from Harm, but I wonder if there
is a mechanism built in to 2.19.82 and so on?

Andrew
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Multiplication of multi mesure test

2019-01-22 Thread Paolo Cantamessa
Hello everybody,
who can help me for this problem?

This work:
{  R1 * 2 }

But I need of this and doesn't work:
{ R1 * #(+ 2 3) }

Many thanks.

Paolo




[image: Mailtrack]

Sender
notified by
Mailtrack

22/01/19,
18:04:23
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Pedal gradual release

2019-01-22 Thread Aaron Hill

On 2019-01-20 5:16 am, Andrew Bernard wrote:

Hi Aaron,

What we really want is a lovely curved bezier spline! I appreciate your
suggestion, but I personally would rather code PostScript than hack
hairpins to be pedal dynamics. I went through all that when I tried to 
do

this by hijacking text spanners, and it was never satisfactory.

The desire for nice gradual release curves was what led to a PostScript
concept.


I have been meaning to find a non-trivial project to allow me to dig 
into LilyPond and Scheme more than I usually do.  Your use case of 
gradual piano pedaling seemed a good fit.  As such, do not feel 
compelled at all to make use of this.  Certainly, it would be nice if it 
were actually used; but this has been a good learning exercise all the 
same.


And I should definitely note this is still a work-in-progress:


\version "2.19.82"

#(define ((gradual-piano-pedal-bracket shape) grob)
  (define (make-dashed-curve-stencil thick left right knots step)
(define (curve param)
  (let ((param (/ (- param left) (- right left)))
(degree (- (length knots) 1))
(points (list-copy knots)))
(for-each (lambda (outer) (for-each (lambda (inner)
(list-set! points inner (+ (* (- 1 param) (list-ref points 
(- inner 1)))
   (* param (list-ref points 
inner)

  (iota (+ (- degree outer) 1) degree -1))) (iota degree 1))
(list-ref points degree)))
(define (nearest-even num) (* 2 (inexact->exact (floor (/ num 2)
(let* ((steps (nearest-even (/ (- right left) step)))
   (step (/ (- right left) (- steps 1)))
   (x (iota steps left step))
   (y (map curve x)))
  (apply ly:stencil-add (map (lambda (n)
(make-line-stencil thick (list-ref x n) (list-ref y n)
  (list-ref x (+ 1 n)) (list-ref y (+ 1 n (iota (/ steps 2) 
0 2)

  (let* ((stencil (ly:piano-pedal-bracket::print grob))
 (width (interval-length (ly:stencil-extent stencil X)))
 (height (ly:grob-property grob 'edge-height '(1 . 1)))
 (layout (ly:grob-layout grob))
 (thick (ly:output-def-lookup layout 'line-thickness))
 (x-scale (- width thick))
 (shape-left (map (lambda (arg) (* (first arg) x-scale)) shape))
 (shape-right (append (drop shape-left 1) (list x-scale)))
 (shape-knots (map (lambda (arg) (drop arg 1)) shape)))
(if (grob::is-live? grob) (ly:stencil-add stencil
  (apply ly:stencil-add
(filter-map (lambda (left right knots)
(and (< 0 (length knots))
 (make-dashed-curve-stencil thick left right knots 
0.25)))

  shape-left shape-right shape-knots)))
  '(

#(define (number-list-list? arg) (and (list? arg) (every number-list? 
arg)))

gradualSustain = #(define-event-function (shape) (number-list-list?)
  #{ -\tweak stencil #(gradual-piano-pedal-bracket shape) \sustainOn #})

<<
  \new PianoStaff
  <<
\new Staff { \clef treble \repeat unfold 8 c''4 }
\new Staff { \clef bass \repeat unfold 8 c4 }
  >>
  \new Dynamics
\with {
  pedalSustainStyle = #'bracket
  \override PianoPedalBracket.edge-height = #'(2 . 3)
}
{ s4 s4*6\gradualSustain #'((0 2 2 0)(0.3)(0.4 0 5 -3 3)) 
s4\sustainOff }





\gradualSustain replaces \sustainOn, although a \sustainOff is still 
needed to terminate the bracket.  The parameter to \gradualSustain 
indicates the desired shape as a list of curve segments.  The first 
value in each segment indicates the left edge of the segment, specified 
as a fraction of the total bracket width.  The right edge is determined 
by the next segment in the list.


When included, the remaining values in each segment list indicate the 
desired height of the curve along the segment using an appropriately 
ordered Bezier.  There is no limit on the number values you can provide, 
as the code above computes Beziers of arbitrary order.


Breaking down the example above we have first a quadratic Bezier going 
from 0% to 30% along the horizontal that begins at two staff spaces 
above the base and ends at the bracket base.  The second entry in the 
list omits height values which is shorthand for no curve but it serves 
to terminate the first curve.  Finally, the last curve starts at 40% and 
continues to the end using a cubic Bezier.




There are still several improvements I plan on making:

- Broken pedal brackets are not supported, as it tries to apply the same 
curve to both parts.


- Curve segments are not connected visually if there is a discontinuity. 
 I presume a solid vertical line would be sufficient to join the broken 
ends, similar to how the ends meet the base of the pedal bracket.  
However, it might make sense for the vertical to be dashed as well.


- The dash width is hard-coded, but ideally should inherit the 
'dash-fraction and 'dash-period properties or otherwise mimic existing 
behavior.  Also, I did not account 

Re: define and define-markup-command

2019-01-22 Thread David Kastrup
Paolo Cantamessa  writes:

> Hello guys,
> I need to undesrtand how work "define" and "define-markup-command".
>
> This work: 
> #(define (testA txt mus y-offset)
>#{\markup \vcenter {
>  #txt
>  \column {
>\null
>\vspace #1
>\score {
>  { $mus }
>  \layout {
>indent = 0
>\override Score.Clef.space-alist.time-signature = #'(extra-space
> . 0.5)
>\override Score.TimeSignature.space-alist.first-note =
> #'(extra-space . 0)
>  }
>}
>\vspace #(1+ y-offset)
>\null
>  }
>  \hspace #.5
>} #})
>
> \relative c'' {
>   \set Staff.instrumentName = #(testA "Strumento" #{ c''4 #} -.01)
>   c4 d e f
> }

Scheme function, used in a Scheme expression.

> 
>
> This doesn't work:
> #(define-markup-command (testB props layout txt mus y-offset)(markup?
> ly:music? number?)
>(interpret-markup props layout #{

Ugh ugh ugh.  It's "layout props", not "props layout".  Likely does not
make a difference in this case since your use is also the wrong way
round, but it is pretty awful.

>  \markup \vcenter {
>#txt
>\column {
>  \null
>  \vspace #1
>  \score {
>{ $mus }
>\layout {
>  indent = 0
>  \override Score.Clef.space-alist.time-signature =
> #'(extra-space . 0.5)
>  \override Score.TimeSignature.space-alist.first-note =
> #'(extra-space . 0)
>}
>  }
>  \vspace #(1+ y-offset)
>  \null
>}
>\hspace #.5
>  } #}))
>
>
> \relative c'' {
>   \set Staff.instrumentName = ""%\markup \testB "Strumento" { c''4 } #-.01
>   c4 d e f
> }

Problem here is that markup arguments are parsed in markup mode.
Version 21.0 will contain an experimental feature where { c''4 } is
actually being parsed in music mode.  The current 2.19.82 (and the
upcoming 2.20) will not contain such a feature.  So you'd need to write

##{ c''4 #} instead, making this again a Scheme mode argument.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread David Kastrup
Paolo Cantamessa  writes:

> Hello everybody,
> who can help me for this problem?
>
> This work:
> {  R1 * 2 }
>
> But I need of this and doesn't work:
> { R1 * #(+ 2 3) }

It does here.  Maybe you should specify the version of LilyPond you are
using.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: define and define-markup-command

2019-01-22 Thread Paolo Cantamessa
Thank-you David,
now it works with "layout props" and ##{ music #}

Cheers

Paolo


[image: Mailtrack]

Sender
notified by
Mailtrack

22/01/19,
22:01:26

Il giorno mar 22 gen 2019 alle ore 20:40 David Kastrup  ha
scritto:

> Paolo Cantamessa  writes:
>
> > Hello guys,
> > I need to undesrtand how work "define" and "define-markup-command".
> >
> > This work: 
> > #(define (testA txt mus y-offset)
> >#{\markup \vcenter {
> >  #txt
> >  \column {
> >\null
> >\vspace #1
> >\score {
> >  { $mus }
> >  \layout {
> >indent = 0
> >\override Score.Clef.space-alist.time-signature =
> #'(extra-space
> > . 0.5)
> >\override Score.TimeSignature.space-alist.first-note =
> > #'(extra-space . 0)
> >  }
> >}
> >\vspace #(1+ y-offset)
> >\null
> >  }
> >  \hspace #.5
> >} #})
> >
> > \relative c'' {
> >   \set Staff.instrumentName = #(testA "Strumento" #{ c''4 #} -.01)
> >   c4 d e f
> > }
>
> Scheme function, used in a Scheme expression.
>
> > 
> >
> > This doesn't work:
> > #(define-markup-command (testB props layout txt mus y-offset)(markup?
> > ly:music? number?)
> >(interpret-markup props layout #{
>
> Ugh ugh ugh.  It's "layout props", not "props layout".  Likely does not
> make a difference in this case since your use is also the wrong way
> round, but it is pretty awful.
>
> >  \markup \vcenter {
> >#txt
> >\column {
> >  \null
> >  \vspace #1
> >  \score {
> >{ $mus }
> >\layout {
> >  indent = 0
> >  \override Score.Clef.space-alist.time-signature =
> > #'(extra-space . 0.5)
> >  \override Score.TimeSignature.space-alist.first-note =
> > #'(extra-space . 0)
> >}
> >  }
> >  \vspace #(1+ y-offset)
> >  \null
> >}
> >\hspace #.5
> >  } #}))
> >
> >
> > \relative c'' {
> >   \set Staff.instrumentName = ""%\markup \testB "Strumento" { c''4 }
> #-.01
> >   c4 d e f
> > }
>
> Problem here is that markup arguments are parsed in markup mode.
> Version 21.0 will contain an experimental feature where { c''4 } is
> actually being parsed in music mode.  The current 2.19.82 (and the
> upcoming 2.20) will not contain such a feature.  So you'd need to write
>
> ##{ c''4 #} instead, making this again a Scheme mode argument.
>
> --
> David Kastrup
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread Paolo Cantamessa
Hi David,
I use lilypond version "2.19.82".

I don't understand which type data is " * 2 " in this example { R1 * 2 }.
Char? String? Integer? Symbol? Whatever else?
Which mathematical operation should I do?

Many thanks.

Paolo




[image: Mailtrack]

Sender
notified by
Mailtrack

22/01/19,
22:09:40

Il giorno mar 22 gen 2019 alle ore 21:01 David Kastrup  ha
scritto:

> Paolo Cantamessa  writes:
>
> > Hello everybody,
> > who can help me for this problem?
> >
> > This work:
> > {  R1 * 2 }
> >
> > But I need of this and doesn't work:
> > { R1 * #(+ 2 3) }
>
> It does here.  Maybe you should specify the version of LilyPond you are
> using.
>
> --
> David Kastrup
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread David Kastrup
Paolo Cantamessa  writes:

> Hi David,
> I use lilypond version "2.19.82".

Check Issue 5327 in the issue tracker.  Slated for 21.0.

> I don't understand which type data is " * 2 " in this example { R1 * 2 }.
> Char? String? Integer? Symbol? Whatever else?
> Which mathematical operation should I do?

* 2 is not a data type.  1*2 is a duration with a multiplier.

>> > But I need of this and doesn't work:
>> > { R1 * #(+ 2 3) }

You could write

{ R $(ly:make-duration 0 0 (+ 2 3)) }

which creates a duration of duration-log 0, with 0 dots, and a
multiplier of 5 .

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Valentin Villenave
On 1/22/19, Andrew Bernard  wrote:
> What is the current best practice for scaling espressivo indicators, making
> them longer?

Apart from overriding the grob’s stencil, I don’t think it’s easily
achievable. I looked into redefining the script-stencil property, but
it only accepts a feta glyph and otherwise throws a very rude "assert
(false)".

> There's a scale function in the archives from Harm, but I wonder if there
> is a mechanism built in to 2.19.82 and so on?

I assume you’re referring to
https://lists.gnu.org/archive/html/lilypond-user/2013-04/msg00375.html
https://sourceforge.net/p/testlilyissues/issues/3315/
(a.k.a. "please remember I'm not a programmer" -> rrright.)

Cheers,
V.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread Valentin Villenave
On 1/22/19, Paolo Cantamessa  wrote:
> Hello everybody,
> who can help me for this problem?

Who can help you? LilyPond can! Just not with the version you’re
using; this will be made possible in the next 2.21 release (which is
already available to whoever can built it directly from the source
code, but it’s a bit technical, and frankly quite difficult for
Windows users).

So, you may need a bit of patience there.

Cheers,
V.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Thomas Morley
Am Di., 22. Jan. 2019 um 22:45 Uhr schrieb Valentin Villenave
:
>
> On 1/22/19, Andrew Bernard  wrote:

> > There's a scale function in the archives from Harm, but I wonder if there
> > is a mechanism built in to 2.19.82 and so on?
>
> I assume you’re referring to
> https://lists.gnu.org/archive/html/lilypond-user/2013-04/msg00375.html
> https://sourceforge.net/p/testlilyissues/issues/3315/
> (a.k.a. "please remember I'm not a programmer" -> rrright.)

Simply true ...

Best,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread Paolo Cantamessa
Yes, now it's clear.

Many thanks David, Cheers.

Paolo

Il giorno mar 22 gen 2019 alle ore 22:29 David Kastrup  ha
scritto:

> Paolo Cantamessa  writes:
>
> > Hi David,
> > I use lilypond version "2.19.82".
>
> Check Issue 5327 in the issue tracker.  Slated for 21.0.
>
> > I don't understand which type data is " * 2 " in this example { R1 * 2 }.
> > Char? String? Integer? Symbol? Whatever else?
> > Which mathematical operation should I do?
>
> * 2 is not a data type.  1*2 is a duration with a multiplier.
>
> >> > But I need of this and doesn't work:
> >> > { R1 * #(+ 2 3) }
>
> You could write
>
> { R $(ly:make-duration 0 0 (+ 2 3)) }
>
> which creates a duration of duration-log 0, with 0 dots, and a
> multiplier of 5 .
>
> --
> David Kastrup
>

[image: Mailtrack]

Sender
notified by
Mailtrack

22/01/19,
23:38:19
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread David Kastrup
Thomas Morley  writes:

> Am Di., 22. Jan. 2019 um 22:45 Uhr schrieb Valentin Villenave
> :
>>
>> On 1/22/19, Andrew Bernard  wrote:
>
>> > There's a scale function in the archives from Harm, but I wonder if there
>> > is a mechanism built in to 2.19.82 and so on?
>>
>> I assume you’re referring to
>> https://lists.gnu.org/archive/html/lilypond-user/2013-04/msg00375.html
>> https://sourceforge.net/p/testlilyissues/issues/3315/
>> (a.k.a. "please remember I'm not a programmer" -> rrright.)
>
> Simply true ...

"I don't want a medal.  I did what every decent person would have done."
People _want_ to believe that what you did was extraordinary enough that
they don't need to try themselves.

There is a programmer in every one of us.  And a computer is actually
pretty unlikely to punch you in the face.  Which reminds me that it's
time for another backup.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multiplication of multi mesure test

2019-01-22 Thread David Kastrup
Paolo Cantamessa  writes:

> Yes, now it's clear.

Now that's something I don't hear all too often.

All the best!

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Pedal gradual release

2019-01-22 Thread Andrew Bernard
Hi Aaron,

This would be great to go in the openlilylib library when ready, Thanks for
your help. I am sure that once available, many people will use this. It can
go alongside my pedal decoration code there (down with the help of several
others). Pedals have been somewhat neglected in lilypond, being rather
restricted to 19c practice, with that awful Ped. font from 1850 or so.

Andrew
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Valentin Villenave
On 1/22/19, David Kastrup  wrote:
> People _want_ to believe that what you did was extraordinary enough that
> they don't need to try themselves.

Well in this specific case I certainly do want to try; I can only wish
my code was as neat as Harm’s :-)

Programmer or not, the Free Software world has seen many people who
weren’t paid to write code (and often had a whole other job in their
daily lives) but whose contributions have been important and
appreciated. So the whole "programmer/not a programmer" dichotomy
sounds to me a bit like the "musician/not a musician" I often hear --
and have to respectfully dissent with. Only your work and
contributions matter, no matter your social status or acknowledged
profession.

V.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Pedal gradual release

2019-01-22 Thread Hwaen Ch'uqi
Greetings Aaron,

This is very exciting what you are doing! I have nothing to offer but
encouragement. As a professional pianist, I can tell you that the
technique is hardly new. As a composer who loves LilyPond, the ability
to at last achieve this pedal marking with a degree of flexibility is
sorely needed and thus priceless. Thank you so much for your
endeavors.

Hwaen Ch'uqi


On 1/22/19, Andrew Bernard  wrote:
> Hi Aaron,
>
> This would be great to go in the openlilylib library when ready, Thanks for
> your help. I am sure that once available, many people will use this. It can
> go alongside my pedal decoration code there (down with the help of several
> others). Pedals have been somewhat neglected in lilypond, being rather
> restricted to 19c practice, with that awful Ped. font from 1850 or so.
>
> Andrew
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Ben

On 1/22/2019 7:45 AM, Andrew Bernard wrote:
What is the current best practice for scaling espressivo indicators, 
making them longer?


There's a scale function in the archives from Harm, but I wonder if 
there is a mechanism built in to 2.19.82 and so on?


Andrew


Hi Andrew,

I had asked that question a while back on the mailing list in 2013, and 
I've still been using this - it's worked fine so far - fwiw.


Not sure if another approach exists but so far so good here :)

http://lilypond.1069038.n5.nabble.com/Help-with-espressivo-adjustments-td144373.html

%%

\language "english"

#(define ((longer-script x) grob)
   (let* ((stil (ly:script-interface::print grob)))
 (ly:stencil-scale stil x 1)))

scaleEspr =
#(define-event-function (parser location x-val)(number?)
   #{
 \tweak #'stencil #(longer-script x-val)
 \espressivo
   #})

\relative c'' {
  c4 e f\scaleEspr #1.1 g |
  f_\scaleEspr #2 f_\scaleEspr #2
  f_\scaleEspr #2
  f_\scaleEspr #2
  f\scaleEspr #2 f\scaleEspr #2 e\espressivo e\espressivo e\espressivo
}


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Andrew Bernard
Hi Ben,

Yes this is the code in the list archives that I was referring to in my
initial mail. My question was actually not so much how to achieve this, but
whether a technique for this has been incorporated into lilypond more
recently, similar to how hairpins can now be adjusted with the shorten-pair
technique common to other objects.

The problem I have with this code is that, finding that it works, I altered
it to allow scaling in the vertical axis as well, but that is highly
unsatisfactory as the line width gets scaled as well - perhaps why the code
omitted that feature to begin with.

Espressivo marks are just hairpin-like objects, and I suppose I can just
revert to using hairpins, but it's a bit annoying as you have to make a
separate voice for the hairpins to start and finish on non-existent notes.

This is one of those lilypond things where you give a person an inch and
they want a mile!

Andrew





On Wed, 23 Jan 2019 at 11:59, Ben  wrote:

> On 1/22/2019 7:45 AM, Andrew Bernard wrote:
>
> What is the current best practice for scaling espressivo indicators,
> making them longer?
>
> There's a scale function in the archives from Harm, but I wonder if there
> is a mechanism built in to 2.19.82 and so on?
>
> Andrew
>
> Hi Andrew,
>
> I had asked that question a while back on the mailing list in 2013, and
> I've still been using this - it's worked fine so far - fwiw.
>
> Not sure if another approach exists but so far so good here :)
>
>
> http://lilypond.1069038.n5.nabble.com/Help-with-espressivo-adjustments-td144373.html
>
> %%
>
> \language "english"
>
> #(define ((longer-script x) grob)
>(let* ((stil (ly:script-interface::print grob)))
>  (ly:stencil-scale stil x 1)))
>
> scaleEspr =
> #(define-event-function (parser location x-val)(number?)
>#{
>  \tweak #'stencil #(longer-script x-val)
>  \espressivo
>#})
>
> \relative c'' {
>   c4 e f\scaleEspr #1.1 g |
>   f_\scaleEspr #2 f_\scaleEspr #2
>   f_\scaleEspr #2
>   f_\scaleEspr #2
>   f\scaleEspr #2 f\scaleEspr #2 e\espressivo e\espressivo e\espressivo
> }
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making espressivo longer

2019-01-22 Thread Aaron Hill

On 2019-01-22 5:30 pm, Andrew Bernard wrote:

Hi Ben,

Yes this is the code in the list archives that I was referring to in my
initial mail. My question was actually not so much how to achieve this, 
but

whether a technique for this has been incorporated into lilypond more
recently, similar to how hairpins can now be adjusted with the 
shorten-pair

technique common to other objects.

The problem I have with this code is that, finding that it works, I 
altered

it to allow scaling in the vertical axis as well, but that is highly
unsatisfactory as the line width gets scaled as well - perhaps why the 
code

omitted that feature to begin with.

Espressivo marks are just hairpin-like objects, and I suppose I can 
just

revert to using hairpins, but it's a bit annoying as you have to make a
separate voice for the hairpins to start and finish on non-existent 
notes.


Would the following help you?


\version "2.19.82"

#(define (assoc-list? arg) (and (list? arg) (every pair? arg)))
espressivoII = #(define-event-function (args) (assoc-list?)
  (define (make-espressivo-stencil thick width height gap)
(let* ((inner (/ gap 2))
   (outer (+ width inner))
   (middle (/ height 2)))
  (ly:stencil-add
(make-line-stencil thick (- inner) 0 (- outer) middle)
(make-line-stencil thick (- outer) middle (- inner) height)
(make-line-stencil thick inner 0 outer middle)
(make-line-stencil thick outer middle inner height
  (let ((thick (ly:assoc-get 'thick args 0.12))
(width (ly:assoc-get 'width args 1.7))
(height (ly:assoc-get 'height args 0.9))
(gap (ly:assoc-get 'gap args 0.35)))
#{ \tweak stencil #(lambda (grob)
 (make-espressivo-stencil thick width height gap))
   \espressivo #}))

{ b'4 \espressivo
  b'4 \espressivoII #'()
  b'4 \espressivoII #'((width . 3.4))
  b'4 \espressivoII #'((thick . 0.24)(gap . 0.7)) }


I followed the pattern of \shape and \shapeII for the naming, but I 
opted for an association list for the arguments.  It is more verbose, 
but it makes it easy to support default values for those that are not 
specified.


The MetaFont code for the 'scripts.espr' glyph was a little tedious to 
reverse engineer.  So, I tried my best to match the original glyph with 
the default values provided.  I am sure there could be some 
improvements.


NOTE: I could not find a predicate for an association list, so I 
provided one here.  If I overlooked something that already exists, then 
we should swap out the predicate for that one.


-- Aaron Hill___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user