Re: Flatten a tie without hardcoding control points?

2012-04-22 Thread James
James

On 22 April 2012 04:50, James Harkins jamshar...@gmail.com wrote:
 At Sat, 21 Apr 2012 11:24:50 +0100,
 James wrote:
 If you can come up with a simple example, we (or you even) could add
 it to the LilyPond snippet repository

 Like this, perhaps? I can add it if this looks OK.

I guess - I am no judge, but it seems ok. However I would, if possible
add some 'mark up' text somewhere so someone can see the difference
without having to read the code separately.

For example see:

http://lsr.dsi.unimi.it/LSR/Item?id=375


james

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


Re: Flatten a tie without hardcoding control points?

2012-04-21 Thread James Harkins
At Fri, 20 Apr 2012 06:31:20 -0500,
David Nalesnik wrote:
 Hi James,
 
 On Fri, Apr 20, 2012 at 3:32 AM, James Harkins jamshar...@gmail.com wrote:
 
 Maybe a simple question: Is there a way to flatten the curve of a tie 
 that is as easy as
 overriding ratio for slurs?
 
 You can override 'ratio for ties too:
 
  \override Tie #'details #'ratio = #0.2
 
 Another possibility is to override 'height-limit:
 
 \override Tie #'details #'height-limit = #0.75

Ah, OK, I did see 'details but got lost in the huge pile of parameters :)  
Either one of those should do it.

I'm still learning how to use the tweaking references. That is, on the 
supercollider mailing lists, I'm often pointing people to specific parts of the 
help, but I've used the help for a long time and I know where things are and 
how to read them. With LP, I'm starting to navigate the manuals better but 
still haven't developed the 6th sense for finding that one little nugget 
quickly in the middle of a long text. It'll come.

Thanks!
hjh

^^ I notice a few other James-es here, so I think I'll start using my initials 
here.


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal.  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

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


Re: Flatten a tie without hardcoding control points?

2012-04-21 Thread James
James,

On 21 April 2012 07:51, James Harkins jamshar...@gmail.com wrote:
 At Fri, 20 Apr 2012 06:31:20 -0500,
 David Nalesnik wrote:
 Hi James,

 On Fri, Apr 20, 2012 at 3:32 AM, James Harkins jamshar...@gmail.com wrote:

     Maybe a simple question: Is there a way to flatten the curve of a tie 
 that is as easy as
     overriding ratio for slurs?

 You can override 'ratio for ties too:

  \override Tie #'details #'ratio = #0.2

 Another possibility is to override 'height-limit:

 \override Tie #'details #'height-limit = #0.75

 Ah, OK, I did see 'details but got lost in the huge pile of parameters :)  
 Either one of those should do it.

 I'm still learning how to use the tweaking references. That is, on the 
 supercollider mailing lists, I'm often pointing people to specific parts of 
 the help, but I've used the help for a long time and I know where things are 
 and how to read them. With LP, I'm starting to navigate the manuals better 
 but still haven't developed the 6th sense for finding that one little nugget 
 quickly in the middle of a long text. It'll come.

If you can come up with a simple example, we (or you even) could add
it to the LilyPond snippet repository

http://lsr.dsi.unimi.it/

We don't generally document tweaks directly in the Notation Reference
manuals - there are some but they are the exception than the rule -
however we do often link the more useful/commonly asked tweaks as
'snippets' if appropriate. They will also appear in the autogenerated
'snippets' documentation

http://lilypond.org/doc/v2.14/Documentation/snippets/index.html

James

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


Re: Flatten a tie without hardcoding control points?

2012-04-21 Thread James Harkins
At Sat, 21 Apr 2012 11:24:50 +0100,
James wrote:
 If you can come up with a simple example, we (or you even) could add
 it to the LilyPond snippet repository

Like this, perhaps? I can add it if this looks OK.

\version 2.15.36
\include english.ly

\relative c'' {
  % normal tie
  d4 ~

  % Longer ties so you can see the shapes better
  % Since the minimum-length is longer, the normal but wider tie
  % is taller than the normal, short tie.
  \override Tie #'minimum-length = #7
  d ~

  % Low ratio = flattened
  \once \override Tie #'details #'ratio = #0.05
  d ~

  % High ratio = taller than normal
  \once \override Tie #'details #'ratio = #1
  d ~

  % Reduce height = not as tall, but less flat than ratio = 0.05
  \once \override Tie #'details #'height-limit = #0.5
  d ~

  % Large height-limit
  % The tie still doesn't reach the full height limit
  % because 'ratio' is at its default of 0.333 here.
  \once \override Tie #'details #'height-limit = #3
  d4 ~

  % With both tweaks you get a big, loopy tie.
  \once \override Tie #'details #'ratio = #1
  \once \override Tie #'details #'height-limit = #3
  d4 ~
  d4
}

 We don't generally document tweaks directly in the Notation Reference
 manuals - there are some but they are the exception than the rule -
 however we do often link the more useful/commonly asked tweaks as
 'snippets' if appropriate. They will also appear in the autogenerated
 'snippets' documentation
 
 http://lilypond.org/doc/v2.14/Documentation/snippets/index.html

