Jazz chords layout question

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Jazz chords layout question

Jacques Menu Muzhic
Hello folks,

I’m trying to setup the attached example as in the following, with an added staff containing empty measures as an exercise score:






What I currently get is:




Questions:
        - why do the marks appear without a box around them?
        - why does \repeat percent not produce percent signs?
        - how can I get the measures to be equal length?
        - how can I ‘push’ the beginning of the seconda volta to the middle of the line?

Thanks for your help!

JM






_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

PastedGraphic-1.png (152K) Download Attachment
PastedGraphic-2.png (93K) Download Attachment
TakeTheATrainWorkScoreWithRepeats.ly (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Robert Schmaus
Hi Jaques,

I guess I can answer some of your questions ..

The box issue: check out the mark formatter settings here:
http://lilypond.org/doc/v2.19/Documentation/notation/bars.en.html#rehearsal-marks

For the percent repeats to appear in a ChordNames context, you'll need
to have it accept percent repeats first - that's not a default setting.
Placint something like

\context{

   \ChordNames

     \consists Percent_repeat_engraver
     \consists Double_percent_repeat_engraver
}

in the \layout block should do it. I'm not sure if you'll need both of
the engravers - just toy around with it ...

About the measure length - sorry no idea. I never bothered about that.
But I know it *can* be done ... anyone?

About the second volta line. There, I'm not sure if this can be done. If
so, it looks like it's going to be messy.

Best of luck,
Robert



Am 12.07.19 um 20:33 schrieb Jacques Menu:

> Hello folks,
>
> I’m trying to setup the attached example as in the following, with an added staff containing empty measures as an exercise score:
>
>
>
>
>
>
> What I currently get is:
>
>
>
>
> Questions:
> - why do the marks appear without a box around them?
> - why does \repeat percent not produce percent signs?
> - how can I get the measures to be equal length?
> - how can I ‘push’ the beginning of the seconda volta to the middle of the line?
>
> Thanks for your help!
>
> JM
>
>
>
>
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Carl Sorensen-3
In reply to this post by Jacques Menu Muzhic


On 7/12/19, 12:33 PM, "Jacques Menu" <[hidden email]> wrote:

    Hello folks,
   
    I’m trying to setup the attached example as in the following, with an added staff containing empty measures as an exercise score:
   
   
   
   
   
    What I currently get is:
   
   
   
    Questions:
    - why do the marks appear without a box around them?
Because according to the notation reference : http://lilypond.org/doc/v2.19/Documentation/notation/bars#rehearsal-marks
markFormatter takes an integer as an input.

%%%
\set Score.markFormatter = #format-mark-box-alphabet
  \override Score.RehearsalMark.font-size = #+5
  \mark 1
%%%%
    - why does \repeat percent not produce percent signs?
Because the ChordNames context doesn't have the Percent_repeat_engraver
%%%%%%%
\score {
  <<
    \new ChordNames \with {\consists Percent_repeat_engraver}
    \theChords

    \new Voice = bass
    \with {
      \remove "Note_heads_engraver"
    }
    \theNotes
  >>
}
%%%%%
    - how can I get the measures to be equal length?
Use proportionalNotationDuration: http://lilypond.org/doc/v2.19/Documentation/notation/proportional-notation

%%%%
  \set Score.markFormatter = #format-mark-box-alphabet
  \set Score.proportionalNotationDuration = #(ly:make-moment 1/2)
  \override Score.RehearsalMark.font-size = #+5
%%%%
    - how can I ‘push’ the beginning of the seconda volta to the middle of the line?
As far as I know, it's not possible without doing lots of tweaks involving StartStaff and StopStaff.  But Kieren may be able to help here.

HTH,

Carl


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Jacques Menu Muzhic
Hello Robert and Carl,

Thanks for your help!

To summurize, after checking the docs for marks:

- why do the marks appear without a box around them?
because using ‘\mark "A"’ precludes the box.
Since the AABA scheme is so common in jazz, using:
\mark \markup {\box "A" }
solves the issue.

- why does \repeat percent not produce percent signs?
because the percent repeat engraver is not used by ChordNames by default.
Thus:
\new ChordNames \with { \consists Percent_repeat_engraver }
solves the issue.

- how can I get the measures to be equal length?
by using proportional notation duration:
\layout {
  \context {
    \Score
    proportionalNotationDuration = #(ly:make-moment 1/8)
  }
}
and indents:
\paper {
  #(set-paper-size "a4")
  indent = 0\mm
  short-indent = 0.9\cm

- how can I ‘push’ the beginning of the seconda volta to the middle of the line?
that seems difficult, no solution at this time


I attach the resulting score for the record.

A nice w-e!

JM





_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

TakeTheATrainWorkScoreWithRepeats.ly (3K) Download Attachment
PastedGraphic-3.png (92K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Jacques Menu Muzhic
Another, tricky ‘solution', though musically incorrect since:
- it doesn’t use \repeat: the repeat barlines are added manually;
- it adds two hidden skip full measures to push the seconda volta to the right.

However:

  \set Score.repeatCommands = #'((volta ""))
  <> ^\markup {
    \scale #'(1.5 . 1.5)
    \column{
      \line\large { "1." }
    }
  }

produces a hooked line above the staff, but:

  \set Score.repeatCommands = #'((volta ""))
  <> ^\markup {
    \scale #'(1.5 . 1.5)
    \column{
      \line\large { "2." }
    }
  }

doesn’t.

The log is:

Starting lilypond 2.19.83 [TakeTheATrainWorkScoreTricky.ly]...
Processing `/Users/menu/Documents/LaTeX/PartitionsLilypond/JazzBassWorkScores/TakeTheATrainWorkScoreTricky.ly'
Parsing...
Interpreting music...[8]
warning: already have a volta spanner, ending that one prematurely
[16][24]
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...
Calculating line breaks... 
Drawing systems... 
Fitting music on 1 page...
Drawing systems...
programming error: Spanner `VoltaBracket' is not fully contained in parent spanner.  Ignoring orphaned part
continuing, cross fingers
programming error: Spanner `VoltaBracket' is not fully contained in parent spanner.  Ignoring orphaned part
continuing, cross fingers
programming error: Spanner `VoltaBracket' is not fully contained in parent spanner.  Ignoring orphaned part
continuing, cross fingers
programming error: Spanner `VoltaBracket' is not fully contained in parent spanner.  Ignoring orphaned part
continuing, cross fingers
programming error: Spanner `VoltaBracket' is not fully contained in parent spanner.  Ignoring orphaned part
continuing, cross fingers
Layout output to `/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6m0000gn/T//lilypond-7Utxv9'...
Converting to `TakeTheATrainWorkScoreTricky.pdf'...
Deleting `/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6m0000gn/T//lilypond-7Utxv9'...
Success: compilation successfully completed
Completed successfully in 0.9".

JM







Le 12 juil. 2019 à 23:39, Jacques Menu <[hidden email]> a écrit :

Hello Robert and Carl,

Thanks for your help!

To summurize, after checking the docs for marks:

- why do the marks appear without a box around them?
because using ‘\mark "A"’ precludes the box.
Since the AABA scheme is so common in jazz, using:
\mark \markup {\box "A" }
solves the issue.

- why does \repeat percent not produce percent signs?
because the percent repeat engraver is not used by ChordNames by default.
Thus:
\new ChordNames \with { \consists Percent_repeat_engraver }
solves the issue.

- how can I get the measures to be equal length?
by using proportional notation duration:
\layout {
  \context {
    \Score
    proportionalNotationDuration = #(ly:make-moment 1/8)
  }
}
and indents:
\paper {
  #(set-paper-size "a4")
  indent = 0\mm
  short-indent = 0.9\cm

- how can I ‘push’ the beginning of the seconda volta to the middle of the line?
that seems difficult, no solution at this time


I attach the resulting score for the record.

A nice w-e!

JM

<TakeTheATrainWorkScoreWithRepeats.ly>

<PastedGraphic-3.png>


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

PastedGraphic-4.png (98K) Download Attachment
TakeTheATrainWorkScoreTricky.ly (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Robin Bannister-2
In reply to this post by Jacques Menu Muzhic
Jacques Menu wrote:

> - how can I ‘push’ the beginning of the seconda volta to the middle of the line?

You could try a recent hack of mine.

%%%%%%%%%%%%%%%%%%%%%%%%%%
% cheap alternative to \new Score;  fragile wrt. Y positioning
pseudoIndent =
#(define-music-function (parser location indent) (number?)
#{
    %    \once \override Score.BarNumber.X-offset = #(- indent 2)
    \once \override Score.LeftEdge.X-extent = #(cons 0 indent)
    \once \override Score.LeftEdge.Y-offset = 0
    \once \override Score.LeftEdge.stencil =
    #(lambda (grob) (stencil-whiteout-box
    (ly:make-stencil empty-stencil  (cons 0 indent) (cons -3 3))))
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%

Apply at the line break  eg  \break \pseudoIndent #77



Cheers,
Robin


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Jacques Menu Muzhic
Hello Robin,

Thanks, the result is already better, with the seconda volta at the right place after adjusting the parameter of \pseudoIndent.

Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.

But I can use the score as is for my needs. I left the notes in the staff to help visualize what happens.

Thanks again!

JM




Le 13 juil. 2019 à 12:33, Robin Bannister <[hidden email]> a écrit :

Jacques Menu wrote:

- how can I ‘push’ the beginning of the seconda volta to the middle of the line?

You could try a recent hack of mine.

%%%%%%%%%%%%%%%%%%%%%%%%%%
% cheap alternative to \new Score;  fragile wrt. Y positioning
pseudoIndent =
#(define-music-function (parser location indent) (number?)
#{
  %    \once \override Score.BarNumber.X-offset = #(- indent 2)
  \once \override Score.LeftEdge.X-extent = #(cons 0 indent)
  \once \override Score.LeftEdge.Y-offset = 0
  \once \override Score.LeftEdge.stencil =
  #(lambda (grob) (stencil-whiteout-box
  (ly:make-stencil empty-stencil  (cons 0 indent) (cons -3 3))))
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%

Apply at the line break  eg  \break \pseudoIndent #77



Cheers,
Robin



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

TakeTheATrainWorkScoreWithRepeats.ly (9K) Download Attachment
TakeTheATrainWorkScoreWithRepeats.pdf (169K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Thomas Morley-2
Hi Jacques,


Am So., 14. Juli 2019 um 01:30 Uhr schrieb Jacques Menu <[hidden email]>:
>
> Hello Robin,
>
> Thanks, the result is already better, with the seconda volta at the right place after adjusting the parameter of \pseudoIndent.
>
> Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.

Basically Robin's code gives LeftEdge a stencil with x- and y-extent.
It's an (otherwise) empty-stencil, which should white-out the StaffSymbol.
Though, the y-extent is hardcoded to (cons -3 3). Which is does not
match StaffSymbol's y-extent here.

To watch the stencil you could add \showLeftEdge (as defined below) to
the call of 'pseudoIndent'

showLeftEdge =
\once \override Score.LeftEdge.after-line-breaking =
  #(lambda (grob)
    (ly:grob-set-property! grob 'stencil
      (box-stencil
        (ly:grob-property grob 'stencil)
        0.2 0)))

Probably the most simple sollution is to have the y-extent as an
optional argument in 'pseudoIndent', making for:

% cheap alternative to \new Score;  fragile wrt. Y positioning
pseudoIndent =
#(define-music-function (parser location y-ext indent) ((pair? '(-3 .
3)) number?)
   #{
     %    \once \override Score.BarNumber.X-offset = #(- indent 2)
     \once \override Score.LeftEdge.X-extent = #(cons 0 indent)
     \once \override Score.LeftEdge.Y-offset = 0
     \once \override Score.LeftEdge.stencil =
     #(lambda (grob) (stencil-whiteout-box
                      (ly:make-stencil empty-stencil  (cons 0 indent) y-ext)))
   #})

Doing \pseudoIndent #'(-7 . 0) #55 works for me.
Though, as Robin already stated, the y-positioning _will_ stay
fragile, and may change with changing layout.
You likely will need to readjust #'(-7 . 0) frequently.

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Robin Bannister-2
In reply to this post by Jacques Menu Muzhic
Jacques Menu wrote:

> Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.


Sorry.
This simplistic pseudoIndent is too fragile for general use.
It needs to be made robust re vertical extents.


In your case you need a LeftEdge.Y-offset of -4
and
you should also uncomment the BarNumber.X-offset line.

The attachment shows the result for \pseudoIndent #53.


Cheers,
Robin


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Y-offset_minus4.png (14K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Robin Bannister-2
Oh dear, that recommendation was for your first code.
The bass clef code needs a LeftEdge.Y-offset of -5


Cheers,
Robin


On 14.07.2019 12:10, Robin Bannister wrote:

> Jacques Menu wrote:
>
>> Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.
>
>
> Sorry.
> This simplistic pseudoIndent is too fragile for general use.
> It needs to be made robust re vertical extents.
>
>
> In your case you need a LeftEdge.Y-offset of -4
> and
> you should also uncomment the BarNumber.X-offset line.
>
> The attachment shows the result for \pseudoIndent #53.
>
>
> Cheers,
> Robin
>
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Jacques Menu Muzhic
Thnks Robin and Harm.

Here:

    %  \showLeftEdge
      \pseudoIndent #'(-8 . 0) #55

works fine, I attach the results.

JM




Le 14 juil. 2019 à 16:39, Robin Bannister <[hidden email]> a écrit :

Oh dear, that recommendation was for your first code.
The bass clef code needs a LeftEdge.Y-offset of -5


Cheers,
Robin


On 14.07.2019 12:10, Robin Bannister wrote:
Jacques Menu wrote:
Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.
Sorry.
This simplistic pseudoIndent is too fragile for general use.
It needs to be made robust re vertical extents.
In your case you need a LeftEdge.Y-offset of -4
and
you should also uncomment the BarNumber.X-offset line.
The attachment shows the result for \pseudoIndent #53.
Cheers,
Robin
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

TakeTheATrainWorkScoreWithRepeats.ly (9K) Download Attachment
TakeTheATrainWorkScoreWithRepeats.pdf (169K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Thomas Morley-2
Am So., 14. Juli 2019 um 17:46 Uhr schrieb Jacques Menu <[hidden email]>:

>
> Thnks Robin and Harm.
>
> Here:
>
>     %  \showLeftEdge
>       \pseudoIndent #'(-8 . 0) #55
>
> works fine, I attach the results.
>
> JM
>
>
> Le 14 juil. 2019 à 16:39, Robin Bannister <[hidden email]> a écrit :
>
> Oh dear, that recommendation was for your first code.
> The bass clef code needs a LeftEdge.Y-offset of -5
>
>
> Cheers,
> Robin
>
>
> On 14.07.2019 12:10, Robin Bannister wrote:
>
> Jacques Menu wrote:
>
> Didn’t find a way to hide the empty part of the staff to the left of it, stopStaff/startStaff didn’t help.
>
> Sorry.
> This simplistic pseudoIndent is too fragile for general use.
> It needs to be made robust re vertical extents.
> In your case you need a LeftEdge.Y-offset of -4
> and
> you should also uncomment the BarNumber.X-offset line.
> The attachment shows the result for \pseudoIndent #53.
> Cheers,
> Robin

Hi all,

meanwhile a snippet arrived at LSR caring about indenting individual
lines, reflecting the discussion in this thread.
Now approved as
lsr.di.unimi.it/LSR/Item?u=1&id=1098

Thanks to the author,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: Jazz chords layout question

Robin Bannister-2
Thomas Morley wrote:

> meanwhile a snippet arrived at LSR caring about indenting individual
> lines, reflecting the discussion in this thread.
> Now approved as
   http://lsr.di.unimi.it/LSR/Item?id=1098
>
> Thanks to the author,


You're welcome.

Also, feedback welcome!


Cheers,
Robin