Re: convert-ly oddities

2016-12-19 Thread Federico Bruni
Il giorno lun 19 dic 2016 alle 23:40, SoundsFromSound 
 ha scritto:

 Me neither, and I use Linux and Frescobaldi (version 3 from master).
 So probably some Windows issue.


Where did you find Frescobaldi v3? I thought the next version (yet to 
be

released) was v2.20 - did I miss something?


I run Frescobaldi from git:
https://github.com/wbsoft/frescobaldi/wiki/Running-Frescobaldi-3-From-Source-Git-(Linux)

Just yesterday I asked on Frescobaldi mailing list when the first 
release of version 3 is planned...



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


Slur position accounts for omitted stem

2016-12-19 Thread Br. Samuel Springuel
In the following snippet I've got two slurred notes that are fairly far 
apart.  This leads to one having a natural stem up and the other down. 
Naturally, when those stems are present, LilyPond should move the slur 
so that it doesn't collide with the stems, as is shown in the first 
Staff.  However, when I omit the stems LilyPond doesn't move the slur 
accordingly (shown in the second staff):


#(ly:set-option 'relative-includes #t)
\version "2.19.49"
\language "english"

music = {
e'( b'--)
}


\new Staff
<<
\new Voice = "mel" { \music }
>>

\new Staff
<<
\new Voice = "mel" { \omit Stem \music }
>>

A bit of googling led me to this old thread:
http://lists.gnu.org/archive/html/lilypond-user/2011-12/msg00522.html

Here, three suggestions were made (updated for 2.19.53):
\override Stem.Y-extent = ##f
\stemDown (or \stemUp, by extension)
\override Stem.stencil = #point-stencil

The first and third don't seem to work anymore.  The second works, in 
the sense that it does something, but forces the slur and the tenuto on 
the same side of the note and so doesn't look completely pretty.


Some more googling led me to this issue:
https://code.google.com/archive/p/lilypond/issues/3760

Which is for 2.19, but is still 2 years old.  Has any progress been made 
here and if so what is the correct incantation to get nice looking output.


For the record, I think e'^( b'_-) provides the best looking stemless 
output and am hoping for some solution that would allow LilyPond to find 
this result automatically.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Better slashed graces

2016-12-19 Thread Andrew Bernard
Hi Gilberto,


You may not be aware of my detailed work on slashed beams and slashed stems
that I recently contributed to openlilylib. Theres a function that provides
fine control over the parameters of beam slashes, and which works on the
left as well as the right (needed for many contemporary scores). Also,
another library function for individual stem slashes, motivated by a need
to have horizontal slashes, but I generalised it to do any angle, again
with fine control over many of the parameters such as thickness and
fractional position.

You can find the code under the /slash-beam and /slash-stem directories
under /notation-snippets in the openlilylib/snippets repository, complete
with examples.

I think you have somewhat different use case to me - I needed individual
control finely tuned, but is it that you want the function to automatically
compute a variable angle but based on some beam criteria? I am sure
something like that could be added to my code. The code I have submitted
has been pretty heavily tested, and apart from anything else, has some
lovely trigonometry!

Hope this may be helpful.

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


Re: Automatic Lyric Extenders

2016-12-19 Thread Br. Samuel Springuel

On 2016-12-19 6:27 PM, Simon Albrecht wrote:

I actually meant using an include file like the attached and not having to add 
the music function locally at all.


This is definitely an idea I like, as it means I'm less likely to forget 
it as I continue to add to the project and will make it easier to 
convert when this gets into LilyPond proper.



#(set! toplevel-music-functions
   (cons (lambda (music parser) (autoextenders music))
 toplevel-music-functions))


When I add this to the bottom of autoextenders.ily I get the following 
error:



Starting lilypond 2.19.53 [Let_us_love_one_another.ly]...
Processing 
`/Users/RPS/Documents/Abbey/DivineOffice/music/antiphons/Let_us_love_one_another.ly'
Parsing.../Applications/LilyPond-dev.app/Contents/Resources/share/lilypond/current/scm/lily-library.scm:189:24:
 In expression (f m):
/Applications/LilyPond-dev.app/Contents/Resources/share/lilypond/current/scm/lily-library.scm:189:24:
 Wrong number of arguments to #
Exited with return code 1.


Based on memories of reading this list, and the hint about number of 
arguments, I realized that the problem was because I'm using 2.19.53 and 
the parser argument is no longer required.  Deleting that got things 
working.  It should be noted that this was not something that convert-ly 
run on autoextenders.ily caught; I had to do this manually.


On 2016-12-19 5:48 PM, Alexander Kobel wrote:
> If you have access to a standard Unix shell, the call
>   sed -i -e '1s/^/\\include "autoextenders.ily"\n/' -e
> 's/\\lyricmode/\\autoextenders\\lyricmode/' *.ly
> might do wonders. Make a backup before, though.

I thought of using sed too, but thanks to Simon don't have to anymore. 
What I was more concerned about, however, was the time needed to review 
the results of the application to see if anything broke as a result. 
After a quick review of the half-dozen or so examples I have entered for 
this project so far, everything seem fine.


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Stanza "number" alignment

2016-12-19 Thread Thomas Morley
2016-12-19 23:14 GMT+01:00 Br. Samuel Springuel :
> On 2016-12-19 5:04 PM, Thomas Morley wrote:
>>
>> \once \override NoteColumn.X-offset = 3.5
>
>
> That works well too.  Which will have more predictable results when the line
> width and staff size changes?

No idea. I'm afraid you'll ned to try it out.

> I'm going to be using these snippets in both
> a "normal" and a "large print" booklet, eventually, and I'd like the
> solution to be adaptable to that down the road.
>
> Also, if I want some additional space after the g'2 in the first line, and
> want the lyric extender underneath to cover that space, is there a better
> solution than having a hidden note?  (Neither the hidden rest nor the shift
> in the note column affect the lyric extender).


Probably:

#(ly:set-option 'relative-includes #t)
\version "2.19.53"
\language "english"

global = { \key g \major }

music = {
a'4 g'2
\once \override NoteColumn.X-offset = 30
g'4 g' f-sharp' e' g' \bar "|"
\once \override NoteColumn.X-offset = 3.5
g' f-sharp'( g') e' f-sharp' g' \bar ":|."
}

words = \lyricmode {
\set stanza = \markup "℣."
\once \override LyricExtender.minimum-length = 40
"." __ _ we pray to the Lord.
\set stanza = \markup "℟." O Lord, hear our paryer.
}

\new Staff
<<
\new Voice = "mel" { \global \music }
\new Lyrics \lyricsto "mel" { \words }
>>

Cheers,
  Harm

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


Re: Automatic Lyric Extenders

2016-12-19 Thread Simon Albrecht

On 19.12.2016 23:48, Alexander Kobel wrote:

Maybe the autoextenders function could be added to
toplevel-music-functions (a list of functions which will be applied to
all music in the score). [...]


Simon, very good catch. Indeed this will work; \autoextenders only 
touches lyrics. Replace

  \new Score { ... }
  \score { ... }
by
  \new Score { \autoextenders { ... } }
  \score { \autoextenders { ... } }
and you should be good to go.


I actually meant using an include file like the attached and not having 
to add the music function locally at all.


HTH, Simon
\version "2.17.11"

#(define (conditional-kill-lyric-extender-callback . args)
  (lambda (grob)
   (let* ((orig (ly:grob-original grob))
  (siblings (ly:spanner-broken-into orig))
  (minimum-length
   (if (null? args)
(ly:grob-property grob 'minimum-length 0)
(car args)))
  (X-extent (ly:stencil-extent (ly:grob-property grob 'stencil 
empty-stencil) X))
  (natural-length (- (cdr X-extent) (car X-extent
(if (and (> minimum-length natural-length)
 (<= (length siblings) 1)) ;; never kill a broken extender
 (ly:grob-suicide! grob)

\layout {
  \context {
\Lyrics
\override LyricExtender.minimum-length = #1.5
\override LyricExtender.after-line-breaking = 
#(conditional-kill-lyric-extender-callback)
  }
}

autoextenders =
#(define-music-function (lyrics) (ly:music?)
   (let* ((has-hyphen?
   (lambda (event)
 (let* ((art (ly:music-property event 'articulations))
(is-hyphen? (lambda (ev) (eq? (ly:music-property ev 'name) 
'HyphenEvent
   (find is-hyphen? art
  (has-extender?
   (lambda (event)
 (let* ((art (ly:music-property event 'articulations))
(is-hyphen? (lambda (ev) (eq? (ly:music-property ev 'name) 
'ExtenderEvent
   (find is-hyphen? art
  (add-extender!
   (lambda (event)
 (ly:music-set-property! event 'articulations
   (append (ly:music-property event 'articulations) (list 
(make-music 'ExtenderEvent
 event)))
 (music-map
  (lambda (event)
(if (and (eq? (ly:music-property event 'name) 'LyricEvent)
 ; do not add extenders below hyphens
 (not (has-hyphen? event))
 ; do not duplicate extenders
 (not (has-extender? event))
 ; do not add additional extenders after _ (internally 
equivalent to " ")
 ; to avoid killed extenders
 (not (equal? (ly:music-property event 'text) " "))
 ; do not add extenders after "" to allow ending extenders
 ; within _ _ _ _ skip sequences with _ _ "" _ _
 (not (equal? (ly:music-property event 'text) ""))
 ; ditto, with _ _ \markup{|null} _ _
 (not (equal? (ly:music-property event 'text) (markup #:null)))
 )
(add-extender! event))
event)
  lyrics)))

#(set! toplevel-music-functions
   (cons (lambda (music parser) (autoextenders music))
 toplevel-music-functions))___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic Lyric Extenders

2016-12-19 Thread Alexander Kobel

Hi again Samuel,

great that you find it useful. Yes, the minimum-length is 
well-tweakable; the default will likely be different in the "final" 
version. This version for killing extenders is my old and home-grown 
solution for my use cases and by no means optimized. It's not been long 
since Joram discovered that it is far more versatile and can be used to 
eliminate superfluous extenders, which allows exactly the functionality 
you asked for.


On 2016-12-19 23:30, Simon Albrecht wrote:

On 19.12.2016 23:18, Br. Samuel Springuel wrote:

It'll take a bit to apply the autoextenders to all my scores in this
project,


If you have access to a standard Unix shell, the call
  sed -i -e '1s/^/\\include "autoextenders.ily"\n/' -e 
's/\\lyricmode/\\autoextenders\\lyricmode/' *.ly

might do wonders. Make a backup before, though.

Maybe the Windows users on the list have an equivalent Powershell 
command or can recommend a decent editor with that functionality?



Maybe the autoextenders function could be added to
toplevel-music-functions (a list of functions which will be applied to
all music in the score). [...]


Simon, very good catch. Indeed this will work; \autoextenders only 
touches lyrics. Replace

  \new Score { ... }
  \score { ... }
by
  \new Score { \autoextenders { ... } }
  \score { \autoextenders { ... } }
and you should be good to go. Could be sed'ed as well, of course.


Or that’s just too much of a hassle, since we can expect the
functionality to end up in Lilypond proper soon.


Let's hope so!


Cheers,
Alexander

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


Re: convert-ly oddities

2016-12-19 Thread SoundsFromSound
Federico Bruni-2 wrote
>> I'm on LINUX and don't use Frescobaldi.
>> At least I never experienced this behaviour.
> 
> Me neither, and I use Linux and Frescobaldi (version 3 from master).
> So probably some Windows issue.

Where did you find Frescobaldi v3? I thought the next version (yet to be
released) was v2.20 - did I miss something? 



-
composer | sound designer 
LilyPond Tutorials (for beginners) --> http://bit.ly/bcl-lilypond
--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/convert-ly-oddities-tp198148p198205.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: Automatic Lyric Extenders

2016-12-19 Thread Simon Albrecht

On 19.12.2016 23:18, Br. Samuel Springuel wrote:
It'll take a bit to apply the autoextenders to all my scores in this 
project,


Maybe the autoextenders function could be added to 
toplevel-music-functions (a list of functions which will be applied to 
all music in the score). You should be able to find an example in the 
archives or on LSR. I don’t know how this plays with Lyrics, though – in 
the worst case the toplevel-music-functions aren’t applied to Lyrics, if 
they are, the autoextenders function might have to be modified to not 
mess up normal music? Sorry I can’t test any of that myself, but maybe 
the hint is helpful.
Or that’s just too much of a hassle, since we can expect the 
functionality to end up in Lilypond proper soon. Big heads up to those 
who are making that possible!


Best, Simon

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


Re: Automatic Lyric Extenders

2016-12-19 Thread Br. Samuel Springuel
I've included the files as instructed and it seems to be working fine 
when applied to the first case.  I did need to tweak 
LyricExtender.minimum-length, as I wanted them to show up more often 
than they were, but a simple override in my score fixed that nicely (I 
assume that I'll need to keep that when this gets added to LilyPond proper).


It'll take a bit to apply the autoextenders to all my scores in this 
project, but I'll let you know if I come across any problems as I do so.


Thanks.
--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: convert-ly oddities

2016-12-19 Thread Thomas Morley
2016-12-19 11:35 GMT+01:00 Peter Toye :
> Thomas,
>
> Thanks - I've just found the version number issue hidden in the Usage
> manual!
>
> But the double newline issue is still an annoyance - it seriously reduces
> the amount of text I can get on a screen. I've looked at the files with a
> hex editor and it's interesting. I'm using Frescobaldi to generate the
> files, and it seems that this uses only hex 0A as a line delimiter (very
> Unix). Convert-ly replaces this with hex 0A 0A. But it's not consistent, and
> I don't recall this happening in previous conversions. The snippets below
> show the differences. I'd like to report this as a bug, but the link to
> gmane on the LP website is broken.

I could forward this to the bug-list, though you could try to send it to
bug-lilyp...@gnu.org
yourself, even if not subscribed it will probably get through.

Though, I'm not convinced about a LilyPond-bug.
Please recheck without using Frescobaldi.

Cheers,
  Harm
>
> \version "2.18.2"
> \score {
>
>  \layout {}
>  \midi {}
> }
>
> \version "2.19.49"
> \score {
>
>
>  \layout {}
>
>  \midi {}
> }
>
>
> %{
> convert-ly.py (GNU LilyPond) 2.19.52  convert-ly.py: Processing `'...
> Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
> 2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.40, 2.19.46, 2.19.49
> %}
>
>
> Best regards,
>
> Peter
> mailto:lilyp...@ptoye.com
> www.ptoye.com
>

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


