Re: Octave shifts in polyphonic setting

2018-09-28 Thread Simon Albrecht

On 25.09.2018 21:13, Jogchum Reitsma wrote:

Hi,

When entering a piece of music with some one-, some two- and some 
three-voiced bars, quite often notes in previous bars go up or down an 
octave, when entering new bars.
Restoring this from the first bars affected by adding or deleting 
apostrophes or comma's, sometimes lead again to side effects. Rather 
frustrating...


In the repertoire that I normally typeset, relative mode is still the 
way to go, because small intervals prevail. I find that there are enough 
tools to make it manageable and diminish the nuisance:
1) Octave checks, as often as necessary. The beginning of each voice in 
a polyphonic construct is an obvious candidate, as are new entries after 
long rests. The more large intervals occur, the more octave checks. This 
is something I adjust as needed.
2) \resetRelativeOctave is an exceptionally useful command easily 
overlooked, especially in situations like you describe.
3) Use more individual \relative commands, i.e. move \relative as close 
to the music as possible.

<< \relative {} \\ \relative {} >>
is less error-prone than
\relative { … << {} \\ {} >> … }.
Of course this isn’t practical in piano music where very many <<>> 
constructs are needed.

4) Don’t use lots of <<\\>> constructs, but instead something like
<<
  \new Voice {
    % oneVoice music
  }
  \new Voice {
    \voiceOne
    %…
  }
  \new Voice {
    \voiceTwo
    %…
  }
>>
along with copious spacer rests to bridge over the sections with other 
‘voicings’.
This requires quite some planning ahead and again isn’t applicable to 
every kind of music.


HTH, Simon

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


Re: Weird parentheses

2018-09-28 Thread David Sumbler
-Original Message-
From: Thomas Morley 
To: Noeck , David Sumbler 
CC: lilypond-user 
Subject: {SPAM 01.0} Re: Weird parentheses
Date: Mon, 24 Sep 2018 23:12:04 +0200

2018-09-24 9:04 GMT+02:00 Noeck :
> Dear David,
> 
> I might be wrong, but I think it is some font problem.

Most likely, I'd say.

Could you try:

\version "2.19.81"

