\assertBeamSlope

2023-05-11 Thread Chad Linsley
Can anyone demonstrate how to use this music function?

\assertBeamSlope

I've seen an example of \assertBeamQuant in the Regression Tests but not
\assertBeamSlope.

C


Re: Small note between staves as time signature

2023-05-11 Thread Lukas-Fabian Moser

Hi Jakob,

The Danish book of chorales to accompany the official hymnal uses a 
peculiar "time signature" (which isn't really a time signature) for 
some hymns.


It's a small note, in this case a 텞  but elsewhere its a compound 
signature like 텞♩, to indicate the metre.

Maybe also use an actual TimeSignature living in a Dynamics context?

\version "2.24.0"

#(add-simple-time-signature-style
  'note
  (lambda (frac)
    (let ((den (cdr frac)))
  #{ \markup \tiny \note #(ly:make-duration (ly:intlog2 den)) #UP #})))

\layout {
  \context {
    \Dynamics
    \consists Time_signature_engraver
    \override TimeSignature.break-align-symbol = #'key-signature
    \override TimeSignature.style = #'note
  }
  \context {
    \Staff
    \remove Time_signature_engraver
  }
}

\score {
  \new PianoStaff <<
    \new Staff {
  \key d \major
  \after 1*6 { \break \time 2/2 }
  \repeat unfold 100 << d'4 \\ a4 >>
    }
    \new Dynamics {
  s1*25
    }
    \new Staff \with { \clef bass } {
  \key d \major
  \repeat unfold 100 << fis4 \\ d4 >>
    }
  >>
}

Lukas




Re: Small note between staves as time signature

2023-05-11 Thread Jakob Pedersen

Hi Juergen,

Works perfectly! Thank you very much.

I can guarantee you I would never have figured that out on my own!

If anyone has any idea what this kind of notation is called, do let me 
know :)


Best wishes,
Jakob

On 11.05.2023 12.59, juergen.gr...@xyz.de wrote:

Hello,

what about this:


\version "2.24.0"

\language "deutsch"

%% based on 
https://www.mail-archive.com/lilypond-user@gnu.org/msg119983.html

center =
#(define-music-function (text x-off) (markup? number?)
   #{
     \once \override Score.GridLine.stencil =
     #(lambda (grob)
        (let* ((stil (ly:grid-line-interface::print grob))
               (stil-y-ext (ly:stencil-extent stil Y))
               (thick (ly:grob-property grob 'thickness 0.1))
               (center ( / (+ (car stil-y-ext) (cdr stil-y-ext)) 2))

               (note
                (interpret-markup
                 (ly:grob-layout grob)
                 (ly:grob-alist-chain grob
                   (ly:output-def-lookup (ly:grob-layout grob) 
'text-font-defaults))

                 text))

               (note-y-ext (ly:stencil-extent note Y))
               (height (interval-length (ly:stencil-extent note Y)))
               (y-off (- (- center (car note-y-ext)) ( / height 2

          (ly:stencil-translate note (cons x-off y-off
   #})


sig = \markup { \teeny \line { \note {2} #1 \note {4} #-1 } }

\score {
  \new PianoStaff <<
    \new Staff <<
      \key d \major
      \new Voice { \once \override Staff.TimeSignature. stencil = ##f 
\voiceOne d'4 \bar "|" }

      \new Voice { \voiceTwo \center \sig #-6.25 a4 }
    >>
    \new Staff <<
      \clef bass \key d \major
      \new Voice { \once \override Staff.TimeSignature. stencil = ##f 
\voiceOne fis4 }

      \new Voice { \voiceTwo d4 }
    >>
  >>
}

\layout {
  \context {
    \Score
    \consists "Grid_line_span_engraver"
    \override GridLine.stencil = ##f
  }
  \context {
    \Staff
    \consists "Grid_point_engraver"
    %% adjust the value if needed
    gridInterval = #(ly:make-moment 1/64)
  }
}
%

HTH, Juergen.




Re: Small note between staves as time signature

2023-05-11 Thread juergen . gruen


   
   .fr-emoticon.fr-emoticon-img {

   background-repeat: no-repeat !important;
   font-size: inherit;
   height: 1em;
   width: 1em;
   min-height: 20px;
   min-width: 20px;
   display: inline-block;
   margin: -0.1em 0.1em 0.1em;
   line-height: 1;
   vertical-align: middle;
   }
   .fr-emoticon {
   font-weight: normal;
   font-family: "Apple Color Emoji","Segoe UI Emoji","NotoColorEmoji","Segoe 
UI Symbol","Android Emoji","EmojiSymbols";
   display: inline;
   line-height: 0;
   }
   Hello,
what about this:
\version 2.24.0

\language deutsch

%% based on https://www.mail-archive.com/lilypond-user@gnu.org/msg119983.html
center =
#(define-music-function (text x-off) (markup? number?)
  #{
\once \override Score.GridLine.stencil =

#(lambda (grob)
   (let* ((stil (ly:grid-line-interface::print grob))
  (stil-y-ext (ly:stencil-extent stil Y))
  (thick (ly:grob-property grob thickness 0.1))
  (center ( / (+ (car stil-y-ext) (cdr stil-y-ext)) 2))

  (note
   (interpret-markup
(ly:grob-layout grob)
(ly:grob-alist-chain grob
  (ly:output-def-lookup (ly:grob-layout grob) 
text-font-defaults))
text))

  (note-y-ext (ly:stencil-extent note Y))
  (height (interval-length (ly:stencil-extent note Y)))
  (y-off (- (- center (car note-y-ext)) ( / height 2

 (ly:stencil-translate note (cons x-off y-off
  #})


sig = \markup { \teeny \line { \note {2} #1 \note {4} #-1 } }

\score {
 \new PianoStaff 
   \new Staff 
 \key d \major
 \new Voice { \once \override Staff.TimeSignature. stencil = ##f \voiceOne d4 
\bar | }
 \new Voice { \voiceTwo \center \sig #-6.25 a4 }
   >>
   \new Staff 
 \clef bass \key d \major
 \new Voice { \once \override Staff.TimeSignature. stencil = ##f \voiceOne 
fis4 }
 \new Voice { \voiceTwo d4 }
   >>
 >>
}

\layout {
 \context {
   \Score
   \consists Grid_line_span_engraver
   \override GridLine.stencil = ##f
 }
 \context {
   \Staff
   \consists Grid_point_engraver
   %% adjust the value if needed
   gridInterval = #(ly:make-moment 1/64)
 }
}%
HTH, Juergen.



RE: Re: Variable binding breaks layout

2023-05-11 Thread juergen . gruen

Thank you for the explanation.


Juergen.








Re: Variable binding breaks layout

2023-05-11 Thread Jean Abou Samra
Le jeudi 11 mai 2023 à 06:26 +, juergen.gr...@xyz.de a écrit :
> Hello all,
> 
> 
> why does each of the out commented lines break the layout when active? And 
> why does "(brace-Y..." not?


What breaks the layout is not the variable bindings per se of course, but the 
ly:grob-property calls, and that's because you are asking for information too 
early. At the moment after-line-breaking is
run, page layout is not done yet. Asking for the Y-extent of the brace 
indirectly triggers calculations of the distance between staves while the 
backend is generally not yet in a state where it is
able to compute them correctly. The X-extent of SystemStartBrace is unset 
(https://lilypond.org/doc/v2.24/Documentation/internals/systemstartbrace) which 
means LilyPond uses the default of computing
it from the grob's stencil, so when you ask for the X-extent, it will try to 
compute the stencil, and thus the height, leading to the same problem. 
Similarly, the X-offset is based on side positioning
(ly:side-position-interface::x-aligned-side) so it will request the stencil.

On the other hand, the Y-offset is always 0, so you don't get problems, but 
it's not very useful either.




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


Re: Othering??

2023-05-11 Thread Arjen

My guess:

"Othering" is the visual result of a word of 8 letters ending in 
".ing" (e.g., Building) partly being overwritten by the word "Other".
This can happen when a progression line is repeatedly overwritten by 
ending it with a lone carriage return character (CR, ASCII 13) causing 
the cursor to return to the beginning of the same line on the terminal 
screen. Only when a line feed (LF, ASCII 10) is received, the cursor 
will move one line down.


-Loading
\Loading
|Loading
/Loading
Other

To find out which word exactly is overwritten each time, try capturing 
the output in a file. On unix-like platforms there are several 
techniques for this, redirection comes to mind.


lilypond-command > output.log 2>&1


Regards,
Arjen Bax

Op 10-05-2023 om 18:04 schreef Paul Hodges:
Eh?  It's a perfectly good word that gets a moderate amount of use, 
typically describing the treatment of people who are to be considered 
outsiders to a group.  It is a fairly modern coinage, but "other" is 
recognised as a transitive verb by both Oxford and Meriam-Webster in 
their recent dictionaries (my older Shorter Oxford doesn't list 
"other" as a verb, though).


Paul

*From: * Vincent Gay 
*To: * 
*Sent: * 10/05/2023 13:44
*Subject: * Re: Othering??

Le 10/05/2023 à 14:26, Andrew Bernard a écrit :

a word that does not really exist in English

DeepL translate Othering in French by altérisation, which is not
really French either (the right word would be altération)

I suppose this is related to the use of sharp, flat and other beccare

-- 
Vincent Gay

Envoyé depuis mon saxo-phone :)
https://myrealbook.vintherine.org/    
-http://photos.vintherine.org/  



Variable binding breaks layout

2023-05-11 Thread juergen . gruen

Hello all,


why does each of the out commented lines break the layout when active? And why does 
"(brace-Y..." not?


%%%
\version "2.24.0"


#(define (align-to-brace)
   (lambda (grob)
     (let* ((refp (ly:grob-system grob))
            (all-elts (ly:grob-array->list (ly:grob-object refp 'all-elements)))
            (brace (car (filter (lambda (elt)
                                  (grob::has-interface elt 
'system-start-delimiter-interface))
                                all-elts)))
           
            ;(brace-X-ext (ly:grob-property brace 'X-extent))
            ;(brace-Y-ext (ly:grob-property brace 'Y-extent))
            ;(brace-X (ly:grob-relative-coordinate brace refp X))
            (brace-Y (ly:grob-relative-coordinate brace refp Y)))
       
       (format #t "value: ~s" brace-Y


\score {
  \new GrandStaff <<
    \new Staff {
      \once \override NoteHead.after-line-breaking = #(align-to-brace)
      f'4
    }
    \new Staff {
      f'4
    }
  >>
}
%%%




Juergen.