Re: Key change with clef after the bar line?

2022-02-27 Thread Jean Abou Samra

Le 27/02/2022 à 08:09, Alasdair McAndrew a écrit :
In my current project, I'm trying as far as possible to replicate the 
spirit of the original 18th century publication, in which a key change 
has a clef printed, and both after the bar line.  In one piece, 
there's a segno in the middle of a bar, with such a key change.  In 
standard Lilypond, this micro-example shows that the printed clef 
comes before the bar line (I've left out the segno marker and all 
other markers outside the score):


global = {
  \language english

  \clef treble
  \time 4/4
}

\relative c' {\key c \major c4 d e fs | g a \bar "||" \set
Staff.forceClef = ##t \key c \minor bf c | bf af g f | ef d c2 }


But modern practice is to put the clef before the double bar, and the 
key change afterwards. I want the clef to come after that double bar.  
According to the documentation, this can be changed with 
"break-alignment", in particular with:


\override Score.BreakAlignment #'break-align-orders =
#(make-vector 3 '(span-bar
   breathing-sign
   staff-bar
   key
   clef

 time-signature))


However, in the mini example just given above, adding that override in 
the global declaration has no effect.  I tried changing the order of 
"key" and "clef" in the override, again with no effect.  (When I tried 
his in a larger piece, the key change was printed on the bar-line!)


Is there any way I can notate a key change, at a segno with an extra 
bar line, in order: bar line, clef, key ?



Well, the \global is unused in your example, so it's not
surprising that the override has no effect. With that
oversight corrected, the problem is that the break align symbol
for a KeySignature is not 'key but 'key-signature. You
will find this at
http://lilypond.org/doc/v2.23/Documentation/internals/keysignature
(the break-align-symbol property). So this works:

\version "2.22.1"

\language english

global = {
  \clef treble
  \time 4/4
  \override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(span-bar
    breathing-sign
    staff-bar
    clef
    key-signature
    time-signature))
}

\relative c' {
  \global
  \key c 
\majorhttps://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects

  c4 d e fs |
  g a
  \bar "||"
  \set Staff.forceClef = ##t
  \key c \minor
  bf c |
  bf af g f |
  ef d c2
}


If, like me, you find the space between the clef and the
key signature slightly excessive, you will want to look
at 
https://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects

(that documentation was added in 2.23, but it works in
2.22 as well).

Best,
Jean




Re: Key change with clef after the bar line?

2022-02-27 Thread Jean Abou Samra




Le 27/02/2022 à 09:31, Jean Abou Samra a écrit :

Le 27/02/2022 à 08:09, Alasdair McAndrew a écrit :
In my current project, I'm trying as far as possible to replicate the 
spirit of the original 18th century publication, in which a key 
change has a clef printed, and both after the bar line.  In one 
piece, there's a segno in the middle of a bar, with such a key 
change.  In standard Lilypond, this micro-example shows that the 
printed clef comes before the bar line (I've left out the segno 
marker and all other markers outside the score):


    global = {
      \language english

      \clef treble
      \time 4/4
    }

    \relative c' {\key c \major c4 d e fs | g a \bar "||" \set
    Staff.forceClef = ##t \key c \minor bf c | bf af g f | ef d c2 }


But modern practice is to put the clef before the double bar, and the 
key change afterwards. I want the clef to come after that double 
bar.  According to the documentation, this can be changed with 
"break-alignment", in particular with:


    \override Score.BreakAlignment #'break-align-orders =
    #(make-vector 3 '(span-bar
       breathing-sign
       staff-bar
       key
       clef

     time-signature))


However, in the mini example just given above, adding that override 
in the global declaration has no effect.  I tried changing the order 
of "key" and "clef" in the override, again with no effect.  (When I 
tried his in a larger piece, the key change was printed on the 
bar-line!)


Is there any way I can notate a key change, at a segno with an extra 
bar line, in order: bar line, clef, key ?



Well, the \global is unused in your example, so it's not
surprising that the override has no effect. With that
oversight corrected, the problem is that the break align symbol
for a KeySignature is not 'key but 'key-signature. You
will find this at
http://lilypond.org/doc/v2.23/Documentation/internals/keysignature
(the break-align-symbol property). So this works:

\version "2.22.1"

\language english

global = {
  \clef treble
  \time 4/4
  \override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(span-bar
    breathing-sign
    staff-bar
    clef
    key-signature
    time-signature))
}

\relative c' {
  \global
  \key c 
\majorhttps://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects




Obviously that was a copy-paste problem …


\version "2.22.1"

\language english

global = {
  \clef treble
  \time 4/4
  \override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(span-bar
    breathing-sign
    staff-bar
    clef
    key-signature
    time-signature))
}

\relative c' {
  \global
  \key c \major
  c4 d e fs |
  g a
  \bar "||"
  \set Staff.forceClef = ##t
  \key c \minor
  bf c |
  bf af g f |
  ef d c2
}





Re: A little help

2022-02-27 Thread Valentin Petzel
Hello,

Doing it your way you can simply use

\new Dynamics \with {
\consists Stem_engraver
\consists Note_heads_engraver
\override NoteHead.stencil = #point-stencil
alignAboveContext = "giu"}

which requires a bit less tuning than getting a Staff to behave not like a 
Staff. But I’d rather do something like

tactus = \markup \path #0.15 #'((moveto 0 1) (lineto 0 -1))
giu = \new Staff = "giu" {
  \relative c' {
<<
  {b4 a g f}
  \new Dynamics \with { alignAboveContext = "giu" }
  {\repeat unfold 4 s4-\tactus}
>>
  }
}

which does also allow something like

giu = \new Staff = "giu" {
  \relative c' {
<<
  {b4 a g f}
  {\repeat unfold 4 s4^\tactus}
>>
  }
}

