Re: I ought to have a bar line here...

2020-10-24 Thread Aaron Hill

On 2020-10-24 5:05 pm, Mike Dean wrote:
...between the end of the first section and the start of the Trio, but 
have

stumped myself in properly coding it (I went to alternative endings to
ensure that I had a repeat sign)
(PDF and .ly file attached, beside the snippet below)
[...]


You have to use a special bar line type when it breaks across a line:


\version "2.20.0"
\paper { indent = 0 line-width = 3\cm ragged-right = ##f }

\markup \bold \typewriter "\".|:-||\""
{ R1 \bar ".|:-||" \break R1 }

\markup \vspace #1

\defineBarLine ".|:-|." #'("|." ".|:" #f)
\markup \bold \typewriter "\".|:-|.\""
{ R1 \bar ".|:-|." \break R1 }


As shown in the second example, sometimes you need to define your own 
custom type if LilyPond does not provide what you need already.



-- Aaron Hill

Re: I ought to have a bar line here...

2020-10-24 Thread David Wright
On Sat 24 Oct 2020 at 17:05:00 (-0700), Mike Dean wrote:
> ...between the end of the first section and the start of the Trio, but have
> stumped myself in properly coding it (I went to alternative endings to
> ensure that I had a repeat sign)
> (PDF and .ly file attached, beside the snippet below)

>   \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16

Change   \bar ".|:"   to   \bar ":|.|:"

Cheers,
David.



RE: I ought to have a bar line here...

2020-10-24 Thread Mark Stephen Mrotek
Mike,

 

Look at the attachments and see if it is what you want.

Note that the double bar under “Fine” is not there. Seems it conflicts with the 
“repeat sign” of the Trio.

 

Mark

 

From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Mike Dean
Sent: Saturday, October 24, 2020 7:22 PM
To: lilypond-user@gnu.org
Subject: Re: I ought to have a bar line here...

 

Okay, I tried that, but the desire to start the trio on a new staff is not met:



Hoping this wouldn't require a break-visibility command intervention.

 

 




Mike Dean

 

 

On Sat, Oct 24, 2020 at 5:51 PM Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> > wrote:

Mike,

 

When I remove the “\break” the empty staff disappears. 

 

Mark

 

From: lilypond-user [mailto:lilypond-user-bounces+carsonmark 
 =ca.rr@gnu.org 
 ] On Behalf Of Mike Dean
Sent: Saturday, October 24, 2020 5:05 PM
To: lilypond-user@gnu.org  
Subject: I ought to have a bar line here...

 

...between the end of the first section and the start of the Trio, but have 
stumped myself in properly coding it (I went to alternative endings to ensure 
that I had a repeat sign)

(PDF and .ly file attached, beside the snippet below)

\version "2.20.00"

  \repeat volta 2 {
  d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
  a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
  g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
  c4. g8 c4 d | e4. c8 e4 f | g e f d |}
  \alternative {
   {c c8. c16 c4 r }
   {c c8. c16 c4\mark "Fine" r \bar "|." }
  }
  
  \break
\repeat volta 2 {
  \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. 
e16 |
  a4 c  b   e | d8. c16 b8. c16 b2 |
  a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r | 
  }




Mike Dean

\version "2.20.00"
\relative c'' {
  \repeat volta 2 {
  d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
  a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
  g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
  c4. g8 c4 d | e4. c8 e4 f | g e f d |}
  \alternative {
   {c c8. c16 c4 r }
   {c c8. c16 c4\mark "Fine" r }}
  
  \repeat volta 2 {
  \mark "Trio" a4.\p r16 e a8. e16 g8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | d8. c16 b8. c16 b2 |
  a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r | 
  }
}


Trio.pdf
Description: Adobe PDF document


Re: I ought to have a bar line here...

2020-10-24 Thread Mike Dean
Okay, I tried that, but the desire to start the trio on a new staff is not
met:
[image: image.png]
Hoping this wouldn't require a break-visibility command intervention.



Mike Dean


On Sat, Oct 24, 2020 at 5:51 PM Mark Stephen Mrotek 
wrote:

> Mike,
>
>
>
> When I remove the “\break” the empty staff disappears.
>
>
>
> Mark
>
>
>
> *From:* lilypond-user [mailto:lilypond-user-bounces+carsonmark=
> ca.rr@gnu.org] *On Behalf Of *Mike Dean
> *Sent:* Saturday, October 24, 2020 5:05 PM
> *To:* lilypond-user@gnu.org
> *Subject:* I ought to have a bar line here...
>
>
>
> ...between the end of the first section and the start of the Trio, but
> have stumped myself in properly coding it (I went to alternative endings to
> ensure that I had a repeat sign)
>
> (PDF and .ly file attached, beside the snippet below)
>
> \version "2.20.00"
>
>   \repeat volta 2 {
>   d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
>   a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
>   g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
>   c4. g8 c4 d | e4. c8 e4 f | g e f d |}
>   \alternative {
>{c c8. c16 c4 r }
>{c c8. c16 c4\mark "Fine" r \bar "|." }
>   }
>
>   \break
> \repeat volta 2 {
>   \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16
> gs8. e16 |
>   a4 c  b   e | d8. c16 b8. c16 b2 |
>   a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
>   a4 c  b   e | a,4 a8. a16 a4 r |
>   }
>
>
> Mike Dean
>


RE: I ought to have a bar line here...

2020-10-24 Thread Mark Stephen Mrotek
Mike,

 

When I remove the “\break” the empty staff disappears. 

 

Mark

 

From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Mike Dean
Sent: Saturday, October 24, 2020 5:05 PM
To: lilypond-user@gnu.org
Subject: I ought to have a bar line here...

 

...between the end of the first section and the start of the Trio, but have 
stumped myself in properly coding it (I went to alternative endings to ensure 
that I had a repeat sign)

(PDF and .ly file attached, beside the snippet below)

\version "2.20.00"

  \repeat volta 2 {
  d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
  a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
  g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
  c4. g8 c4 d | e4. c8 e4 f | g e f d |}
  \alternative {
   {c c8. c16 c4 r }
   {c c8. c16 c4\mark "Fine" r \bar "|." }
  }
  
  \break
\repeat volta 2 {
  \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. 
e16 |
  a4 c  b   e | d8. c16 b8. c16 b2 |
  a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r | 
  }




Mike Dean



I ought to have a bar line here...

2020-10-24 Thread Mike Dean
...between the end of the first section and the start of the Trio, but have
stumped myself in properly coding it (I went to alternative endings to
ensure that I had a repeat sign)
(PDF and .ly file attached, beside the snippet below)
\version "2.20.00"
  \repeat volta 2 {
  d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
  a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
  g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
  c4. g8 c4 d | e4. c8 e4 f | g e f d |}
  \alternative {
   {c c8. c16 c4 r }
   {c c8. c16 c4\mark "Fine" r \bar "|." }
  }

  \break
\repeat volta 2 {
  \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16
gs8. e16 |
  a4 c  b   e | d8. c16 b8. c16 b2 |
  a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r |
  }

Mike Dean


March-of-the-Russian-Imperial-Guard.pdf
Description: Adobe PDF document
\version "2.20.00"
\language "english"
#(set-default-paper-size "letter")

\header {
  title = "March of the Russian Imperial Guard"
  subtitle = "(Marche de la garde imperiale Russe"
  composer = "Unknown (at this point)"
  arranger = "Transcribed by Mike Dean"
}
  \relative c'' {
  \key c \major
  \tempo "Allegro"
  \time 4/4
  \partial 8
  g8\f | c4. g8 c4 d | e4. c8 e4 f | g e f d | c c8. c16 c4 r8 g |
  c4. g8 c4 d | e4. c8 e4 f | g e f d | c c8. c16 c4 r |
  
  \repeat volta 2 {
  d2 d8 c d e | f4 f8. e16 d2 | e2 e8 d e f | g4 g8. f16 e2 |
  a4 a8. g16 f8. g16 a8. f16 | g4 g8. f16 e8. f16 g8. e16 |
  g4 a8. g16 f8. f16 e8. e16 | d4 g8. g16 g4 r8 g, |
  c4. g8 c4 d | e4. c8 e4 f | g e f d |}
  \alternative {
   {c c8. c16 c4 r }
   {c c8. c16 c4\mark "Fine" r \bar "|." }
  }
  
  \break
\repeat volta 2 {
  \bar ".|:"\mark "Trio" a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | d8. c16 b8. c16 b2 |
  a4. r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r | 
  }

  \repeat volta 2 {
  e'4.\f f16 e d4 g?8 f | e4. f16 e d4 g8 f 
  e2 d8. e16 c8. e16 | d4 \tuplet 5/4 { c16 d c b c } b4 r
  a4.\p r16 e a8. e16 gs8. e16 | a4. r16 e a8. e16 gs8. e16 |
  a4 c  b   e | a,4 a8. a16 a4 r8
  \once \override Score.RehearsalMark.break-visibility = #end-of-line-visible
  \once \override Score.RehearsalMark.self-alignment-X = #RIGHT
  \mark "D.C. al Fine" 
  }
  }


Re: LilyPond learning curve (was: feasibilty question: simple GUI for web-based Lilypond instance)

2020-10-24 Thread Kieren MacMillan
Hi Jean,

> Out of curiosity, did you ever try teaching or in any way introducing
> LilyPond to your students?

I have introduced a huge number of people (mostly students) to Lilypond: every
time I am asked to give a guest lecture at a university composition department,
I make sure I explicitly highlight Lilypond; when possible, I try to make sure I
can give the students a full "lecture" (e.g., 1 hour) on it; every opportunity I
have to contribute to a comparison of engraving applications, I make sure
Lilypond is represented [well!].

As for *teaching* anybody… I’ve taught exactly four people — two colleagues, and
two students — and only because all four of them were fluent in "coding". One of
them immediately saw the benefits, and used it for "quite a while" (meaning 3+
months), but eventually reverted back to his main toolchain (Finale & Sibelius);
the others abandoned it almost immediately, replacing it with Dorico (2) and
Finale (1).

> I am pretty interested in how people learn LilyPond. My own experience
> from discovering it around 15 is that I was able to enter simple music
> quickly; however, adding staves, instrument names and creating polyphony
> caused many hardships (\voiceTwo is not the second voice!, etc.) I wonder
> if it'd be a good idea to organize one-time presentations, courses, this
> sort of things, for music students − composers are among the primary 
> types of LilyPond users after all.

Until people get "hooked", I fear there’s little use for those kinds of things.
What we need to do is have ways to get people hooked beyond the inertia that
forces them to abandon the tool. I have lots of ideas of how to do that, but
none of them will gain any traction by themselves — unless there’s a GUI that’s
immediately useable and inviting, I’m afraid it’s a losing battle.

Best,
Kieren.



LilyPond learning curve (was: feasibilty question: simple GUI for web-based Lilypond instance)

2020-10-24 Thread Jean Abou Samra

[Starting a new thread to avoid hijacking the other one.]

Le 24/10/2020 à 17:09, Kieren MacMillan a écrit :


More to the point: I’m a Lilypond power-user, and I don’t currently suggest Lilypond for 
any of my college or private students. If there were a free, web-accessible, 
"code-free" GUI for Lilypond, I would 100% recommend it to all my students. I 
would also immediately suggest it as the de facto standard for all the colleges where I 
am on faculty. Ergo: an open-source license would IMMEDIATELY help in its success. QED  ;)


