Re: Controlling hairpin length - revisited!

2017-01-07 Thread David Nalesnik
On Tue, Oct 11, 2016 at 10:28 AM, David Nalesnik
 wrote:
> Hi Kieren,
>
> On Tue, Oct 11, 2016 at 9:51 AM, Kieren MacMillan
>  wrote:
>> Hi David,
>>
>>> Further down in that thread is an implementation of shorten-pair with
>>> hairpins: 
>>> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00277.html
>>
>> The $1,000,000 Question: Why isn’t this in the distro?  =)
>
> I think the interaction between this and other properties has to be
> nailed down.  I'm not sure if it behaves "as expected" in conjunction
> with whatever other property affects endpoints (to-barline,
> bound-padding).
>
> I'd welcome testing.
>
> Also, there's the issue of programming language.  Should this
> enhancement be added to the C++ original--easy enough-- or should the
> distro ly:hairpin::print be replaced by a Scheme version?
>
> I'd like to see the stencil function in Scheme, because it would then
> be very convenient for users to adapt it to their needs.
>
> A drawback would be speed, but would that even be noticeable?
>


Patch here: https://sourceforge.net/p/testlilyissues/issues/5029/

Testing welcome!!

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


Re: Controlling hairpin length - revisited!

2016-10-20 Thread David Sumbler
On Fri, 2016-10-14 at 12:07 +0200, Thomas Morley wrote:
> Hi David:
> 
> 2016-10-11 15:51 GMT+02:00 David Sumbler :
> > 
> > The reasons for the long gap were (a) moving house in February and,
> > more importantly (b) feeling very discouraged by the apparent
> > unpredictability of hairpin lengths in Lilypond, despite all Harm's
> > valiant efforts.
> sorry for not being more helpful :(
> 
> 
> 2016-10-14 10:44 GMT+02:00 David Sumbler :
> > 
> > On Thu, 2016-10-13 at 23:54 +0200, Simon Albrecht wrote:
> > > 
> > > On 13.10.2016 14:41, David Sumbler wrote:
> > > > 
> > > > 
> > > > On Wed, 2016-10-12 at 14:10 -0400, Kieren MacMillan wrote:
> > > > > 
> > > > > 
> > > > > Hi David,
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > But I realise that often what I need in order to get
> > > > > > satisfactory
> > > > > > hairpins is more space between the note heads, and simply
> > > > > > moving
> > > > > > the
> > > > > > ends of the hairpin does not reposition the relevant notes.
> > > > > Have you tried adjusting the minimum-length?
> > > > > 
> > > > > %%%  SNIPPET BEGINS
> > > > > \version "2.18.2"
> > > > > \language "english"
> > > > > 
> > > > > after =
> > > > > #(define-music-function (parser location t e m)
> > > > >   (ly:duration? ly:music? ly:music?)
> > > > >   #{
> > > > >   \context Bottom <<
> > > > >   #m
> > > > >   { \skip $t <> -\tweak extra-spacing-width
> > > > > #empty-
> > > > > interval $e }
> > > > >   >>
> > > > >   #})
> > > > > 
> > > > > testing = \relative e'' {
> > > > >    \override Hairpin.minimum-length = #5
> > > > >    e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
> > > > > }
> > > > > 
> > > > > \score { \testing }
> > > > > %%%  SNIPPET ENDS
> > > > > 
> > > > > Hope that helps!
> > > > > Kieren.
> > > > Thanks, that's brilliant.  With this and Hairpin.shorten-pair I
> > > > should
> > > > be able to solve most or all of the problems I often find with
> > > > hairpins.
> > > > 
> > > > I have read all the material in the list archive relating to
> > > > this
> > > > function.
> > > Which function? \after?
> > Yes
> > 
> > > 
> > > after =
> > > %% create a music function with three arguments and assign it to
> > > the
> > > variable `after`
> > > #(define-music-function (parser location t e m)
> > > ;; give the types of the three arguments as predicate
> > > procedures
> > > (ly:duration? ly:music? ly:music?)
> > > ;; have the expression in #{#} evaluated by the LilyPond
> > > parser
> > > #{
> > >   %% Bottom is a kind of alias usually referring to Voice.
> > >   %% In this case, it’s there to prevent creating new Voices,
> > >   %% so the simultaneous music <<>> remains in one Voice.
> > >   \context Bottom <<
> > > %% first expression in the simultaneous music: the last
> > > argument
> > > passed to the function
> > > #m
> > > 
> > > %% second expression:
> > > %% \skip $t creates a skip of the duration given as first
> > > argument of the function
> > > %% <> is an empty chord with no duration
> > > %% the tweak prevents the spacing to be distorted by the
> > > inserted item $e
> > > %% empty-interval is defined in scm/lily-library.scm as
> > > #'(+inf.0 . -inf.0),
> > > %% i.e. actually an infinitely small interval. Maybe #'(0
> > > .
> > > 0)
> > > would work just as well,
> > > %% but it might also cause errors or unwanted behaviour.
> > > { \skip $t <> -\tweak extra-spacing-width #empty-interval 
> > > $e
> > > }
> > >   >>
> > > #})
> > > 
> > > HTH, Simon
> > Thank you - that is very helpful, and most of it is clear to me
> > now.
> > 
> > If I could bother you a bit further...
> > 
> > We have
> > #(define-music-function (parser location t e m)
> > 
> > In my file, I have at one point
> > \after 4 \> cs2\< ~ cs4
> > 
> > Clearly the value of t is 4 (a crotchet or quarter-note length);
> > e is \> (a hairpin);
> > m is cs2; or probably cs2\< (since the crescendo hairpin has to be
> > placed before the other dynamics).  I'm not quite sure what is
> > considered a single item of music.  What is the value of m here?
> > 
> > Looking at the function code, it seems that the music items are
> > processed in reverse order (which is what one would expect), i.e.
> > item
> > m is processed, then the additional item e, which is placed
> > later.  So
> > far, so good.
> > 
> > What I actually have at one point in the file is
> > \after 4 \mf \after 4 \> cs2\< ~ cs4
> > 
> > At the first call of the function, t has the value 4, but I'm a bit
> > unclear about how the rest is parsed.  What are the values of e and
> > m
> > in this case?
> > 
> > I imagine that the music items are processed in reverse order here
> > too,
> > i.e. cs2, then the diminuendo hairpin, then the mf mark.  By
> > experimenting I find that it doesn't make any practical 

