Re: Restricting cross staff stems

2016-06-26 Thread Andrew Bernard
Hi Malte,

Many thanks to you. Although I had said I did not want to fudge this
scenario by shiftng the notes to make them miss the crossStaff alignment, I
was unaware that the sensitivty of crossStaff is so high, and this small
move not only works just fine to suppress the crossStaff but is completely
unobservable. Not such a bad hack after all. One could even create a
function \crossStaffOff and just use this. Quite acceptable I think.

Andrew



On 27 June 2016 at 8:44:06 AM, Malte Meyn (lilyp...@maltemeyn.de) wrote:

This is the only workaround I know but it works with very small values:
\once \override NoteColumn.X-offset = 0.0001
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Sorting out annotation interface questions (GSoC)

2016-06-26 Thread Urs Liska
Hi all,

our GSoC student Jeffery has done quite some work on writing a
comprehensive LaTeX package to typeset annotations produced from a
LilyPond document. I assume he'll soon wrap it up to merge something
like a V1.0, but we've started turning to work on the LilyPond side of
things already, enhancing the existing state of the ScholarLY package
(https://github.com/openlilylib/scholarly).

Right now we're discussing a few things on the interface for defining
annotations, and I suggested to extend this discussion to the
lilypond-user list.

Right now we have a number of annotation *types*, expressed through the
commands \musicalIssue, \criticalRemark, \lilypondIssue, \question and
\todo. They are used as (e.g.)

\criticalRemark \with {
  author = "Urs Liska"
  context = "Piano, r.h."
  message = "Incredibly sophisticated observation"
  my-arbitrary-prop = "User can use custom properties"
} Slur c ( d )

Annotations (can) *refer* to a type of fact in the sources, for example:
“pitch”, “rhythm”, ”paper”, ”watermark”, ”erasure”.
I think it's natural to express this as an additional property (e.g.)
"category":

\musicalIssue \with {
  author = "Urs Liska"
  context = "lyrics"
  message = "Should ß be changed to ss here?"
  category = lyrics-modernization
} LyricText
Fluß

(Instead of a symbol this can also accept a symbol list for multiple
categories.)
Maybe that's better called "tags"?

Finally annotations can refer to the type of editorial action/decision
it does. At least for musical issues and critical remarks. The
annotation can refer to an editorial addition, deletion or emendation.
Here it is currently not clear whether this would warrant a separate
property or if it can be understood as a kind of subset of the tags
discussed before. But it should be considered in the context of another
issue:

Annotations can trigger (to-be-implemented) "editorial functions" that
apply visible highlighting, for example produce dashing for slurs that
have been added by the editor. This could be expressed by a property
*apply*:

\musicalIssue \with {
  author = "Urs Liska"
  context = "violin 1"
  message = "Slur obviously forgotten in original edition"
  apply = addition
} Slur

My question is: is this "application" the same as the type of annotation
action from the previous issue? Or could it occur that a project wants
to document types of editorial decisions independently from applying
visual indications of that?

Any feedback appreciated
Urs

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


Re: Restricting cross staff stems

2016-06-26 Thread Malte Meyn



Am 25.06.2016 um 11:46 schrieb Andrew Bernard:

I don’t want to fudge it by shifting the top notes a little,
as the vertical alignment matters in this score.


This is the only workaround I know but it works with very small values:
  \once \override NoteColumn.X-offset = 0.0001
A 10,000th of a staff space is not visible ;)

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


Re: Flute Accompaniment

2016-06-26 Thread David Wright
On Sun 26 Jun 2016 at 13:14:42 (-0500), Br. Gabriel-Marie | SSPX wrote:
> In my piece I have a piano staff with the music on the bottom staff.
> In the upper staff it is supposed to be notes for recorder or flute
> accompaniment.  In the original the flute notes and its staff are
> all a bit smaller in size.  What do you call those smaller notes?  I
> want to make the entire top staff + the notes just smaller so it is
> obvious to the singers not to try and sing the accompaniment.  How
> do I do that?

Unfortunately, it's a little more complicated in 2.18.2, but the
development version has:

4.2.2 Setting the staff size