Cheers,
Valentin

Am Samstag, 26. Februar 2022, 18:16:23 CET schrieb Rip _Mus:
> Hello everyone,
> I have prepared a minimal example (attached) to explain my problem.
> In a PianoStaff, transiently, I insert a new staff above the left hand to
> create a kind of "tactus" reference (widely used in contemporary music).
> I wonder how I can do to decrease the excessive distance between the
> extreme staves, in order to make everything more compact.
> I'm looking at the chapters related to vertical spacing, but I just can't
> get out of them.
> 
> 
> Thanks and greetings to all
> 
> Rip_mus



signature.asc
Description: This is a digitally signed message part.


Re: Key change with clef after the bar line?

2022-02-27 Thread Alasdair McAndrew
Dear Jean,
Thank you very much for your detailed reply.  What a duffer I am not to realize 
that \global was not being used!  I'll look through - and experiment with - 
your solution with care and great interest.
kind regards,
Alasdair

On Sunday 27 February 2022 19:31:17 (+11:00), Jean Abou Samra wrote:

> Le 27/02/2022 à 08:09, Alasdair McAndrew a écrit :
> > In my current project, I'm trying as far as possible to replicate the 
> > spirit of the original 18th century publication, in which a key change has 
> > a clef printed, and both after the bar line.  In one piece, there's a segno 
> > in the middle of a bar, with such a key change.  In standard Lilypond, this 
> > micro-example shows that the printed clef cdeailedomes before the bar line 
> > (I've left out the segno marker and all other markers outside the score):
> >
> > global = {
> >   \language english
> >
> >   \clef treble
> >   \time 4/4
> > }
> >
> > \relative c' {\key c \major c4 d e fs | g a \bar "||" \set
> > Staff.forceClef = ##t \key c \minor bf c | bf af g f | ef d c2 }
> >
> >
> > But modern practice is to put the clef before the double bar, and the key 
> > change afterwards. I want the clef to come after that double bar.  
> > According to the documentation, this can be changed with "break-alignment", 
> > in particular with:
> >
> > \override Score.BreakAlignment #'break-align-orders =
> > #(make-vector 3 '(span-bar
> >breathing-sign
> >staff-bar
> >key
> >clef
> >
> >  time-signature))
> >
> >
> > However, in the mini example just given above, adding that override in the 
> > global declaration has no effect.  I tried changing the order of "key" and 
> > "clef" in the override, again with no effect.  (When I tried his in a 
> > larger piece, the key change was printed on the bar-line!)
> >
> > Is there any way I can notate a key change, at a segno with an extra bar 
> > line, in order: bar line, clef, key ?
>deailed
>
> Well, the \global is unused in your example, so it's not
> surprising that the override has no effect. With that
> oversight corrected, the problem is that the break align symbol
> for a KeySignature is not 'key but 'key-signature. You
> will find this at
> http://lilypond.org/doc/v2.23/Documentation/internals/keysignature
> (the break-align-symbol property). So this works:
>
> \version "2.22.1"
>
> \language english
>
> global = {
>   \clef treble
>   \time 4/4
>   \override Score.BreakAlignment.break-align-orders =
>   #(make-vector 3 '(span-bar
> breathing-sign
> staff-bar
> clef
> key-signature
> time-signature))
> }
>
> \relative c' {
>   \global
>   \key c 
> \majorhttps://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects
>   c4 d e fs |
>   g a
>   \bar "||"
>   \set Staff.forceClef = ##t
>   \key c \minor
>   bf c |
>   bf af g f |
>   ef d c2
> }
>
>
> If, like me, you find the space between the clef and the
> key signature slightly excessive, you will want to look
> at 
> https://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects
> (that documentation was added in 2.23, but it works in
> 2.22 as well).
>
> Best,
> Jean
>
>
-- 
0432 854 858
https://numbersandshapes.net



Snippet only as PDF

2022-02-27 Thread Bophead 2000
Hello all,

I want to produce lilypond snippets to be used within a text – but only in
one graphics file format (PDF, EPS or SVG).

In the moment I am using a method I copied from the examples in the
HTML-manuals putting the following in front of the music:



\include "lilypond-book-preamble.ly"

\paper {
  indent = 0\mm
  line-width = 160\mm
  line-width = #(- line-width (* mm  3.00) (* mm 1))
  line-width = 160\mm - 2.0 * 10.16\mm
  line-width = #(- line-width (* mm  3.00) (* mm 1))
}

\layout {}



So far everything is working but what annoys me are all those files that I
don’t need: tex, texi etc. (I am not using LaTeX) cluttering my folders.
(Don’t get me wrong – those files may be useful and necessary if using
LaTeX, but I am using ConTeXt so I have no use for them.)

So my question is:

What is the simplest way to get snippets cut down to only content as only
one file – be it PDF, EPS or SVG?

Thanks in advance
Bophead


Re: A little help

2022-02-27 Thread K. Blum

Hello,

Am 27.02.2022 um 06:03 schrieb lilypond-user-requ...@gnu.org:

In a PianoStaff, transiently, I insert a new staff above the left hand to
create a kind of "tactus" reference (widely used in contemporary music).


did you already search the notation reference for
"Grid_line_span_engraver"?
https://lilypond.org/doc/v2.22/Documentation/notation-big-page#grid-lines

Maybe that's exactly what you need.

Cheers,
Klaus





Re: Snippet only as PDF

2022-02-27 Thread Henning Hraban Ramm

Hi Bophead,

welcome, fellow ConTeXt user!
Do you know https://wiki.contextgarden.net/LilyPond ?
I’m using only parts of lilypond-book-preamble.ly

Maybe we can improve the ConTeXt-LilyPond integration together.

Hraban

