lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A work-in-progress guide to extending LilyPond


From: Thomas Morley
Subject: Re: A work-in-progress guide to extending LilyPond
Date: Sat, 10 Apr 2021 19:16:52 +0200

Am Sa., 10. Apr. 2021 um 17:55 Uhr schrieb Thomas Morley
<thomasmorley65@gmail.com>:
> I'll  check for your recent changes soon.

Apart from a nit (below) all looks great now.

You did not extend section "Introduction to extending - Printing
values" with other printing procedures.
Mentioned are `display' and `write' from scheme and `ly:message'. In a
later section `displayMusic' and `display-scheme-music'.

Nowadays it's very rare I use `display', `write' or `ly:message',
because all of them don't print (a)lists in a readable structered
format, although my codings always proceed with lots and lots of
printed data.
I nearly always use `pretty-print' and for music-expressions
`display-scheme-music'

I'd like to suggest to mention `pretty-print', at least for printing lists. See:
{
  \override Slur.after-line-breaking =
    #(lambda (grob)
      (let ((cps (ly:grob-property grob 'control-points)))
        (display-scheme-music cps)
        (pretty-print cps)
        (ly:message "~a" cps)
        ))
  b'1( b'')
}
->
(list (cons 0.732364943841144 1.195004)
      (cons 1.76258769418946 3.05939544438528)
      (cons 6.83883925432087 5.14594080151585)
      (cons 8.88241194297576 4.545004))

((0.732364943841144 . 1.195004)
 (1.76258769418946 . 3.05939544438528)
 (6.83883925432087 . 5.14594080151585)
 (8.88241194297576 . 4.545004))

((0.732364943841144 . 1.195004) (1.76258769418946 . 3.05939544438528)
(6.83883925432087 . 5.14594080151585) (8.88241194297576 . 4.545004))

A pity that ly:message does not accept the ~y-formatter.
So far the link to the guile manual about format-options may lead wrongly.
Btw, you link to guile-3.0.5 ...

Many thanks again,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]