Re:Levelling hairpins

2015-02-14 Thread David Sumbler
 From: Peter Gentry peter.gen...@sunscales.co.uk
 Date: Fri, 13 Feb 2015 20:53:15 -

 This is too well known to need an example, indeed one is given in the
 documentation
  
 http://www.lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-attached-to-notes#dynamics
 
 where the solution is discussed
  
 A Dynamics context is available to engrave dynamics on their own
 horizontal line. Use spacer rests to indicate timing. (Notes in a
 Dynamics context will also take up musical time, but will not be
 engraved.) The Dynamics context can usefully contain some other items
 such as text scripts, text spanners, and piano pedal marks. 
 
 Richard

The method shown in the Notation document (see link above) works, but
needs some trial and error to find what is the minimum value of
staff-padding which achieves the desired result.

What I was hoping for was some method of telling Lilypond to position 2
(or more) dynamics at the level of whichever one of them needs to be
furthest from the stave.  I dare say that this can be done using Scheme,
although as yet I am too inexperienced to know how to do it.

I like David G's solution (below), and shall probably adopt it - thanks,
David.

Regarding the Dynamics context: I agree with Peter that this is too
cumbersome for adjusting the occasional alignment problem.  In any case,
the piece I am currently working on is for a single instrument
(marimba), and having the dynamics in a line of music all at the same
level would simply look wrong in many cases.

I have used a Dynamics context in a piece which involved a piano.  This
is still unsatisfactory, I find.  For instance, the following artificial
example:

\version 2.18.0

 \relative c' { a4 c e a | c a e c| }
   \\
   \new Dynamics {R1\p | R1\f }
   \\
   \new Staff \relative c { \clef bass a4 e' a c | e c e a, | }


 \relative c' { a4\p c e a | c a e c| }
   \\
   \new Staff \relative c { \clef bass a4 e' a c | e^\f c e a, | }
   \break


The first line of output shows what happens when using a Dynamics
context; the second shows more or less how I would actually want it to
appear, although putting the dynamics in different staves is obviously
very unsatisfactory and would not always have the desired result in any
case.

It's a shame that Lilypond does not (so far as I know) have any way to
(a) associate one mark with another for positioning purposes
(b) associate dynamics with two staves, and use some sensible algorithm
for vertically spacing the dynamics between the two staves and their
contents.

David

  From: David Stephen Grant da...@davidgrant.no
  Date: Fri, 13 Feb 2015 21:57:54 +0100
  
  This is how I deal with it. Not exactly automatic, but works well
  for me :-)

  \version 2.19.15
  
  
  dynPadYOn = 
  #(define-music-function (parser location padding)(number?)
 #{
   \override DynamicLineSpanner.staff-padding = $padding
 #})
  
  
  dynPadYOff = 
  #(define-music-function (parser location)()
 #{
   \revert DynamicLineSpanner.staff-padding
   #}
  
  testMusic = {
c'4 g c'\ a'\f | c'4\ g c' a'\p
  }
  
  
  {
\testMusic | \break
\dynPadYOn #4
\testMusic | \break
\dynPadYOff
\testMusic
  }




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


Re:Levelling hairpins

2015-02-14 Thread David Sumbler
 From: Noeck noeck.marb...@gmx.de
 Date: Sat, 14 Feb 2015 14:15:35 +0100
 
 Hi David,
 
  It's a shame that Lilypond does not (so far as I know) have any way to
  (a) associate one mark with another for positioning purposes
 
 This association can be done quite easily as you can see in my previous mail.
 Have you seen it? However, I already found some drawbacks when used on the 
 same
 note as other (de-)crescendi.

I have now, and it is very interesting: I may make use of this.

One of the drawbacks of receiving the lilypond-user digests is that
sometimes I am responding to something that has already had other
responses which I have not yet seen (because they will be in the next
digest).

But with half a dozen to a dozen digests daily, I don't think I can face
changing to individual emails.  Although perhaps I should consider doing
that when there is a topic under discussion which I have started (or
have contributed to).

David


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