Re: Controlling hairpin length - revisited!

2016-10-14 Thread Thomas Morley
Hi David:

2016-10-11 15:51 GMT+02:00 David Sumbler :
> The reasons for the long gap were (a) moving house in February and,
> more importantly (b) feeling very discouraged by the apparent
> unpredictability of hairpin lengths in Lilypond, despite all Harm's
> valiant efforts.

sorry for not being more helpful :(


2016-10-14 10:44 GMT+02:00 David Sumbler :
> On Thu, 2016-10-13 at 23:54 +0200, Simon Albrecht wrote:
>> On 13.10.2016 14:41, David Sumbler wrote:
>> >
>> > On Wed, 2016-10-12 at 14:10 -0400, Kieren MacMillan wrote:
>> > >
>> > > Hi David,
>> > >
>> > > >
>> > > > But I realise that often what I need in order to get
>> > > > satisfactory
>> > > > hairpins is more space between the note heads, and simply
>> > > > moving
>> > > > the
>> > > > ends of the hairpin does not reposition the relevant notes.
>> > > Have you tried adjusting the minimum-length?
>> > >
>> > > %%%  SNIPPET BEGINS
>> > > \version "2.18.2"
>> > > \language "english"
>> > >
>> > > after =
>> > > #(define-music-function (parser location t e m)
>> > >   (ly:duration? ly:music? ly:music?)
>> > >   #{
>> > >   \context Bottom <<
>> > >   #m
>> > >   { \skip $t <> -\tweak extra-spacing-width #empty-
>> > > interval $e }
>> > >   >>
>> > >   #})
>> > >
>> > > testing = \relative e'' {
>> > >\override Hairpin.minimum-length = #5
>> > >e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
>> > > }
>> > >
>> > > \score { \testing }
>> > > %%%  SNIPPET ENDS
>> > >
>> > > Hope that helps!
>> > > Kieren.
>> > Thanks, that's brilliant.  With this and Hairpin.shorten-pair I
>> > should
>> > be able to solve most or all of the problems I often find with
>> > hairpins.
>> >
>> > I have read all the material in the list archive relating to this
>> > function.
>> Which function? \after?
>
> Yes
>
>> after =
>> %% create a music function with three arguments and assign it to the
>> variable `after`
>> #(define-music-function (parser location t e m)
>> ;; give the types of the three arguments as predicate procedures
>> (ly:duration? ly:music? ly:music?)
>> ;; have the expression in #{#} evaluated by the LilyPond parser
>> #{
>>   %% Bottom is a kind of alias usually referring to Voice.
>>   %% In this case, it’s there to prevent creating new Voices,
>>   %% so the simultaneous music <<>> remains in one Voice.
>>   \context Bottom <<
>> %% first expression in the simultaneous music: the last
>> argument
>> passed to the function
>> #m
>>
>> %% second expression:
>> %% \skip $t creates a skip of the duration given as first
>> argument of the function
>> %% <> is an empty chord with no duration
>> %% the tweak prevents the spacing to be distorted by the
>> inserted item $e
>> %% empty-interval is defined in scm/lily-library.scm as
>> #'(+inf.0 . -inf.0),
>> %% i.e. actually an infinitely small interval. Maybe #'(0 .
>> 0)
>> would work just as well,
>> %% but it might also cause errors or unwanted behaviour.
>> { \skip $t <> -\tweak extra-spacing-width #empty-interval $e
>> }
>>   >>
>> #})
>>
>> HTH, Simon
>
> Thank you - that is very helpful, and most of it is clear to me now.
>
> If I could bother you a bit further...
>
> We have
> #(define-music-function (parser location t e m)
>
> In my file, I have at one point
> \after 4 \> cs2\< ~ cs4
>
> Clearly the value of t is 4 (a crotchet or quarter-note length);
> e is \> (a hairpin);
> m is cs2; or probably cs2\< (since the crescendo hairpin has to be
> placed before the other dynamics).  I'm not quite sure what is
> considered a single item of music.  What is the value of m here?
>
> Looking at the function code, it seems that the music items are
> processed in reverse order (which is what one would expect), i.e. item
> m is processed, then the additional item e, which is placed later.  So
> far, so good.
>
> What I actually have at one point in the file is
> \after 4 \mf \after 4 \> cs2\< ~ cs4
>
> At the first call of the function, t has the value 4, but I'm a bit
> unclear about how the rest is parsed.  What are the values of e and m
> in this case?
>
> I imagine that the music items are processed in reverse order here too,
> i.e. cs2, then the diminuendo hairpin, then the mf mark.  By
> experimenting I find that it doesn't make any practical difference
> whether I put the mf first and the hairpin second or vice versa.  But
> it would be nice to know just what is going on here.
>
> David