Hi Kieren,

Out of curiosity, did you ever try teaching or in any way introducing
LilyPond to your students?

I am pretty interested in how people learn LilyPond. My own experience
from discovering it around 15 is that I was able to enter simple music
quickly; however, adding staves, instrument names and creating polyphony
caused many hardships (\voiceTwo is not the second voice!, etc.) I wonder
if it'd be a good idea to organize one-time presentations, courses, this
sort of things, for music students − composers are among the primary 
types of

LilyPond users after all.

What's your experience?

Cheers,
Jean




Re: Feature request: Alternative G clef

2020-10-24 Thread Martín Rincón Botero
Hi Jean,

thank you for that font showcase! I’ll take a closer look at Profondo. However, 
its overly long bass clef looks quite unappealing to me. I wouldn’t use any of 
the others, as far as I can tell.

About what pairs with what is certainly more of a matter of taste. I find 
Emmentaler’s trill sign proportionally very big: it doesn’t fit well with the 
rest of the ensemble, something that’s more prominent with a font size of 20, 
than with smaller fonts. For the same reason I always tweak it one number 
smaller for font size 20. However, that’s not my point, we already provide an 
alternative C clef, and an alternative percussion clef. We provide four 
different ways of naming a G clef without an actual different G clef being 
used. It looks somewhat random to me.

