Re: eartraining with lilypond?

2020-04-19 Thread jw. Verhagen
I really appreciate your help with my project!

Sent from my iPhone

> On Apr 16, 2020, at 3:04 AM, Stefan Thomas  
> wrote:
> 
> Dear community,
> has someone experiences and/or ideas for using lilypond for 
> eartraining-purposes?
> I know, there is gnu-solfege, but it has the disadvantage, that it doesn't 
> exist as an app or can be used browser based.
> Are there other projects/ideas around?
> Thanks,
> Stefan



Re: eartraining with lilypond?

2020-04-19 Thread Stefan Thomas
Dear Roland,
thanks for Your link, You did really good work and I guess it would be
worth to develop it. But off course it's lot of work, I think I could't do
it.

Am Fr., 17. Apr. 2020 um 03:01 Uhr schrieb Roland Goretzki <
rol...@roland-goretzki.de>:

> Hello Stefan & all,
>
> You wrote:
> > has someone experiences and/or ideas for using lilypond for
> > eartraining-purposes?
> > [ ... ]
> > Are there other projects/ideas around?
>
> well, while NOT being a programmer, nevertheless I created a little
> web-based cgi-program especially for training note-reading, and it
> contains also a part for training absolute hearing.
>
> It's all related to a piano-graphic, on which You can click the
> random-created note You've read btw. heared, and it will give a
> feedback, if it was wrong or write.
>
> One can chose different difficulties.
>
> The note-reading part contains also some interval-training parts.
>
> What does it have to do with lilypond?
> Well, the note symbols I've used are created by lilypond. :-)
>
> I made it in 2010 (3 month) and 2012 (2 month), and it's missing a
> chord-training part, but I won't continue this program, and due to not
> being a programmer, the code is nearly unreadable (perhaps meanwhile
> also for me).
>
> So You can only use it as is.
>
> The good thing is:
> There is no costs, no "Werbung", no cookies and so on, the only thing
> you have to create is an own two-part user name and an own passwort at
> the first session, for getting a later feedback about your progress in
> following sessions.
>
> To get the site, you cannot only type
>
> http://www.roland-goretzki.de
>
> because this website I've closed several years ago. But you can get it
> by typing the direct URL:
>
> http://www.roland-goretzki.de/cgi-bin/lernspiel.cgi
>
> There You will be asked a user name, it is:
> roland
> And You will be asked a password, it is:
> benjamin
>
> After this you get directly into the program, where You have to create
> your own user name and password as mentioned above. The rest ist mostly
> self-declaring, I think.
>
> For potential further questions in detail I would prefer the German
> language, because I'm no English native speaker, and I assume, You are a
> german, don't You?
>
> For all English speakers:
> The program is only in German language, I'm sorry.
>
> Best Regards   Roland
>
> PS:
> Don't know why I didn't share it in the past - perhaps simply forgotten
> OR due to the language and the necessary declaration? ;-)
>


Re: Alignment issues of Time signature above the staff

2020-04-19 Thread Leo Chen
Hi Kevin,

Thank you so much for all the effort you've put into this!
I think this has already become useable but I still have a few suggestions:

1. Due to the nature of text scripts, they can't be clicked on and directed to 
the code in Frescobaldi, this may make debugging the score a bit more 
difficult, but it won't affect the outcome once the score is finished, so it 
shouldn't be a big problem.

2. Compound time signatures are now automatically formatted into normal time 
signatures (see attachment) I think this can be fixed relatively easily by 
reformatting the markup.

3. It would be great if extra space can be arranged for the time signature 
before the line break instead of aligning it to the left side of the last bar.

4. This is not a personal request, however, some people may prefer aligning the 
time signature to the centre instead of the right side of the barline like the 
example in the original snippet. http://lsr.di.unimi.it/LSR/Snippet?id=272 I 
wonder how hard this can be implemented into this custom engraver.

Overall, I think this is a massive improvement from the last version and I 
greatly appreciate your help.

Best,
Leo
\version "2.19.0"

