Re: Tuplet bracket and cross staff

2016-06-25 Thread 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

== snip

\version "2.19.42"

%% ===
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 #'stencil =
 #(lambda (grob)
(let* ((pos (ly:grob-property grob 'positions))
   (y-length (interval-length pos))
   (st (ly:tuplet-bracket::print grob))
   (st-x-ext (ly:stencil-extent st X))
   (st-x-length (interval-length st-x-ext))
   (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 (* st-x-length (tan alpha
  (ly:grob-set-property! grob 'positions (cons new-start (+
new-start new-y)))
  (ly:tuplet-bracket::print grob)))
   #})

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

%% ===




\language "italiano"


staffDown = \change Staff = "LH"

staffUp = \change Staff = "RH"



RH_VIII = \relative do'' {

  r2

  \tupletUp

  \once \override TupletBracket.staff-padding = #9

  \tupletAngles -6 30
  \tuplet 5/4 {

\staffDown r16  sol'-. \staffUp re'\( mib re

  } sib'8\)-. r

  |

}



LH_VIII = \relative do' {

  \clef "treble" r2 s4 la''8-. r8

  |

}



<<

  \set PianoStaff.connectArpeggios = ##t

  \new Staff = "RH" \with {

\accidentalStyle neo-modern

\numericTimeSignature

\override Flag.stencil = #modern-straight-flag

\override VerticalAxisGroup.remove-empty = ##f

  }  \RH_VIII

  \new Staff = "LH" \with {

\accidentalStyle neo-modern

\numericTimeSignature

\clef "bass"

\override Flag.stencil = #modern-straight-flag

\override VerticalAxisGroup.remove-empty = ##f

  } \LH_VIII

>>


== snip

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


Re: Tuplet bracket and cross staff

2016-06-25 Thread David Nalesnik
On Sat, Jun 25, 2016 at 5:15 PM, Simon Albrecht  wrote:
> On 25.06.2016 20:22, David Nalesnik wrote:
>>
>> On Sat, Jun 25, 2016 at 1:19 PM, David Nalesnik
>>  wrote:
>>>
>>> Hi,
>>>
>>> On Sat, Jun 25, 2016 at 11:50 AM, matpen3@gmail 
>>> wrote:

 Hi Stephen,

 I’m using now

 \once \override TupletBracket.rotation = #'(0.1 -120 0.1)
>>
>> But it is strange that the TupletNumber doesn't follow along in this case
>> too...
>
>
> Well, it’s quite obvious that the current implementation of rotating objects
> is quite unsatisfactory. After all, the rotation isn’t even taken into
> account for spacing. (We have a ticket for that, IIRC.)

Yes, https://sourceforge.net/p/testlilyissues/issues/2325/

David

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


Re: Tuplet bracket and cross staff

2016-06-25 Thread David Nalesnik
On Sat, Jun 25, 2016 at 1:19 PM, David Nalesnik
 wrote:
> Hi,
>
> On Sat, Jun 25, 2016 at 11:50 AM, matpen3@gmail  wrote:
>> Hi Stephen,
>>
>> I’m using now
>>
>> \once \override TupletBracket.rotation = #'(0.1 -120 0.1)

But it is strange that the TupletNumber doesn't follow along in this case too...

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-25 Thread David Nalesnik
Hi,

On Sat, Jun 25, 2016 at 11:50 AM, matpen3@gmail  wrote:
> Hi Stephen,
>
> I’m using now
>
> \once \override TupletBracket.rotation = #'(0.1 -120 0.1)
> \offset Y-offset 1.5 TupletNumber
>

If you adjust the positions property of the TupletBracket, the number
will follow along.  So you could do:

\once \override TupletBracket.positions = #'(15 . 20)

or use \offset:

\once \offset positions #'(1 . 1.5) TupletBracket

HTH,
David

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


Re: Tuplet bracket and cross staff

2016-06-25 Thread matpen3@gmail
Hi Stephen,

I’m using now

\once \override TupletBracket.rotation = #'(0.1 -120 0.1)
\offset Y-offset 1.5 TupletNumber

Thanks, also to David



> Il giorno 25 giu 2016, alle ore 18:20, Stephen MacNeil 
>  ha scritto:
> 
> can you share?
> 
> Stephen


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


Re: Tuplet bracket and cross staff

2016-06-25 Thread Stephen MacNeil
can you share?

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


Re: Tuplet bracket and cross staff

2016-06-25 Thread Stephen MacNeil
good to know

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


Re: Restricting cross staff stems

2016-06-25 Thread Simon Albrecht

On 25.06.2016 12:59, Andrew Bernard wrote:

Hi Simon,

Did you misunderstand my question? I know crossStaff is temporary. I 
want it to NOT crossStaff to the top staff just in this case (i.e. 
temporarily). Perhaps I have expressed my query badly.


Oh, sorry. I overlooked that part. They’re supposed to cross between the 
middle and low staves, but not to the top one. Sorry for being smug.


Best, Simon



Andrew



On 25 June 2016 at 8:01:12 PM, Simon Albrecht (simon.albre...@mail.de 
) wrote:



On 25.06.2016 11:46, Andrew Bernard wrote:
> Greetings all,
>
> Referring to the attached image, I want the cross staff stems to not
> extend to the top staff, temporarily, for a short section of score.
> Can this be done?

Huh? The last time I looked, you had to wrap the notes concerned in the
\crossStaff{} music function anyway. So it’s always a temporary device,
unless you use \crossStaff as a toplevel music function or so.

Best, Simon



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


Re: Tuplet bracket and cross staff

2016-06-25 Thread David Nalesnik
Hi,

On Sat, Jun 25, 2016 at 10:49 AM, Stephen MacNeil
 wrote:

>
> \override TupletNumber.Y-offset = #(lambda (grob) (+ 1.5
> (ly:tuplet-number::calc-y-offset grob)))
>

\offset Y-offset 1.5 TupletNumber

is equivalent

-David

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


Re: Tuplet bracket and cross staff

2016-06-25 Thread matpen3@gmail
Hi Stephen, 

thanks. 

Actually I’m finding a simpler way to move the whole tuplet, included the 
number, without to have to use two \override.
TupletBracket.staff-padding seemed so right ;)