I always let things display to understand things better. In this case
you could do:

\version "2.19.48"

\language "english"

#(define counter 0)

after =
#(define-music-function (parser location t e m)
 (ly:duration? ly:music? ly:music?)

(set! counter (1+ counter))
(display "\n%%\n")
(format #t  "the function ran ~a. time" counter)
(display 

Re: Controlling hairpin length - revisited!

2016-10-14 Thread David Sumbler
On Thu, 2016-10-13 at 23:54 +0200, Simon Albrecht wrote:
> On 13.10.2016 14:41, David Sumbler wrote:
> > 
> > On Wed, 2016-10-12 at 14:10 -0400, Kieren MacMillan wrote:
> > > 
> > > Hi David,
> > > 
> > > > 
> > > > But I realise that often what I need in order to get
> > > > satisfactory
> > > > hairpins is more space between the note heads, and simply
> > > > moving
> > > > the
> > > > ends of the hairpin does not reposition the relevant notes.
> > > Have you tried adjusting the minimum-length?
> > > 
> > > %%%  SNIPPET BEGINS
> > > \version "2.18.2"
> > > \language "english"
> > > 
> > > after =
> > > #(define-music-function (parser location t e m)
> > >   (ly:duration? ly:music? ly:music?)
> > >   #{
> > >   \context Bottom <<
> > >   #m
> > >   { \skip $t <> -\tweak extra-spacing-width #empty-
> > > interval $e }
> > >   >>
> > >   #})
> > > 
> > > testing = \relative e'' {
> > >    \override Hairpin.minimum-length = #5
> > >    e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
> > > }
> > > 
> > > \score { \testing }
> > > %%%  SNIPPET ENDS
> > > 
> > > Hope that helps!
> > > Kieren.
> > Thanks, that's brilliant.  With this and Hairpin.shorten-pair I
> > should
> > be able to solve most or all of the problems I often find with
> > hairpins.
> > 
> > I have read all the material in the list archive relating to this
> > function.
> Which function? \after?

Yes

> after =
> %% create a music function with three arguments and assign it to the 
> variable `after`
> #(define-music-function (parser location t e m)
> ;; give the types of the three arguments as predicate procedures
> (ly:duration? ly:music? ly:music?)
> ;; have the expression in #{#} evaluated by the LilyPond parser
> #{
>   %% Bottom is a kind of alias usually referring to Voice.
>   %% In this case, it’s there to prevent creating new Voices,
>   %% so the simultaneous music <<>> remains in one Voice.
>   \context Bottom <<
> %% first expression in the simultaneous music: the last
> argument 
> passed to the function
> #m
> 
> %% second expression:
> %% \skip $t creates a skip of the duration given as first 
> argument of the function
> %% <> is an empty chord with no duration
> %% the tweak prevents the spacing to be distorted by the 
> inserted item $e
> %% empty-interval is defined in scm/lily-library.scm as 
> #'(+inf.0 . -inf.0),
> %% i.e. actually an infinitely small interval. Maybe #'(0 .
> 0) 
> would work just as well,
> %% but it might also cause errors or unwanted behaviour.
> { \skip $t <> -\tweak extra-spacing-width #empty-interval $e
> }
>   >>
> #})
> 
> HTH, Simon

Thank you - that is very helpful, and most of it is clear to me now.

If I could bother you a bit further...

We have
#(define-music-function (parser location t e m)

In my file, I have at one point
\after 4 \> cs2\< ~ cs4

Clearly the value of t is 4 (a crotchet or quarter-note length);
e is \> (a hairpin);
m is cs2; or probably cs2\< (since the crescendo hairpin has to be
placed before the other dynamics).  I'm not quite sure what is
considered a single item of music.  What is the value of m here?

Looking at the function code, it seems that the music items are
processed in reverse order (which is what one would expect), i.e. item
m is processed, then the additional item e, which is placed later.  So
far, so good.

What I actually have at one point in the file is
\after 4 \mf \after 4 \> cs2\< ~ cs4

At the first call of the function, t has the value 4, but I'm a bit
unclear about how the rest is parsed.  What are the values of e and m
in this case?

I imagine that the music items are processed in reverse order here too,
i.e. cs2, then the diminuendo hairpin, then the mf mark.  By
experimenting I find that it doesn't make any practical difference
whether I put the mf first and the hairpin second or vice versa.  But
it would be nice to know just what is going on here.

David

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


Re: Controlling hairpin length - revisited!

2016-10-13 Thread Simon Albrecht

On 13.10.2016 14:41, David Sumbler wrote:

On Wed, 2016-10-12 at 14:10 -0400, Kieren MacMillan wrote:

Hi David,


But I realise that often what I need in order to get satisfactory
hairpins is more space between the note heads, and simply moving
the
ends of the hairpin does not reposition the relevant notes.

Have you tried adjusting the minimum-length?

%%%  SNIPPET BEGINS
\version "2.18.2"
\language "english"

after =
#(define-music-function (parser location t e m)
  (ly:duration? ly:music? ly:music?)
  #{
  \context Bottom <<
  #m
  { \skip $t <> -\tweak extra-spacing-width #empty-
interval $e }
  >>
  #})

testing = \relative e'' {
   \override Hairpin.minimum-length = #5
   e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
}

\score { \testing }
%%%  SNIPPET ENDS

Hope that helps!
Kieren.

Thanks, that's brilliant.  With this and Hairpin.shorten-pair I should
be able to solve most or all of the problems I often find with
hairpins.

I have read all the material in the list archive relating to this
function.

Which function? \after?

after =
%% create a music function with three arguments and assign it to the 
variable `after`

#(define-music-function (parser location t e m)
   ;; give the types of the three arguments as predicate procedures
   (ly:duration? ly:music? ly:music?)
   ;; have the expression in #{#} evaluated by the LilyPond parser
   #{
 %% Bottom is a kind of alias usually referring to Voice.
 %% In this case, it’s there to prevent creating new Voices,
 %% so the simultaneous music <<>> remains in one Voice.
 \context Bottom <<
   %% first expression in the simultaneous music: the last argument 
passed to the function

   #m

   %% second expression:
   %% \skip $t creates a skip of the duration given as first 
argument of the function

   %% <> is an empty chord with no duration
   %% the tweak prevents the spacing to be distorted by the 
inserted item $e
   %% empty-interval is defined in scm/lily-library.scm as 
#'(+inf.0 . -inf.0),
   %% i.e. actually an infinitely small interval. Maybe #'(0 . 0) 
would work just as well,

   %% but it might also cause errors or unwanted behaviour.
   { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
 >>
   #})

HTH, Simon

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


Re: Controlling hairpin length - revisited!

2016-10-13 Thread David Sumbler
On Wed, 2016-10-12 at 14:10 -0400, Kieren MacMillan wrote:
> Hi David,
> 
> > 
> > But I realise that often what I need in order to get satisfactory
> > hairpins is more space between the note heads, and simply moving
> > the
> > ends of the hairpin does not reposition the relevant notes.
> Have you tried adjusting the minimum-length?
> 
> %%%  SNIPPET BEGINS
> \version "2.18.2"
> \language "english"
> 
> after =
> #(define-music-function (parser location t e m)
>  (ly:duration? ly:music? ly:music?)
>  #{
>  \context Bottom <<
>  #m
>  { \skip $t <> -\tweak extra-spacing-width #empty-
> interval $e }
>  >>
>  #})
> 
> testing = \relative e'' {
>   \override Hairpin.minimum-length = #5
>   e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
> }
> 
> \score { \testing }
> %%%  SNIPPET ENDS
> 
> Hope that helps!
> Kieren.

Thanks, that's brilliant.  With this and Hairpin.shorten-pair I should
be able to solve most or all of the problems I often find with
hairpins.

I have read all the material in the list archive relating to this
function.  Even so I don't really understand how it works.  I have a
reasonable understanding of basic Scheme, but much less of the internal
working of Lilypond and how Lilypond and Scheme interract (and yes, I
have read the Extending manual more than once).  Still, I think I
understand how to use the function, which is the main thing.

If anyone has the patience to explain the workings of the function I'd
be very interested. If not, I shan't blame you!

David

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


Re: Controlling hairpin length - revisited!

2016-10-12 Thread Kieren MacMillan
Hi David,

> But I realise that often what I need in order to get satisfactory
> hairpins is more space between the note heads, and simply moving the
> ends of the hairpin does not reposition the relevant notes.

Have you tried adjusting the minimum-length?

%%%  SNIPPET BEGINS
\version "2.18.2"
\language "english"

after =
#(define-music-function (parser location t e m)
 (ly:duration? ly:music? ly:music?)
 #{
 \context Bottom <<
 #m
 { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
 >>
 #})

testing = \relative e'' {
  \override Hairpin.minimum-length = #5
  e8 cs ds d \after 4 \> \after 4 \mf cs2\< ~ cs4 d8(\p cs)
}

\score { \testing }
%%%  SNIPPET ENDS

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Controlling hairpin length - revisited!

2016-10-12 Thread David Sumbler
Thanks for this and other replies to my original query.  The routine
works well.

It does what it says on the can - moving the ends of the hairpin - and
that will be very useful.

But I realise that often what I need in order to get satisfactory
hairpins is more space between the note heads, and simply moving the
ends of the hairpin does not reposition the relevant notes.

One example is where I want a crescendo, mf and decrescendo on a single
minim (in a very slow tempo!)  I have tried using spacer rests, thus:

e8 cs ds d << { cs2 ~ cs4 d8( cs) } { s4\< s2\mf\> s4\p } >> |

but it doesn't give enough space for the crescendo hairpin.  Replacing
's4\<' with 's8\< s8' makes no noticeable difference.

As an experiment I have also tried using  '<>4\<' and 'r4\<' (thinking
perhaps I could then make the rests invisible), but neither of these
works.  '<>4\<' produces "two simultaneous span-dynamic events" errors
which I don't get with the spacer rests version, for reasons I can't
fathom; also the output shows mf followed by a crescendo for some
mysterious reason.  'r4\<' gives errors with trying to put rests and
note-heads on the same stem, and also strange unterminated tie errors.

What is the neatest method of simply moving the right-hand note further
to the right to give more space for the hairpins and the mf?
 Everything following the second note needs to be similarly displaced,
of course.

David


On Tue, 2016-10-11 at 09:42 -0500, David Nalesnik wrote:
> Hi,
> 
> 
> On Tue, Oct 11, 2016 at 9:07 AM, tisimst 
> wrote:
> > 
> > David,
> > 
> > On Tue, Oct 11, 2016 at 8:01 AM, Kieren MacMillan [via Lilypond]
> > <[hidden
> > email]> wrote:
> > > 
> > > 
> > > Hi David,
> > > 
> > > > 
> > > > Just so that I have as many weapons as possible at my disposal,
> > > > are
> > > > there any other parameters which might directly affect the
> > > > horizontal
> > > > position of the left-hand end and/or the right-hand end or a
> > > > hairpin,
> > > > or its length?
> > > \after
> > > Hairpin.bound-padding
> > > Hairpin.X-offset
> > > Hairpin.extra-offset
> > > 
> > > Those are my main weapons.  =)
> > > Kieren.
> > 
> > Here's another solution I cooked up with more granular control of
> > both ends
> > of the hairpin:
> > http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00176.ht
> > ml
> > 
> > It's not perfect, but might do the job for you.
> > 
> 
> Further down in that thread is an implementation of shorten-pair with
> hairpins: http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg
> 00277.html
> 
> This will allow you independent control of the left and right ends,
> regardless of whether a dynamic or dynamics are preset.
> (Bound-padding works only when a dynamic is present, and affects
> right
> and left equally.).
> 
> It's a rewrite of the Hairpin stencil function.  One benefit of doing
> this is there is no scaling of the shortened or lengthened Hairpin.
> Possibly this avoids distortion.
> 
> HTH,
> 
> DN
> 
> 

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


Re: Controlling hairpin length - revisited!

2016-10-11 Thread David Nalesnik
Hi Kieren,

On Tue, Oct 11, 2016 at 9:51 AM, Kieren MacMillan
 wrote:
> Hi David,
>
>> Further down in that thread is an implementation of shorten-pair with
>> hairpins: 
>> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00277.html
>
> The $1,000,000 Question: Why isn’t this in the distro?  =)

I think the interaction between this and other properties has to be
nailed down.  I'm not sure if it behaves "as expected" in conjunction
with whatever other property affects endpoints (to-barline,
bound-padding).

I'd welcome testing.

Also, there's the issue of programming language.  Should this
enhancement be added to the C++ original--easy enough-- or should the
distro ly:hairpin::print be replaced by a Scheme version?

I'd like to see the stencil function in Scheme, because it would then
be very convenient for users to adapt it to their needs.

A drawback would be speed, but would that even be noticeable?

>
> Thanks for this!

You're very welcome.

DN

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


Re: Controlling hairpin length - revisited!

2016-10-11 Thread Kieren MacMillan
Hi David,

> Further down in that thread is an implementation of shorten-pair with
> hairpins: 
> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00277.html

The $1,000,000 Question: Why isn’t this in the distro?  =)

