Re: lilypond-user Digest, Vol 239, Issue 85

2022-10-29 Thread Jean Abou Samra




Le 29/10/2022 à 21:15, Jean Abou Samra a écrit :

What is your OS?



You said that. Sorry.



Re: Parenthesize multiple notes

2022-10-29 Thread Jean Abou Samra




Le 29/10/2022 à 22:42, Edizioni Migliori a écrit :

Hello,

How can I parenthesize multiple notes? In the example below, I am 
trying to enclose the two grace notes in one set of brackets.


\version "2.23.10"
\language "english"
\relative {
\afterGrace b'2\trill { a16 b } c2
}




Have a look at this:

https://lists.gnu.org/archive/html/lilypond-user/2022-10/msg00182.html

Best,
Jean




MetronomeMark in line with sectionLabel

2022-10-29 Thread Edizioni Migliori
Is it possible to make a MetronomeMark (tempo indication) appear
immediately to the right of a \sectionLabel, ideally also
vertically-aligned? The only way I have found so far is by overriding
X-offset, which seems convoluted. See example below:

\version "2.23.80"
\language "english"
{ \sectionLabel \markup \bold \smallCaps "Gigue"
%\override Score.MetronomeMark.X-offset = #9
\tempo 4 = 100
\repeat unfold 8 c'' }

Thanks,

Ahanu Banerjee
Publisher
Edizioni Migliori, LLC 


Parenthesize multiple notes

2022-10-29 Thread Edizioni Migliori
Hello,

How can I parenthesize multiple notes? In the example below, I am trying to
enclose the two grace notes in one set of brackets.

\version "2.23.10"
\language "english"
\relative {
\afterGrace b'2\trill { a16 b } c2
}

Thanks,

Ahanu Banerjee
Publisher
Edizioni Migliori, LLC 


Re: lilypond-user Digest, Vol 239, Issue 85

2022-10-29 Thread Jean Abou Samra

Le 29/10/2022 à 13:06, Tristan Latchford a écrit :
Invoking `gs -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH -dEPSCrop 
-dAutoRotatePages=/None -dPrinted=false 
/var/folders/29/4w1k0cl94mngf7t5hbc7ht2rgn/T//lilypond-tmp-3582639'...


GPL Ghostscript 9.55.0: Can't find initialization file gs_init.ps.




This sounds like a problem with your setup. What is your OS? How did you 
install LilyPond?


Can you try LilyPond 2.23.80 (the current development version)? It is 
normally more robust with relocations and such.


Best,
Jean




Re: Omitting the destination on a call to format is deprecated. Pass #f as the destination, before the format string.

2022-10-29 Thread Jean Abou Samra

Hi Valentin,

Le 29/10/2022 à 00:42, Valentin Petzel a écrit :

Lilypond with Guile 1.8 used a less capable version of the format command that
did not feature a destination argument (the default simple-format of Guile).
With Guile 2  Lilypond uses the full, powerful ice9 format (as can be seen
using #(display format)).

ice9 format takes a destination argument as first argument. This one can be any
output port, #t for the current output port (i.e. you print the result) or #f
to return the result.



Not sure what makes you think that?

Test input:

\version "2.22.2"

#(ly:message "~s ~s ~s"
 format
 simple-format
 (@ (ice-9 format) format))


2.22 output:

# # 
#



2.23.80 output:


#format-string . args) | (deprecated-format-string-only)> #simple-format (_ _ . _)> #ice-9/format.scm:1609:9 (destination format-string . args) | 
(deprecated-format-string-only)>




As you can see, the format procedure loaded by default in LilyPond

files is always the one from (ice-9 format).



As far as I can see, simple-format has always required a boolean or port

as first argument. As for (@ (ice-9 format) format), its first boolean

or port argument is optional in Guile 1, optional with a deprecation

warning in Guile 2, and required in Guile 3.


Best,

Jean





Re: Problems with pdf output using Lilypond Version 2.20.0

2022-10-29 Thread Jacques Menu
Hello Ian,

You’re far better off moving to LilyPond 2.23.80 at once.

Here is how I installed it on my Mac Mini M1 some days ago.

HTH!

JM

—

LilyPond devel from MacPorts for Apple silicon

If not yet done, download MacPorts for your MacOS version from 
https://github.com/macports/macports-base/releases/tag/v2.8.0 and install it.

Check wether LilyPond devel is already installed:

jacquesmenu@macmini:/opt/local/bin > port installed lilypond-devel
The following ports are currently installed:
  lilypond-devel @2.23.13_0 (active)

If LilyPond devel is lready installed, uninstall it:

jacquesmenu@macmini:/opt/local/bin > sudo port uninstall lilypond-devel
--->  Deactivating lilypond-devel @2.23.13_0
--->  Cleaning lilypond-devel
--->  Uninstalling lilypond-devel @2.23.13_0
--->  Cleaning lilypond-devel

Install lilypond-devel:

jacquesmenu@macmini:/opt/local/bin > sudo port install lilypond-devel 
Warning: The macOS 13 SDK does not appear to be installed. Ports may not build 
correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by 
running `xcode-select --install'.
Warning: If already installed, update with Software Update, or manually: 