cheers


matteo

> Il giorno 25 giu 2016, alle ore 17:49, Stephen MacNeil 
>  ha scritto:
> 
> Not the best way I am sure .. but it works. I am sure someone has a less 
> aggressive way. rotation seems to work when offset or extent does not.
> 
> RH_VIII = \relative do'' {
> r2
> \tupletUp
> %\once \override Score.TupletBracket.staff-padding = #19
> 
> \once \override TupletBracket.rotation = #'(0.1 -120 0.1)
> 
> %%% both work
> % use
> %\once \override TupletNumber.Y-offset = #16.85
> % or
> \override TupletNumber.Y-offset = #(lambda (grob) (+ 1.5 
> (ly:tuplet-number::calc-y-offset grob)))
> 
> 
> \tuplet 5/4 {
> \staffDown r16 sol'-. \staffUp re'\( mib re
> } sib'8\)-. r
> |
> }
> 
> 
> HTH
> Stephen
> 


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


Re:Tuplet bracket and cross staff

2016-06-25 Thread Stephen MacNeil
Not the best way I am sure .. but it works. I am sure someone has a less
aggressive way. rotation seems to work when offset or extent does not.

RH_VIII = \relative do'' {

r2

\tupletUp

%\once \override Score.TupletBracket.staff-padding = #19


\once \override TupletBracket.rotation = #'(0.1 -120 0.1)


%%% both work

% use

%\once \override TupletNumber.Y-offset = #16.85

% or

\override TupletNumber.Y-offset = #(lambda (grob) (+ 1.5
(ly:tuplet-number::calc-y-offset grob)))




\tuplet 5/4 {

\staffDown r16 sol'-. \staffUp re'\( mib re

} sib'8\)-. r

|

}



HTH

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


Tuplet bracket and cross staff

2016-06-25 Thread matpen3@gmail
Hi all,

I don’ understand why TupletBracket.staff-padding doesn’t work inside a context 
with a cross staff and I’m not able to find an alternative way to move the 
group.

How could I avoid the collision of the tuplet with the slur?

Thanks for any help.

Cheers 


Matteo


BracketCrossSTaff.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: always glissandi

2016-06-25 Thread Tobias Hagedorn
I have to finish a score in these days, after this i will update.
Thanks a lot! 
Maybe in the future i will also try to work with a text editor like emacs and 
using regular expressions instead of manipulate lilypond in the deep…
Tobias

Am 24.06.2016 um 12:19 schrieb David Kastrup :

