Scores of Beauty

2022-05-27 Thread Andrew Bernard
I was asked about this site. It's quite defunct and withered. I don't 
have access to it, never did. If people want to continue it I would be 
happy. alongside the OLL project, to run up a blog to host it. My only 
condition is that we pick another name. I never liked this one. Most of 
the New Complexity music I engrave would not be well described by the 
word 'beautiful'. It focuses on other aesthetic properties.


I don't think it would be easy to pull the old articles, excellent 
thought they were, and many may be quite outdated by now.


If there is support for me doing this, let me know.


Andrew




OpenLilyLib portal

2022-05-27 Thread Andrew Bernard
I've created a new server to run a portal site for OpenLilyLib project 
and related topics.


https://openlilylib.space/

I'll be making the Discourse server today, for OLL specific discussion 
and support.


Also, I'll be providing access and support for the OLL repository on 
GitHub, which is after all the main point. At some time I feel the need 
to majorly refactor the repo codebase, but as this is disruptive I will 
not do this right away (and besides, it needs a lot of thinking to clean 
up).



Andrew



Re: Stanzas with different rhythms

2022-05-27 Thread Jacques Menu
Thanks Helge, quite elegant!

JM

> Le 21 mai 2022 à 18:46, Helge Kruse  a écrit :
> 
>  Weitergeleitete Nachricht 
> Betreff:  Re: Stanzas with different rythms
> Datum:Fri, 20 May 2022 13:01:10 -0600
> Von:  Carl Sorensen 
> An:   Helge Kruse 
> 
> 
> My way of doing it (based on the way it is done in the hymnals with
> which I am most familiar) is not to use small notes, but instead to use
> dashed ties.
> 
> \version "2.19.80"
> 
> \paper {
>ragged-right = ##f
> }
> 
> % First stanza with correct rythm.
> stanzaOneRhythm = \relative c' {
>\time 6/4
>\partial 4
>e4 |
>a2 a4  e4. 8 4 |
>f2. c2 4 |
>d2 e4 f2 d4
> }
> stanzaOneLyrics = \lyricmode {
>Es war ein Kö -- nig in Thu -- le gar treu bis an das
> }
> 
> % Second stanza omitted
> % Third stanza with correct rythm.
> stanzaThreeRhythm = \relative c' {
>\time 6/4
>\partial 4
>e4 |
>a2 a4 e2 4 |
>f2. c2 4 |
>d2 \autoBeamOff e8 8 f2 d4
> }
> stanzaThreeLyrics = \lyricmode {
>Und als er kam zu ster -- ben, zählt er sei -- ne Städt im
> }
> 
> displayedRhythm =  \relative c' {
>\time 6/4
>\partial 4
>e4 |
>a2 a4 \tieDashed e4.~8 \tieSolid 4 |
>f2. c2 4 |
>d2 \autoBeamOff \tieDashed e8~8 \tieSolid f2 d4
> }
> 
> <<
>   \new Staff <<
> \new Voice = "displayed" {\displayedRhythm}
> \new NullVoice = "stanzaOne" {\stanzaOneRhythm}
> \new NullVoice = "stanzaThree" {\stanzaThreeRhythm}
>   >>
>   \new Lyrics {
> \lyricsto "stanzaOne" \stanzaOneLyrics
>   }
>   \new Lyrics {
> \lyricsto "stanzaThree" \stanzaThreeLyrics
>   }
> >>
> 
> HTH,
> 
> %%%
> 
> Yes, indeed it helps.
> 
> The idea with the NullVoice and independent rhythms is great. All in
> all, there are 6 stanzas with 5 rhythm variants because of the diffent
> numbers of syllables. Defining one displayed voice with the (potential)
> shorter notes and individual rhythms for the stanzas gives me a very
> good replication of the original score.
> 
> That's also the reason I don't want to use the dashed tie. Probably it
> is a more readable form for rhythm variations in songs. But since I'm
> unexperience with songs, I try to keep near the original.
> 
> Thanks,
> Helge
> 
> Carl
> 
> 




Re: PDF Bookmarks

2022-05-27 Thread Mark Probert


Hi, Jean.

>> 
>> Ah… Actually, I guess what might be going on. Are you using
>> a version of LilyPond that uses Guile 2? Homebrew, for
>> example? What does #(display (version)) print?
>> 

I have two different systems: one is Homebrew, the other not. They 
produce:

 (homebrew)> GNU LilyPond 2.22.2 (running Guile 2.2)
 (other)> GNU LilyPond 2.22.1

>> ly/toc-init.ly in the LilyPond installation to change the
>> line
>> 
>>(children . ())
>> 
>> into
>> 
> ,(cons 'children '())
> 

This produces the same error with both systems:

