Re: How to break continuous ottava bracket

2017-07-25 Thread Karol Majewski
OK, got an idea:

\ottava #1 c'1 \ottava #0
\ottava #1 \set Staff.ottavation = #"8va" c'1 \ottava #0

It's not 100% elegant, but aceptable, I think.

--Karol


2017-07-25 16:32 GMT+02:00 Kieren MacMillan :

> Hi Karol,
>
> > Sometimes you want to have two independent bars in one line:
> > And here continuous ottava bracket looks stupid, doesn't it?
>
> Yes.
>
> > Is there more elegant way to break it? spacer rest does the job, but
> this solution is a bit artificial.
>
> Unfortunately, null spacers (e.g., s2*0) don't.  =(
>
> I look forward to seeing elegant solutions to your question/issue.
>
> Cheers,
> 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: How to break continuous ottava bracket

2017-07-25 Thread Karol Majewski
OK, got an idea:

\ottava #1 c'1 \ottava #0
\ottava #1 \set Staff.ottavation = #"8va" c'1 \ottava #0

It's not 100% elegant, but aceptable, I think.

--Karol

2017-07-25 16:06 GMT+02:00 Simon Albrecht <simon.albre...@mail.de>:

> On 25.07.2017 16:00, Karol Majewski wrote:
>
>> Hi, how to break ottava bracket beteween bars? The following gives me one
>> continuous bracket
>>
>> \ottava #1 c'1 \ottava #0
>> \ottava #1 c'1 \ottava #0
>>
>
> The bracket is continuous because the ottavation is continuous – there is
> no moment when the \ottava #0 actually takes effect.
> You could fake it with
>
> \ottava #1 c'1*1/2 \ottava #0 s2
> \ottava #1 c'1
>
> – but why?
>
> Best, Simon
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


How to break continuous ottava bracket

2017-07-25 Thread Karol Majewski
Hi, how to break ottava bracket beteween bars? The following gives me one
continuous bracket

\ottava #1 c'1 \ottava #0
\ottava #1 c'1 \ottava #0


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


Re: How to break continuous ottava bracket

2017-07-25 Thread Karol Majewski
Sometimes you want to have two independent bars in one line:

{
c'1 ^"example 1"
d'1 \bar "||"
\ottava #1 c''1 ^"example 2"
d''1 \ottava #0 \bar "||"
\ottava #1 c''1 ^"example 3"
d''1 \ottava #0 \bar "||"

}

And here continuous ottava bracket looks stupid, doesn't it?

Is there more elegant way to break it? spacer rest does the job, but this
solution is a bit artificial.

--Karol

2017-07-25 16:06 GMT+02:00 Simon Albrecht <simon.albre...@mail.de>:

> On 25.07.2017 16:00, Karol Majewski wrote:
>
>> Hi, how to break ottava bracket beteween bars? The following gives me one
>> continuous bracket
>>
>> \ottava #1 c'1 \ottava #0
>> \ottava #1 c'1 \ottava #0
>>
>
> The bracket is continuous because the ottavation is continuous – there is
> no moment when the \ottava #0 actually takes effect.
> You could fake it with
>
> \ottava #1 c'1*1/2 \ottava #0 s2
> \ottava #1 c'1
>
> – but why?
>
> Best, Simon
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


How to break continuous ottava bracket

2017-07-25 Thread Karol Majewski
Hi, how to break ottava bracket beteween bars? The following gives me one
continuous bracket

\ottava #1 c'1 \ottava #0
\ottava #1 c'1 \ottava #0


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


grouping in 6/8

2017-04-23 Thread Karol Majewski
Hi, which grouping is better:

6/8: c16 c16 c16 c8.~ c4.

or

6/8: c16 c16 c6 c16~ c8~ c4.


Couldn't find the answer in "Behind Bars".

-Best
KM



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


Odp: Incorrect note alignment

2016-11-16 Thread Karol Majewski
In traditional engraving note heads are aligned to their left. Take a look at 
this excerpt from Monnlight Sonata by Henle Verlag.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tie settings question

2016-10-26 Thread Karol Majewski
OK, I resign. But stil I don't get something in the code you posted yesterday:

%

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
}

%