Am 27.02.22 um 10:40 schrieb Bophead 2000:

Hello all,

I want to produce lilypond snippets to be used within a text – but only 
in one graphics file format (PDF, EPS or SVG).


In the moment I am using a method I copied from the examples in the 
HTML-manuals putting the following in front of the music:




\include "lilypond-book-preamble.ly "

\paper {
   indent = 0\mm
   line-width = 160\mm
   line-width = #(- line-width (* mm  3.00) (* mm 1))
   line-width = 160\mm - 2.0 * 10.16\mm
   line-width = #(- line-width (* mm  3.00) (* mm 1))
}

\layout {}



So far everything is working but what annoys me are all those files that 
I don’t need: tex, texi etc. (I am not using LaTeX) cluttering my 
folders. (Don’t get me wrong – those files may be useful and necessary 
if using LaTeX, but I am using ConTeXt so I have no use for them.)


So my question is:

What is the simplest way to get snippets cut down to only content as 
only one file – be it PDF, EPS or SVG?


Thanks in advance
Bophead





Re: A little help

2022-02-27 Thread K. Blum

Hi Rip_Mus,

Am 27.02.2022 um 12:23 schrieb Rip _Mus:

Yes, I tried to use the grid point-grid line engravers, but they write
segments that spread over the entire system...


Ah, I see. They spread between the center staff lines.
But it seems you can change that by modifying GridPoint.Y-extent. Does
that help?

Cheers,
Klaus

%---
\version "2.22.1"

su = \new Staff = "su" {
  \relative c' {c4 d e f}
}

giu = \new Staff = "giu" {
  \relative c' { b4 a g f }
}


\score {
  \new PianoStaff <<
    \su
    \giu
  >>
}

\layout {
  \context {
    \Staff
    % set up grids
    \consists "Grid_point_engraver"
    % set the grid interval to one quarter note
    gridInterval = #(ly:make-moment 1/4)
  }
  \context {
    \Score
    \consists "Grid_line_span_engraver"
    % this moves them to the right half a staff space
    \override NoteColumn.X-offset = #-0.5
    % limit the vertical extent:
    \override GridPoint.Y-extent = #'(3.0 . -4.0)
  }
}
%---



Re: A little help

2022-02-27 Thread Valentin Petzel
Hello, please keep the list in CC,

if you want to have actual stems that is of course fine. But then I’d simply do 
this:

giu = \new Staff = "giu" {
  \relative c' {
<<
  {b4 a g f}
  \new Dynamics \with {
   \accepts Voice
   \defaultchild "Voice"
   \override NoteHead.Y-offset = #-3
   \override NoteHead.stencil = #point-stencil
   \override Stem.length = #5
   \override Beam.positions = #'(-.7 . -.7)
   \override Flag.font-size = #-4
   \override TupletNumber.font-size = #-4
   \override TupletBracket.thickness = #1.3
alignAboveContext = "giu"}
  \new Voice { \tuplet 3/2 { c'8 c c } c\noBeam c\noBeam c4}
>>
  }
}

Cheers,
Valentin

Am Sonntag, 27. Februar 2022, 12:21:27 CET schrieb Rip _Mus:
> Dear Valentin,
> you are such a lilypond-wizard!
> All your solutions are great, but maybe I prefer the first because I want
> the possibility to use a tactus of 8th note and not only quarter. (I think
> that reply a flag in postscript is not a good way of spending time!)
> What do you think about using markup with a score inside?
> 
> Thank you again
> 
> Il dom 27 feb 2022, 10:19 Valentin Petzel  ha scritto:
> > Hello,
> > 
> > Doing it your way you can simply use
> > 
> > \new Dynamics \with {
> > 
> > \consists Stem_engraver
> > \consists Note_heads_engraver
> > \override NoteHead.stencil = #point-stencil
> > alignAboveContext = "giu"}
> > 
> > which requires a bit less tuning than getting a Staff to behave not like a
> > Staff. But I’d rather do something like
> > 
> > tactus = \markup \path #0.15 #'((moveto 0 1) (lineto 0 -1))
> > giu = \new Staff = "giu" {
> > 
> >   \relative c' {
> >   
> > <<
> > 
> >   {b4 a g f}
> >   \new Dynamics \with { alignAboveContext = "giu" }
> >   {\repeat unfold 4 s4-\tactus}
> >   
> >   }
> > 
> > }
> > 
> > which does also allow something like
> > 
> > giu = \new Staff = "giu" {
> > 
> >   \relative c' {
> >   
> > <<
> > 
> >   {b4 a g f}
> >   {\repeat unfold 4 s4^\tactus}
> >   
> >   }
> > 
> > }
> > 
> > Cheers,
> > Valentin
> > 
> > Am Samstag, 26. Februar 2022, 18:16:23 CET schrieb Rip _Mus:
> > > Hello everyone,
> > > I have prepared a minimal example (attached) to explain my problem.
> > > In a PianoStaff, transiently, I insert a new staff above the left hand
> > > to
> > > create a kind of "tactus" reference (widely used in contemporary music).
> > > I wonder how I can do to decrease the excessive distance between the
> > > extreme staves, in order to make everything more compact.
> > > I'm looking at the chapters related to vertical spacing, but I just
> > > can't
> > > get out of them.
> > > 
> > > 
> > > Thanks and greetings to all
> > > 
> > > Rip_mus



signature.asc
Description: This is a digitally signed message part.


Re: Re: Snippet only as PDF

2022-02-27 Thread Bophead 2000
Hi Hraban,

I have seen that page in ConTeXtgarden. But as far as I understood the
“filter” module works only in ConTeXt MkIV and the workaround to use it in
ConTeXt LMTX has a security flaw (cannot remember where I read the latter).
That is why I have not tried it yet. I wanted something that works with
LMTX as well.