Re: Stanza "number" alignment

2016-12-19 Thread Br. Samuel Springuel

On 2016-12-19 5:04 PM, Thomas Morley wrote:

\once \override NoteColumn.X-offset = 3.5


That works well too.  Which will have more predictable results when the 
line width and staff size changes?  I'm going to be using these snippets 
in both a "normal" and a "large print" booklet, eventually, and I'd like 
the solution to be adaptable to that down the road.


Also, if I want some additional space after the g'2 in the first line, 
and want the lyric extender underneath to cover that space, is there a 
better solution than having a hidden note?  (Neither the hidden rest nor 
the shift in the note column affect the lyric extender).


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Stanza "number" alignment

2016-12-19 Thread Thomas Morley
2016-12-19 15:53 GMT+01:00 Br. Samuel Springuel :
> In the following snippet, is there a way to set the alignment of the "℟." so
> that it always appears after the barline, rather than under it. I expect
> more space needs to be added to the bar in which it appears for this to
> happen.
>
> Also, is there a way to eliminate the need for the "." to make the lyric
> extender appear?
>
> \version "2.19.53"
>
> #(ly:set-option 'relative-includes #t)
> \version "2.19.53"
> \language "english"
>
> global = { \key g \major }
>
> music = {
> a'4 g'2 g'4 g' f-sharp' e' g' \bar "|"

%% Why not simply move the NoteColumn?
\once \override NoteColumn.X-offset = 3.5

> g' f-sharp'( g') e' f-sharp' g' \bar ":|."
> }
>
> words = \lyricmode {
> \set stanza = \markup "℣." "." __ _ we pray to the Lord.
> \set stanza = \markup "℟." O Lord, hear our paryer.
> }
>
> \new Staff
> <<
> \new Voice = "mel" { \global \music }
> \new Lyrics \lyricsto "mel" { \words }
>>>
> --
> ✝
> Br. Samuel, OSB
> St. Anselm’s Abbey
> Washington, DC
> (R. Padraic Springuel)
>
> PAX ☧ ΧΡΙΣΤΟΣ


Cheers,
  Harm

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


Re: Better slashed graces

2016-12-19 Thread David Nalesnik
On Mon, Dec 19, 2016 at 3:44 PM, Gilberto Agostinho
 wrote:
> Hi David,
>
>
> David Nalesnik wrote
>>> I think the function needs
>>> something like "if there is a beam, then add a slash, else if no beam
>>> then
>>> no slash". Do you think you could give me a hand with that?
>>
>> Sure, that's no problem.  And it looks a bit cleaner than what I went
>> in the last reply
>
> Fantastic, thanks a lot for the help!!
>
> I made one small improvement to the functions, now the slashes the same
> thickness as in the default single note \slashedGrace, and it looks better
> now. For anyone interested, here is the link for the function:
> acciaccaturas_and_slashed_notes.ly
> 
>

Looks great!

-David

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


Re: Better slashed graces

2016-12-19 Thread Gilberto Agostinho
Hi David,


David Nalesnik wrote
>> I think the function needs
>> something like "if there is a beam, then add a slash, else if no beam
>> then
>> no slash". Do you think you could give me a hand with that?
> 
> Sure, that's no problem.  And it looks a bit cleaner than what I went
> in the last reply

Fantastic, thanks a lot for the help!!

I made one small improvement to the functions, now the slashes the same
thickness as in the default single note \slashedGrace, and it looks better
now. For anyone interested, here is the link for the function: 
acciaccaturas_and_slashed_notes.ly

  

Take care!
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Better-slashed-graces-tp184292p198198.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: Better slashed graces

2016-12-19 Thread David Nalesnik
On Mon, Dec 19, 2016 at 1:32 PM, Gilberto Agostinho
 wrote:
> Hi David,
>
> First of all, thanks for your reply and for your help!
>
>
> David Nalesnik wrote
>> The problem is that there is no Beam grob, so an error is raised when
>> you query its properties.
>
> I see!
>
>
>> Following is a simple way to use substitute values when there is no Beam
>> object.
>
> This modified function does compile, but actually it's not doing what it's
> supposed to do in the case of single notes: for that, LilyPond already
> slashes them, so now the function is attempting to add a second slash, see:
>
> 
>
> That's what I said about the conditional,

You simply wrote that the file wouldn't compile.  Unfortunately, my
eyesight seems to be worse than I thought, and I missed the second
slash.

 I think the function needs
> something like "if there is a beam, then add a slash, else if no beam then
> no slash". Do you think you could give me a hand with that?

Sure, that's no problem.  And it looks a bit cleaner than what I went
in the last reply:

slash =
#(define-music-function (parser location ang stem-fraction protrusion)
   (number? number? number?)
   (remove-grace-property 'Voice 'Stem 'direction)
   #{
 \once \override Stem #'stencil =
 #(lambda (grob)
(let* ((x-parent (ly:grob-parent grob X))
   (is-rest? (ly:grob? (ly:grob-object x-parent 'rest)))
   (beam (ly:grob-object grob 'beam))
   (stil (ly:stem::print grob)))
  (cond
   (is-rest? empty-stencil)
   ((ly:grob? beam)
(let* ((refp (ly:grob-system grob))
   (stem-y-ext (ly:grob-extent grob grob Y))
   (stem-length (- (cdr stem-y-ext) (car stem-y-ext)))
   (beam-X-pos (ly:grob-property beam 'X-positions))
   (beam-Y-pos (ly:grob-property beam 'positions))
   (beam-slope (/ (- (cdr beam-Y-pos) (car beam-Y-pos))
 (- (cdr beam-X-pos) (car beam-X-pos
   (beam-angle (atan beam-slope))
   (dir (ly:grob-property grob 'direction))
   (line-dy (* stem-length stem-fraction))
   (line-dy-with-protrusions (if (= dir 1)
 (+ (* 4 protrusion) beam-angle)
 (- (* 4 protrusion)
beam-angle)))
   (ang (if (> beam-slope 0)
(if (= dir 1)
(+ (degrees->radians ang) (* beam-angle 0.7))
(degrees->radians ang))
(if (= dir 1)
(degrees->radians ang)
(- (degrees->radians ang) (* beam-angle 0.7)
   (line-dx (/ line-dy-with-protrusions (tan ang)))
   (protrusion-dx (/ protrusion (tan ang)))
   (corr (if (= dir 1) (car stem-y-ext) (cdr stem-y-ext
  (ly:stencil-add
   stil
   (grob-interpret-markup grob
 (markup
  ;#:with-color red
  #:translate
  (cons (- protrusion-dx)
(+ corr
  (* dir
(- stem-length (+ stem-fraction protrusion)
  #:draw-line
  (cons line-dx
(* dir line-dy-with-protrusions)))
   (else stil
   #})

>
> Thanks a lot once again, I really appreciate your help!
>

You're welcome!

David

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


Re: Stanza "number" alignment

2016-12-19 Thread Klaus Blum
Br. Samuel Springuel wrote
> ... the duration throwing off the later notes 

Ooops, I forgot that I changed the recent duration. Of course it shoud read 
g'4 f-sharp'( g') e' f-sharp' g' \bar ":|."


Br. Samuel Springuel wrote
> why `\hide r` instead of `s`?  I 
> tested the later and it seems to work too, is there a reason to favor 
> one over the other?

I've never figured out how much space would be used by the 's' command, but
'\hide r' takes up exactly the same space that would be given to the visible
rests. Thus, the result is more predictable.

Cheers, 
Klaus



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Stanza-number-alignment-tp198184p198196.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: Automatic Lyric Extenders

2016-12-19 Thread Alexander Kobel

On 2016-12-19 21:09, Br. Samuel Springuel wrote:

Is there a way to get lyric extenders to appear automatically when
lyrics have been applied to a voice using `\lyricsto`?  I know how to
manually get them to appear (with `__`), but I'm wondering if there is a
simple setting that can be changed in an included style file that would
allow me to make the change universally for all file in a particular
project.


Hi Samuel,

you asked at the right time. This will be a major change in one of the 
upcoming Lilypond versions: automatic extenders per default. 
Unfortunately, the idea is merely two weeks old, and programming is 
(almost?) done, but the interface is not yet entirely polished. For the 
time being, you might want to use some "testing" code and include the 
attached file and prefix all your \lyricmode code with \autoextenders:


\include "autoextenders.ily"
...
words = \autoextenders \lyricmode { ... }

Once the new functionality will arrive in the official Lilypond 
distribution, you can simply remove the include, delete all calls of 
autoextenders and you should be good to go.


If you find any annoyances, please make sure to let us know on this list 
- most likely, any "unexpected behavior" will also pop up with the new 
code, and we are eager to find out as soon as possible.



HTH,
Alexander
\version "2.17.11"

#(define (conditional-kill-lyric-extender-callback . args)
  (lambda (grob)
   (let* ((orig (ly:grob-original grob))
  (siblings (ly:spanner-broken-into orig))
  (minimum-length
   (if (null? args)
(ly:grob-property grob 'minimum-length 0)
(car args)))
  (X-extent (ly:stencil-extent (ly:grob-property grob 'stencil 
empty-stencil) X))
  (natural-length (- (cdr X-extent) (car X-extent
(if (and (> minimum-length natural-length)
 (<= (length siblings) 1)) ;; never kill a broken extender
 (ly:grob-suicide! grob)

\layout {
  \context {
\Lyrics
\override LyricExtender.minimum-length = #1.5
\override LyricExtender.after-line-breaking = 
#(conditional-kill-lyric-extender-callback)
  }
}

autoextenders =
#(define-music-function (lyrics) (ly:music?)
   (let* ((has-hyphen?
   (lambda (event)
 (let* ((art (ly:music-property event 'articulations))
(is-hyphen? (lambda (ev) (eq? (ly:music-property ev 'name) 
'HyphenEvent
   (find is-hyphen? art
  (has-extender? 
   (lambda (event)
 (let* ((art (ly:music-property event 'articulations))
(is-hyphen? (lambda (ev) (eq? (ly:music-property ev 'name) 
'ExtenderEvent
   (find is-hyphen? art
  (add-extender! 
   (lambda (event)
 (ly:music-set-property! event 'articulations
   (append (ly:music-property event 'articulations) (list 
(make-music 'ExtenderEvent
 event)))
 (music-map
  (lambda (event)
(if (and (eq? (ly:music-property event 'name) 'LyricEvent)
 ; do not add extenders below hyphens
 (not (has-hyphen? event))
 ; do not duplicate extenders
 (not (has-extender? event))
 ; do not add additional extenders after _ (internally 
equivalent to " ")
 ; to avoid killed extenders
 (not (equal? (ly:music-property event 'text) " "))
 ; do not add extenders after "" to allow ending extenders
 ; within _ _ _ _ skip sequences with _ _ "" _ _
 (not (equal? (ly:music-property event 'text) ""))
 ; ditto, with _ _ \markup{|null} _ _
 (not (equal? (ly:music-property event 'text) (markup #:null)))
 )
(add-extender! event))
event)
  lyrics)))
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Automatic Lyric Extenders

2016-12-19 Thread Br. Samuel Springuel
Is there a way to get lyric extenders to appear automatically when 
lyrics have been applied to a voice using `\lyricsto`?  I know how to 
manually get them to appear (with `__`), but I'm wondering if there is a 
simple setting that can be changed in an included style file that would 
allow me to make the change universally for all file in a particular 
project.


A testable snippet (not totally minimal, but it has several occasions 
where the lyric extenders could show up):


#(ly:set-option 'relative-includes #t)
\version "2.19.53"
\language "english"

% the included style file would go here

global = { \key e \major }

music = {
e'( f-sharp') g-sharp'( a') b'-- b' c-sharp' b'( a') g-sharp'-- 
\bar "|"
b'( a') g-sharp'--( a' g-sharp') f-sharp'( e') c-sharp'-- e'-- \bar 
"||"

}

words = \lyricmode {
Let us love one a -- no -- ther,
for love is of God.
}

\new Staff
<<
\new Voice = "mel" { \global \music }
\new Lyrics \lyricsto "mel" { \words }
>>

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Better slashed graces

2016-12-19 Thread Gilberto Agostinho
Hi David,

First of all, thanks for your reply and for your help!


David Nalesnik wrote
> The problem is that there is no Beam grob, so an error is raised when
> you query its properties.

I see!


> Following is a simple way to use substitute values when there is no Beam
> object.

This modified function does compile, but actually it's not doing what it's
supposed to do in the case of single notes: for that, LilyPond already
slashes them, so now the function is attempting to add a second slash, see:

 

That's what I said about the conditional, I think the function needs
something like "if there is a beam, then add a slash, else if no beam then
no slash". Do you think you could give me a hand with that?

Thanks a lot once again, I really appreciate your help!

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Better-slashed-graces-tp184292p198193.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: Stanza "number" alignment

2016-12-19 Thread Br. Samuel Springuel

On 2016-12-19 11:56 AM, Klaus Blum wrote:

\cadenzaOn \hide r8 \hide r8 \cadenzaOff


Other than the duration throwing off the later notes (easily corrected) 
it works well.  Out of curiosity, why `\hide r` instead of `s`?  I 
tested the later and it seems to work too, is there a reason to favor 
one over the other?


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Stanza "number" alignment

2016-12-19 Thread Klaus Blum
Br. Samuel Springuel wrote
> is there a way to set the alignment of the 
> "℟." so that it always appears after the barline, rather than under it. 

I would simply fill the space between the barline and the first note with
invisible rests.


Br. Samuel Springuel wrote
> is there a way to eliminate the need for the "." to make the lyric 
> extender appear?

You can use any markup, even \markup \null. 

% -
#(ly:set-option 'relative-includes #t)
\version "2.19.53"
\language "english"

global = { \key g \major }

music = {
  a'4 g'2 g'4 g' f-sharp' e' g' \bar "|"
  \cadenzaOn \hide r8 \hide r8 \cadenzaOff
  g' f-sharp'( g') e' f-sharp' g' \bar ":|."
}

words = \lyricmode {
  \set stanza = \markup "℣." \markup \null __ _ we pray to the Lord.
  \set stanza = \markup "℟." O Lord, hear our prayer.
}

\new Staff
<<
  \new Voice = "mel" { \global \music }
  \new Lyrics \lyricsto "mel" { \words }
>>
% -

Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Stanza-number-alignment-tp198184p198190.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: Problems engraving some unbeautiful music

2016-12-19 Thread Peter Toye
Simon,

I agree, and would have written that myself. In fact, as the middle voice is 
mostly played with the right hand, I'd have moved that to the upper staff as 
well.

But I'm trying to reproduce what the composer (Ivor Gurney) and his editor 
(Gerald Finzi I think) published, rather than modern best practice.

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Monday, December 19, 2016, 3:54:03 PM, you wrote:

> On 19.12.2016 11:51, Peter Toye wrote:
>> I'm trying to engrave the attached score fragment, but can't work out 
>> how to get it right. I agree with LP that it's not beautiful, but 
>> that's what the composer wrote.

> The method used in that engraving is nice, but difficult to get right 
> and rarely used. It’s not a good idea to go exactly with that in 
> computer engraving, so I’d rather do something like the attached.

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


Re: Problems engraving some unbeautiful music

2016-12-19 Thread Simon Albrecht

On 19.12.2016 11:51, Peter Toye wrote:
I'm trying to engrave the attached score fragment, but can't work out 
how to get it right. I agree with LP that it's not beautiful, but 
that's what the composer wrote.


The method used in that engraving is nice, but difficult to get right 
and rarely used. It’s not a good idea to go exactly with that in 
computer engraving, so I’d rather do something like the attached.


Best, Simon
\version "2.19.52"

%%

%% http://lsr.di.unimi.it/LSR/Item?id=792
%% see also http://lilypond.org/doc/v2.18/Documentation/notation/displaying-pitches

% Append markup in the text property to the grob
#(define (append-markup grob old-stencil)
  (ly:stencil-combine-at-edge
old-stencil X RIGHT (ly:text-interface::print grob)))

trebleToBass = {
  \clef bass
  % Fake staff clef appearance
  \once \override Staff.Clef.glyph-name = #"clefs.G"
  \once \override Staff.Clef.Y-offset = #-1
  % Append change clef to the time signature
  \once \override Staff.TimeSignature.text = \markup {
\hspace #1.2
\raise #1
\musicglyph #"clefs.F_change"
  }
  \once \override Staff.TimeSignature.stencil = #(lambda (grob)
(append-markup grob (ly:time-signature::print grob)))
}

%

\language "english"

toRH = { \change Staff = "rh" \voiceTwo }
toLH = { \change Staff = "lh" \voiceOne }

\score {
  \new PianoStaff {
<<
  \set PianoStaff.instrumentName = #"Piano"
  \new Staff = "rh" \relative {
\time 3/4
\key gs \minor
\trebleToBass
<<
  \new Voice {
\voiceOne
4(  ) |
( b ) |
  }
  \new Voice {
f,=8 \toLH b,~ b b \toRH f' \toLH b,
\toRH g' \toLH d~ d \toRH g~ g \toLH d
  }
>>
  }

  \new Staff = "lh" {
\time 3/4
\key gs \minor
\clef bass
\relative {
  \voiceTwo
  g,2 g4 |
  2 4 |
}
  }
>>
  }
  \layout {
\context {
  \Voice
  \override Tie.minimum-length = 3
}
  }
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Better slashed graces

2016-12-19 Thread David Nalesnik
Hi Gilberto,

On Mon, Dec 19, 2016 at 6:43 AM, Gilberto Agostinho
 wrote:
> Hi all,
>
> I just discovered a bug with my function above. It turns out the function
> works well when there are two of more notes inside the \slashedGrace{}, but
> when a single note is there the file does not compile. I believe I need a
> conditional somewhere to take care of this but I don't really know how to
> implement it, would anyone be able to give me a hand? Example of a
> problematic case:  slash-bug.ly
> 

The problem is that there is no Beam grob, so an error is raised when
you query its properties.

Following is a simple way to use substitute values when there is no Beam object.

Notice that there is an additional complication.  The grob extent for
the stem in the absence of a beam is (+inf.0 . -inf.0).  I don't know
why.  I hacked a simple fix for this: use the stencil's extent when
grob-extent returns something unusable.  (I didn't give it much
thought -- there's certainly a prettier way.)

Anyway, hope this helps.

David

P. S.  You need { } around your music expression.

%

slash =
#(define-music-function (parser location ang stem-fraction protrusion)
   (number? number? number?)
   (remove-grace-property 'Voice 'Stem 'direction)
   #{
 \once \override Stem #'stencil =
 #(lambda (grob)
(let* ((x-parent (ly:grob-parent grob X))
   (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
  (if is-rest?
  empty-stencil
  (let* ((refp (ly:grob-system grob))
 (stil (ly:stem::print grob))
 (stem-y-ext (ly:grob-extent grob grob Y))
 (stem-y-ext (if (interval-sane? stem-y-ext)
 stem-y-ext
 (ly:stencil-extent stil Y)))
 (stem-length (- (cdr stem-y-ext) (car stem-y-ext)))
 (beam (ly:grob-object grob 'beam))
 (beam? (ly:grob? beam))
 (beam-X-pos (if beam?
 (ly:grob-property beam 'X-positions)
 #f))
 (beam-Y-pos (if beam?
 (ly:grob-property beam 'positions)
 #f))
 (beam-slope (if beam?
 (/ (- (cdr beam-Y-pos) (car beam-Y-pos))
   (- (cdr beam-X-pos) (car beam-X-pos)))
 0.0))
 (beam-angle (atan beam-slope))
 (dir (ly:grob-property grob 'direction))
 (line-dy (* stem-length stem-fraction))
 (line-dy-with-protrusions (if (= dir 1)
   (+ (* 4 protrusion)
beam-angle)
   (- (* 4 protrusion)
beam-angle)))
 (ang (if (> beam-slope 0)
  (if (= dir 1)
  (+ (degrees->radians ang) (* beam-angle 0.7))
  (degrees->radians ang))
  (if (= dir 1)
  (degrees->radians ang)
  (- (degrees->radians ang) (*
beam-angle 0.7)
 (line-dx (/ line-dy-with-protrusions (tan ang)))
 (protrusion-dx (/ protrusion (tan ang)))
 (corr (if (= dir 1) (car stem-y-ext) (cdr stem-y-ext)))
 (stil (ly:stem::print grob)))

(ly:stencil-add
 stil
 (grob-interpret-markup grob
   (markup
;#:with-color red
#:translate
(cons (- protrusion-dx)
  (+ corr
(* dir
  (- stem-length (+ stem-fraction protrusion)
#:draw-line
(cons line-dx
  (* dir line-dy-with-protrusions)
   #})

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


Re: Problems engraving some unbeautiful music

2016-12-19 Thread Peter Toye
Thanks Rutger. That looks brilliant. 

I find that the main problem with Lilypond is working out exactly which 
property of which object to tweak. Presumably this comes with experience.
 
Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 169, Issue 104

2016-12-19 Thread Peter Toye
Thanks Urs. 

There wasn't a code attachment, though (I'm having login problems with Nabble 
at the moment). Just the result. So I can't see how you did it.

One major problem is that the cross-stems in beats 1 & 3 of the 1st bar aren't 
working. They're necessary to indicate that the pianist has to play them with 
the right hand. And then, of course, the stem gets mixed up with the bass line. 
Hence the unbeautiful beams in my extract from the printed score.

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Monday, December 19, 2016, 11:04:26 AM, you wrote:

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org

> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org

> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org

> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."


> Today's Topics:

>1. Re:Problems engraving some unbeautiful music (Urs Liska)


> --

> Message: 1
> Date: Mon, 19 Dec 2016 12:04:06 +0100
> From: Urs Liska <u...@openlilylib.org>
> To: lilypond-user@gnu.org
> Subject: Re: Problems engraving some unbeautiful music
> Message-ID: <0192483a-da05-76fa-3b6c-d434c2ec7...@openlilylib.org>
> Content-Type: text/plain; charset="windows-1252"

> What about the attached?

> This makes the lower voice \voiceTwo, the middle voice \voiceFour and
> keeps all the stems downward.

> Additionally one would have to move the inner voice a little bit to the
> right so it doesn't touch the lower one.

> Just an idea

> Urs


> Am 19.12.2016 um 11:51 schrieb Peter Toye:
>> Problems engraving some unbeautiful music I'm trying to engrave the
>> attached score fragment, but can't work out how to get it right. I
>> agree with LP that it's not beautiful, but that's what the composer wrote.

>> The snippet below is as far as I've got, but there are too many
>> clashes (not surprising). So the cross-staff chords aren't working and
>> it's not merging the RH crochet (1/4 note) and quaver (1/8 note)
>> noteheads. If you comment out the LH 2nd voice, the remaining voices
>> work OK.

>> I suspect that shortening the stem of the LH 1st voice quavers to get
>> them out of the way of the 2nd voice would help, but I can't see how
>> to do this. I tried overriding the beamed-stem-shorten property (not
>> very explicitly documented in the Internals manual) but this made no
>> difference.

>> \version "2.19.52"
>> \language "english"
>> \layout {
>>  \context {
>>\PianoStaff
>>\consists #Span_stem_engraver
>>  }
>> }

>> {
>>  \new PianoStaff {
>><<
>>  \set PianoStaff.instrumentName = #"Piano"
>>  \new Staff = "rh" {
>>\time 3/4
>>\key gs \minor
>>\clef treble
>>\relative c' {
>>  \override PhrasingSlur.direction = #UP
>>  b \( cs d\) |
>>  d\( \change Staff = "lh" \stemUp {b  \) }|
>>}
>>  }

>>  \new Staff = "lh" {
>>\time 3/4
>>\key gs \minor
>>\clef bass
>>\relative c
>>{
>>  <<
>>{ \crossStaff {f4~ f4 f4 | g} s s | }
>>\\
>> % comment out the next line and it works
>>{ \octaveCheck g, g2 g4 | 2 4 |}
>>\\
>>{
>>  \octaveCheck f
>> % next line makes no difference
>> \once \override Beam.beamed-stem-shorten = #'(0.3 0.3 0)
>>  \stemDown f8[ \stemUp b,~]
>>  \stemDown b[ b] \stemDown f'[ \stemUp b,] |
>>  \stemDown g'8[ \stemUp d]_~ \stemDown d[ g_~] g \stemUp d]
>>}
>>  >>

>>}
>>  }
>>>>
>>  }
>> }

>> Regards,

>> Peter
>> mailto:lilyp...@ptoye.com
>> www.ptoye.com <http://www.ptoye.com>


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

> -- next part --
> An HTML attachment was scrubbed...
> URL:
> <http://lists.gnu.org/archive/ht

Stanza "number" alignment

2016-12-19 Thread Br. Samuel Springuel
In the following snippet, is there a way to set the alignment of the 
"℟." so that it always appears after the barline, rather than under it. 
I expect more space needs to be added to the bar in which it appears for 
this to happen.


Also, is there a way to eliminate the need for the "." to make the lyric 
extender appear?


\version "2.19.53"

#(ly:set-option 'relative-includes #t)
\version "2.19.53"
\language "english"

global = { \key g \major }

music = {
a'4 g'2 g'4 g' f-sharp' e' g' \bar "|"
g' f-sharp'( g') e' f-sharp' g' \bar ":|."
}

words = \lyricmode {
\set stanza = \markup "℣." "." __ _ we pray to the Lord.
\set stanza = \markup "℟." O Lord, hear our paryer.
}

\new Staff
<<
\new Voice = "mel" { \global \music }
\new Lyrics \lyricsto "mel" { \words }
>>
--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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


Re: Problems engraving some unbeautiful music

2016-12-19 Thread Rutger Hofman
And using Urs' suggestion for voiceFour, and some force-hshift and 
forcing of beam positions, I get the following (attached).


Rutger

\version "2.19.0"

\score {
\new PianoStaff \with {
\consists #Span_stem_engraver
} <<
\new Staff = "up" <<
\relative c'' {
\time 3/4
\voiceOne
b,4( c d) |
d( \change Staff = down b ) |
}
>>
\new Staff = "down" <<
\clef bass
\new Voice \relative c {
\voiceFour
\override NoteColumn.force-hshift = #0
g2 g4 |
2 4 |
}
\new Voice \relative c {
\crossStaff {
\voiceOne
f4~ f f |
g
}
}
\new Voice \relative c {
\voiceTwo
\once \override Beam.positions = #'(-1 . 1)
\stemDown f8 \stemUp b,~
\stemDown b[ b]
\once \override Beam.positions = #'(-1 . 1)
f' \stemUp b, |
\once \override Beam.positions = #'(0 . 2)
\stemDown g' \stemUp d~ \stemDown d[ g]~
\once \override Beam.positions = #'(0 . 2)
g \stemUp d |
}
>>
>>
}


On 19-12-16 12:04, Urs Liska wrote:

What about the attached?

This makes the lower voice \voiceTwo, the middle voice \voiceFour and
keeps all the stems downward.

Additionally one would have to move the inner voice a little bit to the
right so it doesn't touch the lower one.

Just an idea

Urs


Am 19.12.2016 um 11:51 schrieb Peter Toye:

Problems engraving some unbeautiful music I'm trying to engrave the
attached score fragment, but can't work out how to get it right. I
agree with LP that it's not beautiful, but that's what the composer wrote.

The snippet below is as far as I've got, but there are too many
clashes (not surprising). So the cross-staff chords aren't working and
it's not merging the RH crochet (1/4 note) and quaver (1/8 note)
noteheads. If you comment out the LH 2nd voice, the remaining voices
work OK.

I suspect that shortening the stem of the LH 1st voice quavers to get
them out of the way of the 2nd voice would help, but I can't see how
to do this. I tried overriding the beamed-stem-shorten property (not
very explicitly documented in the Internals manual) but this made no
difference.

\version "2.19.52"
\language "english"
\layout {
 \context {
   \PianoStaff
   \consists #Span_stem_engraver
 }
}

{
 \new PianoStaff {
   <<
 \set PianoStaff.instrumentName = #"Piano"
 \new Staff = "rh" {
   \time 3/4
   \key gs \minor
   \clef treble
   \relative c' {
 \override PhrasingSlur.direction = #UP
 b \( cs d\) |
 d\( \change Staff = "lh" \stemUp {b  \) }|
   }
 }

 \new Staff = "lh" {
   \time 3/4
   \key gs \minor
   \clef bass
   \relative c
   {
 <<
   { \crossStaff {f4~ f4 f4 | g} s s | }
   \\
% comment out the next line and it works
   { \octaveCheck g, g2 g4 | 2 4 |}
   \\
   {
 \octaveCheck f
% next line makes no difference
\once \override Beam.beamed-stem-shorten = #'(0.3 0.3 0)
 \stemDown f8[ \stemUp b,~]
 \stemDown b[ b] \stemDown f'[ \stemUp b,] |
 \stemDown g'8[ \stemUp d]_~ \stemDown d[ g_~] g \stemUp d]
   }
 >>

   }
 }
   >>
 }
}

Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com 


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






toye-cross-staff.pdf
Description: toye-cross-staff.pdf
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Better slashed graces

2016-12-19 Thread Gilberto Agostinho
Hi all,

I just discovered a bug with my function above. It turns out the function
works well when there are two of more notes inside the \slashedGrace{}, but
when a single note is there the file does not compile. I believe I need a
conditional somewhere to take care of this but I don't really know how to
implement it, would anyone be able to give me a hand? Example of a
problematic case:  slash-bug.ly
  

Thanks a lot,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Better-slashed-graces-tp184292p198182.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: Problems engraving some unbeautiful music

2016-12-19 Thread Urs Liska
What about the attached?

This makes the lower voice \voiceTwo, the middle voice \voiceFour and
keeps all the stems downward.

Additionally one would have to move the inner voice a little bit to the
right so it doesn't touch the lower one.

Just an idea

Urs


Am 19.12.2016 um 11:51 schrieb Peter Toye:
> Problems engraving some unbeautiful music I'm trying to engrave the
> attached score fragment, but can't work out how to get it right. I
> agree with LP that it's not beautiful, but that's what the composer wrote.
>
> The snippet below is as far as I've got, but there are too many
> clashes (not surprising). So the cross-staff chords aren't working and
> it's not merging the RH crochet (1/4 note) and quaver (1/8 note)
> noteheads. If you comment out the LH 2nd voice, the remaining voices
> work OK.
>
> I suspect that shortening the stem of the LH 1st voice quavers to get
> them out of the way of the 2nd voice would help, but I can't see how
> to do this. I tried overriding the beamed-stem-shorten property (not
> very explicitly documented in the Internals manual) but this made no
> difference.
>
> \version "2.19.52"
> \language "english"
> \layout {
>  \context {
>\PianoStaff
>\consists #Span_stem_engraver
>  }
> }
>
> {
>  \new PianoStaff {
><<
>  \set PianoStaff.instrumentName = #"Piano"
>  \new Staff = "rh" {
>\time 3/4
>\key gs \minor
>\clef treble
>\relative c' {
>  \override PhrasingSlur.direction = #UP
>  b \( cs d\) |
>  d\( \change Staff = "lh" \stemUp {b  \) }|
>}
>  }
>
>  \new Staff = "lh" {
>\time 3/4
>\key gs \minor
>\clef bass
>\relative c
>{
>  <<
>{ \crossStaff {f4~ f4 f4 | g} s s | }
>\\
> % comment out the next line and it works
>{ \octaveCheck g, g2 g4 | 2 4 |}
>\\
>{
>  \octaveCheck f
> % next line makes no difference
> \once \override Beam.beamed-stem-shorten = #'(0.3 0.3 0)
>  \stemDown f8[ \stemUp b,~]
>  \stemDown b[ b] \stemDown f'[ \stemUp b,] |
>  \stemDown g'8[ \stemUp d]_~ \stemDown d[ g_~] g \stemUp d]
>}
>  >>
>
>}
>  }
>>>
>  }
> }
>
> Regards,
>
> Peter
> mailto:lilyp...@ptoye.com
> www.ptoye.com 
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user



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


Problems engraving some unbeautiful music

2016-12-19 Thread Peter Toye
I'm trying to engrave the attached score fragment, but can't work out how to 
get it right. I agree with LP that it's not beautiful, but that's what the 
composer wrote.

The snippet below is as far as I've got, but there are too many clashes (not 
surprising). So the cross-staff chords aren't working and it's not merging the 
RH crochet (1/4 note) and quaver (1/8 note) noteheads. If you comment out the 
LH 2nd voice, the remaining voices work OK. 

I suspect that shortening the stem of the LH 1st voice quavers to get them out 
of the way of the 2nd voice would help, but I can't see how to do this. I tried 
overriding the beamed-stem-shorten property (not very explicitly documented in 
the Internals manual) but this made no difference.

\version "2.19.52"
\language "english"
\layout {
  \context {
\PianoStaff
\consists #Span_stem_engraver
  }
}

{
  \new PianoStaff {
<<
  \set PianoStaff.instrumentName = #"Piano"
  \new Staff = "rh" {
\time 3/4
\key gs \minor
\clef treble
\relative c' {
  \override PhrasingSlur.direction = #UP
  b \( cs d\) |
  d\( \change Staff = "lh" \stemUp {b  \) }|
}
  }

  \new Staff = "lh" {
\time 3/4
\key gs \minor
\clef bass
\relative c
{
  <<
{ \crossStaff {f4~ f4 f4 | g} s s | }
\\
% comment out the next line and it works
{ \octaveCheck g, g2 g4 | 2 4 |}
\\
{
  \octaveCheck f
% next line makes no difference
\once \override Beam.beamed-stem-shorten = #'(0.3 0.3 0) 
  \stemDown f8[ \stemUp b,~] 
  \stemDown b[ b] \stemDown f'[ \stemUp b,] |
  \stemDown g'8[ \stemUp d]_~ \stemDown d[ g_~] g \stemUp d]
}
  >>

}
  }
>>
  }
}
 
Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: convert-ly oddities

2016-12-19 Thread Peter Toye
Thomas,

Thanks - I've just found the version number issue hidden in the Usage manual!

But the double newline issue is still an annoyance - it seriously reduces the 
amount of text I can get on a screen. I've looked at the files with a hex 
editor and it's interesting. I'm using Frescobaldi to generate the files, and 
it seems that this uses only hex 0A as a line delimiter (very Unix). Convert-ly 
replaces this with hex 0A 0A. But it's not consistent, and I don't recall this 
happening in previous conversions. The snippets below show the differences. I'd 
like to report this as a bug, but the link to gmane on the LP website is broken.

\version "2.18.2"
\score {

  \layout {}
  \midi {}
}

\version "2.19.49"
\score {


  \layout {}

  \midi {}
}


%{
convert-ly.py (GNU LilyPond) 2.19.52  convert-ly.py: Processing `'...
Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.40, 2.19.46, 2.19.49
%}


Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Sunday, December 18, 2016, 2:45:37 PM, you wrote:

> 2016-12-18 15:08 GMT+01:00 Peter Toye :
>> Thomas,

>> Thanks. It just looks odd that the convert.ly issued with .52 only updates
>> to .49

> This is a misunderstanding.

> convert-ly from lilypond-2.19.52 _does_ update to 2.19.52.
> Or more precisely: all syntax-changes for which a convert-rule exist
> are applied up to 2.19.52.
> It does not change the version-statement of your file to the
> lilypond-version of convert-ly you actually use, but to the version of
> the latest convert-rule.

> In general, convert-ly converts syntax of ly-files to be compilable
> with the LilyPond-version matching the version of convert-ly.
> There is no need to change the version-statement to make it compile
> with 2.19.52 at all. You could even compile a very old 2.12.3-file
> with 2.19.52 (granted the syntax of the old file will work).
> The reason to change the version-statement to the version of the
> latest convert-rule is more to issue an error, if a converted file is
> compiled with an older ly-version, like:
> error: program too old: 2.16.2 (file requires: 2.19.52)

> Cheers,
>   Harm___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Typesetting "ornaments" with parallel voices when using accordion push spanner

2016-12-19 Thread Mojca Miklavec
Hi,

I would like to typeset some scores where only the main melody is obligatory:

\language "deutsch"

global = {
\time 3/4
\key f \major
}

melody = \fixed c' {
\global
2.~ |
2. |
}

while one could optionally add some ornaments:

\fixed c' {
s4 g4. a8 |
b2. |
}

and I would like to mark that "optionality" in whatever way is
reasonable to do so.


I was thinking of using grace notes (they are supposed to be
ornaments), so I started with

melody = \fixed c' {
\global
\afterGrace 2.~ { g4. a8 } |
2. | % b2. still missing
}

but the resulting MIDI sounds weird. It looks as if grace notes are
really meant as something that is as short as possible and "doesn't
take any time". (Otherwise the visual result is kind-of OK.)


I next tried to follow instruction for parallel voices, but the
following doesn't seem to work, the second voice seems to interfere
with the first one, note heads change direction and properties etc.:

  \version "2.19.30"
  \language "deutsch"

  global = {
\time 3/4
\key f \major
  }

  rhythm = {
\global
\repeat unfold 3 { c4 c c | }
  }

  melody = \fixed c' {
\global
<<
  {
\voiceOne
2.~ |
2. |
  }
  {
% This seems to change the first one as well
\voiceTwo
% I would like a simple command so switch the style, but only
the colour,
% potentially the size, not to the super ugly shape
% \voiceOneStyle
%
% dots should be coloured as well
\override NoteHead.color = #blue
\override Stem.color = #blue
r4 g4. a8 |
b2. |
\override NoteHead.color = #black
\override Stem.color = #black
  }
>> \oneVoice
4   |
  }
  \score {
  \new PianoStaff <<
  \new Voice = "melody" {
\set Staff.midiInstrument = "accordion"
\melody
  }
  \new RhythmicStaff {
\rhythm
  }
>>
  }


Creating a new voice helped:

melody = \fixed c' {
  \global
  <<
{
  \voiceOne
  2.~ |
  2. |
}
\new Voice {
  \voiceTwo
  % dot should be blue as well
  \override NoteHead.color = #blue
  \override Stem.color = #blue
  r4 g4. a8 |
  b2. |
}
  >> \oneVoice
  %\startPush
  4   |
  %\stopPush
}

but it seems to interfere with accordion push spanner (as implemented
for me by David Nalesnik, so I'm not sure how to "fix" that code).

\score {
\new PianoStaff <<
\new Voice = "melody" {
  \set Staff.midiInstrument = "accordion"
  \melody
}
\new AccordionPushPull \with {
  \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
} {
  \melody
}
\new RhythmicStaff {
  \rhythm
}
  >>
}

I could probably work around the problems mentioned above by defining
a completely independent second voice, but that will be a lot more
error-prone.

Is there a way to fix the interference between a new voice and the push spanner?

I tried to come up with as minimal example as possible, but I wouldn't
know how to further shrink the code from accordion.ily.

Thank you,
Mojca

(Please CC me.)


accordion.ily
Description: Binary data


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