Thanks for this!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info


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


Re: Controlling hairpin length - revisited!

2016-10-11 Thread David Nalesnik
Hi,


On Tue, Oct 11, 2016 at 9:07 AM, tisimst  wrote:
> David,
>
> On Tue, Oct 11, 2016 at 8:01 AM, Kieren MacMillan [via Lilypond] <[hidden
> email]> wrote:
>>
>> Hi David,
>>
>> > Just so that I have as many weapons as possible at my disposal, are
>> > there any other parameters which might directly affect the horizontal
>> > position of the left-hand end and/or the right-hand end or a hairpin,
>> > or its length?
>>
>> \after
>> Hairpin.bound-padding
>> Hairpin.X-offset
>> Hairpin.extra-offset
>>
>> Those are my main weapons.  =)
>> Kieren.
>
>
> Here's another solution I cooked up with more granular control of both ends
> of the hairpin:
> http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00176.html
>
> It's not perfect, but might do the job for you.
>


Further down in that thread is an implementation of shorten-pair with
hairpins: http://lists.gnu.org/archive/html/lilypond-user/2016-06/msg00277.html

This will allow you independent control of the left and right ends,
regardless of whether a dynamic or dynamics are preset.
(Bound-padding works only when a dynamic is present, and affects right
and left equally.).