Martín.
 -- www.martinrinconbotero.com
On 24. Oct 2020, 17:46 +0200, Jean Abou Samra , wrote:
> Le 24/10/2020 à 11:47, Martín Rincón Botero a écrit :
> > Hello all,
> >
> > a few months ago in some forum I found the following snippet of a beautiful 
> > G clef (I think by Pierre Perol-Schneider) that I've been extensively using 
> > since then. Right now in the NR we have \clef G, \clef treble, \clef "G2" 
> > and \clef violin, all producing what seems to be the exact same clef. To 
> > name the exact same clef in so many ways ("G2" strikes me as unnecessary) 
> > doesn't seem to have a reasonable explanation to me. Some clefs have 
> > variants like the C clef (\clef varC). I wish Perol-Schneider's clef could 
> > be considered for inclusion into standard Lilypond, possibly named as "G2" 
> > (which would actually produce a "second" G clef) or as \clef varG. I hope 
> > he doesn't mind that I "re-publish" his code in this mailing list:
> >
> > \version "2.20.0"
> >
> > %% New treble clef defs:
> > #(define-markup-command (G_Score layout props thk mlt) (number? number?)
> >   (interpret-markup layout props
> >    (markup
> >     (#:stencil
> >      (make-path-stencil
> >       '(M  1.117 -2.778
> >         C  0.730 -2.782  0.363 -2.364 0.484 -1.981
> >         C  0.566 -1.641  1.043 -1.540 1.285 -1.786
> >         C  1.504 -1.997  1.418 -2.395 1.141 -2.513
> >         C  0.996 -2.567  0.836 -2.583 1.090 -2.614
> >         C  1.379 -2.673  1.703 -2.559 1.828 -2.278
> >         C  1.969 -1.911  1.820 -1.395 1.766 -1.024
> >         C  1.031 -1.169  0.277 -0.903 0.031 -0.196
> >         C -0.129  0.323 -0.043  0.917 0.250  1.366
> >         C  0.492  1.737  0.832  1.999 1.152  2.300
> >         C  1.070  2.886  1.000  3.468 1.203  4.034
> >         C  1.297  4.292  1.484  4.503 1.680  4.687
> >         C  1.898  4.886  2.117  4.335 2.211  4.062
> >         C  2.398  3.601  2.227  2.839 1.934  2.323
> >         C  1.816  2.105  1.637  1.929 1.457  1.757
> >         C  1.500  1.523  1.539  1.288 1.586  1.054
> >         C  2.117  1.077  2.477  0.792 2.602  0.359
> >         C  2.766 -0.134  2.516 -0.766 1.953 -0.977
> >         C  2.004 -1.423  2.160 -1.927 2.004 -2.313
> >         C  1.902 -2.567  1.656 -2.766 1.379 -2.778
> >         C  1.293 -2.798  1.203 -2.790 1.117 -2.782
> >         M  1.734 -0.919
> >         C  1.621 -0.306  1.574  0.026 1.500  0.464
> >         C  1.164  0.433  0.973  0.066 1.090 -0.220
> >         C  1.141 -0.345  1.223 -0.407 1.359 -0.485
> >         C  1.492 -0.563  1.387 -0.657 1.297 -0.618
> >         C  1.031 -0.509  0.664 -0.188 0.758  0.269
> >         C  0.816  0.569  1.059  0.917 1.398  1.023
> >         C  1.359  1.261  1.332  1.378 1.297  1.612
> >         C  0.887  1.234  0.332  0.753 0.348  0.155
> >         C  0.363 -0.532  0.746 -1.071 1.734 -0.919
> >         M  1.688  0.480
> >         C  1.762  0.105  1.844 -0.509 1.926 -0.880
> >         C  2.656 -0.462  2.438  0.534 1.688  0.480
> >         M  2.016  3.776
> >         C  1.984  4.378  1.691  4.058 1.500  3.706
> >         C  1.313  3.366  1.273  2.894 1.352  2.468
> >         C  1.945  3.066  2.031  3.409 2.016  3.776
> >         Z)
> >        thk mlt mlt #t)
> >
> > clefGScore = \layout {
> >         \context {
> >           \Score
> >           \override Clef.stencil =
> >             #(lambda (grob)
> >                (let* ((sz (ly:grob-property grob 'font-size 0))
> >                       (mlt (magstep sz))
> >                       (glyph (ly:grob-property grob 'glyph-name)))
> >                      (cond
> >                       ((equal? glyph "clefs.G")
> >                        (grob-interpret-markup grob
> >                         (markup #:scale(cons mlt mlt)#:G_Score 0 1)))
> >                       ((equal? glyph "clefs.G_change")
> >                        (grob-interpret-markup grob
> >                         (markup #:scale(cons mlt mlt)#:G_Score .01 .8)))
> >                       (else (ly:clef::print grob)
> >            \override ClefModifier.clef-alignments = #'((G 0 . .4))
> >            % Optional:
> >            %\override ClefModifier.font-series = #'bold
> >         }
> >       }
> > %% defs end.
> >
> > %% 

Re: Feature request: Alternative G clef

2020-10-24 Thread Jean Abou Samra

Le 24/10/2020 à 11:47, Martín Rincón Botero a écrit :


Hello all,

a few months ago in some forum I found the following snippet of a 
beautiful G clef (I think by Pierre Perol-Schneider) that I've been 
extensively using since then. Right now in the NR we have \clef G, 
\clef treble, \clef "G2" and \clef violin, all producing what seems to 
be the exact same clef. To name the exact same clef in so many ways 
("G2" strikes me as unnecessary) doesn't seem to have a reasonable 
explanation to me. Some clefs have variants like the C clef (\clef 
varC). I wish Perol-Schneider's clef could be considered for inclusion 
into standard Lilypond, possibly named as "G2" (which would actually 
produce a "second" G clef) or as \clef varG. I hope he doesn't mind 
that I "re-publish" his code in this mailing list:


\version "2.20.0"

%% New treble clef defs:
#(define-markup-command (G_Score layout props thk mlt) (number? number?)
  (interpret-markup layout props
   (markup
    (#:stencil
     (make-path-stencil
      '(M  1.117 -2.778
        C  0.730 -2.782  0.363 -2.364 0.484 -1.981
        C  0.566 -1.641  1.043 -1.540 1.285 -1.786
        C  1.504 -1.997  1.418 -2.395 1.141 -2.513
        C  0.996 -2.567  0.836 -2.583 1.090 -2.614
        C  1.379 -2.673  1.703 -2.559 1.828 -2.278
        C  1.969 -1.911  1.820 -1.395 1.766 -1.024
        C  1.031 -1.169  0.277 -0.903 0.031 -0.196
        C -0.129  0.323 -0.043  0.917 0.250  1.366
        C  0.492  1.737  0.832  1.999 1.152  2.300
        C  1.070  2.886  1.000  3.468 1.203  4.034
        C  1.297  4.292  1.484  4.503 1.680  4.687
        C  1.898  4.886  2.117  4.335 2.211  4.062
        C  2.398  3.601  2.227  2.839 1.934  2.323
        C  1.816  2.105  1.637  1.929 1.457  1.757
        C  1.500  1.523  1.539  1.288 1.586  1.054
        C  2.117  1.077  2.477  0.792 2.602  0.359
        C  2.766 -0.134  2.516 -0.766 1.953 -0.977
        C  2.004 -1.423  2.160 -1.927 2.004 -2.313
        C  1.902 -2.567  1.656 -2.766 1.379 -2.778
        C  1.293 -2.798  1.203 -2.790 1.117 -2.782
        M  1.734 -0.919
        C  1.621 -0.306  1.574  0.026 1.500  0.464
        C  1.164  0.433  0.973  0.066 1.090 -0.220
        C  1.141 -0.345  1.223 -0.407 1.359 -0.485
        C  1.492 -0.563  1.387 -0.657 1.297 -0.618
        C  1.031 -0.509  0.664 -0.188 0.758  0.269
        C  0.816  0.569  1.059  0.917 1.398  1.023
        C  1.359  1.261  1.332  1.378 1.297  1.612
        C  0.887  1.234  0.332  0.753 0.348  0.155
        C  0.363 -0.532  0.746 -1.071 1.734 -0.919
        M  1.688  0.480
        C  1.762  0.105  1.844 -0.509 1.926 -0.880
        C  2.656 -0.462  2.438  0.534 1.688  0.480
        M  2.016  3.776
        C  1.984  4.378  1.691  4.058 1.500  3.706
        C  1.313  3.366  1.273  2.894 1.352  2.468
        C  1.945  3.066  2.031  3.409 2.016  3.776
        Z)
       thk mlt mlt #t)

clefGScore = \layout {
        \context {
          \Score
          \override Clef.stencil =
            #(lambda (grob)
               (let* ((sz (ly:grob-property grob 'font-size 0))
                      (mlt (magstep sz))
                      (glyph (ly:grob-property grob 'glyph-name)))
                     (cond
                      ((equal? glyph "clefs.G")
                       (grob-interpret-markup grob
                        (markup #:scale(cons mlt mlt)#:G_Score 0 1)))
                      ((equal? glyph "clefs.G_change")
                       (grob-interpret-markup grob
                        (markup #:scale(cons mlt mlt)#:G_Score .01 .8)))
                      (else (ly:clef::print grob)
           \override ClefModifier.clef-alignments = #'((G 0 . .4))
           % Optional:
           %\override ClefModifier.font-series = #'bold
        }
      }
%% defs end.

%% Test:
\clefGScore

This code effectively modifies Emmentaler's G Clef instead of having 
its own separate glyph, so that using \clef treble or \clef french 
produces the custom clef as output. When using this clef, the 
following music


{ \clef G
  c'1
  \clef "G2"
  c'1
  \clef violin
  c'1
  \clef french
  c'1
}

looks like this:

[image]

Cheers,
Martín.

--
www.martinrinconbotero.com 


Hello,

I suggest you use this font:

https://github.com/OpenLilyPondFonts/scorlatti/blob/master/scorlatti-basic-example.png

Its G clef is quite similar to the one Pierre made up. Other candidates 
may include:


https://github.com/OpenLilyPondFonts/profondo/blob/master/profondo-basic-example.png

https://github.com/OpenLilyPondFonts/ross/blob/master/ross-basic-example.png

https://github.com/OpenLilyPondFonts/bravura

(Comparison attached.)

I think the real solution to offer more stylistic alternates would be to 
ship more fonts with the default packaging of LilyPond, because these 
make up consistent ensembles (the G clef you sent is nice but I don't 
find it to pair well with Emmentaler's alto clef for example). For your 
information, SMuFL support is being worked 

Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Kieren MacMillan
Hi Jean,

> If that aspect is more important than GUI note entry, another option
> would be to host an OverLeaf instance on your college's server
> (see https://github.com/overleaf/overleaf), install LilyPond
> and the lyLuaTeX package there, and use with LuaLaTeX.

This thread has been a real eye-opener for me — I’m just now really learning 
about OverLeaf, VSLilyPond, etc.

It’s even more clear to me now: If we could put together a turnkey installation 
package of OverLeaf + Lilypond + lyLuaLaTeX, and was able to provide a 
"code-free" GUI for collaboratively editing (even up to a "certain level" of 
sophistication), we’d have as "killer" an app as the music engraving industry 
can have right now. I personally know a half-dozen music schools, and at least 
one [small] publisher, where I could get such a thing installed a few days 
after it was stable.

Thanks!
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Kieren MacMillan
Hi Martin,

>> If there were an open-source version of this, I think it would make huge 
>> inroads in the music education field.
> Maybe a bit contentious of mine, but why would an open-source license help in 
> its success? 

Because we (the community) could offer a turn-key, no-cost [up front, anyway!] 
installation for any college, university, or composition teacher to create 
great-looking music with their students.

More to the point: I’m a Lilypond power-user, and I don’t currently suggest 
Lilypond for any of my college or private students. If there were a free, 
web-accessible, "code-free" GUI for Lilypond, I would 100% recommend it to all 
my students. I would also immediately suggest it as the de facto standard for 
all the colleges where I am on faculty. Ergo: an open-source license would 
IMMEDIATELY help in its success. QED  ;)

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Martín Rincón Botero
> This is exactly the kind of thing I’m thinking about!

That’s what I thought :-).
> If there were an open-source version of this, I think it would make huge 
> inroads in the music education field.

Maybe a bit contentious of mine, but why would an open-source license help in 
its success?

Cheers,
Martín.

www.martinrinconbotero.com
On 24. Oct 2020, 16:40 +0200, Kieren MacMillan , 
wrote:
>
> This is exactly the kind of thing I’m thinking about!


Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Kieren MacMillan
Hi Martín,

> I’m haven’t investigated its collaborative capabilities if any, but 
> https://www.scorio.com/web/scorio/scorio-music-notator is an online GUI for 
> Lilypond.

This is exactly the kind of thing I’m thinking about!
If there were an open-source version of this, I think it would make huge 
inroads in the music education field.

Thanks!
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: Feature request: Alternative G clef

2020-10-24 Thread Martín Rincón Botero
Thank you Simon for your answer. As much as I applaud the efforts for making 
Lilypond work with other fonts, I find it a pity that more glyphs can’t be 
included in the core. It’s not rare to find alternative or “extra” glyphs in 
other fonts either (Maestro, Opus, etc.), so this wouldn’t be the first time 
that happens, nor I can’t see how doing so would discourage inclusion or 
creation of other fonts. The same can be said for all the other glyphs (in the 
percussion section f. ex.) that Emmentaler doesn’t have. Perhaps extending the 
Emmentaler font can’t be a priority right now, which is totally understandable, 
but I would still leave this request open for future consideration.

Best regards,
Martín.

www.martinrinconbotero.com
On 24. Oct 2020, 12:14 +0200, Simon Albrecht , wrote:
> Hi Martín,
>
> On 24.10.20 11:47, Martín Rincón Botero wrote:
> > I wish Perol-Schneider's clef could be considered for inclusion into
> > standard Lilypond, possibly named as "G2" (which would actually
> > produce a "second" G clef) or as \clef varG.
>
>
> two things here: there has been a lot of work to making LilyPond work
> with other music fonts. This seems like it doesn’t have to do with any
> syntactic differentiation but merely with design choices (well, \clef
> "GG" and "tenorG" at least hold some residue of suggesting another
> stylistic context/hinting at the transposing nature). Hence I wouldn’t
> think it should be added concurrently to the LilyPond core.
>
> The naming of \clef "G2" doesn’t mean ‘second G clef’ or ‘alternative’,
> but it means ‘a G clef sitting on the 2nd staff line’ (staff lines
> traditionally being counted from the bottom up). In ancient music, it’s
> customary e.g. to describe the clefs used in a piece as “G2, C2, C3,
> F3”, meaning treble, mezzosoprano, alto, and baritone clefs.
>
> Best, Simon
>


Re: Feature request: Alternative G clef

2020-10-24 Thread Simon Albrecht

Hi Martín,

On 24.10.20 11:47, Martín Rincón Botero wrote:
I wish Perol-Schneider's clef could be considered for inclusion into 
standard Lilypond, possibly named as "G2" (which would actually 
produce a "second" G clef) or as \clef varG.



two things here: there has been a lot of work to making LilyPond work 
with other music fonts. This seems like it doesn’t have to do with any 
syntactic differentiation but merely with design choices (well, \clef 
"GG" and "tenorG" at least hold some residue of suggesting another 
stylistic context/hinting at the transposing nature). Hence I wouldn’t 
think it should be added concurrently to the LilyPond core.


The naming of \clef "G2" doesn’t mean ‘second G clef’ or ‘alternative’, 
but it means ‘a G clef sitting on the 2nd staff line’ (staff lines 
traditionally being counted from the bottom up). In ancient music, it’s 
customary e.g. to describe the clefs used in a piece as “G2, C2, C3, 
F3”, meaning treble, mezzosoprano, alto, and baritone clefs.


Best, Simon




Re: ! Please answer interesting functionality question for PhD Diss

2020-10-24 Thread Jean Abou Samra

Hi,

Thank you all for your encouragements − it's a pleasure to know that 
your work is appreciated.


This prompted me to rewrite the thing …

Le 23/10/2020 à 21:30, Carl Sorensen a écrit :


This is a beautiful quick hack!

To avoid the semicircles on the the end of each staff line, you'd 
likely want to change the definition of the staffline being printed.  
This is defined in the file lily/staff-symbol.cc as a horizontal line 
(see lines 92 and 93) of a given thickness, which is drawn with a pen 
having a blot diameter of the thickness.  It's probably possible to 
rewrite this print function in Scheme and draw the staff line as a 
round-filled-box (see lily/lookup.cc).  If I were trying to do this in 
the minimum effort way possible, I'd hardcode a blot diameter, and 
draw a round-filled box of the given thickness using the hardcoded 
blot diameter.  This would be a hack, but would get the job done.



… in a way that, as you say, redraws the StaffSymbol instead of creating 
a bunch of RhythmicStaff contexts, so you can pass plain music without 
resorting to complicated combinations of \crossStaff and \change 
(cross-staff chords are cumbersome to create). This is indeed done by 
partly reimplementing and partly reusing the callback found in 
lily/staff-symbol.cc. Fortunately, you don't need the ability to compile 
LilyPond; all of this is done via Scheme.


And, you were right: I used \filled-box to control the blot diameter, 
which is set to a fixed value (you can modify it as a global variable).


The problem so far is that I didn't find a proper way to set the chord 
configuration at a given musical moment (note heads placed at the left 
or at the right of the stem). For now I've used an extra-offset, which 
leads to inconsistent spacing. There is \override 
Stem.note-collision-threshold = 50, but that doesn't let you achieve the 
fourth chord before the end, where the upper note is on the left and the 
lower note is on the right, since the usual placement is the other way 
around.


Code attached, with an output that resembles the image you (Michael) 
sent earlier. Note that you need a development version of LilyPond 
(lilypond.org/development). Naturally, this is only a start since at 
this point more details are needed about the specification of what you 
want to achieve. Nevertheless, I wanted to share this code to avoid 
duplication of effort in case someone else were willing to take over 
this topic.


Regards,
Jean

\version "2.23.0"

% You can play around with these parameters.

line-count = 12
stem-end-position = 17
inter-line-gap = 2
min-grey = 0
max-grey = 0.7
min-thickness = 0.1
thickness-increment = 0.013
stem-thickness = 2
staff-line-blot = 0.2
light-blue = "CornflowerBlue"
note-head-base = \markup \filled-box #'(-0.6 . 0.6) #'(-0.5 . 0.5) #0.9

#(define-markup-command (whiteout-outline-with-color layout props thickness color arg)
(number? color? markup?)
   (stencil-whiteout-outline (interpret-markup layout props arg) thickness color))

note-head-part-one =
\markup
  % Strange that \whiteout-outline-with-color #0.1 #black \with-color #blue \note-head
  % doesn't work here. Let's work around.
  \combine
  \whiteout-outline-with-color
#0.15
#black
\with-color #black \note-head-base
  \with-color #light-blue \note-head-base

note-head-part-two =
\markup
  \whiteout-outline-with-color
#0.15
#black
\note-head-base

note-head-combined =
\markup \overlay {
\note-head-part-one
\translate #'(-0.5 . 0) \note-head-part-two
\translate #'(-0.7 . -0.4) \rotate #-150 \fontsize #-9 \with-color #white \number "2"
}

#(define (calc-note-head-text grob)
   (if (ly:grob-property grob 'has-headphones)
   note-head-combined
   note-head-part-two))


% Not defined?
#(define pi (acos -1))

#(define (greyscale x)
   (let* ((value (+ (* (+ (/ (atan x) pi) 0.5) (- max-grey min-grey)) min-grey)))
 (rgb-color value value value)))

#(define (calc-thickness x)
   (+ min-thickness (* thickness-increment (abs x


#(define (calc-stem-position grob)
  (- stem-end-position (ly:grob-property grob 'stem-begin-position)))



% From lily/staff-symbol.cc
#(define (calc-staff-symbol-line-positions grob)
  (let* ((line-count (ly:grob-property grob 'line-count))
 (height (- line-count 1)))
(map
  (lambda (i) (- height (* 2 i)))
  (iota line-count




#(define (calc-staff-symbol-stencil grob)
   (let ((x-extent (ly:stencil-extent (ly:staff-symbol::print grob) X)))
 (apply ly:stencil-add
   (map
 (lambda
  (x)
  (let ((thickness (calc-thickness x)))
(ly:stencil-translate-axis
   (grob-interpret-markup grob
#{
  \markup
\with-color #(greyscale x)
\filled-box #x-extent #(cons (- thickness) thickness) #staff-line-blot
#})
(* (ly:grob-property grob 'staff-space 1) 0.5 x)
 

Feature request: Alternative G clef

2020-10-24 Thread Martín Rincón Botero
Hello all,

a few months ago in some forum I found the following snippet of a beautiful
G clef (I think by Pierre Perol-Schneider) that I've been extensively using
since then. Right now in the NR we have \clef G, \clef treble, \clef "G2"
and \clef violin, all producing what seems to be the exact same clef. To
name the exact same clef in so many ways ("G2" strikes me as unnecessary)
doesn't seem to have a reasonable explanation to me. Some clefs have
variants like the C clef (\clef varC). I wish Perol-Schneider's clef could
be considered for inclusion into standard Lilypond, possibly named as "G2"
(which would actually produce a "second" G clef) or as \clef varG. I hope
he doesn't mind that I "re-publish" his code in this mailing list:

\version "2.20.0"

%% New treble clef defs:
#(define-markup-command (G_Score layout props thk mlt) (number? number?)
  (interpret-markup layout props
   (markup
(#:stencil
 (make-path-stencil
  '(M  1.117 -2.778
C  0.730 -2.782  0.363 -2.364 0.484 -1.981
C  0.566 -1.641  1.043 -1.540 1.285 -1.786
C  1.504 -1.997  1.418 -2.395 1.141 -2.513
C  0.996 -2.567  0.836 -2.583 1.090 -2.614
C  1.379 -2.673  1.703 -2.559 1.828 -2.278
C  1.969 -1.911  1.820 -1.395 1.766 -1.024
C  1.031 -1.169  0.277 -0.903 0.031 -0.196
C -0.129  0.323 -0.043  0.917 0.250  1.366
C  0.492  1.737  0.832  1.999 1.152  2.300
C  1.070  2.886  1.000  3.468 1.203  4.034
C  1.297  4.292  1.484  4.503 1.680  4.687
C  1.898  4.886  2.117  4.335 2.211  4.062
C  2.398  3.601  2.227  2.839 1.934  2.323
C  1.816  2.105  1.637  1.929 1.457  1.757
C  1.500  1.523  1.539  1.288 1.586  1.054
C  2.117  1.077  2.477  0.792 2.602  0.359
C  2.766 -0.134  2.516 -0.766 1.953 -0.977
C  2.004 -1.423  2.160 -1.927 2.004 -2.313
C  1.902 -2.567  1.656 -2.766 1.379 -2.778
C  1.293 -2.798  1.203 -2.790 1.117 -2.782
M  1.734 -0.919
C  1.621 -0.306  1.574  0.026 1.500  0.464
C  1.164  0.433  0.973  0.066 1.090 -0.220
C  1.141 -0.345  1.223 -0.407 1.359 -0.485
C  1.492 -0.563  1.387 -0.657 1.297 -0.618
C  1.031 -0.509  0.664 -0.188 0.758  0.269
C  0.816  0.569  1.059  0.917 1.398  1.023
C  1.359  1.261  1.332  1.378 1.297  1.612
C  0.887  1.234  0.332  0.753 0.348  0.155
C  0.363 -0.532  0.746 -1.071 1.734 -0.919
M  1.688  0.480
C  1.762  0.105  1.844 -0.509 1.926 -0.880
C  2.656 -0.462  2.438  0.534 1.688  0.480
M  2.016  3.776
C  1.984  4.378  1.691  4.058 1.500  3.706
C  1.313  3.366  1.273  2.894 1.352  2.468
C  1.945  3.066  2.031  3.409 2.016  3.776
Z)
   thk mlt mlt #t)

clefGScore = \layout {
\context {
  \Score
  \override Clef.stencil =
#(lambda (grob)
   (let* ((sz (ly:grob-property grob 'font-size 0))
  (mlt (magstep sz))
  (glyph (ly:grob-property grob 'glyph-name)))
 (cond
  ((equal? glyph "clefs.G")
   (grob-interpret-markup grob
(markup #:scale(cons mlt mlt)#:G_Score 0 1)))
  ((equal? glyph "clefs.G_change")
   (grob-interpret-markup grob
(markup #:scale(cons mlt mlt)#:G_Score .01 .8)))
  (else (ly:clef::print grob)
   \override ClefModifier.clef-alignments = #'((G 0 . .4))
   % Optional:
   %\override ClefModifier.font-series = #'bold
}
  }
%% defs end.

%% Test:
\clefGScore

This code effectively modifies Emmentaler's G Clef instead of having its
own separate glyph, so that using \clef treble or \clef french produces the
custom clef as output. When using this clef, the following music

{ \clef G
  c'1
  \clef "G2"
  c'1
  \clef violin
  c'1
  \clef french
  c'1
}

looks like this:

[image: image.png]

Cheers,
Martín.

-- 
www.martinrinconbotero.com


Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread J Martin Rushton
Oops! Sorry Andrew.  It's not that your posts are invisible, just that 
it must have been yesterday (UK time) and I've been to sleep since I 
read it.  All I saw was Martín's post involving mailing links and was 
trying to suggest a better way.  Sorry.


BTW, the only reason I chose OwnCloud over NextCloud is that CentOS8 
doesn't ship with the NC server, only clients whereas C8 has both OC 
client and server.


Regards,
Martin

On 24/10/2020 10:15, Andrew Bernard wrote:
That's already what I said before. I run NextCloud which is a fork of 
OwnCloud and vastly better. Sometimes I think my threads are invisible. 
:-) :-)


I'd even be willing to host the NextCloud for you Kieran at no charge.


Andrew


On 24/10/2020 7:59 pm, J Martin Rushton wrote:
Possibly right off the wall, but could you set up a private cloud 
instance (something like OwnCloud) and have the students work in 
there? The cloud would look after moving work around and syncronising, 
all you would need to do is ensure that students don't work on a 
particular piece simultaneously.  Oh, and for the GUI I'd second 
Frescobaldi.


Regards,
Martin





--
J Martin Rushton MBCS



Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Andrew Bernard
That's already what I said before. I run NextCloud which is a fork of 
OwnCloud and vastly better. Sometimes I think my threads are invisible. 
:-) :-)


I'd even be willing to host the NextCloud for you Kieran at no charge.


Andrew


On 24/10/2020 7:59 pm, J Martin Rushton wrote:
Possibly right off the wall, but could you set up a private cloud 
instance (something like OwnCloud) and have the students work in 
there? The cloud would look after moving work around and syncronising, 
all you would need to do is ensure that students don't work on a 
particular piece simultaneously.  Oh, and for the GUI I'd second 
Frescobaldi.


Regards,
Martin





Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread J Martin Rushton
Possibly right off the wall, but could you set up a private cloud 
instance (something like OwnCloud) and have the students work in there? 
The cloud would look after moving work around and syncronising, all you 
would need to do is ensure that students don't work on a particular 
piece simultaneously.  Oh, and for the GUI I'd second Frescobaldi.


Regards,
Martin

On 24/10/2020 07:54, Martín Rincón Botero wrote:

Hi Kieren,

I’m haven’t investigated its collaborative capabilities if any, but 
https://www.scorio.com/web/scorio/scorio-music-notator is an online GUI 
for Lilypond. Some of its functionality is only available in the paid 
version, though. Perhaps it’s an alternative.


Cheers,
Martín.

www.martinrinconbotero.com
On 24. Oct 2020, 04:52 +0200, Kieren MacMillan 
, wrote:

Hi Karlin,


I'm understanding this use case wants...
* No-code GUI music entry
* Runs in a web browser
* Allows collaborative editing


Right.

I'm having trouble imagining what "collaborative editing" would look 
like in a "No-code GUI." Something like PDF commenting? Has anything 
like that ever been seen in the LilyPond ecosystem? Paolo Prete's 
Spontini-Editor might be the closest thing I can remember.


I’m thinking of Spontini+Lilybin: there’s a basic Javascript UI to 
add/delete elements (notes, rests, etc.), on top of a server-based 
Lilypond instance where the code is saved in successive versions (cf. 
Lilybin).


1. The student works on the file for a while by themselves.
2. They send me a link to the current version (e.g., 
guilily.com/wpeouryckjhg/7).
3. I log in and edit the file, and sent them back the "current" link 
(e.g., guilily.com/wpeouryckjhg/9).
4. We can both see the current version, and one of us can edit and 
save a new "current" version.


To my mind, lilybin already solves the "collaborative editing" part 
sufficiently for my needs (and, I’m guessing, the needs of most music 
educators I know). The only real gap right now is the GUI. I’m trying 
to figure out how much work would be required to make a Javascript (or 
something better?) "app" that edits Lily code.


Thanks,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




--
J Martin Rushton MBCS



Re: feasibilty question: simple GUI for web-based Lilypond instance

2020-10-24 Thread Martín Rincón Botero
Hi Kieren,

I’m haven’t investigated its collaborative capabilities if any, but 
https://www.scorio.com/web/scorio/scorio-music-notator is an online GUI for 
Lilypond. Some of its functionality is only available in the paid version, 
though. Perhaps it’s an alternative.

Cheers,
Martín.

www.martinrinconbotero.com
On 24. Oct 2020, 04:52 +0200, Kieren MacMillan , 
wrote:
> Hi Karlin,
>
> > I'm understanding this use case wants...
> > * No-code GUI music entry
> > * Runs in a web browser
> > * Allows collaborative editing
>
> Right.
>
> > I'm having trouble imagining what "collaborative editing" would look like 
> > in a "No-code GUI." Something like PDF commenting? Has anything like that 
> > ever been seen in the LilyPond ecosystem? Paolo Prete's Spontini-Editor 
> > might be the closest thing I can remember.
>
> I’m thinking of Spontini+Lilybin: there’s a basic Javascript UI to add/delete 
> elements (notes, rests, etc.), on top of a server-based Lilypond instance 
> where the code is saved in successive versions (cf. Lilybin).
>
> 1. The student works on the file for a while by themselves.
> 2. They send me a link to the current version (e.g., 
> guilily.com/wpeouryckjhg/7).
> 3. I log in and edit the file, and sent them back the "current" link (e.g., 
> guilily.com/wpeouryckjhg/9).
> 4. We can both see the current version, and one of us can edit and save a new 
> "current" version.
>
> To my mind, lilybin already solves the "collaborative editing" part 
> sufficiently for my needs (and, I’m guessing, the needs of most music 
> educators I know). The only real gap right now is the GUI. I’m trying to 
> figure out how much work would be required to make a Javascript (or something 
> better?) "app" that edits Lily code.
>
> Thanks,
> Kieren.
> 
>
> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: kie...@kierenmacmillan.info
>
>