But I will look into that as in the moment I switched back to MkIV anyway
to be able to use Dan Kreiders MusFrets font (
https://www.notationcentral.com/product/musfrets/) properly (it is working
with ligatures and colr/cpal font features and not displayed properly in
most PDF readers if rendered with LMTX).

And of course I am willing to improve the ConTeXt-LilyPond integration
together.

Back to pure Lilypond:

Nonetheless I would still like to know if there is a way to render a
snippet cut to its pure musical content in only one file format. Me and
others might have a use for such snippets as graphics for other programs as
well that do not integrate Lilypond as well as ConTeXt.

(From ConTeXt I am used to “--purgeall” to get rid of all the auxiliary
files. But something like that doesn’t seem to to exist for Lilypond as
there is an intention behind all those files).

Grüße aus München

Bophead

> Hi Bophead,
>
> welcome, fellow ConTeXt user!
> Do you know https://wiki.contextgarden.net/LilyPond ?
> I’m using only parts of lilypond-book-preamble.ly
>
> Maybe we can improve the ConTeXt-LilyPond integration together.
>
> Hraban
>
> Am 27.02.22 um 10:40 schrieb Bophead 2000:
>
> Hello all,
>
>
> I want to produce lilypond snippets to be used within a text – but only in
> one graphics file format (PDF, EPS or SVG). In the moment I am using a
> method I copied from the examples in the HTML-manuals putting the
> following in front of the music:
>
> 
>
> \include "lilypond-book-preamble.ly "
>
> \paper {
>indent = 0\mm
>line-width = 160\mm
>line-width = #(- line-width (* mm  3.00) (* mm 1))
>line-width = 160\mm - 2.0 * 10.16\mm
>line-width = #(- line-width (* mm  3.00) (* mm 1))
> }
>
> \layout {}
>
> 
>
>
> So far everything is working but what annoys me are all those files that I
> don’t need: tex, texi etc. (I am not using LaTeX) cluttering my folders.
> (Don’t get me wrong – those files may be useful and necessary if using
> LaTeX, but I am using ConTeXt so I have no use for them.)
>
> So my question is:
>
>
> What is the simplest way to get snippets cut down to only content as only
> one file – be it PDF, EPS or SVG?
>
> Thanks in advance
> Bophead
>
>


Re: Snippet only as PDF

2022-02-27 Thread Henning Hraban Ramm

Hi Bophead,

Am 27.02.22 um 14:16 schrieb Bophead 2000:

Hi Hraban,

I have seen that page in ConTeXtgarden. But as far as I understood the 
“filter” module works only in ConTeXt MkIV and the workaround to use it 
in ConTeXt LMTX has a security flaw (cannot remember where I read the 
latter). That is why I have not tried it yet. I wanted something that 
works with LMTX as well.


The filter module works with LMTX, and if something doesn’t work, Aditya 
is usually quick to fix it.


But I will look into that as in the moment I switched back to MkIV 
anyway to be able to use Dan Kreiders MusFrets font 
(https://www.notationcentral.com/product/musfrets/ 
) properly (it is 
working with ligatures and colr/cpal font features and not displayed 
properly in most PDF readers if rendered with LMTX).


Please raise that issue on the ConTeXt mailing list – if something 
doesn’t work with LMTX that does work with MkIV, it’s something Hans 
will usually fix quickly (even if at the moment he’s busy working on the 
math enhancements).



Grüße aus München


Grüße aus Limburg/Lahn ;)

Hraban




\include in scheme functions

2022-02-27 Thread Pierre-Yves Saumont
Hi,

The Lilypond documentation says that any lilypond code can be use in a
Scheme function by enclosing it in a #{ ...  #} block, but it seems
\include doesn't work in this case.

I am building a program to handle multiple Big Band scores. I need to
extract parts for each instrument (16 to 22) and for all titles in a given
program (10 - 15).

At this time, here is what I do:

\include "../Doxy/Doxy_music.ly"
\include "partAltoI.ly"
\include "../Alfie/Alfie_music.ly"
\include "partAltoI.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partAltoI.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partAltoI.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partAltoI.ly"
.
.
.
include "../Doxy/Doxy_music.ly"
\include "partAltoII.ly"
\include "../Alfie/Alfie_music.ly"
\include "partAltoII.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partAltoII.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partAltoII.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partAltoII.ly"
.
.
.
include "../Doxy/Doxy_music.ly"
\include "partTenorI.ly"
\include "../Alfie/Alfie_music.ly"
\include "partTenorI.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partTenorI.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partTenorI.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partTenorI.ly"
.
.
.

This is tedious, and I would like to be able to simply have to enter the
list of titles:

Doxy
Alfie
CestSiBon
BeyondTheSea
CloseToYou
.
.
.

and the list of instruments:

AltoI
AltoII
TenorI
TenorII
Baritone
.
.
.

The result should be a series of PDF files, one for each
instrument, containing the specific parts for all selected tunes.

I tried to write a function such as:

part = #(define-void-function (score instrument) (string? string?)
   #{
 \include "../Doxy/Doxy_music.ly"
 \include "partAltoI.ly"
   #})

(Here, I am not constructing the file names from the arguments, only
testing the use of \include in the function.

This doesn't work, producing the following error:

.../include/LilyJAZZwithBarNums.ily:62:1 <0>: error: syntax error,
unexpected SCM_TOKEN, expecting end of input


#(define jazz-map '(

/tmp/frescobaldi-1mgd5_wr/tmpys2kq_gz/March2022_parts_alto1.ly:13:1 <1>:
error: error in #{ ... #}


\part "Doxy" "AltoI"


The message says the error is in LilyJAZZwithBarNums.ily, but since the
same instructions work when not in a function, I presume it's not related
to this file.


Is there a way to make this work, or is there another way to achieve the
intended result? For example, is there a way to read a lilypond variable
from a file without including the whole file?


Thanks for any advice!


Various ways to write triplets

2022-02-27 Thread Pierre-Yves Saumont
Hi,

I have always used the following syntax to write triplets:

\tuplet 3/2 {a8 b c)

But when I import MusicXML files, tuplets are most often rendered as:

\once \omit TupletBracket
  \times 2/3  { a8 b8 c8}
  }