It's a rewrite of the Hairpin stencil function.  One benefit of doing
this is there is no scaling of the shortened or lengthened Hairpin.
Possibly this avoids distortion.

HTH,

DN

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


Re: Controlling hairpin length - revisited!

2016-10-11 Thread tisimst
David,

On Tue, Oct 11, 2016 at 8:01 AM, Kieren MacMillan [via Lilypond] <
ml-node+s1069038n195270...@n5.nabble.com> wrote:

> Hi David,
>
> > Just so that I have as many weapons as possible at my disposal, are
> > there any other parameters which might directly affect the horizontal
> > position of the left-hand end and/or the right-hand end or a hairpin,
> > or its length?
>
> \after
> Hairpin.bound-padding
> Hairpin.X-offset
> Hairpin.extra-offset
>
> Those are my main weapons.  =)
> Kieren.
>

Here's another solution I cooked up with more granular control of both ends
of the hairpin: http://lists.gnu.org/archive/html/lilypond-user/2016-06/
msg00176.html

It's not perfect, but might do the job for you.

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Controlling-hairpin-length-revisited-tp195269p195271.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Controlling hairpin length - revisited!

2016-10-11 Thread Kieren MacMillan
Hi David,

> Just so that I have as many weapons as possible at my disposal, are
> there any other parameters which might directly affect the horizontal
> position of the left-hand end and/or the right-hand end or a hairpin,
> or its length?

\after
Hairpin.bound-padding
Hairpin.X-offset
Hairpin.extra-offset

Those are my main weapons.  =)
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Controlling hairpin length - revisited!

2016-10-11 Thread David Sumbler
After a 9 month gap, I have finally come back to Lilypond and will
attempt to finish tweaking my string quartet score and parts.  I have
installed v2.19.48, and I have run 'convert-ly' on my files.

The reasons for the long gap were (a) moving house in February and,
more importantly (b) feeling very discouraged by the apparent
unpredictability of hairpin lengths in Lilypond, despite all Harm's
valiant efforts.

So, for now, I accept that I am going to have to tweak errant hairpins
individually, using trial and error for the most part.

The only parameter that I am aware of that will affect the printed
length and position of a hairpin is Hairpin.minimum-length.

Just so that I have as many weapons as possible at my disposal, are
there any other parameters which might directly affect the horizontal
position of the left-hand end and/or the right-hand end or a hairpin,
or its length?

David

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