Re: Symmetrical ties in TieColumn

2013-12-06 Thread David Nalesnik
Karol,


On Wed, Dec 4, 2013 at 6:14 PM, Karol Majewski karo...@wp.pl wrote:

 Hi, David



 Your function for offsetting control-points of a TieColumn is very useful
 to me. Now it would be great if someone could improve it to make it work
 with ties over the line break.


I'm glad that you find some utility in that function.  Unfortunately, I
don't have the time to modify it as you ask.  I think that the routine in
the older thread cited in your first post and \alignTies could be combined
by someone wanting to take this on.

BTW, I don't recall seeing this notation--is it associated with anyone in
particular?

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


Re: Symmetrical ties in TieColumn

2013-12-04 Thread Karol Majewski

Hi, David

Your function for offsetting control-points of a TieColumn is very useful to me. Now it would be great if someone could improve it to make it work with ties over the line break.

Best
Karol


Dnia 20-10-2013 o godz. 0:39 David Nalesnik napisał(a):

Hi Karol,

On Sat, Oct 19, 2013 at 3:36 PM, Karol Majewski karo...@wp.pl wrote:
Hi  Currently I'm making some experiments with ties.  What I need is a function that makes all ties in TieColumn have the same length (see attachment). I tried to achieve this by changing some values from Tie.details, but couldn't find the right configuration.  Then I tried to modify shapeTieColumn.ly (http://lists.gnu.org/archive/html/lilypond-devel/2012-06/msg00285.html) but that's probably not the way it should be done.  My question: how difficult would be to write such function?

The problem here is that AFAIK you can't tell LilyPond: here are the attachment points I want for my ties; draw nice ones.
.
I've come up with a sketch which does something like what you want, but you have to play around with numbers to get a good result.

Basically, it draws however many ties you need, but draws them with the same shape, lined up.

You need to specify the shape of one of them by giving a list resembling control points.

The y coordinates in this list are relative to 0.
The x-coordinates represent the horizontal distance of the control points from the first NoteColumn associated with the TieColumn.

I don't think that makes a lot of sense--and I'm a little too tired to do better--but I fiddling with the numbers should make it clear.

Now the problems :)

--Layout changes will mess up your hard work.
--Won't work with broken ties as of yet.

Anyway, it's something.

--David










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


Re: Symmetrical ties in TieColumn

2013-10-20 Thread Karol Majewski

Hmm... the code:


{
\override Tie.after-line-breaking =
#(lambda (grob)
(display (ly:grob-property grob 'control-points))
(newline))
c'1~ c'1
}

doesn't work for me. I see no control points (nor the numbers).


Meanwhile, I've found this:
===
#(define (make-cross-stencil coords) (ly:stencil-add (make-line-stencil 0.1 (- (car coords) 0.2 ) (- (cdr coords) 0.2) (+ (car coords) 0.2) (+ (cdr coords) 0.2)) (make-line-stencil 0.1 (- (car coords) 0.2) (+ (cdr coords) 0.2) (+ (car coords) 0.2) (- (cdr coords) 0.2#(define (display-control-points line) (lambda (grob) (let ((stencil (ly:tie::print grob)) (cps 
(ly:grob-property grob 'control-points))) (ly:stencil-add stencil (ly:stencil-in-color (make-cross-stencil (second cps)) 1 0 0) (ly:stencil-in-color (make-cross-stencil (third cps)) 1 0 0) (if (eq? line #t) (make-line-stencil 0.05 (car (second cps)) (cdr (second cps)) (car (third cps)) (cdr (third cps))) empty-stencil)
{
\override Tie #'stencil = #(display-control-points #t) 
}
===

... but it shows only the points, not the x,y_numbers.



Dnia 20-10-2013 o godz. 1:56 David Nalesnik napisał(a):

Karol,

On Sat, Oct 19, 2013 at 6:22 PM, Karol Majewski karo...@wp.pl wrote:

Thank you, David, it works indeed! I know that this is not exactly what I asked for but it is a good starting point.

Now the question: is it possible for LilyPond to show control_point_values of ties?Let's say I have something like:

=
\version "2.17.28"{c'1~ c'1}

=

and want LilyPond to show me all control points of that tie.

Is this viable?


Sure. You'll notice that the function I sent works with the control points of each tie in the column, Displaying them is straightforward:

{
\override Tie.after-line-breaking =
#(lambda (grob)
 (display (ly:grob-property grob 'control-points))
 (newline))
 c'1~ c'1
}










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


Re: Symmetrical ties in TieColumn

2013-10-20 Thread Thomas Morley
2013/10/20 Karol Majewski karo...@wp.pl:
 Hmm... the code:



 {

 \override Tie.after-line-breaking =

 #(lambda (grob)

 (display (ly:grob-property grob 'control-points))

 (newline))

 c'1~ c'1

 }



 doesn't work for me. I see no control points (nor the numbers).

Well, it works for me.

Below I use David's code adding an approach via TieColumn.

\version 2.17.28

%% Nicer formatting with:
#(use-modules (ice-9 pretty-print))

displayTieCps =
   \override Tie.after-line-breaking =
 #(lambda (grob)
   (display \nDisplay control-points using \\displayTieCps\n)
   (pretty-print (ly:grob-property grob 'control-points))
   ;; or use
   ;(display (ly:grob-property grob 'control-points))
   (newline))

displayTieColumnCps =
%\once
  \override TieColumn #'after-line-breaking =
  #(lambda (grob)
(let* ((ties (ly:grob-array-list (ly:grob-object grob 'ties)))
   (c-ps
 (map
   (lambda (tie) (ly:grob-property tie 'control-points))
   ties)))
(newline)
(display \nDisplay control-points using \\displayTieColumnCps\n)
(pretty-print c-ps)
;; or use
;(display c-ps)
))

{
  \displayTieCps
  \displayTieColumnCps
  fis' cis'' a''2~
  %% If you want to use \once \displayTieColumnCps it has to be inserted here.
  %\displayTieColumnCps
  fis' cis'' a''2
}

This returns:

Display control-points using \displayTieColumnCps
(((0.8949918 . -2.5)
  (1.55561519677929 . -3.14431009035289)
  (3.29240580235533 . -3.14431009035289)
  (3.95302899913461 . -2.5))
 ((0.4650003 . 1.225)
  (1.18506989232716 . 1.90581194400239)
  (3.23295910680746 . 1.90581194400239)
  (3.95302899913461 . 1.225))
 ((0.8949918 . 4.0)
  (1.66581234547445 . 4.70907034772497)
  (4.01220065366016 . 4.70907034772497)
  (4.78302099913461 . 4.0)))

Display control-points using \displayTieCps
((0.8949918 . 4.0)
 (1.66581234547445 . 4.70907034772497)
 (4.01220065366016 . 4.70907034772497)
 (4.78302099913461 . 4.0))


Display control-points using \displayTieCps
((0.4650003 . 1.225)
 (1.18506989232716 . 1.90581194400239)
 (3.23295910680746 . 1.90581194400239)
 (3.95302899913461 . 1.225))


Display control-points using \displayTieCps
((0.8949918 . -2.5)
 (1.55561519677929 . -3.14431009035289)
 (3.29240580235533 . -3.14431009035289)
 (3.95302899913461 . -2.5))



HTH,
  Harm

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


Re: Symmetrical ties in TieColumn

2013-10-20 Thread Karol Majewski
I must be doing something wrong. Where are the numbers? In PDF? In separate 
file?

I use version 2.17.28 on Windows 7. Perhaps it is Windows issue?


Dnia 20-10-2013 o godz. 12:45 Thomas Morley napisał(a):
 2013/10/20 Karol Majewski karo...@wp.pl:
  Hmm... the code:
 
 
 
  {
 
  \override Tie.after-line-breaking =
 
  #(lambda (grob)
 
  (display (ly:grob-property grob 'control-points))
 
  (newline))
 
  c'1~ c'1
 
  }
 
 
 
  doesn't work for me. I see no control points (nor the numbers).
 
 Well, it works for me.
 
 Below I use David's code adding an approach via TieColumn.
 
 \version 2.17.28
 
 %% Nicer formatting with:
 #(use-modules (ice-9 pretty-print))
 
 displayTieCps =
\override Tie.after-line-breaking =
  #(lambda (grob)
(display \nDisplay control-points using \\displayTieCps\n)
(pretty-print (ly:grob-property grob 'control-points))
;; or use
;(display (ly:grob-property grob 'control-points))
(newline))
 
 displayTieColumnCps =
 %\once
   \override TieColumn #'after-line-breaking =
   #(lambda (grob)
 (let* ((ties (ly:grob-array-list (ly:grob-object grob 'ties)))
(c-ps
  (map
(lambda (tie) (ly:grob-property tie 'control-points))
ties)))
 (newline)
 (display \nDisplay control-points using \\displayTieColumnCps\n)
 (pretty-print c-ps)
 ;; or use
 ;(display c-ps)
 ))
 
 {
   \displayTieCps
   \displayTieColumnCps
   fis' cis'' a''2~
   %% If you want to use \once \displayTieColumnCps it has to be inserted 
 here.
   %\displayTieColumnCps
   fis' cis'' a''2
 }
 
 This returns:
 
 Display control-points using \displayTieColumnCps
 (((0.8949918 . -2.5)
   (1.55561519677929 . -3.14431009035289)
   (3.29240580235533 . -3.14431009035289)
   (3.95302899913461 . -2.5))
  ((0.4650003 . 1.225)
   (1.18506989232716 . 1.90581194400239)
   (3.23295910680746 . 1.90581194400239)
   (3.95302899913461 . 1.225))
  ((0.8949918 . 4.0)
   (1.66581234547445 . 4.70907034772497)
   (4.01220065366016 . 4.70907034772497)
   (4.78302099913461 . 4.0)))
 
 Display control-points using \displayTieCps
 ((0.8949918 . 4.0)
  (1.66581234547445 . 4.70907034772497)
  (4.01220065366016 . 4.70907034772497)
  (4.78302099913461 . 4.0))
 
 
 Display control-points using \displayTieCps
 ((0.4650003 . 1.225)
  (1.18506989232716 . 1.90581194400239)
  (3.23295910680746 . 1.90581194400239)
  (3.95302899913461 . 1.225))
 
 
 Display control-points using \displayTieCps
 ((0.8949918 . -2.5)
  (1.55561519677929 . -3.14431009035289)
  (3.29240580235533 . -3.14431009035289)
  (3.95302899913461 . -2.5))
 
 
 
 HTH,
   Harm




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


Re: Symmetrical ties in TieColumn

2013-10-20 Thread David Nalesnik
On Sun, Oct 20, 2013 at 6:20 AM, Karol Majewski karo...@wp.pl wrote:

 I must be doing something wrong. Where are the numbers? In PDF? In
 separate file?

 I use version 2.17.28 on Windows 7. Perhaps it is Windows issue?


The numbers are in the log.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Symmetrical ties in TieColumn

2013-10-20 Thread Karol Majewski

No numbers in log file.

After generating PDF from this code:

==
\version "2.17.28"{ \override Tie.after-line-breaking = #(lambda (grob) (display (ly:grob-property grob 'control-points)) (newline)) c'1~ c'1}
==

I get the following log:

==
# -*-compilation-*-Processing `C:/Users/Karol/Desktop/p.ly'Parsing...Interpreting music...Preprocessing graphical objects...Finding the ideal number of pages...Fitting music on 1 page...Drawing systems...Layout output to `/Users/Karol/Desktop/p.ps'...Converting to `/Users/Karol/Desktop/p.pdf'...Success: compilation successfully completed==

Can anyone reproduce this behavior on Windows?


Karol


Dnia 20-10-2013 o godz. 13:46 David Nalesnik napisał(a):



On Sun, Oct 20, 2013 at 6:20 AM, Karol Majewski karo...@wp.pl wrote:
I must be doing something wrong. Where are the numbers? In PDF? In separate file?  I use version 2.17.28 on Windows 7. Perhaps it is Windows issue?






The numbers are in the log.






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


Re: Symmetrical ties in TieColumn

2013-10-20 Thread Phil Holmes
Try running lilypond simply from the command line, with no options to create 
the logfile (i.e. no redirection, no -dgui).

--
Phil Holmes


  - Original Message - 
  From: Karol Majewski 
  To: David Nalesnik 
  Cc: Thomas Morley ; lilypond-user 
  Sent: Sunday, October 20, 2013 3:58 PM
  Subject: Re: Symmetrical ties in TieColumn


  No numbers in log file.



  After generating PDF from this code:



  ==

  \version 2.17.28

  {
\override Tie.after-line-breaking =
#(lambda (grob)
  (display (ly:grob-property grob 'control-points))
  (newline))

c'1~ c'1
  }



  ==



  I get the following log:



  ==

  # -*-compilation-*-
  Processing `C:/Users/Karol/Desktop/p.ly'
  Parsing...
  Interpreting music...
  Preprocessing graphical objects...
  Finding the ideal number of pages...
  Fitting music on 1 page...
  Drawing systems...
  Layout output to `/Users/Karol/Desktop/p.ps'...
  Converting to `/Users/Karol/Desktop/p.pdf'...
  Success: compilation successfully completed
  ==



  Can anyone reproduce this behavior on Windows?





  Karol





  Dnia 20-10-2013 o godz. 13:46 David Nalesnik napisał(a):






On Sun, Oct 20, 2013 at 6:20 AM, Karol Majewski karo...@wp.pl wrote:

  I must be doing something wrong. Where are the numbers? In PDF? In 
separate file?

  I use version 2.17.28 on Windows 7. Perhaps it is Windows issue?


The numbers are in the log.








--


  ___
  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: Symmetrical ties in TieColumn

2013-10-20 Thread Karol Majewski



Works now :) Thank you. Is there any way to have these numbers displayed in log file on Windows?

Dnia 20-10-2013 o godz. 18:06 Phil Holmes napisał(a):

Try running lilypond simply from the command line, with no options to create the logfile (i.e. no redirection, no -dgui).
--Phil Holmes



- Original Message -
From: Karol Majewski
To: David Nalesnik
Cc: Thomas Morley ; lilypond-user
Sent: Sunday, October 20, 2013 3:58 PM
Subject: Re: Symmetrical ties in TieColumn

No numbers in log file.

After generating PDF from this code:

==
\version "2.17.28"{ \override Tie.after-line-breaking = #(lambda (grob) (display (ly:grob-property grob 'control-points)) (newline)) c'1~ c'1}
==

I get the following log:

==
# -*-compilation-*-Processing `C:/Users/Karol/Desktop/p.ly'Parsing...Interpreting music...Preprocessing graphical objects...Finding the ideal number of pages...Fitting music on 1 page...Drawing systems...Layout output to `/Users/Karol/Desktop/p.ps'...Converting to `/Users/Karol/Desktop/p.pdf'...Success: compilation successfully completed==

Can anyone reproduce this behavior on Windows?


Karol


Dnia 20-10-2013 o godz. 13:46 David Nalesnik napisał(a):



On Sun, Oct 20, 2013 at 6:20 AM, Karol Majewski karo...@wp.pl wrote:
I must be doing something wrong. Where are the numbers? In PDF? In separate file?I use version 2.17.28 on Windows 7. Perhaps it is Windows issue?






The numbers are in the log.





___lilypond-user mailing listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user






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


Re: Symmetrical ties in TieColumn

2013-10-19 Thread David Nalesnik
Hi Karol,


On Sat, Oct 19, 2013 at 3:36 PM, Karol Majewski karo...@wp.pl wrote:

 Hi

 Currently I'm making some experiments with ties.

 What I need is a function that makes all ties in TieColumn have the same
 length (see attachment). I tried to achieve this by changing some values
 from Tie.details, but couldn't find the right configuration.

 Then I tried to modify shapeTieColumn.ly (
 http://lists.gnu.org/archive/html/lilypond-devel/2012-06/msg00285.html)
 but that's probably not the way it should be done.

 My question: how difficult would be to write such function?


The problem here is that AFAIK you can't tell LilyPond: here are the
attachment points I want for my ties; draw nice ones.
.
I've come up with a sketch which does something like what you want, but you
have to play around with numbers to get a good result.

Basically, it draws however many ties you need, but draws them with the
same shape, lined up.

You need to specify the shape of one of them by giving a list resembling
control points.

The y coordinates in this list are relative to 0.
The x-coordinates represent the horizontal distance of the control points
from the first NoteColumn associated with the TieColumn.

I don't think that makes a lot of sense--and I'm a little too tired to do
better--but I fiddling with the numbers should make it clear.

Now the problems :)

--Layout changes will mess up your hard work.
--Won't work with broken ties as of yet.

Anyway, it's something.

--David


lined-up-ties.ly
Description: Binary data
attachment: lined-up-ties.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Symmetrical ties in TieColumn

2013-10-19 Thread Karol Majewski

Thank you, David, it works indeed! I know that this is not exactly what I asked for but it is a good starting point.

Now the question: is it possible for LilyPond to show control_point_values of ties?Let's say I have something like:

=
\version "2.17.28"{c'1~ c'1}

=

and want LilyPond to show me all control points of that tie.

Is this viable?


Dnia 20-10-2013 o godz. 0:39 David Nalesnik napisał(a):

Hi Karol,

On Sat, Oct 19, 2013 at 3:36 PM, Karol Majewski karo...@wp.pl wrote:
Hi  Currently I'm making some experiments with ties.  What I need is a function that makes all ties in TieColumn have the same length (see attachment). I tried to achieve this by changing some values from Tie.details, but couldn't find the right configuration.  Then I tried to modify shapeTieColumn.ly (http://lists.gnu.org/archive/html/lilypond-devel/2012-06/msg00285.html) but that's probably not the way it should be done.  My question: how difficult would be to write such function?

The problem here is that AFAIK you can't tell LilyPond: here are the attachment points I want for my ties; draw nice ones.
.
I've come up with a sketch which does something like what you want, but you have to play around with numbers to get a good result.

Basically, it draws however many ties you need, but draws them with the same shape, lined up.

You need to specify the shape of one of them by giving a list resembling control points.

The y coordinates in this list are relative to 0.
The x-coordinates represent the horizontal distance of the control points from the first NoteColumn associated with the TieColumn.

I don't think that makes a lot of sense--and I'm a little too tired to do better--but I fiddling with the numbers should make it clear.

Now the problems :)

--Layout changes will mess up your hard work.
--Won't work with broken ties as of yet.

Anyway, it's something.

--David










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


Re: Symmetrical ties in TieColumn

2013-10-19 Thread David Nalesnik
Karol,


On Sat, Oct 19, 2013 at 6:22 PM, Karol Majewski karo...@wp.pl wrote:

 Thank you, David, it works indeed! I know that this is not exactly what I
 asked for but it is a good starting point.



 Now the question: is it possible for LilyPond to show control_point_values
 of ties?
  Let's say I have something like:



 =

 \version 2.17.28

 {
 c'1~ c'1
 }



 =



 and want LilyPond to show me all control points of that tie.



 Is this viable?


Sure.  You'll notice that the function I sent works with the control points
of each tie in the column,  Displaying them is straightforward:

{

\override Tie.after-line-breaking =

#(lambda (grob)

  (display (ly:grob-property grob 'control-points))

  (newline))

  c'1~ c'1

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