#(define ((time-parenthesized-time up down upp1 downp1 upp2 downp2)
grob)
   (grob-interpret-markup grob
 (markup
 #:override '(baseline-skip . 0)
 #:override '(font-name . #f)
 #:override '(font-encoding . fetaText)
 #:number
   (#:line (
   (#:center-column (up down))
   #:vcenter "("
   (#:center-column (upp1 downp1))
   #:lower 0.5 "+"
   (#:center-column (upp2 downp2))
   #:vcenter ")" )



\new Staff {
  \override Staff.TimeSignature #'after-line-breaking =
  #(lambda (grob)
(newline)
(pretty-print
  (ly:stencil-expr
(ly:grob-property grob 'stencil

  \override Staff.TimeSignature #'stencil =
#(time-parenthesized-time "21" "8" "12" "8" "9" "8")

  R1
}

The added code in `time-parenthesized-time` should make the markup
discard any font-name-setting you may have done before and forces it
to use 'fetaText.

The additional 'after-line-breaking-override displays the
stencil-expression in terminal.
It's a long list.
Of interest is for example the last section. Because font-name is #f
and font-encoding is 'fetaText a fall-back-font should be used, iiuc.
In my case it's "DejaVuSans":
[...]
  (translate-stencil
(12.4918393700787 . 0.0)
(translate-stencil
  (0.0 . -1.28037401574803)
  (translate-stencil
(0.0 . 0.0)
(glyph-string
  #
  "DejaVuSans"   <--
  7.029296875
  #f
  '((1.57059212598425
 (-0.512149606299213 . 3.07289763779528)
 0.0
 0.0
 "parenright")))

What's displayed for you?


Cheers,
  Harm

Firstly, thank you to all for the various responses to my original
post.  I have been away from home until today, so this is the first
opportunity I have had to look at the problem further.

I am using Lilypond 2.19.82 on Ubuntu 18.04.  I usually generate
Postscript files and display them as I work.

I now discover that if I generate PDF files instead they appear
correctly.  Whether I compile under Ubuntu 16.04 or Ubuntu 18.04, the
resulting PDF files display correctly under both OS versions, whereas
the PS files display correctly under 16.04 but incorrectly under 18.04.

It doesn't seem to depend on the program used to display them: both
Evince (document viewer) and GIMP show the PS files incorrectly in
Ubuntu 18.04.  They also print incorrectly.

I suppose that this must be due to an error in whatever underlying
software is interpreting the PS files, assuming that Evince and GIMP
use the same interpreter.  I can't see that it can be an error in
Lilypond's compilation, because I get the same result compiling in both
versions of Ubuntu - yet only 18.04 displays and prints the results
incorrectly (no matter which Ubuntu version was used to compile).

In answer to Harm's final question, under both OS versions the font
shown is "Bitstream Vera Sans-Roman".

For now, the practical answer seems to be for me to check my work by
generating PDF files, rather than PostScript.

Of course, I'd be interested to receive any further observations and
suggestions.

David





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


Re: add vertical space to ottava

2018-09-28 Thread Ben


On 9/28/2018 12:17 PM, Ryan Michael wrote:
Hello, So I know how to change the priority of the ottava such that it 
appears on the outside of other elements of the system. However, in my 
case, I simply want to increase the vertical space between the ottava 
in the other elements. How do I accomplish this? I have tried 
something like

%%%
\version "2.19.82"
\offset Y-offset 20
\ottava #1
d2 d2 d2 d2
\ottava #0
d,2 d,2 d,2 d,2
%

Thank you for the help!
Ryan.



Hi Ryan,

You could adjust the offset values to taste...

%%%

\version "2.19.82"

{
 \override Staff.OttavaBracket.extra-offset = #'(0 . 2)
\ottava #1
d2 d2 d2 d2
\ottava #0
d,2 d,2 d,2 d,2

}
%

Does that get you started? :)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


add vertical space to ottava

2018-09-28 Thread Ryan Michael
Hello, So I know how to change the priority of the ottava such that it
appears on the outside of other elements of the system. However, in my
case, I simply want to increase the vertical space between the ottava in
the other elements. How do I accomplish this? I have tried something like
%%%
\version "2.19.82"
\offset Y-offset 20
\ottava #1
d2 d2 d2 d2
\ottava #0
d,2 d,2 d,2 d,2
%

Thank you for the help!
Ryan.


-- 
ॐ नमः शिवाय
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Can't convert to PNG or HTML

2018-09-28 Thread David Price
I am getting the following error message when trying to convert to a PNG or 
HTML (Lilypond v 2.18.2-1 on a Mac, if that makes a difference). The libgs, 
called by gs, can't be found because there is no folder called sobin.The libgs 
is in the lib folder.

I checked LilyIssues on Sourceforge and found a similar issue but it is from 
2010.

Any current work-around?


Converting to PNG...dyld: Library not loaded: ./bin/../sobin/libgs.8.70.dylib
  Referenced from: /Applications/LilyPond.app/Contents/Resources/bin/../bin/gs
  Reason: image not found

fatal error: GS exited with status: 6
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Frescobaldi Log Error -1073741819 on Windows10

2018-09-28 Thread Peter Gentry
Hello Andrew

 

I am sure my issue is neither Frescobaldi or Lilypond related. It is due to 
some alteration to the file permissions structure on the PCs which showed 
itself after a Windows update. It may or may not be due to the update. 

I managed to restore functionality on the laptop via a system restore. This has 
not been possible on the Desktop. I had been attempting to mess with 
permissions on that machine and this may have prevented the restore.

 

In any event I am sure the problems are not related to Lily/Fresco.

 

Thanks for all the valued suggestions.

 

From: Andrew Bernard  
Sent: 28 September 2018 06:05
To: Peter Gentry 
Cc: lilypond-user Mailinglist 
Subject: Re: Frescobaldi Log Error -1073741819 on Windows10

 

Hi Peter,

 

Not sure if this is helpful at this stage, but with lilypond 2.19.82 and 
Frescobaldi 3.0.1 on Windows 10 version1803 (OS Build 17134.320) all works fine.

 

Sometimes it helps to know all is working for somebody else. My result would 
tend to indicate it is a local problem for you.

 

Are you installing all the W10 updates? There was one just this morning. I find 
it is pretty important to be up to the minute for all sorts of reasons.

 

 

Andrew

 

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


Re: Color noteheads according to their duration

2018-09-28 Thread Aaron Hill

On 2018-09-27 10:54 pm, Federico Bruni wrote:

Il giorno gio 27 set 2018 alle 21:29, Tim Meier 
ha scritto:

Hello,

unfortunately I'm not that well versed in the lillypond/scheme syntax. 
What I want to do is basically this (in pseudocode):


if (noteDuration is quarter) => make noteHead blue
if (noteDuration is half) => make noteHead red
...

Can someone tell me how I would write that in Scheme?





You may adapt this snippet to work on durations instead of pitches:
http://lilypond.org/doc/v2.19/Documentation/snippets/pitches#pitches-coloring-notes-depending-on-their-pitch

IMO a new coloring-notes-depending-on-their-duration.ly file should be
added to the Snippets manual if someone comes up with the required
code.


Here's a quick adaptation:


\version "2.19.82"

#(define color-mapping
  (list
(cons (ly:make-duration -1 0 1 1) (x11-color 'red))
(cons (ly:make-duration 0 0 1 1) (x11-color 'orange))
(cons (ly:make-duration 1 1 1 1) (x11-color 'yellow))
(cons (ly:make-duration 2 0 1 1) (x11-color 'green))
(cons (ly:make-duration 1 0 1 1) (x11-color 'blue))
(cons (ly:make-duration 2 1 1 1) (x11-color 'violet))
(cons (ly:make-duration 3 0 1 1) (x11-color 'red))
(cons (ly:make-duration 3 1 1 1) (x11-color 'orange))
(cons (ly:make-duration 4 0 1 1) (x11-color 'yellow))
(cons (ly:make-duration 1 0 2 3) (x11-color 'green))
(cons (ly:make-duration 2 0 2 3) (x11-color 'blue

#(define (duration-equals? d1 d2)
  (and (not (ly:duration___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Baseline align in TextSpanner

2018-09-28 Thread Davide Liessi
Hi all.
I want to align TextSpanner texts to baseline.
I'm trying to use the code provided by Thomas Morley / Harm in
http://lists.gnu.org/archive/html/lilypond-user/2016-10/msg00365.html
which works very well e.g. with \tempo, but applying \test to
TextSpanner.bound-details.left.text has no effect.
I also tried replacing ly:line-spanner::print in TextSpanner.stencil
with a new function but I couldn't make it work.
An example follows, including Harm's code.
Is there a way to adapt it to my case?
Best wishes.
Davide

\version "2.19.82"

#(define (lists-map function ls)
   "Apply @var{function} to @var{ls} and all of it sublists.
First it recurses over the children, then the function is applied to
@var{ls}."
   (if (list? ls)
   (set! ls (map (lambda (y) (lists-map function y)) ls))
   ls)
   (function ls))

#(define test-proc
   (lambda (e)
 (if (and (list? e) (member 'glyph-string e))
 (begin
  (for-each
   (lambda (x)
 (begin
  (set-car! (cadr x) 0)
  x))
   (cadr (last e)))
  e)
 e)))

#(define-markup-command (test layout props glyph-name)
   (markup?)
   (let* ((stil (interpret-markup layout props glyph-name))
  (new-stile-expr
   (lists-map
test-proc
(ly:stencil-expr stil

 (ly:make-stencil
  new-stile-expr
  (ly:stencil-extent stil X)
  ;(cons 0 (cdr (ly:stencil-extent stil Y)))
  (ly:stencil-extent stil Y)
  )))

{
  \override TextSpanner.bound-details.left.text = \markup { \test "a" }
  b2\startTextSpan b2\stopTextSpan
  \override TextSpanner.bound-details.left.text = \markup { \test "p" }
  b2\startTextSpan b2\stopTextSpan
}

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