Re: Undertie in lyrics to show no breath

2022-07-20 Thread David Wright
On Wed 20 Jul 2022 at 11:34:58 (+0100), mancunius wrote:
> Hello. In the following example I want the undertie to be placed between the 
> 2 “O sacrum convivium” lines of lyrics, to indicate that no breath should be 
> taken by the singers - as per the normal choral convention. (cf. the 
> commented-out \breathe command in the music itself.) As it currently 
> compiles, the undertie is placed beneath the word “O” of the second phrase. 
> How do I adjust it so that it becomes a link between the 2 phrases, not part 
> of one of them? (I’ve attached a screenshot of what I would like to achieve)

You might try:

O sa -- crum con -- ví -- vi -- um_~
O __ sa -- _ crum con -- ví -- vi -- um

± the comma.

Note that the alignment of the um is slightly affected,
if you're after precision.

Cheers,
David.



Re: woodwind-diagram overrides

2022-07-20 Thread Orm Finnendahl
Am Mittwoch, den 20. Juli 2022 um 22:00:53 Uhr (+0200) schrieb David Kastrup:
> Well, that's more or less what
> 
> #(begin
> 
> ...
> 
> )
> 
> does.

Wow, cool! I assume #'defines than work in the top-level, right?
Should've thougt of that but admittedly my scheme is a bit rusty...

--
Orm



Re: woodwind-diagram overrides

2022-07-20 Thread David Kastrup
Orm Finnendahl  writes:

> Hi,
>
> Am Mittwoch, den 20. Juli 2022 um 13:14:25 Uhr (-0600) schrieb Carl Sorensen:
>> The way to do this is to write the plain scheme code files as lilypond
>> files.
>> 
>> Put the functions in a .ly file.
>> 
>> Preface each function with # (to put the parser into scheme mode).
>
> Thanks, I'm aware of that but that's a bit tedious. I hoped there is
> an on/off command to put the lilypond parser into scheme mode before
> the scheme code and put it back into the normal mode afterwards, but
> assume from your answer this hasn't been implemented.

Well, that's more or less what

#(begin

...

)

does.

-- 
David Kastrup



Re: woodwind-diagram overrides

2022-07-20 Thread Carl Sorensen
On Wed, Jul 20, 2022 at 1:57 PM Orm Finnendahl <
orm.finnend...@selma.hfmdk-frankfurt.de> wrote:

> Hi,
>
> Am Mittwoch, den 20. Juli 2022 um 13:14:25 Uhr (-0600) schrieb Carl
> Sorensen:
> > The way to do this is to write the plain scheme code files as lilypond
> > files.
> >
> > Put the functions in a .ly file.
> >
> > Preface each function with # (to put the parser into scheme mode).
>
> Thanks, I'm aware of that but that's a bit tedious. I hoped there is
> an on/off command to put the lilypond parser into scheme mode before
> the scheme code and put it back into the normal mode afterwards, but
> assume from your answer this hasn't been implemented.
>

You could wrap the whole file in

# (begin
...
)

And you'd have scheme mode for the whole file.

Carl


Re: woodwind-diagram overrides

2022-07-20 Thread Orm Finnendahl
Hi,

Am Mittwoch, den 20. Juli 2022 um 13:14:25 Uhr (-0600) schrieb Carl Sorensen:
> The way to do this is to write the plain scheme code files as lilypond
> files.
> 
> Put the functions in a .ly file.
> 
> Preface each function with # (to put the parser into scheme mode).

Thanks, I'm aware of that but that's a bit tedious. I hoped there is
an on/off command to put the lilypond parser into scheme mode before
the scheme code and put it back into the normal mode afterwards, but
assume from your answer this hasn't been implemented.

--
Orm



Re: woodwind-diagram overrides

2022-07-20 Thread Carl Sorensen
On Wed, Jul 20, 2022 at 1:08 PM Orm Finnendahl <
orm.finnend...@selma.hfmdk-frankfurt.de> wrote:

> Hi,
>
>
> Alternatively: Is there a way to load the necessary scheme code of the
> functions in question by defining some \include statement for plain
> scheme code files in the .ly file, ensuring they are loaded "after"
> lilypond's files in /usr/share/lilypond/current/scm?
>

The way to do this is to write the plain scheme code files as lilypond
files.

Put the functions in a .ly file.

Preface each function with # (to put the parser into scheme mode).

Then include  the .ly file like you would any lilypond input file.

HTH,

Carl


woodwind-diagram overrides

2022-07-20 Thread Orm Finnendahl
Hi,

 for a new piece I need to display Oboe woodwind fingering diagrams
according to the book "The Techniques of Oboe Playing" by Peter
Veale. Lilypond's standard woodwind fingerings for oboe in non graphic
mode are similar, but have some significant differences to the method
used in the book which seems to be common practise nowadays. I managed
to find out how to modify the code in "define-woodwind-fingerings.scm"
and "display-woodwind-fingerings.scm" to adhere to the way it is
displayed in the book.