Now, remove 'voiceOne' and a tie disappears. It seems that something is wrong 
with (let ((tie-dir (ly:grob-property tie 'direction. Is it possible to fix 
this?

Best
Karol



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


Re: Tie settings question

2016-10-26 Thread Karol Majewski
OK, David, so let's move one square backward and try to use staff-position. The 
following code does compile but doesn't do what I want. Perhaps what I'm trying 
to achieve is just not possible.

%%

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
(if
  (ly:grob? dot)
  (ly:grob-property dot 'staff-position) #f)))
(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
  (ly:grob? dot)
  (if
(> dot-pos notehead-pos)
(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
  (ly:grob? dot)
  (if
(< dot-pos notehead-pos)
(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
\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 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 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: 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 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: 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: convert-ly usage question

2016-10-24 Thread Karol Majewski
Hi Simon,

does convert-ly work for you when you try to update any single file?




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


Re: Tie settings question

2016-10-24 Thread Karol Majewski
This is fine now. Thx, David.

I work really hard to make LilyPond ties look the way I want. My current 
settings are the following:

\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
\override Tie.details.multi-tie-region-size = #1
\override Tie.line-thickness = #0.25
\override Tie.thickness = #2

I'm quite satisfied with those settings, but lately I discovered one situaton 
in which one of the ties looks not the way I want:

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

... and to my discontent the fifth tie is raised by 0.25 because of the dot. I 
don't want this dot to have any impact on the vertical position of the 
following tie. Overriding Tie.details.dot-collision-clearance doesn't help. How 
can I fix this? Of course using \shape is not an option, as I'm looking for 
general solution (global override). I begin to think that this is hardcoded



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


Re: Tie settings question

2016-10-22 Thread Karol Majewski
Hi David, when a chord doesn't have a flag, then your code doesn't work. Just 
replace

8~

with

4~

and it won't compile. Perhaps there should be a condition in your code: "if a 
note has a a flag then set Flag.Y-extent to (4 . 0)". Or maybe there is a 
better way to fix this?


 
> %%%
> 
> evenTies =
> #(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)))
> (if (> (length ties) 1)
> (begin
>  (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)
> 
> \layout {
>   \context {
> \Score
> \override TieColumn.before-line-breaking = #evenTies
>   }
> }
> 
> 
> \score {
> 
>   \relative c' {
> 8~
> 4
> c8~ c4.
>   }
> }
> 
> 




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


Odp: Re: Tie settings question

2016-10-22 Thread Karol Majewski
Aha, I get it. Thanks for the lesson. It seems I have to study scheme tutorial 
deeply...



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


Re: Tie settings question

2016-10-22 Thread Karol Majewski
Now I try to change Flag.Y-extent value in chords to: \override Flag.Y-extent = 
#'(4 . 0)

Got this, but it doesn't work. What am I doing wrong?

evenTies =
#(lambda
  (grob)
  (let
((ties
(ly:grob-array->list
  (ly:grob-object grob 'ties
(if
  (>
(length ties) 1)
  ((ly:grob-set-property! flag 'Y-extent 4 0)
  (for-each
(lambda
  (tie)
  (ly:grob-set-nested-property! tie '(details skyline-padding) 5)) 
ties)

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


\score {

\relative c' {
  8~
  4
  c8~ c4.
}

}




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


Re: Tie settings question

2016-10-21 Thread Karol Majewski
Yes, now it does what I want. Thx a lot. This is the final code - without color 
indicators:

hint =
\override TieColumn.before-line-breaking =
 #(lambda (grob)
(let ((ties (ly:grob-array->list (ly:grob-object grob 'ties
(if (> (length ties) 1)
(for-each
  (lambda (tie)
(ly:grob-set-nested-property! tie '(details skyline-padding) 5))
  ties

\relative c' {
 \hint
 4~
 
 c8~ c4.
}



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


Re: Tie settings question

2016-10-21 Thread Karol Majewski
OK, this does change skyline-padding in chords, but unfotunately it also 
changes skyline-padding between single notes (see example: c'8~ c'4). I'd like 
tied chords to have different skyline-padding value than tied single notes.

hint =
 \override TieColumn.before-line-breaking =
   #(lambda (grob)
 (for-each
   (lambda (clr tie)
 (ly:grob-set-nested-property! tie '(details skyline-padding) 5)
 (ly:grob-set-property! tie 'color clr))
   (circular-list red green)
 (ly:grob-array->list (ly:grob-object grob 'ties

\relative c' {
   \hint
   4~
   
   c'8~ c'4.
}




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


Tie settings question

2016-10-20 Thread Karol Majewski
Hi, I'd like my ties to have different settings when being a part of TieColumn. 
For example:

By default Tie.details.skyline-padding is set to 0.05, which is a good value. 
Now, for ties that are part of TieColumn (when connecting chords) I'd like to 
use different value of skyline-padding, let's say 5.

Of course I could use \once \override Tie.deatils.skyline-padding = #5 before 
each Tie Column, but I have a feeling that there should be a simpler way. Maybe 
there is a scheme trick to automate this. If there is, give me a hint, please.

Best
Karol




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


Horizontal spacing - How to prevent compressing while allowing stretching?

2016-10-09 Thread Karol Majewski
Hi, I have question related to horizontal spacing.

When ragged-right is set to false (default) LilyPond either stretches a line 
(system) or compresses it. I'd like to modify this behaviour so that LilyPond 
only stretches a line, but never compresses it. I don't want my spacing to be 
tighter than the natural one.

Is this adjustable?

Karol



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


Re: note stem problem

2016-03-06 Thread Karol Majewski

  
  
You should put the first bracket _after_ the first note:
 
\version "2.19.0"  \relative c {        \key c \major   \clef "bass_8"   r4 bes, bes'8[ e,] (e) g, }
 
--Karol



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


Re: note stem problem

2016-03-06 Thread Karol Majewski

  
  
Hmmm... you can't beam quarter note with eight note since quarter note doesn't have a beam.
 



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


Re: Whiteout box function by Thomas Morley / need help

2016-03-06 Thread Karol Majewski

Hi Andrew,
 
basically, this function allows to adjust the size of the whiteout box. It is especially useful in handling DynamicText-SpanBar collisions. Read the whole topic here:
 
http://lilypond.1069038.n5.nabble.com/Whiteout-box-function-by-Thomas-Morley-need-help-td161262.html
 
As for skylines: in a nutshell, skylines are invisible borders. Setting them to #'() affects the shape of these borders.
 
--Karol



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


Re: Whiteout box function by Thomas Morley / need help

2016-03-06 Thread Karol Majewski

OK, it seems that \override DynamicLineSpanner.vertical-skylines = #'() does the job.
 

There is an issue with DynamicText placed at the end of hairpin.
 
If DynamicText is placed after the end of hairpin and some extraWhiteout is added to the left of DynamicText then the whole DynamicText is shifted to the right.
 
I want DynamicText to stay centered below note. Any suggestions are appreciated.
 
Here's an example:
 
BEGIN
 
moreWhiteout =#(define-music-function (parser location adds item)(pair? symbol-list-or-music?)  (define more-stencil-whiteout    (lambda (grob)  (let* ((function (assoc-get 'stencil    (reverse (ly:grob-basic-properties grob (stil   (if (and (procedure? function)    (not (eq? (procedure-name function)  'more-stencil-whiteout)))   (function grob)   (begin (ly:warning "~a has no stencil. Ignoring" grob) 
#f    (if stil    (let*((x-ext (ly:stencil-extent stil X))  (y-ext (ly:stencil-extent stil Y))  (add-to-x-ext (if (pair? (car adds)) (car adds) adds))  (add-to-y-ext (if (pair? (cdr adds)) (cadr adds) '(0 . 0)))  ;(self-alignment-X (ly:grob-property grob 'self-alignment-X))  (new-stil    (ly:make-stencil   (ly:stencil-expr stil)   (offset-add x-ext add-to-x-ext)   (offset-add y-ext add-to-y-ext  ;(display self-alignment-X)  (if (grob::has-interface grob 'dynamic-text-interface)  (let* ((new-stencil-length   (interval-length (ly:stencil-extent new-stil X))) 
(orig-stencil-length   (interval-length (ly:stencil-extent stil X    (ly:grob-set-property! grob 'self-alignment-X  (if (not (= 0 (- new-stencil-length orig-stencil-length)))  (/ (- (- new-stencil-length (cdr add-to-x-ext))    (+ orig-stencil-length (cdr add-to-x-ext))) new-stencil-length)  0  new-stil)    #f  #{    \tweak layer #10    \tweak whiteout ##t    \tweak stencil #more-stencil-whiteout 
#item  #})% EXAMPLE%%%\layout {  \override DynamicText.extra-spacing-width = #'(+inf.0 . -inf.0)}musicI = { \time 2/4 \repeat unfold 16 b8 }musicII = {  r2  b4 -\moreWhiteout #'((-2 . 0.5)(0 . 0)) ^"XX" -\moreWhiteout #'(0 . 4) ^"YY"  b  r ^\<  r  b4 -\moreWhiteout #'((-6 . 0) (-1 . 1)) 
^\"pp" b}\new StaffGroup <<  \new Staff \relative c'' \musicI  \new Staff \relative c'' \musicII>>
 
END==





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


Re: Whiteout box function by Thomas Morley / need help

2016-03-05 Thread Karol Majewski

There is an issue with DynamicText placed at the end of hairpin.
 
If DynamicText is placed after the end of hairpin and some extraWhiteout is added to the left of DynamicText then the whole DynamicText is shifted to the right.
 
I want DynamicText to stay centered below note. Any suggestions are appreciated.
 
Here's an example:
 
BEGIN
 
moreWhiteout =#(define-music-function (parser location adds item)(pair? symbol-list-or-music?)  (define more-stencil-whiteout    (lambda (grob)  (let* ((function (assoc-get 'stencil    (reverse (ly:grob-basic-properties grob (stil   (if (and (procedure? function)    (not (eq? (procedure-name function)  'more-stencil-whiteout)))   (function grob)   (begin (ly:warning "~a has no stencil. Ignoring" grob) 
#f    (if stil    (let*((x-ext (ly:stencil-extent stil X))  (y-ext (ly:stencil-extent stil Y))  (add-to-x-ext (if (pair? (car adds)) (car adds) adds))  (add-to-y-ext (if (pair? (cdr adds)) (cadr adds) '(0 . 0)))  ;(self-alignment-X (ly:grob-property grob 'self-alignment-X))  (new-stil    (ly:make-stencil   (ly:stencil-expr stil)   (offset-add x-ext add-to-x-ext)   (offset-add y-ext add-to-y-ext  ;(display self-alignment-X)  (if (grob::has-interface grob 'dynamic-text-interface)  (let* ((new-stencil-length   (interval-length (ly:stencil-extent new-stil X))) 
(orig-stencil-length   (interval-length (ly:stencil-extent stil X    (ly:grob-set-property! grob 'self-alignment-X  (if (not (= 0 (- new-stencil-length orig-stencil-length)))  (/ (- (- new-stencil-length (cdr add-to-x-ext))    (+ orig-stencil-length (cdr add-to-x-ext))) new-stencil-length)  0  new-stil)    #f  #{    \tweak layer #10    \tweak whiteout ##t    \tweak stencil #more-stencil-whiteout 
#item  #})% EXAMPLE%%%\layout {  \override DynamicText.extra-spacing-width = #'(+inf.0 . -inf.0)}musicI = { \time 2/4 \repeat unfold 16 b8 }musicII = {  r2  b4 -\moreWhiteout #'((-2 . 0.5)(0 . 0)) ^"XX" -\moreWhiteout #'(0 . 4) ^"YY"  b  r ^\<  r  b4 -\moreWhiteout #'((-6 . 0) (-1 . 1)) 
^\"pp" b}\new StaffGroup <<  \new Staff \relative c'' \musicI  \new Staff \relative c'' \musicII>> 
 
END==



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


MinGW Runtime Assertion error

2016-03-05 Thread Karol Majewski
Hi. The following code gives error. What am I doing wrong?

BEGIN==

\version "2.19.37"

PS =
#(ly:make-stencil
  (list 'embedded-ps
"gsave
currentpoint translate
newpath
0.125 setlinewidth
0.0625 -0.5 moveto
0.0625 0.5 lineto
1.2375 0.5 lineto
1.2375 -0.5 lineto
closepath
gsave
fill
grestore
stroke
grestore"
  )
  (cons 0 1.3125)
  (cons -0.5 0.5))

cluster =
#(lambda
  (grob)
  (let*
((sz
(ly:grob-property grob 'font-size 0.0))
  (mult
(magstep sz)))
(set!
  (ly:grob-property grob 'stencil)
  (ly:stencil-scale PS mult mult

%

  \tweak stencil \cluster g'8


END==




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


proper beaming question

2015-12-05 Thread Karol Majewski
By default, LilyPond's beaming of eight rest and three eight notes in 4/4 meter 
is:

r8 c'8[ c'8 c'8]

E. Gould on p. 164 states that: Rhythmic figures that are not part of a 
repeated pattern may be best beamed into separate beats, so that they are not 
mistaken for triplets nor fot groups of three quavers in compound time:

4/4: c'8 r8 c'8 r8 r8 c'8 c'8[ c'8] rather than
4/4: c'8[ r8 c'8] r8 r8 c'8[ c'8 c'8]

Personally, I agree with her view and find that _this_ should be default LP 
behavior. So beaming in 4/4 should be like:

4/4: c'8[ c'8 c'8 c'8] r8 c'8 c'8[ c'8]

How can I force LilyPond to beam like this?



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


Re: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski
Paul, I,ve came up with this, but it doesn't help. Is setting baseline-skip to 
0 only way?

 BEGIN 

#(define
  (customTimeSignature grob)
  (let*
((sz
(ly:grob-property grob 'font-size 0.0))
(mult (magstep sz))
(fraction
(ly:grob-property grob 'fraction))
  (num
(car fraction))
  (denom
(cdr fraction)))
(grob-interpret-markup grob #{
  \markup {
 \translate #'(0 . 0.03) \override #'(font-name . Times) \fontsize 
#2.5 \override #'(baseline-skip . 2) \center-column {
  \line {
#(number-string num)
  }
  \line {
#(number-string denom)
  }
}
  }
#})))


 END 



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


Re: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski

Yes, this is what I'm trying right now :) Probably I'll stick to that, as it's the most natural way of changing the font.

Thanks.




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


Odp: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski
OK, so with abs-fontsize it scales properly, but if I set global staff size 
_higher_ than default (20) then it doesn't scale.



% BEGIN %%

#(define
  (customTimeSignature grob)
  (let*
((sz
(ly:grob-property grob 'font-size 0.0))
(mult (magstep sz))
(fraction
(ly:grob-property grob 'fraction))
  (num
(car fraction))
  (denom
(cdr fraction)))
(grob-interpret-markup grob #{
  \markup {
 \scale #(cons mult mult) \override #'(font-name . Times) 
\abs-fontsize #15 \override #'(baseline-skip . 2) \center-column {
  \line {
#(number-string num)
  }
  \line {
#(number-string denom)
  }
}
  }
#})))

\layout {
  \context {
\Score
\override TimeSignature.stencil = #customTimeSignature
  }
}

one = {
  \time 3/4 c'2.
}

two = {
  c'2.
}


  \new Staff \with {
fontSize = #-3
\override StaffSymbol.staff-space = #(magstep -3)
  } \one
  \new Staff \two



% END %%



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


Re: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski

Yes, Abraham, I've tried this. But the drawback of this solution is thet it doesn't scale to bigger staff size.

Try: #(set-global-staff-size 26) and you'll get what I mean.


-- Karol



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


Odp: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski
I'd like to avoid setting baseline-skip to 0, as it results in specing issues 
between num and denom (denom is bit misaligned vertically).



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


Re: Custom TimeSignature doesn't scale correctly

2015-07-16 Thread Karol Majewski

Abraham, I'll try to explain why setting baseline-skip to 0 is a bad idea here. Take a look at the attachment. This is what is happening if you set baseline-skip to 0.

In case of some other fonts difference between 'a' and 'b' is more noticeable.
So we need to have baseline skip set to 2 to have perfectly even spacing.

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


What happened to whiteout?

2015-07-10 Thread Karol Majewski
For some reason this gives horrible output:

=BEGIN

\version 2.19.22

one = {
  \clef treble \key c \major \time 2/4 \tempo Andantino
  a'2 _\markup { \whiteout \pad-markup #0.5 { \dynamic p \italic dolce } } a'2
}

two = {
  \clef bass \key c \major \time 2/4
  c2 c2
}

\score {
  \new PianoStaff 
\new Staff = one \one
\new Staff = two \two
  
}

===END===

In the second image (2.png) you can see even worse example of how whiteout 
works.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Making Feta number glyphs monospaced (tabular)

2015-05-17 Thread Karol Majewski
I was thinking of changing side bearings only.

I looked into *.mf files of Feta and noticed that there is some kerning data 
applied to number glyphs. So I would:
1) remove kerning
2) set the same glyph width for all numbers.

And I wonder how time signatures like 12/16 are aligned in Baerenreiter, Peters 
scores. I own none of these editions and it can be hard to answer that as time 
signatures like 12/16 are fairly rare.

-- Karol

Dnia 17-05-2015 o godz. 21:37 Werner LEMBERG napisał(a):
  Recently I had to use meter 11/16 and noticed that Feta numerals are
  not monospaced - they are not aligned vertically.  I would consider
  modifying Feta number glyphs so that each of them have the same
  width.  Any thoughts on this?
 
 Basically, I don't object.  Slightly stretching or squeezing the
 glyphs horizontally shouldn't be noticeable, I think.
 
 However, have you checked (old) scores from Bärenreiter, Peters, UE,
 etc., whether those numerals really have the same width?  I guess that
 manually engraved digits have a natural deviation in positioning much
 larger than what you demonstrate (using an extreme magnification).
 
 
 Werner




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


Making Feta number glyphs monospaced (tabular)

2015-05-17 Thread Karol Majewski
Recently I had to use meter 11/16 and noticed that Feta numerals are not 
monospaced - they are not aligned vertically. I would consider modifying Feta 
number glyphs so that each of them have the same width. Any thoughts on this?

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


Breaking news: kerning on Windows does work now!

2015-04-06 Thread Karol Majewski
I want to say big 'Thank You' to Masamichi Hosoda, who managed to fix this 
nasty bug! Issues 2656 and 2657 can be marked as 'Fixed' now :)

- Karol



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


how to compile many .ly files with one command

2014-09-30 Thread Karol Majewski
Hi

I have over 50 .ly files in one directory. Compiling them with:

lilypond file1.ly
lilypond file2.ly

etc...

... is very time consuming ;)

Is there something like: 'lilypond all'?


--Karol



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


Re: how to compile many .ly files with one command

2014-09-30 Thread Karol Majewski
Ahhh, thanks. It's so simple.

It works both on Windows and Linux. BTW. it should documented in '1.2 
Command-line usage', shouldn't it?

--Karol



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


Monospaced / Tabular figures in LilyPond

2014-09-24 Thread Karol Majewski
In some fonts default spacing format for figures is set to proportional, which 
means that numerals have variable spacing - depending on glyph width. I'd like 
to change the format to tabular, so that numerals are monospaced. This is 
typical OpenType feature. In XeLaTeX I can do this via:

\usepackage{fontspec}
\setmainfont [Numbers = {Monospaced}]{Fontname}

How can I achieve this in LilyPond?



More on proportional vs tabular:

http://www.fonts.com/content/learning/fontology/level-3/numbers/proportional-vs-tabular-figures


-- Karol



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


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-19 Thread Karol Majewski
Once you have medium fonr installed on your system, \medium command should 
work, but it doesn't, and that's the point. In my example I use Ubuntu 
typeface, because this tyoeface has medium weight.

 Did you and Karol expect “medium” to be something other than “normal”?

Of course medium should be thicker than normal but thinner than bold. 


-- Karol



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


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-19 Thread Karol Majewski
OK, so having read what Abraham wrote, I'll put my question in other way:

Is there any typeface that works in LilyPond with \medium command? I haven't 
found any...

-- Karol



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


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-19 Thread Karol Majewski

Exactly! This is what \medium should work like, isn't it?

-- Karol



Karol,

Do you mean that you want a slightly heavier look than "Regular" or "Book" but not "Bold", more like a semi-bold?

-Abraham





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


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-19 Thread Karol Majewski
Just like that!

I do know that font-name works, but having \medium command working would be 
nice.

 
  Like the attached?
 
  \version 2.19.15
 
  \markup { \box \abs-fontsize #48 \override #'(font-name . Ubuntu) bar }
  \markup { \box \abs-fontsize #48 \override #'(font-name . Ubuntu 
 Medium) bar }
  \markup { \box \abs-fontsize #48 \override #'(font-name . Ubuntu Bold) 
 bar }




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


\override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread Karol Majewski
\override #'(font-series . medium) or \medium

None of them work. Bug?

\version 2.19.14

\paper {
  #(define fonts
(make-pango-font-tree  Ubuntu 
  (/ staff-height pt 20)))
}

\markup { \sans foo }
\markup { \sans \bold foo }
\markup { \sans \medium foo }



-- Karol



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


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread Karol Majewski
The point is that LilyPond doesn't recognize medium font-series. When you set 
font-series to bold, everything's fine.


 Does this work?
 
 \paper {
   #(define fonts
 (set-global-fonts
 #:sans Ubuntu
   ))
 }
 
 I don't have 2.19.14 installed but afaik the code for setting the global
 fonts was changed in 2.19.12 to support alternative music fonts.
 




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


wrong page-number position in 2.19.14

2014-09-16 Thread Karol Majewski
I noticed that in 2.19.14, page numbers in oddHeaderMarkup are center-aligned, 
while in evenHeaderMarkup - left-aligned. This looks strange. Bug?

{
c'1
\pageBreak
c'1
\pageBreak
c'1
\pageBreak
c'1
\pageBreak
c'1
\pageBreak
}


-- Karol



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


define-vstrut-markup ?

2014-09-07 Thread Karol Majewski
Hi

So far I have this:


#(define-markup-command
  (vstrut layout props)
  ()
  (let
((ref-mrkp
(interpret-markup layout props #9608;)))
(ly:make-stencil
  (ly:stencil-expr empty-stencil) empty-interval
  (ly:stencil-extent ref-mrkp Y


How can I create 'define-vstrut-markup' using above vstrut definition?

--Karol



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


Re: define-vstrut-markup ?

2014-09-07 Thread Karol Majewski

Works! Thanks!

#(define-markup-command (strut layout props text) (markup?) (interpret-markup layout props #{ \markup \concat { \vstrut #text } #}))


--Karol



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


Re: a thank you :)

2014-08-17 Thread Karol Majewski

Yeah... just imagine where would be LilyPond without David we would probably still use 2.12 ;)



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


Re: notation rule question

2014-07-23 Thread Karol Majewski
And how to divide this:

c4 c8 c8~ c4 c4

or

c4 c8 c4. c4

Again - couldn't find such rhythmic structure in my collection of hand engraved 
scores.

--Karol



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


Re: something's wrong with \unset Score.proportionalNotationDuration

2014-07-23 Thread Karol Majewski
Aha, thanks for explanation. Anyway, this behavior of Lily is confusing.




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


Re: notation rule question

2014-07-23 Thread Karol Majewski
Thanks David, but you answered an old question :)

My current question is related to:


c4 c8 c8~ c4 c4

vs

c4 c8 c4. c4



--Karol



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


something's wrong with \unset Score.proportionalNotationDuration

2014-07-22 Thread Karol Majewski
\version 2.19.10

{
  \set Score.proportionalNotationDuration = #(ly:make-moment 1/32)
  \repeat unfold 32 { f'32 }
  \newSpacingSection
  \unset Score.proportionalNotationDuration
  f'4 f'4 f'4 f'4
}


Look at the huge gap between first two quarter notes. Bug?


--Karol



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


automaticMelismata

2014-07-21 Thread Karol Majewski
Hi,

how can I disable automatic melismatas on slurs? I remember that there was 
automaticMelismata but no longer it seems to be working.

--Karol



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


absolute baseline-skip

2014-07-20 Thread Karol Majewski
Hi,

I'm trying to redefine abs-fontsize from define-markup-commands.scm, so that 
baseline-skip is also absolute. Current behavior is that with abs-fontsize, 
baseline-skip scales to global-staff-size, which I don't like. I know that 
there was attempt made by Nicolas Sceaux 
(http://lilypond.1069038.n5.nabble.com/Markup-in-absolute-font-size-td34087.html),
 but no solution there. Here's original code:


#(define-markup-command (abs-fontsize layout props size arg)
  (number? markup?)
  #:category font
  (let* ((ref-size (ly:output-def-lookup layout 'text-font-size 12))
 (text-props (list (ly:output-def-lookup layout 'text-font-defaults)))
 (ref-word-space (chain-assoc-get 'word-space text-props 0.6))
 (ref-baseline (chain-assoc-get 'baseline-skip text-props 3))
 (magnification (/ size ref-size)))
(interpret-markup
 layout
 (cons
  `((baseline-skip . ,(* magnification ref-baseline))
(word-space . ,(* magnification ref-word-space))
(font-size . ,(magnification-font-size magnification)))
  props)
 arg)))


If you have any ideas, please share! Perhaps something like abs-baseline-skip 
is needed?

--Karol



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


How to put RehearsalMarks on their own horizontal line?

2014-07-15 Thread Karol Majewski
Hi,

I'm having a hard time trying put all RehearsalMarks on their own horizontal 
line. This is an example:

%%

\version 2.19.10

global = {
  \time 3/4 \tempo Allegro s1*3/4*2
}

part = {
  \clef treble
  c'4 \mark \default d'4 e'4
  c'4 \mark \default d'4 e'4
}

\score {
  \new Staff 
\global
\part
  
}

%%

Here, I want B to be higher - on the same line as A. In other words, I want 
rehearsalm marks to behave like expression marks in Dynamics context.

I tried to define new context, but with no success.

Any ideas appreciated.

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


Re: How to put RehearsalMarks on their own horizontal line?

2014-07-15 Thread Karol Majewski
 
 See Vertical collision avoidance in the NR:
 
 \score {
 \new Staff 
 \override Score.RehearsalMark.outside-staff-priority = #0
 \global
 \part
 
 }
 

Hi Phil, I tried that before, but this solution has one drawback: rehearsal 
marks are _below_ tempo marks. And I want to place them _above_ tempo marks.




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


Re: How to put RehearsalMarks on their own horizontal line?

2014-07-15 Thread Karol Majewski
Very nice, Kieren! But still there are some issues:

1) place the first \mark at the begin and you'll get an error:

programming error: cyclic chain in pure-Y-offset callbacks

2) Take a look at this example:

%%%

\version 2.19.10

\layout {
 \context {
   \type Engraver_group
   \name ScoreMarks
   \consists Staff_collecting_engraver
   \consists Axis_group_engraver
   \override VerticalAxisGroup.staff-affinity = #DOWN
   \consists Mark_engraver
   \consists Time_signature_engraver
   \override TimeSignature.stencil = #point-stencil
 }
 \context {
   \Score
   \remove Mark_engraver
   \accepts ScoreMarks
 }
}

global = {
 \time 3/4
 \tempo Allegro
 \mark \default s4 s2
 s4 \mark \default s2
 \tempo Adagio s4*3
}

part = {
 \clef treble
 c'4 d' e'
 c'4 d' e'
 c'''4 d''' e'''
}

\score {
 
   \new ScoreMarks \global
   \new Staff  \global \part 
 
}

%%%

Here, I'd like to have both A and B _above_ Adagio (see attachment).
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


partial in the middle of piece

2014-06-15 Thread Karol Majewski
The following gives warning:

warning: barcheck failed at: 3/4

http://lilypond.1069038.n5.nabble.com/Partial-measures-in-middle-of-score-td154007.html
https://code.google.com/p/lilypond/issues/detail?id=3645

Is this is related to 3645?


\version 2.19.7

upper = {
  \time 4/4
  \partial 4 c'4 c'1
  c'1
  \partial 4 c'4 c'1
  c'1
}

lower = {
  \time 4/4
  \partial 4 r4 R1
  R1
  \partial 4 r4 R1
  R1
}

\score {
  \new PianoStaff 
\new Staff = upper \upper
\new Staff = lower \lower
  
}

--Karol




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


Re: Whiteout box function by Thomas Morley / need help

2014-06-14 Thread Karol Majewski

Done! :-)


moreWhiteout =#(define-music-function (parser location adds item)(pair? symbol-list-or-music?) (define more-stencil-whiteout (lambda (grob) (let* ((function (assoc-get 'stencil (reverse (ly:grob-basic-properties grob (stil  (if (and (procedure? function) (not (eq? (procedure-name function) 'more-stencil-whiteout))) (function grob) (begin (ly:warning "~a has no stencil. Ignoring" grob) 
#f (if stil (let*((x-ext (ly:stencil-extent stil X)) (y-ext (ly:stencil-extent stil Y)) (add-to-x-ext (if (pair? (car adds)) (car adds) adds)) (add-to-y-ext (if (pair? (cdr adds)) (cadr adds) '(0 . 0))) ;(self-alignment-X (ly:grob-property grob 'self-alignment-X)) (new-stil (ly:make-stencil (ly:stencil-expr stil) (offset-add x-ext add-to-x-ext) (offset-add y-ext add-to-y-ext ;(display self-alignment-X) (if (grob::has-interface grob 'dynamic-text-interface) (let* ((new-stencil-length (interval-length (ly:stencil-extent new-stil X))) 
(orig-stencil-length (interval-length (ly:stencil-extent stil X (ly:grob-set-property! grob 'self-alignment-X (if (not (= 0 (- new-stencil-length orig-stencil-length))) (/ (- (- new-stencil-length (cdr add-to-x-ext)) (+ orig-stencil-length (cdr add-to-x-ext))) new-stencil-length) 0 new-stil) #f #{ \tweak layer #10 \tweak whiteout ##t \tweak stencil #more-stencil-whiteout 
#item #})% EXAMPLE%%%\layout { \override DynamicText.extra-spacing-width = #'(+inf.0 . -inf.0)}musicI = { \time 2/4 \repeat unfold 16 b8 }musicII = { r2 b4 -\moreWhiteout #'((-2 . 0.5)(0 . 0)) ^"XX" -\moreWhiteout #'(0 . 4) ^"YY" b r r -\moreWhiteout #'((-3.2 . 4.12)(0 . 0)) ^\ 
b4 -\moreWhiteout #'(-2 . 10.5) ^"XX" b}\new StaffGroup  \new Staff \relative c'' \musicI \new Staff \relative c'' \musicII 


--Karol



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


Re: Whiteout box function by Thomas Morley / need help

2014-06-13 Thread Karol Majewski

Thanks, David.

I've looked into this, but have no idea what's going on there. Here's crippled version of extraWhiteout function - works only for TextScript and allows to set X-extent only. But still don't know how to turn this into \tweak.

extraWhiteout =#(define-music-function (parser location adds) (pair?) (define more-stencil-whiteout (lambda (grob) (let* ((function (assoc-get 'stencil 
(reverse (ly:grob-basic-properties grob (stil (if (and (procedure? function) (not (eq? (procedure-name function) 'more-stencil-whiteout))) (function grob) (begin (ly:warning "" grob) #f (if stil (let* ((x-ext (ly:stencil-extent stil X)) (add-to-x-ext (if (pair? (car adds)) (car adds) adds)) (new-stil (ly:make-stencil (ly:stencil-expr stil) (offset-add x-ext add-to-x-ext) (ly:stencil-extent stil Y new-stil) #f #{ \once \override TextScript.layer = 
#10 \once \override TextScript.whiteout = ##t \once \override TextScript.stencil = #more-stencil-whiteout #})%%%musicI = { \time 2/4 \repeat unfold 16 b8 }musicII = { r2 \extraWhiteout #'(-2 . 0.5) b4 ^"XX" b r r^\ \extraWhiteout #'(-2 . 10.5) b4 ^"XX" b}\new StaffGroup 
 \new Staff \relative c'' \musicI \new Staff \relative c'' \musicII



--Karol



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


Re: Slur crossing through accidental

2014-06-12 Thread Karol Majewski
Hi, James

How about:

\override Slur.details.accidental-collision = #1000

?


 I am at a complete loss what to do about this slur. It collides with the
 b-flat's accidental in a way that makes it hard to see what the slur is
 supposed to be.
 
 \version 2.18.2
 \language english
 
 \relative c {
   \clef bass
   \time 6/8
   bf8 ( d' ) r8
   bf,16 ( bf' ) d ( bf d bf )
 }
 
 I tried \override Accidental.avoid-slur = #'inside, but this did 
 nothing.
 I tried shifting the accidental to be closer to the notehead -- \once
 \override Accidental.X-offset = #0.2 -- this does nothing. I tried using
 \shape but didn't find the magic numbers yet.
 
 Suggestions? Thanks.
 
 hjh
 
 
 ___
 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


Odp: Slur crossing through accidental

2014-06-12 Thread Karol Majewski
And of course you have to increase region size. So it should be:

\override Slur.details.region-size = #5
\override Slur.details.accidental-collision = #1000


--Karol




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


Re: Whiteout box function by Thomas Morley / need help

2014-06-12 Thread Karol Majewski
I'm trying to make this function work via \tweak. Grob-name string is no longer 
needed. The following code doesn't work. Perhaps I missed something that is 
obvious to schemers. Any ideas are welcome.

moreWhiteout =
#(define-music-function (parser location adds)(pair?)
  (define more-stencil-whiteout
(lambda (grob)
  (let* ((function (assoc-get 'stencil
(reverse (ly:grob-basic-properties grob
 (stil
   (if (and (procedure? function)
(not (eq? (procedure-name function)
  'more-stencil-whiteout)))
   (function grob)
   (begin
 (ly:warning ~a has no stencil. Ignoring grob)
 #f
(if stil
(let*((x-ext (ly:stencil-extent stil X))
  (y-ext (ly:stencil-extent stil Y))
  (add-to-x-ext (if (pair? (car adds)) (car adds) adds))
  (add-to-y-ext (if (pair? (cdr adds)) (cadr adds) '(0 . 0)))
  (new-stil
(ly:make-stencil
   (ly:stencil-expr stil)
   (offset-add x-ext add-to-x-ext)
   (offset-add y-ext add-to-y-ext
  (if (grob::has-interface grob 'dynamic-text-interface)
  (let* ((new-stencil-length
   (interval-length (ly:stencil-extent new-stil X)))
 (orig-stencil-length
   (interval-length (ly:stencil-extent stil X
(ly:grob-set-property! grob 'self-alignment-X
  (if (not (= 0 (- new-stencil-length orig-stencil-length)))
  (/ (- (- new-stencil-length (cdr add-to-x-ext))
(+ orig-stencil-length (cdr add-to-x-ext)))
 new-stencil-length)
  0
  new-stil)
#f
  #{
-\tweak layer #10
-\tweak whiteout ##t
-\tweak stencil #more-stencil-whiteout
  #})

%%%
%% EXAMPLE
%%%

\layout {
  \override DynamicText.extra-spacing-width = #'(+inf.0 . -inf.0)
}

musicI = { \time 2/4 \repeat unfold 16 b8 }

musicII = {
  r2
  b4 \moreWhiteout #'((-2 . 0.5)(0 . 2)) ^XX
  b
  r
  
  r^ \moreWhiteout #'((-3.2 . 4.12)(0 . 0)) \  
  b4 \moreWhiteout #'(-2 . 10.5) ^XX b
}

\new StaffGroup 
  \new Staff \relative c'' \musicI
  \new Staff \relative c'' \musicII





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


Re: Dynamic text/staff symbol overlap

2014-06-05 Thread Karol Majewski



Of course it is DynamicText.

try:
\once \override DynamicText.extra-offset = #'(-1 . -1)


Karol


- Original Message -
From: Simon Albrecht
To: lilypond user list
Sent: Thursday, June 05, 2014 8:57 PM
Subject: Dynamic text/staff symbol overlap

Hello,in places with tight vertical spacing its often useful and best practice to have the dynamic text overlap slightly with the staff symbol lines. I tried to reproduce this with something like the following:
\version "2.19"

\relative {
\once \override DynamicText.outside-staff-priority = ##f
\once \override DynamicText.X-offset = #-1
\once \override DynamicText.Y-offset = #-1
c'^\f
}
Of course the Y-offset command doesnt override the collision avoidance. I thought disabling outside-staff-priority would do that, but still the offset doesnt have any effect. What do I overlook?TIA, Simon


___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: Dynamic text/staff symbol overlap

2014-06-05 Thread Karol Majewski

  
  
And how about:

\version "2.19"\relative {\once \override DynamicLineSpanner #'Y-offset = #'2.5\once \override DynamicLineSpanner #'outside-staff-priority = ##fc'^\f}


Karol



Am 05.06.2014 22:17, schrieb Karol Majewski:

Of course it is DynamicText.

try:
 \once \override DynamicText.extra-offset = #'(-1 . -1)

I know about that, but as extra-offset is applied after creating the layout, the whole point of saving space is lost.



Karol


- Original Message -
From: Simon Albrecht
To: lilypond user list
Sent: Thursday, June 05, 2014 8:57 PM
Subject: Dynamic text/staff symbol overlap

Hello,  in places with tight vertical spacing its often useful and best practice to have the dynamic text overlap slightly with the staff symbol lines. I tried to reproduce this with something like the following: 
\version "2.19"

\relative {
\once \override DynamicText.outside-staff-priority = ##f
\once \override DynamicText.X-offset = #-1
\once \override DynamicText.Y-offset = #-1
c'^\f
}
 Of course the Y-offset command doesnt override the collision avoidance. I thought disabling outside-staff-priority would do that, but still the offset doesnt have any effect. What do I overlook?  TIA, Simon


___ 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


How to prevent slur from breaking?

2014-05-03 Thread Karol Majewski
Hi.

When it comes to create slur over repeat (volta), I use this trick:

http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes#modifying-ties-and-slurs
   (see: Specifying control points explicitly)

But when slur is created just before line break, it appears also in the next 
line, which of course is not what I want.

{
c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 -\tweak control-points #'((-46 
. 7) (-31 . 8) (-9 . 9) (0.75 . 7)) (  ) c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 
c'1 c'1 c'1 c'1 c'1 
}

How to prevent this?

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


Odp: How to prevent slur from breaking?

2014-05-03 Thread Karol Majewski
OK, so I've tried:

\alterBroken transparent #'(#f #t) Slur

and it works quite well. The only problem is that transparent object is still 
there, therefore takes space. Better solution would be:

\alterBroken stencil #'(#t #f) Slur

But It doesn't work...



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


Re: How to prevent slur from breaking?

2014-05-03 Thread Karol Majewski
Thanks Harm!

\omitLastBrokenSlur is what I need! Anathoer useful command to my collection :-)




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


Re: whole page rotated

2014-05-03 Thread Karol Majewski
Harm, and what if I don't want to rotate my note head along with stem-dir? How 
to modify your code then? Some note heads look beeter when they are not being 
rotated.

 
 If you only want noteheads of doThin-type, try:
 
 \version 2.18.0
 
 #(define nhg
   (lambda (grob)
 (let* ((stil (ly:note-head::print grob))
(dur-log (ly:grob-property grob 'duration-log))
(nh-id-nr (if (= dur-log 2) 2 1))
(stem (ly:grob-object grob 'stem))
(stem-dir (ly:grob-property stem 'direction))
(new-note-head-stil
 (grob-interpret-markup grob
   (markup #:musicglyph (format #f noteheads.u~adoThin
 nh-id-nr)
 
 (ly:stencil-scale new-note-head-stil 1 stem-dir
 
 \layout {
   \context {
 \Voice
 \override NoteHead.stencil = #nhg
   }
 }
 
 \relative c '' {
   c1 c2 \repeat unfold 4 c8
   \repeat unfold 64 c4
 }
 
 
 HTH,
   Harm




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


Re: whole page rotated

2014-05-03 Thread Karol Majewski
OK, I made it. I think I begin to understand scheme :-)

#(define nhg
  (lambda
(grob)
(let*
  ((stil
  (ly:note-head::print grob))
(dur-log
  (ly:grob-property grob 'duration-log))
(nh-id-nr
  (if
(= dur-log 2) 2 1))
(new-note-head-stil
  (grob-interpret-markup grob
(markup #:musicglyph
  (format #f noteheads.u~adoThin nh-id-nr) 
new-note-head-stil)))



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


Odp: Left hand/right hand editorial annotation

2014-05-01 Thread Karol Majewski
Hi Thomas. What you mean is probably so called other-hand bracket. This feature 
has been requested many times, but so far there is no ultimate solution. See 
this:

http://lilypond.1069038.n5.nabble.com/missing-feature-piano-hand-brackets-td41551.html

https://code.google.com/p/lilypond/issues/detail?id=1319


--Karol



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


slur slope question

2014-04-30 Thread Karol Majewski
Please, take a look at the attachment. This is excerpt from one the old Henle 
Verlag editions. Although slur goes from bes to bes, it is sloped - because of 
staccato. And it looks absolutely fine.

Now, look how LilyPond handles this:

{
 bes8 ( d'16 c'16 bes4 -. )
}

Here, there is this gap between first note head and slur start point, which 
doesn't look good. Of course I know that I can tweak this via \offsetPositions 
(http://lsr.di.unimi.it/LSR/Item?id=748). But the question is: can I change 
this behavior in more general way? For example by overriding one of Slur.detail 
parameters?

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


Odp: How to create a text spanner with a half arrow on right side

2014-04-30 Thread Karol Majewski
\override TextSpanner.bound-details.right.text = \markup { \postscript 
#samplePath }

--Karol


 I am trying to create a text span solid line that ends with just 1/2 of an
 arrowhead on the right side.  Is there a way to set a graphic, something
 simple like ...
 
 samplePath =
   #'((moveto 0 0)
  (lineto -1 -.5)
  (closepath))
 
 ... as the right text for the spanner?  Something like:
 
 \once \override TextSpanner.bound-details.right.text = \samplePath
 
 
 ___
 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


Odp: How to create a text spanner with a half arrow on right side

2014-04-30 Thread Karol Majewski
And of course:

samplePath =
#
  0 0 moveto
  2 0 lineto
  0 1 lineto
  closepath
  fill
  stroke




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


Re: Whiteout box function by Thomas Morley / need help

2014-04-25 Thread Karol Majewski
Hi Harm. This is quite an impressive piece of code! So far everything is fine 
:-) Thank you very much. It should be added to LSR, I think.




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


Re: Whiteout box function by Thomas Morley / need help

2014-04-21 Thread Karol Majewski
Although I know nothing about scheme, I've managed to slim down this function, 
so that there are no optional arguments. Now I'll try to find out why it 
doesn't work for DynamicText grob.

Harm, thanks in advance for any hints. Perhaps we can mix your function with 
flexible-stencil-whiteout (see my first post).

%

\version 2.19.5

moreWhiteout =
#(define-music-function
  (parser location adds)
  (pair?)
  (define
(interval-add iv-1 iv-2)
(cons
  (+
(car iv-1)
(car iv-2))
  (+
(cdr iv-1)
(cdr iv-2
  (define more-stencil-whiteout
(lambda
  (grob)
  (let*
((stil
(ly:text-interface::print grob))
  (x-ext
(ly:stencil-extent stil X))
  (y-ext
(ly:stencil-extent stil Y))
  (add-to-x-ext
(if
  (pair?
(car adds))
  (car adds) adds))
  (add-to-y-ext
(if
  (pair?
(cdr adds))
  (cadr adds) '(0 . 0)))
  (new-stil
(ly:make-stencil
  (ly:stencil-expr stil)
  (interval-add x-ext add-to-x-ext)
  (interval-add y-ext add-to-y-ext new-stil)))
  #{
\once \override DynamicText . layer = #10
\once \override DynamicText . whiteout = ##t
\once \override DynamicText . stencil = #more-stencil-whiteout
  #})

%%%
%% EXAMPLE
%%%

musicI = { \time 2/4 \repeat unfold 16 b8 }

musicII = {
  r2
  %% apply to X- and Y-axis
  \moreWhiteout #'((-2 . 0.5)(0 . 2))
  b4 \ff b
  r2
  %% apply to X-axis only
  \moreWhiteout #'(-2 . 0.5)
  b4 \mf b
}


\new StaffGroup 
  \new Staff \relative c'' \musicI
  \new Staff \relative c'' \musicII


%


-- Karol



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


Re: Whiteout box function by Thomas Morley / need help

2014-04-21 Thread Karol Majewski
Harm,

this change is related to issue 621:
http://code.google.com/p/lilypond/issues/detail?id=621

Now, I do not accept this solution. It is simply against the rules. DynamicText 
shouldn't have influence on spacaing. Therefore I prefer whiteout.

So I use:

\context {
  \Staff
  \override DynamicText.extra-spacing-width = #'(+inf.0 . -inf.0)
}

Note that your previous function (the one that contains 
flexible-stencil-whiteout) works well with DynamiText. But the drawback is that 
it doesn't allow to set left and right X-extent.

-- Karol




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


Odp: too wide score after upgrading 2.18.1 to 2.18.2

2014-04-20 Thread Karol Majewski
Hi Marcin.

There was this big spacing issue 3304, which was fixed between 2.18.1 and 
2.18.2.

https://code.google.com/p/lilypond/issues/detail?id=3304

I think this could be the reason.


--Karol

 Hi
 After upgrading to 2.18.2 I noticed that scores are engraved with more 
 space,
 causing different splits (and in one particular example my son was 
 working on
 - I cannot fit it on one page anymore).
 
 You can see example:
 http://stuff.fork.pl/rondo-2-18-1.pdf
 http://stuff.fork.pl/rondo-2-18-2.pdf
 http://stuff.fork.pl/rondo.ly
 
 I played a bit with SpacingSpanner/base-shortest-duration and other 
 parameters
 but without luck.
 
 Are there any known important changes between lilypond versions that would
 cause such change in spacing?
 
 best regards
 --
 Marcin Gryszkalis, PGP 0xA5DBEEC7
 jabber jid:m...@fork.pl, gg:2532994
 
 
 ___
 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: Whiteout box function by Thomas Morley / need help

2014-04-09 Thread Karol Majewski
Hi Harm

Function you wrote few days ago works for TextScript but not for DynamicText:

\moreWhiteout DynamicText #'(7 . 0) c'1

And only X-offset is added to DynamicText.


--Karol




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


Re: Whiteout box function by Thomas Morley / need help

2014-04-09 Thread Karol Majewski
The following:

{
  \moreWhiteout DynamicText #'(2 . 0) c'1 \f
}

gives:
warning: DynamicText has empty extent and non-empty stencil.
warning: Not drawing a box with negative dimension, -0.74 by 2.59.

Warnings dissapear when \f is replaced by \mf.


-Karol

 Hi Harm
 
 Function you wrote few days ago works for TextScript but not for 
 DynamicText:
 
 \moreWhiteout DynamicText #'(7 . 0) c'1
 
 And only X-offset is added to DynamicText.
 
 
 --Karol
 
 
 
 
 ___
 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


center align dynamics issue

2014-04-08 Thread Karol Majewski
Hi

\version 2.19.4

{
  c'' d'' \mf
}


Here, dynamic mark is centered on 'c'. Shouldn't it be cented on main column 
('d') by default? If so, is there a bug raport on this issue?

Karol




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


Odp: center align dynamics issue

2014-04-08 Thread Karol Majewski
OK, got it:

http://code.google.com/p/lilypond/issues/detail?id=2245


 Hi
 
 \version 2.19.4
 
 {
   c'' d'' \mf
 }
 
 
 Here, dynamic mark is centered on 'c'. Shouldn't it be cented on main 
 column ('d') by default? If so, is there a bug raport on this issue?
 
 Karol
 
 
 
 
 ___
 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


Odp: center align dynamics issue

2014-04-08 Thread Karol Majewski
Seems that solution given by David Nalesnik:

http://code.google.com/p/lilypond/issues/attachmentText?id=2245aid=22450001000name=atest-09.lytoken=vtUjpiq5vmGAgIRRqIpMxfhpYmg%3A1396976425593

has one drawback. When dynamic text is assigned to whole measure rest, the file 
won't compile. Is this fixable?

%%%

\version 2.19.4

\include atest-09.ly

{
  R1*4/4 \p
}

%%%





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


Re: Whiteout box function by Thomas Morley / need help

2014-04-07 Thread Karol Majewski
Thanks again Harm. This is very useful function. Hopefully I'm not the only one 
who appreciates it.


 
 Hi Karol,
 
 below the revised function.
 'moreWhiteout' takes one optional and two normal arguments:
 Specifying whether the stencil should be boxed (boolean), which grob
 (string) and the values to extent the stencil. These values can be
 given as simple pair, affecting only X-axis-extension or as list of
 pairs, affecting X- and Y-axis-extent.
 The boolean may be of some use for debugging, though it will affect
 spacing! Perhaps I should delete it ...
 
 Otherwise I did some clean up and made the function more robust.
 Please test.
 
 \version 2.19.3
 
 moreWhiteout =
 #(define-music-function (parser location better-viewing? grob-name adds)
   ((boolean? #f) string? pair?)
 
   (define (interval-add iv-1 iv-2)
 (cons (+ (car iv-1)(car iv-2))
   (+ (cdr iv-1)(cdr iv-2
 
   (define more-stencil-whiteout
 (lambda (grob)
   (let* ((function (assoc-get 'stencil
 (reverse (ly:grob-basic-properties grob
  (stil ;; Ugh, is there no better way to test that a grob has no
;; 'stencil and that no other previous procedure assigned
;; a stencil-value to said grob?
(if (and (procedure? function)
 (not (eq? (procedure-name function)
   'more-stencil-whiteout)))
(function grob)
(begin
  (ly:warning ~a has no stencil. Ignoring grob)
  #f
 (if stil
 (let*((x-ext (ly:stencil-extent stil X))
   (y-ext (ly:stencil-extent stil Y))
   (add-to-x-ext (if (pair? (car adds)) (car adds) adds))
   (add-to-y-ext (if (pair? (cdr adds)) (cadr adds) '(0 . 0)))
   (new-stil (ly:make-stencil
(ly:stencil-expr stil)
(interval-add x-ext add-to-x-ext)
(interval-add y-ext add-to-y-ext
 
 
;; please note: setting better-viewing #t, will add a little
;; padding around the new stil and it will affect spacing in 
 most
;; other cases, too.
;; We let it in, perhaps it may be of some help in certain 
 cases.
(if better-viewing?
(box-stencil new-stil 0.1 0.01)
new-stil))
 #f
 
   #{
 %% Seems no longer needed:
 %\once \override $grob-name . vertical-skylines = #'()
 %% Better to add next two lines:
 \once \override $grob-name . layer = #10
 \once \override $grob-name . whiteout = ##t
 \once \override $grob-name . stencil = #more-stencil-whiteout
   #})
 
 %%%
 %% EXAMPLE
 %%%
 
 musicI = { \time 2/4 \repeat unfold 16 b8 }
 
 musicII = {
   r2
   %% apply to X- and Y-axis
   \moreWhiteout TextScript #'((-2 . 0.5)(0 . 2))
   b4^XX b
   r2
   %% apply to X-axis only
   \moreWhiteout ##t TextScript #'(-2 . 0.5)
   b4^XX b
 }
 
 
 \new StaffGroup 
   \new Staff \relative c'' \musicI
   \new Staff \relative c'' \musicII
 
 
 Ofcourse the extension happens as a rectangle.
 No idea to do it different.
 
  BTW, In documentation for 2.19 it's written that default value for 
 DynamicText.extra-spacing-width is '(+inf.0 . -inf.0), which is not true 
 anymore.
 
 I think you're wrong.
 The following returns '(+inf.0 . -inf.0) !
 
 {
   \override DynamicText.after-line-breaking =
 #(lambda (grob) (write (ly:grob-property grob 'extra-spacing-width)))
   c1\f
 }
 
 HTH,
   Harm




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


Re: Whiteout box function by Thomas Morley / need help

2014-04-06 Thread Karol Majewski
Thanks Harm.

In SpanBar-Dynamics conflict I still prefer whiteout over 
DynamicText.extra-spacing-width = ##f. The only problem is that sometimes 
whiteout box does not cover the whole barline width. Function I'm asking for 
would allow to control the width of whiteout box.

BTW, In documentation for 2.19 it's written that default value for 
DynamicText.extra-spacing-width is '(+inf.0 . -inf.0), which is not true 
anymore.


 Hi Karol,
 
 will have a look at it tomorrow, right now I'm overtired ...
 
 Cheers,
   Harm




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


Whiteout box function by Thomas Morley / need help

2014-04-05 Thread Karol Majewski
This is a function written by Thomas Morley. It allows to control width and 
height of whiteout box. Now I want to modify this function to make it work like:

\dynamicTextWhiteout #'(1 . 2)

where:
  - first number is LEFT X-extent
  - second number is RIGHT X-extent

I don't need Y-extent at all.


Don't quite know how to do this. Any hints would be appreciated.

Thanks,
Karol


%%

\version 2.19.1

dynamicTextWhiteout =
#(define-music-function
  (parser location adds)
  (pair?)
  (define
(flexible-stencil-whiteout add stencil)
(let*
  ((x-ext
  (ly:stencil-extent stencil X))
(y-ext
  (ly:stencil-extent stencil Y)))
  (ly:stencil-add
(stencil-with-color
  (ly:round-filled-box
(interval-widen x-ext
  (car add))
(interval-widen y-ext
  (cdr add)) 0) green) stencil)))
  (define more-stencil-whiteout
(lambda
  (grob)
  (let*
((stil
(ly:text-interface::print grob))
  (x-ext
(ly:stencil-extent stil X))
  (y-ext
(ly:stencil-extent stil Y))
  (whiteout-stil
(flexible-stencil-whiteout adds stil)))
(ly:make-stencil
  (ly:stencil-expr whiteout-stil) x-ext y-ext
  #{
\override DynamicText.vertical-skylines = #'()
\once \override DynamicText.stencil = #more-stencil-whiteout
  #})

{
  \dynamicTextWhiteout #'(1 . 0) c'4 \f
}

%



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


2.19.4 - when?

2014-03-31 Thread Karol Majewski
Hi. Can we expect 2.19.4 today? I guess it's about time. It's been a month 
since last development release.



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


Re: Does 'strut' command work in LilyPond?

2014-03-30 Thread Karol Majewski
OK, so the question is: Is there a way to create box that has height of total 
font height? By total font height I mean the distance between bottom bearing 
line and top bearing line (see 
http://www.myfirstfont.com/images/glyphterms.gif). The idea is of course to 
have constant height of box, independently of what text is entered.

-Karol



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


Re: Does 'strut' command work in LilyPond?

2014-03-30 Thread Karol Majewski
Very nice workaround! For Cental Europe languages it's better to replace fp 
with, let's say, Śp.

 2014-03-30 0:35 GMT+01:00 Karol Majewski karo...@wp.pl:
  According to:
 
  http://www.lilypond.org/doc/v2.19/Documentation/notation/other
 
  \strut Create a box of the same height as the space in the current font.
 
  So
 
  \markup { \strut \box . }
  \markup { \strut \box bp }
 
  should draw a box with constant height. But it doesn't. Maybe I'm doing 
 something wrong?
 
  -Karol
 
 
 
 Hi,
 
 according to it's description \strut works as expected, imho:
 \strut creates a (invisible) box of the same _height_ (Y-direction!)
 as the _space_ (X-direction!) in the current font.
 
 Look at the output of:
 
 \markup
 \box \vcenter {
 %% current default \strut:
 \strut
 %% sort of rebuilding it:
 \rotate #90  
 %% another markup to compare:
 \concat { \strut . }
 }
 
 
 I think the request is another:
 2014-03-30 10:24 GMT+02:00 Karol Majewski karo...@wp.pl:
  OK, so the question is: Is there a way to create box that has _height_ 
 of total font _height_?
  By total font height I mean the distance between bottom bearing line 
 and top bearing line
 
 As sort of workaround you may use the coding below.
 Please note, it's a _workaround_ ! Thinking of other non-european
 languages it might easily be broken.
 
 
 \version 2.18.0
 
 #(define-markup-command (vstrut layout props)
   ()
   #:category other
   
 @cindex creating vertical space in text
 
 Create a box of the same height as the current font.
   (let ((ref-mrkp (interpret-markup layout props fp)))
 (ly:make-stencil (ly:stencil-expr empty-stencil)
  empty-interval
  (ly:stencil-extent ref-mrkp Y
 
 %%%
 %% EXAMPLE
 %%%
 
 ln-mrkp = \markup \draw-line #'(2 . 0)
 
 \markup
 \override #'(baseline-skip . 1) {
 \column \box {
 \ln-mrkp
 \ln-mrkp
 \ln-mrkp
 }
 \column \box  {
 x
 x
 x
 }
 opposed to: 
 \column \box {
 \line { \vstrut \ln-mrkp }
 \line { \vstrut \ln-mrkp }
 \line { \vstrut \ln-mrkp }
 }
 \column \box {
 \line { \vstrut x }
 \line { \vstrut x }
 \line { \vstrut x }
 }
 }
 
 Cheers,
   Harm




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


Does 'strut' command work in LilyPond?

2014-03-29 Thread Karol Majewski
According to:

http://www.lilypond.org/doc/v2.19/Documentation/notation/other

\strut Create a box of the same height as the space in the current font.

So

\markup { \strut \box . }
\markup { \strut \box bp }

should draw a box with constant height. But it doesn't. Maybe I'm doing 
something wrong?

-Karol



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


Re: Does 'strut' command work in LilyPond?

2014-03-29 Thread Karol Majewski
I tried different order, but it didn't work. Could you please give an example 
of how to use 'strut' properly?

Dnia 30-03-2014 o godz. 0:57 David Kastrup napisał(a):
 Karol Majewski karo...@wp.pl writes:
 
  According to:
 
  http://www.lilypond.org/doc/v2.19/Documentation/notation/other
 
  \strut Create a box of the same height as the space in the current font.
 
  So
 
  \markup { \strut \box . }
  \markup { \strut \box bp }
 
  should draw a box with constant height. But it doesn't. Maybe I'm
  doing something wrong?
 
 Huh?  You are not placing the \strut inside of the box, so why should
 the box' height be affected?
 
 --
 David Kastrup




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


articulation script vertically centered between staff lines.

2014-03-10 Thread Karol Majewski
Hi

In the following example, I want to change vartical position of the second 
staccato, so that it's ideally centered between 3rd and 4th staff line. I could 
override Y-offset or extra-offset, but then I have to know the right integer. 
Is there any general solution to this?


\version 2.19.3

upper = {
  \clef treble \time 2/4
  \voiceOne a''8 \noBeam b' d'' g''8
}

lower = {
  \clef bass \time 2/4
  \override Beam.auto-knee-gap = ##f
  \voiceTwo b8 -. \change Staff = upper d' e' g'8 -.
}

\score {
  \new PianoStaff 
\new Staff = upper \upper
\new Staff = lower \lower
  
}

Karol
attachment: n.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


whole page rotated

2014-03-04 Thread Karol Majewski
Hi,

In the following code, I want to rotate custom note head. To my suprise, this 
code makes the whole page rotated if there is a line break. What I'm I doing 
wrong?

#(define nhg
(lambda (grob)
  (if
(= 2
  (ly:grob-property grob 'duration-log))
(begin
  (let*
((stem
(ly:grob-object grob 'stem))
  (stem-dir
(ly:grob-property stem 'direction))
  (rot
(if
  (= stem-dir 1) 0 180)))
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob
(markup #:rotate rot #:musicglyph noteheads.u2doThin

\layout {
  \context {
\Staff
\override NoteHead.stencil = #nhg
  }
}

{
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
}




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


Re: whole page rotated

2014-03-04 Thread Karol Majewski
Hi Harm,

this is nice workaround, indeed.

But how can I modify it to have different glyph for each duration-log? The 
original code was:

#(define nhg
(lambda (grob)
  (if
(= 2
  (ly:grob-property grob 'duration-log))
(begin
  (let*
((stem
(ly:grob-object grob 'stem))
  (stem-dir
(ly:grob-property stem 'direction))
  (rot
(if
  (= stem-dir 1) 0 180)))
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob
(markup #:rotate rot #:musicglyph noteheads.u2doThin))
  (if
(= 1
  (ly:grob-property grob 'duration-log))
(begin
  (let*
((stem
(ly:grob-object grob 'stem))
  (stem-dir
(ly:grob-property stem 'direction))
  (rot
(if
  (= stem-dir 1) 0 180)))
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob
(markup #:rotate rot #:musicglyph noteheads.u1doThin

\layout {
  \context {
\Voice
\override NoteHead.stencil = #nhg
  }
}




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


  1   2   >