The most surprising is that the tuple bracket isn't omitted, and removing
"\once \omit TupletBracket" doesn't change anything.

On the other hand, I also found:

a8*2/3  b8*2/3  c8*2/3

which produces a triplet with no bracket.

Here is an example showing the four ways:

\version "2.22.0"

\score {
  \new Staff {
\relative c' {
  \time 4/4
  \key c \major
  a4 b \tuplet 3/2 {c d e} | f g a b \break
  a,4 b \times 2/3 {c d e} | f g a b \break
  \once \omit TupletBracket
  a,4 b \times 2/3 {c d e} | f g a b \break
  a,4 b c4*2/3  d4*2/3  e4*2/3 | f4 g a b
}
  }
  \layout {}
}

What is the recommended method to get triplets with and without brackets?
And what is the purpose of other methods?


Re: Various ways to write triplets

2022-02-27 Thread Jean Abou Samra




Le 27/02/2022 à 10:29, Pierre-Yves Saumont a écrit :

Hi,

I have always used the following syntax to write triplets:

\tuplet 3/2 {a8 b c)

But when I import MusicXML files, tuplets are most often rendered as:

\once \omit TupletBracket
  \times 2/3  { a8 b8 c8}
  }

The most surprising is that the tuple bracket isn't omitted, and 
removing "\once \omit TupletBracket" doesn't change anything.


On the other hand, I also found:

a8*2/3  b8*2/3  c8*2/3

which produces a triplet with no bracket.

Here is an example showing the four ways:

\version "2.22.0"

\score {
  \new Staff {
    \relative c' {
      \time 4/4
      \key c \major
      a4 b \tuplet 3/2 {c d e} | f g a b \break
      a,4 b \times 2/3 {c d e} | f g a b \break
      \once \omit TupletBracket
      a,4 b \times 2/3 {c d e} | f g a b \break
      a,4 b c4*2/3  d4*2/3  e4*2/3 | f4 g a b
    }
  }
  \layout {}
}

What is the recommended method to get triplets with and without 
brackets? And what is the purpose of other methods?






For the record, this has been answered on the French-speaking list
(where Pierre-Yves posted as well because he thought his lilypond-user
subscription was not working).

Jean



Re: \include in scheme functions

2022-02-27 Thread Jean Abou Samra




Le 27/02/2022 à 09:50, Pierre-Yves Saumont a écrit :

Hi,

The Lilypond documentation says that any lilypond code can be use in a 
Scheme function by enclosing it in a #{ ...  #} block, but it seems 
\include doesn't work in this case.


I am building a program to handle multiple Big Band scores. I need to 
extract parts for each instrument (16 to 22) and for all titles in a 
given program (10 - 15).


At this time, here is what I do:

\include "../Doxy/Doxy_music.ly"
\include "partAltoI.ly"
\include "../Alfie/Alfie_music.ly"
\include "partAltoI.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partAltoI.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partAltoI.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partAltoI.ly"
.
.
.
include "../Doxy/Doxy_music.ly"
\include "partAltoII.ly"
\include "../Alfie/Alfie_music.ly"
\include "partAltoII.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partAltoII.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partAltoII.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partAltoII.ly"
.
.
.
include "../Doxy/Doxy_music.ly"
\include "partTenorI.ly"
\include "../Alfie/Alfie_music.ly"
\include "partTenorI.ly"
\include "../CestSiBon/CestSiBon_music.ly"
\include "partTenorI.ly"
\include "../BeyondTheSea/BeyondTheSea_music.ly"
\include "partTenorI.ly"
\include "../CloseToYou/CloseToYou_music.ly"
\include "partTenorI.ly"
.
.
.

This is tedious, and I would like to be able to simply have to enter 
the list of titles:


Doxy
Alfie
CestSiBon
BeyondTheSea
CloseToYou
.
.
.

and the list of instruments:

AltoI
AltoII
TenorI
TenorII
Baritone
.
.
.

The result should be a series of PDF files, one for each 
instrument, containing the specific parts for all selected tunes.


I tried to write a function such as:

part = #(define-void-function (score instrument) (string? string?)
   #{
     \include "../Doxy/Doxy_music.ly"
     \include "partAltoI.ly"
   #})

(Here, I am not constructing the file names from the arguments, only 
testing the use of \include in the function.


This doesn't work, producing the following error:

.../include/LilyJAZZwithBarNums.ily:62:1 <0>: error: syntax error, 
unexpected SCM_TOKEN, expecting end of input


#(define jazz-map '(

/tmp/frescobaldi-1mgd5_wr/tmpys2kq_gz/March2022_parts_alto1.ly:13:1 
<1>: error: error in #{ ... #}


\part "Doxy" "AltoI"

The message says the error is in LilyJAZZwithBarNums.ily, but since 
the same instructions work when not in a function, I presume it's not 
related to this file.


Is there a way to make this work, or is there another way to achieve 
the intended result? For example, is there a way to read a lilypond 
variable from a file without including the whole file?


Thanks for any advice!





As with 
https://lists.gnu.org/archive/html/lilypond-user/2022-02/msg00537.html,

this is being answered on lilypond-user-fr.

Jean




Re: Various ways to write triplets

2022-02-27 Thread Knute Snortum
There's also a fifth way:

%%%
\version "2.22.0"

\score {
  \new Staff {
\relative c' {
  \time 4/4
  \key c \major
  a4 b \tuplet 3/2 {c d e} | f g a b \break
  a,4 b \times 2/3 {c d e} | f g a b \break
  \once \omit TupletBracket
  a,4 b \times 2/3 {c d e} | f g a b \break
  a,4 b c4*2/3  d4*2/3  e4*2/3 | f4 g a b \break
  % the above can be simplified somewhat to...
  a,4 b c4*2/3 d e | f4 g a b \break
  % and one more way
  a,4 b \scaleDurations 2/3 {c d e} | f4 g a b
}
  }
  \layout {}
}
%%%