Despite the very elaborate and flexible woodwind fingering interface
of lilypond it unfortunately is not possible to entirely mimick the
model by defining a custom instrument using
#'generate-oboe-family-entry, so I had to overwrite existing functions
in the interface. It would be possible to redefine the interface to
allow for these changes to be adjustable using properties given to
woodwind-fingerings, but that would have to get merged into the main
tree (I'd be willing to contribute the code in case the devs like to
add it to the code base).

Alternatively: Is there a way to load the necessary scheme code of the
functions in question by defining some \include statement for plain
scheme code files in the .ly file, ensuring they are loaded "after"
lilypond's files in /usr/share/lilypond/current/scm?

--
Orm



Re: Snippet doesn't work in unstable version

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 18:43 Uhr schrieb Martín Rincón Botero <
martinrinconbot...@gmail.com>:

> Hello,
>
> I grabbed this snippet a while ago from somewhere™ which puts a box
> around music (an "improvisation box"). It works perfectly in Lilypond
> 2.22.1, but not in Lilypond 2.23.3+. Does somebody know how to make it work
> in more recent versions? This is the snippet:
>
> \version "2.19.15"
>
> \header {
>   tagline = ##f
> }
>
> #(define-event-class 'music-boxer-event 'span-event)
>
> #(define-event-class 'box-event 'music-event)
>
> #(define (add-grob-definition grob-name grob-entry)
>(let* ((meta-entry   (assoc-get 'meta grob-entry))
>   (class(assoc-get 'class meta-entry))
>   (ifaces-entry (assoc-get 'interfaces meta-entry)))
>  ;; change ly:grob-properties? to list? to work from 2.19.12 back to
> at least 2.18.2
>  (set-object-property! grob-name 'translation-type?
> ly:grob-properties?)
>  (set-object-property! grob-name 'is-grob? #t)
>  (set! ifaces-entry (append (case class
>   ((Item) '(item-interface))
>   ((Spanner) '(spanner-interface))
>   ((Paper_column) '((item-interface
>
>  paper-column-interface)))
>   ((System) '((system-interface
>spanner-interface)))
>   (else '(unknown-interface)))
>   ifaces-entry))
>  (set! ifaces-entry (uniq-list (sort ifaces-entry symbol  (set! ifaces-entry (cons 'grob-interface ifaces-entry))
>  (set! meta-entry (assoc-set! meta-entry 'name grob-name))
>  (set! meta-entry (assoc-set! meta-entry 'interfaces
> ifaces-entry))
>  (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
>  (set! all-grob-descriptions
>(cons (cons grob-name grob-entry)
>  all-grob-descriptions
>
> #(define (make-box thick padding xext yext)
>(let ((xext (interval-widen xext padding))
>  (yext (interval-widen yext padding)))
>(ly:stencil-add
> (make-filled-box-stencil xext (cons (- (car yext) thick) (car yext)))
> (make-filled-box-stencil xext (cons (cdr yext) (+ (cdr yext) thick)))
> (make-filled-box-stencil (cons (cdr xext) (+ (cdr xext) thick)) yext)
> (make-filled-box-stencil (cons (- (car xext) thick) (car xext))
> yext
>
> #(define (music-boxer-stencil grob)
>(let* ((elts (ly:grob-object grob 'elements))
>   (refp-X (ly:grob-common-refpoint-of-array grob elts X))
>   (X-ext (ly:relative-group-extent elts refp-X X))
>   (refp-Y (ly:grob-common-refpoint-of-array grob elts Y))
>   (Y-ext (ly:relative-group-extent elts refp-Y Y))
>   (padding (ly:grob-property grob 'padding 0.3))
>   (stil (make-box 0.1 padding X-ext Y-ext))
>   (offset (ly:grob-relative-coordinate grob refp-X X)))
>  (ly:stencil-translate-axis stil (- offset) X)))
>
> #(define box-stil music-boxer-stencil)
>
> #(add-grob-definition
>   'Box
>   `(
>  (stencil . ,box-stil)
>  (meta . ((class . Item)
>
;; add:
   (classes . (Item))

>   (interfaces . ())
>
> #(add-grob-definition
>   'MusicBoxer
>   `(
>  (stencil . ,music-boxer-stencil)
>  (meta . ((class . Spanner)
>
;; add:
  (classes . (Spanner))

>   (interfaces . ())
>
>
> #(define box-types
>'(
>   (BoxEvent
>. ((description . "A box encompassing music at a single timestep.")
>   (types . (general-music box-event music-event event))
>   ))
>   ))
>
> #(define music-boxer-types
>'(
>   (MusicBoxerEvent
>. ((description . "Used to signal where boxes encompassing music
> start and stop.")
>   (types . (general-music music-boxer-event span-event event))
>   ))
>   ))
>
>
> #(set!
>   music-boxer-types
>   (map (lambda (x)
>  (set-object-property! (car x)
>'music-description
>(cdr (assq 'description (cdr x
>  (let ((lst (cdr x)))
>(set! lst (assoc-set! lst 'name (car x)))
>(set! lst (assq-remove! lst 'description))
>(hashq-set! music-name-to-property-table (car x) lst)
>(cons (car x) lst)))
> music-boxer-types))
>
> #(set!
>   box-types
>   (map (lambda (x)
>  (set-object-property! (car x)
>'music-description
>(cdr (assq 'description (cdr x
>  (let ((lst (cdr x)))
>(set! lst (assoc-set! lst 'name (car x)))
>(set! lst (assq-remove! lst 'description))
>(hashq-set! music-name-to-property-table (car x) lst)
>(cons (car x) lst)))
> box-types))
>
> #(set! music-descriptions
>(append music-boxer-types music-descriptions))
>
> #(set! music-descriptions
>(append box-types 

Snippet doesn't work in unstable version

2022-07-20 Thread Martín Rincón Botero
Hello,

I grabbed this snippet a while ago from somewhere™ which puts a box around 
music (an "improvisation box"). It works perfectly in Lilypond 2.22.1, but not 
in Lilypond 2.23.3+. Does somebody know how to make it work in more recent 
versions? This is the snippet:

\version "2.19.15"
\header {
tagline = ##f
}

#(define-event-class 'music-boxer-event 'span-event)
#(define-event-class 'box-event 'music-event)
#(define (add-grob-definition grob-name grob-entry)
(let* ((meta-entry (assoc-get 'meta grob-entry))
(class (assoc-get 'class meta-entry))
(ifaces-entry (assoc-get 'interfaces meta-entry)))
;; change ly:grob-properties? to list? to work from 2.19.12 back to at least 
2.18.2
(set-object-property! grob-name 'translation-type? ly:grob-properties?)
(set-object-property! grob-name 'is-grob? #t)
(set! ifaces-entry (append (case class
((Item) '(item-interface))
((Spanner) '(spanner-interface))
((Paper_column) '((item-interface
paper-column-interface)))
((System) '((system-interface
spanner-interface)))
(else '(unknown-interface)))
ifaces-entry))
(set! ifaces-entry (uniq-list (sort ifaces-entry symbol1
\musicBoxerStart d8-4 g,-0 d' g, d'-4 g,-0 d' \musicBoxerEnd g,
}

%2
\repeat volta 2 {
\box 1\f\fermata
\musicBoxerStart g8-3 d-0 g d g8-4 d-0 g \musicBoxerEnd d\accent
}
}

\score {
\new Staff \melody
}

It should produce:

It produces instead: fatal error: meta.classes must be non-empty list, found #f
Something seems to have changed in the meanwhile. It would be nice to update 
this snippet to work in more recent versions.
Regards,
Martín.

--
www.martinrinconbotero.com 
(https://link.getmailspring.com/link/cag9pzzwc2adlw9vcaudzy2hf0rx7envupae6o4to06ykkwp...@mail.gmail.com/0?redirect=http%3A%2F%2Fwww.martinrinconbotero.com=bGlseXBvbmQtdXNlckBnbnUub3Jn)



Re: openmusic

2022-07-20 Thread Karim Haddad
Sorry missed the subject- So i am reposting. 


Dear Andrew,


Yes I do, since i wrote this library and maintaine it.
It generates .ly files starting from Om Score objects.
Example (screeshot)

I have a dev ongoing still not released yet. If you find, need some 
improvements please do say so.

I am sorry if this is off topic.


Best to you all and log live Lilypond!


On Wed, Jul 20, 2022 at 08:29:47AM -0400, lilypond-user-requ...@gnu.org wrote:
> --
>
> Message: 3
>
> There's this:
>
> https://github.com/openmusic-project/omlily
>
> I don't know if it is currently under development.
>
>
> Andrew
> 

-- 
Karim Haddad

Music Representations Team, IRCAM
Research and development manager.
email   : karim.had...@ircam.fr
webpage : http://karim.haddad.free.fr


Re: Moving a tie in a chord

2022-07-20 Thread Knute Snortum
On Wed, Jul 20, 2022 at 6:06 AM Thomas Morley  wrote:
> You could do
>
> \relative a,, {
>   \clef bass
>   \time 6/8
>
>   4.(~
>
>   \once \override TieColumn.tie-configuration = #'((-1 . 1)(-10 . -1))
>
>   q8  ) |
> }
>
> Also, see NR about TieColumn.tie-configuration

Thank you, Harm.  tie-configuration was what I was missing.

--
Knute Snortum



Undertie in lyrics to show no breath

2022-07-20 Thread mancunius
Hello. In the following example I want the undertie to be placed between the 2 
“O sacrum convivium” lines of lyrics, to indicate that no breath should be 
taken by the singers - as per the normal choral convention. (cf. the 
commented-out \breathe command in the music itself.) As it currently compiles, 
the undertie is placed beneath the word “O” of the second phrase. How do I 
adjust it so that it becomes a link between the 2 phrases, not part of one of 
them? (I’ve attached a screenshot of what I would like to achieve)

Thanks,

mancunius

\version "2.20.0"
\language "english"

global = 
{
\key d \major 
}

soprano=\relative c'{
r2 r4 fs
b4 b8 b d2 ~
d4 cs cs %\breathe
d ~
d8 cs b4 b as
b2. fs4
fs2 r2
}

sopranotext=\lyricmode{
O sa -- crum con -- ví -- vi -- um, \markup\undertie
O __ sa -- _ crum con -- ví -- vi -- um
}

\score {
{
\new Staff <<
\global
\new Voice="v1"
{
\clef "treble"
\soprano
}
\new Lyrics \lyricsto "v1" {\sopranotext}
>>
}
}



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Jean Abou Samra  writes:

> Le 20/07/2022 à 14:57, David Kastrup a écrit :
>> The rule was used for converting all the old stuff in the repo, so it
>> wasn't broken at one point of time.  This would suggest either a Python
>> update effect or some editing.  Or for some reason this particular input
>> escapes the pattern match.
>>
>> I'll try fixing that, too.
>
> It seems to work for
>
> \markup { \note ... }
>
> but not for
>
> \markup \note ...

Yup.  matchfullmarkup does not cover the undelimited case it would seem.
And it's tricky for the likes of

\markup \with-color #red \note #"4."

to figure out the scope of the markup.  There were some patterns/rules
that did so, I think maybe in relation to the \footnote markup.  Not
sure that can of worms is a good idea to open up, but possibly covering
the trivial case at least helps.

-- 
David Kastrup



Re: Moving a tie in a chord

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 02:17 Uhr schrieb Knute Snortum :
>
> I'm trying to adjust the Y position of a tie in a chord, but I'm
> having trouble.  What works for a single tie doesn't seem to work for
> a chord:
>
> %%%
> \version "2.22.2"
>
> moveTie = {
>   \once \override Tie.staff-position = -5
>   \once \override Tie.direction = #DOWN
> }
>
> \relative a,, {
>   \clef bass
>   \time 6/8
>   \moveTie a4.~ a4. |
>   <\single \moveTie a~ a'~>4.( q8  ) |
> }
> %%%
>
> In the snippet, I first test whether the overrides will work on a
> single tie, then try it in a chord.
>
> I saw that there is a layout object called TieColumn, but I couldn't
> figure out which property to use.  I tried a few (Y-offset, Y-extent,
> extra-offset) but the tie didn't move.
>
> Can anyone show me how to get the bottom tie of the first chord in the
> second measure to move up?
>
> --
> Knute Snortum
>

You could do

\relative a,, {
  \clef bass
  \time 6/8

  4.(~

  \once \override TieColumn.tie-configuration = #'((-1 . 1)(-10 . -1))

  q8  ) |
}

Also, see NR about TieColumn.tie-configuration

Cheers,
  Harm



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Thomas Morley  writes:

> Am Mi., 20. Juli 2022 um 14:29 Uhr schrieb David Kastrup :
>>
>> David Kastrup  writes:
>>
>> > Jean Abou Samra  writes:
>> >
>> >> Le 20/07/2022 à 05:57, David F. a écrit :
>> >>> In 2.23, the rest markup command changed from taking a string to taking 
>> >>> a duration.
>> >>>
>> >>> \version "2.22"
>> >>> \markup \rest #"4.."
>> >>>
>> >>> \version "2.23"
>> >>> \markup \rest { 4.. }
>> >>>
>> >>> It would be nice if this change were backward compatible, at least
>> >>> for a version or two.
>> >>
>> >>
>> >> LilyPond's general policy is that backwards-incompatible syntax
>> >> changes are OK as long as a convert-ly rule is provided to update
>> >> input files automatically.
>> >>
>> >> Well, in this case there is no convert-ly rule ... I'll fix that soon.
>> >
>> > I was "what?!?!?" about this but then the convert-ly rule I did was for
>> > \note in a quite earlier version.  It's probably reasonably easy to just
>> > copy and adapt that rule.
>>
>> I'll do that.
>
> Hi David,
>
> there was some off-list discussion already.
> Looks I forgot to do some convertrule with
> https://gitlab.com/lilypond/lilypond/-/merge_requests/627
>
> Though, c/p and adjust the rule for note-markup will probably not work.
> At least for me this rule looks broken:
>
> $ cat atest-116.ly
> \version "2.18.0" \markup \note #"4."
>
> $ ../../../lilypond-git/build/out/bin/convert-ly -e atest-116.ly
> convert-ly (GNU LilyPond) 2.23.11
>
> convert-ly: Processing `atest-116.ly'...
> Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
> 2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.39, 2.19.40, 2.19.46,
> 2.19.49, 2.20.0, 2.21.0, 2.21.2, 2.23.1, 2.23.2, 2.23.3, 2.23.4,
> 2.23.5, 2.23.6, 2.23.7, 2.23.8, 2.23.9, 2.23.10, 2.23.11
>
> $ cat atest-116.ly
> \version "2.23.11" \markup \note #"4."
>
> Cheers,
>   Harm
>

The rule was used for converting all the old stuff in the repo, so it
wasn't broken at one point of time.  This would suggest either a Python
update effect or some editing.  Or for some reason this particular input
escapes the pattern match.

I'll try fixing that, too.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread Jean Abou Samra




Le 20/07/2022 à 14:57, David Kastrup a écrit :

The rule was used for converting all the old stuff in the repo, so it
wasn't broken at one point of time.  This would suggest either a Python
update effect or some editing.  Or for some reason this particular input
escapes the pattern match.

I'll try fixing that, too.


It seems to work for

\markup { \note ... }

but not for

\markup \note ...





Re: Change to \rest markup in 2.23

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 14:29 Uhr schrieb David Kastrup :
>
> David Kastrup  writes:
>
> > Jean Abou Samra  writes:
> >
> >> Le 20/07/2022 à 05:57, David F. a écrit :
> >>> In 2.23, the rest markup command changed from taking a string to taking a 
> >>> duration.
> >>>
> >>> \version "2.22"
> >>> \markup \rest #"4.."
> >>>
> >>> \version "2.23"
> >>> \markup \rest { 4.. }
> >>>
> >>> It would be nice if this change were backward compatible, at least
> >>> for a version or two.
> >>
> >>
> >> LilyPond's general policy is that backwards-incompatible syntax
> >> changes are OK as long as a convert-ly rule is provided to update
> >> input files automatically.
> >>
> >> Well, in this case there is no convert-ly rule ... I'll fix that soon.
> >
> > I was "what?!?!?" about this but then the convert-ly rule I did was for
> > \note in a quite earlier version.  It's probably reasonably easy to just
> > copy and adapt that rule.
>
> I'll do that.
>
> --
> David Kastrup

Hi David,

there was some off-list discussion already.
Looks I forgot to do some convertrule with
https://gitlab.com/lilypond/lilypond/-/merge_requests/627

Though, c/p and adjust the rule for note-markup will probably not work.
At least for me this rule looks broken:

$ cat atest-116.ly
\version "2.18.0" \markup \note #"4."

$ ../../../lilypond-git/build/out/bin/convert-ly -e atest-116.ly
convert-ly (GNU LilyPond) 2.23.11

convert-ly: Processing `atest-116.ly'...
Applying conversion: 2.19.2, 2.19.7, 2.19.11, 2.19.16, 2.19.22,
2.19.24, 2.19.28, 2.19.29, 2.19.32, 2.19.39, 2.19.40, 2.19.46,
2.19.49, 2.20.0, 2.21.0, 2.21.2, 2.23.1, 2.23.2, 2.23.3, 2.23.4,
2.23.5, 2.23.6, 2.23.7, 2.23.8, 2.23.9, 2.23.10, 2.23.11

$ cat atest-116.ly
\version "2.23.11" \markup \note #"4."

Cheers,
  Harm



Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
David Kastrup  writes:

> Jean Abou Samra  writes:
>
>> Le 20/07/2022 à 05:57, David F. a écrit :
>>> In 2.23, the rest markup command changed from taking a string to taking a 
>>> duration.
>>>
>>> \version "2.22"
>>> \markup \rest #"4.."
>>>
>>> \version "2.23"
>>> \markup \rest { 4.. }
>>>
>>> It would be nice if this change were backward compatible, at least
>>> for a version or two.
>>
>>
>> LilyPond's general policy is that backwards-incompatible syntax
>> changes are OK as long as a convert-ly rule is provided to update
>> input files automatically.
>>
>> Well, in this case there is no convert-ly rule ... I'll fix that soon.
>
> I was "what?!?!?" about this but then the convert-ly rule I did was for
> \note in a quite earlier version.  It's probably reasonably easy to just
> copy and adapt that rule.

I'll do that.

-- 
David Kastrup



Re: Automatization

2022-07-20 Thread Vincent Gay

20 juil. 2022 11:29:09 Valentin Petzel :

> first of all you can achieve the same thing maybe slightly more transparently
> like this, which also allows for modification of the stencil:
Thank you all for these solutions. The one presented by Xavier suits me 
perfectly as I use different templates for my scores. But Valentin's can be 
very useful in a more general context.

Thanks again.


Re: Change to \rest markup in 2.23

2022-07-20 Thread David Kastrup
Jean Abou Samra  writes:

> Le 20/07/2022 à 05:57, David F. a écrit :
>> In 2.23, the rest markup command changed from taking a string to taking a 
>> duration.
>>
>> \version "2.22"
>> \markup \rest #"4.."
>>
>> \version "2.23"
>> \markup \rest { 4.. }
>>
>> It would be nice if this change were backward compatible, at least
>> for a version or two.
>
>
> LilyPond's general policy is that backwards-incompatible syntax
> changes are OK as long as a convert-ly rule is provided to update
> input files automatically.
>
> Well, in this case there is no convert-ly rule ... I'll fix that soon.

I was "what?!?!?" about this but then the convert-ly rule I did was for
\note in a quite earlier version.  It's probably reasonably easy to just
copy and adapt that rule.

-- 
David Kastrup



Re: Change to \rest markup in 2.23

2022-07-20 Thread Jean Abou Samra

Le 20/07/2022 à 05:57, David F. a écrit :

In 2.23, the rest markup command changed from taking a string to taking a 
duration.

\version "2.22"
\markup \rest #"4.."

\version "2.23"
\markup \rest { 4.. }

It would be nice if this change were backward compatible, at least for a 
version or two.



LilyPond's general policy is that backwards-incompatible syntax
changes are OK as long as a convert-ly rule is provided to update
input files automatically.

Well, in this case there is no convert-ly rule ... I'll fix that soon.



My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
environment I use for final “production” of scores.  But I’ve been trying to do 
as much development as possible in v2.23 on macOS 10.15.

Unfortunately, the change to the rest markup command makes going back and forth 
quite cumbersome.  Would be be possible to make this command take either a 
string or duration?



My answer will be a bit different from Harm's: this sounds like
an XY problem to me. Why do you want to switch back and forth
between two LilyPond versions for the same score? Just install
the same version on both machines. There is no problem with having
several different versions of LilyPond installed in parallel on
the same machine, and in Frescobaldi, you can even choose to
select the LilyPond version from the \version statement (the
setting is in Edit > Preferences > LilyPond Preferences),
making this very convenient.




Re: Change to \rest markup in 2.23

2022-07-20 Thread Thomas Morley
Am Mi., 20. Juli 2022 um 05:58 Uhr schrieb David F. :
>
> In 2.23, the rest markup command changed from taking a string to taking a 
> duration.
>
> \version "2.22"
> \markup \rest #"4.."
>
> \version "2.23"
> \markup \rest { 4.. }
>
> It would be nice if this change were backward compatible, at least for a 
> version or two.
>
> My primary Lilypond environment is v2.22.2-1 on macOS 10.14.  This is the 
> environment I use for final “production” of scores.  But I’ve been trying to 
> do as much development as possible in v2.23 on macOS 10.15.
>
> Unfortunately, the change to the rest markup command makes going back and 
> forth quite cumbersome.  Would be be possible to make this command take 
> either a string or duration?
>
> David F.
>
>

Well, going back and forth between 2.22.2 and new devel-version only
works if you don't use devel-features and don't hit internal changes.

That said, below a coding which makes \rest always take a duration,
transforming it to a string for 2.22.
Once you settled with 2.23. simply delete it.
Disclaimer: it's all a bit clumsy, cheeky and not tested in the wild.

\version "2.20.0"

#(begin
  (define default-make-rest-markup make-rest-markup)
  (define-markup-command (rest layout props duration) (ly:duration?)
(let ((version-arg
(if (stringstring duration
(interpret-markup layout props
  (default-make-rest-markup version-arg)

\markup \rest { 4.. }

Cheers,
  Harm



Re: openmusic

2022-07-20 Thread Andrew Bernard

There's this:

https://github.com/openmusic-project/omlily

I don't know if it is currently under development.


Andrew




Re: openmusic

2022-07-20 Thread Andrew Bernard

New to me. I read that it can make scores. What format does it use for this?

About the only way you would get output into lilypond is via Music XML. 
Does it support this?



On 20/07/2022 8:10 pm, Stefan Thomas wrote:

does anyone of You use openmusic in conjunction with lilypond?
I would like to know how to export a patch to lilypond. A small 
example or any hint would be very appreciated!






openmusic

2022-07-20 Thread Stefan Thomas
Dear community,
does anyone of You use openmusic in conjunction with lilypond?
I would like to know how to export a patch to lilypond. A small example or
any hint would be very appreciated!
Best,
Stefan


Re: Automatization

2022-07-20 Thread Valentin Petzel
Hello Vincent,

first of all you can achieve the same thing maybe slightly more transparently 
like this, which also allows for modification of the stencil:

#(define (white-under grob) (grob-interpret-markup grob
   (markup #:vcenter #:whiteout #:pad-x 1 (ly:grob-property grob 'text

inlineMMRNa = {
   \once \override MultiMeasureRest.layer = #-2
   \once \override MultiMeasureRestNumber.layer = #-1
   \once \override MultiMeasureRestNumber.Y-offset = #0
   \once \override MultiMeasureRestNumber.stencil = #white-under
}

inlineMMRNb = {
   \once \override MultiMeasureRest.layer = #-2
   \once \override MultiMeasureRestNumber.layer = #-1
   \once \override MultiMeasureRestNumber.Y-offset = #ly:self-alignment-
interface::y-aligned-on-self
   \once \override MultiMeasureRestNumber.self-alignment-Y = #CENTER
   \once \override MultiMeasureRestNumber.whiteout = #10
}

<<
\new Staff
{
  \compressEmptyMeasures
  \inlineMMRNa R1*12
  % overriding the MMNR stencil:
  \inlineMMRNa \once\override MultiMeasureRestNumber.stencil =
#(grob-transformer 'stencil (lambda (grob orig) (circle-stencil orig 0.2 
0.3)))
  R1*12
  % other way round
  \once\override MultiMeasureRestNumber.stencil =
#(grob-transformer 'stencil (lambda (grob orig) (circle-stencil orig 0.2 
0.3)))
  \inlineMMRNa R1*12
}
\new Staff
{
  \compressEmptyMeasures  \inlineMMRNb R1*12
  % overriding the MMNR stencil:
  \inlineMMRNb \once\override MultiMeasureRestNumber.stencil =
#(grob-transformer 'stencil (lambda (grob orig) (circle-stencil orig 0.2 
0.3)))
  R1*12
  % other way round
  \once\override MultiMeasureRestNumber.stencil =
#(grob-transformer 'stencil (lambda (grob orig) (circle-stencil orig 0.2 
0.3)))
  \inlineMMRNb R1*12
}
>>

To get this to work for all MultiMeasureRests, simply replace the \once by a 
\temporary and use \revert to get back to the original behaviour, like this:

inlineMMRNon = {
   \once \override MultiMeasureRest.layer = #-2
   \once \override MultiMeasureRestNumber.layer = #-1
   \once \override MultiMeasureRestNumber.Y-offset = #ly:self-alignment-
interface::y-aligned-on-self
   \once \override MultiMeasureRestNumber.self-alignment-Y = #CENTER
   \once \override MultiMeasureRestNumber.whiteout = #10
}

inlineMMRNoff = {
   \revert MultiMeasureRest.layer
   \revert MultiMeasureRestNumber.layer
   \revert MultiMeasureRestNumber.Y-offset
   \revert MultiMeasureRestNumber.self-alignment-Y
   \revert MultiMeasureRestNumber.whiteout
}


{
  \compressEmptyMeasures
  R1*12
  \inlineMMRNon
  R1*12
  R1*12
  \inlineMMRNoff
  R1*12
  \once\inlineMMRNon
  R1*12
  R1*12
}

Cheers,
Valentin

Am Mittwoch, 20. Juli 2022, 09:34:42 CEST schrieb Vincent Gay:
> Hello everyone,
> 
> I use the inlineMMRN function below whenever I think of it to display
> the number of bars of rests IN the staff. I find that it gains in
> readability when the scores are a bit heavy with textual indications.
> 
> 
> The problem is in the "every time I think of it". Is there by any chance
> a way to automate this without having to call the function every time?
> 
> Thanks in advance and have a nice day
> 
> 
> %
> #(define (white-under grob) (grob-interpret-markup grob
>(markup #:vcenter #:whiteout #:pad-x 1 (ly:grob-property grob 'text
> 
> inlineMMRN = {
>\once \override MultiMeasureRest.layer = #-2
>\once \override MultiMeasureRestNumber.layer = #-1
>\once \override MultiMeasureRestNumber.Y-offset = #0
>\once \override MultiMeasureRestNumber.stencil = #white-under
> }
> 
> 
> { \compressEmptyMeasures  \inlineMMRN R1*12  }



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


Re: debug scheme part working with Frescobaldi

2022-07-20 Thread Robin Bannister

Eef Weenink wrote:


I have several lines of scheme, somewhere is probably an syntax error.
The only message I get is form lilypond log:  there is an error in the line # 
begin etcetera.
(that is the first line of the scheme segment).
I want to zoom in, and see what specific problem there is, 


I think it is telling you that it doesn't like the  # begin

It is relying on you to realize that it should be  # (begin


Cheers,
Robin




Re: Automatization

2022-07-20 Thread Vincent Gay

Le 20/07/2022 à 09:40, Xavier Scheuer a écrit :

You can put the overrides (without \once) in your layout block.


It's so obvious once you tell me! Thanks Xavier.

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




Re: Automatization

2022-07-20 Thread Xavier Scheuer
On Wed, 20 Jul 2022 at 09:35, Vincent Gay  wrote:
>
> Hello everyone,
>
> I use the inlineMMRN function below whenever I think of it to display the
number of bars of rests IN the staff. I find that it gains in readability
when the scores are a bit heavy with textual indications.
>
>
> The problem is in the "every time I think of it". Is there by any chance
a way to automate this without having to call the function every time?
>
> Thanks in advance and have a nice day

Salut Vincent,

You can put the overrides (without \once) in your layout block.

\layout {
  \context {
\Voice
\override MultiMeasureRest.layer = #-2
\override MultiMeasureRestNumber.layer = #-1
\override MultiMeasureRestNumber.Y-offset = #0
\override MultiMeasureRestNumber.stencil = #white-under
  }
}

Cheers,
Xavier

-- 
Xavier Scheuer 


Automatization

2022-07-20 Thread Vincent Gay

Hello everyone,

I use the inlineMMRN function below whenever I think of it to display 
the number of bars of rests IN the staff. I find that it gains in 
readability when the scores are a bit heavy with textual indications.



The problem is in the "every time I think of it". Is there by any chance 
a way to automate this without having to call the function every time?


Thanks in advance and have a nice day


%
#(define (white-under grob) (grob-interpret-markup grob
  (markup #:vcenter #:whiteout #:pad-x 1 (ly:grob-property grob 'text

inlineMMRN = {
  \once \override MultiMeasureRest.layer = #-2
  \once \override MultiMeasureRestNumber.layer = #-1
  \once \override MultiMeasureRestNumber.Y-offset = #0
  \once \override MultiMeasureRestNumber.stencil = #white-under
}


{ \compressEmptyMeasures  \inlineMMRN R1*12  }

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


Re: debug scheme part working with Frescobaldi

2022-07-20 Thread Andrew Bernard
I don't know if this is helpful but debug print statements, the last 
resort of the desperate, are sometimes useful.


% simple debug print
#(define (dbg . args)
   "Simple debug console print."
   (cond
    ((not (null? args))
 (display (car args))
 (display " ")
 (apply dbg (cdr args)))
    (else (newline))
    )
   )

Andrew






Re: debug scheme part working with Frescobaldi

2022-07-20 Thread Jean Abou Samra




Le 20/07/2022 à 08:22, Eef Weenink a écrit :

I use 2.22 and arranger.ly  (from Giles Thibault)

My question is more general. (and maybe mostly related to Frescobaldi 
as an enviroment).

I have several lines of scheme, somewhere is probably an syntax error.
The only message I get is form lilypond log:  there is an error in the 
line # begin etcetera.

(that is the first line of the scheme segment).
I want to zoom in, and see what specific problem there is, so I need 
the log of scheme to know what is happening.


I will do some more reading and ask my question in the Frescobalid 
user group.




The Scheme log is not separate from the LilyPond log. Most likely, the
error message is there, but not right next to 'GUILE signaled ...'.
For example:


GNU LilyPond 2.22.2
Processing `-'
Parsing...
 First message is here:
-:3:2: error: GUILE signaled an error for the expression beginning here
#
 (+ 2 '())
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Converting to `-.pdf'...
 Actual error message here:
Wrong type: ()


Best,
Jean




Re: debug scheme part working with Frescobaldi

2022-07-20 Thread Eef Weenink
I use 2.22 and arranger.ly (from Giles Thibault)

My question is more general. (and maybe mostly related to Frescobaldi as an 
enviroment).
I have several lines of scheme, somewhere is probably an syntax error.
The only message I get is form lilypond log:  there is an error in the line # 
begin etcetera.
(that is the first line of the scheme segment).
I want to zoom in, and see what specific problem there is, so I need the log of 
scheme to know what is happening.

I will do some more reading and ask my question in the Frescobalid user group.

Eef





Which version do you use?
What's the exact error message?
Did you read the recent threads about that topic?
p.e. https://lists.gnu.org/archive/html/lilypond-user/2022-07/msg00048.html

Probably easiest to use 2.22.

Cheers,
 Harm


Op 19 jul. 2022, om 21:51 heeft Thomas Morley 
mailto:thomasmorle...@gmail.com>> het volgende 
geschreven:

Am Di., 19. Juli 2022 um 21:40 Uhr schrieb Eef Weenink 
mailto:h.e.ween...@de-erve.nl>>:

So I am start working with scheme parts in my liypond files (using 
arranger.ly). Using Frescobalid to input all
When compiling I keep getting messages:

GUILE signaleerde een fout voor de hier beginnende expressie

It would be nice to know what error I made. I read I should

\include "guile-debugger.ly"

so I did, but then the compiling process keeps running untill I break it the 
hard way.

How can I get a good result, the easy (best) way?

regards, Eef