Understood. I realized later that what threw me about the Tie reference was the 
formatting of 'details:

'((ratio . 0.333) (center-staff-line-clearance . 0.6) (tip-staff-line-clearance 
. 0.45) (note-head-gap . 0.2) (stem-gap . 0.35) (height-limit . 1.0) 
(horizontal-distance-penalty-factor . 10) (same-dir-as-stem-penalty . 8) 
(min-length-penalty-factor . 26) (tie-tie-collision-distance . 0.45) 
(tie-tie-collision-penalty . 25.0) (intra-space-threshold . 1.25) 
(outer-tie-vertical-distance-symmetry-penalty-factor . 10) 
(outer-tie-length-symmetry-penalty-factor . 10) 
(vertical-distance-penalty-factor . 7) (outer-tie-vertical-gap . 0.25) 
(multi-tie-region-size . 3) (single-tie-region-size . 4) (between-length-limit 
. 1.0))

vs, maybe something like this:

'(
  (ratio . 0.333)
  (center-staff-line-clearance . 0.6)
  (tip-staff-line-clearance . 0.45)
  (note-head-gap . 0.2)
  (stem-gap . 0.35)
  (height-limit . 1.0)
  (horizontal-distance-penalty-factor . 10)
  (same-dir-as-stem-penalty . 8)
  (min-length-penalty-factor . 26)
  (tie-tie-collision-distance . 0.45)
  (tie-tie-collision-penalty . 25.0)
  (intra-space-threshold . 1.25)
  (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
  (outer-tie-length-symmetry-penalty-factor . 10)
  (vertical-distance-penalty-factor . 7)
  (outer-tie-vertical-gap . 0.25)
  (multi-tie-region-size . 3)
  (single-tie-region-size . 4)
  (between-length-limit . 1.0)
)

In the latter, it's very easy for the eye to scan the detail names.

hjh


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal.  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

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


Re: Flatten a tie without hardcoding control points?

2012-04-20 Thread David Nalesnik
Hi James,

On Fri, Apr 20, 2012 at 3:32 AM, James Harkins jamshar...@gmail.com wrote:

 Maybe a simple question: Is there a way to flatten the curve of a tie that
 is as easy as overriding ratio for slurs?


You can override 'ratio for ties too:

 \override Tie #'details #'ratio = #0.2

Another possibility is to override 'height-limit:

\override Tie #'details #'height-limit = #0.75



I found control-points and this does change the tie's shape. But, I don't
 need to modify the x-extent, only the y-extent. It looks to me as if
 overriding the control points means that I would have to re-edit the
 control points by hand if horizontal spacing changes (which could happen,
 say, if I take the piece to the US and have to change the paper to letter
 size instead of A4).

 I found TieColumn's Y-extent property, but overriding it like this takes
 no effect:

\once \override TieColumn #'Y-extent = #'(1 . 1.5)

 Also doesn't change the result in any way if the pair of numbers is
 reversed: (1.5 . 1).

 Searched LSR for tie, didn't find anything quite like this. I'm fairly
 sure a scheme function could handle it, but I'm probably a good year or two
 away from being able to attempt something like that on my own.


As far as easier control of 'control-points goes, you can modify
http://lsr.dsi.unimi.it/LSR/Snippet?id=639 like so:

shapeTie =
  #(define-music-function (parser location offsets) (list?)
#{
   \once \override Tie #'control-points = #(alter-curve offsets)
#})

#(define ((alter-curve offsets) grob)
   (let ((coords (ly:tie::calc-control-points grob)))

 (define (add-offsets coords offsets)
   (if (null? coords)
   '()
   (cons
 (cons (+ (caar coords) (car offsets))
   (+ (cdar coords) (cadr offsets)))
 (add-offsets (cdr coords) (cddr offsets)

 (add-offsets coords offsets)))

\relative c'' {
 c~ c
 \shapeTie #'(0 0 0 -0.15 0 -0.15 0 0)
 c~ c
}

This way the shape of the tie is modified by offsetting lilypond's default
rather than you having to create the control points from scratch.

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


Re: Flatten a tie without hardcoding control points?

2012-04-20 Thread David Nalesnik
Hi,

Oops--should have included the version.  I'm using 2.15.37.  With 2.14.2
and before you need the dollar sign:



 shapeTie =
   #(define-music-function (parser location offsets) (list?)
 #{
\once \override Tie #'control-points = #(alter-curve $offsets)
 #})


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


Re: Flatten a tie without hardcoding control points?

2012-04-20 Thread David Kastrup
David Nalesnik david.nales...@gmail.com writes:

 Hi,

 Oops--should have included the version.  I'm using 2.15.37.  With
 2.14.2 and before you need the dollar sign:

High time we get 2.16 out.

-- 
David Kastrup


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