3. To set the staff size for a single staff within a system,
   use the \magnifyStaff command.
   For example, traditionally engraved chamber music scores
   with piano often used 7mm piano staves while the other
   staves were typically between 3/5 and 5/7 as large (between
   60% and 71%). To achieve the 5/7 proportion, use:
   \score {
  <<
\new Staff \with {
  \magnifyStaff #5/7
} { ... }
\new PianoStaff { ... }
  >>
   }
   If you happen to know which fontSize you wish to use,
   you could use the following form:
   \score {
  <<
\new Staff \with {
  \magnifyStaff #(magstep -3)
} { ... }
\new PianoStaff { ... }
  >>
   }
   To emulate the look of traditional engraving, it is best
   to avoid reducing the thickness of the staff lines.

Cheers,
David.

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


Re: Time signature before end of volta repeat

2016-06-26 Thread Thomas Morley
2016-06-26 22:01 GMT+02:00 David Kastrup :
> Thomas Morley  writes:
>
>> 2016-06-26 19:58 GMT+02:00 Imanuel Habekotte :
>>>
>>> Thanks for trying to help Federico. Does anyone else know a solution
>>> to the problem below?
>>
>>
>> LilyPond interprets the input successively, repeats are disregarded.
>>
>> So your problem can be reduced to:
>> { \time 3/4 R2. \time 4/4 \time 3/4 R2. }
>> where you want to print two TimeSignatures at the same musical moment.
>> LilyPond will _never_ do this.
>> Honestly, I've never seen this before.
>
> To be fair, it isn't the "same musical moment" at all unless your name
> is LilyPond.
>
>> Anyway, to get it printed as you like you'll have to work around.
>> Here I choosed to hack BreathingSign.
>> Ofcourse it's pure graphical and you have to repeat it in any Staff:
>
> Well, I tend to cheat with the "same musical moment" rather than the
> graphics.  In this case, I'd likely use something like
>
>
>
> The spacing is not perfect but not all that bad.

Yep, \grace { ... } was my first thought as well.
Though, I refrained from it, because of the spacing issue.

> --
> David Kastrup
>

Cheers,
  Harm

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


Re: Tuplet bracket and cross staff

2016-06-26 Thread Thomas Morley
2016-06-26 14:24 GMT+02:00 David Nalesnik :
> Hi Harm,
>
> On Sun, Jun 26, 2016 at 3:53 AM, Thomas Morley  
> wrote:
>> 2016-06-26 5:00 GMT+02:00 Andrew Bernard :
>>>  Hi Matteo,
>>>
>>> I have a tuplet angle function that somebody (I cannot recall who)
>>> sent me some time ago. I use it heavily and extensively and I can say
>>> it has been tested by me to the limit - it works well.
>>>
>>> Using this code you just say \tupletAngles 1 0 or similar and that's
>>> all you need. Put it is a file tuplet-angles.ily and include it. Using
>>> \tupletAngles 0 0 is very handy for straigthening up tuplets when you
>>> don't want lilypond to angle them.
>>>
>>> Here it is. [Surprised this is not more well known.]
>>>
>>> Andrew
>>
>> Looking in the archives:
>> http://lilypond.1069038.n5.nabble.com/angle-of-a-tuplet-bracket-td55019.html#a55023
>> :)
>>
>
> A very useful function!

Glad it's still of some use.

> It occurs to me that you could override 'positions directly without
> consulting the stencil, instead of as a side-effect:

Indeed, much more elegant.