Warning: The macOS 13 SDK does not appear to be installed. Ports may not build 
correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by 
running `xcode-select --install'.
Warning: If already installed, update with Software Update, or manually: 

--->  Computing dependencies for libatomic_ops
--->  Fetching archive for libatomic_ops
--->  Attempting to fetch libatomic_ops-7.6.14_0.darwin_22.arm64.tbz2 from 
https://packages.macports.org/libatomic_ops
--->  Attempting to fetch libatomic_ops-7.6.14_0.darwin_22.arm64.tbz2 from 
https://nue.de.packages.macports.org/libatomic_ops
--->  Attempting to fetch libatomic_ops-7.6.14_0.darwin_22.arm64.tbz2 from 
https://fra.de.packages.macports.org/libatomic_ops
… … … …

Check that lilypond runs fine:

jacquesmenu@macmini:~ > /opt/local/bin/lilypond --version
GNU LilyPond 2.23.80 (running Guile 2.2)

Copyright (c) 1996--2022 by
  Han-Wen Nienhuys 
  Jan Nieuwenhuizen 
  and others.

This program is free software.  It is covered by the GNU General Public
License and you are welcome to change it and/or distribute copies of it
under certain conditions.  Invoke as `lilypond --warranty' for more
information.




Problems with pdf output using Lilypond Version 2.20.0

2022-10-29 Thread Ian West
Dear Colleagues,
I have greatly enjoyed using Lilypond on Apple laptops for many years; 
first Lilypond 2.12.3 on a 2008 Apple Mac., then Lilypond 2.18.2. on Apple Mac 
2008 and Apple MacPro 2012. Finally I bought AppleMacPro M2,2022 running 
Monterey 12.4.
I understood that the 64-bit M2 chip required a later version of 
Lilypond and on 12 August 2022 I downloaded Lilypond Version 2.20.0 (Build from 
11-03-2020 16:32). After a few initial problems (I think having to change the 
default ' or " marks.) I used it successfully, following a manual 2.22.2.
I was urged to use Frescobaldi to enter the text, and I got as far as 
downloading MacPorts-2.7.2-12-Monterey. But [a] I like entering text with the 
straightforward text editor as I have been doing for 10 years, and [b] I do not 
want to bother with MacPorts, Frescobaldi, Ghostscript or any command line 
entry. I do not think I have any use for Lilypond if I cannot go on as before; 
at 80 I am too old to change. 
Fortunately, I have, back at home the old white 2008 Apple MacBook 
running Lilypond 2.12.3. But I am in Mexico for 3 months with the AppleMacPro 
M2,2022. I wish I could edit my library of tunes, but it now jams at the end of 
compiling and there is no pdf, but a rotating wheel; and, occasionally the 
'log' message:
" Processing 
`/Users/ianwest/Documents/Music/LilyPond/PianoViVaVC/GrünewaldViVa/Grünewald2.ly'
Parsing...
Interpreting music...[8][16][24][32][40][48][56][64][72]
Preprocessing graphical objects...
Interpreting music...
MIDI output to `Grünewald2.midi'...
Finding the ideal number of pages...
Fitting music on 1 or 2 pages...
Drawing systems...
Layout output to 
`/var/folders/hc/zvm7xyqn22n2xwbvxhpz_vr4gn/T//lilypond-GPJrDg'...
Converting to `Grünewald2.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 
-dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite 
-dAutoRotatePages=/None -dPrinted=false -sOutputFile=Grünewald2.pdf 
-c.setpdfwrite 
-f/var/folders/hc/zvm7xyqn22n2xwbvxhpz_vr4gn/T//lilypond-GPJrDg)' failed 
(256)"

I suspect it is a late stage and trivial problem of writing the pdf. Perhaps 
installing Adobe (or another pdf writer) would cure this. Has anyone any ideas.

Ian
---
Ian West
9 Thenford Road, Middleton Cheney,
BANBURY, OX17 2NB,
Tel: 01295 713 889; (Mobile: 07474 572 588)
==



Re: Omitting the destination on a call to format is deprecated. Pass #f as the destination, before the format string.

2022-10-29 Thread Federico Bruni
Il giorno sab 29 ott 2022 alle 00:42:11 +0200, Valentin Petzel 
 ha scritto:
If we omit this destination argument format will handle it as #f but 
pass this

warning.

Now these messages you get should either come from
A) The score itself using format
B) The score using a function that uses format

