Re: Make shortVocalName attach to lyrics like stanza

2022-04-03 Thread Dinh Hoang Tu
Hi Jean,

Thanks a lot for your updated code.
This seems to solve the issue with stanza of verses. It's really great.
Thanks again for this!

But it also prints chorus stanza on each line which is not really expected
I think.

\version "2.22.2"

sopranoMusic = \relative c'' {
   \time 2/4
   % chorus music
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c } \break
   % verse music
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c }
}

sopranoLyrics = \lyrics {
   \set stanza = "CH:"
   \repeat unfold 29 { a }
   <<
 {
   \set stanza = "1."
   \repeat unfold 21 { aaa }
 }
 \new Lyrics = "lyr2" {

   \set stanza = "2."
   \repeat unfold 21 {  }
 }
   >>
}

#(define (add-grob-definition grob-name grob-entry)
(set! all-grob-descriptions
  (cons ((@@ (lily) completize-grob-entry)
 (cons grob-name grob-entry))
all-grob-descriptions)))

#(add-grob-definition
   'StanzaNumberSpanner
   `((direction . ,LEFT)
 (font-series . bold)
 (padding . 1.0)
 (side-axis . ,X)
 (stencil . ,ly:text-interface::print)
 (X-offset . ,ly:side-position-interface::x-aligned-side)
 (Y-extent . ,grob::always-Y-extent-from-stencil)
 (meta . ((class . Spanner)
  (interfaces . (font-interface
 side-position-interface
 stanza-number-interface
 text-interface))

\layout {
   \context {
 \Global
 \grobdescriptions #all-grob-descriptions
   }
   \context {
 \Score
 \remove Stanza_number_align_engraver
 \consists
   #(lambda (context)
  (let ((texts '())
(syllables '()))
(make-engraver
 (acknowledgers
  ((stanza-number-interface engraver grob source-engraver)
 (set! texts (cons grob texts)))
  ((lyric-syllable-interface engraver grob source-engraver)
 (set! syllables (cons grob syllables
 ((stop-translation-timestep engraver)
(for-each
 (lambda (text)
   (for-each
(lambda (syllable)
  (ly:pointer-group-interface::add-grob text
'side-support-elements syllable))
syllables))
 texts)
(set! syllables '())
   }
   \context {
 \Lyrics
 \remove Stanza_number_engraver
 \consists
   #(lambda (context)
  (let ((text #f)
(last-stanza #f))
(make-engraver
 ((process-music engraver)
(let ((stanza (ly:context-property context 'stanza #f)))
  (if (and stanza (not (equal? stanza last-stanza)))
  (let ((column (ly:context-property context
'currentCommandColumn)))
(set! last-stanza stanza)
(if text
(ly:spanner-set-bound! text RIGHT column))


(set! text (ly:engraver-make-grob engraver
'StanzaNumberSpanner '()))
(ly:grob-set-property! text 'text stanza)
(ly:spanner-set-bound! text LEFT column)
 ((finalize engraver)
(if text
(let ((column (ly:context-property context
'currentCommandColumn)))
  (ly:spanner-set-bound! text RIGHT column)))
 \override StanzaNumberSpanner.horizon-padding = 1
   }
}

\score {
   \new ChoirStaff <<
 \new Staff <<
   \new Voice = soprano \sopranoMusic
   \new Lyrics \lyricsto soprano \sopranoLyrics
   >>
   >>
   \layout {
 indent = 0
   }
}

I guess it can be a bit better if we create a new element for this kind of
stanza, for ex. longStanza.
Just in same way as vocalName/shortVocalName,
instrumentName/shortInstrumentName

My temporary workaround is to make chorus stanza as a markup. It's not
beautiful, but at least it's acceptable for my usage:

\version "2.22.2"

sopranoMusic = \relative c'' {
   \time 2/4
   % chorus music
   <> \tweak extra-offset #'(-7.5 . -1.7) _\markup { \bold "CH:" }
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c } \break
   % verse music
   \repeat unfold 10 { c } \break
   \repeat unfold 10 { c }
}

sopranoLyrics = \lyrics {
   %\set stanza = "CH:"
   \repeat unfold 29 { a }
   <<
 {
   \set stanza = "1."
   \repeat unfold 21 { aaa }
 }
 \new Lyrics = "lyr2" {

   \set stanza = "2."
   \repeat unfold 21 {  }
 }
   >>
}

#(define (add-grob-definition grob-name grob-entry)
(set! all-grob-descriptions
  (cons ((@@ (lily) completize-grob-entry)
 (cons grob-name grob-entry))
all-grob-descriptions)))

#(add-grob-definition
   'StanzaNumberSpanner
   `((direction . ,LEFT)
 (font-series 

Re: help for midi instruments

2022-04-03 Thread Dario Marrini
I thank you all guys, I'll try following your suggestions

cheers

Il giorno sab 2 apr 2022 alle ore 20:31 Guy Stalnaker 
ha scritto:

> Gilles,
>
> That aligns with my understanding of how midi works. Your example creates
> a sequence of "notes" with decreasing midi "attack pressure" to simulate a
> whole note descrendo.
>
> Thanks.
>
> --
>
> “Happiness is the meaning and the purpose of life, the whole aim and end
> of human existence.”
>
> ― Aristotle
>
>
> On Sat, Apr 2, 2022 at 12:58 PM Gilles Sadowski 
> wrote:
>
>> Le sam. 2 avr. 2022 à 18:29, Guy Stalnaker  a écrit
>> :
>> >
>> > Curious question if I may. Respondents in this thread suggest something
>> is possible I thought was not possible. Is it true that putting on a whole
>> note crescendo or decrescendo dynamics
>> >
>> > c1\> ... \p
>> >
>> > creates midi output with increasing or decreasing loudness for the
>> duration of that note?
>>
>> You can achieve the desired effect with the following:
>> ---CUT---
>> << {c1} {s8\> s s\! s\p} >>
>> ---CUT---
>>
>> Regards,
>> Gilles
>>
>> >
>> > [...]
>>
>>


Re: sustain pedal display ugliness, how to fix?

2022-04-03 Thread Paul Hodges
I thought the unit to be staff space, scaled according to the chosen size.


Paul



 From:   Jean Abou Samra  
 To:   Kenneth Wolcott  
 Cc:   Lily Pond  
 Sent:   03/04/2022 15:23 
 Subject:   Re: sustain pedal display ugliness, how to fix? 

Le 02/04/2022 à 17:50, Kenneth Wolcott a écrit : 
> Hi Jean; 
> 
>    I implemented your suggestion. 
> 
>    Can you provide a little more info regarding the padding amount, how 
> much larger than 0.5 can I increase it; is that in mm? 
 
 
 
There is no limit other than sanity (why would there be one?). 
The unit is the default staff space, namely 5pt or 1.75mm. 
 
Regards, 
Jean 
 
 
 


Re: Lilyjazz font and Score.markFormatter problem with Lily 2.23.6

2022-04-03 Thread Hans Aikema
IIRC on Mac it only works when you install them in the system fonts. Fontbook 
installs them in the user-fonts.

> On 3 Apr 2022, at 23:33, Jacques Menu  wrote:
> 
> Hello Xavier,
> 
> Thanks for the suggestion!
> 
> Here are the LilyJAZZ fonts available to LilyPond:
> 
> jacquesmenu@macmini: ~/Desktop > lilypond -dshow-available-fonts  > 
> lilypond_available_fonts.txt 2>&1
> 
> jacquesmenu@macmini: ~/Desktop > grep LilyJAZZ lilypond_available_fonts.txt 
> family LilyJAZZ-Brace
>  LilyJAZZ\-Brace:style=Brace
> family LilyJAZZ-11
>  LilyJAZZ\-11:style=11
> family LilyJAZZ-13
>  LilyJAZZ\-13:style=13
> family LilyJAZZ-14
>  LilyJAZZ\-14:style=14
> family LilyJAZZ-16
>  LilyJAZZ\-16:style=16
> family LilyJAZZ-18
>  LilyJAZZ\-18:style=18
> family LilyJAZZ-20
>  LilyJAZZ\-20:style=20
> family LilyJAZZ-23
>  LilyJAZZ\-23:style=23
> family LilyJAZZ-26
>  LilyJAZZ\-26:style=26
> 
> Adding the fonts from lilyjazz-master to Mac OS’s font book does not change 
> the output of the   -dshow-available-fonts option shown above.
> 
> JM
> 
>  lilyjazz-master to Mac
> 
> OS’s FontBook does not change the output.
> 
>> Le 3 avr. 2022 à 21:48, Xavier Scheuer  a écrit :
>> 
>> On Sun, 3 Apr 2022 at 12:44, Jacques Menu  wrote:
>> >
>> > Hello Knute,
>> >
>> > Same result replacing define fonts by direct includes.
>> 
>> Hello Jacques,
>> 
>> Have you properly installed the fonts lilyjazz-text and lilyjazz-chord on 
>> your operating system?
>> Do they appear in the list of fonts obtained via lilypond 
>> -dshow-available-fonts ?
>> 
>> See NR 1.8.3 Fonts
>> http://lilypond.org/doc/v2.23/Documentation/notation/fonts.html
>> 
>> Cheers,
>> Xavier
>> 
>> -- 
>> Xavier Scheuer 
>> 
> 


Re: Lilyjazz font and Score.markFormatter problem with Lily 2.23.6

2022-04-03 Thread Jacques Menu
Hello Xavier,

Thanks for the suggestion!

Here are the LilyJAZZ fonts available to LilyPond:

jacquesmenu@macmini: ~/Desktop > lilypond -dshow-available-fonts  > 
lilypond_available_fonts.txt 2>&1

jacquesmenu@macmini: ~/Desktop > grep LilyJAZZ lilypond_available_fonts.txt 
family LilyJAZZ-Brace
 LilyJAZZ\-Brace:style=Brace
family LilyJAZZ-11
 LilyJAZZ\-11:style=11
family LilyJAZZ-13
 LilyJAZZ\-13:style=13
family LilyJAZZ-14
 LilyJAZZ\-14:style=14
family LilyJAZZ-16
 LilyJAZZ\-16:style=16
family LilyJAZZ-18
 LilyJAZZ\-18:style=18
family LilyJAZZ-20
 LilyJAZZ\-20:style=20
family LilyJAZZ-23
 LilyJAZZ\-23:style=23
family LilyJAZZ-26
 LilyJAZZ\-26:style=26

Adding the fonts from lilyjazz-master to Mac OS’s font book does not change the 
output of the   -dshow-available-fonts option shown above.

JM

 lilyjazz-master to Mac

OS’s FontBook does not change the output.

> Le 3 avr. 2022 à 21:48, Xavier Scheuer  a écrit :
> 
> On Sun, 3 Apr 2022 at 12:44, Jacques Menu  > wrote:
> >
> > Hello Knute,
> >
> > Same result replacing define fonts by direct includes.
> 
> Hello Jacques,
> 
> Have you properly installed the fonts lilyjazz-text and lilyjazz-chord on 
> your operating system?
> Do they appear in the list of fonts obtained via lilypond 
> -dshow-available-fonts ?
> 
> See NR 1.8.3 Fonts
> http://lilypond.org/doc/v2.23/Documentation/notation/fonts.html 
> 
> 
> Cheers,
> Xavier
> 
> -- 
> Xavier Scheuer mailto:x.sche...@gmail.com>>
> 



Re: Lilyjazz font and Score.markFormatter problem with Lily 2.23.6

2022-04-03 Thread Xavier Scheuer
On Sun, 3 Apr 2022 at 12:44, Jacques Menu  wrote:
>
> Hello Knute,
>
> Same result replacing define fonts by direct includes.

Hello Jacques,

Have you properly installed the fonts lilyjazz-text and lilyjazz-chord on
your operating system?
Do they appear in the list of fonts obtained via lilypond
-dshow-available-fonts ?

See NR 1.8.3 Fonts
http://lilypond.org/doc/v2.23/Documentation/notation/fonts.html

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: sustain pedal display ugliness, how to fix?

2022-04-03 Thread Jean Abou Samra

Le 02/04/2022 à 17:50, Kenneth Wolcott a écrit :

Hi Jean;

   I implemented your suggestion.

   Can you provide a little more info regarding the padding amount, how
much larger than 0.5 can I increase it; is that in mm?




There is no limit other than sanity (why would there be one?).
The unit is the default staff space, namely 5pt or 1.75mm.

Regards,
Jean





Re: Lilyjazz font and Score.markFormatter problem with Lily 2.23.6

2022-04-03 Thread Knute Snortum
I'm at the end of my knowledge about this problem.  Abraham Lee is the
author of LilyJAZZ fonts and the support document says he can be
connected at i...@musictypefoundry.com, but that was six years ago.
You could also try tisimst.lilyp...@gmail.com.

--
Knute Snortum

On Sun, Apr 3, 2022 at 3:44 AM Jacques Menu  wrote:
>
> Hello Knute,
>
> Same result replacing define fonts by direct includes.
>
> JM
>
> > Le 2 avr. 2022 à 16:30, Knute Snortum  a écrit :
> >
> > On Sat, Apr 2, 2022 at 6:21 AM Jacques Menu  wrote:
> > [snip]
> >> \paper {
> >>  #(define fonts
> >> (set-global-fonts
> >>  #:music "lilyjazz"
> >>  #:brace "lilyjazz"
> >>  #:roman "lilyjazz-text"
> >>  #:sans "lilyjazz-chord"
> >>  #:factor (/ staff-height pt 20)
> >>  ))
> >> }
> >
> > Try removing  #(define fonts in the paper block and instead, add this
> > near the top of your input file:
> >
> > \include "jazzchords.ily"
> > \include "lilyjazz.ily"
> > \include "jazzextras.ily"
> >
> > --
> > Knute Snortum
>



Re: Lilyjazz font and Score.markFormatter problem with Lily 2.23.6

2022-04-03 Thread Jacques Menu
Hello Knute,

Same result replacing define fonts by direct includes.

JM

> Le 2 avr. 2022 à 16:30, Knute Snortum  a écrit :
> 
> On Sat, Apr 2, 2022 at 6:21 AM Jacques Menu  wrote:
> [snip]
>> \paper {
>>  #(define fonts
>> (set-global-fonts
>>  #:music "lilyjazz"
>>  #:brace "lilyjazz"
>>  #:roman "lilyjazz-text"
>>  #:sans "lilyjazz-chord"
>>  #:factor (/ staff-height pt 20)
>>  ))
>> }
> 
> Try removing  #(define fonts in the paper block and instead, add this
> near the top of your input file:
> 
> \include "jazzchords.ily"
> \include "lilyjazz.ily"
> \include "jazzextras.ily"
> 
> --
> Knute Snortum