> Tobias Hagedorn  writes:
> 
>> Sorry I get this error message:
>> 
>> GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
>> #
>> (define-music-function (music) (ly:music?)
>> 
>> Perhaps it depends on my version… I have to update
>> lilypond. music-function is complete new for me and very interesting!
>> I have to learn a bit more by myself and spending more time on this :)
>> Thanks a lot for this quick answering!
>> Tobias
>> 
>> \version "2.19.15"
>> 
>> addGlissandi =
>> #(define-music-function (music) (ly:music?)
> 
> Yes.  I think it's something like 2.19.22 where you can write music
> functions like that.  Before it had to be
> 
>#(define-music-function (parser location music) (ly:music?)
> 
> ...
> 
> There is some rationale for sticking with a stable version like 2.18.2,
> but if you are using a development version like 2.19.15 anyway, it makes
> more sense to update semi-frequently.
> 
> -- 
> David Kastrup

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


Re: Restricting cross staff stems

2016-06-25 Thread Andrew Bernard
Hi Simon,

In my scores I just add the \crossStaff to one of the parts and it all just
happens. I don’t have to use \crossStaff in both connected parts. Am I
doing something wrong? If so, it is curious that is works so well (perhaps
too well, in this case!)

Andrew



On 25 June 2016 at 8:01:12 PM, Simon Albrecht (simon.albre...@mail.de)
wrote:

On 25.06.2016 11:46, Andrew Bernard wrote:
> Greetings all,
>
> Referring to the attached image, I want the cross staff stems to not
> extend to the top staff, temporarily, for a short section of score.
> Can this be done?

Huh? The last time I looked, you had to wrap the notes concerned in the
\crossStaff{} music function anyway. So it’s always a temporary device,
unless you use \crossStaff as a toplevel music function or so.

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


Re: Restricting cross staff stems

2016-06-25 Thread Simon Albrecht

On 25.06.2016 11:46, Andrew Bernard wrote:

Greetings all,

Referring to the attached image, I want the cross staff stems to not 
extend to the top staff, temporarily, for a short section of score. 
Can this be done?


Huh? The last time I looked, you had to wrap the notes concerned in the 
\crossStaff{} music function anyway. So it’s always a temporary device, 
unless you use \crossStaff as a toplevel music function or so.


Best, Simon

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


Re: Multiple rhythms in same score

2016-06-25 Thread Simon Albrecht

On 24.06.2016 05:17, Don Gingrich wrote:

When I see full scores for a number of songs published,
it is clear that the reason that various verses are printed
separately is that one or more bars have significantly
different rhythm from the first verse.


This is the same case with bilingual vocal parts. Haydn’s ‘Creation’ is 
a showcase for this, because it was really composed bilingually, so I 
took the first phrase and typeset it in what I believe is the canonical way.
The appearance isn’t tweaked in any way, so the spacing is quite 
unsatisfactory yet. You will also notice that I make use of very recent 
features, namely the way to create and reference alist variables (like 
e.g. with \mus.main and \mus.alt).
I have no idea if this suits your particular needs or likings, but it 
may serve as a reference.


Best, Simon
\version "2.19.42"

global = {
  \key c \minor
  \time 4/4
  \partial 4
}
mus.main = \relative {
  \global
  \voiceOne g4
  c4. 8 \oneVoice 4 b
  \voiceOne
  d1
  as2 g4 d
  es es
}
mus.alt = \relative {
  \global
  \voiceTwo
  g4~
  4 8 c  \hideNotes c4 b \unHideNotes
  d2. f,4
  as4 8 8  g4 d8 d
  es2
}
lyr.main = \lyricmode {
  Im An -- fan -- ge schuf Gott Him -- mel und Er -- de;
}
lyr.alt = \lyricmode {
  In the be -- gin -- ning God cre -- a -- ted the heaven and the earth;
}

\score {
  <<
\new Staff <<
  \clef bass
  \new Voice = "main" \with {
autoBeaming = ##f
  } { \mus.main }
  \new Voice = "alt" \with {
autoBeaming = ##f
fontSize = -2
  } { \mus.alt }
>>
\new Lyrics \lyricsto "main" { \lyr.main }
\new Lyrics \with {
  \override LyricText.font-shape = #'italic
} \lyricsto "alt" { \lyr.alt }
  >>
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Restricting cross staff stems

2016-06-25 Thread Andrew Bernard
Greetings all,

Referring to the attached image, I want the cross staff stems to not extend
to the top staff, temporarily, for a short section of score. Can this be
done? Is there a way to temporarily remove the span stem engraver for a
brief passage? I don’t want to fudge it by shifting the top notes a little,
as the vertical alignment matters in this score.

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