I’ve grepped through the current git master sources and all 
occurances of
format do specify a port. This means that most likely you are using 
some
custom scheme functions or libraries that use format. To fix these 
warnings
replace all occurrances of (format string ...) by (format #f string 
...) in

such files.


Thanks for the detailed explanation!
Here's the culprit:

diff --git a/ly/myStyle.ly b/ly/myStyle.ly
index af18062..2defb00 100644
--- a/ly/myStyle.ly
+++ b/ly/myStyle.ly
@@ -14,7 +14,7 @@ A=\rightHandFinger #4
tenutoFingeringMark = \markup { \text \fontsize #2 \bold "t" }

t = #(define-event-function (n) (index?)
- #{ \finger \markup \concat { #(format "~d" n) \tenutoFingeringMark } 
#})
+ #{ \finger \markup \concat { #(format #f "~d" n) \tenutoFingeringMark 
} #})







Re: Tremolo

2022-10-29 Thread Jean Abou Samra

Le 29/10/2022 à 13:53, Craig Bakalian a écrit :

Hi Everybody,

Well, duh, I just put \stemDown before the tremolo code and 
\stemNeutral after the code and the warnings vanished.  Yet, this 
makes no music sense because the music is in 4/2 and a stem is not 
needed in the pdf of the music.  Whatever?




LilyPond uses stems on all notes, although on some notes they
are invisible. In this case, LilyPond tries (but fails) to
use those invisible stems to place the tremolo beam properly.

Actually, even rests (but not multi-measure rests) internally
have stems.

Best,
Jean




Re: Tremolo

2022-10-29 Thread Jean Abou Samra

Le 29/10/2022 à 12:52, Craig Bakalian a écrit :


Hi Everybody!

Below is code I pulled from a larger score to show output warnings for 
a tremolo. I have never had much success with the tremolo interface 
because I am a lazy composer who spent 2 months writing the score, and 
typesetting to make it all pretty for the performers is just too much, 
lol. So, I hand them a score with tremolos that don't slant or angle 
properly. I'm sure someone on this list will tell me how to be more 
precise with tremolos in lilypond :).






Unfortunately, tremolos are an area of LilyPond that is known
not to be very polished — in particular, tremolos on whole notes
look ugly, as you found out. You didn't do anything wrong, LilyPond
is just not capable of typesetting this well automatically right
now. See

https://gitlab.com/lilypond/lilypond/-/issues/1444

Meanwhile, you can place them manually by replacing something
like

\version "2.23.80"

\repeat tremolo 8 {
  bes'16 bes''
}


with

\version "2.23.80"

\repeat tremolo 8 {
  \stemDown
  \override Beam.positions = #'(-2 . 0)
  bes'16 bes''
  \stemNeutral
}


Best,
Jean




Re: Tremolo

2022-10-29 Thread Craig Bakalian

Hi Everybody,

Well, duh, I just put \stemDown before the tremolo code and \stemNeutral 
after the code and the warnings vanished.  Yet, this makes no music 
sense because the music is in 4/2 and a stem is not needed in the pdf of 
the music.  Whatever?


Craig




