Re: Instructing fretboard-diagram-verbose to space frets proportionally rather than equadistantly

2020-04-09 Thread Torsten Hämmerle
I like the idea and have of having naturally spaced frets in fret diagrams.

As Aaron has already pointed out, the current implementation always uses

  fret-distance * fret

for positioning objects and calculating the length of the strings.
fret-distance is the distance between frets and fret is the fret number.

I've now replaced all these cases by a function

  (fret-position fret)

that will calculate the actual (non-linear) position depending on the fret
number (fret is an argument passed over to the function).

The calculations are based on the assumption that each bar represents a
half-tone step.
Using exponential functions, the "fret number" can even take any
intermediate value so that all placements of objects (dots, barrés, capos,
etc.) in between fretbars will smoothly adapt to the nonlinear scale. 

There's a new Boolean detail *property* called *proportional-frets* that can
be set if you want proportionally spaced frets.  The default setting is
"false" and the new fret-position function will behave just as linear as it
has always done.

Here's a short example of what the result looks like.


 

I think I'll open up an issue and upload this patch.
It should be available soon in LilyPond 2.21.1, I guess.

Cheerio,
Torsten

Fret-diagram-proportional.png

  




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Get current staff size

2020-04-09 Thread Kevin Barry
Hi Lilypond users,

Is there a way to obtain the current value of the staff size as set
with set-global-staff-size (or the layout version)?

Kevin



Re: Trying to use ly:grob-set-property!

2020-04-09 Thread Kevin Barry
Hi Aaron,

Thank you so much for the explanation - it makes more sense now.

Kevin

