Re: Increase distance from staff for dynamics

2016-09-10 Thread B~M
Simon is there a similar command which fixes the padding for text spanners,
or does the command you posted do that anyway ?

Paul

On Sunday, September 11, 2016, Simon Albrecht 
wrote:

> Hi Thiago,
>
>
> On 11.09.2016 00:30, Nao Nao wrote:
>
>> Hi,
>> I'm new to lilypond and I would like to know how to increase the distance
>> between the dynamics markups and the staff. Tried the command below (and a
>> lot similar) but no success. Any ideas?
>>
>> \version "2.18.2"
>>
>> \relative c' {
>>   \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #5
>>   f d \mp f d | f\< e f e\! |
>> }
>>
>
> This would only work if the dynamics were in a Dynamics context of their
> own (and then you should place the command in a \with block for the
> Dynamics context). Here, however, they live inside the Staff. Try this:
>
> \version "2.18.2"
>
> \relative c' {
>   \override DynamicLineSpanner.padding = 5
>   f d \mp f d | f\< e f e\! |
> }
>
> Best, Simon
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Page numbers in ‘number’ style

2016-09-10 Thread Simon Albrecht

Hello,

I just wanted to share this idea with you: Often, the visual distinction 
between page and bar numbers, which may be very close to each other, 
poses a problem. By chance, I noticed in a reproduced volume from the 
1920’s Brahms edition that it uses a typical ‘number’ font like in time 
signatures  for the page numbers. Which is nice, because a) I like 
this kind of font, b) they’re very visually prominent and legible at 
small sizes and c) they are clearly different from bar numbers that way.


So my standard style sheet now features these lines (adjusted from 
ly/titling-init.ly):



\paper {
  oddHeaderMarkup = \markup
  \fill-line {
""
\on-the-fly #not-part-first-page \fromproperty #'header:instrument
\on-the-fly #print-page-number-check-first \number \fromproperty 
#'page:page-number-string

  }

  %% evenHeaderMarkup would inherit the value of
  %% oddHeaderMarkup if it were not defined here
  evenHeaderMarkup = \markup
  \fill-line {
\on-the-fly #print-page-number-check-first \number \fromproperty 
#'page:page-number-string

\on-the-fly #not-part-first-page \fromproperty #'header:instrument
""
  }
}
%

Best, Simon

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


Re: Increase distance from staff for dynamics

2016-09-10 Thread Simon Albrecht

Hi Thiago,


On 11.09.2016 00:30, Nao Nao wrote:

Hi,
I'm new to lilypond and I would like to know how to increase the 
distance between the dynamics markups and the staff. Tried the command 
below (and a lot similar) but no success. Any ideas?


\version "2.18.2"

\relative c' {
  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #5
  f d \mp f d | f\< e f e\! |
}


This would only work if the dynamics were in a Dynamics context of their 
own (and then you should place the command in a \with block for the 
Dynamics context). Here, however, they live inside the Staff. Try this:


\version "2.18.2"

\relative c' {
  \override DynamicLineSpanner.padding = 5
  f d \mp f d | f\< e f e\! |
}

Best, Simon

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


Re: Using .info documentation in emacs

2016-09-10 Thread Kevin Barry
OK so I downloaded the tarball from the lilypond website and added the
info directory to the Info-default-directory-list, but that didn't
work, even after adding all of Hwaen's suggested entries to the dir
file (is there a reason this is empty?).

I can manually open the dir file with Info and I can follow menu
entries, but images don't appear and the normal info navigation
doesn't work properly. I don't know what I'm doing wrong.

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


Increase distance from staff for dynamics

2016-09-10 Thread Nao Nao
Hi,
I'm new to lilypond and I would like to know how to increase the distance
between the dynamics markups and the staff. Tried the command below (and a
lot similar) but no success. Any ideas?

\version "2.18.2"

\relative c' {
  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #5
  f d \mp f d | f\< e f e\! |
}

Good weekend for all!
Thiago
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Version 2.18 vs.2.19 speed and W10

2016-09-10 Thread tisimst
Just thought I'd add my two cents. I'm using Windows 8 and I only see a small
speed increase between older versions and 2.19.47.

Using:

\repeat unfold 200 { \tuplet 5/4 { c'4 d' e' f' g' } }

and compiling in "publish" mode (i.e., no point-and-click links) I get the
following results:

2.18.2 - 6.5 seconds
2.19.36 - 2.7 seconds
2.19.47 - 3.0 seconds

FWIW,
Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Version-2-18-vs-2-19-speed-and-W10-tp194256p194420.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: Tags and chord repetition

2016-09-10 Thread Simon Albrecht

On 10.09.2016 20:38, Peter Crighton wrote:
I came upon some unexpected behaviour when using a tag on, for 
example, a markup that is attached to a chord repetition symbol (see 
below).
How can I fix this, so only the markup and not also the chord 
repetition symbol gets tagged?


Sorry, no idea. I’d almost say it’s a bug.

Best, Simon

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


Re: Using .info documentation in emacs

2016-09-10 Thread Kevin Barry
Thank you for responding.

> Did you restart Emacs?  There are also key sequences for rereading the
> info file but I did not look at them.

Yes but that didn't help.

>
> If that doesn't help, obviously the provided lilypond-doc package is
> broken.

If I point info to the dir file with C-u then it will load the
lilypond entries (although the images didn't appear). I will try
downloading the info docs off the web and using those and see if that
works.

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


Re: calculation of the total duration of a score

2016-09-10 Thread Thomas Morley
Hi Paul,

many thanks for looking into it and adding a diff, much easier to
compare the versions. :)

2016-09-10 20:08 GMT+02:00 Paul :
> On 09/09/2016 05:27 PM, Thomas Morley wrote:
>
>> Attached you'll find a different version.
>
>
> I noticed that text-only tempos (\tempo "Andante") caused problems. See
> attached revision which fixes this.

Good catch, I overlooked this.
Also for the insufficient
  (if duration-marks
which was kept from an earlier version. Ofcourse your correction is
the way to go.

> It also has improved code for detecting
> a missing initial tempo (to then supply the default one).  See attached diff
> file for changes.

You asked:
2016-09-10 16:40 GMT+02:00 Paul :

> Also, I wonder, where you clear out these variables at the end of the
> finalize stage:
>
>  (set! evts '())
>  (set! last-evt #f)
>  (set! tempo-change-evts '())
>  (set! duration-marks '())
>
> Of course, it doesn't hurt, but is it necessary?  If so I need to do that in
> my code.

Well, at first it's a matter of code-hygiene. Those variables were
filled by the engraver doing it's work, why not clear them?
Additional I fear bleeding over, if the same engraver is used while
compiling multiple scores/files. Or if he is put into multiple
contexts of the same score.
Not entirely sure about this, but better be a paranoiac ;)


Thanks for your thorough review.
I think I'll follow your suggestion and put it in the LSR.


Best,
  Harm

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


Tags and chord repetition

2016-09-10 Thread Peter Crighton
Hello all,

I came upon some unexpected behaviour when using a tag on, for example, a
markup that is attached to a chord repetition symbol (see below).
How can I fix this, so only the markup and not also the chord repetition
symbol gets tagged?


\version "2.19.47"

x = \tag #'tabstaff ^x

music = \relative c {
  c4 c c c\x
 \x
  q q q q\x
}

\new StaffGroup <<
  \new Staff \keepWithTag #'staff <<
\clef "treble_8"
\music
  >>
  \new TabStaff \keepWithTag #'tabstaff <<
\tabFullNotation
\music
  >>
>>


Cheers,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: calculation of the total duration of a score

2016-09-10 Thread Paul

On 09/09/2016 05:27 PM, Thomas Morley wrote:


Attached you'll find a different version.


I noticed that text-only tempos (\tempo "Andante") caused problems. See 
attached revision which fixes this.  It also has improved code for 
detecting a missing initial tempo (to then supply the default one).  See 
attached diff file for changes.


Cheers,
-Paul
\version "2.19.47"

printScoreDuration = {
  \once \override Score.RehearsalMark.direction = #DOWN
  \once \override Score.RehearsalMark.self-alignment-X = #RIGHT
  \mark "print-score-duration"
}

formatScoreDuration =
#(define-scheme-function (dur)(exact?)
   "Returns the given duration as a formated markup containing minutes and
seconds."
   (let* ((minutes (floor dur))
  ;; Is using floor correct?
  (seconds (floor (* (- dur minutes ) 60)))
  (duration-string
   (format #f "Duration: ~a:~2,,,'0@a" minutes seconds)))
 #{
   \markup \rounded-box \fontsize #-3 #duration-string
 #}))

#(define (get-seconds lst rl)
   "Takes a list of kind
'((# 1/15) 
  (# 1/30) 
  (# 1/15))
Calculates the time passed between each moment.
Returns the addition of it as an exact numerical value.
  "
   (if (null? (cdr lst))
   (apply + rl)
   (get-seconds
(cdr lst)
(cons
 (* (cdr (cadr lst))
   (ly:moment-main (ly:moment-sub (caar lst) (caadr lst
 rl


#(define (score-duration-engraver context)
   (let* ((evts '())
  (last-evt #f)
  (tempo-change-evts '())
  (duration-marks '()))
 (make-engraver
  (listeners
   ((rhythmic-event engraver event)
(set! last-evt (ly:event-property event 'length))
(set! evts (cons (ly:context-current-moment context) evts)))
   ((tempo-change-event engraver event)
(let ((tempo-unit (ly:event-property event 'tempo-unit))
  (metronome-count (ly:event-property event 'metronome-count)))
  ;; Accumulate pairs of "moment when it happens" and
  ;; "quotient of tempo-unit and metronome-count"in `tempo-change-evts'
  ;; for use in `get-seconds'
  ;; text-only tempo changes like \tempo "Andante" have no tempo-unit
  (if (and tempo-unit metronome-count)
  (set! tempo-change-evts
(cons
 (cons
  (ly:context-current-moment context)
  ;; Hmm, ugly code...
  (/ (string->number (ly:duration->string tempo-unit))
metronome-count))
 tempo-change-evts))
  (acknowledgers
   ((mark-interface engraver grob source-engraver)
(let ((mark-text (ly:grob-property grob 'text)))
  (if (and (string? mark-text)
   (string=? mark-text "print-score-duration"))
  (set! duration-marks (cons grob duration-marks))
  ((finalize translator)
   (if (not (null? duration-marks))
   (let* ((moment-zero (ly:make-moment 0))
  ; add default tempo at moment zero, if one does not already exist
  (tempo-changes
   (if (or (null? tempo-change-evts)
   (not (equal? moment-zero
(car (last tempo-change-evts)
   ;; 1/15 is default tempo, could this be accessed somewhere?
   (append tempo-change-evts (list (cons moment-zero 1/15)))
   tempo-change-evts))
  (duration-before-last-tempo-change
   (get-seconds tempo-changes '()))
  (duration-after-last-tempo-change-without-last-dur
   (* (cdr (car tempo-changes))
 (ly:moment-main
  (ly:moment-sub (car evts) (caar tempo-changes)
  (last-ev-duration
   (* (cdar tempo-changes) (ly:moment-main last-evt)))
  (final-duration
   (+
duration-before-last-tempo-change
duration-after-last-tempo-change-without-last-dur
last-ev-duration)))
 (for-each
  (lambda (g)
(ly:grob-set-property! g 'text
  (formatScoreDuration final-duration)))
  duration-marks)
 (set! evts '())
 (set! last-evt #f)
 (set! tempo-change-evts '())
 (set! duration-marks '(

\layout {
  \context {
\Score
\consists \score-duration-engraver
  }
}

%%
%% EXAMPLE
%%

voiceI =
\new Voice {
  \partial 4
  c'4
  \repeat unfold 61 c'4
  \tempo 4=120
  c'2. d'2
  \tempo 8=120
  c'2~ |
  \tuplet 3/2 { c'2 2 2 }
  \tempo "Andante"
  c'2 c'2
}

voiceII = {
  \partial 4
  cis'4
  \printScoreDuration
  \repeat unfold 17 cis'1
  %% fiddling with two simultaneous RehearsalMarks...
  cis'1*31/32
  

Re: changing staff-size throughout a score

2016-09-10 Thread Kieren MacMillan
Hi Urs,

> The problem with this is (as Harm pointed out already rather at the
> beginning of this thread) that there may be elements at the wrong size
> at the changing spot.

Easily fixed.

  SNIPPET BEGINS
\version "2.19"

\header {
 tagline = ##f
}

\layout {
 indent = 0
 \context {
   \Score
   \remove "Bar_number_engraver"
   \omit TimeSignature
 }
}

{
 c'4 d' e' f' g' a' b' c''
 \once \override Score.BarLine.stencil = #ly:text-interface::print
 \once \override Score.BarLine.text = \markup \override #'(thickness . 3) 
\translate #'(0 . -2) \draw-line #'(0 . 4)
 \break
 \magnifyStaff #(magstep 3)
 \break
 \repeat unfold 13 { s1 }
}
  SNIPPET ENDS

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: changing staff-size throughout a score

2016-09-10 Thread Urs Liska


Am 10.09.2016 um 16:29 schrieb Kieren MacMillan:
> Hi Michael,
>
>> I was hoping to be able to change staff sizes within a score without the
>> bizarre kludge of creating an entirely new score everytime the staff size
>> changes.
> I’m not sure “bizarre” was a necessary descriptor… On a mailing list (such as 
> this one) where people are generously donating their time to help people who 
> post, those kinds of words can often be counterproductive.
>
> The following version does not require the creation of a new score.
>
>   SNIPPET BEGINS
> \version "2.19"
>
> \header {
>   tagline = ##f
> }
>
> \layout {
>   indent = 0
>   \context {
> \Score
> \remove "Bar_number_engraver"
> \omit TimeSignature
>   }
> }
>
> {
>   c'4 d' e' f' g' a' b' c''
>   \stopStaff \startStaff \magnifyStaff #(magstep -3)
>   \repeat unfold 13 { s1 }
> }
>   SNIPPET ENDS

The problem with this is (as Harm pointed out already rather at the
beginning of this thread) that there may be elements at the wrong size
at the changing spot. See

  SNIPPET BEGINS
\version "2.19"

\header {
  tagline = ##f
}

\layout {
  indent = 0
  \context {
\Score
\remove "Bar_number_engraver"
\omit TimeSignature
  }
}

{
  c'4 d' e' f' g' a' b' c''
  \magnifyStaff #(magstep 3)
  \break
  \key a \major
  \repeat unfold 13 { s1 }
}
  SNIPPET ENDS

When you want the second system to be empty (for someone to fill in) you
won't have the key signature, but the barline is also at the wrong size.

Urs


> I hope that helps.
> Kieren.
> 
>
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


Re: calculation of the total duration of a score

2016-09-10 Thread Paul

On 09/09/2016 05:27 PM, Thomas Morley wrote:


Attached you'll find a different version.
It avoids creating all those grobs and killing most of them in the
end. Instead a preexisting RehearsalMark (or more of them) is taken
and 'text is reset.
Some other changes for better usability.


Hi Harm,  Nice work!  I'd say this is a good candidate for the LSR, 
particularly because it demonstrates listeners, acknowledgers, and 
finalize in one engraver.


One little thing I noticed is that

  (if duration-marks

should be something like

  (if (not (null? duration-marks))

Because:

  \version "2.19.42"
  #(define empty-list '())
  #(display (if empty-list #t #f))
  % --> #t
  #(display (if (not (null? empty-list)) #t #f))
  % --> #f

Also, I wonder, where you clear out these variables at the end of the 
finalize stage:


 (set! evts '())
 (set! last-evt #f)
 (set! tempo-change-evts '())
 (set! duration-marks '())

Of course, it doesn't hurt, but is it necessary?  If so I need to do 
that in my code.


-Paul

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


Re: changing staff-size throughout a score

2016-09-10 Thread Kieren MacMillan
Hi Michael,

> I was hoping to be able to change staff sizes within a score without the
> bizarre kludge of creating an entirely new score everytime the staff size
> changes.

I’m not sure “bizarre” was a necessary descriptor… On a mailing list (such as 
this one) where people are generously donating their time to help people who 
post, those kinds of words can often be counterproductive.

The following version does not require the creation of a new score.

  SNIPPET BEGINS
\version "2.19"

\header {
  tagline = ##f
}

\layout {
  indent = 0
  \context {
\Score
\remove "Bar_number_engraver"
\omit TimeSignature
  }
}

{
  c'4 d' e' f' g' a' b' c''
  \stopStaff \startStaff \magnifyStaff #(magstep -3)
  \repeat unfold 13 { s1 }
}
  SNIPPET ENDS

I hope that helps.
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: changing staff-size throughout a score

2016-09-10 Thread Paul

Looks like \stopStaff and \startStaff aren't needed.  -Paul

\version "2.19.42"

\relative c' {
  c d e f
  \break
  \magnifyStaff #2
  c d e f
  \break
  \magnifyStaff #1
  c d e f
}

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


Re: changing staff-size throughout a score

2016-09-10 Thread Paul

On 09/10/2016 10:04 AM, Michael Rivers wrote:


I was hoping to be able to change staff sizes within a score without the
bizarre kludge of creating an entirely new score everytime the staff size
changes. Many apologies for being unclear.


How about this?  (Hmmm... the barlines are the wrong size at the 
transition points.)  -Paul


\version "2.19.42"
\relative c' {
  c d e f
  \break
  \stopStaff
  \magnifyStaff #2
  \startStaff
  c d e f
  \break
  \stopStaff
  \magnifyStaff #1
  \startStaff
  c d e f
}

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


Re: changing staff-size throughout a score

2016-09-10 Thread Michael Rivers
I was hoping to be able to change staff sizes within a score without the
bizarre kludge of creating an entirely new score everytime the staff size
changes. Many apologies for being unclear.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/changing-staff-size-throughout-a-score-tp194304p194408.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: Using .info documentation in emacs

2016-09-10 Thread David Kastrup
Kevin Barry  writes:

> Hi all,
>
> I have installed the lilypond-doc package on my system (Fedora), but
> it didn't add anything to the main info directory.

Did you restart Emacs?  There are also key sequences for rereading the
info file but I did not look at them.

If that doesn't help, obviously the provided lilypond-doc package is
broken.

-- 
David Kastrup

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