In procedure assq: Wrong type argument in position 2 (expecting 
association list): ((name . toc371) (text . "01. Milwaulkee Avenue 
(Blues q=108)") (toc-markup . tocItemMarkup) (parents) %% (children) 
(children) (level . 0))

 .. m.




Re: fermata inside staff with textScript

2022-05-27 Thread Ahanu Banerjee
Thank you!

-Ahanu

On Fri, May 27, 2022, 18:32 Jean Abou Samra  wrote:

>
>
> Le 27/05/2022 à 23:45, Ahanu Banerjee a écrit :
> > Hello,
> >
> > I am having trouble getting a fermata to appear inside the staff when
> > textScript (markup) is specified on the same side of the staff as the
> > fermata. (This is needed for a multi-voice context with tight
> > spacing.) Changing outside-staff-priority did not help. Is there an
> > easy fix?
> >
> >
> > \version "2.23.8"
> > \relative c'' { \stemDown
> > % inverted fermata appears below textScript
> > a'_\markup "text" -\tweak Y-offset #0 _\fermata s4
> > %expected fermata placement
> > a -\tweak Y-offset #0 _\fermata }
> >
> >
> > Thanks,
> > -Ahanu
>
>
> You need to remove the script-priority in order to turn off the
> collision resolution between the two scripts.
>
> \version "2.23.9"
>
> \relative c'' {
>\stemDown
>a'_\markup "text" -\tweak script-priority ##f \tweak Y-offset 0
> _\fermata
> }
>
>
> Best,
> Jean
>
>


issues with "afterGrace" since 2.20

2022-05-27 Thread Ahanu Banerjee
Hello,

In lilypond 2.20.0, I was able to use "afterGrace" like this:

\version "2.20.0"
\language "english"
\relative c' { d2 \afterGrace 4 { cs16 d } }

However, this now presents an error: "warning: \afterGrace exceeds duration
of main argument". Running ly-convert does not fix it.

If I change "\aftergrace 4" to "\aftergrace d4", it works fine. However, I
have multiple documents written with the aforementioned syntax, and it
would take a long time to fix them manually. Any suggestions?

Thanks,
-Ahanu


Re: fermata inside staff with textScript

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 23:45, Ahanu Banerjee a écrit :

Hello,

I am having trouble getting a fermata to appear inside the staff when 
textScript (markup) is specified on the same side of the staff as the 
fermata. (This is needed for a multi-voice context with tight 
spacing.) Changing outside-staff-priority did not help. Is there an 
easy fix?



\version "2.23.8"
\relative c'' { \stemDown
    % inverted fermata appears below textScript
    a'_\markup "text" -\tweak Y-offset #0 _\fermata s4
    %expected fermata placement
    a -\tweak Y-offset #0 _\fermata }


Thanks,
-Ahanu



You need to remove the script-priority in order to turn off the 
collision resolution between the two scripts.


\version "2.23.9"

\relative c'' {
  \stemDown
  a'_\markup "text" -\tweak script-priority ##f \tweak Y-offset 0 _\fermata
}


Best,
Jean




Re: Cluster fill-style

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 23:45, Simon Bailey a écrit :

Hi Jean,

thanks for reporting that bug. I'd also noticed that the MM rests 
didn't terminate the clusterspanners, so did a bit of a workaround by 
inserting "normal" rests.


However, I've found another weird manifestation: the attached .ly file 
won't compile. Unless you either comment out the additional staff or 
the #(layout-set-staff-size 16)...



Alright, that was a silly oversight. Fix attached.
\version "2.23.10"

#(use-modules (ice-9 match)
   (srfi srfi-71))

#(define (cluster::dashed-fill grob)
   (let* ((columns (ly:grob-object grob 'columns))
  (column-list (ly:grob-array->list columns)))
 (if (not (pair? column-list)) ;; see issue #3654
 #f
 (let* ((x-refp (ly:grob-common-refpoint
 (ly:spanner-bound grob LEFT)
 (ly:grob-common-refpoint
  (ly:spanner-bound grob RIGHT)
  (ly:grob-common-refpoint-of-array grob columns X)
  X)
 X))
(y-refp (ly:grob-common-refpoint-of-array grob columns Y))
(my-exts (map (lambda (c)
(ly:grob-extent c y-refp Y))
   column-list))
(my-coords (map (lambda (c)
  (ly:grob-relative-coordinate c x-refp X))
 column-list))
(after-me (find-tail (lambda (s)
   (eq? s grob))
(ly:spanner-broken-into
 (ly:grob-original grob
(neighbor (and after-me
   (pair? (cdr after-me))
   (cadr after-me)))
(exts coords (if neighbor
 (let* ((neighbor-cols (ly:grob-object
neighbor 'columns))
(neighbor-col-list
 (ly:grob-array->list neighbor-cols)))
   (if (not (null? neighbor-col-list))
   ;; issue #3654 as well
   (let* ((first-neighbor-col (car
   neighbor-col-list))
  (neighbor-refp
   (ly:grob-common-refpoint-of-array
neighbor
neighbor-cols
Y))
  (bound (ly:spanner-bound
  grob RIGHT)))
 (values
  (append my-exts
(list (ly:grob-extent
   first-neighbor-col neighbor-refp Y)))
  (append my-coords
(list
 (ly:grob-relative-coordinate bound x-refp X)
   (values my-exts my-coords)))
 (values my-exts my-coords)))

(details (ly:grob-property grob 'details))
(increment (assq-ref details 'increment))
(contour-thickness (assq-ref details 'contour-thickness))
(polygon-points-1 (map cons coords (map car exts)))
(polygon-points-2 (map cons coords (map cdr exts)))
(polygon-stencil
 (ly:round-polygon (append-reverse polygon-points-1
 polygon-points-2)
   contour-thickness
   1
   #f)))
   (let loop ((exts exts)
  (coords coords)
  (current (car coords))
  (stil empty-stencil))
 (if (null? (cdr coords))
 (ly:stencil-translate
  (ly:stencil-add stil polygon-stencil)
  (cons (- (ly:grob-relative-coordinate grob x-refp X))
(- (ly:grob-relative-coordinate grob y-refp Y
 (let* ((t (/ (- current (car coords))
 (- (cadr coords)
   (car coords
(1-t (- 1 t))
(ext1 (car exts))
(ext2 (cadr exts))
(lo (+ (* 1-t (car ext1))
  (* t (car ext2
(hi (+ (* 1-t (cdr ext1))
  (* t (cdr ext2
(part 

Re: Cluster fill-style

2022-05-27 Thread Simon Bailey
Hi Jean,

thanks for reporting that bug. I'd also noticed that the MM rests didn't
terminate the clusterspanners, so did a bit of a workaround by inserting
"normal" rests.

However, I've found another weird manifestation: the attached .ly file
won't compile. Unless you either comment out the additional staff or the
#(layout-set-staff-size 16)...

Kind regards,
sb

On Fri, 27 May 2022 at 22:01, Jean Abou Samra  wrote:

>
>
> Le 27/05/2022 à 22:20, Simon Bailey a écrit :
> > Hi Jean,
> >
> > actually, there seems to be a bit of a problem:
> >
> > \new Voice {
> >   R1*3 | r2 r4.
> >   \makeClusters { 8 | q1 | q8  2. | q1 | q1 | q2 r2 }
> >   \barNumberCheck #10
> >   \makeClusters {
> > 1 | q4. 8 2 | q1 | q2 2 |
> > \barNumberCheck #14 %1
> > q2 2 | q2  | 2 q8. 8. 8 | q1 | q1
> > | q2. 4 |
> >   }
> >   R1*47
> >   \makeClusters { 1 | q1 | 1 | 1 | 1 | q1 | q1 |
> > q1 | }
> >   R1*11
> >   \barNumberCheck #86
> > }
> >
> > gives the error message:
> >
> > Starting lilypond.exe 2.23.9 [Untitled]...
> > Processing
> > `C:/Users/sia/AppData/Local/Temp/frescobaldi-kad5rc1x/tmpi_go0x11/
> document.ly
> > '
> > Parsing...
> > Interpreting music...[8][16][24][32][40][48][56][64][72][80]
> > Preprocessing graphical objects...
> > Finding the ideal number of pages...
> > Fitting music on 1 page...
> > Drawing systems...ice-9/eval.scm:155:9: In procedure car: Wrong type
> > argument in position 1 (expecting pair): ()
> > Exited with return code 1.
> >
> > If i comment out the 3rd \makeClusters, it works though.
> >
> > Any ideas?
>
>
> Without my code, the same example outputs a programming error,
> so it's an existing bug. I've just filed an issue in the bug
> tracker:
>
> https://gitlab.com/lilypond/lilypond/-/issues/6354
>
> Meanwhile, here is some code that works around the bug:
>
>
>
> \version "2.23.10"
>
> #(use-modules (ice-9 match)
>(srfi srfi-71))
>
> #(define (cluster::dashed-fill grob)
> (let* ((columns (ly:grob-object grob 'columns))
>(column-list (ly:grob-array->list columns)))
>   (if (not (pair? column-list)) ;; see issue #3654
>   #f
>   (let* ((x-refp (ly:grob-common-refpoint-of-array grob columns X))
>  (y-refp (ly:grob-common-refpoint-of-array grob columns Y))
>  (my-exts (map (lambda (c)
> (ly:grob-extent c y-refp Y))
>   column-list))
>  (my-coords (map (lambda (c)
>   (ly:grob-relative-coordinate c x-refp X))
> column-list))
>  (after-me (find-tail (lambda (s)
> (eq? s grob))
>   (ly:spanner-broken-into
> (ly:grob-original grob
>  (neighbor (and after-me
> (pair? (cdr after-me))
> (cadr after-me)))
>  (exts coords (if neighbor
>   (let* ((neighbor-cols (ly:grob-object
> neighbor 'columns))
>  (neighbor-col-list
> (ly:grob-array->list neighbor-cols)))
> (if (not (null? neighbor-col-list))
> ;; issue #3654 as well
> (let* ((first-neighbor-col (car
> neighbor-col-list))
>(neighbor-refp
> (ly:grob-common-refpoint-of-array
>  neighbor
>  neighbor-cols
>  Y))
>(bound (ly:spanner-bound
> grob RIGHT)))
>   (values
>(append my-exts
>(list (ly:grob-extent
> first-neighbor-col neighbor-refp Y)))
>(append my-coords
>(list
> (ly:grob-relative-coordinate bound x-refp X)
> (values my-exts my-coords)))
>   (values my-exts my-coords)))
>  (details (ly:grob-property grob 'details))
>  (increment (assq-ref details 'increment))
>  (contour-thickness (assq-ref details 'contour-thickness))
>  (polygon-points-1 (map cons coords (map car exts)))
>  (polygon-points-2 (map cons coords (map cdr exts)))
>  (polygon-stencil
>   (ly:round-polygon (append-reverse polygon-points-1
> polygon-points-2)
> contour-thickness
> 1
> #f)))
> (let loop ((exts exts)
>

fermata inside staff with textScript

2022-05-27 Thread Ahanu Banerjee
Hello,

I am having trouble getting a fermata to appear inside the staff when
textScript (markup) is specified on the same side of the staff as the
fermata. (This is needed for a multi-voice context with tight spacing.)
Changing outside-staff-priority did not help. Is there an easy fix?


\version "2.23.8"
\relative c'' { \stemDown
% inverted fermata appears below textScript
a'_\markup "text" -\tweak Y-offset #0 _\fermata s4
%expected fermata placement
a -\tweak Y-offset #0 _\fermata }


Thanks,
-Ahanu


Re: Cluster fill-style

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 22:20, Simon Bailey a écrit :

Hi Jean,

actually, there seems to be a bit of a problem:

\new Voice {
  R1*3 | r2 r4.
  \makeClusters { 8 | q1 | q8  2. | q1 | q1 | q2 r2 }
  \barNumberCheck #10
  \makeClusters {
    1 | q4. 8 2 | q1 | q2 2 |
    \barNumberCheck #14 %1
    q2 2 | q2  | 2 q8. 8. 8 | q1 | q1 
| q2. 4 |

  }
  R1*47
  \makeClusters { 1 | q1 | 1 | 1 | 1 | q1 | q1 | 
q1 | }

  R1*11
  \barNumberCheck #86
}

gives the error message:

Starting lilypond.exe 2.23.9 [Untitled]...
Processing 
`C:/Users/sia/AppData/Local/Temp/frescobaldi-kad5rc1x/tmpi_go0x11/document.ly 
'

Parsing...
Interpreting music...[8][16][24][32][40][48][56][64][72][80]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...ice-9/eval.scm:155:9: In procedure car: Wrong type 
argument in position 1 (expecting pair): ()

Exited with return code 1.

If i comment out the 3rd \makeClusters, it works though.

Any ideas?



Without my code, the same example outputs a programming error,
so it's an existing bug. I've just filed an issue in the bug
tracker:

https://gitlab.com/lilypond/lilypond/-/issues/6354

Meanwhile, here is some code that works around the bug:



\version "2.23.10"

#(use-modules (ice-9 match)
  (srfi srfi-71))

#(define (cluster::dashed-fill grob)
   (let* ((columns (ly:grob-object grob 'columns))
  (column-list (ly:grob-array->list columns)))
 (if (not (pair? column-list)) ;; see issue #3654
 #f
 (let* ((x-refp (ly:grob-common-refpoint-of-array grob columns X))
    (y-refp (ly:grob-common-refpoint-of-array grob columns Y))
    (my-exts (map (lambda (c)
   (ly:grob-extent c y-refp Y))
 column-list))
    (my-coords (map (lambda (c)
 (ly:grob-relative-coordinate c x-refp X))
   column-list))
    (after-me (find-tail (lambda (s)
   (eq? s grob))
 (ly:spanner-broken-into 
(ly:grob-original grob

    (neighbor (and after-me
   (pair? (cdr after-me))
   (cadr after-me)))
    (exts coords (if neighbor
 (let* ((neighbor-cols (ly:grob-object 
neighbor 'columns))
    (neighbor-col-list 
(ly:grob-array->list neighbor-cols)))
   (if (not (null? neighbor-col-list)) 
;; issue #3654 as well
   (let* ((first-neighbor-col (car 
neighbor-col-list))

  (neighbor-refp
(ly:grob-common-refpoint-of-array
    neighbor
    neighbor-cols
    Y))
  (bound (ly:spanner-bound 
grob RIGHT)))

 (values
  (append my-exts
  (list (ly:grob-extent 
first-neighbor-col neighbor-refp Y)))

  (append my-coords
  (list 
(ly:grob-relative-coordinate bound x-refp X)

   (values my-exts my-coords)))
 (values my-exts my-coords)))
    (details (ly:grob-property grob 'details))
    (increment (assq-ref details 'increment))
    (contour-thickness (assq-ref details 'contour-thickness))
    (polygon-points-1 (map cons coords (map car exts)))
    (polygon-points-2 (map cons coords (map cdr exts)))
    (polygon-stencil
 (ly:round-polygon (append-reverse polygon-points-1 
polygon-points-2)

   contour-thickness
   1
   #f)))
   (let loop ((exts exts)
  (coords coords)
  (current (car coords))
  (stil empty-stencil))
 (if (null? (cdr coords))
 (ly:stencil-translate
  (ly:stencil-add stil polygon-stencil)
  (cons (- (ly:grob-relative-coordinate grob x-refp X))
    (- (ly:grob-relative-coordinate grob y-refp Y
 (let* ((t (/ (- current (car coords))
  (- (cadr coords)
 (car coords
    (1-t (- 1 t))
    (ext1 (car exts))
    (ext2 (cadr exts))
    (lo (+ (* 1-t (car ext1))

Re: Cluster fill-style

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 20:57, Simon Bailey a écrit :

Jean,

That's absolutely amazing, thanks so much!

However, unlike the "regular" clusters, it doesn't extend to the 
barlines, leaving some empty holes. See attached screenshots. (I'm 
running 2.23.9 on Windows).


I can provide a MWE of my score if you'd like.




Aye. I was lazy and thought you wouldn't need that :-)

Next try:


\version "2.23.9"

#(use-modules (ice-9 match))

#(define (cluster::dashed-fill grob)
   (let* ((columns (ly:grob-object grob 'columns))
  (column-list (ly:grob-array->list columns))
  (x-refp (ly:grob-common-refpoint-of-array grob columns X))
  (y-refp (ly:grob-common-refpoint-of-array grob columns Y))
  (my-exts (map (lambda (c)
 (ly:grob-extent c y-refp Y))
   column-list))
  (my-coords (map (lambda (c)
   (ly:grob-relative-coordinate c x-refp X))
 column-list))
  (after-me (find-tail (lambda (s)
 (eq? s grob))
   (ly:spanner-broken-into 
(ly:grob-original grob

  (neighbor (and after-me
 (pair? (cdr after-me))
 (cadr after-me)))
  (exts (if neighbor
    (append my-exts
    (let* ((neighbor-cols (ly:grob-object 
neighbor 'columns))
   (first-neighbor-col (car 
(ly:grob-array->list neighbor-cols)))
   (neighbor-refp 
(ly:grob-common-refpoint-of-array neighbor neighbor-cols Y)))
  (list (ly:grob-extent first-neighbor-col 
neighbor-refp Y

    my-exts))
  (coords (if neighbor
  (append my-coords
  (let ((bound (ly:spanner-bound grob RIGHT)))
    (list (ly:grob-relative-coordinate 
bound x-refp X

  my-coords))
  (details (ly:grob-property grob 'details))
  (increment (assq-ref details 'increment))
  (contour-thickness (assq-ref details 'contour-thickness))
  (polygon-points-1 (map cons coords (map car exts)))
  (polygon-points-2 (map cons coords (map cdr exts)))
  (polygon-stencil
   (ly:round-polygon (append-reverse polygon-points-1 
polygon-points-2)

 contour-thickness
 1
 #f)))
 (let loop ((exts exts)
    (coords coords)
    (current (car coords))
    (stil empty-stencil))
   (if (null? (cdr coords))
   (ly:stencil-translate
    (ly:stencil-add stil polygon-stencil)
    (cons (- (ly:grob-relative-coordinate grob x-refp X))
  (- (ly:grob-relative-coordinate grob y-refp Y
   (let* ((t (/ (- current (car coords))
    (- (cadr coords)
   (car coords
  (1-t (- 1 t))
  (ext1 (car exts))
  (ext2 (cadr exts))
  (lo (+ (* 1-t (car ext1))
 (* t (car ext2
  (hi (+ (* 1-t (cdr ext1))
 (* t (cdr ext2
  (part (ly:line-interface::line grob current lo 
current hi))

  (new-stil (ly:stencil-add stil part))
  (next (+ current increment))
  (stay (<= next (cadr coords
 (loop (if stay exts (cdr exts))
   (if stay coords (cdr coords))
   next
   new-stil))

\layout {
  \context {
    \Voice
    \override ClusterSpanner.stencil = #cluster::dashed-fill
    \override ClusterSpanner.style = #'dashed-line
    \override ClusterSpanner.thickness = 1.5
    \override ClusterSpanner.dash-period = 0.6
    \override ClusterSpanner.details.increment = 0.45
    \override ClusterSpanner.details.contour-thickness = 0.2
  }
}

%%%

\paper {
  ragged-right = ##t
}

\makeClusters {
  2   
  2  \break  
}



Best,
Jean




Re: Cluster fill-style

2022-05-27 Thread Simon Bailey
Hi Jean,

actually, there seems to be a bit of a problem:

\new Voice {
  R1*3 | r2 r4.
  \makeClusters { 8 | q1 | q8  2. | q1 | q1 | q2 r2 }
  \barNumberCheck #10
  \makeClusters {
1 | q4. 8 2 | q1 | q2 2 |
\barNumberCheck #14 %1
q2 2 | q2  | 2 q8. 8. 8 | q1 | q1 | q2.
4 |
  }
  R1*47
  \makeClusters { 1 | q1 | 1 | 1 | 1 | q1 | q1 | q1 |
}
  R1*11
  \barNumberCheck #86
}

gives the error message:

Starting lilypond.exe 2.23.9 [Untitled]...
Processing
`C:/Users/sia/AppData/Local/Temp/frescobaldi-kad5rc1x/tmpi_go0x11/
document.ly'
Parsing...
Interpreting music...[8][16][24][32][40][48][56][64][72][80]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...ice-9/eval.scm:155:9: In procedure car: Wrong type
argument in position 1 (expecting pair): ()
Exited with return code 1.

If i comment out the 3rd \makeClusters, it works though.

Any ideas?

Thanks, kind regards,
sb

On Fri, 27 May 2022 at 20:38, Simon Bailey  wrote:

> Hi Jean,
>
> sweet, that does the trick perfectly! Thanks for your help.
>
> Kind regards,
> sb
>
> On Fri, 27 May 2022 at 20:31, Jean Abou Samra  wrote:
>
>> Le 27/05/2022 à 20:57, Simon Bailey a écrit :
>> > Jean,
>> >
>> > That's absolutely amazing, thanks so much!
>> >
>> > However, unlike the "regular" clusters, it doesn't extend to the
>> > barlines, leaving some empty holes. See attached screenshots. (I'm
>> > running 2.23.9 on Windows).
>> >
>> > I can provide a MWE of my score if you'd like.
>>
>>
>>
>> Aye. I was lazy and thought you wouldn't need that :-)
>>
>> Next try:
>>
>>
>> \version "2.23.9"
>>
>> #(use-modules (ice-9 match))
>>
>> #(define (cluster::dashed-fill grob)
>> (let* ((columns (ly:grob-object grob 'columns))
>>(column-list (ly:grob-array->list columns))
>>(x-refp (ly:grob-common-refpoint-of-array grob columns X))
>>(y-refp (ly:grob-common-refpoint-of-array grob columns Y))
>>(my-exts (map (lambda (c)
>>   (ly:grob-extent c y-refp Y))
>> column-list))
>>(my-coords (map (lambda (c)
>> (ly:grob-relative-coordinate c x-refp X))
>>   column-list))
>>(after-me (find-tail (lambda (s)
>>   (eq? s grob))
>> (ly:spanner-broken-into
>> (ly:grob-original grob
>>(neighbor (and after-me
>>   (pair? (cdr after-me))
>>   (cadr after-me)))
>>(exts (if neighbor
>>  (append my-exts
>>  (let* ((neighbor-cols (ly:grob-object
>> neighbor 'columns))
>> (first-neighbor-col (car
>> (ly:grob-array->list neighbor-cols)))
>> (neighbor-refp
>> (ly:grob-common-refpoint-of-array neighbor neighbor-cols Y)))
>>(list (ly:grob-extent first-neighbor-col
>> neighbor-refp Y
>>  my-exts))
>>(coords (if neighbor
>>(append my-coords
>>(let ((bound (ly:spanner-bound grob
>> RIGHT)))
>>  (list (ly:grob-relative-coordinate
>> bound x-refp X
>>my-coords))
>>(details (ly:grob-property grob 'details))
>>(increment (assq-ref details 'increment))
>>(contour-thickness (assq-ref details 'contour-thickness))
>>(polygon-points-1 (map cons coords (map car exts)))
>>(polygon-points-2 (map cons coords (map cdr exts)))
>>(polygon-stencil
>> (ly:round-polygon (append-reverse polygon-points-1
>> polygon-points-2)
>>   contour-thickness
>>   1
>>   #f)))
>>   (let loop ((exts exts)
>>  (coords coords)
>>  (current (car coords))
>>  (stil empty-stencil))
>> (if (null? (cdr coords))
>> (ly:stencil-translate
>>  (ly:stencil-add stil polygon-stencil)
>>  (cons (- (ly:grob-relative-coordinate grob x-refp X))
>>(- (ly:grob-relative-coordinate grob y-refp Y
>> (let* ((t (/ (- current (car coords))
>>  (- (cadr coords)
>> (car coords
>>(1-t (- 1 t))
>>(ext1 (car exts))
>>(ext2 (cadr exts))
>>(lo (+ (* 1-t (car ext1))
>>   (* t (car ext2
>>(hi (+ (* 1-t (cdr ext1))
>>   (* t (cdr ext2
>>(part (ly:line-interface::line grob current lo
>> current hi))
>>(new-stil (ly:stencil-add stil part))
>>  

Re: Cluster fill-style

2022-05-27 Thread Simon Bailey
Hi Jean,

sweet, that does the trick perfectly! Thanks for your help.

Kind regards,
sb

On Fri, 27 May 2022 at 20:31, Jean Abou Samra  wrote:

> Le 27/05/2022 à 20:57, Simon Bailey a écrit :
> > Jean,
> >
> > That's absolutely amazing, thanks so much!
> >
> > However, unlike the "regular" clusters, it doesn't extend to the
> > barlines, leaving some empty holes. See attached screenshots. (I'm
> > running 2.23.9 on Windows).
> >
> > I can provide a MWE of my score if you'd like.
>
>
>
> Aye. I was lazy and thought you wouldn't need that :-)
>
> Next try:
>
>
> \version "2.23.9"
>
> #(use-modules (ice-9 match))
>
> #(define (cluster::dashed-fill grob)
> (let* ((columns (ly:grob-object grob 'columns))
>(column-list (ly:grob-array->list columns))
>(x-refp (ly:grob-common-refpoint-of-array grob columns X))
>(y-refp (ly:grob-common-refpoint-of-array grob columns Y))
>(my-exts (map (lambda (c)
>   (ly:grob-extent c y-refp Y))
> column-list))
>(my-coords (map (lambda (c)
> (ly:grob-relative-coordinate c x-refp X))
>   column-list))
>(after-me (find-tail (lambda (s)
>   (eq? s grob))
> (ly:spanner-broken-into
> (ly:grob-original grob
>(neighbor (and after-me
>   (pair? (cdr after-me))
>   (cadr after-me)))
>(exts (if neighbor
>  (append my-exts
>  (let* ((neighbor-cols (ly:grob-object
> neighbor 'columns))
> (first-neighbor-col (car
> (ly:grob-array->list neighbor-cols)))
> (neighbor-refp
> (ly:grob-common-refpoint-of-array neighbor neighbor-cols Y)))
>(list (ly:grob-extent first-neighbor-col
> neighbor-refp Y
>  my-exts))
>(coords (if neighbor
>(append my-coords
>(let ((bound (ly:spanner-bound grob RIGHT)))
>  (list (ly:grob-relative-coordinate
> bound x-refp X
>my-coords))
>(details (ly:grob-property grob 'details))
>(increment (assq-ref details 'increment))
>(contour-thickness (assq-ref details 'contour-thickness))
>(polygon-points-1 (map cons coords (map car exts)))
>(polygon-points-2 (map cons coords (map cdr exts)))
>(polygon-stencil
> (ly:round-polygon (append-reverse polygon-points-1
> polygon-points-2)
>   contour-thickness
>   1
>   #f)))
>   (let loop ((exts exts)
>  (coords coords)
>  (current (car coords))
>  (stil empty-stencil))
> (if (null? (cdr coords))
> (ly:stencil-translate
>  (ly:stencil-add stil polygon-stencil)
>  (cons (- (ly:grob-relative-coordinate grob x-refp X))
>(- (ly:grob-relative-coordinate grob y-refp Y
> (let* ((t (/ (- current (car coords))
>  (- (cadr coords)
> (car coords
>(1-t (- 1 t))
>(ext1 (car exts))
>(ext2 (cadr exts))
>(lo (+ (* 1-t (car ext1))
>   (* t (car ext2
>(hi (+ (* 1-t (cdr ext1))
>   (* t (cdr ext2
>(part (ly:line-interface::line grob current lo
> current hi))
>(new-stil (ly:stencil-add stil part))
>(next (+ current increment))
>(stay (<= next (cadr coords
>   (loop (if stay exts (cdr exts))
> (if stay coords (cdr coords))
> next
> new-stil))
>
> \layout {
>\context {
>  \Voice
>  \override ClusterSpanner.stencil = #cluster::dashed-fill
>  \override ClusterSpanner.style = #'dashed-line
>  \override ClusterSpanner.thickness = 1.5
>  \override ClusterSpanner.dash-period = 0.6
>  \override ClusterSpanner.details.increment = 0.45
>  \override ClusterSpanner.details.contour-thickness = 0.2
>}
> }
>
> %%%
>
> \paper {
>ragged-right = ##t
> }
>
> \makeClusters {
>2   
>2  \break  
> }
>
>
>
> Best,
> Jean
>
>

-- 
Do not meddle in the affairs of trombonists, for they are subtle and quick
to anger.


Re: Cluster fill-style

2022-05-27 Thread Simon Bailey
Jean,

That's absolutely amazing, thanks so much!

However, unlike the "regular" clusters, it doesn't extend to the barlines,
leaving some empty holes. See attached screenshots. (I'm running 2.23.9 on
Windows).

I can provide a MWE of my score if you'd like.

Thanks, kind regards,
sb


On Fri, 27 May 2022 at 17:09, Jean Abou Samra  wrote:

> Le 27/05/2022 à 11:41, Simon Bailey a écrit :
> > Hi,
> >
> > I'm in the process of typesetting some music that includes an
> > electronic component – still working out the best way to show that in
> > the score. Clusters might work, but is there any way to change the
> > fill style, so it's not solid black? maybe dotted or hashed something?
> >
> > Thanks, kind regards,
> > sb
>
>
>
> That doesn't exist by default, but you can code it. See
> the proof of concept below. Note that this requires a version
> in the 2.23 series.
>
> Best,
> Jean
>
>
>
> \version "2.23.9"
>
> #(use-modules (ice-9 match))
>
> #(define (cluster::dashed-fill grob)
> (let* ((columns (ly:grob-object grob 'columns))
>(column-list (ly:grob-array->list columns))
>(x-refp (ly:grob-common-refpoint-of-array grob columns X))
>(y-refp (ly:grob-common-refpoint-of-array grob columns Y))
>(exts (map (lambda (c)
> (ly:grob-extent c y-refp Y))
>   column-list))
>(coords (map (lambda (c)
>   (ly:grob-relative-coordinate c x-refp X))
> column-list))
>(details (ly:grob-property grob 'details))
>(increment (assq-ref details 'increment))
>(contour-thickness (assq-ref details 'contour-thickness))
>(polygon-points-1 (map cons coords (map car exts)))
>(polygon-points-2 (map cons coords (map cdr exts)))
>(polygon-stencil
> (ly:round-polygon (append-reverse polygon-points-1
> polygon-points-2)
>   contour-thickness
>   1
>   #f)))
>   (let loop ((exts exts)
>  (coords coords)
>  (current (car coords))
>  (stil empty-stencil))
> (if (null? (cdr coords))
> (ly:stencil-translate
>  (ly:stencil-add stil polygon-stencil)
>  (cons (- (ly:grob-relative-coordinate grob x-refp X))
>(- (ly:grob-relative-coordinate grob y-refp Y
> (let* ((t (/ (- current (car coords))
>  (- (cadr coords)
> (car coords
>(1-t (- 1 t))
>(ext1 (car exts))
>(ext2 (cadr exts))
>(lo (+ (* 1-t (car ext1))
>   (* t (car ext2
>(hi (+ (* 1-t (cdr ext1))
>   (* t (cdr ext2
>(part (ly:line-interface::line grob current lo
> current hi))
>(new-stil (ly:stencil-add stil part))
>(next (+ current increment))
>(stay (<= next (cadr coords
>   (loop (if stay exts (cdr exts))
> (if stay coords (cdr coords))
> next
> new-stil))
>
> \layout {
>\context {
>  \Voice
>  \override ClusterSpanner.stencil = #cluster::dashed-fill
>  \override ClusterSpanner.style = #'dashed-line
>  \override ClusterSpanner.thickness = 1.5
>  \override ClusterSpanner.dash-period = 0.6
>  \override ClusterSpanner.details.increment = 0.45
>  \override ClusterSpanner.details.contour-thickness = 0.2
>}
> }
>
>
> \makeClusters { 2}
>
>
>
>

-- 
Do not meddle in the affairs of trombonists, for they are subtle and quick
to anger.


Re: Openlilylib

2022-05-27 Thread Peter Crighton
Welcome back, Andrew, and thanks for picking up the OLL work again!

After a bit of a break I recently worked with LilyPond again and had to
search the mailing list for some time to get everything up and running with
the newest version and OLL again, which made me realise how much I rely on
OLL whilst not having the technical knowhow to fix things myself. So your
return and plans are very good news to me.
Could you perhaps post a summary with all the relevant links? For example,
I’m not sure if it’ll be the old GitHub repository or a fork, and I don’t
think I ever knew there was a Discourse forum (or I forgot).

Thanks,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
https://www.petercrighton.de


On Fri, 27 May 2022 at 10:28, Andrew Bernard 
wrote:

> Hello All,
>
> Having had to abandon the Openlilylib (OLL) work I took over from Urs
> Liska, for various reasons, in the meantime I went over to Dorico
> instead of Lilypond for my work. Having spent a lot of money on Dorico
> (AUD$800+) and given it my best shot for more than year, it really falls
> short for the modernist work that I do, dogmatically follows the Gould
> rule book and does not let you override most of that (it's what software
> people call an opinionated program), crashes often with the latest
> release and they cant solve it and just remain silent, and worse, the
> forum which I initially thought helpful is turning out to be quite toxic
> and I get a lot of personal abuse. along with deprecating comments about
> the music I work on. Consequently I have binned Dorico as of yesterday
> and I am coming back to lilypond.
>
> The upshot of that is that I suppose I should revive the OLL work. I'll
> recreate the dedicated server I set up, recreate the Discourse forum for
> discussion, and work on the git repository, then people can
> collaboratively work together again and I can take pull requests and so on.
>
> I stalled initially a couple of years ago when I decided to totally
> refactor the OLL github repostory, but now I think if we open it up
> again as is and I work on that on the background which would be useful.
>
> I'll pay for the server resources out of my own pocket, but provide a
> Paypal link for donations for running costs (server, domain name, etc).
>
> Andrew
>
>
>
>


Re: Cluster fill-style

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 11:41, Simon Bailey a écrit :

Hi,

I'm in the process of typesetting some music that includes an 
electronic component – still working out the best way to show that in 
the score. Clusters might work, but is there any way to change the 
fill style, so it's not solid black? maybe dotted or hashed something?


Thanks, kind regards,
sb




That doesn't exist by default, but you can code it. See
the proof of concept below. Note that this requires a version
in the 2.23 series.

Best,
Jean



\version "2.23.9"

#(use-modules (ice-9 match))

#(define (cluster::dashed-fill grob)
   (let* ((columns (ly:grob-object grob 'columns))
  (column-list (ly:grob-array->list columns))
  (x-refp (ly:grob-common-refpoint-of-array grob columns X))
  (y-refp (ly:grob-common-refpoint-of-array grob columns Y))
  (exts (map (lambda (c)
   (ly:grob-extent c y-refp Y))
 column-list))
  (coords (map (lambda (c)
 (ly:grob-relative-coordinate c x-refp X))
   column-list))
  (details (ly:grob-property grob 'details))
  (increment (assq-ref details 'increment))
  (contour-thickness (assq-ref details 'contour-thickness))
  (polygon-points-1 (map cons coords (map car exts)))
  (polygon-points-2 (map cons coords (map cdr exts)))
  (polygon-stencil
   (ly:round-polygon (append-reverse polygon-points-1 
polygon-points-2)

 contour-thickness
 1
 #f)))
 (let loop ((exts exts)
    (coords coords)
    (current (car coords))
    (stil empty-stencil))
   (if (null? (cdr coords))
   (ly:stencil-translate
    (ly:stencil-add stil polygon-stencil)
    (cons (- (ly:grob-relative-coordinate grob x-refp X))
  (- (ly:grob-relative-coordinate grob y-refp Y
   (let* ((t (/ (- current (car coords))
    (- (cadr coords)
   (car coords
  (1-t (- 1 t))
  (ext1 (car exts))
  (ext2 (cadr exts))
  (lo (+ (* 1-t (car ext1))
 (* t (car ext2
  (hi (+ (* 1-t (cdr ext1))
 (* t (cdr ext2
  (part (ly:line-interface::line grob current lo 
current hi))

  (new-stil (ly:stencil-add stil part))
  (next (+ current increment))
  (stay (<= next (cadr coords
 (loop (if stay exts (cdr exts))
   (if stay coords (cdr coords))
   next
   new-stil))

\layout {
  \context {
    \Voice
    \override ClusterSpanner.stencil = #cluster::dashed-fill
    \override ClusterSpanner.style = #'dashed-line
    \override ClusterSpanner.thickness = 1.5
    \override ClusterSpanner.dash-period = 0.6
    \override ClusterSpanner.details.increment = 0.45
    \override ClusterSpanner.details.contour-thickness = 0.2
  }
}


\makeClusters { 2}






Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 11:22 Uhr schrieb Thomas Morley
:
>
> Hi,
>
> lsr-snippet "Variable bow thickness depending on length"
> https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
> to calculate a modified thickness.
>
> For recent lily-versions this throws
> programming error: cyclic dependency: calculation-in-progress
> encountered for Slur.thickness
> as soon as 'control-points are called in a thickness-override.
>
> Stripped down example:
>
> \version "2.23.9"
>
> {
>   \override Slur.thickness =
>   #(lambda (grob)
> ;; all of below trigger the programming error
> (ly:slur::calc-control-points grob)
> ;(ly:grob-property grob 'control-points)
> ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
> 2)
>
>   b1( b')
> }
>
> I think I can make it work with an override for 'after-line-breaking
> (calling 'control-points, set 'thickness to the result of calculations
> based on the 'control-points and finally redo setting
> 'control-points).
>
> Is there a better way?
>
> Thanks,
>   Harm

Snippet "Modifying a slur by offsetting the positions property"
https://lsr.di.unimi.it/LSR/Item?u=1=748 had a similar problem.
I fixed it in s similar way. (Old code is still there, but commented for now)

Cheers,
  Harm



Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 14:59 Uhr schrieb Jean Abou Samra :
>
>
>
> Le 27/05/2022 à 13:28, Thomas Morley a écrit :
> > I decided to go for a better approximation of the bow-length, but
> > dropped some comments what to do, if execution time gets worse.
> > https://lsr.di.unimi.it/LSR/Item?u=1=1028
>
> Here's an experiment:
>
> \version "2.23.9"
>
> #(define (bezier-curve control-points t)
> "Given a Bezier curve of arbitrary degree specified by @var{control-points},
> compute the point at the specified position @var{t}."
>(if (< 1 (length control-points))
>(let ((q0 (bezier-curve (drop-right control-points 1) t))
>  (q1 (bezier-curve (drop control-points 1) t)))
>  (cons
>(+ (* (car q0) (- 1 t)) (* (car q1) t))
>(+ (* (cdr q0) (- 1 t)) (* (cdr q1) t
>(car control-points)))
>
> #(define (bezier-approx-length control-points from to steps)
> "Given a Bezier curve of arbitrary degree specified by @var{control-points},
> compute its approximate arc length between the positions @var{from} and
> @var{to}."
>(let* ((params (iota steps from (/ (- to from) (1- steps
>   (points (map (lambda (x) (bezier-curve control-points x)) params))
>   (length
> (fold
>   (lambda (a b prev)
> (+ prev (ly:length (- (car a) (car b)) (- (cdr a) (cdr
> b)
>   0
>   (drop points 1)
>   (drop-right points 1
>  ; Need to support negative length when the range is inverted.
>  (if (< from to) length (- length
>
>
> #(let ((bezier '((0 . 0) (1 . 1) (2 . 1) (3 . 0
> (for-each
>  (lambda (n)
>(ly:message "bezier-approx-length with ~a segments: ~a"
>n
>(bezier-approx-length bezier 0 1 n)))
>  '(10 50 100 500 1000 5000 1)))
>
>
> =>
>
>
> bezier-approx-length with 10 segments: 3.439011160316537
>
> bezier-approx-length with 50 segments: 3.44323346616539
>
> bezier-approx-length with 100 segments: 3.4433446505712593
>
> bezier-approx-length with 500 segments: 3.4433793042010272
>
> bezier-approx-length with 1000 segments: 3.443380369827364
>
> bezier-approx-length with 5000 segments: 3.4433807099411706
>
> bezier-approx-length with 1 segments: 3.443380720552721
>
> I don't think doing many iterations is worth it here.
>

Using your test-code I did own experiments with more crazy
control-points like '((17 . 0) (8 . 10) (22 . 10) (13 . 0)).
While I got differences up to ~0.15, those beziers will not occur in
real music, afact.
Thus I'll reduce the steps in said snippt to 10, usually very nice already.

Thanks,
  Harm



Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 13:28, Thomas Morley a écrit :

I decided to go for a better approximation of the bow-length, but
dropped some comments what to do, if execution time gets worse.
https://lsr.di.unimi.it/LSR/Item?u=1=1028


Here's an experiment:

\version "2.23.9"

#(define (bezier-curve control-points t)
"Given a Bezier curve of arbitrary degree specified by @var{control-points},
compute the point at the specified position @var{t}."
  (if (< 1 (length control-points))
  (let ((q0 (bezier-curve (drop-right control-points 1) t))
    (q1 (bezier-curve (drop control-points 1) t)))
    (cons
  (+ (* (car q0) (- 1 t)) (* (car q1) t))
  (+ (* (cdr q0) (- 1 t)) (* (cdr q1) t
  (car control-points)))

#(define (bezier-approx-length control-points from to steps)
"Given a Bezier curve of arbitrary degree specified by @var{control-points},
compute its approximate arc length between the positions @var{from} and 
@var{to}."

  (let* ((params (iota steps from (/ (- to from) (1- steps
 (points (map (lambda (x) (bezier-curve control-points x)) params))
 (length
   (fold
 (lambda (a b prev)
   (+ prev (ly:length (- (car a) (car b)) (- (cdr a) (cdr 
b)

 0
 (drop points 1)
 (drop-right points 1
    ; Need to support negative length when the range is inverted.
    (if (< from to) length (- length


#(let ((bezier '((0 . 0) (1 . 1) (2 . 1) (3 . 0
   (for-each
    (lambda (n)
  (ly:message "bezier-approx-length with ~a segments: ~a"
  n
  (bezier-approx-length bezier 0 1 n)))
    '(10 50 100 500 1000 5000 1)))


=>


bezier-approx-length with 10 segments: 3.439011160316537

bezier-approx-length with 50 segments: 3.44323346616539

bezier-approx-length with 100 segments: 3.4433446505712593

bezier-approx-length with 500 segments: 3.4433793042010272

bezier-approx-length with 1000 segments: 3.443380369827364

bezier-approx-length with 5000 segments: 3.4433807099411706

bezier-approx-length with 1 segments: 3.443380720552721

I don't think doing many iterations is worth it here.




Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 11:58 Uhr schrieb Thomas Morley
:
>
> Am Fr., 27. Mai 2022 um 11:22 Uhr schrieb Thomas Morley
> :
> >
> > Hi,
> >
> > lsr-snippet "Variable bow thickness depending on length"
> > https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
> > to calculate a modified thickness.
> >
> > For recent lily-versions this throws
> > programming error: cyclic dependency: calculation-in-progress
> > encountered for Slur.thickness
> > as soon as 'control-points are called in a thickness-override.
> >
> > Stripped down example:
> >
> > \version "2.23.9"
> >
> > {
> >   \override Slur.thickness =
> >   #(lambda (grob)
> > ;; all of below trigger the programming error
> > (ly:slur::calc-control-points grob)
> > ;(ly:grob-property grob 'control-points)
> > ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
> > 2)
> >
> >   b1( b')
> > }
> >
> > I think I can make it work with an override for 'after-line-breaking
> > (calling 'control-points, set 'thickness to the result of calculations
> > based on the 'control-points and finally redo setting
> > 'control-points).
> >
> > Is there a better way?
> >
> > Thanks,
> >   Harm
>
> Btw, the snippet-description says " bow length is estimated by
> calculating the linear distance between its endpoints".
> Is it worth the effort to calculate the real bow-length?
>
> Thanks,
>   Harm

I decided to go for a better approximation of the bow-length, but
dropped some comments what to do, if execution time gets worse.
https://lsr.di.unimi.it/LSR/Item?u=1=1028

Cheers,
  Harm



Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 12:05 Uhr schrieb Jean Abou Samra :
>
>
>
> Le 27/05/2022 à 11:54, Thomas Morley a écrit :
> > Thanks Jean!
> > After further thinking and testing I'll not reset the 'control-points:
> > It would trash a user-tweak for \shape and ua ser-override for \shape
> > returns a more serious ERROR:
> >
> > #(define (variable-bow-thickness-harm min-l max-l min-t max-t)
> >(lambda (grob)
> >(let* ((cpt (ly:grob-property grob 'control-points))
> >   (cp0 (car cpt))
> >   (cp3 (cadddr cpt))
> >   (dx (- (car cp3) (car cp0)))
> >   (dy (- (cdr cp3) (cdr cp0)))
> >   (len (magnitude (make-rectangular dx dy)))
> >   (thickness
> > (cond ((< len min-l) min-t)
> >   ((> len max-l) max-t)
> >   (else
> > (+ min-t
> >   (* (- len min-l)
> >  (/ (- max-t min-t)
> > (- max-l min-l
> >  (ly:grob-set-property! grob 'thickness thickness)
> >  ;; DELETE-ME:
> >  (ly:grob-set-property! grob 'control-points
> >((assoc-get 'control-points (ly:grob-basic-properties grob)) 
> > grob))
> >)))
> >
> > {
> >\override Slur.after-line-breaking = #(variable-bow-thickness-harm 1 2 1 
> > 33)
> >
> >%% \shape as override errors, if overruled by the 'thickness-override
> >\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0) ) Slur
> >b1( b')
> >
> >%% \shape as tweak works, if not overruled by the 'thickness-override
> >%b1-\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0)) ( b')
> > }
> >
> > =>
> > ERROR: Wrong type to apply: # > 560c1a58a580 at ice-9/eval.scm:333:13 (a)> # > ice-9/eval.scm:386:13 (a . rest)> >
>
>
> \shape puts an unpure-pure container in the result of
> ly:grob-basic-properties, you can't call that as if it
> were a function. Rather:
>
>
> \version "2.23.9"
>
> #(define (variable-bow-thickness-harm min-l max-l min-t max-t)
>(lambda (grob)
>  (let* ((cpt-computer
>  (ly:grob-property-data grob 'control-points))
> (cpt (ly:grob-property grob 'control-points))
> (cp0 (car cpt))
> (cp3 (cadddr cpt))
> (dx (- (car cp3) (car cp0)))
> (dy (- (cdr cp3) (cdr cp0)))
> (len (magnitude (make-rectangular dx dy)))
> (thickness
>   (cond ((< len min-l) min-t)
> ((> len max-l) max-t)
> (else
>   (+ min-t
> (* (- len min-l)
>(/ (- max-t min-t)
>   (- max-l min-l
>(ly:grob-set-property! grob 'thickness thickness)
>(ly:grob-set-property! grob 'control-points (ly:unpure-call
> cpt-computer grob)
>
> {
>\override Slur.after-line-breaking = #(variable-bow-thickness-harm 1
> 2 1 33)
>
>b1( b')
>
>\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0) ) Slur
>b1( b')
>
>b1-\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0)) ( b')
> }
>
>
> Best,
> Jean
>

Works nicely.

Again, thanks a lot,
  Harm



Re: Scheme function and top-level markup

2022-05-27 Thread Simon Albrecht

Hi Jean,

On 27/05/2022 12:34, Jean Abou Samra wrote:
The solution for now is to use a plain Scheme function: 



Thanks a bunch for the solution and explanations, that does it!

Best, Simon




Re: Openlilylib

2022-05-27 Thread Simon Albrecht

Hi Andrew,

sorry that your investments into Dorico didn’t work out! It’s great to 
have you back in the Pond :)


I have been thinking that it would be nice to invest more time into Lily 
myself, but I don’t yet know whether/how/when I can make that happen.


Best, Simon

On 27/05/2022 10:24, Andrew Bernard wrote:

Hello All,

Having had to abandon the Openlilylib (OLL) work I took over from Urs 
Liska, for various reasons, in the meantime I went over to Dorico 
instead of Lilypond for my work. Having spent a lot of money on Dorico 
(AUD$800+) and given it my best shot for more than year, it really 
falls short for the modernist work that I do, dogmatically follows the 
Gould rule book and does not let you override most of that (it's what 
software people call an opinionated program), crashes often with the 
latest release and they cant solve it and just remain silent, and 
worse, the forum which I initially thought helpful is turning out to 
be quite toxic and I get a lot of personal abuse. along with 
deprecating comments about the music I work on. Consequently I have 
binned Dorico as of yesterday and I am coming back to lilypond.


The upshot of that is that I suppose I should revive the OLL work. 
I'll recreate the dedicated server I set up, recreate the Discourse 
forum for discussion, and work on the git repository, then people can 
collaboratively work together again and I can take pull requests and 
so on.


I stalled initially a couple of years ago when I decided to totally 
refactor the OLL github repostory, but now I think if we open it up 
again as is and I work on that on the background which would be useful.


I'll pay for the server resources out of my own pocket, but provide a 
Paypal link for donations for running costs (server, domain name, etc).


Andrew







Re: Scheme function and top-level markup

2022-05-27 Thread Simon Albrecht

Sorry for the garbled line breaks, I’ll try again:

%%% \version "2.23.9"

pieceTitle =
#(define-scheme-function (str) (markup?)
   #{
 \markup \huge $str
 \noPageBreak
   #})

\pieceTitle "I. Kyrie"
{ c'1 }
%


Parsing...
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:7:6: error: markup outside of 
text script or \lyricmode
 
 \markup \huge $str

/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: error in #{ ... 
#}

\pieceTitle "I. Kyrie"
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: bad expression 
type

\pieceTitle "I. Kyrie"
%%

On 27/05/2022 12:21, Simon Albrecht wrote:

Hello everyone,

I’m a bit surprised that the following doesn’t work and don’t know 
where to look for a solution.


% \version "2.23.9" pieceTitle = 
#(define-scheme-function (str) (markup?)    #{  \markup \huge $str 
 \noPageBreak    #}) \pieceTitle "I. Kyrie" { c'1 } 
%%%


Here are the error messages:

%%% Parsing... 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:7:6: error: markup 
outside of text script or \lyricmode \markup \huge $str 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: error 
in #{ ... #} \pieceTitle "I. Kyrie" 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: bad 
expression type \pieceTitle "I. Kyrie" %%%


What can I do?

Best, Simon






Re: Scheme function and top-level markup

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 12:21, Simon Albrecht a écrit :

Hello everyone,

I’m a bit surprised that the following doesn’t work and don’t know 
where to look for a solution.


% \version "2.23.9" pieceTitle = 
#(define-scheme-function (str) (markup?)    #{  \markup \huge $str 
 \noPageBreak    #}) \pieceTitle "I. Kyrie" { c'1 } 
%%%


Here are the error messages:

%%% Parsing... 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:7:6: error: markup 
outside of text script or \lyricmode \markup \huge $str 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: error 
in #{ ... #} \pieceTitle "I. Kyrie" 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: bad 
expression type \pieceTitle "I. Kyrie" %%%


What can I do?

Best, Simon




#{ #} is not as close to allowing to write "macros" as it
looks like. When you do

#{
   thing 1
   thing 2
   thing 3
#}

this combines the things into a sequential music expression,
as if it were

#{
   {
 thing 1
 thing 2
 thing 3
   }
#}

So you can't put several elements of which one is a markup,
just like you can't do

{
  \markup x
  c'1
}


The solution is not to combine these but to return them separately.
Sadly, this is not currently possible with syntax functions:

https://gitlab.com/lilypond/lilypond/-/issues/6333

The solution for now is to use a plain Scheme function:

\version "2.23.9"

pieceTitle =
#(lambda (str)
   (values #{ \markup \huge $str #}
   #{ \noPageBreak #}))

$(pieceTitle "I. Kyrie")

{ c'1 }


Best,
Jean




Scheme function and top-level markup

2022-05-27 Thread Simon Albrecht

Hello everyone,

I’m a bit surprised that the following doesn’t work and don’t know where 
to look for a solution.


% \version "2.23.9" pieceTitle = 
#(define-scheme-function (str) (markup?)    #{  \markup \huge $str 
 \noPageBreak    #}) \pieceTitle "I. Kyrie" { c'1 } 
%%%


Here are the error messages:

%%% Parsing... 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:7:6: error: markup 
outside of text script or \lyricmode \markup \huge $str 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: error in 
#{ ... #} \pieceTitle "I. Kyrie" 
/tmp/frescobaldi-0fy0zxi0/tmpkd3e8qov/document.ly:11:1: error: bad 
expression type \pieceTitle "I. Kyrie" %%%


What can I do?

Best, Simon




Re: Combining part-files into full scores

2022-05-27 Thread peter
> "Paul" == Paul McKay  writes:

Paul> I’m inputting Scottish dance music for the accordion. It has my
Paul> own preferences about chord naming and positioning and also
Paul> fingering on the notes themselves. Each one has a shape like
Paul> this:

What I do for this kind of thing is use a slightly different layout.

Each file contains:
---
\header {
 title = "Overall Title"
 piece = "title of this piece"
 }

tune =  \relative c'' {c c c c}

\score {
   \new Staff \tune
   \header {piece = "title of this piece"}
   \layout {}
}

\score {
   \unfoldRepeats \tune
   \midi {
 \tempo 4 = 120
   }
}
--
Then I have a global file

---
\header {
title = "CollectionTitle"
}

\paper {
  scoreTitleMarkup = \markup {
  \fill-line {
\fontsize #3 \bold \fromproperty #'header:piece
  }
}
}

\include "piece1"
\include "piece2"
...
---

This creates a bunch of Midi files and a single PDF file.

Peter C



Re: Openlilylib

2022-05-27 Thread David Santamauro
Just another Dorico opinion, not in any way denying yours…

I’ve worked with Dorico for the last few years exclusively for mockups of 
original work , transcriptions and orchestrations. It is a tremendous piece of 
software in particular the playback engine. There is definitely a steep 
learning curve but once one understands the concept behind the software, it 
becomes incredibly easy to input, edit and play scores. Depending on your 
software instruments and the intricacies of your playback templates, rendering 
the performance can be  extremely realistic.

As for the forum, I don’t live there so I don’t catch every thread, but my 
experience has been generally positive. There are many “gurus” lurking there 
that can answer most questions and I’ve never seen any animosity towards other 
forum members (excepting, of course, the usual RTFM answers …)

Stability has also never been a problem for me. My template is huge: full 
orchestra routed to 8 instances of Vienna Server housing more than 1.5T of 
software instrument samples. My template used ~ 128G in-memory. Aside from 
having to get a coffee while it loaded, working in it for extended periods of 
time was rather uneventful from a stability standpoint.

I am definitely not advocating for anyone to switch / trial / whatever to 
Dorico. It is simply another tool in my box with which to solve particular 
problems. I use (have been for well over a decade) lilypond exclusively for 
copying scores as it is by far the fastest way for me to input notes and get 
the score as close as possible to the original edition I’m copying. The added 
benefit of midi allows me to toss that output into a sequencer if I want to 
turn it into a mockup.

I’m sorry you didn’t have a good experience with Dorico, but I just wanted to 
share a differing opinion.

David

From: lilypond-user  
on behalf of Andrew Bernard 
Date: Friday, May 27, 2022 at 4:26 AM
To: lilypond-user@gnu.org 
Subject: Openlilylib
Hello All,

Having had to abandon the Openlilylib (OLL) work I took over from Urs
Liska, for various reasons, in the meantime I went over to Dorico
instead of Lilypond for my work. Having spent a lot of money on Dorico
(AUD$800+) and given it my best shot for more than year, it really falls
short for the modernist work that I do, dogmatically follows the Gould
rule book and does not let you override most of that (it's what software
people call an opinionated program), crashes often with the latest
release and they cant solve it and just remain silent, and worse, the
forum which I initially thought helpful is turning out to be quite toxic
and I get a lot of personal abuse. along with deprecating comments about
the music I work on. Consequently I have binned Dorico as of yesterday
and I am coming back to lilypond.

The upshot of that is that I suppose I should revive the OLL work. I'll
recreate the dedicated server I set up, recreate the Discourse forum for
discussion, and work on the git repository, then people can
collaboratively work together again and I can take pull requests and so on.

I stalled initially a couple of years ago when I decided to totally
refactor the OLL github repostory, but now I think if we open it up
again as is and I work on that on the background which would be useful.

I'll pay for the server resources out of my own pocket, but provide a
Paypal link for donations for running costs (server, domain name, etc).

Andrew




Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 11:54, Thomas Morley a écrit :

Thanks Jean!
After further thinking and testing I'll not reset the 'control-points:
It would trash a user-tweak for \shape and ua ser-override for \shape
returns a more serious ERROR:

#(define (variable-bow-thickness-harm min-l max-l min-t max-t)
   (lambda (grob)
   (let* ((cpt (ly:grob-property grob 'control-points))
  (cp0 (car cpt))
  (cp3 (cadddr cpt))
  (dx (- (car cp3) (car cp0)))
  (dy (- (cdr cp3) (cdr cp0)))
  (len (magnitude (make-rectangular dx dy)))
  (thickness
(cond ((< len min-l) min-t)
  ((> len max-l) max-t)
  (else
(+ min-t
  (* (- len min-l)
 (/ (- max-t min-t)
(- max-l min-l
 (ly:grob-set-property! grob 'thickness thickness)
 ;; DELETE-ME:
 (ly:grob-set-property! grob 'control-points
   ((assoc-get 'control-points (ly:grob-basic-properties grob)) grob))
   )))

{
   \override Slur.after-line-breaking = #(variable-bow-thickness-harm 1 2 1 33)

   %% \shape as override errors, if overruled by the 'thickness-override
   \shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0) ) Slur
   b1( b')

   %% \shape as tweak works, if not overruled by the 'thickness-override
   %b1-\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0)) ( b')
}

=>
ERROR: Wrong type to apply: # # >



\shape puts an unpure-pure container in the result of
ly:grob-basic-properties, you can't call that as if it
were a function. Rather:


\version "2.23.9"

#(define (variable-bow-thickness-harm min-l max-l min-t max-t)
  (lambda (grob)
    (let* ((cpt-computer
    (ly:grob-property-data grob 'control-points))
   (cpt (ly:grob-property grob 'control-points))
   (cp0 (car cpt))
   (cp3 (cadddr cpt))
   (dx (- (car cp3) (car cp0)))
   (dy (- (cdr cp3) (cdr cp0)))
   (len (magnitude (make-rectangular dx dy)))
   (thickness
 (cond ((< len min-l) min-t)
   ((> len max-l) max-t)
   (else
 (+ min-t
   (* (- len min-l)
  (/ (- max-t min-t)
 (- max-l min-l
  (ly:grob-set-property! grob 'thickness thickness)
  (ly:grob-set-property! grob 'control-points (ly:unpure-call 
cpt-computer grob)


{
  \override Slur.after-line-breaking = #(variable-bow-thickness-harm 1 
2 1 33)


  b1( b')

  \shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0) ) Slur
  b1( b')

  b1-\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0)) ( b')
}


Best,
Jean




Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 11:22 Uhr schrieb Thomas Morley
:
>
> Hi,
>
> lsr-snippet "Variable bow thickness depending on length"
> https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
> to calculate a modified thickness.
>
> For recent lily-versions this throws
> programming error: cyclic dependency: calculation-in-progress
> encountered for Slur.thickness
> as soon as 'control-points are called in a thickness-override.
>
> Stripped down example:
>
> \version "2.23.9"
>
> {
>   \override Slur.thickness =
>   #(lambda (grob)
> ;; all of below trigger the programming error
> (ly:slur::calc-control-points grob)
> ;(ly:grob-property grob 'control-points)
> ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
> 2)
>
>   b1( b')
> }
>
> I think I can make it work with an override for 'after-line-breaking
> (calling 'control-points, set 'thickness to the result of calculations
> based on the 'control-points and finally redo setting
> 'control-points).
>
> Is there a better way?
>
> Thanks,
>   Harm

Btw, the snippet-description says " bow length is estimated by
calculating the linear distance between its endpoints".
Is it worth the effort to calculate the real bow-length?

Thanks,
  Harm



Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Am Fr., 27. Mai 2022 um 11:32 Uhr schrieb Jean Abou Samra :
>
>
>
> Le 27/05/2022 à 11:22, Thomas Morley a écrit :
> > Hi,
> >
> > lsr-snippet "Variable bow thickness depending on length"
> > https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
> > to calculate a modified thickness.
> >
> > For recent lily-versions this throws
> > programming error: cyclic dependency: calculation-in-progress
> > encountered for Slur.thickness
> > as soon as 'control-points are called in a thickness-override.
> >
> > Stripped down example:
> >
> > \version "2.23.9"
> >
> > {
> >\override Slur.thickness =
> >#(lambda (grob)
> >  ;; all of below trigger the programming error
> >  (ly:slur::calc-control-points grob)
> >  ;(ly:grob-property grob 'control-points)
> >  ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
> >  2)
> >
> >b1( b')
> > }
> >
> > I think I can make it work with an override for 'after-line-breaking
> > (calling 'control-points, set 'thickness to the result of calculations
> > based on the 'control-points and finally redo setting
> > 'control-points).
> >
> > Is there a better way?
>
>
> Yes, quite logical since the control points depend on the
> thickness. No, short of refactoring the C++ code, I don't
> see a better way than what you described.
>
> Best,
> Jean
>

Thanks Jean!
After further thinking and testing I'll not reset the 'control-points:
It would trash a user-tweak for \shape and ua ser-override for \shape
returns a more serious ERROR:

#(define (variable-bow-thickness-harm min-l max-l min-t max-t)
  (lambda (grob)
  (let* ((cpt (ly:grob-property grob 'control-points))
 (cp0 (car cpt))
 (cp3 (cadddr cpt))
 (dx (- (car cp3) (car cp0)))
 (dy (- (cdr cp3) (cdr cp0)))
 (len (magnitude (make-rectangular dx dy)))
 (thickness
   (cond ((< len min-l) min-t)
 ((> len max-l) max-t)
 (else
   (+ min-t
 (* (- len min-l)
(/ (- max-t min-t)
   (- max-l min-l
(ly:grob-set-property! grob 'thickness thickness)
;; DELETE-ME:
(ly:grob-set-property! grob 'control-points
  ((assoc-get 'control-points (ly:grob-basic-properties grob)) grob))
  )))

{
  \override Slur.after-line-breaking = #(variable-bow-thickness-harm 1 2 1 33)

  %% \shape as override errors, if overruled by the 'thickness-override
  \shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0) ) Slur
  b1( b')

  %% \shape as tweak works, if not overruled by the 'thickness-override
  %b1-\shape #'((10 . 0) (0 . 0) (0 . 0) (0 . 0)) ( b')
}

=>
ERROR: Wrong type to apply: # # >

Cheers,
  Harm



Cluster fill-style

2022-05-27 Thread Simon Bailey
Hi,

I'm in the process of typesetting some music that includes an electronic
component – still working out the best way to show that in the score.
Clusters might work, but is there any way to change the fill style, so it's
not solid black? maybe dotted or hashed something?

Thanks, kind regards,
sb

-- 
Do not meddle in the affairs of trombonists, for they are subtle and quick
to anger.


Re: programming error for thickness/control-points of Slur

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 11:22, Thomas Morley a écrit :

Hi,

lsr-snippet "Variable bow thickness depending on length"
https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
to calculate a modified thickness.

For recent lily-versions this throws
programming error: cyclic dependency: calculation-in-progress
encountered for Slur.thickness
as soon as 'control-points are called in a thickness-override.

Stripped down example:

\version "2.23.9"

{
   \override Slur.thickness =
   #(lambda (grob)
 ;; all of below trigger the programming error
 (ly:slur::calc-control-points grob)
 ;(ly:grob-property grob 'control-points)
 ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
 2)

   b1( b')
}

I think I can make it work with an override for 'after-line-breaking
(calling 'control-points, set 'thickness to the result of calculations
based on the 'control-points and finally redo setting
'control-points).

Is there a better way?



Yes, quite logical since the control points depend on the
thickness. No, short of refactoring the C++ code, I don't
see a better way than what you described.

Best,
Jean




programming error for thickness/control-points of Slur

2022-05-27 Thread Thomas Morley
Hi,

lsr-snippet "Variable bow thickness depending on length"
https://lsr.di.unimi.it/LSR/Item?u=1=1028 looks at 'control-points
to calculate a modified thickness.

For recent lily-versions this throws
programming error: cyclic dependency: calculation-in-progress
encountered for Slur.thickness
as soon as 'control-points are called in a thickness-override.

Stripped down example:

\version "2.23.9"

{
  \override Slur.thickness =
  #(lambda (grob)
;; all of below trigger the programming error
(ly:slur::calc-control-points grob)
;(ly:grob-property grob 'control-points)
;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
2)

  b1( b')
}

I think I can make it work with an override for 'after-line-breaking
(calling 'control-points, set 'thickness to the result of calculations
based on the 'control-points and finally redo setting
'control-points).

Is there a better way?

Thanks,
  Harm



Re: Openlilylib

2022-05-27 Thread Adam M. Griggs
Welcome back, and thank you.

Having read your account of your situation, and knowing nothing else about
your circumstances or condition, I hope we'll have you around with us for a
good, long while yet.


On Fri, 27 May 2022, 17:27 Andrew Bernard, 
wrote:

> Hello All,
>
> Having had to abandon the Openlilylib (OLL) work I took over from Urs
> Liska, for various reasons, in the meantime I went over to Dorico
> instead of Lilypond for my work. Having spent a lot of money on Dorico
> (AUD$800+) and given it my best shot for more than year, it really falls
> short for the modernist work that I do, dogmatically follows the Gould
> rule book and does not let you override most of that (it's what software
> people call an opinionated program), crashes often with the latest
> release and they cant solve it and just remain silent, and worse, the
> forum which I initially thought helpful is turning out to be quite toxic
> and I get a lot of personal abuse. along with deprecating comments about
> the music I work on. Consequently I have binned Dorico as of yesterday
> and I am coming back to lilypond.
>
> The upshot of that is that I suppose I should revive the OLL work. I'll
> recreate the dedicated server I set up, recreate the Discourse forum for
> discussion, and work on the git repository, then people can
> collaboratively work together again and I can take pull requests and so on.
>
> I stalled initially a couple of years ago when I decided to totally
> refactor the OLL github repostory, but now I think if we open it up
> again as is and I work on that on the background which would be useful.
>
> I'll pay for the server resources out of my own pocket, but provide a
> Paypal link for donations for running costs (server, domain name, etc).
>
> Andrew
>
>
>
>


Openlilylib

2022-05-27 Thread Andrew Bernard

Hello All,

Having had to abandon the Openlilylib (OLL) work I took over from Urs 
Liska, for various reasons, in the meantime I went over to Dorico 
instead of Lilypond for my work. Having spent a lot of money on Dorico 
(AUD$800+) and given it my best shot for more than year, it really falls 
short for the modernist work that I do, dogmatically follows the Gould 
rule book and does not let you override most of that (it's what software 
people call an opinionated program), crashes often with the latest 
release and they cant solve it and just remain silent, and worse, the 
forum which I initially thought helpful is turning out to be quite toxic 
and I get a lot of personal abuse. along with deprecating comments about 
the music I work on. Consequently I have binned Dorico as of yesterday 
and I am coming back to lilypond.


The upshot of that is that I suppose I should revive the OLL work. I'll 
recreate the dedicated server I set up, recreate the Discourse forum for 
discussion, and work on the git repository, then people can 
collaboratively work together again and I can take pull requests and so on.


I stalled initially a couple of years ago when I decided to totally 
refactor the OLL github repostory, but now I think if we open it up 
again as is and I work on that on the background which would be useful.


I'll pay for the server resources out of my own pocket, but provide a 
Paypal link for donations for running costs (server, domain name, etc).


Andrew





Re: PDF Bookmarks

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 10:16, Jean Abou Samra a écrit :



Le 27/05/2022 à 10:12, Jean Abou Samra a écrit :

Le 27/05/2022 à 10:08, Mark Probert a écrit :

Hi.

I note in the documentation for LP 2.22 that "PDF bookmarks are now
supported and allow for \tocItems entries to appear..."

Is there anything I need to do to make this happen? Or is on by
default? I ask because in my environment--Mac M1 OS11.6, LP 2.22.1--I
generate the PDF, with ToC, fine but there are no entries shown within
Preview (Which I believe does support bookmarks).

Any help appreciated.

TIA .. mark.



No, that should be sufficient. Can you send the input code
and resulting PDF file? It may be that your PDF viewer
simply does not support bookmarks.

Jean




Ah… Actually, I guess what might be going on. Are you using
a version of LilyPond that uses Guile 2? Homebrew, for
example? What does #(display (version)) print?

LilyPond has a bug in Guile 2 where the nesting of generated
bookmarks is incorrect. See

https://gitlab.com/lilypond/lilypond/-/issues/6302

It's possible to work around it by editing the file
ly/toc-init.ly in the LilyPond installation to change the
line

   (children . ())

into

   (cons 'children '())




Sorry, should have been

    ,(cons 'children '())

(with a comma at the beginning).





Re: PDF Bookmarks

2022-05-27 Thread Jean Abou Samra




Le 27/05/2022 à 10:12, Jean Abou Samra a écrit :

Le 27/05/2022 à 10:08, Mark Probert a écrit :

Hi.

I note in the documentation for LP 2.22 that "PDF bookmarks are now
supported and allow for \tocItems entries to appear..."

Is there anything I need to do to make this happen? Or is on by
default? I ask because in my environment--Mac M1 OS11.6, LP 2.22.1--I
generate the PDF, with ToC, fine but there are no entries shown within
Preview (Which I believe does support bookmarks).

Any help appreciated.

TIA .. mark.



No, that should be sufficient. Can you send the input code
and resulting PDF file? It may be that your PDF viewer
simply does not support bookmarks.

Jean




Ah… Actually, I guess what might be going on. Are you using
a version of LilyPond that uses Guile 2? Homebrew, for
example? What does #(display (version)) print?

LilyPond has a bug in Guile 2 where the nesting of generated
bookmarks is incorrect. See

https://gitlab.com/lilypond/lilypond/-/issues/6302

It's possible to work around it by editing the file
ly/toc-init.ly in the LilyPond installation to change the
line

   (children . ())

into

   (cons 'children '())

Best,
Jean








Re: PDF Bookmarks

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 10:08, Mark Probert a écrit :

Hi.

I note in the documentation for LP 2.22 that "PDF bookmarks are now
supported and allow for \tocItems entries to appear..."

Is there anything I need to do to make this happen? Or is on by
default? I ask because in my environment--Mac M1 OS11.6, LP 2.22.1--I
generate the PDF, with ToC, fine but there are no entries shown within
Preview (Which I believe does support bookmarks).

Any help appreciated.

TIA .. mark.



No, that should be sufficient. Can you send the input code
and resulting PDF file? It may be that your PDF viewer
simply does not support bookmarks.

Jean





PDF Bookmarks

2022-05-27 Thread Mark Probert


Hi. 

I note in the documentation for LP 2.22 that "PDF bookmarks are now 
supported and allow for \tocItems entries to appear..."

Is there anything I need to do to make this happen? Or is on by 
default? I ask because in my environment--Mac M1 OS11.6, LP 2.22.1--I 
generate the PDF, with ToC, fine but there are no entries shown within 
Preview (Which I believe does support bookmarks). 

Any help appreciated.

TIA .. mark.



Re: Is there a way to set the midiInstrument for ChordNames with FretBoards?

2022-05-27 Thread Jean Abou Samra

Le 27/05/2022 à 03:40, Kevin Cole a écrit :

Hi,

I have a score with an outline shown below. I managed to get the vocal
part doing "choir aahs", and the piano defaults to a piano instrument,
but is there a way to have ChordNames / FretBoards do anything with
"acoustic guitar (nylon)"?  Even if the playback isn't super accurate
in terms of duration, it seems like, with the fretboards, it would be
able to have a half-educated notion of which notes to sound.)




I don't understand the question. Isn't it the same as what
you already did with Staff?

\new ChordNames \with {
  midiInstrument = "acoustic guitar (nylon)"
} ...



(And, is there a better way to set the "choir aahs" -- without
changing the whole thing around too much? It somehow feels redundant
to add "\new Staff" around the "\new Voice" since the staff was
already showing without it, but I couldn't get the MIDI to sound
without adding the "\new Staff".)


\new Staff is the normal way.

Best,
Jean




Re: Is there a way to set the midiInstrument for ChordNames with FretBoards?

2022-05-27 Thread Henning Hraban Ramm

Hi,
I’d suggest to use two different \score s, one for \layout and the other 
for \midi, then you can setup them differently.
I attached my own template – you can’t use it directly, since I left out 
the file with my settings, and you probably don’t want that German 
stuff, but you get an idea about the structure.


Hraban

Am 27.05.22 um 03:40 schrieb Kevin Cole:

Hi,

I have a score with an outline shown below. I managed to get the vocal
part doing "choir aahs", and the piano defaults to a piano instrument,
but is there a way to have ChordNames / FretBoards do anything with
"acoustic guitar (nylon)"?  Even if the playback isn't super accurate
in terms of duration, it seems like, with the fretboards, it would be
able to have a half-educated notion of which notes to sound.)

(And, is there a better way to set the "choir aahs" -- without
changing the whole thing around too much? It somehow feels redundant
to add "\new Staff" around the "\new Voice" since the staff was
already showing without it, but I couldn't get the MIDI to sound
without adding the "\new Staff".)

Thanks.


\version "2.22.1"
\language "english"

global = {
   \time 2/4
   \key c \major
   \tempo 4 = 80
}

chordNames = \chordmode   { ... }
melody = \relative c' { ... }
words  = \lyricmode   { ... }
upper  = \relative c' { ... }
lower  = \relative c  { ... }

\score {
   <<
 \new ChordNames \chordNames
 \new FretBoards \chordNames
 \new Staff \with { midiInstrument = #"choir aahs" }
 <<
   \new Voice = "mel" { \melody }
 >>
 \new Lyrics \lyricsto mel \words
 \new PianoStaff
 <<
   \new Staff = "upper" \upper
   \new Staff = "lower" \lower
 >>
   >>
   \layout { }
   \midi   { }
}


%\version "2.20.0"
\include "../global.ly"
\include "articulate.ly" % für besseres MIDI

\header{
  title = ""
  poet = ""
  %composer = "M: "
  %arranger = "arr."
  %instrument = "2 voc + git"
  source = ""
  %maintainer = "Henning Hraban Ramm"
  %maintainerWeb = "http://angerweit.tikon.ch/lieder/;
  lastupdated = "2020-05-15"
}


global = {
  \clef treble
  \key a \minor
  \time 4/4
}

akkorde = \chordmode {
}

dynamics = \relative c {
  r4\mp
}

oberstimme = \relative c' {
  \bar "|."
}

%{
  unterstimme = \relative c' {
  }
%}

textI = \lyricmode {
  %\set stanza = "1. "
  la la la la
}

% Papier-Ausgabe
\score {
  <<
\context ChordNames {
  \akkorde
}
\context Staff = Oben <<
  \global
  \context Voice = "eins" \oberstimme
>>
\new Lyrics \lyricsto "eins" { \textI }
%{
  \context Staff = Unten <<
  \global
  \context Voice = "zwei" \unterstimme
  >>
%}
  >>
  \layout { }
}
\markup{ \vspace #2.0 }
\markup {
  \fill-line {
\hspace #0.1 % Abstand vom linken Rand
\column {
  \line {
"1."
\column {
  ""
  %"‿"
}
  }
  \vspace #1.0 % Abstand zwischen Strophen
  \line {
"2."
\column {
  ""
}
  }
}
\hspace #0.5  % Abstand zwischen Spalten
\column {
  \line {
"3."
\column {
  ""
}
  }
  \vspace #1.0 % Abstand zwischen Strophen
  \line {
"4."
\column {
  ""
}
  }
}
\hspace #0.1 % Abstand zum rechten Rand
  }
}

% MIDI
\score {
  \unfoldRepeats {
<<
  \set Score.midiReverbLevel = #0.5
  \set Score.midiChorusLevel = #0.5
  \context Staff = "chords" <<
\set Staff.midiInstrument = #"fx 4 (atmosphere)"
\context Voice = "vchords" {
  \transpose c c, << \dynamics \akkorde >>
}
  >>
  \context Staff = ober <<
\articulate
%\set Staff.midiInstrument = #"violin"
\context Voice = "vober" \oberstimme
  >>
  %{
\context Staff = unter <<  \articulate
\set Staff.midiInstrument = #"viola"
% see 
https://lilypond.org/doc/v2.20/Documentation/internals/midi_005fcontrol_005fchange_005fperformer
% -1 (#LEFT), 0 (#CENTER) and 1 (#RIGHT)
%\set Staff.midiPanPosition = #RIGHT
%\set Staff.midiBalance = #LEFT
\context Voice = vunter \unterstimme
>>
  %}
  \new Lyrics \lyricsto "vober" { \textI }
>>
  }
  \midi {
\tempo 4 = 120
  }
}