On Wed, 8 Apr 2020 at 21:52, Aaron Hill  wrote:
>
> On 2020-04-08 1:26 pm, Kevin Barry wrote:
> > Hi Lilypond users,
> >
> > I am trying to get something to work by setting the X-offset of a grob
> > using ly:grob-set-property but I must be doing something wrong,
> > because it seems to have no effect. Can anyone explain what I'm doing
> > wrong? Below is a minimal example showing what I mean.
> >
> > %%%
> > \version "2.19.84"
> > {
> >   \override TextScript.X-offset = 10
> >   c' ^"this is offset"
> > }
> > {
> >   \override TextScript.after-line-breaking =
> >   #(lambda (grob)
> >  (ly:grob-set-property! grob 'X-offset 10))
> >   c' ^"this isn't offset"
> > }
> > %%%
>
> If you use before-line-breaking, the change in position applies.  For
> after-line-breaking, I believe you need to use ly:grob-translate-axis!,
> which would have the same effect as using extra-offset.  But note that
> the staff lines do not extend all the way to the right because they are
> calculated with the untranslated extents.  Also see below an example of
> \offset for reference:
>
> 
> \version "2.20.0"
> {
>c' \offset X-offset 10 ^"this is offset"
> }
> {
>\override TextScript.before-line-breaking =
>#(lambda (grob)
>   (ly:grob-set-property! grob 'X-offset 10))
>c' ^"this is offset"
> }
> {
>\override TextScript.after-line-breaking =
>#(lambda (grob)
>   (ly:grob-translate-axis! grob 10 X))
>c' ^"this is offset"
> }
> 
>
>
> -- Aaron Hill



bug or feature with 'gap-count?

2020-04-09 Thread Thomas Morley
Hi,

consider the following code:

\version "2.20.0"

{
  \override Beam.gap-count = 1
  \repeat unfold 16 b16
  \override Beam.gap = 2
  \repeat unfold 16 b16
}

Obviously no tremolo is coded, though setting 'gap-count (and 'gap
relying on active 'gap-count) is respected.
IR says:
"
gap-count (integer)
Number of gapped beams for tremolo.
"
Thus at least IR is plain wrong and the question is: bug or feature?

Cheers,
  Harm



Re: Crash with bars-per-line-engraver as of LSR snippet id=838

2020-04-09 Thread Thomas Morley
Am Mi., 8. Apr. 2020 um 16:13 Uhr schrieb Michael Gerdau :
>
> Hi Kieren,
>
> >> I'm playing with the bars-per-line-engraver as of LSR
> >> http://lsr.di.unimi.it/LSR/Item?id=838
> >>
> >> When I increase the number of bars in my piece beyond a certain amount
> >> (3500-4000 in my MWE) lilypond crashes with an access violation under 
> >> linux.
> >
> > Does that also happen with David Kastrup’s "bar-keeper" engraver?
> > 
>
> Thank you for that suggestion. I had saved the code back then but forgot
> about it. Unfortunately it crashes likewise for me. See attached MWE.
>
> Kind regards,
> Michael
> --
>  Michael Gerdau   email: m...@qata.de
>  GPG-keys available on request or at public keyserver

I doubt it's caused by any custom-engraver.
At least on my machine this code:

\paper {
  systems-per-page = #5
}

music = \absolute {
\repeat unfold 2000 {
  d'8 f' a' g'  d' f' b' d' d'8 f' a' g'  d' f' b' d' \break
}
}

\new Staff { \music }

already fails with:
[...]
Preprocessing graphical objects...terminate called after throwing an
instance of 'std::bad_alloc'
  what():  St9bad_alloc
Aborted (core dumped)

on Ubuntu 64-bit 18.04 for any tested version (2.18.2 up to current master)

Cheers,
  Harm



Re: Whole-note tremolo beams

2020-04-09 Thread Thomas Morley
Am So., 22. März 2020 um 17:38 Uhr schrieb Leo Correia de Verdier
:
>
> Second attempt:
[...]

Hi,

please find attached my own take on it.

The tremolo-beam now avoids left-note-column's dots and
right-note-column accidentals automagically and is
centered around the thought line between the vertical center of the
note-heads staff-positions of left and right note-column.
Furthermore, I introduced some subproperties of Beam.details:
(1)
Beam.details.tremolo-positions, expecting a pair, defaulting to '(0 . 0)
for fine-tuning
NB Introducing details.tremolo-positions is part of the workaround. A
user set 'positions would disturb the stencil-examination. If you use
Beam.positions, you will need to figure out all the needed values.
Then the function assumes you want to Y-position the Beam yourself and
restricts it's behaviour to left/right gaps.
(2)
Beam.details.whole-note-tremolo-gaps, expecting a pair, defaulting to
'(0.5 . 0.5)
for fine-tuning the gaps

Note:
because of
https://sourceforge.net/p/testlilyissues/issues/5868/
an additional function 'correct-whole-note-tremolo-gap' is added.

In general, the function examines the default-stencil and returns a
modified one.
The first ~90 lines are debugging helpers. They may be activated
setting the boolean in line 369 to #f
Ofcourse it would be better the default would do the right thing right
from the begining...

Thus, it's a workaround, nothing more, but demonstrating how tremolo
for whole notes should come out per default imho.


Cheers,
  Harm
\version "2.20.0"


%% debugging helpers

#(define* (make-cross-stencil coords #:optional (thick 0.2) (sz 0.3))
 (ly:stencil-add
   (make-line-stencil
 thick
 (- (car coords) sz)
 (- (cdr coords) sz)
 (+ (car coords) sz)
 (+ (cdr coords) sz))
   (make-line-stencil
 thick
 (- (car coords) sz)
 (+ (cdr coords) sz)
 (+ (car coords) sz)
 (- (cdr coords) sz

#(define (beam-stencil stil)
"Add some visual debugging-aid to the given @var{stil}, which is supposed to be
a beam-stencil."
  (lambda (grob)
(let* ((sys (ly:grob-system grob))
   (left-stem (ly:spanner-bound grob LEFT))
   (right-stem (ly:spanner-bound grob RIGHT))
   (left-stem-x (ly:grob-relative-coordinate left-stem sys X))
   (right-stem-x (ly:grob-relative-coordinate right-stem sys X))
   ;; left/right NoteColumn
   (left-nc (ly:grob-parent left-stem X))
   (right-nc (ly:grob-parent right-stem X))
   ;; left NoteHeads average staff-positions
   (left-y-average 
 (get-average-staff-positions-of-note-heads left-nc))
   ;; right NoteHeads average staff-positions
   (right-y-average 
 (get-average-staff-positions-of-note-heads right-nc))
   ;(stil (ly:beam::print grob))
   (details (ly:grob-property grob 'details))
   (tremolo-positions
 (assoc-get 'tremolo-positions details '(0 . 0)))
   (beam-dir
 (if (> (ly:grob-property grob 'direction) 0)
 "UP"
 "DOWN"))
   (stil-x-ext (ly:stencil-extent stil X))
   (stil-start (car stil-x-ext))
   (stil-end (cdr stil-x-ext))
   (stil-y-ext (ly:stencil-extent stil Y))
   (stil-y-center (interval-center stil-y-ext)))
  
(ly:stencil-add
  stil
  ;; Print the Beam.direction
  (ly:stencil-translate-axis (grob-interpret-markup grob beam-dir) 4 Y)
  ;; Print a cross at point (left-stem-x-coord left-y-average-coord)
  ;; division by 2 to reflect half-staff-space unit, below as well
  (make-cross-stencil 
(cons 0 (+ (/ left-y-average 2
  ;; Print a cross at point (right-stem-x-coord right-y-average-coord)
  (make-cross-stencil 
(cons (- right-stem-x left-stem-x) (+ (/ right-y-average 2
  ;; print a blue line connecting left/right-y-average 
  (stencil-with-color
(make-line-stencil 
  0.1 
  0 (/ left-y-average 2) 
  (- right-stem-x left-stem-x) (/ right-y-average 2))
blue)
  ;; print two vertical lines at left/right edge of the given stil
  (make-line-stencil 
0.1 
stil-start (- stil-y-center 5) 
stil-start (+ stil-y-center 5))
  (make-line-stencil 
0.1 
stil-end (- stil-y-center 5) 
stil-end (+ stil-y-center 5))

#(define whole-note-stem-stencil
  (lambda (grob) 
  "Debugging-aid, print a simple vertical line for whole-note stems."
(if (zero? (ly:grob-property grob 'duration-log))
(make-line-stencil 0.1 0 -5 0 5)
ly:stem::print)))

%%
%% the code
%%

#(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

Re: Proposal: Changing tremolo beam gap implementation

2020-04-09 Thread Thomas Morley
Am Sa., 28. März 2020 um 01:11 Uhr schrieb Torsten Hämmerle
:
>
> Thomas Morley-2 wrote
> > [...] attempting to make whole-note-tremolo-beams avoid possible Dots to
> > the
> > left and possible Accidentals to the right.
>
>
> Yes, that would certainly be the next step.  Avoiding dots and accidentals.
>
> Cheers,
> Torsten

Hi Torsten,

see my code at
https://lists.gnu.org/archive/html/lilypond-user/2020-04/msg00160.html

It's ofcourse a workaround, but usable, afaict.

Cheers,
  Harm



ANN: OOoLilyPond 1.0.0

2020-04-09 Thread Klaus Blum
Hi all, 

I'm happy to announce a new version of OOoLilyPond (OLy), an extension to
include LilyPond snippets into LibreOffice/OpenOffice documents. 

There are several bugfixes and some new and hopefully cool and useful
features: 
https://github.com/openlilylib/LO-ly/releases/tag/1.0.0
Here is a presentation of all new features: 
https://github.com/openlilylib/LO-ly/wiki/Whats-new#v-100---whats-new

And finally, you can find a tutorial and a detailed documentation in the
project's wiki: 
https://github.com/openlilylib/LO-ly/wiki#ooolilypond

I hope that there are no more bugs left. If you find some, please don't
hesitate to report them. 
A big THANK YOU to all contributors and previous authors. 


Happy Easter!

Cheers, 
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



How to limit the effect of \voiceOne for certain parts of the score?

2020-04-09 Thread Bernhard Kleine
Dear all,

in Mendelssohn Bartholdy's 100th psalm, the middle part is for eight
voices while the outer parts are only for four voices. When I define
soprano voice 1 and 2 for one staff at the beginning with voiceOne and
voiceTwo, the stems and pauses for the one soprano voice are optically
unpleasing. I would like to have the effect of \voiceOne resp. \voiceTwo
only for the middle part. How to achieve this?

Thanks a lot and stay healthy and democratic!


-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

\version "2.19.82"
\language "deutsch"

\header {
  title = "Der 100. Psalm"
  composer = "Felix Mendelssohn Barthody"
  tagline = "Bermhard Kleine 2020"
}

\paper {
  #(set-paper-size "a4")
}

\layout {
  \context {
\Voice
\consists "Melody_engraver"
\override Stem #'neutral-direction = #'()
  }
 }

global = {
  \key c \major
  \time 4/4
  \autoBeamOff
}

SopranoVoiceI = \relative c'' {
  \global
  \dynamicUp
  g2\f g4 g | c2 c4 d | e1\fermata 
}

VerseSopranoVoiceI = \lyricmode {
  Jauch -- zet dem Herrn al -- le Welt!   
}

SopranoVoiceII = \relative c'' {
  \global
  \dynamicUp
  % Die Noten folgen hier.
  s1*3
}

VerseSopranoVoiceII = \lyricmode {
  % Liedtext folgt hier.
  
}

AltoVoiceI = \relative c' {
  \global
  \dynamicUp
  % Die Noten folgen hier.
  e2 e4 f | g2 g4 g | c1\fermata 
}

VerseAltoVoiceI = \lyricmode {
  % Liedtext folgt hier.
  Jauch -- zet dem Herrn al -- le Welt! 
}

AltoVoiceII = \relative c' {
  \global
  \dynamicUp
  s1*3
  
}

VerseAltoVoiceII = \lyricmode {
  % Liedtext folgt hier.
  
}


Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \addlyrics { \VerseSopranoVoiceI }

Alto = \new Staff \with {
  instrumentName = "Alt"
} <<
  \new Voice = "AI" { \voiceOne \AltoVoiceI }
  \new Voice = "AIi" { \voiceTwo \AltoVoiceII }
  >>
  \addlyrics { \VerseAltoVoiceI }


\score {
  <<
\Soprano
\Alto
  >>
  \layout { }
}


signature.asc
Description: OpenPGP digital signature


Re: How to limit the effect of \voiceOne for certain parts of the score?

2020-04-09 Thread Pierre Perol-Schneider
Hi Bernahard,
I'm not sure what you'd like to achieve...
Have you tried '\stemNeutral ?
Cheers,
Pierre

Le jeu. 9 avr. 2020 à 12:48, Bernhard Kleine  a
écrit :

> Dear all,
>
> in Mendelssohn Bartholdy's 100th psalm, the middle part is for eight
> voices while the outer parts are only for four voices. When I define
> soprano voice 1 and 2 for one staff at the beginning with voiceOne and
> voiceTwo, the stems and pauses for the one soprano voice are optically
> unpleasing. I would like to have the effect of \voiceOne resp. \voiceTwo
> only for the middle part. How to achieve this?
>
> Thanks a lot and stay healthy and democratic!
>
>
> --
> spitzhalde9
> D-79853 lenzkirch
> bernhard.kle...@gmx.net
> www.b-kleine.com, www.urseetal.net
> Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen
> (Infos bei mir)
> -
> thunderbird mit enigmail
> GPG schlüssel: D5257409
> fingerprint:
> 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
>
>


Re: lilypond score in youtube video

2020-04-09 Thread Martin Tarenskeen




On Wed, 8 Apr 2020, Valentin Villenave wrote:


On 4/8/20, Martin Tarenskeen  wrote:

I now have found my own workflow


1. I created my score using LilyPond including (among other things) this:

#(set! paper-alist (cons '("myvideo" . (cons (* 16 cm) (* 9 cm))) paper-alist))
\paper {
  #(set-paper-size "myvideo")
  top-margin = 2\cm
  left-margin = 1\cm
  right-margin = 1\cm
  page-breaking = #ly:one-line-breaking
}
\header {
  tagline = ##f
}

2. A created a one-line png image and a midifile with lilypond's --png 
output option.


3. I checked the size of the png using the "identify" command. Height was 
358 pixels, let's say 360 to make things easy. I also checked the width of 
the image.


4. I used convert (from ImageMagick) to produce a sequence of png images
https://youtu.be/I4coDW6pyU4 from this png image. Each image gets a size 
of 640 x 360 pixels (16:9 ratio), but I use horizontal shifts of 320 
pixels. The number of images will be width/320


for i in `seq 0 $number_of_images`
do
x=$((i*320))
fn=`printf img%02d.png ${i}`
convert -extract 640x360+${x}+0 oneline.png ${fn}.
done

5. I created a wav file from the midifile using Pianoteq. For other types 
of music I would probably use timidity. Using ffmpeg I converted my wav 
file to AAC (.m4a) format.


6. I then used OpenShot to import the sequence of images and the audio 
file. Openshot allows a framerate to be entered for the image sequence 
like "52 frames per 139 seconds". This way the total duration of the audio 
and the image sequence could be matched.


Another method I tried was to automatically generate a video file from an 
image-sequence using ffmpeg on the commandline. This is also a 
possibility.


7. My music was full of tempo and time changes, and some extra editing was 
required. But this gives you some idea about my workflow. The result can 
be found here, it's not perfect yet but I am learning :


https://youtu.be/I4coDW6pyU4

--

MT



Re: How to limit the effect of \voiceOne for certain parts of the score?

2020-04-09 Thread Phil Holmes

https://lilypond.org/doc/v2.19/Documentation/learning/explicitly-instantiating-voices

\oneVoice

--
Phil Holmes


- Original Message - 
From: "Bernhard Kleine" 

To: 
Sent: Thursday, April 09, 2020 11:43 AM
Subject: How to limit the effect of \voiceOne for certain parts of the 
score?



Dear all,

in Mendelssohn Bartholdy's 100th psalm, the middle part is for eight
voices while the outer parts are only for four voices. When I define
soprano voice 1 and 2 for one staff at the beginning with voiceOne and
voiceTwo, the stems and pauses for the one soprano voice are optically
unpleasing. I would like to have the effect of \voiceOne resp. \voiceTwo
only for the middle part. How to achieve this?

Thanks a lot and stay healthy and democratic!


--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09





Re: Re: How to limit the effect of \voiceOne for certain parts of the score?

2020-04-09 Thread Mats Bengtsson


On 2020-04-09 14:06, Pierre Perol-Schneider wrote:

Hi Bernahard,
I'm not sure what you'd like to achieve...
Have you tried '\stemNeutral ?
Cheers,
Pierre



Rather, use \oneVoice, see 
http://lilypond.org/doc/v2.20/Documentation/notation/multiple-voices


   /Mats




Le jeu. 9 avr. 2020 à 12:48, Bernhard Kleine > a écrit :


Dear all,

in Mendelssohn Bartholdy's 100th psalm, the middle part is for eight
voices while the outer parts are only for four voices. When I define
soprano voice 1 and 2 for one staff at the beginning with voiceOne and
voiceTwo, the stems and pauses for the one soprano voice are optically
unpleasing. I would like to have the effect of \voiceOne resp.
\voiceTwo
only for the middle part. How to achieve this?

Thanks a lot and stay healthy and democratic!


-- 
spitzhalde9

D-79853 lenzkirch
bernhard.kle...@gmx.net 
www.b-kleine.com , www.urseetal.net

Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam
machen
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09


--
=
Mats Bengtsson, Prof.
Information Science and Engineering
School of Electrical Engin. and Comp. Science
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
Email: mats.bengts...@ee.kth.se
WWW: https://www.kth.se/profile/matben/
=



Re: ANN: OOoLilyPond 1.0.0

2020-04-09 Thread Ben

On 4/9/2020 6:37 AM, Klaus Blum wrote:

Hi all,

I'm happy to announce a new version of OOoLilyPond (OLy), an extension to
include LilyPond snippets into LibreOffice/OpenOffice documents.

There are several bugfixes and some new and hopefully cool and useful
features:
https://github.com/openlilylib/LO-ly/releases/tag/1.0.0
Here is a presentation of all new features:
https://github.com/openlilylib/LO-ly/wiki/Whats-new#v-100---whats-new

And finally, you can find a tutorial and a detailed documentation in the
project's wiki:
https://github.com/openlilylib/LO-ly/wiki#ooolilypond

I hope that there are no more bugs left. If you find some, please don't
hesitate to report them.
A big THANK YOU to all contributors and previous authors.


Happy Easter!

Cheers,
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html


Klaus,

This is really wonderful. Thank you so much for working on this - it's 
great! Essential and awesome. :)





Re: How to limit the effect of \voiceOne for certain parts of the score?

2020-04-09 Thread Bernhard Kleine
Thanks a lot!

Am 09.04.2020 um 14:22 schrieb Phil Holmes:
> https://lilypond.org/doc/v2.19/Documentation/learning/explicitly-instantiating-voices
>
>
> \oneVoice
>
> -- 
> Phil Holmes
>
>
> - Original Message - From: "Bernhard Kleine"
> 
> To: 
> Sent: Thursday, April 09, 2020 11:43 AM
> Subject: How to limit the effect of \voiceOne for certain parts of the
> score?
>
>
> Dear all,
>
> in Mendelssohn Bartholdy's 100th psalm, the middle part is for eight
> voices while the outer parts are only for four voices. When I define
> soprano voice 1 and 2 for one staff at the beginning with voiceOne and
> voiceTwo, the stems and pauses for the one soprano voice are optically
> unpleasing. I would like to have the effect of \voiceOne resp. \voiceTwo
> only for the middle part. How to achieve this?
>
> Thanks a lot and stay healthy and democratic!
>
>
-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine
I have the following extract from Mendelssohn Bartholdy. I noticed that
the parentheses in measure seven were not respected and the text was
wrongly applied. When eleminating the line "  \new Voice = "SII" {
\voiceTwo \SopranoVoiceII }" the text was correct. Please can you
explain and propose a remedy?

Thank you!

\version "2.20.0"
\language "deutsch"
\header {
  title = "Der 100. Psalm"
  tagline = "Bermhard Kleine 2020"
}
\paper {
  #(set-paper-size "a4")
}
\layout {
  \context {
    \Voice
    \consists "Melody_engraver"
    \override Stem #'neutral-direction = #'()
  }
 }
global = {
  \key c \major
  \time 4/4
  \autoBeamOff
}
SopranoVoiceI = \relative c'' {
  \global
  \dynamicUp
  g2\f g4 g | c2 c4 d | e1\fermata g,4 g8 g a4 g | f2 e |
  c'4 c8 c c4 c | c (d) e c | h a g h | e2. (d4~| d ) c2 c4 | c1 |
h2.\fermata
}
VerseSopranoVoiceI = \lyricmode {
  Jauch -- zet dem Herrn al -- le Welt! Die -- net dem Herrn mit Freu --
den.
  Die -- net dem Herrn mit Freu -- den, kommt vor sein An -- ge -- sicht
mit Froh -- lok -- ken.
  Er -- ken -- net,
}
SopranoVoiceII = \relative c'' {
  \global
  \dynamicUp
  % Die Noten folgen hier.
  s1*11
}
Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \addlyrics { \VerseSopranoVoiceI }
\score {
  <<
    \Soprano
  >>
  \layout { }
}

-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Re: Strange error from \new Voice

2020-04-09 Thread Michael Gerdau
Replace \addlyrics... by \new Lyrics \lyricsto „SI“...

Kind regards,
Michael 

Mobil gesendet

> Am 09.04.2020 um 15:03 schrieb Bernhard Kleine :
> 
> I have the following extract from Mendelssohn Bartholdy. I noticed that
> the parentheses in measure seven were not respected and the text was
> wrongly applied. When eleminating the line "  \new Voice = "SII" {
> \voiceTwo \SopranoVoiceII }" the text was correct. Please can you
> explain and propose a remedy?
> 
> Thank you!
> 
> \version "2.20.0"
> \language "deutsch"
> \header {
>   title = "Der 100. Psalm"
>   tagline = "Bermhard Kleine 2020"
> }
> \paper {
>   #(set-paper-size "a4")
> }
> \layout {
>   \context {
> \Voice
> \consists "Melody_engraver"
> \override Stem #'neutral-direction = #'()
>   }
>  }
> global = {
>   \key c \major
>   \time 4/4
>   \autoBeamOff
> }
> SopranoVoiceI = \relative c'' {
>   \global
>   \dynamicUp
>   g2\f g4 g | c2 c4 d | e1\fermata g,4 g8 g a4 g | f2 e |
>   c'4 c8 c c4 c | c (d) e c | h a g h | e2. (d4~| d ) c2 c4 | c1 |
> h2.\fermata
> }
> VerseSopranoVoiceI = \lyricmode {
>   Jauch -- zet dem Herrn al -- le Welt! Die -- net dem Herrn mit Freu --
> den.
>   Die -- net dem Herrn mit Freu -- den, kommt vor sein An -- ge -- sicht
> mit Froh -- lok -- ken.
>   Er -- ken -- net,
> }
> SopranoVoiceII = \relative c'' {
>   \global
>   \dynamicUp
>   % Die Noten folgen hier.
>   s1*11
> }
> Soprano = \new Staff \with {
>   instrumentName = "Sopran"
> } <<
>   \new Voice = "SI" { \voiceOne \SopranoVoiceI }
>   \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>   >>
>   \addlyrics { \VerseSopranoVoiceI }
> \score {
>   <<
> \Soprano
>   >>
>   \layout { }
> }
> 
> -- 
> spitzhalde9
> D-79853 lenzkirch
> bernhard.kle...@gmx.net
> www.b-kleine.com, www.urseetal.net
> Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
> (Infos bei mir)
> -
> thunderbird mit enigmail
> GPG schlüssel: D5257409
> fingerprint:
> 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
> 
> 



convert-ly error

2020-04-09 Thread Thomas Scharkowski

% convert-ly
ImportError: Bad magic number in 
/Applications/Frescobaldi.app/Contents/Resources/site.pyc


LilyPond 2.20.0
LilyPond 2.19.84

macOS 10.15.4


When I use the command from Frecobaldi (3.1.1) I get the following:

arch: posix_spawnp: 
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7: 
Bad CPU type in executable


Thank you,
Thomas



Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine
this results in an error: the output is in the appendix.

Preprocessing graphical objects...

programming error: No spring between column 0 and next one

continuing, cross fingers

programming error: No spring between column 0 and next one

continuing, cross fingers

programming error: didn't find a vertical alignment in this system

continuing, cross fingers

programming error: No spring between column 0 and next one

continuing, cross fingers



Am 09.04.2020 um 15:10 schrieb Michael Gerdau:
> \new Lyrics \lyricsto „SI“

--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



testMendelssohn.pdf
Description: Adobe PDF document


Re: Strange error from \new Voice

2020-04-09 Thread Noeck



Am 09.04.20 um 17:04 schrieb Bernhard Kleine:
> \new Lyrics \lyricsto „SI“

Did you copy that verbatim or use the correct "normal quotes":

\new Lyrics \lyricsto "SI"

Just to rule out that simple problem.

Joram



Re: Analysis brackets

2020-04-09 Thread Michael Taylor
Dear David,
Many thanks for this. I was curious about the curly analysis brackets when
I saw this in Snippets http://lsr.di.unimi.it/LSR/Search?q=curly but
couldn't figure out how (or if) these
shapes could be used for what I wanted. The only application I could find
was to group an
ensemble within a larger instrumental contingent.
With best wishes
Michael

On Tue, 7 Apr 2020 at 23:00, David Nalesnik 
wrote:

> On Tue, Apr 7, 2020 at 11:07 AM Michael Taylor
>  wrote:
> > Would it be possible in a future version to have the option of placing
> text within analysis brackets as well as the default above? MT
>
> HorizontalBracketText.direction with a little more tweaking than
> should be necessary.
>
> \layout {
>   \context {
> \Voice
> \consists "Horizontal_bracket_engraver"
> \override HorizontalBracket.direction = #UP
>   }
> }
>
> {
>   \once\override HorizontalBracketText.direction = #DOWN
>   \once\override HorizontalBracketText.text = "a"
>   \once\override HorizontalBracketText.padding = #-0.5
>   \once\override HorizontalBracket.padding = 1
>   c''\startGroup d''\stopGroup
> }
>


Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine

Am 09.04.2020 um 17:18 schrieb Noeck:
>
> Am 09.04.20 um 17:04 schrieb Bernhard Kleine:
>> \new Lyrics \lyricsto „SI“
> Did you copy that verbatim or use the correct "normal quotes":
>
> \new Lyrics \lyricsto "SI"
>
> Just to rule out that simple problem.
>
> Joram

This is what is there :

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }

I tested also 

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>

And this worked! This would be worth mentioning in the manual!


-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Re: Strange error from \new Voice

2020-04-09 Thread Noeck



Am 09.04.20 um 18:18 schrieb Bernhard Kleine:
> This would be worth mentioning in the manual!

Hi Bernhard,

glad it works. What exactly would you mention in the manual?

1) How to use the \lyricsto construct? It is explained here:

https://lilypond.org/doc/v2.20/Documentation/notation/common-notation-for-vocal-music.html#aligning-lyrics-to-a-melody

2) That you have to use the correct characters ("" instead of „“)?
   Well, that’s trivial, isn’t it? I mean you cannot use a ` for a '
   or a { for a (.

3) That \addlyrics can fail in some cases and \lyricsto is more robust?
   There is a small sentence saying

> The command \addlyrics cannot handle polyphonic settings. … For these cases 
> one should use \lyricsto.

Best,
Joram



Re: Analysis brackets

2020-04-09 Thread Pierre Perol-Schneider
Hi Michael,
That may work, e.g.:

\version "2.20.0"

#(define-markup-command (lcb layout props arg)
   (number?)
  "Draw a curly bracket with a variable length."
 (interpret-markup layout props
   (markup
 (#:override (cons (quote filled) #t)
  (#:path 0 `(
   (moveto   -0.8   0.0)
   (curveto  -0.2   0.4  -0.3  0.7 -0.3  1.5)
   (lineto   -0.3   ,arg)
   (curveto  -0.4   ,(+ arg 1.3) 0.5 ,(+ arg 2.8) 0.7 ,(+ arg 2.8))
   (curveto   0.6   ,(+ arg 2.5) 0.1 ,(+ arg 2)   0.1 ,arg)
   (lineto0.1   1.5)
   (curveto   0.1   0.7   0.1   0.0  -0.8   0.0)
   (closepath)
   (curveto  -0.2  -0.4  -0.3  -0.7  -0.3  -1.5)
   (lineto   -0.3   ,(* arg -1))
   (curveto  -0.4   ,(* (+ arg 1.3) -1) 0.5 ,(* (+ arg 2.8) -1) 0.7
,(* (+ arg 2.8) -1))
   (curveto   0.6   ,(* (+ arg 2.5) -1) 0.1 ,(* (+ arg 2) -1)   0.1
,(* arg -1))
   (lineto0.1  -1.5)
   (curveto   0.1  -0.7   0.1   0.0  -0.8   0.0)
   (closepath)))


\relative c'' {
  c4 _\markup {
\with-dimensions-from \null
  \left-align {
\override #'(baseline-skip . 0)
\center-column {
  "a" \vspace #-.1
  \rotate #90 \lcb #3
  \vspace #.1 "b"
}
  }
} d e
  -\tweak extra-offset #'(0 . -5)
   _\markup {
\with-dimensions-from \null
  \left-align {
\override #'(baseline-skip . 0)
\center-column {
  "a" \vspace #-.1
  \rotate #90 \lcb #5
  \vspace #.1 "b"
}
  }
}d c
  b
  -\tweak extra-offset #'(.5 . 3)
  ^\markup {
\with-dimensions-from \null
  \left-align {
\override #'(baseline-skip . 0)
\center-column {
  "a" \vspace #.1
  \rotate #-90 \lcb #6
  \vspace #-.1 "b"
}
  }
} a g f e d c
}

HTH,
Cheers,
Pierre

Le jeu. 9 avr. 2020 à 17:27, Michael Taylor  a
écrit :

> Dear David,
> Many thanks for this. I was curious about the curly analysis brackets
> when I saw this in Snippets http://lsr.di.unimi.it/LSR/Search?q=curly but
> couldn't figure out how (or if) these
> shapes could be used for what I wanted. The only application I could find
> was to group an
> ensemble within a larger instrumental contingent.
> With best wishes
> Michael
>
> On Tue, 7 Apr 2020 at 23:00, David Nalesnik 
> wrote:
>
>> On Tue, Apr 7, 2020 at 11:07 AM Michael Taylor
>>  wrote:
>> > Would it be possible in a future version to have the option of placing
>> text within analysis brackets as well as the default above? MT
>>
>> HorizontalBracketText.direction with a little more tweaking than
>> should be necessary.
>>
>> \layout {
>>   \context {
>> \Voice
>> \consists "Horizontal_bracket_engraver"
>> \override HorizontalBracket.direction = #UP
>>   }
>> }
>>
>> {
>>   \once\override HorizontalBracketText.direction = #DOWN
>>   \once\override HorizontalBracketText.text = "a"
>>   \once\override HorizontalBracketText.padding = #-0.5
>>   \once\override HorizontalBracket.padding = 1
>>   c''\startGroup d''\stopGroup
>> }
>>
>


Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine
When working with addlyrics it was outside the \new staff construct like
here:

tenorVoicePart = \new Staff \with {
  instrumentName = "Tenor"
  midiInstrument = "choir aahs"
} { \clef "treble_8" \tenorVoice }
\addlyrics { \verseVoice }

Now, it is within

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>
 

That should be mentioned.

Am 09.04.2020 um 18:41 schrieb Noeck:
>
> Am 09.04.20 um 18:18 schrieb Bernhard Kleine:
>> This would be worth mentioning in the manual!
> Hi Bernhard,
>
> glad it works. What exactly would you mention in the manual?
>
> 1) How to use the \lyricsto construct? It is explained here:
>
> https://lilypond.org/doc/v2.20/Documentation/notation/common-notation-for-vocal-music.html#aligning-lyrics-to-a-melody
>
> 2) That you have to use the correct characters ("" instead of „“)?
>Well, that’s trivial, isn’t it? I mean you cannot use a ` for a '
>or a { for a (.
>
> 3) That \addlyrics can fail in some cases and \lyricsto is more robust?
>There is a small sentence saying
>
>> The command \addlyrics cannot handle polyphonic settings. … For these cases 
>> one should use \lyricsto.
> Best,
> Joram
>
-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Re: ANN: OOoLilyPond 1.0.0

2020-04-09 Thread Noeck
Dear Klaus,

thanks a lot for your work, the great improvements to this extension and
for getting out this new version!

Happy Easter!
Joram



Markup-Command shortcut

2020-04-09 Thread foxfanfare
Hi all,

Quick question, I made the following shortcut which draw an arrow of custom
lenght:

#(define-markup-command (arrow layout props size) (number?)
  (interpret-markup layout props
(markup
  #:line
  (#:fontsize 3
  (#:general-align 0 -1
  (#:override (cons (quote thickness) 2)
  (#:combine
(#:draw-line (cons 0 size))
(#:arrow-head 1 -1 #f

\relative c' {
  c1^\markup \arrow #2
}

---

I wonder, is it possible to skip the \markup declaration before the command
and just have to write something like c1^\arrow #1 ?



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Re: Markup-Command shortcut

2020-04-09 Thread Aaron Hill

On 2020-04-09 11:09 am, foxfanfare wrote:

Hi all,

Quick question, I made the following shortcut which draw an arrow of 
custom

lenght:

#(define-markup-command (arrow layout props size) (number?)
  (interpret-markup layout props
(markup
  #:line
  (#:fontsize 3
  (#:general-align 0 -1
  (#:override (cons (quote thickness) 2)
  (#:combine
(#:draw-line (cons 0 size))
(#:arrow-head 1 -1 #f

\relative c' {
  c1^\markup \arrow #2
}

---

I wonder, is it possible to skip the \markup declaration before the 
command

and just have to write something like c1^\arrow #1 ?


Yes:


\version "2.20.0"

#(define-markup-command (arrow layout props size) (number?)
  (interpret-markup layout props
(markup
  #:line
  (#:fontsize 3
  (#:general-align 0 -1
  (#:override (cons (quote thickness) 2)
  (#:combine
(#:draw-line (cons 0 size))
(#:arrow-head 1 -1 #f

arrow = -\markup \arrow \etc

\relative c' {
  c1^\markup \arrow #2
  c1^\arrow #2
}



-- Aaron Hill



Re: Markup-Command shortcut

2020-04-09 Thread foxfanfare
Of course, thanks!



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Coda / split staff

2020-04-09 Thread Pierre Perol-Schneider
Dear Harm et all,
Would you mind putting the following snippet to the LSR?
Originally:
http://lilypond.1069038.n5.nabble.com/Appending-coda-on-last-line-td44971.html#a44972
(See also:
http://lilypond-french-users.1298960.n2.nabble.com/Fonte-de-texte-introuvable-td7588980.html#a7589129
)
TIA, cheers,
Pierre
\version "2.20.0"

rochadeAlpha = {
\override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 
'(left-edge
  ambitus
  breathing-sign
  staff-bar
  clef	
  key-cancellation
  key-signature
  time-signature
  custos))
 
\once \override Score.TimeSignature.space-alist = 
  #'(
 (first-note fixed-space . 2.0)
 (right-edge extra-space . 0.5)
 (staff-bar minimum-space . 2.5))

\once \override Score.KeySignature.space-alist = 
  #'(
 (time-signature extra-space . 1.15)
 (first-note fixed-space . 1.0)
 (right-edge extra-space . 0.5)
 (staff-bar minimum-space . 2.5))
}

onceTextLengthOn = {
  \once\override TextScript.extra-spacing-width = #'(0 . 0)
  \once\override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)
}

staffStop = {
  \onceTextLengthOn
  \stopStaff
  \cadenzaOn
}

staffStart = {
  \once\override Score.BarNumber.break-visibility = #'#(#f #t #t)
  \startStaff
  \cadenzaOff
  \set Staff.forceClef = ##t
}

#(define-markup-command (bar-line layout props strg)(string?)
  #:properties ((font-size 0)
(thin-thickness #f)
(thick-thickness #f)
(kern #f)
(add-height 0))
" Please note: @code{bar-line} isn't finished. There are some weird codings in 
  it. I wouldn't be surprised, if it crashes soon.
"  
  (define (string->string-list str)
"Convert a string into a list of strings with length 1.
  @code{"aBc"} will be converted to @code{("a" "B" "c")}.
  An empty string will be converted to a list containing @code{""}."
(if (and (string? str)
 (not (zero? (string-length str
(map (lambda (s)
 (string s))
 (string->list str))
(list "")))  

  (define (make-bar-line thickness height font-size blot-diameter)
"Draw a simple bar line."
(ly:round-filled-box 
  (cons 0 (* (magstep font-size) thickness))
  (interval-widen (cons 0 (+ add-height height)) (magstep font-size))
  blot-diameter))   

  (define (make-colon-bar-line height font-size)
(let* ((font
 (ly:paper-get-font layout
   (cons '((font-encoding . fetaMusic)) props)))
   (dot (ly:font-get-glyph font "dots.dot")))
(ly:stencil-add
dot
(ly:stencil-translate-axis
  dot
  (magstep (+ (/ add-height 2) font-size))
  Y 

  (define (make-bracket-bar-line height font-size dir thick-bar )
"Draw a bracket-style bar line. If @var{dir} is set to @code{LEFT}, the
 opening bracket will be drawn, for @code{RIGHT} we get the 
 closing bracket."
(let* ((font
  (ly:paper-get-font layout
(cons '((font-encoding . fetaMusic)) props)))
   (brackettips-up (ly:font-get-glyph font "brackettips.up"))
   (brackettips-down (ly:font-get-glyph font "brackettips.down"))
   ;; the x-extent of the brackettips must not be taken into account
   ;; for bar line constructs like "[|:", so we set new bounds:
   (tip-up-stil 
 (ly:make-stencil 
   (ly:stencil-expr brackettips-up)
   (cons 0 0)
   (ly:stencil-extent brackettips-up Y)))
   (tip-down-stil 
 (ly:make-stencil 
   (ly:stencil-expr brackettips-down)
   (cons 0 0)
   (ly:stencil-extent brackettips-down Y)))
   (stencil 
 (ly:stencil-add
   thick-bar
   (ly:stencil-translate-axis 
 tip-up-stil 
 (+ (/ (+ add-height height) 2) (magstep font-size))
 Y)
   (ly:stencil-translate-axis 
 tip-down-stil
 (* -1 (+ (/ (+ add-height height) 2) (magstep font-size)))
 Y
(if (eq? dir LEFT)
stencil
(ly:stencil-scale stencil -1 1

  ;; TODO: changing global-staff-size will ruin the output for the braces
  ;; manual readjustment needed :(
  (define (make-brace-bar-line height font-size)
(let* ((pt (ly:output-def-lookup layout 'pt))
   (new-height (/ (+ height add-height) pt))
   (line-thickness (ly:output-def-lookup layout 'line-thickness))
   (font 
 (ly:paper-get-font layout
   (cons '((font-encoding . fetaBraces)
   (font-name . #f))
 props)))
   (glyph-count (1- (ly:otf-glyph-count font)))
   (scale (ly:output-def-lookup layout 'output-scale))
   ;; Why `+ 2 ?
   (scaled-size (+ 2 (/ (ly:pt new-height) 

Re: Markup-Command shortcut

2020-04-09 Thread foxfanfare
But I don't understand, why is that shortcut also not working then?

#(define-markup-command (subUp layout props f1 f2)
(string? string?)
  (interpret-markup layout props
#{
   \markup {
 \overtie \line { \concat { #f1 \hspace #0.15 #f2 } }
   }
#}))

subst = \finger \markup \subUp \etc

\relative c' {
  c1\finger \markup \subUp "1" "2"
  c\subst "1" "2"
}



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Re: Markup-Command shortcut

2020-04-09 Thread Aaron Hill

On 2020-04-09 11:56 am, foxfanfare wrote:

But I don't understand, why is that shortcut also not working then?

#(define-markup-command (subUp layout props f1 f2)
(string? string?)
  (interpret-markup layout props
#{
   \markup {
 \overtie \line { \concat { #f1 \hspace #0.15 #f2 } }
   }
#}))

subst = \finger \markup \subUp \etc

\relative c' {
  c1\finger \markup \subUp "1" "2"
  c\subst "1" "2"
}


David K. would have to explain the idiosyncrasies of \etc, but it seems 
not to like the two arguments.


All you need to do is define your own music function without the \etc 
shorthand.  You could eliminate the need for the markup command as well:



\version "2.20.0"

#(define-markup-command (subUp layout props f1 f2) (markup? markup?)
  (interpret-markup layout props
#{ \markup \overtie \concat { #f1 \hspace #0.15 #f2 } #}))

subst = #(define-music-function (f1 f2) (markup? markup?)
  #{ \finger \markup \subUp #f1 #f2 #})

substII = #(define-music-function (f1 f2) (markup? markup?)
  #{ \finger \markup \overtie \concat { #f1 \hspace #0.15 #f2 } #})

\relative c' {
  c1\finger \markup \subUp "1" "2"
  c\subst "1" "2"
  c\substII \markup \with-color #red "1" \markup \circle "2"
}


NOTE: In general, prefer markup? to string? for markup-related 
arguments.  You never know when you might want to provide more than just 
simple text as demonstrated above.



-- Aaron Hill



Re: Markup-Command shortcut

2020-04-09 Thread David Kastrup
foxfanfare  writes:

> But I don't understand, why is that shortcut also not working then?
>
> #(define-markup-command (subUp layout props f1 f2)
> (string? string?)
>   (interpret-markup layout props
> #{
>\markup {
>  \overtie \line { \concat { #f1 \hspace #0.15 #f2 } }
>}
> #}))
>
> subst = \finger \markup \subUp \etc
>
> \relative c' {
>   c1\finger \markup \subUp "1" "2"
>   c\subst "1" "2"
> }

A design decision turning \markup \subUp \etc into a markup function of
its own, then calling \finger with that.

In short, \etc is acting less greedy than expected here.  In order to
allow for less greediness in some applications (like with \markupMap)
one would likely want something explicit, but I don't have a definite
idea for that right now.

-- 
David Kastrup



Beaming in 4/4 and justify staves

2020-04-09 Thread Cristopher Bonn
Hi,

I am a LilyPond newbie. This has probably been asked before but I couldn't
find the answer after searching (manual, snippets and mailing list).

1) How can I have this beaming in 4/4 as default? see attached image.

2) Is there a way to justify staves? I have a 1-page score and there's some
space below the last system. Is there a way to have the last system at the
bottom the page and add spaces between the other systems appropriately?

Sorry if these are dumb questions.

Thanks


Re: Analysis brackets

2020-04-09 Thread Kevin Barry
Hi Michael,

Below is some code that replaces a horizontal bracket with a curly
brace of the same width. The math is the result of experimentation,
but it seems to hold up to changes in staff size and for medium-sized
groupings of notes.

\version "2.19.84"

#(define curly-analysis-brace
   (lambda (bracket)
 (let* ((bracket-width (interval-length
(ly:stencil-extent
(ly:horizontal-bracket::print bracket) X)))
(bracket-dir (ly:grob-property bracket 'direction))
(bracket-layout (ly:grob-layout bracket))
(output-scale
 (/ (ly:output-def-lookup bracket-layout 'output-scale)
1.75729901757299))
(brace-rotation (if (eq? bracket-dir DOWN) 90 270))
(brace-size (* 5 bracket-width output-scale))
(y-scale (- 1 (* brace-size (/ brace-size 1.5) 0.04 (/
1 output-scale
(brace-offset (* (/ 1 output-scale)
(+ (* 0.2 output-scale) (* 0.103 brace-size
)
   (ly:grob-set-property! bracket 'text
 #{ \markup
\scale #`(1 . ,y-scale)
\translate #`(,brace-offset . 0)
\rotate #brace-rotation
\left-brace #brace-size #})
   (ly:grob-set-property! bracket 'stencil ly:text-interface::print)
   )))

% \startCurlyGroup is a convenience for doing just one curly analysis bracket
startCurlyGroup = \tweak after-line-breaking #curly-analysis-brace \startGroup

\score {
  \relative {
c''4\startGroup \startGroup \startGroup
d4\stopGroup
e4
d4
c d e d\stopGroup
c d e d\stopGroup
  }
  \layout {
\context {
  \Voice
  \consists "Horizontal_bracket_engraver"
  \override HorizontalBracket.after-line-breaking = #curly-analysis-brace
}
  }
}

Kevin

On Thu, 9 Apr 2020 at 17:51, Pierre Perol-Schneider
 wrote:
>
> Hi Michael,
> That may work, e.g.:
>
> \version "2.20.0"
>
> #(define-markup-command (lcb layout props arg)
>(number?)
>   "Draw a curly bracket with a variable length."
>  (interpret-markup layout props
>(markup
>  (#:override (cons (quote filled) #t)
>   (#:path 0 `(
>(moveto   -0.8   0.0)
>(curveto  -0.2   0.4  -0.3  0.7 -0.3  1.5)
>(lineto   -0.3   ,arg)
>(curveto  -0.4   ,(+ arg 1.3) 0.5 ,(+ arg 2.8) 0.7 ,(+ arg 2.8))
>(curveto   0.6   ,(+ arg 2.5) 0.1 ,(+ arg 2)   0.1 ,arg)
>(lineto0.1   1.5)
>(curveto   0.1   0.7   0.1   0.0  -0.8   0.0)
>(closepath)
>(curveto  -0.2  -0.4  -0.3  -0.7  -0.3  -1.5)
>(lineto   -0.3   ,(* arg -1))
>(curveto  -0.4   ,(* (+ arg 1.3) -1) 0.5 ,(* (+ arg 2.8) -1) 0.7 
> ,(* (+ arg 2.8) -1))
>(curveto   0.6   ,(* (+ arg 2.5) -1) 0.1 ,(* (+ arg 2) -1)   0.1 
> ,(* arg -1))
>(lineto0.1  -1.5)
>(curveto   0.1  -0.7   0.1   0.0  -0.8   0.0)
>(closepath)))
>
>
> \relative c'' {
>   c4 _\markup {
> \with-dimensions-from \null
>   \left-align {
> \override #'(baseline-skip . 0)
> \center-column {
>   "a" \vspace #-.1
>   \rotate #90 \lcb #3
>   \vspace #.1 "b"
> }
>   }
> } d e
>   -\tweak extra-offset #'(0 . -5)
>_\markup {
> \with-dimensions-from \null
>   \left-align {
> \override #'(baseline-skip . 0)
> \center-column {
>   "a" \vspace #-.1
>   \rotate #90 \lcb #5
>   \vspace #.1 "b"
> }
>   }
> }d c
>   b
>   -\tweak extra-offset #'(.5 . 3)
>   ^\markup {
> \with-dimensions-from \null
>   \left-align {
> \override #'(baseline-skip . 0)
> \center-column {
>   "a" \vspace #.1
>   \rotate #-90 \lcb #6
>   \vspace #-.1 "b"
> }
>   }
> } a g f e d c
> }
>
> HTH,
> Cheers,
> Pierre
>
> Le jeu. 9 avr. 2020 à 17:27, Michael Taylor  a 
> écrit :
>>
>> Dear David,
>> Many thanks for this. I was curious about the curly analysis brackets when I 
>> saw this in Snippets http://lsr.di.unimi.it/LSR/Search?q=curly but couldn't 
>> figure out how (or if) these
>> shapes could be used for what I wanted. The only application I could find 
>> was to group an
>> ensemble within a larger instrumental contingent.
>> With best wishes
>> Michael
>>
>> On Tue, 7 Apr 2020 at 23:00, David Nalesnik  wrote:
>>>
>>> On Tue, Apr 7, 2020 at 11:07 AM Michael Taylor
>>>  wrote:
>>> > Would it be possible in a future version to have the option of placing 
>>> > text within analysis brackets as well as the default above? MT
>>>
>>> HorizontalBracketText.direction with a little more tweaking than
>>> should be necessary.
>>>
>>> \layout {
>>>   \context {
>>> \Voice
>>> \consists "Horizontal_bracket_engraver"
>>> \override HorizontalBracket.direction = #UP
>>>   }
>>> }
>>>
>>> {
>>>   \once\override HorizontalBracketText.direction = #DOWN
>>> 

RE: Beaming in 4/4 and justify staves

2020-04-09 Thread Mark Stephen Mrotek
Christopher,

 

No question is stupid – only some responses!

For 1) look here

http://lilypond.org/doc/v2.19/Documentation/learning/automatic-and-manual-beams

 

For 2) look here

http://lilypond.org/doc/v2.19/Documentation/notation/changing-spacing

 

Mark

 

From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Cristopher Bonn
Sent: Thursday, April 9, 2020 11:48 AM
To: lilypond-user@gnu.org
Subject: Beaming in 4/4 and justify staves

 

Hi,

 

I am a LilyPond newbie. This has probably been asked before but I couldn't find 
the answer after searching (manual, snippets and mailing list).

 

1) How can I have this beaming in 4/4 as default? see attached image.

 

2) Is there a way to justify staves? I have a 1-page score and there's some 
space below the last system. Is there a way to have the last system at the 
bottom the page and add spaces between the other systems appropriately?

 

Sorry if these are dumb questions.

 

Thanks



Re: A request on behalf of Turkish Music

2020-04-09 Thread Noeck
Hi,

Am 08.04.20 um 14:38 schrieb Werner LEMBERG:
>
>> A combination of makam.ly and this definitions.ily should be easy to
>> do.  But as Werner said, having them in the Emmentaler font (one way
>> or the other) would be better.
>
> Well, here's the question: Shall we add such glyphs at all?

Of course. My wording was wrong here.

I made a small ly-file just to show how the accidentals with numbers
(using the finger style) look like. It is in no way connected to tuning,
it is just a display for further discussions about the optics.

Cheers
Joram
\version "2.20.0"

flatOne = \markup \concat { \flat  \hspace # -0.55 \raise #1 \finger \fontsize #-2 "1" }
flatTwo = \markup \concat { \flat  \hspace # -0.55 \raise #1 \finger  \fontsize #-2 "2" }
flatThree = \markup \concat { \flat  \hspace # -0.55 \raise #1 \finger  \fontsize #-2 "3" }
flatFour = \markup \concat { \flat  \hspace # -0.55 \raise #1 \finger  \fontsize #-2 "4" }
sharpOne = \markup \concat { \sharp  \hspace # -0.7 \raise #1.5 \finger  \fontsize #-2 "1" }
sharpTwo = \markup \concat { \sharp  \hspace # -0.7 \raise #1.5 \finger  \fontsize #-2 "2" }
sharpThree = \markup \concat { \sharp  \hspace # -0.7 \raise #1.5 \finger  \fontsize #-2 "3" }

\markup { \flatOne \flatTwo \flatThree \flatFour \sharpOne \sharpTwo \sharpThree }

#(define (turkish-flatone grob)
 (grob-interpret-markup grob #{ \markup \flatOne  #}))

#(define (turkish-sharptwo grob)
 (grob-interpret-markup grob #{ \markup \sharpTwo  #}))

{
  \override Staff.Accidental.stencil = #turkish-flatone
  as
  \override Staff.Accidental.stencil = #turkish-sharptwo
  ais
}

Re: Beaming in 4/4 and justify staves

2020-04-09 Thread Aaron Hill

On 2020-04-09 1:45 pm, Mark Stephen Mrotek wrote:

No question is stupid – only some responses!


See my post history for examples.  :P


-- Aaron Hill



Re: A request on behalf of Turkish Music

2020-04-09 Thread Aaron Hill

On 2020-04-09 1:59 pm, Noeck wrote:

Hi,

Am 08.04.20 um 14:38 schrieb Werner LEMBERG:



A combination of makam.ly and this definitions.ily should be easy to
do.  But as Werner said, having them in the Emmentaler font (one way
or the other) would be better.


Well, here's the question: Shall we add such glyphs at all?


Of course. My wording was wrong here.

I made a small ly-file just to show how the accidentals with numbers
(using the finger style) look like. It is in no way connected to 
tuning,

it is just a display for further discussions about the optics.


To my eye, the flat numbers seem a little close to the vertical bar as 
compared to the rounded section of the flat.  I would nudge them 
slightly to the right and slightly downward to balance the spacing.


The sharp numbers seem like they could be moved slightly upward.  The 
"1" in particular looks odd to me as it is physically connected to the 
sharp.  Perhaps that is a desired trait, though.


Would it make sense to try to mimic the flat number positioning and have 
the sharp numbers in a "superscript" location (crude ASCII art 
following):


   , , 2
  -+-+-
  -+-+-
   ' '

Or, since that increases the width of the accidental, would that push 
the sharp too far to the left of a note?



-- Aaron Hill



Re: Beaming in 4/4 and justify staves

2020-04-09 Thread Noeck
Hi Christopher,

>> 1) How can I have this beaming in 4/4 as default? see attached image.
> http://lilypond.org/doc/v2.19/Documentation/learning/automatic-and-manual-beams

\version "2.20.0"

\relative {
  \overrideTimeSignatureSettings
4/4  % whenever you use \time 4/4
1/8  % use 8th notes as beat
1,1,2,4  % group them like this
#'()% no exceptions
  \time 4/4
  r8 a' \repeat unfold 14 a
}

It was not clear to me from your image how you would like to beam a
measure without rests. So probably this answer is wrong even though the
first measure looks like yours.

>> 2) Is there a way to justify staves?
>
> http://lilypond.org/doc/v2.19/Documentation/notation/changing-spacing

In particular:

\paper {
  ragged-last-bottom = ##f
}

Cheers,
Joram



Fwd: Beaming in 4/4 and justify staves

2020-04-09 Thread Noeck
Hi Christopher,

please always write to the list! Your clarification of your question is
what I expected. But I don't know the answer for that.

Joram


 Weitergeleitete Nachricht 
Betreff:Re: Beaming in 4/4 and justify staves
Datum:  Thu, 9 Apr 2020 19:39:21 -0300
Von:Cristopher Bonn 
An: Noeck 



Hi Joram,

Thanks for your answer. I want a measure without rests beamed like it's
traditionally done (2 groups of 4), is this possible? In short, three
8th notes would never be beamed together in any case. I hope I'm clear...

New image attached for clarification 

On Thu, Apr 9, 2020 at 7:21 PM Noeck mailto:noeck.marb...@gmx.de>> wrote:

Hi Christopher,

>> 1) How can I have this beaming in 4/4 as default? see attached image.
>

http://lilypond.org/doc/v2.19/Documentation/learning/automatic-and-manual-beams

\version "2.20.0"

\relative {
  \overrideTimeSignatureSettings
    4/4  % whenever you use \time 4/4
    1/8  % use 8th notes as beat
    1,1,2,4  % group them like this
    #'()    % no exceptions
  \time 4/4
  r8 a' \repeat unfold 14 a
}

It was not clear to me from your image how you would like to beam a
measure without rests. So probably this answer is wrong even though the
first measure looks like yours.

>> 2) Is there a way to justify staves?
>
> http://lilypond.org/doc/v2.19/Documentation/notation/changing-spacing

In particular:

\paper {
  ragged-last-bottom = ##f
}

Cheers,
Joram



RE: Beaming in 4/4 and justify staves

2020-04-09 Thread Cristopher Bonn
Sorry! Believe it or not, I am new to mailing lists as well... Did I do it
correctly now?

Cristopher


Re: Proposal: Changing tremolo beam gap implementation

2020-04-09 Thread Torsten Hämmerle
Thomas Morley-2 wrote
> see my code at
> https://lists.gnu.org/archive/html/lilypond-user/2020-04/msg00160.html
> 
> It's ofcourse a workaround, but usable, afaict.


Hi Harm,

It's good to have a workaround for the time being.
The reason why I haven't finished the "strange gap behaviour" issue 5868 yet
is because it is very much linked to the old issue 318 dealing with sloped
and centred whole-note tremolos, more or less just as you've implemented it
in your custom stencil fix.


By the way, as to your question (in the comments of your coding):


   ;; Beam
   ;; TODO where does this magic number, 0.81, comes from?

This magic number is nothing but the *standard beam translation* (i.e. the
vertical shift from beam to beam) and is a combination of standard beam
thickness (0.48) and standard line thickness (0.1), taking into account the
sit/straddle/hang beam placement rules.

For up to 3 beams, the standard beam translation basically is
0.5 * (2 + line-thickness - beam-thickness) = 0.5 * (2 + 0.1 - 0.48) =
*0.81*

Using this translation between beams will allow the upper beam to hang from
a stave line, the middle beam to straddle, and the lower beam to sit on a
stave line.


Further issues

I'm also trying to be prepared (code-wise) for the following (new) features,
partly already in the testing phase:

* slope damping (your slope is not damped, and I think even freely floating
beams in whole-note tremolos should not become too steep, they're no
glissandi.

* implement a proper sit/straddle/hang placement of freely floating beams. 
That seems to be more important than "exact" vertical centering between the
left and right notes/chords.

* keep away from ledger lines (just a little bit)

* (still to be done in my version) note-column shift as you did it,
especially needed if there are accidentals and dots.

* Alternative "Beam as if they were stemmed" approach as suggested by Elaine
Gould.

* Possibility of three or more note tremolos (never seen one in real life,
but, obviously, they do exist according to Gould)


Cheers,
Torsten





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html