Re: Newbie Question -- verse and chorus

2009-05-10 Thread Tim Rowe
2009/5/10 Mats Bengtsson :
> This is explained in Sect. "3.2.3 Voices and vocals" in the Learning Manual
> for LilyPond.

I can't see anything relating to it there -- it was the first place I
looked! Perhaps you don't understand what I want, or perhaps I can't
see what't in front of my face (wouldn't be the first time). Can you
point me to the bit of 3.2.3 that you think relates?

-- 
Tim Rowe


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


Re: fingering

2009-05-10 Thread Neil Puttock
2009/5/10 Mario Moles :
> Caro Neil esiste anche un modo per abbreviare questo?:
>
> " \override StrokeFinger #'text = #(lambda (grob)
> (markup #:center-column (#:lower 2.5 "^" (stroke-finger::calc-text
> grob"

You could use identifiers, but here's a better solution, using your
abbreviations:

\include "italiano.ly"
#(set-global-staff-size 18)

#(define (calc-custom-stroke-text grob)
   (let ((text (ly:event-property (event-cause grob) 'text)))
 (if (string? text)
 (markup #:center-column (#:lower 2.5 "^" text))
 (stroke-finger::calc-text grob

#(define (make-stroke-finger location finger)
   (apply make-music
  (append
   (list
'StrokeFingerEvent
'origin location)
   (if  (string? finger)
(list 'text finger)
(list 'digit finger)

da = #(define-music-function (parser location) ()
(make-stroke-finger location "a"))
dm = #(define-music-function (parser location) ()
(make-stroke-finger location "m"))
di = #(define-music-function (parser location) ()
(make-stroke-finger location "i"))
dp = #(define-music-function (parser location) ()
(make-stroke-finger location "p"))
dan = #(define-music-function (parser location) ()
 (make-stroke-finger location 4))
dmn = #(define-music-function (parser location) ()
 (make-stroke-finger location 3))
din = #(define-music-function (parser location) ()
 (make-stroke-finger location 2))
dpn = #(define-music-function (parser location) ()
 (make-stroke-finger location 1))

\relative do, {
  \clef "G_8"
  \key mi \minor
  \cadenzaOn
  \set strokeFingerOrientations = #'(up)
  \override StrokeFinger #'avoid-slur = #'inside
  \override StrokeFinger #'add-stem-support = ##t
  \override StrokeFinger #'font-size = #0
  \override StrokeFinger #'text = #calc-custom-stroke-text
  \voiceOne
  \once \override Slur #'height-limit = #4
  mi16(   
 
 )

  re,(   
 )
}

Regards,
Neil


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


\set string

2009-05-10 Thread Mario Moles
Ciao a tutti!
Vorrei sapere se c'è un modo per rendere "costante" la distanza delle corde 
dalle note!
Grazie!
-- 

oiram/bin/selom
app = {\override StrokeFinger #'text = #(lambda (grob) (markup #:center-column (#:lower 2.5 "^" (stroke-finger::calc-text grob}
napp = {\override StrokeFinger #'text = #(lambda (grob) (markup #:center-column (#:lower 2.5 "" (stroke-finger::calc-text grob}
cofon ={\cadenzaOff \bar "|"\cadenzaOn}
snu = { \set stringNumberOrientations = #'(up) }
snd = { \set stringNumberOrientations = #'(down) }
snl = { \set stringNumberOrientations = #'(left) }
snr = { \set stringNumberOrientations = #'(right)}
fou = { \set fingeringOrientations = #'(up) }
fod = { \set fingeringOrientations = #'(down) }
fol = { \set fingeringOrientations = #'(left) }
for = { \set fingeringOrientations = #'(right) }
\version "2.12.1"
\header {
meter =  \markup {\override #'(font-name . "URW Palladio L italic"){"(Potenza, 7 sep. 1973)"}}
poet =  \markup {\override #'(font-name . "URW Palladio L italic"){"Trascrizione e diteggiatura di Mario Moles"}} 
title =  \markup {\override #'(font-name .  "URW Palladio L bold italic"){\fontsize #2 "FANTASIA" }}
subsubtitle =  \markup {\override #'(font-name . "URW Palladio L italic"){"trascrizione per chitarra"}}
composer =   \markup {\override #'(font-name .  "URW Palladio L italic"){ "Sylvius Leopold Weiss" }}
arranger = \markup {\override #'(font-name . "URW Palladio L italic"){ "(Grottkau, 12 oct. 1686 - Dresde, 16 oct. 1750)"}}
tagline = \markup {\override #'(font-name . "URW Palladio L"){ "Created using LilyPond"}}
}
\layout {
indent = 0.5\cm
}

#(set-global-staff-size 20)

#(define RH rightHandFinger)
\new Staff <<
  \new Voice
\relative c, {
  \clef "G_8"
  \key e \minor
  \cadenzaOn
\set strokeFingerOrientations = #'(up)
  \override StrokeFinger #'avoid-slur = #'inside
  \override StrokeFinger #'add-stem-support = ##t
  \override StrokeFinger #'font-size = #0
  \override StringNumber #'extra-offset = #'(0 . 3.2)
  \fol \snd
  \voiceOne
  \once \override Slur #'height-limit = #4
  e16\f(   
 
 )
  #(set-octavation 1)  \set Staff.ottavation = \markup { \upright {\tiny "III 1/2" } }
  \override Staff.OttavaBracket #'dash-period = #0.2  
  ([   ]  
  [#(set-octavation 0)  ] 
  [  < b-\RH #4 -4> < d,-\RH #2 -3\3> ]) g,, [(  ]
   [  ]\app _\( [\napp \)
   ])\cofon 
  a, c' b c fis,, d'' c d g,, b' a b g g' b, fis' c [e b e] a,, [c'' e, g]
  d, [fis' c d] b [c fis b,] cis, [a' g' fis] dis, [fis' b, a]
  e [fis' g, fis']\cofon \break
  cis e b e fis,, e'' ais, fis g, d'' b g e, [cis'' b g] fis, [ais' fis' e]
}
\new Voice

\relative c, {
  \clef "G_8"
  \key e \minor
  \cadenzaOn
  \voiceTwo 
\set strokeFingerOrientations = #'(down)
  \override StrokeFinger #'avoid-slur = #'inside
  \override StrokeFinger #'add-stem-support = ##t
  \override StrokeFinger #'font-size = #0
   2.   \cofon
   4   8 [b] 
   c [b] a,4 d2 cis4 dis e8 [g]\cofon \break
}
>>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Neil Puttock
2009/5/10 Marc Hohl :

> And here's my solution for tablature:
>
> #(define (glissando::calc-tab-extra-dy grob)
>  (let* ((original (ly:grob-original grob))
>         (left-bound (ly:spanner-bound original LEFT))
>         (right-bound (ly:spanner-bound original RIGHT))
>         (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
>         (right-pitch (ly:event-property (event-cause right-bound) 'pitch))
>         (left-staff-position (ly:grob-property left-bound 'staff-position))
>         (right-staff-position (ly:grob-property right-bound
> 'staff-position))
>         (extra-dy
>            (if (and (= left-staff-position right-staff-position)
>                     (ly:pitch                -1
>                 1 ))) ;; I don't know why, but "0" doesn't work properly in
> tablature, compare glissando::calc-extra-dy

Unless you can return the correct value or 0 (in the same way as
glissando::calc-extra-dy), you'll probably need to use cond and else:

(cond
((right pitch is lower) -1)
(right pitch is higher) 1)
(else 0))

Regards,
Neil


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


Re: missing glissando features (bugs?)

2009-05-10 Thread Neil Puttock
2009/5/10 Marc Hohl :

> I came up with the following definition:
>
> #(define (glissando::calc-extra-dy grob)
>  (let* ((original (ly:grob-original grob))
>         (left-bound (ly:spanner-bound original LEFT))
>         (right-bound (ly:spanner-bound original RIGHT))
>         (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
>         (right-pitch (ly:event-property (event-cause right-bound) 'pitch))
>         (extra-dy
>             (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave
> right-pitch))
>                      (= (ly:pitch-notename left-pitch) (ly:pitch-notename
> right-pitch)))
>                 (- (ly:pitch-alteration right-pitch) (ly:pitch-alteration
> left-pitch))
>                 0 )))
>         (set! (ly:grob-property grob 'extra-dy) extra-dy)
>         (ly:line-spanner::print grob)))

Good stuff, though you don't need to override #'stencil here; it will
work just as well with #'extra-dy directly:

#(define (glissando::calc-extra-dy grob)
   (let* ((original (ly:grob-original grob))
  (left-bound (ly:spanner-bound original LEFT))
  (right-bound (ly:spanner-bound original RIGHT))
  (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
  (right-pitch (ly:event-property (event-cause right-bound) 'pitch)))

 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave right-pitch))
  (= (ly:pitch-notename left-pitch) (ly:pitch-notename 
right-pitch)))
 (- (ly:pitch-alteration right-pitch) (ly:pitch-alteration left-pitch))
 0)))

\override Glissando #'extra-dy = #glissando::calc-extra-dy

Regards,
Neil


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


Re: defining new context - alignement issue

2009-05-10 Thread Neil Puttock
2009/5/10 Frédéric Bron :

> 1. The issue is the vertical alignment of "Stringendo" and "Lebhaft".
> Why are they not on the same line?

Two things:

If you move the Metronome_mark_engraver and Mark_engraver from the
Score context to another context, you also need to move the
Staff_collecting_engraver.

Clear the MetronomeMark's padding.

> 2. Also could someone explain the need of \consists
> "Axis_group_engraver" (try to comment it and see that every thing goes
> above the score..., three lines of marks).

You've answered your own question. :)

Regards,
Neil


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


Re: Slurs collide with the dot of dotted notes

2009-05-10 Thread bosmutus

I found that using something like,

\once \override Slur #'positions = #'(0 . 2.8)

did a good job. I'll try your other suggestions and see how they compare.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Slurs-collide-with-the-dot-of-dotted-notes-tp23463349p23474399.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: Slurs collide with the dot of dotted notes

2009-05-10 Thread Neil Puttock
2009/5/9 bosmutus :
>
> That changed the slur, but not enough to avoid the collision. Any other
> suggestions?

Did you experiment with the value? It might need to be increased, but
it's dependent on things like the staff-size and how tightly packed
the notes are.

You could also try changing Slur #'ratio, or as a last resort, adding
a transparent articulation to the notehead.

Regards,
Neil


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


Re: strange results with rightHandFinger/StrokeFinger and avoid-slur

2009-05-10 Thread Neil Puttock
2009/5/9 -Eluze :

> but i am sure i have seen so many *uppercase* LEFTs RIGHTs UPs DOWNs CENTERs
> or others recently, so i did not care… maybe there was a # preposed, but i
> am sure i also saw *\override Stem #'neutral-direction = #up* so i am
> wondering how to memorise this - are there any rules somewhere?

The situation's a bit confusing, since the identifiers for directions
are defined twice, in both lower case and upper case.  As identifiers,
they're unquoted.

For fingering orientations, you have a list of symbols which are
case-sensitive; there's no easy way of allowing case-insensitive
directions for this.

Regards,
Neil


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


Re: Newbie Question -- verse and chorus

2009-05-10 Thread Mats Bengtsson

James E. Bailey wrote:


Some prefer to use \skip1*32 (or appropriate).
I can't imagine that anybody prefers this option (at least not when 
using \addlyrics or \lyricsto), since it doesn't work. This will not 
skip 32 bars and not even 32 notes, but just a single note.


  /Mats


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


Re: Newbie Question -- verse and chorus

2009-05-10 Thread Mats Bengtsson
This is explained in Sect. "3.2.3 Voices and vocals" in the Learning 
Manual for LilyPond.


  /Mats

Tim Rowe wrote:

Sorry for all the newbie questions -- I'm getting what I can from the
documentation and examples, but as you can tell a few things are
tripping me up.

This one is a song that has verses and a chorus.  I can't work out how
to set them all against the music, unless I pad all verses except the
first with a lot of \skip instructions where the chorus would be. I
though it might be in the manual under "Lyrics and repeats", but that
section doesn't seem to be written yet. This must be a common enough
job -- how do I do it?

Thanks in advance..

  




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


Re: Newbie Question -- verse and chorus

2009-05-10 Thread James E. Bailey


Am 10.05.2009 um 22:54 schrieb Tim Rowe:


Sorry for all the newbie questions -- I'm getting what I can from the
documentation and examples, but as you can tell a few things are
tripping me up.

This one is a song that has verses and a chorus.  I can't work out how
to set them all against the music, unless I pad all verses except the
first with a lot of \skip instructions where the chorus would be. I
though it might be in the manual under "Lyrics and repeats", but that
section doesn't seem to be written yet. This must be a common enough
job -- how do I do it?

Thanks in advance..

--  
Tim Rowe




There are different ways of doing this. I prefer to have separate  
voice contexts for the verse and lyrics, i.e., music = { \context  
Voice = Verse \relative {} \context Voice = Chorus \relative {} } and  
then corresponding lyrics contexts: verse = \context Lyrics \lyricsto  
Verse \lyricmode {} chorus = \context Lyrics \lyricsto Chorus  
\lyricmode {}
Some prefer to use \skip1*32 (or appropriate). And some prefer a  
similar method to skip, but a little easier on input, \repeat unfold  
138 {_}


James E. Bailey



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


Newbie Question -- verse and chorus

2009-05-10 Thread Tim Rowe
Sorry for all the newbie questions -- I'm getting what I can from the
documentation and examples, but as you can tell a few things are
tripping me up.

This one is a song that has verses and a chorus.  I can't work out how
to set them all against the music, unless I pad all verses except the
first with a lot of \skip instructions where the chorus would be. I
though it might be in the manual under "Lyrics and repeats", but that
section doesn't seem to be written yet. This must be a common enough
job -- how do I do it?

Thanks in advance..

-- 
Tim Rowe


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


Re: Newby question about stem directions

2009-05-10 Thread Mats Bengtsson

Kieren MacMillan wrote:

Hi Tim,


Does the \\ keep adding voices (effectively) indefinitely
[...] I'm worried about running out of voices!


I don't know the official answer. (Maybe Mats or HW or Graham can 
speak to this?)
It seems that you can have an infinite number and looking at the 
implementation, I see that it actually will give you the equivalence of 
an infinite number of \voiceOne, \voiceTwo, \voiceThree, \voiceFour, ...
(even though only these first four are defined for manual use). What 
differs \voiceThree from \voiceOne is that in the case of collisions, 
the note heads are shifted in \voiceThree. In the 5th voice they will be 
shifted even further, and so on.


   /Mats


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


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Marc Hohl schrieb:

Neil Puttock schrieb:

2009/5/9 Marc Hohl :

 

I tried to receive the informations needed by overriding the Glissando
#'stencil with
a function which simply displays the values obtained by the 
ly:spanner-bound

call
before calling ly:line-spanner::print, but I get only  #NoteHead > on

the terminal.

What am I doing wrong here?



Nothing, though to be on the safe side, it's best to ensure you're
dealing with the unbroken spanner by using ly:grob-original: if a user
decides to have a glissando over a line break, it won't be possible to
get noteheads for both bounds.

Once you have the NoteHead grobs, you can retrieve their pitches from
the events which created them:
Neil, thank you, I wasn't aware of this connection between grobs and 
events.
Now it seems rather logical (not surprising as we talk about computing 
languages :-)



\relative c' {
  \override NoteHead #'stencil = #(lambda (grob)
 ;; event-cause is a convenient shorthand in this case for
(ly:grob-property grob 'cause)
 (display (event-cause grob))
 (ly:note-head::print grob))
 c4
}

 
#
C++: Music((length . #) (elements) (duration . # 

) (pitch . #) (origin . #

/home/neil/Documents/test.ly:254:5>))((display-methods #) (name . NoteEvent) (types general-music event
note-event rhythmic-event melodic-event)) >
) (length . #) (elements) (duration . #) (pitch
. #) (origin . #))((class . note-event)) >

>From the event, you can get the pitch using ly:event-property event 
'pitch.


Putting it all together:

#(define (glissando::calc-extra-dy grob)
   (let* ((original (ly:grob-original grob))
  (left-bound (ly:spanner-bound original LEFT))
  (right-bound (ly:spanner-bound original RIGHT))
  (left-pitch (ly:event-property (event-cause left-bound) 
'pitch))
  (right-pitch (ly:event-property (event-cause right-bound) 
'pitch)))


 ;; work out return value based on pitches here

  

I came up with the following definition:

#(define (glissando::calc-extra-dy grob)
  (let* ((original (ly:grob-original grob))
 (left-bound (ly:spanner-bound original LEFT))
 (right-bound (ly:spanner-bound original RIGHT))
 (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
 (right-pitch (ly:event-property (event-cause right-bound) 
'pitch))

 (extra-dy
 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave 
right-pitch))
  (= (ly:pitch-notename left-pitch) 
(ly:pitch-notename right-pitch)))
 (- (ly:pitch-alteration right-pitch) 
(ly:pitch-alteration left-pitch))

 0 )))
 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

noten = \relative c {
  c4 \glissando cis
  c4 \glissando cis
  c4 \glissando ces
  c4 \glissando ces
  c4 \glissando d \glissando e \glissando f
}


\score {
  <<
 \new Staff { \clef "G_8"
  \noten \break
  \override Glissando #'stencil = 
#glissando::calc-extra-dy

  \noten}
  >>
}

and it works! Lilypond is just great; the deeper I get into it, the 
more impressed I am.

So I will try and solve the tablature problem, too.


And here's my solution for tablature:

#(define (glissando::calc-tab-extra-dy grob)
  (let* ((original (ly:grob-original grob))
 (left-bound (ly:spanner-bound original LEFT))
 (right-bound (ly:spanner-bound original RIGHT))
 (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
 (right-pitch (ly:event-property (event-cause right-bound) 'pitch))
 (left-staff-position (ly:grob-property left-bound 
'staff-position))
 (right-staff-position (ly:grob-property right-bound 
'staff-position))

 (extra-dy
(if (and (= left-staff-position right-staff-position)
 (ly:pitch 1 ))) ;; I don't know why, but "0" doesn't work 
properly in tablature, compare glissando::calc-extra-dy

 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

tabs = \relative c {
  \set TabStaff.minimumFret = #2
  c4 \glissando d \glissando c2
  c4 \glissando d \glissando c2
  c'4 \glissando d \glissando e, \glissando f
  \bar "|."
}

\score {
  <<
 \new TabStaff { \clef "tab" \tabs
 \break
 \override Glissando #'stencil = 
#glissando::calc-tab-extra-dy

 \tabs }
  >>
}




 0))

Regards,
Neil

  




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





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


Re: Newby question about stem directions

2009-05-10 Thread Tim Rowe
2009/5/10 Kieren MacMillan :

> I've attached a better (IMO) way of doing the same thing.
>
> Hope this helps!

/Very/ much better, and conceptually matches how I would expect to do
it. Splendid!

Thanks.

-- 
Tim Rowe


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


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Werner LEMBERG schrieb:

I came up with the following definition:  [...]

and it works!



Mhmm, not perfect: There should be a dx correction to avoid an overlap
between the glissando line and the accidental.


Werner

  

Yes, I know, but I concentrated on item (2); see the start of this thread.
Improvements etc. are always welcome, but it seems to me that the problem
glissando vs. accidentals is not easy to solve.

Marc




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


Re: missing glissando features (bugs?)

2009-05-10 Thread Werner LEMBERG

> I came up with the following definition:  [...]
> 
> and it works!

Mhmm, not perfect: There should be a dx correction to avoid an overlap
between the glissando line and the accidental.


Werner


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


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/9 Marc Hohl :

  

I tried to receive the informations needed by overriding the Glissando
#'stencil with
a function which simply displays the values obtained by the ly:spanner-bound
call
before calling ly:line-spanner::print, but I get only  # on
the terminal.

What am I doing wrong here?



Nothing, though to be on the safe side, it's best to ensure you're
dealing with the unbroken spanner by using ly:grob-original: if a user
decides to have a glissando over a line break, it won't be possible to
get noteheads for both bounds.

Once you have the NoteHead grobs, you can retrieve their pitches from
the events which created them:

Neil, thank you, I wasn't aware of this connection between grobs and events.
Now it seems rather logical (not surprising as we talk about computing 
languages :-)


\relative c' {
  \override NoteHead #'stencil = #(lambda (grob)
 ;; event-cause is a convenient shorthand in this case for
(ly:grob-property grob 'cause)
 (display (event-cause grob))
 (ly:note-head::print grob))
 c4
}

  


#) (elements) (duration . #  

) (pitch . #) (origin . #

/home/neil/Documents/test.ly:254:5>))((display-methods #) (name . NoteEvent) (types general-music event
note-event rhythmic-event melodic-event)) >
) (length . #) (elements) (duration . #) (pitch
. #) (origin . #))((class . note-event)) >

>From the event, you can get the pitch using ly:event-property event 'pitch.

Putting it all together:

#(define (glissando::calc-extra-dy grob)
   (let* ((original (ly:grob-original grob))
  (left-bound (ly:spanner-bound original LEFT))
  (right-bound (ly:spanner-bound original RIGHT))
  (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
  (right-pitch (ly:event-property (event-cause right-bound) 'pitch)))

 ;; work out return value based on pitches here

  

I came up with the following definition:

#(define (glissando::calc-extra-dy grob)
  (let* ((original (ly:grob-original grob))
 (left-bound (ly:spanner-bound original LEFT))
 (right-bound (ly:spanner-bound original RIGHT))
 (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
 (right-pitch (ly:event-property (event-cause right-bound) 'pitch))
 (extra-dy
 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave 
right-pitch))
  (= (ly:pitch-notename left-pitch) 
(ly:pitch-notename right-pitch)))
 (- (ly:pitch-alteration right-pitch) 
(ly:pitch-alteration left-pitch))

 0 )))
 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

noten = \relative c {
  c4 \glissando cis
  c4 \glissando cis
  c4 \glissando ces
  c4 \glissando ces
  c4 \glissando d \glissando e \glissando f
}


\score {
  <<
 \new Staff { \clef "G_8"
  \noten \break
  \override Glissando #'stencil = #glissando::calc-extra-dy
  \noten}
  >>
}

and it works! Lilypond is just great; the deeper I get into it, the more 
impressed I am.

So I will try and solve the tablature problem, too.

Marc


 0))

Regards,
Neil

  




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


Re: Newby question about stem directions

2009-05-10 Thread Kieren MacMillan

Hi Tim,


Why do you need two voices just to align lyrics to a dotted slur?
If you post your current workaround, I'm sure someone on the list  
will be

able to show you how to do it with only one voice.


I used the snippet at http://lsr.dsi.unimi.it/LSR/Item?id=308 for
exactly the use mentioned in that snippet. It did seem a bit arcane
(but produced better looking output than shown at that link).


That snippet should *definitely* be updated...  =\  [VALENTIN: can  
you do this?]

I've attached a better (IMO) way of doing the same thing.

Hope this helps!
Kieren.


\version "2.12.2"

theNotes = \relative {
  \slurDashed c8 e d( f) e g f a
}

theLyricsI = \lyricmode {
  \set ignoreMelismata = ##t One two three four five six seven eight
}
theLyricsII = \lyricmode {
  One two Whee! __ that’s a dashed slur!
}

\score
{
  <<
\new Voice = "melody" \theNotes
\new Lyrics \lyricsto "melody" \theLyricsI
\new Lyrics \lyricsto "melody" \theLyricsII
  >>
}

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


Re: Newby question about stem directions

2009-05-10 Thread Tim Rowe
2009/5/10 Kieren MacMillan :

> Why do you need two voices just to align lyrics to a dotted slur?
> If you post your current workaround, I'm sure someone on the list will be
> able to show you how to do it with only one voice.

I used the snippet at http://lsr.dsi.unimi.it/LSR/Item?id=308 for
exactly the use mentioned in that snippet. It did seem a bit arcane
(but produced better looking output than shown at that link).

Although now I know that the << {...} {...} >> construct doesn't
create a second voice I don't think the number of voices is likely to
be an issue.

-- 
Tim Rowe


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


Re: Newby question about stem directions

2009-05-10 Thread Kieren MacMillan

Hi Tim,


Does the \\ keep adding voices (effectively) indefinitely
[...] I'm worried about running out of voices!


I don't know the official answer. (Maybe Mats or HW or Graham can  
speak to this?)
The attached test shows that there are at least 5 -- I'm assuming  
there are an indefinite number (or at least enough that you won't  
likely ever hit the limit).



the workaround I have found to align lyrics to a dotted slur
uses two voices for one musical line.


Why do you need two voices just to align lyrics to a dotted slur?
If you post your current workaround, I'm sure someone on the list  
will be able to show you how to do it with only one voice.


Regards,
Kieren.

\version "2.12.2"
\include "english.ly"

test = \relative
{
  \context Voice = "5" { \override NoteHead #'color = #blue  
\override Accidental #'color = #blue }
  << { a b c } \\ { c d e } \\ { e f g } \\ { a b c } \\ { fs, gs  
bf } >>

}

\score { \test }


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


Re: Typesetting a 17th century music example.

2009-05-10 Thread Kim Shrier


On May 10, 2009, at 2:35 AM, James E. Bailey wrote:



Am 10.05.2009 um 08:43 schrieb Kim Shrier:


Hello,

I am working on typesetting some music examples from a 17th century
book on how to improvise.  I am having trouble figuring out how to
set one example in particular.  The example is showing concords and
discords.  It has an 11 line staff where the lines are spread out to
allow room for notes with interval notations.  I have figured out how
to handle that part.  The example also has a treble, alto, and bass
clef all stacked vertically on the left side of the staff.  The  
treble
clef is positioned on the 4th line, the alto clef is positioned on  
the
6th line and the bass clef is positioned on the 8th line.  I am  
unable

to figure out how to place these 3 clefs.  I can place any one clef
in the proper place but I don't seem to be able to figure out how to
get all 3 clefs placed on the single staff.

Any help would be appreciated.
Kim


I would use markup, i.e:
 \override Staff.Clef #'stencil = #ly:text-interface::print
   \override Staff.Clef #'text = \markup \column {
  \raise #1.0 {\musicglyph #"clefs.C"}
  \raise #0.0 {\musicglyph #"clefs.C"}
  \raise #-1.0 {\musicglyph #"clefs.C"}
   }

James E. Bailey



Thank you.  With only minor corrections, the above worked.  I used:

  \override Staff.Clef #'stencil = #ly:text-interface::print
  \override Staff.Clef #'text = \markup \column {
\raise #3.0 {\musicglyph #"clefs.G"}
\raise #0.0 {\musicglyph #"clefs.C"}
\raise #-3.0 {\musicglyph #"clefs.F"}
  }

since I had increased the staff space to 3 and I wanted the 3 different
clefs.

Kim


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


Re: Newby question about stem directions

2009-05-10 Thread Tim Rowe
2009/5/10 Kieren MacMillan :

> In the example you give, << {M1} {M2} >> (i.e., without the \\), Lilypond
> simply says "engrave the two musical gestures {M1} and {M2} simultaneously
> in the same Voice context << V >>".
> Hence, there is no concern for stem direction, collision, etc.

Thanks. Does the \\ keep adding voices (effectively) indefinitely, or
is it limited to the four voices that are (as far as I can tell)
named? I ask because I'm coming from Finale, and have occasionally had
to use three voices in a stave, and the workaround I have found to
align lyrics to a dotted slur uses two voices for one musical line.
I'm worried about running out of voices!


-- 
Tim Rowe


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


Re: fingering

2009-05-10 Thread Mario Moles
Caro Neil esiste anche un modo per abbreviare questo?:

 "  \override StrokeFinger #'text = #(lambda (grob)
 (markup #:center-column (#:lower 2.5 "^" (stroke-finger::calc-text
 grob"

Grazie! 



-- 

oiram/bin/selom
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Newby question -- Root notes in chord notation.

2009-05-10 Thread Kieren MacMillan

Hi Tim,

Is there any way to get a fakebook style indication of modified  
root notes?


Read the doc section on chords -- this is explained there (right in  
the second example).



Cheers,
Kieren.


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


Re: Newby question about stem directions

2009-05-10 Thread Kieren MacMillan

Hi Tim,


I can't get the following bit of notation to work -- despite the
\stemUp command the stems are down (which looks horrid!) --
can anybody tell me what I'm doing wrong?


You're not letting Lilypond do the correct voice handling for you...

\version "2.12.2"
\include "english.ly"

lower = \relative c
{
  \clef bass
  \key f \major
  \time 4/4
  << { \voiceOne e4 e4 } \new Voice { \voiceTwo c2 } >> \oneVoice c2 |
}

\score {
  <<
  \set Score.tempoHideNote = ##t
  \tempo 4 = 144
\new PianoStaff <<
  \new Staff = "lower" \lower
>>
  >>
  \layout {
\context { \RemoveEmptyStaffContext }
  }
  \midi { }
}

Be sure to read the manual(s) -- this kind of information is well  
documented there!

Kieren.


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


Newby question -- Root notes in chord notation.

2009-05-10 Thread Tim Rowe
Is there any way to get a fakebook style indication of modified root
notes? For example, I'd like a D chord with a C in the bass to be
notated as D/C (rather than as whatever it is formally -- presumably
some sort of 13th).

Thanks.

-- 
Tim Rowe


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


Newby question about stem directions

2009-05-10 Thread Tim Rowe
I can't get the following bit of notation to work -- despite the
\stemUp command the stems are down (which looks horrid!) -- can
anybody tell me what I'm doing wrong? Thanks.:

\version "2.12.2"
\include "english.ly"

lower = \relative c {
  \clef bass
  \key f \major
  \time 4/4

  <<  {\stemDown c2 } {\stemUp e4 e4 } \stemNeutral >> c2 |
}

\score {
  <<
  \set Score.tempoHideNote = ##t
  \tempo 4 = 144
\new PianoStaff <<
  \new Staff = "lower" \lower
  >>
  >>
  \layout {
\context { \RemoveEmptyStaffContext }
  }
  \midi { }
}

-- 
Tim Rowe


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


defining new context - alignement issue

2009-05-10 Thread Frédéric Bron
Hi!

I tried to play with the contexts and engravers but cannot reach
exactly what I would like. Please look at the example given at the
bottom of this message.
I would like the tempo marks, rehearsal marks, bar numbers and text
spanners to be written above and below each StaffGroup. I came up with
this example.
1. The issue is the vertical alignment of "Stringendo" and "Lebhaft".
Why are they not on the same line?
2. Also could someone explain the need of \consists
"Axis_group_engraver" (try to comment it and see that every thing goes
above the score..., three lines of marks).
3. Also if \override VerticalAxisGroup #'minimum-Y-extent = #'(1 . 3)
is commented, Stringendo is written on the first staff...

Thanks,

Frédéric

\version "2.12.2"

\layout {
\context { \name "TextLine"
\type "Engraver_group"
\consists "Metronome_mark_engraver"
\consists "Text_spanner_engraver"
\consists "Mark_engraver"
\consists "Bar_number_engraver"
\consists "Axis_group_engraver"
\override VerticalAxisGroup #'minimum-Y-extent = #'(1 . 3)
}
\context { \Score
\remove "Mark_engraver"
\remove "Metronome_mark_engraver"
\remove "Bar_number_engraver"
\accepts TextLine
}
\context { \Voice
\remove "Text_spanner_engraver"
}
}

Indications = {
\tempo "Ziemlich langsam" 4 = 52
s1*4 \mark \default s1*6
\textSpannerUp \override TextLine.TextSpanner #'(bound-details
left text) = "Stringendo"
s4\startTextSpan s2. s1*2 s2. s4\stopTextSpan
\tempo "Lebhaft" 4 = 92 s1 \noBreak
s1*4
}

music = \relative { \clef treble \repeat unfold 19 { c4 r c r } }

\score {
\new Score <<
\new TextLine { \Indications }
\new StaffGroup <<
\new Staff { \new Voice { \music } }
\new Staff { \new Voice { \music } }
\new Staff { \new Voice { \music } }
>>
\new TextLine { \Indications }
\new StaffGroup <<
\new Staff { \new Voice { \music } }
\new Staff { \new Voice { \music } }
\new Staff { \new Voice { \music } }
>>
\new TextLine { \Indications }
>>
}


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


Re: Typesetting a 17th century music example.

2009-05-10 Thread James E. Bailey


Am 10.05.2009 um 08:43 schrieb Kim Shrier:


Hello,

I am working on typesetting some music examples from a 17th century
book on how to improvise.  I am having trouble figuring out how to
set one example in particular.  The example is showing concords and
discords.  It has an 11 line staff where the lines are spread out to
allow room for notes with interval notations.  I have figured out how
to handle that part.  The example also has a treble, alto, and bass
clef all stacked vertically on the left side of the staff.  The treble
clef is positioned on the 4th line, the alto clef is positioned on the
6th line and the bass clef is positioned on the 8th line.  I am unable
to figure out how to place these 3 clefs.  I can place any one clef
in the proper place but I don't seem to be able to figure out how to
get all 3 clefs placed on the single staff.

Any help would be appreciated.
Kim


I would use markup, i.e:
 \override Staff.Clef #'stencil = #ly:text-interface::print
   \override Staff.Clef #'text = \markup \column {
  \raise #1.0 {\musicglyph #"clefs.C"}
  \raise #0.0 {\musicglyph #"clefs.C"}
  \raise #-1.0 {\musicglyph #"clefs.C"}
   }

James E. Bailey



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


Re: Optimal page breaking

2009-05-10 Thread Anthony W. Youngman
In message <1241914773.13703.7.ca...@mercury>, Joe Neeman 
 writes

On Sun, 2009-05-10 at 00:18 +0100, Anthony W. Youngman wrote:

Isn't working "quite right" and I can't see how to fix it (12.2).



From the content of your email, I suppose you mean page-turn-breaking

rather than optimal-breaking?

Same thing? I used the title of the manual section, rather than the 
engraver.


I've got a piece that I would like to fit on 3 pages (it insists on
going to 4 :-( but it also insists on breaking at rests after page 1 and
3. There's a rest on the last line of page 2 that it should break after,
which would then give me one turn instead of 2 (and far more time to
turn in :-)


If you know exactly where you want the page turn to happen, you can
leave the Page_turn_engraver out and specify the turn with
\allowPageTurn. In general, if you prefer page turns only after longer
rests, you can set the context property minimumPageTurnLength to
something larger than the default.

I was hoping to let lily do it all by default - this particular piece 
uses several bits that I'd like to turn into my personal templates and 
I'd rather not put specific hacks in :-)


Oddly enough, I couldn't get it all to fit on three pages - lily 
insisted on spilling onto the fourth even with page-count = 3 - UNTIL I 
did as you suggest and set minimumPageTurnLength. At which point it 
decided to fit everything on three pages and break where I want at 
page1. Perfect :-) One easy turn.


 From the documentation it seems like it's supposed to break after every
second page (ie what I want). But it's breaking on the first and every
subsequent 2 which I don't want. I thought there was an option to tell
it whether to break after odd or even pages but this isn't mentioned
along with everything else. Does this option exist, and what is it?


The page turn algorithm isn't very flexible in this regard: it only does
page turns after odd-numbered pages. If you don't want a page turn after
the first page, you need to set first-page-number to 2.

Oh well. I thought I remembered some way it could be changed, when it 
was being discussed on devel.


Thanks,
Wol
--
Anthony W. Youngman - anth...@thewolery.demon.co.uk



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