#(define (Time_signature_markup_engraver context)
   (let ((time-sig '())
 (time-sig-copy #f)
 (previous-was-grace #f)) ; to avoid printing twice at grace notes
 (make-engraver
  (acknowledgers
   ((time-signature-interface engraver grob source-engraver)
(let* ((current-moment (ly:context-current-moment context))
   (grace-nom (ly:moment-grace-numerator current-moment)))
  (if (not (eqv? 0 grace-nom))
  (begin
   (set! previous-was-grace #t)
   (set! time-sig grob))
  (if (and (eqv? 0 grace-nom) previous-was-grace)
  (begin
   (set! previous-was-grace #f)
   (set! time-sig '()))
  (set! time-sig grob))
  ((process-acknowledged engraver)
   (and (not (null? time-sig))
(let* ((time-sig-copy (ly:engraver-make-grob
   engraver
   'TextScript
   time-sig))
   (copy-prop (lambda (prop)
(ly:grob-set-property!
 time-sig-copy
 prop
 (ly:grob-property time-sig prop
   (prop-list '(fraction style font-size)))
  (map copy-prop prop-list)
  (ly:grob-set-property! time-sig-copy 'stencil
ly:time-signature::print)
  (ly:grob-set-parent! time-sig-copy Y time-sig)
  (ly:grob-set-parent! time-sig-copy X time-sig)
  (set! time-sig '())
  )))
  ((stop-translation-timestep engraver)
   (set! time-sig-copy #f)

#(define (left-align-at-end grob)
   (and (and (ly:item? grob)
 (equal? (ly:item-break-dir grob) LEFT))
(ly:grob-set-property! grob 'self-alignment-X 1)))

timeSignatures = {
  \tempo 4 = 80
  \time 4/4 s1
  \time 3/8 s4.
  \time 3/4 s2.
  \time 4/4 s1
  \time 2/4 s2
  \compoundMeter #'((2 4) (1 16))
  s1* 9/16
}

\score {
  \layout {
\context {
  \Score
  \override MetronomeMark.break-align-symbols = #'(clef time-signature)
  \remove "Bar_number_engraver"
}
\context {
  \Staff
  \override MultiMeasureRest.spacing-pair = #'(clef . staff-bar)
  \remove "Time_signature_engraver"
}
\context {
  \Score
}
  }
  <<
\new Dynamics \with {
  \consists "Axis_group_engraver"
  \consists "Time_signature_engraver"
  \override TimeSignature.stencil = ##f
  \override TimeSignature.font-size = #8
  \numericTimeSignature
  \consists \Time_signature_markup_engraver
  \override TextScript.before-line-breaking = #left-align-at-end
}
{
  \timeSignatures
}
   
\new StaffGroup \with {} <<
   
  \new Staff \with {
\consists "Bar_number_engraver"
  }
  \relative c' {
\textLengthOn
\time 4/4
c4 ( _\markup \column {
  "← Objects failed to appear"
  "below the time signature"
  "when using \\textLengthOn"
}
\textLengthOff
d4 e4 f4 )
\time 3/8
a'4 ( g8 ) 
\time 3/4
R2. 
\time 4/4
c1 
\time 2/4
a8 ^\markup \column {
  "← Time signature appear twice" 
  "when one staff has a grace note" 
  "as the first note in a bar"
} g8 f8 e8
\compoundMeter #'((2 4) (1 16))
a2 g16
  }
   
  \new Staff \relative c' {
\time 4/4
R1
\time 3/8
R4.
\clef bass
\time 3/4
a,2. \> \startTextSpan 
\break
\time 4/4
c2 _\markup \column {
  "  "

Re: Alignment issues of Time signature above the staff

2020-04-19 Thread Leo Chen
Hi Kevin,

Thank you so much for all the effort you've put into this!
I think this has already become useable but I still have a few suggestions:

1. Due to the nature of text scripts, they can't be clicked on and directed to 
the code in Frescobaldi, this may make debugging the score a bit more 
difficult, but it won't affect the outcome once the score is finished, so it 
shouldn't be a big problem.

2. Compound time signatures are now automatically formatted into normal time 
signatures (see attachment) I think this can be fixed relatively easily by 
reformatting the markup.

3. It would be great if extra space can be arranged for the time signature 
before the line break instead of aligning it to the left side of the last bar.

4. This is not a personal request, however, some people may prefer aligning the 
time signature to the centre instead of the right side of the barline like the 
example in the original snippet. http://lsr.di.unimi.it/LSR/Snippet?id=272 I 
wonder how hard this can be implemented into this custom engraver.

Overall, I think this is a massive improvement from the last version and I 
greatly appreciate your help.

Best,
Leo
\version "2.19.0"

#(define (Time_signature_markup_engraver context)
   (let ((time-sig '())
 (time-sig-copy #f)
 (previous-was-grace #f)) ; to avoid printing twice at grace notes
 (make-engraver
  (acknowledgers
   ((time-signature-interface engraver grob source-engraver)
(let* ((current-moment (ly:context-current-moment context))
   (grace-nom (ly:moment-grace-numerator current-moment)))
  (if (not (eqv? 0 grace-nom))
  (begin
   (set! previous-was-grace #t)
   (set! time-sig grob))
  (if (and (eqv? 0 grace-nom) previous-was-grace)
  (begin
   (set! previous-was-grace #f)
   (set! time-sig '()))
  (set! time-sig grob))
  ((process-acknowledged engraver)
   (and (not (null? time-sig))
(let* ((time-sig-copy (ly:engraver-make-grob
   engraver
   'TextScript
   time-sig))
   (copy-prop (lambda (prop)
(ly:grob-set-property!
 time-sig-copy
 prop
 (ly:grob-property time-sig prop
   (prop-list '(fraction style font-size)))
  (map copy-prop prop-list)
  (ly:grob-set-property! time-sig-copy 'stencil
ly:time-signature::print)
  (ly:grob-set-parent! time-sig-copy Y time-sig)
  (ly:grob-set-parent! time-sig-copy X time-sig)
  (set! time-sig '())
  )))
  ((stop-translation-timestep engraver)
   (set! time-sig-copy #f)

#(define (left-align-at-end grob)
   (and (and (ly:item? grob)
 (equal? (ly:item-break-dir grob) LEFT))
(ly:grob-set-property! grob 'self-alignment-X 1)))

timeSignatures = {
  \tempo 4 = 80
  \time 4/4 s1
  \time 3/8 s4.
  \time 3/4 s2.
  \time 4/4 s1
  \time 2/4 s2
  \compoundMeter #'((2 4) (1 16))
  s1* 9/16
}

\score {
  \layout {
\context {
  \Score
  \override MetronomeMark.break-align-symbols = #'(clef time-signature)
  \remove "Bar_number_engraver"
}
\context {
  \Staff
  \override MultiMeasureRest.spacing-pair = #'(clef . staff-bar)
  \remove "Time_signature_engraver"
}
\context {
  \Score
}
  }
  <<
\new Dynamics \with {
  \consists "Axis_group_engraver"
  \consists "Time_signature_engraver"
  \override TimeSignature.stencil = ##f
  \override TimeSignature.font-size = #8
  \numericTimeSignature
  \consists \Time_signature_markup_engraver
  \override TextScript.before-line-breaking = #left-align-at-end
}
{
  \timeSignatures
}
   
\new StaffGroup \with {} <<
   
  \new Staff \with {
\consists "Bar_number_engraver"
  }
  \relative c' {
\textLengthOn
\time 4/4
c4 ( _\markup \column {
  "← Objects failed to appear"
  "below the time signature"
  "when using \\textLengthOn"
}
\textLengthOff
d4 e4 f4 )
\time 3/8
a'4 ( g8 ) 
\time 3/4
R2. 
\time 4/4
c1 
\time 2/4
a8 ^\markup \column {
  "← Time signature appear twice" 
  "when one staff has a grace note" 
  "as the first note in a bar"
} g8 f8 e8
\compoundMeter #'((2 4) (1 16))
a2 g16
  }
   
  \new Staff \relative c' {
\time 4/4
R1
\time 3/8
R4.
\clef bass
\time 3/4
a,2. \> \startTextSpan 
\break
\time 4/4
c2 _\markup \column {
  "  "

Re: SVG style and contributing barrier to entry

2020-04-19 Thread lilypond . wayne


> LilyPond […] is a community-driven process where there’s no
> distinction whatsoever between users and contributors […]

> (In this regard however, Patrice’s referring to messages from the bug
> list as `spam’ does make me feel a bit uncomfortable.)

By “spam” I thought it was clear from the context that I meant “other
bug reports I have no obvious use for”.  I don't think most end users
want to have their inboxes filled will random bug reports.  No matter
what, I've since learned that I can post to the bug mailling list
without membership, which floats my boat.


> Patrice, since you appear to speak French and to possibly be looking
> for a lower-volume LilyPond mailing list, I’d be remiss in not
> reminding you about our French-speaking list,

Don't misread me: I'm not complaining about the volume of the LilyPond
mailing list at all; I'm quite happy in fact that so many people use and
discuss it.  And amazed that there always seems to be someone ready to
help with a workaround when a weird case is encountered.

(And yes, French's my first language, before Logo.)



Cheers,



-- 
· Patrice Levesque
· http://ptaff.ca/
· lilypond.wa...@ptaff.ca
--



signature.asc
Description: Digital signature


Re: GS problem with Lily 2.21.0

2020-04-19 Thread Simon Albrecht

On 18.04.20 09:05, Urs Liska wrote:

Which gets back to my question: how did you invoke it, do you run LilyPond from 
Frescobaldi?



Yes, and somehow when adding 2.20.0 and 2.21.0 to the ‘Preferences > 
LilyPond preferences’ dialogue I went down to the lilypond/usr/bin/ 
subdirectory instead of just bin/—as I correctly did with all previous 
versions…


Best, Simon




Re: GS problem with Lily 2.21.0

2020-04-19 Thread Simon Albrecht

On 18.04.20 09:01, Jonas Hahnfeld wrote:

To address the original problem you should invoke lilypond via the
wrapper script /usr/local/lilypond-2.21.0/bin/lilypond
instead of using the the directly binary from
/usr/local/lilypond-2.21.0/lilypond/usr/bin/lilypond.



Thanks, Jonas, for the explanations and the solution. That did it. 
Whatever lead me to make that mistake… probably just inattentiveness.


Best, Simon




Re: RemoveEmptyStaves doesnt remove percussion staff

2020-04-19 Thread neuro黃學仁
> \layout {
>   \context {
> \Staff
> \RemoveEmptyStaves
>   }
> %% You need to add this:
>\context {
> \DrumStaff
> \RemoveEmptyStaves
>   }
> }

Yes~ That works~
Thank you very much~

Valentin Villenave  於 2020年4月19日 週日 下午11:17寫道:
>
> On 4/16/20, neuro黃學仁  wrote:
> > How can one remove the empty percussion staff in Grandscore?
> > The \RemoveEmptyStaves seems not working on percussion staff.
>
> Greetings,
> here is a solution:
>
> 
>
> \layout {
>   indent = 2.6\cm
>   short-indent = 1.6\cm
>   \context {
> \Staff
> \RemoveEmptyStaves
>   }
> %% You need to add this:
>   \context {
> \DrumStaff
> \RemoveEmptyStaves
>   }
> }
>
> 
>
> Cheers,
> V.



Re: SystemStart changes after stop/startStaff - how to get it back

2020-04-19 Thread Thomas Morley
Hi Aaron,

Am Di., 14. Apr. 2020 um 06:20 Uhr schrieb Aaron Hill
:
>
> I think I have addressed the original issue in this patched version of
> the System_start_delimiter_engraver.  This is implemented in Scheme, but
> the changes should be easily ported back to C++.
>
> The strategy is to acknowledge the end of StaffSymbols to be able to
> remove their corresponding entries in the internal structure.
> Additionally, the context in which the StaffSymbol correlates is
> recorded so a future StaffSymbol of the same context takes the same
> place.  This should keep things stable if staves stop and start at odd
> places.

many thanks for your work!

For now I tested your engraver with my workaround in
mid-staff-gap-04.ly (see my previous post in this thread).
All works fine.

Though as nice as my current workaround looks like, it's still that: a
workaround.
I'll have a closer look at your engraver. Now that the functionality
is available in scheme I may find a proper fix (or not ...)
First step as always: I need to understand the given code ...

>
> One thing I noticed was the C++ engraver acknowledges
> SystemStartDelimiters (of which it is the one creating them) and calls
> the Bracket_nesting_group::add_support function.  However, in my porting
> of the engraver to Scheme, I could not get this acknowledger to trigger.
>   Does LilyPond have code coverage tests that could confirm whether that
> logic is necessary?  In any event, I omitted it from my Scheme engraver.

Can't help here, sorry.


Best,
  Harm



Re: SystemStart changes after stop/startStaff - how to get it back

2020-04-19 Thread Thomas Morley
Am So., 12. Apr. 2020 um 17:24 Uhr schrieb Valentin Villenave
:
>
> On 4/12/20, Thomas Morley  wrote:
> > Over the last decades I tried again and again to find a better
> > workaround, with less manual work.
>
> Apparently we stumbled upon your white whale :-)
>
> > I now come up with the attached.
>
> Brilliant.  Although it’s still a workaround.
>
> > To get the gaps in container-contexts one would need to drop the
> > relevant commands. No manual figuring out any values (apart from the
> > width of the gap).
>
> And even that may not be indispensable; AFAIK that’s not something
> ever required when dealing with mono-staff systems.
>
> The nicer implementation I can think of would be to have some
> \stopSystem \startSystem switch (possibly with the corresponding new
> event interfaces as well), with the latter reprinting all system-start
> grobs (possibly sans BarNumber). It may be cleaner that way so that
> the system delimiter engraver doesn’t need to bother which staves are
> or aren’t stopped at the given moment.
>
> That being said, I do realize that it would imply extending, and
> rewriting considerable parts of, the engraver.
>
> > I'll continue research after some break ;)
>
> Thanks for looking into it! Should we open tracker pages meanwhile?
> (The SystemStart 'brace thing looks like an intrinsically different
> issue.)
>
> Cheers,
> V.

Hi Valentin,

attached my latest take.
Though, it requires issue 5899 (in master now) and issue 5919 (on
review) to work properly.

Cheers,
  Harm
\version "2.21.1"

%%
%%
%% Workaround to insert one or more gaps mid-line of a score
%% Fakes a system-start-delimiter at the end of every gap.
%% Usage: put \space  in every context at the place where you
%% want the gap.
%% The argument of \space determines the width of the gap.
%% Needs issue 5899 and issue 5919
%%
%%

%% Redefine "|" with a different name to allow `print-certain-span-bars?' to
%% differentiate between "|" and "|-g"
#(define-bar-line "|-g" "|" #f "|")

space =
#(define-music-function (span-bar-before width) ((boolean? #t) number?)
"Adding a gap of width @var{width} into a @code{StaffSymbol}.
Only works in the middle of a @code{Staff}.
Before the gap starts a bar-line with span-bars covering all staves is printed
unless optional @var{span-bar-before} is set false.

After the gap a faked SystemStartBar covering all staves is done, i.e.
@code{SpanBar} is always printed."
;;
;; General TODO
;;   Should we care about SpanBar hee at all? 
;;   Isn't it more due to user preferences?
;;
  #{ 
  	 %% cadenzaOn/Off will mostly prevent line-breaks, better be paranoid
 \noBreak
 \cadenzaOn
 \stopStaff
 %% no BarNumber before gap
 \once \override Score.BarNumber.break-visibility = ##(#f #f #f)
 %% Print SpanBars relying on `span-bar-before' and 
 %% `print-certain-span-bars'
 \once \override Staff.BarLine.allow-span-bar = #span-bar-before
 %% Insert a very short skip-event, with a stretched TextScript
 \once \textLengthOn
 s1*1/100-\markup \with-dimensions #(cons 0 width) #'(0 . 0) \null
 %% Order items after \startStaff
 \once \override Score.BreakAlignment.break-align-orders =
   #(make-vector 3 
 '(left-edge
   ambitus
   breathing-sign
   staff-bar
   clef	
   key-cancellation
   key-signature
   time-signature
   custos))
 %% Some trickery: set subproperty `new-staff' #t in order to flag this
 %% BarLine for the 'move-system-start'-procedure
 \once \override Score.BarLine.details.new-staff = ##t
 %\once \override StaffGroup.BarLine.details.new-staff = ##t
 %\once \override ChoirStaff.BarLine.details.new-staff = ##t
 %\once \override PianoStaff.BarLine.details.new-staff = ##f
 %% Use the newly defined "|-g" (apart from the name, it's the same as "|") 
 %% and let `print-certain-span-bars' work on it, if wished.
 %% \bar "|-g" mimics the SystemStartBar, thus adjust thickness
 %% TODO We assume a new mid-staff SystemStartBarshould cover all staves
 %%  Are there othere use-cases?
 \once \override Staff.BarLine.hair-thickness = 1.6
 \bar "|-g"
 %% Force printing full-size Clef
 %% NB setting a different Clef is not prevented
 \once \override Score.Clef.full-size-change = ##t
 \set Staff.forceClef = ##t
 %% Print BarNumber after gap (for debugging purpose)
 %\once \override Score.BarNumber.break-visibility = ##(#f #t #t)
 \startStaff
 \cadenzaOff
 \noBreak
  #})

#(define (print-certain-span-bars? glyphes)
  

Re: edit to Lilypond wikipedia article

2020-04-19 Thread Valentin Villenave
On 4/17/20, David Olson  wrote:
> If some of you take a look and make changes
> (or instruct me to do so), it can be better.

How about mentioning lilypond-book first?

Perhaps the paragraph could open with:
"""
An integration with various document formats (not only [[TeX]]-based
systems such as [[LaTeX]] and [[Texinfo]], but also [[DocBook]] and
[[HTML]] pages) is natively supported through the companion program
lilypond-book, developed and maintained by the LilyPond
community.{{Cite web
| url = http://lilypond.org/doc/latest/Documentation/usage/lilypond_002dbook
| title = LilyPond Usage manual
| author = LilyPond community,
| year = 1996-2020.
}} This allows to embed musical elements within texts, such as
musicology, song booklets, work sheets for teaching, and school
examinations. Another solution to integrate various musical elements
(music symbols, song lyrics, guitar chords diagrams, lead sheets,
music excerpts, guitar tablatures, or multi-page scores) within
documents has appeared more recently in the form of lyLuaTeX, a LuaTeX
package that includes features for matching layout and appearance of
the musical elements with the surrounding text
document.etc.

By the way, since lilypond-book isn't geared only towards LaTeX, you
may want to make the subsubsection title a bit more general:
"Integration into text documents" or something like that.

Cheers,
V.



Re: RemoveEmptyStaves doesnt remove percussion staff

2020-04-19 Thread Valentin Villenave
On 4/16/20, neuro黃學仁  wrote:
> How can one remove the empty percussion staff in Grandscore?
> The \RemoveEmptyStaves seems not working on percussion staff.

Greetings,
here is a solution:



\layout {
  indent = 2.6\cm
  short-indent = 1.6\cm
  \context {
\Staff
\RemoveEmptyStaves
  }
%% You need to add this:
  \context {
\DrumStaff
\RemoveEmptyStaves
  }
}



Cheers,
V.



Re: Libraries (was: Re: Read git tags using Scheme)

2020-04-19 Thread Valentin Villenave
On 4/18/20, Noeck  wrote:
> It could not adapt this to my situation:
> https://stackoverflow.com/questions/11961400/getting-rid-of-git-usr-local-lib-libz-so-1-no-version-information-available
> Any idea about this?

Well, the easiest solution I found was to compile LilyPond myself.
Not, however, that this message doesn’t prevent Scheme from executing
whatever system calls you want.

Cheers,
V.



Re: SVG style and contributing barrier to entry

2020-04-19 Thread Valentin Villenave
On 4/16/20, Werner LEMBERG  wrote:
> Well, you just *did* submit a patch, and I'm going it to apply soon.

Indeed; initiating, or taking part in, discussions on some of our
mailing lists (or forums) is a pretty easily-achievable first step.
LilyPond (like most Free Software projects, and perhaps even more so)
is a community-driven process where there’s no distinction whatsoever
between users and contributors, and where the former are warmly
encouraged to act as the latter whenever they feel like it. (In this
regard however, Patrice’s referring to messages from the bug list as
`spam’ does make me feel a bit uncomfortable.)

Patrice, since you appear to speak French and to possibly be looking
for a lower-volume LilyPond mailing list, I’d be remiss in not
reminding you about our French-speaking list, where you’d be happily
welcome to post any questions, answers, suggestions or contributions
to both the program and its documentation:
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

Cheers,
V.



Re: Alignment issues of Time signature above the staff

2020-04-19 Thread Kevin Barry
Hi Chen/Aaron,

Thank you so much (Aaron) for posting the example of the time
signature engraver. Based on that and what else I could find in the
docs I took another stab at this. It's still very much a hack, but
*hopefully* addresses most of the issues. The code is attached.

Kevin
\version "2.19.0"

#(define (Time_signature_markup_engraver context)
   (let ((time-sig '())
 (time-sig-copy #f)
 (previous-was-grace #f)) ; to avoid printing twice at grace notes
 (make-engraver
  (acknowledgers
   ((time-signature-interface engraver grob source-engraver)
(let* ((current-moment (ly:context-current-moment context))
   (grace-nom (ly:moment-grace-numerator current-moment)))
  (if (not (eqv? 0 grace-nom))
  (begin
   (set! previous-was-grace #t)
   (set! time-sig grob))
  (if (and (eqv? 0 grace-nom) previous-was-grace)
  (begin
   (set! previous-was-grace #f)
   (set! time-sig '()))
  (set! time-sig grob))
  ((process-acknowledged engraver)
   (and (not (null? time-sig))
(let* ((time-sig-copy (ly:engraver-make-grob
   engraver
   'TextScript
   time-sig))
   (copy-prop (lambda (prop)
(ly:grob-set-property!
 time-sig-copy
 prop
 (ly:grob-property time-sig prop
   (prop-list '(fraction style font-size)))
  (map copy-prop prop-list)
  (ly:grob-set-property! time-sig-copy 'stencil
ly:time-signature::print)
  (ly:grob-set-parent! time-sig-copy Y time-sig)
  (ly:grob-set-parent! time-sig-copy X time-sig)
  (set! time-sig '())
  )))
  ((stop-translation-timestep engraver)
   (set! time-sig-copy #f)

#(define (left-align-at-end grob)
   (and (and (ly:item? grob)
 (equal? (ly:item-break-dir grob) LEFT))
(ly:grob-set-property! grob 'self-alignment-X 1)))

timeSignatures = {
  \tempo 4 = 80
  \time 4/4 s1
  \time 3/8 s4.
  \time 3/4 s2.
  \time 4/4 s1
  \time 2/4 s2
}

\score {
  \layout {
\context {
  \Score
  \override MetronomeMark.break-align-symbols = #'(clef time-signature)
  \remove "Bar_number_engraver"
}
\context {
  \Staff
  \override MultiMeasureRest.spacing-pair = #'(clef . staff-bar)
  \remove "Time_signature_engraver"
}
\context {
  \Score
}
  }
  <<
\new Dynamics \with {
  \consists "Axis_group_engraver"
  \consists "Time_signature_engraver"
  \override TimeSignature.stencil = ##f
  \override TimeSignature.font-size = #8
  \numericTimeSignature
  \consists \Time_signature_markup_engraver
  \override TextScript.before-line-breaking = #left-align-at-end
}
{
  \timeSignatures
}
   
\new StaffGroup \with {} <<
   
  \new Staff \with {
\consists "Bar_number_engraver"
  }
  \relative c' {
\textLengthOn
\time 4/4
c4 ( _\markup \column {
  "← Objects failed to appear"
  "below the time signature"
  "when using \\textLengthOn"
}
\textLengthOff
d4 e4 f4 )
\time 3/8
a'4 ( g8 ) 
\time 3/4
R2. 
\time 4/4
c1 
\time 2/4
a8 ^\markup \column {
  "← Time signature appear twice" 
  "when one staff has a grace note" 
  "as the first note in a bar"
} g8 f8 e8
  }
   
  \new Staff \relative c' {
\time 4/4
R1
\time 3/8
R4.
\clef bass
\time 3/4
a,2. \> \startTextSpan 
\break
\time 4/4
c2 _\markup \column {
  "  "
  "↑"
  "Harpin stops below the time signature"
}
^\markup \column {
  "TextSpanner stops below the time signature"
  "↓"
}
e2 \! \stopTextSpan
\clef treble
\time 2/4
\acciaccatura f'8 a8 
g8 f8 e8
  }
   
  \new Staff \relative c' { 
\clef bass 
\time 4/4
R1 
\time 3/8
R4. 
\time 3/4
R2. 
\time 4/4
c1
\time 2/4
a8 g8 f8 e8
  }
>>
  >>
}

Re: cues with lyrics

2020-04-19 Thread Paul Scott

On 4/18/20 11:15 PM, Remy CLAVERIE wrote:


Hello Paul,

Here is a small example to show you how I use lyrics for cue voices. I 
am not sure that it is the best lilypondic-way to code, but it works.



Thank you for your reply, Remy.

It will take me a while to figure out whether I can apply your idea.  I 
make extensive use of \cueDuring and I'm not sure I can use your code 
with \cueDuring.


Stay well,

Paul



Have a nice day,

Rémy

PS : Sorry for the notes in Italian.


(Italian should not be a problem for a musician.)



\version "2.18.2"
\include "italiano.ly"

cueVerseII = \new Voice \relative do' {
  << { \new CueVoice = "cueA" \relative do'' {
    \autoBeamOff \clef treble fad8. mi16 re8 dod re16[ \melisma mi re 
mi] dod8.[ si16] \melismaEnd
    si2 r8 si4 do16[ re] do4 do r8 la4 si16[ do] si8 si la sol sol16[ 
\melisma la sol la] fad8.[ mi16] \melismaEnd mi2*1/4 } } \\

 { \override MultiMeasureRest #'staff-position = #7 R1*4 la''8\rest }
  >>
}

cueL_VerseII = \lyricmode {
  \set stanza = "Sop. I: "
  Je -- sus will mich de -- cken, Je -- sus, Je -- sus, Je -- sus, Je 
-- sus will mich de -- cken,

}

VI_VerseII = \relative do''' {
  \time  4/4
  R1*16 \cueVerseII si8 si si sol do16 si la8. sol16 la4. sol16 fad 
sol8 la16 sol fad8. mi16 red8 fad si4 r8 sol do4~ do8 si16 la si4~ si8 
do16 si la8. sol16 sol8 si sol8. fad16 mi4 r8 mi la8. sol16 fad8. mi16 
red4 mi8. fad16
  sol2~ sol8 fad16 sol fad8 mi mi4. red8 mi4 la sol8 fad fad8. mi16 
mi2\bar"|."

}

\score {
  \new ChoirStaff
  <<
    \new Staff
    <<
  \new Voice {
    <<
  \autoBeamOn
  \clef treble
  \VI_VerseII
    >>
  }
  \new Lyrics \lyricsto "cueA" \cueL_VerseII
    >>
  >>
  \layout {
    \context {
  \Score
  \compressFullBarRests
  \override LyricText #'font-size = #-1
  \override NoteHead #'style = #'baroque
    }
  }
}

> Message du 19/04/20 07:37
> De : "Paul Scott" 
> A : "Xavier Scheuer" 
> Copie à : "lilypond-user Mailinglist" 
> Objet : Re: cues with lyrics
>
>
On 4/18/20 9:26 PM, Xavier Scheuer wrote:
>

On Sun, 19 Apr 2020 at 02:03, Paul Scott
mailto:waterho...@ultrasw.com>> wrote:
> >
> > I posted this some time ago and didn't get answer so I
thought I would
> > try again:
> >
> > This is an example that I reduced from a snippet.
> >
> > Can someone please tell me why the lyrics ("wordc") don't
show up on the
> > third note (from the 2nd cueDuring)?
>

>
Hello,

>
It is hard to understand what you want to achieve here.
In addition your structure is strange. I do not expect the
\new Voice = "cue" in the \addQuote command but rather below
in your \score block.

> I want the cue lyrics to be on one line under the vocal cues. 
This a standard opera or musical show need for the instrumental parts.
>

> This was taken from a snippet that I can't find right now but
this is a working variation of it.  The lyric syllables are on one
line and all at the same level under the vocal cue notes:
>

> version "2.19.83"
>
> oboeNotes = \relative c'' {
>   c2 r8 d16\f f e g f a
>   g8 g16 g g2.
> }
>
> \addQuote oboeNotes
>   \new Voice = "cue"
>   \oboeNotes
>
> lyr = \lyricmode {
>   xy a b c d e f g a h i
> }
>
> <<
>   \new Staff
>     \new Voice = "Oboe" \oboeNotes
>     \new Lyrics \lyricsto "Oboe" \lyr
>   \new Staff
>     \new Voice
>   \relative c'' {
>     c2
>     <<
>       \cueDuring #"oboeNotes" #up { r2 }
>     >>
>     g2 c,
>   }
>     \new Lyrics = "cueLyrics"
>   \lyricsto "cue" {
>     \set fontSize = #-4
>     a b c d e f g a h i
>   }
> >>
>
>


>
You only have one note in your oboe voice, hence only lyrics
below this note.

> No. The one lyric is below a vocal cue.  I don't know why the
second syllable/word is not under the 2nd cue note.

If you want your lyrics to align on another voice then you can
use a NullVoice context as explained in NR 2.1.2 Techniques
specific to lyrics > Polyphony with shared lyrics

http://lilypond.org/doc/v2.21/Documentation/notation/techniques-specific-to-lyrics.html#polyphony-with-shared-lyrics

>
>

> I don't quite see how your documentation reference works with
vocal cues in instrumental music.

> Thank you for replying,

> Paul

>
>


>


>
Cheers,
Xavier
>

> --
>
Xavier Scheuer mailto:x.sche...@gmail.com>>

>



Re: cues with lyrics

2020-04-19 Thread Remy CLAVERIE
Hello Paul,

 

Here is a small example to show you how I use lyrics for cue voices. I am not 
sure that it is the best lilypondic-way to code, but it works.

Have a nice day,

 

Rémy

PS : Sorry for the notes in Italian.

 

 

\version "2.18.2"
\include "italiano.ly"

cueVerseII = \new Voice \relative do' { 
  << { \new CueVoice = "cueA" \relative do'' { 
    \autoBeamOff \clef treble fad8. mi16 re8 dod re16[ \melisma mi re mi] 
dod8.[ si16] \melismaEnd 
    si2 r8 si4 do16[ re] do4 do r8 la4 si16[ do] si8 si la sol sol16[ \melisma 
la sol la] fad8.[ mi16] \melismaEnd mi2*1/4 } } \\
 { \override MultiMeasureRest #'staff-position = #7 R1*4 la''8\rest }
  >>
}

cueL_VerseII = \lyricmode { 
  \set stanza = "Sop. I: "  
  Je -- sus will mich de -- cken, Je -- sus, Je -- sus, Je -- sus, Je -- sus 
will mich de -- cken,  
}

VI_VerseII = \relative do''' {
  \time  4/4
  R1*16 \cueVerseII si8 si si sol do16 si la8. sol16 la4. sol16 fad sol8 la16 
sol fad8. mi16 red8 fad si4 r8 sol do4~ do8 si16 la si4~ si8 do16 si la8. sol16 
sol8 si sol8. fad16 mi4 r8 mi la8. sol16 fad8. mi16 red4 mi8. fad16
  sol2~ sol8 fad16 sol fad8 mi mi4. red8 mi4 la sol8 fad fad8. mi16 mi2\bar"|."
}

\score { 
  \new ChoirStaff 
  <<
    \new Staff
    <<
  \new Voice {
    << 
  \autoBeamOn
  \clef treble
  \VI_VerseII
    >>
  }
  \new Lyrics \lyricsto "cueA" \cueL_VerseII
    >>
  >>
  \layout {
    \context {
  \Score
  \compressFullBarRests
  \override LyricText #'font-size = #-1
  \override NoteHead #'style = #'baroque
    }  
  }
}

 

 

 

 

> Message du 19/04/20 07:37
> De : "Paul Scott" 
> A : "Xavier Scheuer" 
> Copie à : "lilypond-user Mailinglist" 

> Objet : Re: cues with lyrics
> 
>
On 4/18/20 9:26 PM, Xavier Scheuer wrote:
>

On Sun, 19 Apr 2020 at 02:03, Paul Scott  wrote:
> >
> > I posted this some time ago and didn't get answer so I thought I would
> > try again:
> >
> > This is an example that I reduced from a snippet.
> >
> > Can someone please tell me why the lyrics ("wordc") don't show up on the
> > third note (from the 2nd cueDuring)?
>

>
Hello,

>
It is hard to understand what you want to achieve here.
In addition your structure is strange. I do not expect the \new Voice = "cue" 
in the \addQuote command but rather below in your \score block.


> I want the cue lyrics to be on one line under the vocal cues.  This a 
> standard opera or musical show need for the instrumental parts.
>

> This was taken from a snippet that I can't find right now but this is a 
> working variation of it.  The lyric syllables are on one line and all at the 
> same level under the vocal cue notes:
>

> version "2.19.83"
> 
> oboeNotes = \relative c'' {
>   c2 r8 d16\f f e g f a
>   g8 g16 g g2.
> }
> 
> \addQuote oboeNotes
>   \new Voice = "cue"
>   \oboeNotes
> 
> lyr = \lyricmode {
>   xy a b c d e f g a h i
> }
> 
> <<
>   \new Staff
>     \new Voice = "Oboe" \oboeNotes
>     \new Lyrics \lyricsto "Oboe" \lyr
>   \new Staff
>     \new Voice
>   \relative c'' {
>     c2
>     <<
>       \cueDuring #"oboeNotes" #up { r2 }
>     >>
>     g2 c,
>   }
>     \new Lyrics = "cueLyrics"
>   \lyricsto "cue" {
>     \set fontSize = #-4
>     a b c d e f g a h i
>   }
> >>
> 
>




>
You only have one note in your oboe voice, hence only lyrics below this note.


> No. The one lyric is below a vocal cue.  I don't know why the second 
> syllable/word is not under the 2nd cue note.



If you want your lyrics to align on another voice then you can use a NullVoice 
context as explained in NR 2.1.2 Techniques specific to lyrics > Polyphony with 
shared lyrics
http://lilypond.org/doc/v2.21/Documentation/notation/techniques-specific-to-lyrics.html#polyphony-with-shared-lyrics


> 
>

> I don't quite see how your documentation reference works with vocal cues in 
> instrumental music.

> Thank you for replying,

> Paul

> 
>


>



>
Cheers,
Xavier
>

> -- 
>
Xavier Scheuer 

>