--
Knute Snortum

On Sun, Feb 27, 2022 at 6:17 AM Jean Abou Samra  wrote:
>
>
>
> Le 27/02/2022 à 10:29, Pierre-Yves Saumont a écrit :
> > Hi,
> >
> > I have always used the following syntax to write triplets:
> >
> > \tuplet 3/2 {a8 b c)
> >
> > But when I import MusicXML files, tuplets are most often rendered as:
> >
> > \once \omit TupletBracket
> >   \times 2/3  { a8 b8 c8}
> >   }
> >
> > The most surprising is that the tuple bracket isn't omitted, and
> > removing "\once \omit TupletBracket" doesn't change anything.
> >
> > On the other hand, I also found:
> >
> > a8*2/3  b8*2/3  c8*2/3
> >
> > which produces a triplet with no bracket.
> >
> > Here is an example showing the four ways:
> >
> > \version "2.22.0"
> >
> > \score {
> >   \new Staff {
> > \relative c' {
> >   \time 4/4
> >   \key c \major
> >   a4 b \tuplet 3/2 {c d e} | f g a b \break
> >   a,4 b \times 2/3 {c d e} | f g a b \break
> >   \once \omit TupletBracket
> >   a,4 b \times 2/3 {c d e} | f g a b \break
> >   a,4 b c4*2/3  d4*2/3  e4*2/3 | f4 g a b
> > }
> >   }
> >   \layout {}
> > }
> >
> > What is the recommended method to get triplets with and without
> > brackets? And what is the purpose of other methods?
> >
> >
>
>
> For the record, this has been answered on the French-speaking list
> (where Pierre-Yves posted as well because he thought his lilypond-user
> subscription was not working).
>
> Jean
>



Re: Fatal error messages

2022-02-27 Thread David Wright
On Sun 27 Feb 2022 at 05:35:25 (+), Alasdair McAndrew wrote:

> Many thanks - your thought about write access was right on the money.  For 
> reasons I can't determine, the folder in which I'm working had user write 
> access removed, so its permissions were dr-xr-xr-x instead of drwxr-xr-x as 
> they should have been.  I don't know how I removed the write access, but 
> indeed I did; it's now been re-instated and all works well (phew).

Various gotchas exist. A frequent one is unpacking an archive,
particularly as root, thereby copying the permissions embedded
within the archive, including that for the top-level directory.

Cheers,
David.



Re: Snippet only as PDF

2022-02-27 Thread David Wright
On Sun 27 Feb 2022 at 14:16:32 (+0100), Bophead 2000 wrote:

> > > I want to produce lilypond snippets to be used within a text – but only in
> > > one graphics file format (PDF, EPS or SVG). In the moment I am using a
> > > method I copied from the examples in the HTML-manuals putting the
> > > following in front of the music:
> > >
> > > \include "lilypond-book-preamble.ly "

[ … ]

> > > So far everything is working but what annoys me are all those files that I
> > > don’t need: tex, texi etc. (I am not using LaTeX) cluttering my folders.
> > > (Don’t get me wrong – those files may be useful and necessary if using
> > > LaTeX, but I am using ConTeXt so I have no use for them.)
> > >
> > > So my question is:
> > >
> > > What is the simplest way to get snippets cut down to only content as only
> > > one file – be it PDF, EPS or SVG?

> Back to pure Lilypond:
> 
> Nonetheless I would still like to know if there is a way to render a
> snippet cut to its pure musical content in only one file format. Me and
> others might have a use for such snippets as graphics for other programs as
> well that do not integrate Lilypond as well as ConTeXt.
> 
> (From ConTeXt I am used to “--purgeall” to get rid of all the auxiliary
> files. But something like that doesn’t seem to to exist for Lilypond as
> there is an intention behind all those files).

Hraban, as a ConTeXt user, may have more idea of your workflow.
My scripts merely remove the excess files, using constructs
like "${Sourcefilename/%.ly/.log}" to generate their names.

(Actually they don't remove the files, but move them to a nonce
directory under /tmp, so that they could be inspected if required.
/tmp is cleaned automatically.)

Cheers,
David.



Re: Snippet only as PDF

2022-02-27 Thread Jean Abou Samra

Le 27/02/2022 à 10:40, Bophead 2000 a écrit :
What is the simplest way to get snippets cut down to only content as 
only one file – be it PDF, EPS or SVG?


Add

#(ly:set-option 'aux-files #f)

Best,
Jean




My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Kenneth Wolcott
Hi;

  My Tuba+Piano engravings: during midi playback, the Piano dominates
the Tuba; why?

  I know that this is really a midi versus live performance question...

  I can change the dynamics of the Tuba to be "fff" and both the left
hand and right hand of the Piano to be "ppp", and yet the Piano
dominates the Tuba during midi playback.

  I'm not expecting a midi playback to sound as good as a live
performance, but this seems...odd.

  Is there anything I can do with Lilypond to generate a midi playback
of Tuba+Piano pieces that sound more realistic?

Thanks,
Ken Wolcott



Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Gilles Sadowski
Hello?

Le dim. 27 févr. 2022 à 18:47, Kenneth Wolcott
 a écrit :