>
> %% ===
> tupletAngles =
> #(define-music-function (y-off angl)(number? number?)
>"
>  y-off a (possible) offset in Y-direction
>  angl is supposed to be the angle of the TupletBracket in degrees,
>  "
>#{
>  \once\override TupletBracket #'positions =
>  #(lambda (grob)
> (let* ((pos (ly:tuplet-bracket::calc-positions grob))
>(y-length (interval-length pos))
>(x-length (interval-length
> (ly:tuplet-bracket::calc-x-positions grob)))
>(alpha (degrees->radians angl))
>(dir (ly:grob-property grob 'direction))
>(new-start (+ (if (= dir 1)
>  (max (car pos)(cdr pos))
>  (min (car pos)(cdr pos)))
> y-off))
>(new-y (* x-length (tan alpha
>   (cons new-start (+ new-start new-y
>#})
>
> horizontalTuplets =
> \override TupletBracket  #'positions =
> #(lambda (grob)
>(let* ((pos (ly:tuplet-bracket::calc-positions grob))
>   (dir (ly:grob-property grob 'direction))
>   (new-pos (if (= dir 1)
>(max (car pos)(cdr pos))
>(min (car pos)(cdr pos)
>  (cons new-pos new-pos)))
>
> %% ===
>
> (For newer versions, maybe it would be helpful to work in the
> grob-transformer function?)
>
> --DN

I've to admit I forgot about grob-transformer, before you mentioned it.

David K put up some examples replying to user requests, but I think it
should be documented more widely, maybe a snippet in
/Documentation/snippets will do it already or additionally(?) an entry
in the extending-manual.

Thanks for the reminder,
  Harm

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


Re: Time signature before end of volta repeat

2016-06-26 Thread David Kastrup
Thomas Morley  writes:

> 2016-06-26 19:58 GMT+02:00 Imanuel Habekotte :
>>
>> Thanks for trying to help Federico. Does anyone else know a solution
>> to the problem below?
>
>
> LilyPond interprets the input successively, repeats are disregarded.
>
> So your problem can be reduced to:
> { \time 3/4 R2. \time 4/4 \time 3/4 R2. }
> where you want to print two TimeSignatures at the same musical moment.
> LilyPond will _never_ do this.
> Honestly, I've never seen this before.

To be fair, it isn't the "same musical moment" at all unless your name
is LilyPond.

> Anyway, to get it printed as you like you'll have to work around.
> Here I choosed to hack BreathingSign.
> Ofcourse it's pure graphical and you have to repeat it in any Staff:

Well, I tend to cheat with the "same musical moment" rather than the
graphics.  In this case, I'd likely use something like

\new Score \with { \numericTimeSignature }
\repeat volta 2 { c1 }
\alternative { { \time 3/4 c2. \grace { \bar "" \time 4/4 s128 } }
   { \time 3/4 c2. } }

The spacing is not perfect but not all that bad.

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


Re: Re: Time signature before end of volta repeat

2016-06-26 Thread Thomas Morley
2016-06-26 21:30 GMT+02:00 Thomas Morley :
> 2016-06-26 21:27 GMT+02:00 Thomas Morley :
>> 2016-06-26 19:58 GMT+02:00 Imanuel Habekotte :
>>>
>>> Thanks for trying to help Federico. Does anyone else know a solution to the 
>>> problem below?
>>
>>
>> LilyPond interprets the input successively, repeats are disregarded.
>>
>> So your problem can be reduced to:
>> { \time 3/4 R2. \time 4/4 \time 3/4 R2. }
>> where you want to print two TimeSignatures at the same musical moment.
>> LilyPond will _never_ do this.
>> Honestly, I've never seen this before.
>>
>> Anyway, to get it printed as you like you'll have to work around.
>> Here I choosed to hack BreathingSign.
>> Ofcourse it's pure graphical and you have to repeat it in any Staff:
>>
>>
>> \version "2.19.44"
>>
>> insertTime =
>> #(define-music-function (fraction)(fraction?)
>> #{
>
> %% better to add:
> \once
>>   \override BreathingSign.stencil =
>> #(lambda (grob)
>>   (ly:grob-set-property! grob 'fraction fraction)

%% If wanted/needed add:
(ly:grob-set-property! grob 'style 'numbered)
>>   (ly:grob-set-property! grob 'Y-offset '())
>>   (ly:grob-set-nested-property! grob
>> '(space-alist staff-bar) '(extra-space . 1.0))
>>   (ly:time-signature::print grob))
>>   \breathe
>> #})
>>
>> { \time 3/4 R2. \insertTime 4/4 \time 3/4 R2. }
>>
>> HTH,
>>   Harm

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


Re: Re: Time signature before end of volta repeat

2016-06-26 Thread Thomas Morley
2016-06-26 21:27 GMT+02:00 Thomas Morley :
> 2016-06-26 19:58 GMT+02:00 Imanuel Habekotte :
>>
>> Thanks for trying to help Federico. Does anyone else know a solution to the 
>> problem below?
>
>
> LilyPond interprets the input successively, repeats are disregarded.
>
> So your problem can be reduced to:
> { \time 3/4 R2. \time 4/4 \time 3/4 R2. }
> where you want to print two TimeSignatures at the same musical moment.
> LilyPond will _never_ do this.
> Honestly, I've never seen this before.
>
> Anyway, to get it printed as you like you'll have to work around.
> Here I choosed to hack BreathingSign.
> Ofcourse it's pure graphical and you have to repeat it in any Staff:
>
>
> \version "2.19.44"
>
> insertTime =
> #(define-music-function (fraction)(fraction?)
> #{

%% better to add:
\once
>   \override BreathingSign.stencil =
> #(lambda (grob)
>   (ly:grob-set-property! grob 'fraction fraction)
>   (ly:grob-set-property! grob 'Y-offset '())
>   (ly:grob-set-nested-property! grob
> '(space-alist staff-bar) '(extra-space . 1.0))
>   (ly:time-signature::print grob))
>   \breathe
> #})
>
> { \time 3/4 R2. \insertTime 4/4 \time 3/4 R2. }
>
> HTH,
>   Harm

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


Re: Re: Time signature before end of volta repeat

2016-06-26 Thread Thomas Morley
2016-06-26 19:58 GMT+02:00 Imanuel Habekotte :
>
> Thanks for trying to help Federico. Does anyone else know a solution to the 
> problem below?


LilyPond interprets the input successively, repeats are disregarded.

So your problem can be reduced to:
{ \time 3/4 R2. \time 4/4 \time 3/4 R2. }
where you want to print two TimeSignatures at the same musical moment.
LilyPond will _never_ do this.
Honestly, I've never seen this before.

Anyway, to get it printed as you like you'll have to work around.
Here I choosed to hack BreathingSign.
Ofcourse it's pure graphical and you have to repeat it in any Staff:


\version "2.19.44"

insertTime =
#(define-music-function (fraction)(fraction?)
#{
  \override BreathingSign.stencil =
#(lambda (grob)
  (ly:grob-set-property! grob 'fraction fraction)
  (ly:grob-set-property! grob 'Y-offset '())
  (ly:grob-set-nested-property! grob
'(space-alist staff-bar) '(extra-space . 1.0))
  (ly:time-signature::print grob))
  \breathe
#})

{ \time 3/4 R2. \insertTime 4/4 \time 3/4 R2. }

HTH,
  Harm

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


Re: Flute Accompaniment

2016-06-26 Thread Nathan Ho

On 2016-06-26 11:14, Br. Gabriel-Marie | SSPX wrote:

In my piece I have a piano staff with the music on the bottom staff.
In the upper staff it is supposed to be notes for recorder or flute
accompaniment.  In the original the flute notes and its staff are all
a bit smaller in size.  What do you call those smaller notes?  I want
to make the entire top staff + the notes just smaller so it is obvious
to the singers not to try and sing the accompaniment.  How do I do
that?


Hello,

Try adding the following \with block to your Staff:

\new Staff \with {
  fontSize = #-3
  \override StaffSymbol.staff-space = #(magstep -3)
  \override StaffSymbol.thickness = #(magstep -3)
} {
   % Music follows here
}

it's been a while since I used LilyPond so this knowledge might be a bit 
out of date... I think in the development version there's a new way to 
do this.



Nathan

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


Re: Flute Accompaniment

2016-06-26 Thread Mat Kramer
Are you referring to cue notes? See 
http://lilypond.org/doc/v2.18/Documentation/notation/writing-parts#formatting-cue-notes.

-Mat




> On Jun 26, 2016, at 1:14 PM, Br. Gabriel-Marie | SSPX  
> wrote:
> 
> In my piece I have a piano staff with the music on the bottom staff.  In the 
> upper staff it is supposed to be notes for recorder or flute accompaniment.  
> In the original the flute notes and its staff are all a bit smaller in size.  
> What do you call those smaller notes?  I want to make the entire top staff + 
> the notes just smaller so it is obvious to the singers not to try and sing 
> the accompaniment.  How do I do that?
> ___
> 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


Flute Accompaniment

2016-06-26 Thread Br. Gabriel-Marie | SSPX
In my piece I have a piano staff with the music on the 
bottom staff. In the upper staff it is supposed to be notes 
for recorder or flute accompaniment.  In the original the 
flute notes and its staff are all a bit smaller in size.  
What do you call those smaller notes?  I want to make the 
entire top staff + the notes just smaller so it is obvious 
to the singers not to try and sing the accompaniment.  How 
do I do that?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Fwd: Re: Time signature before end of volta repeat

2016-06-26 Thread Imanuel Habekotte
Thanks for trying to help Federico. Does anyone else know a solution to 
the problem below?




 Forwarded message 
Subject:Re: Time signature before end of volta repeat
Date:   Sun, 26 Jun 2016 18:13:24 +0200
From:   Imanuel Habekotte 
To: Federico Bruni 



Hello Federico,

I meant like inside the 1st alternative ending of the repeat. There is a 
3/4 at the beginning and a 4/4 at the end. Do you see it?


When I try to do this in LilyPond:

\alternative {
  { \time 3/4 f8 f( aes16 bes des8~des) des \time 4/4 }
  { _*\time 3/4*_ f,8 f( aes16 bes des8~des) \mark \markup { 
\musicglyph #"scripts.coda" } }

}

... then I don't see the 4/4 time signature at all, but if I delete the 
marked signature (the second \time 3/4), it does show up, though in the 
wrong place (it appears after the bar instead of before it).


Kind regards,
Imanuel

Op 26-6-2016 om 10:14 schreef Federico Bruni:
Il giorno dom 26 giu 2016 alle 9:56, Imanuel Habekotté 
 ha scritto:
I would like to have a time signature printed before the end bar of a 
volta repeat. Here is an example of what I would like to have: 
https://html1-f.scribdassets.com/60ssbtzf5s2k8f21/images/2-88fc29efc8.jpg


Instead I get a time signature printed after the repeat.


Hi Imanuel

Welcome to LilyPond.
LilyPond should print the new time signature before and after a line 
break, just like in the example you linked.

Here's a minimal example:

\version "2.19.43"
{
 \time 2/4
 \repeat volta 2 {
   c2 c c c \break
 }
 \alternative {
   { \time 3/4 d2. }
   { e2. }
 }
}

Can you provide a minimal example showing what's the problem?
http://lilypond.org/tiny-examples.html



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


Re: "Easy Reader" template

2016-06-26 Thread Abraham Lee
May,

On Sunday, June 26, 2016, Mat Kramer  wrote:

> I just discovered LilyPond. What a great program!
>
> I’m trying to make lead sheets that my elderly father can read. The
> default staff size is a bit small. I found the docs about using
> set-global-staff-size, but it produces awkward crowded output. Does anyone
> have a good template for making larger easier-to-read output?
>

There shouldn't be a problem with the larger staff sizes. There are a
number of things you can do like increasing note spacing (see the
"Horizontal Spacing" section in the Notation Reference for specific
examples), putting in manual \break and \pageBreak commands. There's also
using some of the \paper variables to encourage the layout algorithm to
spread the measures out more, like

\paper {
  system-count = 4
  page-count = 2
  % etc.
}

HTH (Hope That Helps),
Abraham
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Time signature before end of volta repeat

2016-06-26 Thread Federico Bruni

Hello Immanuel

Please reply to all, including the mailing list.
I've understand your problem now, but I don't have a solution for you. 
Probably someone here is able to help you.



Il giorno dom 26 giu 2016 alle 18:13, Imanuel Habekotte 
 ha scritto:

Hello Federico,

I meant like inside the 1st alternative ending of the repeat. There 
is a 3/4 at the beginning and a 4/4 at the end. Do you see it?


When I try to do this in LilyPond:

\alternative {
  { \time 3/4 f8 f( aes16 bes des8~des) des \time 4/4 }
  { \time 3/4 f,8 f( aes16 bes des8~des) \mark \markup { 
\musicglyph #"scripts.coda" } }

}

... then I don't see the 4/4 time signature at all, but if I delete 
the marked signature (the second \time 3/4), it does show up, though 
in the wrong place (it appears after the bar instead of before it).


Kind regards,
Imanuel

Op 26-6-2016 om 10:14 schreef Federico Bruni:
Il giorno dom 26 giu 2016 alle 9:56, Imanuel Habekotté 
 ha scritto:
I would like to have a time signature printed before the end bar of 
a volta repeat. Here is an example of what I would like to have: 
https://html1-f.scribdassets.com/60ssbtzf5s2k8f21/images/2-88fc29efc8.jpg


Instead I get a time signature printed after the repeat.


Hi Imanuel

Welcome to LilyPond.
LilyPond should print the new time signature before and after a line 
break, just like in the example you linked.

Here's a minimal example:

\version "2.19.43"
{
 \time 2/4
 \repeat volta 2 {
   c2 c c c \break
 }
 \alternative {
   { \time 3/4 d2. }
   { e2. }
 }
}

Can you provide a minimal example showing what's the problem?
http://lilypond.org/tiny-examples.html






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


"Easy Reader" template

2016-06-26 Thread Mat Kramer
I just discovered LilyPond. What a great program!

I’m trying to make lead sheets that my elderly father can read. The default 
staff size is a bit small. I found the docs about using set-global-staff-size, 
but it produces awkward crowded output. Does anyone have a good template for 
making larger easier-to-read output?

Thanks.

-Mat





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


Re: drawing glissando line with (gliss) as text across line

2016-06-26 Thread Thomas Morley
2016-06-23 0:44 GMT+02:00 Thomas Morley :
> 2016-06-22 23:48 GMT+02:00 Ryan Michael :
>> Interesting. your example works perfectly in itself. But when I port it over
>> to my score I get the following error:
>>
>>  Wrong type argument in position 1 (expecting Stencil): ()
>>
>> I believe it calls it on this line:
>>
>>  (spanner-stencil-x-length (interval-length (ly:stencil-extent
>> spanner-stencil X)))
>>
>> Here is a gist of the score:
>> https://gist.github.com/ebbnormal/62a8893942a5e6f91735afdf77f2081a
>> I basically make a simple call to \glissandoTextOn as you do before I use
>> \glissando.
>>
>> Any ideas?
>
>
> If the glissando-line is _too_ short in tight layout-situations, it
> will not be printed. Thus no stencil, causing the error.
> Ensuring a reasonable minimum-length, cures the error, but the visual
> output is not convincing.
> Lemme see if I can come up with something better, but I'll likely have
> not no time to work on it before the weekend.
>
> Sorry,
>   Harm

Hi Ryan,

below next try.
I'm not really convinced though, see REMARK

\version "2.19.44"

%% REMARK
%% The code below keeps the default glissando-stencil, while adding some
%% text to it. This means the text-stencil needs to be rotated to match the
%% glissando; also some reasonable padding between them needs to be found.
%% It turned out being a pretty difficult task to do so with reasonable
%% exactness and the current code is not always convincing, although usable.
%%
%% TODO
%% Test whether constructing a glissando+text-stencil from scratch causes better
%% results

#(define (radians->degree radians)
  (/ (* radians 180) PI))

#(define (sign x)
  (if (= x 0)
  0
  (if (< x 0) -1 1)))

#(define ((gliss-plus-text text) grob)
  (if (not (ly:stencil? (ly:line-spanner::print grob)))
  #f
  (let* ((sys (ly:grob-system grob))
 (layout (ly:grob-layout grob))
 (line-thickness (ly:output-def-lookup layout 'line-thickness))
 (blot-diameter (ly:output-def-lookup layout 'blot-diameter))
 (thickness (ly:grob-property grob 'thickness))
 (thick
   (if (number? thickness)
   (/ thickness 10)
   line-thickness))
 (spanner-stencil (ly:line-spanner::print grob))
 (left-bound-info (ly:grob-property grob 'left-bound-info))
 (y-left (assoc-get 'Y left-bound-info))
 (x-left (assoc-get 'X left-bound-info))
 (left-padding (assoc-get 'padding left-bound-info))
 (right-bound-info (ly:grob-property grob 'right-bound-info))
 (y-right (assoc-get 'Y right-bound-info))
 (x-right (assoc-get 'X right-bound-info))
 (right-padding (assoc-get 'padding right-bound-info))
 (slant (sign (- y-right y-left)))
 (spanner-stencil-x-length
   (interval-length (ly:stencil-extent spanner-stencil X)))
 (spanner-stencil-y-length
   (interval-length (ly:stencil-extent spanner-stencil Y)))
 ;; TODO
 ;; fiddling around with PI and radians causes some inexactness
 (alpha
   (radians->degree
 (- (/ PI 2)
(angle
  (make-rectangular
(- spanner-stencil-y-length
   (/ (+ thick blot-diameter) 2))
(- spanner-stencil-x-length
   (/ (+ thick blot-diameter) 2)))
 (spanner-center-X
   (interval-center (ly:stencil-extent spanner-stencil X)))
 (text-stencil (grob-interpret-markup grob text))
 (rotated-text-stil
   (ly:stencil-rotate text-stencil (* slant alpha) 0 0))
 (text-center-X
   (interval-center (ly:stencil-extent rotated-text-stil X)))
 (translated-text-stencil
   (ly:stencil-translate
 rotated-text-stil
 ;; TODO
 ;; some correcting values found by try and error
 ;; how to calculate?
 (cons
   (+
 (/ (+ left-padding right-padding) 2)
 (- spanner-center-X text-center-X)
 (if (negative? slant) 0.1 -0.6))
   (+ (/ (+ y-right y-left) 2)
  (if (negative? slant) 0.5 0.6))
  (ly:stencil-add
spanner-stencil
translated-text-stencil


glissandoTextOn = {
\temporary \override Score.Glissando.springs-and-rods =
  #ly:spanner::set-spacing-rods
\temporary \override Score.Glissando.minimum-length = 7
\temporary \override Score.Glissando #'stencil =
  #(gliss-plus-text
;(markup #:with-color red #:box #:italic #:fontsize -5 "gliss.")
#{
  \markup \italic \fontsize #-5 "gliss."
#})
}

glissandoTextOff = \revert 

Re: Tuplet bracket and cross staff

2016-06-26 Thread David Nalesnik
Hi Harm,

On Sun, Jun 26, 2016 at 3:53 AM, Thomas Morley  wrote:
> 2016-06-26 5:00 GMT+02:00 Andrew Bernard :
>>  Hi Matteo,
>>
>> I have a tuplet angle function that somebody (I cannot recall who)
>> sent me some time ago. I use it heavily and extensively and I can say
>> it has been tested by me to the limit - it works well.
>>
>> Using this code you just say \tupletAngles 1 0 or similar and that's
>> all you need. Put it is a file tuplet-angles.ily and include it. Using
>> \tupletAngles 0 0 is very handy for straigthening up tuplets when you
>> don't want lilypond to angle them.
>>
>> Here it is. [Surprised this is not more well known.]
>>
>> Andrew
>
> Looking in the archives:
> http://lilypond.1069038.n5.nabble.com/angle-of-a-tuplet-bracket-td55019.html#a55023
> :)
>

A very useful function!

It occurs to me that you could override 'positions directly without
consulting the stencil, instead of as a side-effect:


%% ===
tupletAngles =
#(define-music-function (y-off angl)(number? number?)
   "
 y-off a (possible) offset in Y-direction
 angl is supposed to be the angle of the TupletBracket in degrees,
 "
   #{
 \once\override TupletBracket #'positions =
 #(lambda (grob)
(let* ((pos (ly:tuplet-bracket::calc-positions grob))
   (y-length (interval-length pos))
   (x-length (interval-length
(ly:tuplet-bracket::calc-x-positions grob)))
   (alpha (degrees->radians angl))
   (dir (ly:grob-property grob 'direction))
   (new-start (+ (if (= dir 1)
 (max (car pos)(cdr pos))
 (min (car pos)(cdr pos)))
y-off))
   (new-y (* x-length (tan alpha
  (cons new-start (+ new-start new-y
   #})

horizontalTuplets =
\override TupletBracket  #'positions =
#(lambda (grob)
   (let* ((pos (ly:tuplet-bracket::calc-positions grob))
  (dir (ly:grob-property grob 'direction))
  (new-pos (if (= dir 1)
   (max (car pos)(cdr pos))
   (min (car pos)(cdr pos)
 (cons new-pos new-pos)))

%% ===

(For newer versions, maybe it would be helpful to work in the
grob-transformer function?)

--DN

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


Re: Tuplet bracket and cross staff

2016-06-26 Thread matpen3@gmail
Hi Andrew and Thomas,

@Andrew many thanks to report that
@Thomas really brilliant, as always

cheers

matteo 


> Il giorno 26 giu 2016, alle ore 10:53, Thomas Morley 
>  ha scritto:
> 
> 2016-06-26 5:00 GMT+02:00 Andrew Bernard :
>> Hi Matteo,
>> 
>> I have a tuplet angle function that somebody (I cannot recall who)
>> sent me some time ago. I use it heavily and extensively and I can say
>> it has been tested by me to the limit - it works well.
>> 
>> Using this code you just say \tupletAngles 1 0 or similar and that's
>> all you need. Put it is a file tuplet-angles.ily and include it. Using
>> \tupletAngles 0 0 is very handy for straigthening up tuplets when you
>> don't want lilypond to angle them.
>> 
>> Here it is. [Surprised this is not more well known.]
>> 
>> Andrew
> 
> Looking in the archives:
> http://lilypond.1069038.n5.nabble.com/angle-of-a-tuplet-bracket-td55019.html#a55023
> :)
> 
> Reading it up gives some additional informations...
> 
> Cheers,
>  Harm


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


Re: Tuplet bracket and cross staff

2016-06-26 Thread Thomas Morley
2016-06-26 5:00 GMT+02:00 Andrew Bernard :
>  Hi Matteo,
>
> I have a tuplet angle function that somebody (I cannot recall who)
> sent me some time ago. I use it heavily and extensively and I can say
> it has been tested by me to the limit - it works well.
>
> Using this code you just say \tupletAngles 1 0 or similar and that's
> all you need. Put it is a file tuplet-angles.ily and include it. Using
> \tupletAngles 0 0 is very handy for straigthening up tuplets when you
> don't want lilypond to angle them.
>
> Here it is. [Surprised this is not more well known.]
>
> Andrew

Looking in the archives:
http://lilypond.1069038.n5.nabble.com/angle-of-a-tuplet-bracket-td55019.html#a55023
:)

Reading it up gives some additional informations...

Cheers,
  Harm

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


Re: Time signature before end of volta repeat

2016-06-26 Thread Federico Bruni
Il giorno dom 26 giu 2016 alle 9:56, Imanuel Habekotté 
 ha scritto:
I would like to have a time signature printed before the end bar of a 
volta repeat. Here is an example of what I would like to have: 
https://html1-f.scribdassets.com/60ssbtzf5s2k8f21/images/2-88fc29efc8.jpg


Instead I get a time signature printed after the repeat.


Hi Imanuel

Welcome to LilyPond.
LilyPond should print the new time signature before and after a line 
break, just like in the example you linked.

Here's a minimal example:

\version "2.19.43"
{
 \time 2/4
 \repeat volta 2 {
   c2 c c c \break
 }
 \alternative {
   { \time 3/4 d2. }
   { e2. }
 }
}

Can you provide a minimal example showing what's the problem?
http://lilypond.org/tiny-examples.html


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


Time signature before end of volta repeat

2016-06-26 Thread Imanuel Habekotté
I would like to have a time signature printed before the end bar of a 
volta repeat. Here is an example of what I would like to have: 
https://html1-f.scribdassets.com/60ssbtzf5s2k8f21/images/2-88fc29efc8.jpg


Instead I get a time signature printed after the repeat.

Kind regards,
Imanuel

P.S. This is my first post on a mailing list. :D So please forgive me if 
I make any mistakes.


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