Re: Tie settings question

2016-10-25 Thread Carl Sorensen


On 10/25/16 1:48 PM, "Karol Majewski"  wrote:
>
>So there should be fourth condition but I have no idea how to put it in
>scheme. I need somethong like:
>
>(if (> dot-position notehead-position)) // if dot is placed higher than
>notehead
>(if (< dot-position notehead-position)) // if dot is placed lower than
>notehead
>
>But how to define dot-position and notehead-position?

I think this is impossible with the current architecture, because we don't
place dots, we place dot columns.

There is a Dot_column C++ structure that has the staff position of the dot
and the staff position of the notehead in it, so there may be some way to
get to this structure from Scheme, but it is only created after
positioning is done, so I doubt it's available from Scheme.

Carl Sorensen


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


Re: Augmentation dot positioning

2016-10-25 Thread Carl Sorensen


On 10/25/16 8:57 AM, "Chris Yate"  wrote:

>Hi Carl,
>Firstly, thanks for your work on this!
>At a quick glance, the only two situations that need dots-limit =2 are
>#11 and #23.

Yes, those were my two cases as well.

>A side issue:
>An idea I've just had: would it be useful to have a more flexible
>positioning system similar to that for rests? (e.g. "f4/rest"). It might
>be useful to have the option of custom dot placement for special cases.
>I'm sure there's already a way to achieve this, but it's probably not
>easy. If anyone thinks it worthwhile, I will think more about a suggested
>syntax... Maybe something for the LSR rather than core functionality.

As far as I can see in the existing code (not including my changes) there
is no way to do this.

But, this could be easily added onto my current architecture. I had
actually planned for it earlier, but my planned architecture didn't work
out.  Butn now I can add it back in.

The grob property that defines which algorithm is to be used to determine
dot locations is currently a symbol.  I can change it to symbol or list,
and if it's a list, it's just a list of staff positions that should have
dots.  The Scheme code returns such a list, and it would be easy to check
in the C++ code for it being a list, and then do the right thing with the
list.

I don't think there's any new syntax needed.

Thanks for the good input!

Carl






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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
On Tue, Oct 25, 2016 at 5:47 PM, David Nalesnik
 wrote:

>
> I think you discarded the right method of determining direction.
>


Or, rather, you may have to use staff-position.

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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
Hi Karol,


On Tue, Oct 25, 2016 at 5:15 PM, Karol Majewski  wrote:
> Here's full code. It's important to applay my tie settings.

OK, thank you.  That helps enormously.

Above, I mentioned moving the check for dot direction, and refactoring
the two if-statements for more compact and maintainable code.  This is
what I meant:

tweakTie =
#(lambda (grob)
   (let*
((ties
  (ly:grob-array->list
   (ly:grob-object grob 'ties)))
 (notehead
  (ly:spanner-bound
   (car ties) LEFT))
 (stem
  (ly:grob-object notehead 'stem))
 (flag
  (ly:grob-object stem 'flag))
 (dots
  (ly:grob-object notehead 'dot)))
(if (> (length ties) 1)
(begin
 (if (ly:grob? flag)
 (ly:grob-set-property! flag 'Y-extent
   (cons 4 0)))
 ; you set this below, at least partly...
 (for-each
  (lambda (tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5))
  ties)))
(if (ly:grob? dots)
(let ((dot-dir (ly:grob-property dots 'direction)))
  (for-each
   (lambda (tie)
 (let ((tie-dir (ly:grob-property tie 'direction)))
   (ly:grob-set-nested-property! tie '(details skyline-padding) 5)
   (ly:grob-set-property! tie 'Y-offset (* -0.25 dot-dir
   ties)


%

There seems to be some redundancy above. skyline-padding is set twice
for at least some of the ties.

Refactoring further...

tweakTie =
#(lambda (grob)
   (let*
((ties
  (ly:grob-array->list
   (ly:grob-object grob 'ties)))
 (notehead
  (ly:spanner-bound
   (car ties) LEFT))
 (stem
  (ly:grob-object notehead 'stem))
 (flag
  (ly:grob-object stem 'flag))
 (dots
  (ly:grob-object notehead 'dot))
 (dot-dir
  (if (ly:grob? dots)
  (ly:grob-property dots 'direction)
  #f)))

(for-each
 (lambda (tie)
   ;; display line discussed below...
   (display dot-dir) (newline)

   (ly:grob-set-nested-property! tie '(details skyline-padding) 5)
   (if (ly:dir? dot-dir)
   (ly:grob-set-property! tie 'Y-offset (* -0.25 dot-dir

 ties)

(if (and (> (length ties) 1)
 (ly:grob? flag))
(ly:grob-set-property! flag 'Y-extent (cons 4 0)



\layout {
  \context {
\Score

\override Tie.details.height-limit = #1.25
\override Tie.details.ratio = #0.25
\override Tie.details.between-length-limit = #1
\override Tie.details.wrong-direction-offset-penalty = #10
\override Tie.details.min-length = #2
\override Tie.details.min-length-penalty-factor = #30
\override Tie.details.center-staff-line-clearance = #0.05
\override Tie.details.tip-staff-line-clearance = #0.05
\override Tie.details.staff-line-collision-penalty = #0
\override Tie.details.dot-collision-clearance = #0
\override Tie.details.dot-collision-penalty = #0
\override Tie.details.note-head-gap = #0.15
\override Tie.details.stem-gap = #0.15
\override Tie.details.tie-column-monotonicity-penalty = #100
\override Tie.details.tie-tie-collision-penalty = #25
\override Tie.details.tie-tie-collision-distance = #0.5
\override Tie.details.horizontal-distance-penalty-factor = #0
\override Tie.details.same-dir-as-stem-penalty = #20
\override Tie.details.vertical-distance-penalty-factor = #10
\override Tie.details.intra-space-threshold = #0
\override Tie.details.outer-tie-length-symmetry-penalty-factor = #0
\override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor
= #0
\override Tie.details.outer-tie-vertical-gap = #0
\override Tie.details.single-tie-region-size = #4
\override Tie.details.skyline-padding = #0.05 % or #5
\override Tie.details.multi-tie-region-size = #1
\override Tie.line-thickness = #0.25
\override Tie.thickness = #2

\override TieColumn.before-line-breaking = #tweakTie

  }
}

{
  \time 3/8
  f''4~ f''8~ f''4.~ f''4~ f''8
}

> In the following example the third tie should be lowered by 0.25.

It isn't, because apparently Dots don't have a direction set.  I added
a display line so you can see that the third tie has its direction set
to '().

I think you discarded the right method of determining direction.

In any case, hopefully my refactoring is of some use.

David

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


Re: Tie settings question

2016-10-25 Thread Karol Majewski
Here's full code. It's important to applay my tie settings. In the following 
example the third tie should be lowered by 0.25.




tweakTie =
#(lambda
  (grob)
  (let*
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties)))
  (notehead
(ly:spanner-bound
  (car ties) LEFT))
  (stem
(ly:grob-object notehead 'stem))
  (flag
(ly:grob-object stem 'flag))
  (dots
(ly:grob-object notehead 'dot))
  (dots-dir
(ly:grob-property dots 'direction)))
(if
  (>
(length ties) 1)
  (begin
(if
  (ly:grob? flag)
  (ly:grob-set-property! flag 'Y-extent
(cons 4 0)))
(for-each
  (lambda
(tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)))
(if
  (and
(= dots-dir 1)
(ly:grob? dots))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir 1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset -0.25) ties))
(if
  (and
(= dots-dir -1)
(ly:grob? dots))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir -1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset 0.25) ties

\layout {
  \context {
\Score
\override TieColumn.before-line-breaking = #tweakTie
  }
}

\layout {
  \context {
\Score
\override Tie.details.height-limit = #1.25
\override Tie.details.ratio = #0.25
\override Tie.details.between-length-limit = #1
\override Tie.details.wrong-direction-offset-penalty = #10
\override Tie.details.min-length = #2
\override Tie.details.min-length-penalty-factor = #30
\override Tie.details.center-staff-line-clearance = #0.05
\override Tie.details.tip-staff-line-clearance = #0.05
\override Tie.details.staff-line-collision-penalty = #0
\override Tie.details.dot-collision-clearance = #0
\override Tie.details.dot-collision-penalty = #0
\override Tie.details.note-head-gap = #0.15
\override Tie.details.stem-gap = #0.15
\override Tie.details.tie-column-monotonicity-penalty = #100
\override Tie.details.tie-tie-collision-penalty = #25
\override Tie.details.tie-tie-collision-distance = #0.5
\override Tie.details.horizontal-distance-penalty-factor = #0
\override Tie.details.same-dir-as-stem-penalty = #20
\override Tie.details.vertical-distance-penalty-factor = #10
\override Tie.details.intra-space-threshold = #0
\override Tie.details.outer-tie-length-symmetry-penalty-factor = #0
\override Tie.details.outer-tie-vertical-distance-symmetry-penalty-factor = 
#0
\override Tie.details.outer-tie-vertical-gap = #0
\override Tie.details.single-tie-region-size = #4
\override Tie.details.skyline-padding = #0.05 % or #5
\override Tie.details.multi-tie-region-size = #1
\override Tie.line-thickness = #0.25
\override Tie.thickness = #2
  }
}

{
 \time 3/8
  f''4~ f''8~ f''4.~ f''4~ f''8
}



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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
On Tue, Oct 25, 2016 at 4:53 PM, Karol Majewski  wrote:
> I think I don't have to compare dot.staff-position and 
> notehead.staff-position. I can simply check if Dots.direction is 1 or -1.
>
> Still I'm doing something wrong here:

Could you please provide your test example when you give code?  I'm
assembling an example each time you provide code from bits and pieces
you've already given.  Chances are, I will miss something that way.

>
> tweakTie =
> #(lambda
>   (grob)
>   (let*
> ((ties
> (ly:grob-array->list
>   (ly:grob-object grob 'ties)))
>   (notehead
> (ly:spanner-bound
>   (car ties) LEFT))
>   (stem
> (ly:grob-object notehead 'stem))
>   (flag
> (ly:grob-object stem 'flag))
>   (dots
> (ly:grob-object notehead 'dot))

If there are no dots, the following will cause an error.  You check
below if the dot is a grob, but you should do it before you query the
direction.  In other words, request the dot direction after the check
for the Dot grob below.

>   (dots-dir
> (ly:grob-property dots 'direction)))
> (if
>   (>
> (length ties) 1)
>   (begin
> (if
>   (ly:grob? flag)
>   (ly:grob-set-property! flag 'Y-extent
> (cons 4 0)))
> (for-each
>   (lambda
> (tie)
> (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
> ties)))

Note that the following two if clauses can be consolidated for more
economical and maintainable code.  Direction can be used as a
multiplier, since it will be either -1 or 1: simply multiply -0.25 by
direction.  The only "if" to check for is that there is a dot.

> (if
>   (and
> (= dots-dir 1)
> (ly:grob? dots))
>   (for-each
> (lambda
>   (tie)
>   (let
> ((tie-dir
> (ly:grob-property tie 'direction)))
> (if
>   (= tie-dir 1)
>   (begin
> (ly:grob-set-nested-property! tie '(details skyline-padding) 
> 5)
> (ly:grob-set-property! tie 'Y-offset -0.25) ties))
> (if
>   (and
> (= dots-dir -1)
> (ly:grob? dots))
>   (for-each
> (lambda
>   (tie)
>   (let
> ((tie-dir
> (ly:grob-property tie 'direction)))
> (if
>   (= tie-dir -1)
>   (begin
> (ly:grob-set-nested-property! tie '(details skyline-padding) 
> 5)
> (ly:grob-set-property! tie 'Y-offset 0.25) ties
>
> \layout {
>   \context {
> \Score
> \override TieColumn.before-line-breaking = #tweakTie
>   }
> }
>
>

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


Re: Tie settings question

2016-10-25 Thread Karol Majewski
I think I don't have to compare dot.staff-position and notehead.staff-position. 
I can simply check if Dots.direction is 1 or -1.

Still I'm doing something wrong here:

tweakTie =
#(lambda
  (grob)
  (let*
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties)))
  (notehead
(ly:spanner-bound
  (car ties) LEFT))
  (stem
(ly:grob-object notehead 'stem))
  (flag
(ly:grob-object stem 'flag))
  (dots
(ly:grob-object notehead 'dot))
  (dots-dir
(ly:grob-property dots 'direction)))
(if
  (>
(length ties) 1)
  (begin
(if
  (ly:grob? flag)
  (ly:grob-set-property! flag 'Y-extent
(cons 4 0)))
(for-each
  (lambda
(tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)))
(if
  (and
(= dots-dir 1)
(ly:grob? dots))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir 1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset -0.25) ties))
(if
  (and
(= dots-dir -1)
(ly:grob? dots))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir -1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset 0.25) ties

\layout {
  \context {
\Score
\override TieColumn.before-line-breaking = #tweakTie
  }
}



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


Re: Augmentation dot positioning

2016-10-25 Thread Werner LEMBERG

Thanks, Carl!


> At a quick glance, the only two situations that need dots-limit =2
> are #11 and #23.

Seconded.  I also think that #13 also looks better with value 2 – the
nearer the number of dots to the number of noteheads, the better.

What about #24/2?  Why is the lowest dot below the a's ledger line and
not above?


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


Re: Tie settings question

2016-10-25 Thread Karol Majewski
OK, I've added this. Stem-dir is no longer needed.

It doesn't work. I think something is wrong with notehead definition:

tweakTie =
#(lambda
  (grob)
  (let*
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties)))
  (notehead
(ly:spanner-bound
  (car ties) LEFT))
  (notehead-pos
(ly:grob-property notehead 'staff-position))
  (stem
(ly:grob-object notehead 'stem))
  (flag
(ly:grob-object stem 'flag))
  (dot
(ly:grob-object notehead 'dot))
  (dot-pos
(ly:grob-property dot 'staff-position)))
(if
  (>
(length ties) 1)
  (begin
(if
  (ly:grob? flag)
  (ly:grob-set-property! flag 'Y-extent
(cons 4 0)))
(for-each
  (lambda
(tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)))
(if
  (and
(> dot-pos notehead-pos)
(ly:grob? dot))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir 1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset -0.25) ties))
(if
  (and
(< dot-pos notehead-pos)
(ly:grob? dot))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir -1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset 0.25) ties



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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
On Tue, Oct 25, 2016 at 2:48 PM, Karol Majewski  wrote:
> Now I realised that, according to my concept, tie should be lowered not only 
> when
>
> (stem-direction == UP && tie-direction == UP && note-has-a-dot == true)
>
> but also when notehead is placed on staff-line and not on staff-space. In 
> other words - when a dot is placed not on the same staff-position as notehead 
> (we know that when notehead is placed on staff-line then dot is shifted 
> up/down).
>
> So there should be fourth condition but I have no idea how to put it in 
> scheme. I need somethong like:
>
> (if (> dot-position notehead-position)) // if dot is placed higher than 
> notehead
> (if (< dot-position notehead-position)) // if dot is placed lower than 
> notehead
>
> But how to define dot-position and notehead-position?

Both NoteHead and Dots support the staff-symbol-referencer:
http://lilypond.org/doc/v2.18/Documentation/internals/staff_002dsymbol_002dreferencer_002dinterface

David

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


polytempi in Lilypond - is it possible?

2016-10-25 Thread Bálint Laczkó
Hey Everybody,

I would like to engrave a polytempical musical material in LilyPond. I am a
newbie to this software so I am still learning the basics, but I saw quite
a few mentions in some forum comments here and there, that LilyPond support
polymetry and polytempi quite well and folks do it all the time. Now I
found many useful tutorials/examples/documentation about polymetry but as
for polytempi I am still stuck in the darkness.

What I would like to see is similar to this:
[image: Szövegközi kép 1]
...except for the ending, I would like to to it strictly proportionally.
This is a screenshot from [bach.score], a Max MSP object/package which can
do polytempi quite well, but it exports pdf files via LilyPond, and somehow
in this case they don't quite understand each other. Anyway, actually I
would be more interested in doing it all the way in LilyPond without
introducing any weird syntax-conversion from another software.

So the Max package created a .ly file, and inside I found something like
this (I only kept two staves for the sake of tinyness):

\version "2.18.2"
\layout {
\context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
}
\context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
}
}
\score {
<<
\new Staff {
\clef treble \time 3/8 \tempo 4 = 120
c'8 d'8 e'8 | f'8 g'8 a'8 | b'8 c''8 d''8 | e''8 f''8 g''8 |
a''8 b''8 c'''8 | d'''8 e'''8f'''8
\bar "|."
}
\new Staff {
\clef treble \time 3/8\tempo 4 = 105 %or any other number...
c'8 d'8 e'8 | f'8 g'8 a'8 | b'8 c''8 d''8 | e''8
f''8 g''8 | a''8 b''8 c'''8 | d'''8 e'''8f'''8
\bar "|."
}
>>
}

Now ideally I would like to see this engraved in a proportional way, so
that the lower staff has a wider spacing, and so the notes are distributed
in the two staves illustrating their exact relation to a mutual time-scale
(so in short: sort of like on the picture above).
Is there any way I can do this? I only read that some guy did it with
giving individual horizontal spacings for each staff, but there were no
examples for that, and while it is not quite the thing (ideally it would be
like LilyPond understands and calculates the time-differences, and most
ideally it would render a coherent MIDI representation of it as well), I
can't even do that one.
Please shed some light over this for me!

Thank you all in advance!
Bálint Laczkó
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tie settings question

2016-10-25 Thread Karol Majewski
Now I realised that, according to my concept, tie should be lowered not only 
when

(stem-direction == UP && tie-direction == UP && note-has-a-dot == true)

but also when notehead is placed on staff-line and not on staff-space. In other 
words - when a dot is placed not on the same staff-position as notehead (we 
know that when notehead is placed on staff-line then dot is shifted up/down).

So there should be fourth condition but I have no idea how to put it in scheme. 
I need somethong like:

(if (> dot-position notehead-position)) // if dot is placed higher than notehead
(if (< dot-position notehead-position)) // if dot is placed lower than notehead

But how to define dot-position and notehead-position?



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


Odp: Re: Tie settings question

2016-10-25 Thread Karol Majewski
OK, David, I've combined everything. Hopefully everything is fine now. Here it 
is:

tweakTie =
#(lambda
  (grob)
  (let*
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties)))
  (notehead
(ly:spanner-bound
  (car ties) LEFT))
  (stem
(ly:grob-object notehead 'stem))
  (stem-dir
(ly:grob-property stem 'direction))
  (flag
(ly:grob-object stem 'flag))
  (dot
(ly:grob-object notehead 'dot)))
(if
  (>
(length ties) 1)
  (begin
(if
  (ly:grob? flag)
  (ly:grob-set-property! flag 'Y-extent
(cons 4 0)))
(for-each
  (lambda
(tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)))
(if
  (and
(= stem-dir 1)
(ly:grob? dot))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir 1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset -0.25) ties))
(if
  (and
(= stem-dir -1)
(ly:grob? dot))
  (for-each
(lambda
  (tie)
  (let
((tie-dir
(ly:grob-property tie 'direction)))
(if
  (= tie-dir -1)
  (begin
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)
(ly:grob-set-property! tie 'Y-offset 0.25) ties


Thanks for all your help.

Karol



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


Re: No readline in scheme-sandbox

2016-10-25 Thread David Wright
On Sat 22 Oct 2016 at 11:27:41 (+0200), Thomas Morley wrote:
> 2016-10-22 11:13 GMT+02:00 David Kastrup :
> > Thomas Morley  writes:
> >
> >> 2016-10-22 10:12 GMT+02:00 David Kastrup :
> >>> Thomas Morley  writes:
> >>>
>  The first hit reads in sourcefiles/guile.changelog:
> 
>  guile (1.8.1-2) unstable; urgency=low
> 
>    * Add readline as build dependency, libreadline8 as dependency for
>  libguile17 (thanks Ted Anderson).
>    * Remove /etc/hints.
>    * Remove curr from hints.
> 
>   -- Jan Nieuwenhuizen   Tue, 31 Oct 2006 00:47:35 +0100
> 
>  No idea whether it's important, it's far beyond my depth.
> >>>
> >>> That would point to readline support being compiled in.  libreadline8
> >>> would likely be the current one.
> >>>
> >>> At any rate, David stated that calling the lilypond executable with full
> >>> path left him with working readline support.
> >>>
> >>> Does
> >>>
> >>> which lilypond
> >>>
> >>> agree that the version called without explicit path is the same as with
> >>> path?  If so, something in command line processing would appear to make
> >>> use of the 0th argument for finding libraries.  That would warrant more
> >>> examination.
> >>>
> >>> --
> >>> David Kastrup
> >>
> >> which lilypond
> >> returns in my case:
> >> /home/hermann/bin/lilypond
> >> which is the script for 2.18.2 I mentioned in my previous post.
> >
> > David stated:
> >
> > I find the following:
> >
> > 1)
> >
> > If I run 'lilypond scheme-sandbox' I get a message saying:
> >
> > /usr/local/lilypond/usr/share/lilypond/current/ly/scheme-
> > sandbox.ly:3:2: error: GUILE signaled an error for the expression
> > beginning here
> > #
> >  (load-user-init)
> > readline is not provided in this Guile installation
> >
> > In 'top' I can see that the actual running command is
> > '/usr/local/lilypond/usr/bin/lilypond scheme-sandbox'.
> >
> > 2)
> >
> > If I run '/usr/local/lilypond/usr/bin/lilypond scheme-sandbox' directly
> > from the command line, I get guile complete with readline.
> >
> >
> > which sounds like he is _not_ running the wrapper script when stuff
> > works but rather the executable without the wrapper.  So it would appear
> > that what the wrapper does happens to interfere with finding the system
> > readline library while LilyPond presumably does not provide one of its
> > own.  Who is the main author of that wrapper?  Maybe he has an idea?
> >
> > --
> > David Kastrup
> 
> The entire (unchanged) wrapper script reads:
> 
> #!/bin/sh
> me=`basename $0`
> export LD_LIBRARY_PATH="/home/hermann/lilypond/usr/lib"
> exec "/home/hermann/lilypond/usr/bin/$me" "$@"
> 
> Commenting the line "export ..." works, though I can't imagine the 
> consequences.
> No idea who wrote the script, though.

Presumably whoever built /home/hermann/lilypond/usr/bin/* wanted them
to link to the particular set of libraries which they provided under
/home/hermann/lilypond/usr/lib which also came in the installation file.

If you export LD_LIBRARY_PATH="/home/hermann/lilypond/usr/bin"
instead, then you just prevent those libraries from being found
because they're not under /home/hermann/lilypond/usr/bin.

Not setting it will have the same effect (except in the pathological
case where someone has LD_LIBRARY_PATH set globally, a Bad Thing).

Cheers,
David.

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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
On Tue, Oct 25, 2016 at 10:37 AM, David Nalesnik
 wrote:
> Hi Karol,
>
> On Tue, Oct 25, 2016 at 9:35 AM, Karol Majewski  wrote:
>> OK, I'm trying to write something like this in scheme:
>>
>> if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true)
>> {
>>   \once \override Tie.details.skyline-padding = #5
>>   \once \override Tie.Y-offset = #-0.25
>> }
>>
>> Please, David or Harm, correct my mistakes. So far I've got this:
>>
>> raiseTie =
>> #(lambda
>>   (grob)
>>   (let*
>> ((ties
>> (ly:grob-array->list
>>   (ly:grob-object grob 'ties)))
>
> "tie" is not a defined variable.  When you bind "tie-dir" to a
> procedure, it will be evaluated, so "tie" has to be defined.
>
>>   (tie-dir
>> (ly:grob-property tie 'direction))
>>   (notehead
>> (ly:spanner-bound
>>   (car ties) LEFT))
>>   (stem
>> (ly:grob-object notehead 'stem))
>>   (stem-dir
>> (ly:grob-property stem 'direction))
>>   (flag
>> (ly:grob-object stem 'flag))
>
> grob = TieColumn.  TieColumn grobs store no reference to augmentation
> dots.  'dot is a part of the rhythmic-head-interface
> (http://lilypond.org/doc/v2.19/Documentation/internals/rhythmic_002dhead_002dinterface)
> which is supported by NoteHead.
>
>>   (dot (ly:grob-object grob 'dot)))
>> (if
>
> Again, "tie" is not defined.
>
>>   (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot))
>>   (begin
>

(Sorry, ignore that last admonition...)

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


Re: Tie settings question

2016-10-25 Thread David Nalesnik
Hi Karol,

On Tue, Oct 25, 2016 at 9:35 AM, Karol Majewski  wrote:
> OK, I'm trying to write something like this in scheme:
>
> if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true)
> {
>   \once \override Tie.details.skyline-padding = #5
>   \once \override Tie.Y-offset = #-0.25
> }
>
> Please, David or Harm, correct my mistakes. So far I've got this:
>
> raiseTie =
> #(lambda
>   (grob)
>   (let*
> ((ties
> (ly:grob-array->list
>   (ly:grob-object grob 'ties)))

"tie" is not a defined variable.  When you bind "tie-dir" to a
procedure, it will be evaluated, so "tie" has to be defined.

>   (tie-dir
> (ly:grob-property tie 'direction))
>   (notehead
> (ly:spanner-bound
>   (car ties) LEFT))
>   (stem
> (ly:grob-object notehead 'stem))
>   (stem-dir
> (ly:grob-property stem 'direction))
>   (flag
> (ly:grob-object stem 'flag))

grob = TieColumn.  TieColumn grobs store no reference to augmentation
dots.  'dot is a part of the rhythmic-head-interface
(http://lilypond.org/doc/v2.19/Documentation/internals/rhythmic_002dhead_002dinterface)
which is supported by NoteHead.

>   (dot (ly:grob-object grob 'dot)))
> (if

Again, "tie" is not defined.

>   (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot))
>   (begin

"tie" is bound locally here.  It is only usable within the lambda expression.

> (for-each
>   (lambda
> (tie)
> (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
> ties)
> (for-each
>   (lambda
> (tie)
> (ly:grob-set-property! tie 'Y-offset -0.25)) ties)
>
> \layout {
>   \context {
> \Score
> \override TieColumn.before-line-breaking = #raiseTie
>   }
> }
>
>

Try this:
raiseTie =
#(lambda (grob)
   (let* ((ties (ly:grob-array->list (ly:grob-object grob 'ties)))
  (notehead (ly:spanner-bound (car ties) LEFT))
  (stem (ly:grob-object notehead 'stem))
  (stem-dir (ly:grob-property stem 'direction))
  (flag (ly:grob-object stem 'flag))
  (dot (ly:grob-object notehead 'dot)))
 (if (and (= stem-dir 1)(ly:grob? dot))
 (for-each
  (lambda (tie)
(let ((tie-dir (ly:grob-property tie 'direction)))
  (if (= tie-dir 1)
  (begin
   (ly:grob-set-nested-property! tie '(details
skyline-padding) 5)
   (ly:grob-set-property! tie 'Y-offset -0.25)
  ties

\layout {
  \context {
\Score
\override TieColumn.before-line-breaking = #raiseTie
  }
}

{
  \time 3/8 \voiceOne
  g'4~ g'8~
  g'4~ g'8~
  g'4.~
  g'4~ g'8
}



I hope this helps.  You'll probably need to retool it to incorporate
the features you began the thread with, but this should give you an
idea of the principles involved.

David

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


Re: Augmentation dot positioning

2016-10-25 Thread Chris Yate
On 25 Oct 2016 3:36 p.m., "Carl Sorensen"  wrote:
>
>
>
>
> At any rate, I have some results from Chris's test file.  I have adjusted
> the text to contain my assessment of the results.  Please let me know if
> you disagree with any of my assessments.
>
> chord-dots-limit = 1 is better in most circumstances.  It is also
> consistent with Powell.
>
> chord-dots-limit = 2 is better in a few circumstances.
>
> Feedback would be appreciated.
>
> Thanks,
>
> Carl
>

Hi Carl,

Firstly, thanks for your work on this!

At a quick glance, the only two situations that need dots-limit =2 are #11
and #23.

I think both of these point to an inconsistency/bug in the algorithm -

I think #11 should have the B space dot (I'm guessing this is a case of the
algorithm not allowing a downward dot movement from the C).

#23 definitely should have the B dot, since it's a space-note.

It's looking pretty close to optimal though.

A side issue:
An idea I've just had: would it be useful to have a more flexible
positioning system similar to that for rests? (e.g. "f4/rest"). It might be
useful to have the option of custom dot placement for special cases.

I'm sure there's already a way to achieve this, but it's probably not easy.
If anyone thinks it worthwhile, I will think more about a suggested
syntax... Maybe something for the LSR rather than core functionality.

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


Re: Augmentation dot positioning

2016-10-25 Thread Carl Sorensen


On 9/19/16 7:50 AM, "Carl Sorensen"  wrote:
>
>I agree with all of these points, and am working on an improved algorithm.
>
>Once I get the algorithm solidified, I know how to implement it.
>
>But I haven't got the algorithm solidified yet.
>
>Thanks,
>
>Carl


OK, I have now made a change (not yet submitted for review) to move the
dot-positioning algorithms into Scheme.

And I have implemented a new default algorithm, which tries to do what
Chris and Werner liked, rather than strictly implementing the Gould
algorithm.

I am also working on a Gould algorithm that is user-selectable.

At any rate, I have some results from Chris's test file.  I have adjusted
the text to contain my assessment of the results.  Please let me know if
you disagree with any of my assessments.

chord-dots-limit = 1 is better in most circumstances.  It is also
consistent with Powell.

chord-dots-limit = 2 is better in a few circumstances.

Feedback would be appreciated.

Thanks,

Carl



dots[1].pdf
Description: dots[1].pdf
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tie settings question

2016-10-25 Thread Karol Majewski
OK, I'm trying to write something like this in scheme:

if (stem-direction == UP && tie-direction == UP && note-has-a-dot == true)
{
  \once \override Tie.details.skyline-padding = #5
  \once \override Tie.Y-offset = #-0.25
}

Please, David or Harm, correct my mistakes. So far I've got this:

raiseTie =
#(lambda
  (grob)
  (let*
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties)))
  (tie-dir
(ly:grob-property tie 'direction))
  (notehead
(ly:spanner-bound
  (car ties) LEFT))
  (stem
(ly:grob-object notehead 'stem))
  (stem-dir
(ly:grob-property stem 'direction))
  (flag
(ly:grob-object stem 'flag))
  (dot (ly:grob-object grob 'dot)))
(if
  (and (= stem-dir 1) (= tie-dir 1) (ly:grob? dot))
  (begin
(for-each
  (lambda
(tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)
(for-each
  (lambda
(tie)
(ly:grob-set-property! tie 'Y-offset -0.25)) ties)

\layout {
  \context {
\Score
\override TieColumn.before-line-breaking = #raiseTie
  }
}



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


Re: Configurable Rests

2016-10-25 Thread David Kastrup
Werner Arnhold  writes:

> Hi Kieren,
>
> as you said, works only with 2.19. I will use the solution for a large
> project, so I have to work with a stable distribution.
>
> I will try to improve my knowledge in Scheme (never a fault) and look
> for a solution on that way.
>
> Thank you all for your help!
>
> Werner
>
> Am Freitag, den 21.10.2016, 14:27 -0400 schrieb Kieren MacMillan:
>> Hi Werner,
>> 
>> > to show you what I want:
>> 
>> I believe the following gives the output you want:
>> 
>> %%%  SNIPPET BEGINS
>> \version "2.19"
>> 
>> hornI = {
>>   \partcombineApart
>>   c''4 \once \partcombineUnisono r c'' r
>>   g' \once \partcombineUnisono r c' r

In 2.18 I think there already was \partcombineUnisonoOnce (rather than
\once \partcombineUnisono ) so this functionality was there, just under
a different name and with somewhat less dependable behavior.

-- 
David Kastrup

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


Re: Configurable Rests

2016-10-25 Thread Kieren MacMillan
Hi Werner,

> as you said, works only with 2.19. I will use the solution for a large
> project, so I have to work with a stable distribution.

Just to reiterate: I use 2.19 for all my work, large and small (e.g., my 
current project is a 9-minute wind symphony for 36 players), and very rarely 
run into any problems which are related to the "stable versus unstable” 
question.

Far more often (read: almost always), the unstable version gives me features 
and fixes that the stable version doesn’t have, but which I either need or 
want. In particular, the partcombine mechanism (while admittedly nowhere near 
perfect) is working wonderfully for me on this particular project, and I can’t 
imagine engraving this score without the extra features in the unstable version.

This is not to try to pressure you one way or the other — you should make the 
decision that makes you the most comfortable — but I did want to communicate my 
experience, so that you can have more information with which to make your 
decision.

Hope this 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: Configurable Rests

2016-10-25 Thread Werner Arnhold
Hi Kieren,

as you said, works only with 2.19. I will use the solution for a large
project, so I have to work with a stable distribution.

I will try to improve my knowledge in Scheme (never a fault) and look
for a solution on that way.

Thank you all for your help!

Werner

Am Freitag, den 21.10.2016, 14:27 -0400 schrieb Kieren MacMillan:
> Hi Werner,
> 
> > to show you what I want:
> 
> I believe the following gives the output you want:
> 
> %%%  SNIPPET BEGINS
> \version "2.19"
> 
> hornI = {
>   \partcombineApart
>   c''4 \once \partcombineUnisono r c'' r
>   g' \once \partcombineUnisono r c' r
>   \bar "|."
> }
> 
> hornII = {
>   g'4 r g'8 r c'' r
>   r4 r e'8 g' c''4
> }
> 
> \score {
>   \new Staff \with { printPartCombineTexts = ##f }
> \partcombine #'(0 . 0) \hornI \hornII
> }
> %%%  SNIPPET ENDS
> 
> Unfortunately, that may require v2.19 — I’m not sure exactly when the 
> partcombiner was improved.
> (For the record, I am using v2.19.49 for mission-critical engraving work, so 
> it’s not nearly as “unstable” as the labelling suggests.)
> 
> Hope this 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