>
> Hi;
>
>   My Tuba+Piano engravings: during midi playback, the Piano dominates
> the Tuba; why?
>
>   I know that this is really a midi versus live performance question...
>
>   I can change the dynamics of the Tuba to be "fff" and both the left
> hand and right hand of the Piano to be "ppp", and yet the Piano
> dominates the Tuba during midi playback.

You can alter the balance with

  \set Staff.midiMinimumVolume = #0.2
  \set Staff.midiMaximumVolume = #0.8

HTH,
Gilles

>
>   I'm not expecting a midi playback to sound as good as a live
> performance, but this seems...odd.
>
>   Is there anything I can do with Lilypond to generate a midi playback
> of Tuba+Piano pieces that sound more realistic?
>
> Thanks,
> Ken Wolcott
>



Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Valentin Petzel
Hello Ken,

Lilypond does not do midi replay, it just produces a midi file. This means that 
this is most likely a balancing problem of whatever sampler you're using for 
playback.

Cheers,
Valentin

27.02.2022 18:47:30 Kenneth Wolcott :

> Hi;
> 
>   My Tuba+Piano engravings: during midi playback, the Piano dominates
> the Tuba; why?
> 
>   I know that this is really a midi versus live performance question...
> 
>   I can change the dynamics of the Tuba to be "fff" and both the left
> hand and right hand of the Piano to be "ppp", and yet the Piano
> dominates the Tuba during midi playback.
> 
>   I'm not expecting a midi playback to sound as good as a live
> performance, but this seems...odd.
> 
>   Is there anything I can do with Lilypond to generate a midi playback
> of Tuba+Piano pieces that sound more realistic?
> 
> Thanks,
> Ken Wolcott



Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Valentin Petzel
Hello Ken,

Lilypond does not do midi replay, it just produces a midi file. This means that 
this is most likely a balancing problem of whatever sampler you're using for 
playback.

Cheers,
Valentin

27.02.2022 18:47:30 Kenneth Wolcott :

> Hi;
> 
>   My Tuba+Piano engravings: during midi playback, the Piano dominates
> the Tuba; why?
> 
>   I know that this is really a midi versus live performance question...
> 
>   I can change the dynamics of the Tuba to be "fff" and both the left
> hand and right hand of the Piano to be "ppp", and yet the Piano
> dominates the Tuba during midi playback.
> 
>   I'm not expecting a midi playback to sound as good as a live
> performance, but this seems...odd.
> 
>   Is there anything I can do with Lilypond to generate a midi playback
> of Tuba+Piano pieces that sound more realistic?
> 
> Thanks,
> Ken Wolcott



Re: Snippet only as PDF

2022-02-27 Thread Bophead 2000
Hi Jean,

That works fine for PDF and EPS output already, but not for SVG. So I added

#(ly:set-option 'backend 'svg)

afterwards and that made the Lilypond command line options for SVG output
work. I guess that overrides the EPS-backend defined in “
lilypond-book-preamble.ly”.

I will try to modify the “lilypond-book-preamble.ly” file accordingly, save
it under a different name and call that new file instead. Would the EPS and
PDF output still work properly then?

So far you have helped me a lot already, the SVG output is not really
needed in the moment, but it interests me still how to achieve it correctly.

Merci Beaucoup

Bophead

On Sun, Feb 27, 2022 at 5:35 PM Jean Abou Samra  wrote:

> Le 27/02/2022 à 10:40, Bophead 2000 a écrit :
> > What is the simplest way to get snippets cut down to only content as
> > only one file – be it PDF, EPS or SVG?
>
> Add
>
> #(ly:set-option 'aux-files #f)
>
> Best,
> Jean
>
>


Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Kenneth Wolcott
Thank you, Gilles and Valentin.

I'll look into what settings I can change with fluidsynth.

I did try the "\set Staff.midiMinimumVolume = #0.2" and the " \set
Staff.midiMaximumVolume = #0.8" idea; it seemed to help a little.

Thanks!

On Sun, Feb 27, 2022 at 10:03 AM Valentin Petzel  wrote:
>
> Hello Ken,
>
> Lilypond does not do midi replay, it just produces a midi file. This means 
> that this is most likely a balancing problem of whatever sampler you're using 
> for playback.
>
> Cheers,
> Valentin
>
> 27.02.2022 18:47:30 Kenneth Wolcott :
>
> > Hi;
> >
> >   My Tuba+Piano engravings: during midi playback, the Piano dominates
> > the Tuba; why?
> >
> >   I know that this is really a midi versus live performance question...
> >
> >   I can change the dynamics of the Tuba to be "fff" and both the left
> > hand and right hand of the Piano to be "ppp", and yet the Piano
> > dominates the Tuba during midi playback.
> >
> >   I'm not expecting a midi playback to sound as good as a live
> > performance, but this seems...odd.
> >
> >   Is there anything I can do with Lilypond to generate a midi playback
> > of Tuba+Piano pieces that sound more realistic?
> >
> > Thanks,
> > Ken Wolcott



Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Valentin Petzel
Hi Ken,

if you’re using fluidsynth you probably have a badly made sound font. Maybe 
changing the soundfont would do the trick.

Cheers,
Valentin

