Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Robin Bannister

 Dominic wrote:


At the moment I have to laboriously override the Stem.length-fraction on an
individual basis, depending on how many slashes there are, which is not
ideal.

Any ideas?



I had this problem recently and worked around it with

hoist = % for moving StemTremolo beams further from notehead
{
  \once \override Stem.length =
  #(lambda (grob) (+ 1 (ly:stem::calc-length grob)))
}

Comment indicates I had reservations about 'unpure only'.
Someone else might be able to explain that.


Cheers,
Robin

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread David Kastrup
Robin Bannister  writes:

>  Dominic wrote:
>
>> At the moment I have to laboriously override the Stem.length-fraction on an
>> individual basis, depending on how many slashes there are, which is not
>> ideal.
>>
>> Any ideas?
>
>
> I had this problem recently and worked around it with
>
> hoist = % for moving StemTremolo beams further from notehead
> {
>   \once \override Stem.length =
>   #(lambda (grob) (+ 1 (ly:stem::calc-length grob)))
> }
>
> Comment indicates I had reservations about 'unpure only'.
> Someone else might be able to explain that.

Well, most such reservations should be addressable by putting a
container around, in this case

hoist = % for moving StemTremolo beams further from notehead
{
  \once \override Stem.length =
  #(ly:make-unpure-pure-container
 (lambda (grob) (+ 1 (ly:stem::calc-length grob
}


-- 
David Kastrup

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


Re: Centering a stencil on another stencil

2015-08-11 Thread Thomas Morley
Hi Paul,

thanks for the examples

2015-08-10 20:47 GMT+02:00 Paul Morris :
>> On Aug 7, 2015, at 2:17 PM, Thomas Morley  wrote:
>>
>> May I ask you to provide a code-example where the output is different?
>> For the given one I can't see any.
>
> Hi Harm,  Sure, see below for a somewhat minimized (if not completely 
> minimal) example.
>
> I was surprised to see that the resulting note head stencil and stem 
> connection is the same in either case.

Me not.

> ...but then I noticed that the horizontal spacing is affected by 
> centered-stencil but not with center-stencil-on-stencil.  Not sure why...

It's because centered-stencil centers the stencil around the
ref-point. In so far your initial examples were misleading because the
circle-markup is already constructed around his center. Whereas
NoteHeads have their ref-point at their left side.

Thanks again for your examples, which gave me the possibility to
notice the problem.
I now come up with a simplified coding:

\version "2.19.24"

#(define (center-stencil-on-stencil axis stil-a stil-b)
   "Return a copy of stencil @var{stil-b} that has been
moved so it is centered on stencil @var{stil-a} on
@var{axis}. @var{axis} is 0 for X axis, 1 for Y axis."
(ly:stencil-translate-axis
  (ly:stencil-aligned-to stil-b axis CENTER)
  (interval-center (ly:stencil-extent stil-a axis))
  axis))

#(define (make-notehead-stencil grob)
   (let*
((font (ly:grob-default-font grob))
 (solid-head (ly:font-get-glyph font "noteheads.s2"))
 (stil (ly:note-head::print grob)) ;; default
 (dot (flip-stencil X (ly:stencil-scale solid-head 0.333 0.333)))
 (dot-head
  (ly:stencil-add
   stil
   (stencil-with-color
(center-stencil-on-stencil X stil dot)
green
   dot-head))

%
%% EXAMPLES
%

%% NoteHeads

\markup "default"

\new Staff {
  c'4 d' e' f'
}

\markup "center-stencil-on-stencil (spacing is the same)"

\new Staff \with {
  \override NoteHead.stencil =
  #(lambda (grob) (make-notehead-stencil grob))
} {
  c'4 d' e' f'
}

%% Markups

circle = #(make-circle-stencil 3 0.4 #f)

square =
#(stencil-with-color
  (make-connected-path-stencil
   '((0 0) (3 0) (3 3) (0 3) (0 0))
   0.4 1 1 #f #f)
  blue)

\markup \box \line {
  \stencil #(ly:stencil-add circle square)
  "   "
  \stencil #(ly:stencil-add circle (center-stencil-on-stencil X circle square))
  "   "
  \stencil #(ly:stencil-add circle (center-stencil-on-stencil Y circle square))
  "   "
  \stencil #(ly:stencil-add
  circle
  (center-stencil-on-stencil Y circle
(center-stencil-on-stencil X circle square)))
}


HTH,
  Harm

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


Re: guile-question: 3/2 -> "1 1/2"

2015-08-11 Thread Thomas Morley
2015-08-11 8:19 GMT+02:00 David Kastrup :
[...]
>
> Well, how about something like
>
> (define (integer-and-fraction nmbr)
>   (let* ((wh (truncate nmbr)) (rem (- nmbr wh)))
> (if (or (zero? wh) (zero? rem)) (format #f "~s" nmbr)
>   (format #f "~s ~s" wh (abs rem)
>
> (display (integer-and-fraction (/  7)))
>
> Of course the disadvantage being that you cannot distinguish between one
> and two numbers and cannot read the number back in easily.
>
> --
> David Kastrup

Will have a closer look later, I'm in a hurry.

Many thanks,
  Harm

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


Re: lilypond-book

2015-08-11 Thread Marek Stepanek

Hello Jacques!


Really impressing! Your script is now part of my /bin commands!


Merci infiniment :-)



marek



On 10/08/15 20:56, Jacques Menu wrote:
> Hello Marek,
> 
> I use a custom « lilyb » script defined as follows, that takes care of the 
> subdirectory for the intermediate files generated by lilypond-book:
> 
> 
> menu@macbookprojm:~/Documents/LaTeX/PartitionsLilypond > which lilyb
> /Users/menu/bin/lilyb
> 
> 
> snip

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


Re: lilypond-book

2015-08-11 Thread Jacques Menu
Hello Marek,

Iour velkom, glad I could help!

JM

> Le 11 août 2015 à 11:04, Marek Stepanek  a 
> écrit :
> 
> 
> Hello Jacques!
> 
> 
> Really impressing! Your script is now part of my /bin commands!
> 
> 
> Merci infiniment :-)
> 
> 
> 
> marek
> 
> 
> 
> On 10/08/15 20:56, Jacques Menu wrote:
>> Hello Marek,
>> 
>> I use a custom « lilyb » script defined as follows, that takes care of the 
>> subdirectory for the intermediate files generated by lilypond-book:
>> 
>> 
>> menu@macbookprojm:~/Documents/LaTeX/PartitionsLilypond > which lilyb
>> /Users/menu/bin/lilyb
>> 
>> 
>> snip


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


Re: Height and vertical alignment of first system on first page

2015-08-11 Thread Simon Albrecht

Am 09.08.2015 um 12:16 schrieb Jonathan Scholbach:

Hi Ponders,

I have a score with an odd number of systems. Each page has two systems
(it's an eight-voiced Choirstaff), the first page gets one system (and
the title-section) - fine.

Lilypond stretches the first system vertically to make it fill the whole
first page. I would like this system to have the height of the other
systems in the score and to be placed in the (vertical) center of the
first page. Can you tell me how to do that? I have tried to cheat
lilypond by adding some \vspace in the \title of the \header - that
reduces the stretch of the system, but still lets it stretch to the
bottom of the page - I would like the system to be right in the middle
of the first page.

Your help is appreciated,

Jonathan

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
See also http://code.google.com/p/lilypond/issues/detail?id=2734. You 
may comment on or star the issue.


Yours, Simon

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Malte Meyn

Am 11.08.2015 um 10:00 schrieb Robin Bannister:

  Dominic wrote:

hoist = % for moving StemTremolo beams further from notehead
{
   \once \override Stem.length =
   #(lambda (grob) (+ 1 (ly:stem::calc-length grob)))
}



I made a scheme function from this that extends stems of quarter and 
half notes if they have a tremolo of 32nd or shorter notes (see 
attachment). Because I don’t know scheme well this looks like sort of 
spaghetti code to me and might break soon; sorry for that, maybe it 
could be improved.



Comment indicates I had reservations about 'unpure only'.
Someone else might be able to explain that.



I don’t know what this is so I don’t understand David’s answer. I read 
NR 5.5.5 but I don’t see how this has to do with our problem …
\version "2.19.24"

% ideas found at
% http://www.lilypondforum.de/index.php?topic=1734.msg9614#msg9614
% http://lsr.di.unimi.it/LSR/Item?id=884
unstrangleTremolos =
#(define-music-function (music) (ly:music?)
   (music-map
(lambda (m)
  (if (music-is-of-type? m 'note-event)
  (let*
   ((a (ly:music-property m 'articulations))
(d (ly:music-property m 'duration))
(r (filter
(lambda (v)
  (eq? (ly:music-property v 'name) 'TremoloEvent))
a))
(t (if (null? r) #f (car r
   (if (and (> (ly:duration-log d) 0) (< (ly:duration-log d) 3))
   (if (and t (> (ly:music-property t 'tremolo-type) 16))
   (begin
(ly:music-set-property! m 'tweaks
  (append
   (ly:music-property m 'tweaks)
   (list (cons (cons (quote Stem) (quote length))
   (lambda (grob) (+ 1 (ly:stem::calc-length grob)))
m)
   m)
   m))
  m))
music))

music = \relative {
  b'1:32
  b2: b4: b8: b:
  b4:8 b:16 b:32 b:64
  b!2:32 b8:16 b: b: b:
  \tweak color #green b2:32 b
}

\markup "original LilyPond behaviour"
{ \music \stemUp \music }
\markup "“unstrangled”"
% Does anyone know a better word? I used this because with original behaviour
% some notes look like they were strangled by the tremolo.
\unstrangleTremolos { \music \stemUp \music }

unstrangleTremolos.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Acciaccatura slurs

2015-08-11 Thread Simon Albrecht

Am 09.08.2015 um 17:13 schrieb Thomas Morley:

2015-08-09 16:20 GMT+02:00 Andrew Bernard :

Hi Harm,

Well, are the glyphs that lilypond automatically puts in for acciaccaturas
slurs or ties? I am quite confused. I thought they were slurs. The manual
suggests to my way of reading that they are slurs, and the slur up and down
functions work on them. But I just don’t know.

\acciaccatura uses Slur, ofcourse!

But I think it does not make any sense to write a slur between equal notes.
As a player I'd always read the second example as a Tie.

{ c''1~ c'' }
{ c''1( c'') }

1. It depends on instrument and style.
2. What about
{ c4( c) c( d) | e( d) c2 }
or
{ c4( c c c) }
?

A slur definitely is semantically different from a tie, so it’s 
important to keep them apart. Though certainly there are cases where 
it’s impossible to tell.
In Andrew’s first example it’s unlikely that the cis is supposed to be 
struck twice (even more now we know that it’s piano music) so I suppose 
a tie is the way to go.


Yours, Simon

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Malte Meyn

Am 11.08.2015 um 13:52 schrieb Malte Meyn:

might break soon; sorry for that, maybe it
could be improved.


For example, \unstrangleTremolos g'''2:32 extends the stem without need. 
But I already have an idea how to improve this: Don’t completely rely on 
ly:stem::calc-length but maybe do something like (pseudocode)


number-of-beams = log2(tremolo-type)
new_length = min(calc-length, some-constant-value + number-of-beams)

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


space between nested staff groups

2015-08-11 Thread Michael Dunlap
Hi all,

In the example below, there is extra vertical space between the
GrandStaffed violin group and the subsequent lower strings. I want the
vertical space of a nested GrandStaff to be space in a similar fashion as
the lower three staves (no extra space between viola and violin II. It's
probably because the GrandStaff by default has it's own staff group way of
separating itself from other staff groups. But I only want the outer staff
group to have this spacing.

Many thanks, Michael

music = {c4 c c c | c c c c }

violinIMusic = {
  \relative c'' \music
}

violinIIMusic = {
  \relative c'' \music
}

violaMusic = {
  \relative c' \music
}

celloMusic = {
  \relative c {\clef bass \music}
}

bassMusic = {
  \relative c, {\clef bass \music}
}


\score {
  <<
\new StaffGroup <<
  \new GrandStaff <<
\new Staff
  \violinIMusic
\new Staff
  \violinIIMusic
  >>
  \new Staff
\violaMusic
  \new Staff
\celloMusic
  \new Staff
\transpose c c' \bassMusic
>>
  >>

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


Score.skipTypesetting

2015-08-11 Thread Orm Finnendahl
Hi,

 this is only a minor issue: Is there a good reason, why the first bar
of a partially rendered score starting in the middle of the piece is
indented?

As the instrument names are short, lilypond must know that it isn't at
the beginning of the piece. It would be preferrable to have unindented
first staffs, as that would better resemble the final layout, if the
typesetting (re)starts at linebreaks.

BTW: I know how to turn off indentation of the first staff it's more a
question of overall consistency...

--
Orm

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Robin Bannister

  Malte Meyn wrote:


But I already have an idea how to improve this



This discussion of a similar (outdated?) attempt might be useful:

http://www.lilypondforum.de/index.php?topic=415.msg2425;topicseen#msg2425


Cheers,
Robin

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


Re: PDF portfolio of 2.19.25 docs

2015-08-11 Thread Paul Scott
On Tue, Aug 11, 2015 at 04:45:13PM +1000, Nick Payne wrote:
> A fully indexed portfolio of the 2.19.25 PDF docs is available at
> https://www.dropbox.com/s/jexo2dd739b1l9f/lilydoc-2.19.25.pdf?dl=0 (39Mb).

In Linux I try to open it with Evince and I just get a page linking to
a page to download Adobe Reader and they don't have a version for Linux.

I understand about the indexing not working.

Paul

> 
> Needs Adobe Reader for the indexing to work - I haven't found a 3rd party
> PDF viewer that can use the index in PDF portfolios.
> 
> Nick
> 
> ___
> 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: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Malte Meyn

Am 11.08.2015 um 16:13 schrieb Robin Bannister:


This discussion of a similar (outdated?) attempt might be useful:

http://www.lilypondforum.de/index.php?topic=415.msg2425;topicseen#msg2425



This looks nice! I didn’t really like the idea of having to use a music 
function to do that … And of course it’s nice to modify the grobs 
instead of having to go through


But unfortunately it doesn’t work properly in 2.19.24 (and 2.18.2): The 
stem lengths/tremolo positions are corrected but the stems themselves 
disapper :o And it breaks when there are stems on beams. (My solution 
would do this too if used on eigths, but it stretches only half and 
quarter note stems; eigths with flags are no problem because of the 
different slant of the tremolo beams.)


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


Re: Centering a stencil on another stencil

2015-08-11 Thread Paul Morris
Hi Harm,

> On Aug 11, 2015, at 4:48 AM, Thomas Morley  wrote:
> 
> It's because centered-stencil centers the stencil around the
> ref-point. In so far your initial examples were misleading because the
> circle-markup is already constructed around his center. Whereas
> NoteHeads have their ref-point at their left side.

I see now, thanks.

> Thanks again for your examples, which gave me the possibility to
> notice the problem.
> I now come up with a simplified coding:

Nice!  Much simpler.  I’ve updated the LSR snippet with your simpler code.  I 
also changed it so that the circle is moved so it is centered on the square, 
which helps show the need for the function (as opposed to centered-stencil).

http://lsr.di.unimi.it/LSR/Item?id=1009

Let me know if there are any further revisions to make.

Cheers,
-Paul


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


Position FullBarRest

2015-08-11 Thread Orm Finnendahl
Hi,

 is there a way to position a FullBarRest on a specific line, like
"b' \rest" (but with a FullBarRest centered in the measure)?

I couldn't find anything in the docs.

--
Orm

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


Re: Position FullBarRest

2015-08-11 Thread Urs Liska
Am 11.08.2015 um 18:06 schrieb Orm Finnendahl:
> Hi,
> 
>  is there a way to position a FullBarRest on a specific line, like
> "b' \rest" (but with a FullBarRest centered in the measure)?
> 
> I couldn't find anything in the docs.

Don't know, but since offsets are calculated in staff spaces (?) it
shouldn't be hard to either do manually or through a simple function.

Urs

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


-- 
Urs Liska
www.openlilylib.org

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


problem with installed font when set-global-staff-size is changed

2015-08-11 Thread Jonathan Scholbach
Hi!

I would like to use the Garamond font for all the text in my sheet
(header, lyrics, markup). I downloaded the EBGaramond from
http://www.georgduffner.at/ebgaramond/download.html and put all the
.otf-files into the directory

lilypond/usr/share/lilypond/current/fonts/otf

Nearly everything works fine, but Lilypond seems to have problems with
scaling, as my ME shows. The lyrics between the staves are not printed
in Garamond font when the global-staff-size is changed.

I don't understand the way lilypond deals with fonts. Can you please
help me?

Thank you,

Jonathan



\version "2.19.22"

sopVoice = \relative c'' { c4 c c c c c2 c4 c c c c}
sopLyrix = \lyricmode { This is (not) Ga -- ra -- mond: "1" a A q Q }

\paper {
  #(define fonts
 (make-pango-font-tree "EBGaramond"
   "Nimbus Sans"
   "Luxi Mono"
   (/ staff-height pt 17)
 )
   )
}

%this prints Garamond
\score {
 % \layout { #(layout-set-staff-size 20) }
  \new Staff <<
\new Voice = "sop" {  \sopVoice }
\new Lyrics \lyricsto "sop" { \sopLyrix }
 >>
}
What .
%this fails to print Garamond
\score {
  \layout { #(layout-set-staff-size 21) }
  \new Staff <<
\new Voice = "sop" { \sopVoice }
\new Lyrics \lyricsto "sop" { \sopLyrix }
 >>
}

%this prints Garamond as well
\markup { \override #'(font-name . "EBGaramond") \fontsize #6 "This
prints EBGaramond as well: 1 a A q Q"}




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


Re: Position FullBarRest

2015-08-11 Thread David Kastrup
Orm Finnendahl  writes:

> Hi,
>
>  is there a way to position a FullBarRest on a specific line, like
> "b' \rest" (but with a FullBarRest centered in the measure)?
>
> I couldn't find anything in the docs.

\tweak Y-offset 2 R1

-- 
David Kastrup

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


Re: Position FullBarRest

2015-08-11 Thread Malte Meyn

Am 11.08.2015 um 18:22 schrieb David Kastrup:

Orm Finnendahl  writes:

  is there a way to position a FullBarRest on a specific line, like
"b' \rest" (but with a FullBarRest centered in the measure)?


\tweak Y-offset 2 R1

If you need this for more than just one rest in a row you also can use 
an override (perhaps in combination with \once \override and \revert):


\version "2.19.24"
{
  R1*2
  \override MultiMeasureRest.staff-position = 0
  R
}

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


Re: Position FullBarRest

2015-08-11 Thread Orm Finnendahl
many thanks!

--
Orm

Am Dienstag, den 11. August 2015 um 18:39:11 Uhr (+0200) schrieb Malte Meyn:
> Am 11.08.2015 um 18:22 schrieb David Kastrup:
> >Orm Finnendahl  writes:
> >>  is there a way to position a FullBarRest on a specific line, like
> >>"b' \rest" (but with a FullBarRest centered in the measure)?
> >
> >\tweak Y-offset 2 R1
> >
> If you need this for more than just one rest in a row you also can use an
> override (perhaps in combination with \once \override and \revert):
> 
> \version "2.19.24"
> {
>   R1*2
>   \override MultiMeasureRest.staff-position = 0
>   R
> }
> 
> ___
> 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: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Robin Bannister

Malte Meyn wrote:



But unfortunately it doesn’t work properly in 2.19.24 (and 2.18.2)



Yes, I think stems were reworked a lot around 2.16?

Here is that override approach with a duration condition:

%%

\version "2.18.0"

#(define (stem-stretch stem-tremolo-grob)
  (let ((flag-count (ly:grob-property stem-tremolo-grob 'flag-count)))
(if (> flag-count 2) 1 0)))

#(define (longer-for-tremolo stem-grob)
  (let* (
(stem-tremolo-grob (ly:grob-object stem-grob 'tremolo-flag))
(plain-stem? (< (ly:grob-property stem-grob 'duration-log) 8))
)
(+ (ly:stem::calc-length stem-grob)
  (if (and (ly:grob? stem-tremolo-grob) plain-stem?)
(stem-stretch stem-tremolo-grob) 0

music = \relative {
  b'1:32
  b2: b4: b8: b:
  b4:8 b:16 b:32 b:64
  b!2:32 b8:16 b: b: b:
  \tweak color #green b2:32 b
}

\markup "original LilyPond behaviour"
{ \music \stemUp \music }
\markup "longer-for-tremolo"
{ \override Stem.length = #longer-for-tremolo  \music \stemUp \music }

%%


Cheers,
Robin

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


Re: space between nested staff groups

2015-08-11 Thread Klaus Blum
Hi Michael, 

there is another way to get that brace without the use of a GrandStaff:

% ---
music = {c4 c c c | c c c c }

violinIMusic = {
  \relative c'' \music
}

violinIIMusic = {
  \relative c'' \music
}

violaMusic = {
  \relative c' \music
}

celloMusic = {
  \relative c {\clef bass \music}
}

bassMusic = {
  \relative c, {\clef bass \music}
}


\score {
  \new StaffGroup <<
\set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartBracket
(SystemStartBrace a b) c d e)
\new Staff
\violinIMusic
\new Staff
\violinIIMusic
\new Staff
\violaMusic
\new Staff
\celloMusic
\new Staff
\transpose c c' \bassMusic
  >>
}
% ---

But with the "real" voices of the different instruments, containing notes
with ledger lines, dynamics etc., the space between the staves will increase
anyway.

Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/space-between-nested-staff-groups-tp179474p179488.html
Sent from the User mailing list archive at Nabble.com.

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread tisimst


On 8/11/2015 10:59 AM, Robin Bannister [via Lilypond] wrote:
> Malte Meyn wrote:
>
> > But unfortunately it doesn’t work properly in 2.19.24 (and 2.18.2)
>
> Yes, I think stems were reworked a lot around 2.16?
>
> Here is that override approach with a duration condition:
> ... (clipped) ...

Looking into the situation, I've found that there isn't a built-in 
collision avoidance value but rather a well-tuned set of spacing 
parameters (unless an actual beam exists, then collisions are taken care 
of). It's quite easy to have the tremolo flags of unbeamed stems cause 
collisions with the notehead:

\override Voice.StemTremolo.length-fraction = #1.5



Here's another option that works nicely by adjusting the value for "pad":

\layout {
   \override Voice.StemTremolo.after-line-breaking =
#(lambda (grob)
 (let* ((*pad 1.0*) % <--- ADJUST THIS TO TASTE
(cnt (ly:grob-property grob 'flag-count))
(stem (ly:grob-object grob 'stem))
(leng (ly:grob-property stem 'length)))
   (if (> cnt 2)
 (ly:grob-set-property! stem 'length (+ leng pad)
}



HTH,
Abraham


ajjgagfj.png (12K) 

ahdacbjg.png (12K) 





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-to-adjust-the-padding-between-a-StemTremolo-and-a-NoteHead-tp179448p179490.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: problem with installed font when set-global-staff-size is changed

2015-08-11 Thread Simon Albrecht

Am 11.08.2015 um 18:19 schrieb Jonathan Scholbach:

Hi!

I would like to use the Garamond font for all the text in my sheet
(header, lyrics, markup). I downloaded the EBGaramond from
http://www.georgduffner.at/ebgaramond/download.html and put all the
.otf-files into the directory

lilypond/usr/share/lilypond/current/fonts/otf

Nearly everything works fine, but Lilypond seems to have problems with
scaling, as my ME shows. The lyrics between the staves are not printed
in Garamond font when the global-staff-size is changed.
The problem is that setting staff size overrides the previous font 
settings, so you have to first change staff size, then change the fonts. 
Normally this would mean inserting #(set-global-staff-size 21) _before_ 
the paper block; with #layout-set-staff-size however, I don’t know of 
any solution.


HTH, Simon

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Abraham Lee

On 8/11/2015 11:14 AM, tisimst wrote:

\layout {
  \override Voice.StemTremolo.after-line-breaking =
#(lambda (grob)
(let* ((*pad 1.0*) % <--- ADJUST THIS TO TASTE
   (cnt (ly:grob-property grob 'flag-count))
   (stem (ly:grob-object grob 'stem))
   (leng (ly:grob-property stem 'length)))
  (if (> cnt 2)
(ly:grob-set-property! stem 'length (+ leng pad)
}


Sorry, the % is going to cause an error because it isn't a scheme 
comment. Either change the "%" to a semicolon ";" or just remove my 
comment altogether.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: PDF portfolio of 2.19.25 docs

2015-08-11 Thread Stephen MacNeil
Hi paul

You can convert the pdf and it will work in linux - I posted how a while
back (convert it to ps then back to pdf) - without the indexing or you can
d/l acroread 9.5.5 was the last linux version i think (not sure since I
never use it)

search

acroread 9.5.5 linux download

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread Dominic
Thanks everyone!

tisimst, I slightly modified your solution and it seems to work great -
thanks!
For reasons I don't understand, it only changed the first StemTremolo in my
score, but when I changed 'after-line-breaking' to 'before-line-breaking' it
changed all of them.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-to-adjust-the-padding-between-a-StemTremolo-and-a-NoteHead-tp179448p179494.html
Sent from the User mailing list archive at Nabble.com.

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


Re: How to adjust the padding between a StemTremolo and a NoteHead?

2015-08-11 Thread tisimst
On 8/11/2015 1:12 PM, Dominic [via Lilypond] wrote:
> Thanks everyone!
>
> tisimst, I slightly modified your solution and it seems to work great 
> - thanks!
> For reasons I don't understand, it only changed the first StemTremolo 
> in my score, but when I changed 'after-line-breaking' to 
> 'before-line-breaking' it changed all of them.

Indeed, that is strange since it worked for me without fail, but I'm 
glad to hear you got something working for you!

- Abraham






--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-to-adjust-the-padding-between-a-StemTremolo-and-a-NoteHead-tp179448p179495.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: PDF portfolio of 2.19.25 docs

2015-08-11 Thread Nick Payne

On 12/08/2015 04:30, Stephen MacNeil wrote:

Hi paul

You can convert the pdf and it will work in linux - I posted how a 
while back (convert it to ps then back to pdf) - without the indexing 
or you can d/l acroread 9.5.5 was the last linux version i think (not 
sure since I never use it)


search

acroread 9.5.5 linux download


ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/

But 9.3.4 was the last Linux version that supported Flash - if you open 
a portfolio in a later version you get a blank front page of the 
portfolio where you should be seeing thumbnails of the embedded 
documents, though the searching and indexing still work fine.


Nick

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


Re: Centering a stencil on another stencil

2015-08-11 Thread Thomas Morley
Hi Paul,

2015-08-11 17:36 GMT+02:00 Paul Morris :

>
> Nice!  Much simpler.  I’ve updated the LSR snippet with your simpler code.  I 
> also changed it so that the circle is moved so it is centered on the square, 
> which helps show the need for the function (as opposed to centered-stencil).
>
> http://lsr.di.unimi.it/LSR/Item?id=1009
>
> Let me know if there are any further revisions to make.

I'm still not happy with the example, because the second stencil, the
circle, is centered already.
Below, you could replace the line between the  with 'stil-b' and
would still get the same output.

#(define (center-stencil-on-stencil axis stil-a stil-b)
  "Return a copy of stencil @var{stil-b} that has been
   moved so it is centered on stencil @var{stil-a} on
   @var{axis}. @var{axis} is 0 for X axis, 1 for Y axis."
   (ly:stencil-translate-axis

 (ly:stencil-aligned-to stil-b axis CENTER)

 (interval-center (ly:stencil-extent stil-a axis))
 axis))

The advantage of this coding is that it will work, whether the stencil
is centered or not!!
Therefore I'd extent the example:

square =
#(make-connected-path-stencil
  '((0 0) (4 0) (4 4) (0 4) (0 0))
  0.4 1 1 #f #f)

green-square =
#(stencil-with-color (make-filled-box-stencil '(0 . 2) '(0 . 2)) green)

circle =
#(stencil-with-color (make-circle-stencil 1 0.3 #f) green)

\markup \line {
 \stencil #(ly:stencil-add square circle)
 "   "
 \stencil #(ly:stencil-add square (center-stencil-on-stencil X square circle))
 "   "
 \stencil #(ly:stencil-add square (center-stencil-on-stencil Y square circle))
 "   "
 \stencil #(ly:stencil-add
 square
 (center-stencil-on-stencil Y square
   (center-stencil-on-stencil X square circle)))
}

\markup \line {
 \stencil #(ly:stencil-add square green-square)
 "   "
 \stencil #(ly:stencil-add square (center-stencil-on-stencil X square
green-square))
 "   "
 \stencil #(ly:stencil-add square (center-stencil-on-stencil Y square
green-square))
 "   "
 \stencil #(ly:stencil-add
 square
 (center-stencil-on-stencil Y square
   (center-stencil-on-stencil X square green-square)))
}


As a thought I extended the coding to get the possibility of a
centered stencil in both directions in one go:


#(define (center-stencil-on-stencil axis stil-a stil-b)
  "Return a copy of stencil @var{stil-b} that has been
   moved so it is centered on stencil @var{stil-a} on
   @var{axis}. @var{axis} is 0 for X axis, 1 for Y axis.
   @var{axis} may be set @code{#t}, moving the new stencil
   in directions"
   (if (and (boolean? axis) axis)
   (ly:stencil-translate
 (centered-stencil stil-b)
 (cons
   (interval-center (ly:stencil-extent stil-a X))
   (interval-center (ly:stencil-extent stil-a Y
   (ly:stencil-translate-axis
 (ly:stencil-aligned-to stil-b axis CENTER)
 (interval-center (ly:stencil-extent stil-a axis))
 axis)))

test =
#(define-scheme-function (parser location stil-1 stil-2)
  (ly:stencil? ly:stencil?)
  #{
\markup
  \override #'(word-space . 3)
  \line {
  \stencil #(ly:stencil-add stil-1 stil-2)
  \stencil #(ly:stencil-add stil-1
(center-stencil-on-stencil X stil-1 stil-2))
  \stencil #(ly:stencil-add stil-1
(center-stencil-on-stencil Y stil-1 stil-2))
  \stencil #(ly:stencil-add stil-1
(center-stencil-on-stencil #t stil-1 stil-2))
}
  #})

square =
#(make-connected-path-stencil
  '((0 0) (4 0) (4 4) (0 4) (0 0))
  0.4 1 1 #f #f)

green-square =
#(stencil-with-color (make-filled-box-stencil '(0 . 2) '(0 . 2)) green)

circle =
#(stencil-with-color (make-circle-stencil 1 0.3 #f) green)

\test #square #circle
\test #square #green-square


Though, it's probably overdone.
What do you think?


Cheers,
  Harm

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


Re: guile-question: 3/2 -> "1 1/2"

2015-08-11 Thread Thomas Morley
2015-08-11 10:57 GMT+02:00 Thomas Morley :
> 2015-08-11 8:19 GMT+02:00 David Kastrup :
> [...]
>>
>> Well, how about something like
>>
>> (define (integer-and-fraction nmbr)
>>   (let* ((wh (truncate nmbr)) (rem (- nmbr wh)))
>> (if (or (zero? wh) (zero? rem)) (format #f "~s" nmbr)
>>   (format #f "~s ~s" wh (abs rem)
>>
>> (display (integer-and-fraction (/  7)))
>>
>> Of course the disadvantage being that you cannot distinguish between one
>> and two numbers and cannot read the number back in easily.
>>
>> --
>> David Kastrup
>
> Will have a closer look later, I'm in a hurry.
>
> Many thanks,
>   Harm

I've got another suggestion from Andrew Bernard (agreeing to make it public)

Here both:

%% In a .ly-file:
%% Andrew:
#(define (mixed-num x)
  (let* ((n (numerator x))
 (d (denominator x)))
(cons (truncate (/ n d)) (/ (modulo n d) d

%% David:
#(define (integer-and-fraction nmbr)
  (let* ((wh (truncate nmbr))
 (rem (- nmbr wh)))
  (if (or (zero? wh) (zero? rem))
  (format #f "~s" nmbr)
  (format #f "~s ~s" wh (abs rem)

#(write-me "mixed-num:\n"
  (map mixed-num (iota 40 0 (/ 5 7

#(write-me "integer-and-fraction:\n"
  (map integer-and-fraction (iota 40 -1 (/ 5 7


Some thoughts for the record:

Ofcourse the two suggestions return different type of output, pairs or strings.
(Wouldn't be too hard to let return both strings or pairs or whatever, though.)

`mixed-num' can't deal with negative input right now, returning wrong
(could be fixed ofcourse).

In case the input is not exact `mixed-num' crashes, whereas
`integer-and-fraction' doesn't, although returning not a fraction.

I think I'll go for `integer-and-fraction' and add an `exact?'-condition.


Thanks tons both,
  Harm

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


Re: problem with installed font when set-global-staff-size is changed

2015-08-11 Thread Jonathan Scholbach
Hi Simon,

thank you for your advice! Just for people reading my question in the
future: Your hint lead me to solve the problem with

\layout {
  #(layout-set-staff-size 17)
  \override LyricText.font-name = "EBGaramond"
  \override LyricText.font-size = #2
  \override Score.BarNumber.font-name = "EBGaramond"
  \override Score.BarNumber.font-size = #2
  \override Staff.InstrumentName.font-name = "EBGaramond"
  \override Staff.InstrumentName.font-size = #2
}


(Setting the font-sizes manually is necessary since for some unknown
reason, the font-size decreases.) For my purposes that is an acceptable
workaround.

Greets,

Jonathan


On 08/11/2015 07:31 PM, Simon Albrecht wrote:
> Am 11.08.2015 um 18:19 schrieb Jonathan Scholbach:
>> Hi!
>>
>> I would like to use the Garamond font for all the text in my sheet
>> (header, lyrics, markup). I downloaded the EBGaramond from
>> http://www.georgduffner.at/ebgaramond/download.html and put all the
>> .otf-files into the directory
>>
>> lilypond/usr/share/lilypond/current/fonts/otf
>>
>> Nearly everything works fine, but Lilypond seems to have problems with
>> scaling, as my ME shows. The lyrics between the staves are not printed
>> in Garamond font when the global-staff-size is changed.
> The problem is that setting staff size overrides the previous font
> settings, so you have to first change staff size, then change the fonts.
> Normally this would mean inserting #(set-global-staff-size 21) _before_
> the paper block; with #layout-set-staff-size however, I don’t know of
> any solution.
> 
> HTH, Simon
> 

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


Re: Centering a stencil on another stencil

2015-08-11 Thread Thomas Morley
2015-08-12 0:22 GMT+02:00 Thomas Morley :
> Hi Paul,
>
> 2015-08-11 17:36 GMT+02:00 Paul Morris :
>
>>
>> Nice!  Much simpler.  I’ve updated the LSR snippet with your simpler code.  
>> I also changed it so that the circle is moved so it is centered on the 
>> square, which helps show the need for the function (as opposed to 
>> centered-stencil).
>>
>> http://lsr.di.unimi.it/LSR/Item?id=1009
>>
>> Let me know if there are any further revisions to make.
>
> I'm still not happy with the example, because the second stencil, the
> circle, is centered already.
> Below, you could replace the line between the  with 'stil-b' and
> would still get the same output.
>
> #(define (center-stencil-on-stencil axis stil-a stil-b)
>   "Return a copy of stencil @var{stil-b} that has been
>moved so it is centered on stencil @var{stil-a} on
>@var{axis}. @var{axis} is 0 for X axis, 1 for Y axis."
>(ly:stencil-translate-axis
> 
>  (ly:stencil-aligned-to stil-b axis CENTER)
> 
>  (interval-center (ly:stencil-extent stil-a axis))
>  axis))
>
> The advantage of this coding is that it will work, whether the stencil
> is centered or not!!
> Therefore I'd extent the example:
>
> square =
> #(make-connected-path-stencil
>   '((0 0) (4 0) (4 4) (0 4) (0 0))
>   0.4 1 1 #f #f)
>
> green-square =
> #(stencil-with-color (make-filled-box-stencil '(0 . 2) '(0 . 2)) green)
>
> circle =
> #(stencil-with-color (make-circle-stencil 1 0.3 #f) green)
>
> \markup \line {
>  \stencil #(ly:stencil-add square circle)
>  "   "
>  \stencil #(ly:stencil-add square (center-stencil-on-stencil X square circle))
>  "   "
>  \stencil #(ly:stencil-add square (center-stencil-on-stencil Y square circle))
>  "   "
>  \stencil #(ly:stencil-add
>  square
>  (center-stencil-on-stencil Y square
>(center-stencil-on-stencil X square circle)))
> }
>
> \markup \line {
>  \stencil #(ly:stencil-add square green-square)
>  "   "
>  \stencil #(ly:stencil-add square (center-stencil-on-stencil X square
> green-square))
>  "   "
>  \stencil #(ly:stencil-add square (center-stencil-on-stencil Y square
> green-square))
>  "   "
>  \stencil #(ly:stencil-add
>  square
>  (center-stencil-on-stencil Y square
>(center-stencil-on-stencil X square green-square)))
> }
>
>
> As a thought I extended the coding to get the possibility of a
> centered stencil in both directions in one go:
>
>
> #(define (center-stencil-on-stencil axis stil-a stil-b)
>   "Return a copy of stencil @var{stil-b} that has been
>moved so it is centered on stencil @var{stil-a} on
>@var{axis}. @var{axis} is 0 for X axis, 1 for Y axis.
>@var{axis} may be set @code{#t}, moving the new stencil:

read: in both directions

>in directions"
>(if (and (boolean? axis) axis)
>(ly:stencil-translate
>  (centered-stencil stil-b)
>  (cons
>(interval-center (ly:stencil-extent stil-a X))
>(interval-center (ly:stencil-extent stil-a Y
>(ly:stencil-translate-axis
>  (ly:stencil-aligned-to stil-b axis CENTER)
>  (interval-center (ly:stencil-extent stil-a axis))
>  axis)))
>
> test =
> #(define-scheme-function (parser location stil-1 stil-2)
>   (ly:stencil? ly:stencil?)
>   #{
> \markup
>   \override #'(word-space . 3)
>   \line {
>   \stencil #(ly:stencil-add stil-1 stil-2)
>   \stencil #(ly:stencil-add stil-1
> (center-stencil-on-stencil X stil-1 stil-2))
>   \stencil #(ly:stencil-add stil-1
> (center-stencil-on-stencil Y stil-1 stil-2))
>   \stencil #(ly:stencil-add stil-1
> (center-stencil-on-stencil #t stil-1 stil-2))
> }
>   #})
>
> square =
> #(make-connected-path-stencil
>   '((0 0) (4 0) (4 4) (0 4) (0 0))
>   0.4 1 1 #f #f)
>
> green-square =
> #(stencil-with-color (make-filled-box-stencil '(0 . 2) '(0 . 2)) green)
>
> circle =
> #(stencil-with-color (make-circle-stencil 1 0.3 #f) green)
>
> \test #square #circle
> \test #square #green-square
>
>
> Though, it's probably overdone.
> What do you think?
>
>
> Cheers,
>   Harm

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


Making overlapping grace notes

2015-08-11 Thread Andrew Bernard
Hello Ponderers,

My score has many places where a beamed set of grace notes start precisely on a 
note in a voice, and consequently overlap the first starting note. This is 
fine, and what the composer specifically intends (common notation in the New 
Complexity School). The attached image shows a snippet of a typical scenario.

In my example, I can’t get the start of the grace to sit on top of the note in 
the other voice. Indeed, lilypond is being very excellent about avoiding a 
collision, but I want to persuade it to align. I can achieve this with normal 
notes, but not with grace notes. Is this even remotely possible?

\version "2.19.25"

treble = {
  \clef treble
  \time 1/4
  s4
}

bass = {
  \clef bass
  \time 1/4

  \stemDown
  <<
{
  cis,,16. b,,8 d,32
}
\new Voice
{
  s16. s8 s32
  \grace {
\bar ""
\once \override NoteColumn.force-hshift = #-1 % no effect
d,8
bes,
\change Staff = "treble"
\stemDown
e'
\bar "|"
  } |
}
  >>
  \oneVoice
}

\score {
  \new PianoStaff
  <<
\new Staff = "treble" { \treble }
\new Staff = "bass" { \bass }
  >>

  \layout { }
}



Andrew


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