Re: Passing a parameter to Scheme

2022-10-29 Thread Thomas Morley
Am Sa., 29. Okt. 2022 um 12:32 Uhr schrieb Paul Hodges :
>
> On further thought, I suspect that I can't aim at "\speak #-3.8 c" because 
> #-3.8 isn't a music expression so LilyPond won't let me.  I guess I'll need 
> to use a \tweak or \set on the parameter variable instead.  But that leaves 
> me even further from knowing how to write it, largely because my brain's 
> model of computing (honed over 55 years) is entirely based on procedural 
> languages with nested scopes (Algol, C) or Assembly language with everything 
> global.  I simply don't know how scopes and namespaces work in Scheme, and 
> thus how to define that parameter in a way that I can access it to tweak.
>
> Paul
>
>
> From: Paul Hodges 
> To: lilypond-user 
> Sent: 29/10/2022 10:50
> Subject: Passing a parameter to Scheme
>
> I am trying to make my first steps in actually modifying some Scheme.  I am 
> using a procedure taken from the snippets repository to add a cross to a stem 
> (e.g. to indicate sprechgesang):
>
> %%
> speak = {
>   \once \override Stem.stencil =
> #(lambda (grob)
>(let* ((x-parent (ly:grob-parent grob X))
>   (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
>  (if is-rest?
>  empty-stencil
>  (ly:stencil-combine-at-edge
>   (ly:stem::print grob)
>   Y
>   (- (ly:grob-property grob 'direction))
>   (grob-interpret-markup grob
>  (markup #:center-align #:fontsize -2
>  #:musicglyph 
> "noteheads.s2cross"))
>   -2.3
> }
> %%
>
> This works fine, writing "\speak c4" for instance.
>
> However, I'd like to be able to parameterise the position of the cross which 
> is hard-coded as -2.3, so that I can write "\speak #-3.8 c" for instance.  
> I've tried a couple of ways to write it, but I can't find one that works.  I 
> suppose that I will need something like "lambda (grob posn)" to define the 
> parameter for use at the end, but I can't see how to get the value of posn 
> from the LilyPond source into the Scheme procedure.
>
> Help?
>
> Thanks,
> Paul

Hi Paul,

please always give the link to the LSR snippet:
https://lsr.di.unimi.it/LSR/Item?id=374
and some example code of your use case.

That said...

I'd always use `grob-transformer', if the original value of a grob is
taken and modified (here Stem.stencil with (ly:stem::print grob)).
This procedure was not available back when the snippet was coded, though.
Making for:

\version "2.23.14"

speakOff = \revert Stem.stencil

speakOnI =
  \override Stem.stencil =
#(grob-transformer 'stencil
  (lambda (grob orig)
 (let* ((x-parent (ly:grob-parent grob X))
(is-rest? (ly:grob-object x-parent 'rest #f)))
   (if is-rest?
   orig
   (ly:stencil-combine-at-edge
orig
Y
(- (ly:grob-property grob 'direction))
(grob-interpret-markup
  grob
  (markup #:center-align #:fontsize -2
  #:musicglyph "noteheads.s2cross"))
-2.3)

\score {
  \new Staff {
\relative c'' {
  a8 b a c
  \speakOnI
  g f r g
  b r d e
  \speakOff
  c a g f
}
  }
}

This does not solve your question, but we can start from it.

(1) Most common would be to code a music-function.
I think it's explained in the Extending Manual.
Making for:

speakOff = \revert Stem.stencil

speakOnII =
#(define-music-function (y-pad)(number?)
#{
  \override Stem.stencil =
#(grob-transformer 'stencil
  (lambda (grob orig)
 (let* ((x-parent (ly:grob-parent grob X))
(is-rest? (ly:grob-object x-parent 'rest #f))) ;; no
need to chaeck for  ly:grob?
   (if is-rest?
   orig
   (ly:stencil-combine-at-edge
orig
Y
(- (ly:grob-property grob 'direction))
(grob-interpret-markup
  grob
  (markup #:center-align #:fontsize -2
  #:musicglyph "noteheads.s2cross"))
y-pad)
#})

\score {
  \new Staff {
\relative c'' {
  a8 b a c
  \speakOnII #-2.3
  g f r g
  b r d e
  \speakOff
  c a g f
}
  }
}

(2) Read a custom details,sub-property:

speakOff = \revert Stem.stencil

speakOnIII =
  \override Stem.stencil =
#(grob-transformer 'stencil
  (lambda (grob orig)
 (let* ((x-parent (ly:grob-parent grob X))
(is-rest? (ly:grob-object x-parent 'rest #f)))
   (if is-rest?
   orig
   (let* ((details (ly:grob-property grob 'details))
  (my-y-move (assoc-get 'my-y-move details -2.3)))
 (ly:stencil-combine-at-edge
 

Re: Passing a parameter to Scheme

2022-10-29 Thread Aaron Hill

On 2022-10-29 2:50 am, Paul Hodges wrote:

%%

speak = {
  \once \override Stem.stencil =
    #(lambda (grob)
       (let* ((x-parent (ly:grob-parent grob X))
              (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
         (if is-rest?
             empty-stencil
             (ly:stencil-combine-at-edge
              (ly:stem::print grob)
              Y
              (- (ly:grob-property grob 'direction))
              (grob-interpret-markup grob
                                     (markup #:center-align #:fontsize 
-2
                                             #:musicglyph 
"noteheads.s2cross"))

              -2.3
}
%%

This works fine, writing "\speak c4" for instance.

However, I'd like to be able to parameterise the position of the cross 
which is hard-coded as -2.3, so that I can write "\speak #-3.8 c" for 
instance.  I've tried a couple of ways to write it, but I can't find 
one that works.  I suppose that I will need something like "lambda 
(grob posn)" to define the parameter for use at the end, but I can't 
see how to get the value of posn from the LilyPond source into the 
Scheme procedure.


Review the documentation on defining and using music functions:

[1]: 
https://lilypond.org/doc/v2.23/Documentation/extending/music-functions


You could end up with something like this:


speak =
#(define-music-function
  (position)
  (number?)

  (define (stencil-proc grob)
   (let* ((x-parent (ly:grob-parent grob X))
  (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
(if is-rest?
 empty-stencil
 (ly:stencil-combine-at-edge
  (ly:stem::print grob)
  Y
  (- (ly:grob-property grob 'direction))
  (grob-interpret-markup grob
   (markup #:center-align #:fontsize -2
   #:musicglyph "noteheads.s2cross"))
  (- position)

  #{ \once \override Stem.stencil = #stencil-proc #})

{
  \speak 1.6 g'4
  \speak 2.2 b'8 8
  \speak 2.8 a'2
}



-- Aaron Hill



Re: lilypond-user Digest, Vol 239, Issue 85

2022-10-29 Thread Tristan Latchford

Dear Jean,

Thank you for getting back to me so soon. I've tried a) and b) is 
working well, so here is c)


I'm running macOS 12.5.1

~~

lilypond-book: Setting LilyPond's output to --verbose, implied by 
lilypond-book's setting

lilypond-book (GNU LilyPond) 2.22.2
Reading 
`/Users/tallatchford/Downloads/representing-enlightenment-in-music.html'

Dissecting...
Writing snippets...
Processing...
Invoking `/usr/local/bin/lilypond --formats=ps,png -dbackend=eps -I  
"./"  -I  "../" --verbose -deps-box-padding=3.00 -dread-file-list 
-dno-strip-output-dir 
"/Users/tallatchford/Downloads/output/snippet-names-32ce5668a834f920e6fded46862009fa.ly"'

Log level set to 287
GNU LilyPond 2.22.2 (running Guile 2.2)

Relocation
  LilyPond binary has absolute file name:
/usr/local/Cellar/lilypond/2.22.2_1/libexec/lilypond
  Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.22.2_1'
  Using run-time value for datadir,
setting it to 
'/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2'

  Using run-time value for localedir,
setting it to '/usr/local/Cellar/lilypond/2.22.2_1/share/locale'
  Using compile-time value for relocdir,
setting it to ''
  Prepending '/usr/local/Cellar/lilypond/2.22.2_1/libexec' to PATH
  Setting PATH to 
'/usr/local/Cellar/lilypond/2.22.2_1/libexec:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin'

Setting GUILE_AUTO_COMPILE to '0'
Setting GUILE_WARN_DEPRECATED to 'detailed'
Setting XDG_CACHE_HOME to 
'/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2'

Setting GC_INITIAL_HEAP_SIZE to '40M'
Setting GC_NPROCS to '1'
Setting GC_FREE_SPACE_DIVISOR to '1'


Effective prefix: 
'/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2'

PATH="/usr/local/Cellar/lilypond/2.22.2_1/libexec:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin"

[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/lily.scm]
Using (ice-9 curried-definitions) module
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/lily-library.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/output-lib.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/markup-macros.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/parser-ly-from-scheme.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/file-cache.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-event-classes.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-music-callbacks.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-music-types.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-note-names.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/c++.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/chord-entry.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/skyline.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/markup.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-markup-commands.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/stencil.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/modal-transforms.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/chord-ignatzek-names.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/music-functions.scm
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-music-display-methods.scm]
]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/part-combiner.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/autochange.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-music-properties.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/time-signature.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/time-signature-settings.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/auto-beam.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/chord-name.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/bezier-tools.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/define-context-properties.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/translation-functions.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/script.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/midi.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/layout-beam.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/parser-clef.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/layout-slur.scm]
[/usr/local/Cellar/lilypond/2.22.2_1/share/lilypond/2.22.2/scm/font.scm]

Tremolo

2022-10-29 Thread Craig Bakalian

Hi Everybody!

Below is code I pulled from a larger score to show output warnings for a 
tremolo. I have never had much success with the tremolo interface 
because I am a lazy composer who spent 2 months writing the score, and 
typesetting to make it all pretty for the performers is just too much, 
lol. So, I hand them a score with tremolos that don't slant or angle 
properly. I'm sure someone on this list will tell me how to be more 
precise with tremolos in lilypond :).


here is the code snippet:

\version "2.23.14" \score {   \new Staff   {     \time 4/2     \key bes 
\major     \repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 { bes'16 
bes''} |     \repeat tremolo 8 { bes'16 bes''} es''16[ d'' a' bes'] 
bes''[ a'' d'' es''] es'''[ d''' a'' bes''] a'''4 \fermata  |   } }


The warnings:

Starting lilypond 2.23.14 [Untitled.ly]...

Processing `/home/craig/Desktop/Nonet/Untitled.ly'

Parsing...

Interpreting music...

Preprocessing graphical objects...

/home/craig/Desktop/Nonet/Untitled.ly:12:32: programming error: cyclic 
dependency: calculation-in-progress encountered for Stem.direction


\repeat tremolo 8 { bes'16

bes''} es''16[ d'' a' bes'] bes''[ a'' d'' es''] es'''[ d''' a'' bes''] 
a'''4 \fermata |


/home/craig/Desktop/Nonet/Untitled.ly:12:32: continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:12:32: warning: direction of grob 
Stem must be UP or DOWN; using UP


\repeat tremolo 8 { bes'16

bes''} es''16[ d'' a' bes'] bes''[ a'' d'' es''] es'''[ d''' a'' bes''] 
a'''4 \fermata |


/home/craig/Desktop/Nonet/Untitled.ly:11:66: programming error: cyclic 
dependency: calculation-in-progress encountered for Stem.direction


\repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 { bes'16

bes''} |

/home/craig/Desktop/Nonet/Untitled.ly:11:66: continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:11:66: warning: direction of grob 
Stem must be UP or DOWN; using UP


\repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 { bes'16

bes''} |

/home/craig/Desktop/Nonet/Untitled.ly:11:59: programming error: cyclic 
dependency: calculation-in-progress encountered for Stem.direction


\repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 {

bes'16 bes''} |

/home/craig/Desktop/Nonet/Untitled.ly:11:59: continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:11:59: warning: direction of grob 
Stem must be UP or DOWN; using UP


\repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 {

bes'16 bes''} |

/home/craig/Desktop/Nonet/Untitled.ly:12:25: programming error: cyclic 
dependency: calculation-in-progress encountered for Stem.direction


\repeat tremolo 8 {

bes'16 bes''} es''16[ d'' a' bes'] bes''[ a'' d'' es''] es'''[ d''' a'' 
bes''] a'''4 \fermata |


/home/craig/Desktop/Nonet/Untitled.ly:12:25: continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:12:25: warning: direction of grob 
Stem must be UP or DOWN; using UP


\repeat tremolo 8 {

bes'16 bes''} es''16[ d'' a' bes'] bes''[ a'' d'' es''] es'''[ d''' a'' 
bes''] a'''4 \fermata |


Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

programming error: The beam should have a direction by now.

continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:11:66: warning: weird stem size, 
check for narrow beams


\repeat tremolo 8 { aes'16 aes''} \repeat tremolo 8 { bes'16

bes''} |

programming error: The beam should have a direction by now.

continuing, cross fingers

/home/craig/Desktop/Nonet/Untitled.ly:12:32: warning: weird stem size, 
check for narrow beams


\repeat tremolo 8 { bes'16

bes''} es''16[ d'' a' bes'] bes''[ a'' d'' es''] es'''[ d''' a'' bes''] 
a'''4 \fermata |


Converting to `Untitled.pdf'...

Success: compilation successfully completed

Completed successfully in 1.0".


Re: Passing a parameter to Scheme

2022-10-29 Thread Paul Hodges
On further thought, I suspect that I can't aim at "\speak #-3.8 c" because 
#-3.8 isn't a music expression so LilyPond won't let me.  I guess I'll need to 
use a \tweak or \set on the parameter variable instead.  But that leaves me 
even further from knowing how to write it, largely because my brain's model of 
computing (honed over 55 years) is entirely based on procedural languages with 
nested scopes (Algol, C) or Assembly language with everything global.  I simply 
don't know how scopes and namespaces work in Scheme, and thus how to define 
that parameter in a way that I can access it to tweak.


Paul



 From:   Paul Hodges  
 To:   lilypond-user  
 Sent:   29/10/2022 10:50 
 Subject:   Passing a parameter to Scheme 

I am trying to make my first steps in actually modifying some Scheme.  I am 
using a procedure taken from the snippets repository to add a cross to a stem 
(e.g. to indicate sprechgesang):


%%

speak = {
  \once \override Stem.stencil =
    #(lambda (grob)
       (let* ((x-parent (ly:grob-parent grob X))
              (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
         (if is-rest?
             empty-stencil
             (ly:stencil-combine-at-edge
              (ly:stem::print grob)
              Y
              (- (ly:grob-property grob 'direction))
              (grob-interpret-markup grob
                                     (markup #:center-align #:fontsize -2
                                             #:musicglyph "noteheads.s2cross"))
              -2.3
}
%%


This works fine, writing "\speak c4" for instance.


However, I'd like to be able to parameterise the position of the cross which is 
hard-coded as -2.3, so that I can write "\speak #-3.8 c" for instance.  I've 
tried a couple of ways to write it, but I can't find one that works.  I suppose 
that I will need something like "lambda (grob posn)" to define the parameter 
for use at the end, but I can't see how to get the value of posn from the 
LilyPond source into the Scheme procedure.


Help?


Thanks,
Paul

Passing a parameter to Scheme

2022-10-29 Thread Paul Hodges
I am trying to make my first steps in actually modifying some Scheme.  I am 
using a procedure taken from the snippets repository to add a cross to a stem 
(e.g. to indicate sprechgesang):


%%

speak = {
  \once \override Stem.stencil =
    #(lambda (grob)
       (let* ((x-parent (ly:grob-parent grob X))
              (is-rest? (ly:grob? (ly:grob-object x-parent 'rest
         (if is-rest?
             empty-stencil
             (ly:stencil-combine-at-edge
              (ly:stem::print grob)
              Y
              (- (ly:grob-property grob 'direction))
              (grob-interpret-markup grob
                                     (markup #:center-align #:fontsize -2
                                             #:musicglyph "noteheads.s2cross"))
              -2.3
}
%%


This works fine, writing "\speak c4" for instance.


However, I'd like to be able to parameterise the position of the cross which is 
hard-coded as -2.3, so that I can write "\speak #-3.8 c" for instance.  I've 
tried a couple of ways to write it, but I can't find one that works.  I suppose 
that I will need something like "lambda (grob posn)" to define the parameter 
for use at the end, but I can't see how to get the value of posn from the 
LilyPond source into the Scheme procedure.


Help?


Thanks,
Paul