Am Sonntag, 27. Februar 2022, 20:06:14 CET schrieb Kenneth Wolcott:
> Thank you, Gilles and Valentin.
> 
> I'll look into what settings I can change with fluidsynth.
> 
> I did try the "\set Staff.midiMinimumVolume = #0.2" and the " \set
> Staff.midiMaximumVolume = #0.8" idea; it seemed to help a little.
> 
> Thanks!
> 
> On Sun, Feb 27, 2022 at 10:03 AM Valentin Petzel  wrote:
> > Hello Ken,
> > 
> > Lilypond does not do midi replay, it just produces a midi file. This means
> > that this is most likely a balancing problem of whatever sampler you're
> > using for playback.
> > 
> > Cheers,
> > Valentin
> > 
> > 27.02.2022 18:47:30 Kenneth Wolcott :
> > > Hi;
> > > 
> > >   My Tuba+Piano engravings: during midi playback, the Piano dominates
> > > 
> > > the Tuba; why?
> > > 
> > >   I know that this is really a midi versus live performance question...
> > >   
> > >   I can change the dynamics of the Tuba to be "fff" and both the left
> > > 
> > > hand and right hand of the Piano to be "ppp", and yet the Piano
> > > dominates the Tuba during midi playback.
> > > 
> > >   I'm not expecting a midi playback to sound as good as a live
> > > 
> > > performance, but this seems...odd.
> > > 
> > >   Is there anything I can do with Lilypond to generate a midi playback
> > > 
> > > of Tuba+Piano pieces that sound more realistic?
> > > 
> > > Thanks,
> > > Ken Wolcott



signature.asc
Description: This is a digitally signed message part.


Re: My Tuba+Piano engravings: during midi playback, the Piano dominates the Tuba; why?

2022-02-27 Thread Vaughan McAlley
On Mon, 28 Feb 2022 at 04:48, Kenneth Wolcott 
wrote:

> Hi;
>
>   My Tuba+Piano engravings: during midi playback, the Piano dominates
> the Tuba; why?
>
>   I know that this is really a midi versus live performance question...
>
>   I can change the dynamics of the Tuba to be "fff" and both the left
> hand and right hand of the Piano to be "ppp", and yet the Piano
> dominates the Tuba during midi playback.
>
>   I'm not expecting a midi playback to sound as good as a live
> performance, but this seems...odd.
>
>   Is there anything I can do with Lilypond to generate a midi playback
> of Tuba+Piano pieces that sound more realistic?
>
> Thanks,
> Ken Wolcott
>
>
Are you doing a fast render in Fluidsynth? I had problems like that last
week with a choral work. All the voices were set to clarinet at the same
volume, but a couple were only just audible. I had to “record” a live MIDI
performance.

This page may have something to do with that issue, if this is the issue...

https://github.com/FluidSynth/fluidsynth/issues/219

Vaughan


Re: A little help

2022-02-27 Thread Rip _Mus
Thank you Valentin,
this is really perfect!



Il dom 27 feb 2022, 13:50 Valentin Petzel  ha scritto:

> Hello, please keep the list in CC,
>
> if you want to have actual stems that is of course fine. But then I’d
> simply do
> this:
>
> giu = \new Staff = "giu" {
>   \relative c' {
> <<
>   {b4 a g f}
>   \new Dynamics \with {
>\accepts Voice
>\defaultchild "Voice"
>\override NoteHead.Y-offset = #-3
>\override NoteHead.stencil = #point-stencil
>\override Stem.length = #5
>\override Beam.positions = #'(-.7 . -.7)
>\override Flag.font-size = #-4
>\override TupletNumber.font-size = #-4
>\override TupletBracket.thickness = #1.3
> alignAboveContext = "giu"}
>   \new Voice { \tuplet 3/2 { c'8 c c } c\noBeam c\noBeam c4}
> >>
>   }
> }
>
> Cheers,
> Valentin
>
> Am Sonntag, 27. Februar 2022, 12:21:27 CET schrieb Rip _Mus:
> > Dear Valentin,
> > you are such a lilypond-wizard!
> > All your solutions are great, but maybe I prefer the first because I want
> > the possibility to use a tactus of 8th note and not only quarter. (I
> think
> > that reply a flag in postscript is not a good way of spending time!)
> > What do you think about using markup with a score inside?
> >
> > Thank you again
> >
> > Il dom 27 feb 2022, 10:19 Valentin Petzel  ha
> scritto:
> > > Hello,
> > >
> > > Doing it your way you can simply use
> > >
> > > \new Dynamics \with {
> > >
> > > \consists Stem_engraver
> > > \consists Note_heads_engraver
> > > \override NoteHead.stencil = #point-stencil
> > > alignAboveContext = "giu"}
> > >
> > > which requires a bit less tuning than getting a Staff to behave not
> like a
> > > Staff. But I’d rather do something like
> > >
> > > tactus = \markup \path #0.15 #'((moveto 0 1) (lineto 0 -1))
> > > giu = \new Staff = "giu" {
> > >
> > >   \relative c' {
> > >
> > > <<
> > >
> > >   {b4 a g f}
> > >   \new Dynamics \with { alignAboveContext = "giu" }
> > >   {\repeat unfold 4 s4-\tactus}
> > >
> > >   }
> > >
> > > }
> > >
> > > which does also allow something like
> > >
> > > giu = \new Staff = "giu" {
> > >
> > >   \relative c' {
> > >
> > > <<
> > >
> > >   {b4 a g f}
> > >   {\repeat unfold 4 s4^\tactus}
> > >
> > >   }
> > >
> > > }
> > >
> > > Cheers,
> > > Valentin
> > >
> > > Am Samstag, 26. Februar 2022, 18:16:23 CET schrieb Rip _Mus:
> > > > Hello everyone,
> > > > I have prepared a minimal example (attached) to explain my problem.
> > > > In a PianoStaff, transiently, I insert a new staff above the left
> hand
> > > > to
> > > > create a kind of "tactus" reference (widely used in contemporary
> music).
> > > > I wonder how I can do to decrease the excessive distance between the
> > > > extreme staves, in order to make everything more compact.
> > > > I'm looking at the chapters related to vertical spacing, but I just
> > > > can't
> > > > get out of them.
> > > >
> > > >
> > > > Thanks and greetings to all
> > > >
> > > > Rip_mus
>
>