Re: layout problem - new issue

2024-05-14 Thread Archer Endrich
Thank you, Jean.  Of course!  The broader issue for me is that I hadn't 
grasped that it was actually a << {...} \\ {...} >> construction in the 
newer, simpler format.


I'm so grateful for your help.  I was going around in circles, knowing 
that the solution had to be something straightforward.


Thanks again,
Archer

On 14/05/2024 16:44, Jean Abou Samra wrote:

I've tried placing the new bar in 3 different places on the treble
staff.  In the current pdf, the first 2 are commented out and the third
-- which I expected to work -- is active: placement after the >>.
Somehow a spurious bar is inserted, but I don't know where it's coming from.

You have

 <<
   { R1 | [...] \bar "!" }
 
   \new Staff \with { alignAboveContext="RH" } { \chimes }
 
 >>

 es'4\mp es'4. es'8

but the \chimes takes one measure more than the { R1 | [...] \bar "!" }.
The duration of the << >> expression is the max of the two. Basically,
<< >> waits before *all* subexpressions are exhausted before yielding
back control.

You should simply move the line es'4\mp es'4. es'8 into the { R1 ... }.

Best,
Jean





Re: layout problem - new issue

2024-05-14 Thread Jean Abou Samra

> I've tried placing the new bar in 3 different places on the treble 
> staff.  In the current pdf, the first 2 are commented out and the third 
> -- which I expected to work -- is active: placement after the >>.  
> Somehow a spurious bar is inserted, but I don't know where it's coming from.

You have

<<
  { R1 | [...] \bar "!" }

  \new Staff \with { alignAboveContext="RH" } { \chimes }

>>
es'4\mp es'4. es'8

but the \chimes takes one measure more than the { R1 | [...] \bar "!" }.
The duration of the << >> expression is the max of the two. Basically,
<< >> waits before *all* subexpressions are exhausted before yielding
back control.

You should simply move the line es'4\mp es'4. es'8 into the { R1 ... }.

Best,
Jean



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


New LSR snippet 1187 "New pitch language"

2024-05-01 Thread Thomas Morley
To the author of the new LSR snippet 1187 "New pitch language"
https://lsr.di.unimi.it/LSR/Item?u=1=1187

You add your new language to "nederlands", thus
\language "alpha"
returns a warning:
warning: Could not find language `alpha'.  Ignoring.
Please fix or delete that line.

Furthermore, I think we should not advice how to change an internal
Frescobaldi-file in such a snippet.
But that's only me. Others?

Cheers,
  Harm



Re: Organ pedal marks in various styles, including pedal glides: new snippet 1184

2024-04-09 Thread Fernando Gil
This is extremely helpful, thank you so much!

El mar, 9 abr 2024 a las 6:40, Rudolf Cardinal ()
escribió:

> Dear Lilypond users with an interest in organ music,
>
> Lilypond's standard commands for organ pedal marks are: \lheel, \ltoe,
> \rheel, \rtoe. However, there are several recognized ways of displaying
> pedal marks visually. I struggled a little to get Lilypond's organ pedal
> marks into a style that I was most familiar with. I note previous
> discussion about this and related issues at e.g.
>
>-
>https://lists.gnu.org/archive/html/lilypond-user/2010-12/msg00387.html,
>re: organ pedalboard fingerings;
>-
>https://lists.gnu.org/archive/html/lilypond-user/2007-12/msg00333.html,
>organ pedal marks and substitution;
>-
>https://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00683.html,
>organ pedal foot substitution;
>-
>https://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00713.html,
>globally change organ pedal articulations;
>-
>https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00206.html,
>question about same-foot organ pedal substitutions;
>-
>https://lists.gnu.org/archive/html/lilypond-user/2016-11/msg00087.html,
>follow-up: organ pedal toe-to-heel-shift.
>
>
> I've created a snippet to address this. It allows you to pick the pedal
> mark style:
>
>- Lilypond default with outward-pointing toes and outward-pointing
>heels;
>- "modern" with inward toes and circle heels (e.g. Trevor 1971, "The
>Oxford Organ Method");
>- "traditional" with upward toes and downward heels (e.g. Bach/Novello
>1948).
>
>
> After choosing the style, you can use standard pedal commands.
>
> The snippet also defines some new pedal indicator commands, including for
> heel/toe transitions; foot slide marks (for sliding a foot forward/backward
> on a pedal); "foot behind"/"foot in front" marks, for crossing feet; "foot
> forward/backward" marks, for when feet are adjacent; and "foot
> substitution" (foot change, foot transition) marks, for swapping feet
> whilst pressing a single pedal. These augmented marks follow Trevor (1971,
> as above), and can be used with any of the pedal mark styles.
>
> Finally, it defines an engraver allowing foot glide/glissando marks using
> the standard "\glide" command.
>
> The snippet is at https://lsr.di.unimi.it/LSR/Item?id=1184. It includes a
> demonstration, but that can be chopped off to provide a file for inclusion
> by any other music, as described in the snippet.
>
> Many thanks to Thomas "Harm" Morley for feedback, and to all those who
> maintain Lilypond and the Lilypond Snippet Repository, including Sebastiano
> Vigna and Werner Lemberg.
>
> all the best,
> Rudolf.
>
>


Organ pedal marks in various styles, including pedal glides: new snippet 1184

2024-04-09 Thread Rudolf Cardinal
Dear Lilypond users with an interest in organ music,

Lilypond's standard commands for organ pedal marks are: \lheel, \ltoe, \rheel, 
\rtoe. However, there are several recognized ways of displaying pedal marks 
visually. I struggled a little to get Lilypond's organ pedal marks into a style 
that I was most familiar with. I note previous discussion about this and 
related issues at e.g.

  *
https://lists.gnu.org/archive/html/lilypond-user/2010-12/msg00387.html, re: 
organ pedalboard fingerings;
  *
https://lists.gnu.org/archive/html/lilypond-user/2007-12/msg00333.html, organ 
pedal marks and substitution;
  *
https://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00683.html, organ 
pedal foot substitution;
  *
https://lists.gnu.org/archive/html/lilypond-user/2016-02/msg00713.html, 
globally change organ pedal articulations;
  *
https://lists.gnu.org/archive/html/lilypond-user/2016-05/msg00206.html, 
question about same-foot organ pedal substitutions;
  *
https://lists.gnu.org/archive/html/lilypond-user/2016-11/msg00087.html, 
follow-up: organ pedal toe-to-heel-shift.

I've created a snippet to address this. It allows you to pick the pedal mark 
style:

  *
Lilypond default with outward-pointing toes and outward-pointing heels;
  *
"modern" with inward toes and circle heels (e.g. Trevor 1971, "The Oxford Organ 
Method");
  *
"traditional" with upward toes and downward heels (e.g. Bach/Novello 1948).

After choosing the style, you can use standard pedal commands.

The snippet also defines some new pedal indicator commands, including for 
heel/toe transitions; foot slide marks (for sliding a foot forward/backward on 
a pedal); "foot behind"/"foot in front" marks, for crossing feet; "foot 
forward/backward" marks, for when feet are adjacent; and "foot substitution" 
(foot change, foot transition) marks, for swapping feet whilst pressing a 
single pedal. These augmented marks follow Trevor (1971, as above), and can be 
used with any of the pedal mark styles.

Finally, it defines an engraver allowing foot glide/glissando marks using the 
standard "\glide" command.

The snippet is at https://lsr.di.unimi.it/LSR/Item?id=1184. It includes a 
demonstration, but that can be chopped off to provide a file for inclusion by 
any other music, as described in the snippet.

Many thanks to Thomas "Harm" Morley for feedback, and to all those who maintain 
Lilypond and the Lilypond Snippet Repository, including Sebastiano Vigna and 
Werner Lemberg.

all the best,
Rudolf.



Re: New package implementing support for The Helmholtz-Ellis Just Intonation (HEJI) pitch notation system

2024-03-19 Thread Gregory Evans
Hi masterbuilder/Gylfi,
This looks like a cool package. Designing the user interface, I think,
really is a matter of taste. My abjad-ext-microtones is meant specifically
to work with the abjad API, so I only implemented a set of accidental
overrides. I also thought it was important to design the stylesheets so
that a different font could be swapped out if desired. The real goal of the
python aspect of my program was to allow tones to be composed numerically
(i.e. as transpositions above a fundamental) so if you had the ability to
model something like \ji-multiplication c' 7/4 (which would result in a
septimally lowered bf') that would be my preferred interface. I’m certain
the two interface systems could even collaborate with one another.
Unfortunately I personally don’t know how to do this in scheme, thus: my
python system. Conveniently, I already compose mainly with python so I am
not in desperate need of the interface I just described. However, I think
the true ratio-based system is what a lot of composers want from JI. And a
software system is great for automatically calculating transpositions.

again: the project is very nice.

warm regards,
gregory rowland evans

On Tue, Mar 19, 2024 at 11:30 AM Gylfi  wrote:

> Greetings everyone,
>
> I want to share with the community some work I've been doing on
> implementing proper support for the HEJI notation system in LilyPond. I
> wouldn't call it stable quite yet, as I'm still open to making breaking
> changes to the interface based on feedback. However, I would say it has
> (hopefully) reached the point where it is usable in real projects. You can
> find the repository here:
>
> https://github.com/BridgeTheMasterBuilder/heji-ly
>
> (let me know if you are opposed to using GitHub, I can also host it
> somewhere else)
>
> The differences between this package and existing packages that also
> implement HEJI support (I am personally only aware of two:
> https://github.com/levinericzimmermann/ekme-heji.ily and
> https://github.com/GregoryREvans/abjad-ext-microtones) are the following:
>
>- Complete support for all accidentals, with the exception of
>"enharmonic schismas" and equal-tempered accidentals which are planned for
>future releases.
>- Modular interface for arbitrary combinations of accidentals (this is
>perhaps what I'm most interested in getting feedback on - to me it's a
>reasonable interface but I don't know what other people's opinion will be)
>- Full playback support, even for chords, which I believe is just
>about as accurate as MIDI will allow. Sounds pretty good to my ears in any
>case.
>
> I've included some example scores in the repository, including: Recreating
> the otonal and utonal harmonic series examples found here
> https://marsbat.space/pdfs/HEJI2_legend+series.pdf; some other examples
> related to the harmonic series; a classic Ben Johnston chord from the song
> Quietness; a Barbershop quartet arrangment of Kentucky Babe notated with
> the exact harmonies that could plausibly appear in a performance (but still
> highly theoretical and pure, it's not a transcription of any real
> performance) and a traditional bagpipe tune Sweet Maid of Glendaruel. These
> last two examples are a bit out there as far as using HEJI notation is
> concerned. I only chose them because they are "natural" examples of 7-limit
> just intonation that happen to be public domain (if anybody knows of any
> other examples of public domain music in extended just intonation please
> let me know).
>
> Before starting this project I had virtually no exposure to the Scheme API
> (though I've been a semi-casual LilyPond user for a long time), so I might
> be doing some things inefficiently or violating some best practices, let me
> know if you see something particularly egregious. There are some hacks in
> there that I want to properly address at some point, they should be marked
> with TODO.
>
> I hope this will be useful to others.
>
> Best regards,
> masterbuilder
>


-- 
gregory rowland evans
http://www.gregoryrowlandevans.com
https://github.com/GregoryREvans
https://soundcloud.com/gregory-rowland-evans


New package implementing support for The Helmholtz-Ellis Just Intonation (HEJI) pitch notation system

2024-03-19 Thread Gylfi
Greetings everyone,

I want to share with the community some work I've been doing on
implementing proper support for the HEJI notation system in LilyPond. I
wouldn't call it stable quite yet, as I'm still open to making breaking
changes to the interface based on feedback. However, I would say it has
(hopefully) reached the point where it is usable in real projects. You can
find the repository here:

https://github.com/BridgeTheMasterBuilder/heji-ly

(let me know if you are opposed to using GitHub, I can also host it
somewhere else)

The differences between this package and existing packages that also
implement HEJI support (I am personally only aware of two:
https://github.com/levinericzimmermann/ekme-heji.ily and
https://github.com/GregoryREvans/abjad-ext-microtones) are the following:

   - Complete support for all accidentals, with the exception of
   "enharmonic schismas" and equal-tempered accidentals which are planned for
   future releases.
   - Modular interface for arbitrary combinations of accidentals (this is
   perhaps what I'm most interested in getting feedback on - to me it's a
   reasonable interface but I don't know what other people's opinion will be)
   - Full playback support, even for chords, which I believe is just about
   as accurate as MIDI will allow. Sounds pretty good to my ears in any case.

I've included some example scores in the repository, including: Recreating
the otonal and utonal harmonic series examples found here
https://marsbat.space/pdfs/HEJI2_legend+series.pdf; some other examples
related to the harmonic series; a classic Ben Johnston chord from the song
Quietness; a Barbershop quartet arrangment of Kentucky Babe notated with
the exact harmonies that could plausibly appear in a performance (but still
highly theoretical and pure, it's not a transcription of any real
performance) and a traditional bagpipe tune Sweet Maid of Glendaruel. These
last two examples are a bit out there as far as using HEJI notation is
concerned. I only chose them because they are "natural" examples of 7-limit
just intonation that happen to be public domain (if anybody knows of any
other examples of public domain music in extended just intonation please
let me know).

Before starting this project I had virtually no exposure to the Scheme API
(though I've been a semi-casual LilyPond user for a long time), so I might
be doing some things inefficiently or violating some best practices, let me
know if you see something particularly egregious. There are some hacks in
there that I want to properly address at some point, they should be marked
with TODO.

I hope this will be useful to others.

Best regards,
masterbuilder


Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-19 Thread Xavier Scheuer
On Mon, 20 Nov 2023 at 05:15, Abe Raher  wrote:
>
> p.s. This story ended oddly.
>
> I uninstalled ghostscript and then installed ghostscript 10.02.0.
>
> I pinned that version.
>
> Still got the error ...
>
> Uninstalled lilypond.
>
> Reinstalled lilypond – this required unpinning ghostscript.
>
> Now it's all working. Odd because we're back to the latest ghostscript
which is what we thought was the source of the error.

Hello,

Yes, but after uninstalling LilyPond 2.24.2 you reinstalled the brand-new
2.24.3, which contains a fix for the Ghostscript problem.
Thanks to the speedy LilyPond developers.

Kind regards,
Xavier


Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-19 Thread Hans Aikema
On 20 Nov 2023, at 04:02, Abe Raher  wrote:p.s. This story ended oddly.I uninstalled ghostscript and then installed ghostscript 10.02.0.I pinned that version.Still got the error ...Uninstalled lilypond.Reinstalled lilypond – this required unpinning ghostscript.Now it's all working. Odd because we're back to the latest ghostscript which is what we thought was the source of the error.Not that odd that your 'latest editions' setup works, because your actions also updated lilypond to the (brand new) 2.24.3, which contains a fix for the finddevices issue with the latest ghostscript version.% lilypond --loglevel=debug template-notes-only.ly 
Log level set to 287
GNU LilyPond 2.24.3 (running Guile 3.0)






Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-19 Thread Abe Raher
p.s. This story ended oddly.

I uninstalled ghostscript and then installed ghostscript 10.02.0.

I pinned that version.

Still got the error ...

Uninstalled lilypond.

Reinstalled lilypond – this required unpinning ghostscript.

Now it's all working. Odd because we're back to the latest ghostscript
which is what we thought was the source of the error.

% lilypond --loglevel=debug template-notes-only.ly

Log level set to 287

GNU LilyPond 2.24.3 (running Guile 3.0)


Relocation

  Absolute file name of LilyPond binary computed from PATH:


PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin

argv0=lilypond

  Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.24.3'

  Using run-time value for datadir,

setting it to '/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3'

  Using run-time value for libdir,

setting it to '/usr/local/Cellar/lilypond/2.24.3/lib/lilypond/2.24.3'

  Using run-time value for localedir,

setting it to '/usr/local/Cellar/lilypond/2.24.3/share/locale'

  Using compile-time value for relocdir,

setting it to ''

  Prepending '/usr/local/Cellar/lilypond/2.24.3/bin' to PATH

  Setting PATH to
'/usr/local/Cellar/lilypond/2.24.3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin'

Setting GUILE_AUTO_COMPILE to '0'

Setting GUILE_WARN_DEPRECATED to 'detailed'

Setting XDG_CACHE_HOME to
'/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3'

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.24.3/share/lilypond/2.24.3'

PATH="/usr/local/Cellar/lilypond/2.24.3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin"


[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/lily.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/lily-library.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/output-lib.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/markup-macros.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/parser-ly-from-scheme.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/file-cache.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-event-classes.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-music-callbacks.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-music-types.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-note-names.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/c++.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/chord-entry.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/skyline.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/markup.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-markup-commands.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/stencil.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/modal-transforms.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/chord-ignatzek-names.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/music-functions.scm

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-music-display-methods.scm]

]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/part-combiner.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/autochange.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/define-music-properties.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/time-signature.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/time-signature-settings.scm]

[/usr/local/Cellar/lilypond/2.24.3/share/lilypond/2.24.3/scm/lily/auto-beam.scm]


Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-12 Thread Abe Raher
Thank you, Jean, that makes sense and will help.

all the best,

Abe


On Sun, Nov 12, 2023 at 12:53 AM Jean Abou Samra  wrote:

> I'm having the same problem.There's already a thread about this:
> https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html
> Joshua Armenta posted a solution, something to do with Ghostscript, but I
> couldn't make it to work.
>
> That thread is not about the same problem as this thread.
>
> Your specific Ghostscript error is
>
> Error: /undefined in finddevice
>
> The problem is that recently, Ghostscript (the software used by LilyPond
> to convert its PostScript output to PDF) had a “security fix release”,
> version 10.02.1, which removed a function that was used by LilyPond
> (apparently because it was somehow found to be insecure). See issue 6675
> .
>
> Since security fix releases are always assumed not to break anything,
> packagers pick them up without much thought. In this case, Homebrew was
> quick to upgrade to 10.02.1 and LilyPond broke.
>
> LilyPond has already been changed to avoid using it, but Homebrew doesn't
> have that fix yet.
>
> I don't know enough about Homebrew to say whether it's possible to
> downgrade Ghostscript to 10.02.0. You could try the official binaries
> , which do work.
>
> Best,
>
> Jean
>


Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-12 Thread Jean Abou Samra

> I'm having the same problem.There's already a thread about this: 
> [https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html](https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html)
> Joshua Armenta posted a solution, something to do with Ghostscript, but I 
> couldn't make it to work.

That thread is not about the same problem as this thread.

Your specific Ghostscript error is

```
Error: /undefined in finddevice
```

The problem is that recently, Ghostscript (the software used by LilyPond to 
convert its PostScript output to PDF) had a “security fix release”, version 
10.02.1, which removed a function that was used by LilyPond (apparently because 
it was somehow found to be insecure). See [issue 
6675](https://gitlab.com/lilypond/lilypond/-/issues/6675).

Since security fix releases are always assumed not to break anything, packagers 
pick them up without much thought. In this case, Homebrew was quick to upgrade 
to 10.02.1 and LilyPond broke.

LilyPond has already been changed to avoid using it, but Homebrew doesn't have 
that fix yet.

I don't know enough about Homebrew to say whether it's possible to downgrade 
Ghostscript to 10.02.0. You could try the [official 
binaries](https://lilypond.org/download.html), which do work.

Best,

Jean


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


Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-12 Thread Abe Raher
Thank you Ben and Leonardo!

I tried Joshua Armenta's proposed fix. I don't think it actually changed
anything. I still got the same ghostscript error after I tried the
procedure.

 % cd /usr/local/share/doc

myusername@myhostname % ls -al | grep ghost

lrwxr-xr-x   1 myusername  admin54 Nov 11 15:37 ghostscript ->
../../Cellar/ghostscript/10.02.1/share/doc/ghostscript

myusername@myhostname % sudo chown -R `whoami` ghostscript

Password:

myusername@myhostname % brew link --overwrite ghostscript

Warning: Already linked: /usr/local/Cellar/ghostscript/10.02.1

To relink, run:

  brew unlink ghostscript && brew link ghostscript

Ben, you can see from the above that I am on the latest version, 10.02.1.
What version do you think I should downgrade to? And can that be done with
brew?









On Sat, Nov 11, 2023 at 4:43 PM Ben Bradshaw 
wrote:

> Essentially you need to downgrade ghostscript a version. Although with the
> new release announced today I don't know if it will be fixed or not.
>
> On Sat, Nov 11, 2023, 5:22 PM Leonardo van der Laat 
> wrote:
>
>> I'm having the same problem.
>> There's already a thread about this:
>> https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html
>> Joshua Armenta posted a solution, something to do with Ghostscript, but I
>> couldn't make it to work.
>>
>> On Sat, Nov 11, 2023 at 5:39 PM Abe Raher  wrote:
>>
>>> hey folks – with my newly installed lilypond on mac os sonoma, lilypond
>>> generates midi but no pdfs
>>>
>>> i've tested a number of .ly files that successfully generated scores
>>> previously – none generate pdfs now
>>>
>>> and i just tested the simplest template in lilypond's docs ... please
>>> have a look at the log output and give me a clue!
>>>
>>> thanks very much
>>>
>>> ***
>>>
>>> what i've got:
>>>
>>> Mac OS: 14.1.1 (23B81)
>>>
>>> % lilypond --version
>>>
>>> GNU LilyPond 2.24.2 (running Guile 3.0)
>>>
>>>
>>>
>>> test file:
>>>
>>>
>>>
>>> melody = \relative c' {
>>>   \clef treble
>>>   \key c \major
>>>   \time 4/4
>>>
>>>   a4 b c d
>>> }
>>>
>>> \score {
>>>   \new Staff \melody
>>>   \layout { }
>>>   \midi { }
>>> }
>>>
>>>
>>>
>>> test command:
>>>
>>>  % lilypond --loglevel=debug template-notes-only.ly
>>>
>>>
>>> ***
>>>
>>>
>>> command output:
>>>
>>>
>>> Log level set to 287
>>> GNU LilyPond 2.24.2 (running Guile 3.0)
>>>
>>> Relocation
>>>   Absolute file name of LilyPond binary computed from PATH:
>>>
>>> PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
>>> argv0=lilypond
>>>   Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.24.2'
>>>   Using run-time value for datadir,
>>> setting it to
>>> '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2'
>>>   Using run-time value for libdir,
>>> setting it to '/usr/local/Cellar/lilypond/2.24.2/lib/lilypond/2.24.2'
>>>   Using run-time value for localedir,
>>> setting it to '/usr/local/Cellar/lilypond/2.24.2/share/locale'
>>>   Using compile-time value for relocdir,
>>> setting it to ''
>>>   Prepending '/usr/local/Cellar/lilypond/2.24.2/bin' to PATH
>>>   Setting PATH to
>>> '/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin'
>>> Setting GUILE_AUTO_COMPILE to '0'
>>> Setting GUILE_WARN_DEPRECATED to 'detailed'
>>> Setting XDG_CACHE_HOME to
>>> '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2'
>>> Setting GC_INITIAL_HEAP_SIZE to '40M'
>>> Setting GC_NPROCS to '1'
>>> Setting GC_FREE_SPACE_DIVISOR to '1'
&g

Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-11 Thread Ben Bradshaw
Essentially you need to downgrade ghostscript a version. Although with the
new release announced today I don't know if it will be fixed or not.

On Sat, Nov 11, 2023, 5:22 PM Leonardo van der Laat 
wrote:

> I'm having the same problem.
> There's already a thread about this:
> https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html
> Joshua Armenta posted a solution, something to do with Ghostscript, but I
> couldn't make it to work.
>
> On Sat, Nov 11, 2023 at 5:39 PM Abe Raher  wrote:
>
>> hey folks – with my newly installed lilypond on mac os sonoma, lilypond
>> generates midi but no pdfs
>>
>> i've tested a number of .ly files that successfully generated scores
>> previously – none generate pdfs now
>>
>> and i just tested the simplest template in lilypond's docs ... please
>> have a look at the log output and give me a clue!
>>
>> thanks very much
>>
>> ***
>>
>> what i've got:
>>
>> Mac OS: 14.1.1 (23B81)
>>
>> % lilypond --version
>>
>> GNU LilyPond 2.24.2 (running Guile 3.0)
>>
>>
>>
>> test file:
>>
>>
>>
>> melody = \relative c' {
>>   \clef treble
>>   \key c \major
>>   \time 4/4
>>
>>   a4 b c d
>> }
>>
>> \score {
>>   \new Staff \melody
>>   \layout { }
>>   \midi { }
>> }
>>
>>
>>
>> test command:
>>
>>  % lilypond --loglevel=debug template-notes-only.ly
>>
>>
>> ***
>>
>>
>> command output:
>>
>>
>> Log level set to 287
>> GNU LilyPond 2.24.2 (running Guile 3.0)
>>
>> Relocation
>>   Absolute file name of LilyPond binary computed from PATH:
>>
>> PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
>> argv0=lilypond
>>   Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.24.2'
>>   Using run-time value for datadir,
>> setting it to
>> '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2'
>>   Using run-time value for libdir,
>> setting it to '/usr/local/Cellar/lilypond/2.24.2/lib/lilypond/2.24.2'
>>   Using run-time value for localedir,
>> setting it to '/usr/local/Cellar/lilypond/2.24.2/share/locale'
>>   Using compile-time value for relocdir,
>> setting it to ''
>>   Prepending '/usr/local/Cellar/lilypond/2.24.2/bin' to PATH
>>   Setting PATH to
>> '/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin'
>> Setting GUILE_AUTO_COMPILE to '0'
>> Setting GUILE_WARN_DEPRECATED to 'detailed'
>> Setting XDG_CACHE_HOME to
>> '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.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.24.2/share/lilypond/2.24.2'
>>
>> PATH="/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin"
>>
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily-library.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/output-lib.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/markup-macros.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/parser-ly-from-scheme.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/file-cache.scm]
>>
>> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily

Re: lilypond does not generate pdf - new install on mac os sonoma

2023-11-11 Thread Leonardo van der Laat
I'm having the same problem.
There's already a thread about this:
https://lists.gnu.org/archive/html/lilypond-user/2023-06/msg00135.html
Joshua Armenta posted a solution, something to do with Ghostscript, but I
couldn't make it to work.

On Sat, Nov 11, 2023 at 5:39 PM Abe Raher  wrote:

> hey folks – with my newly installed lilypond on mac os sonoma, lilypond
> generates midi but no pdfs
>
> i've tested a number of .ly files that successfully generated scores
> previously – none generate pdfs now
>
> and i just tested the simplest template in lilypond's docs ... please have
> a look at the log output and give me a clue!
>
> thanks very much
>
> ***
>
> what i've got:
>
> Mac OS: 14.1.1 (23B81)
>
> % lilypond --version
>
> GNU LilyPond 2.24.2 (running Guile 3.0)
>
>
>
> test file:
>
>
>
> melody = \relative c' {
>   \clef treble
>   \key c \major
>   \time 4/4
>
>   a4 b c d
> }
>
> \score {
>   \new Staff \melody
>   \layout { }
>   \midi { }
> }
>
>
>
> test command:
>
>  % lilypond --loglevel=debug template-notes-only.ly
>
>
> ***
>
>
> command output:
>
>
> Log level set to 287
> GNU LilyPond 2.24.2 (running Guile 3.0)
>
> Relocation
>   Absolute file name of LilyPond binary computed from PATH:
>
> PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
> argv0=lilypond
>   Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.24.2'
>   Using run-time value for datadir,
> setting it to '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2'
>   Using run-time value for libdir,
> setting it to '/usr/local/Cellar/lilypond/2.24.2/lib/lilypond/2.24.2'
>   Using run-time value for localedir,
> setting it to '/usr/local/Cellar/lilypond/2.24.2/share/locale'
>   Using compile-time value for relocdir,
> setting it to ''
>   Prepending '/usr/local/Cellar/lilypond/2.24.2/bin' to PATH
>   Setting PATH to
> '/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin'
> Setting GUILE_AUTO_COMPILE to '0'
> Setting GUILE_WARN_DEPRECATED to 'detailed'
> Setting XDG_CACHE_HOME to
> '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.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.24.2/share/lilypond/2.24.2'
>
> PATH="/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin"
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily-library.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/output-lib.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/markup-macros.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/parser-ly-from-scheme.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/file-cache.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-event-classes.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-callbacks.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-types.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-note-names.scm]
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/c++.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/chord-entry.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/skyline.scm]
>
> [/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/marku

lilypond does not generate pdf - new install on mac os sonoma

2023-11-11 Thread Abe Raher
hey folks – with my newly installed lilypond on mac os sonoma, lilypond
generates midi but no pdfs

i've tested a number of .ly files that successfully generated scores
previously – none generate pdfs now

and i just tested the simplest template in lilypond's docs ... please have
a look at the log output and give me a clue!

thanks very much

***

what i've got:

Mac OS: 14.1.1 (23B81)

% lilypond --version

GNU LilyPond 2.24.2 (running Guile 3.0)



test file:



melody = \relative c' {
  \clef treble
  \key c \major
  \time 4/4

  a4 b c d
}

\score {
  \new Staff \melody
  \layout { }
  \midi { }
}



test command:

 % lilypond --loglevel=debug template-notes-only.ly


***


command output:


Log level set to 287
GNU LilyPond 2.24.2 (running Guile 3.0)

Relocation
  Absolute file name of LilyPond binary computed from PATH:

PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
argv0=lilypond
  Setting INSTALLER_PREFIX to '/usr/local/Cellar/lilypond/2.24.2'
  Using run-time value for datadir,
setting it to '/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2'
  Using run-time value for libdir,
setting it to '/usr/local/Cellar/lilypond/2.24.2/lib/lilypond/2.24.2'
  Using run-time value for localedir,
setting it to '/usr/local/Cellar/lilypond/2.24.2/share/locale'
  Using compile-time value for relocdir,
setting it to ''
  Prepending '/usr/local/Cellar/lilypond/2.24.2/bin' to PATH
  Setting PATH to
'/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin'
Setting GUILE_AUTO_COMPILE to '0'
Setting GUILE_WARN_DEPRECATED to 'detailed'
Setting XDG_CACHE_HOME to
'/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.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.24.2/share/lilypond/2.24.2'
PATH="/usr/local/Cellar/lilypond/2.24.2/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin"

[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/lily-library.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/output-lib.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/markup-macros.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/parser-ly-from-scheme.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/file-cache.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-event-classes.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-callbacks.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-types.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-note-names.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/c++.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/chord-entry.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/skyline.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/markup.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-markup-commands.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/stencil.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/modal-transforms.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/chord-ignatzek-names.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/music-functions.scm
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-display-methods.scm]
]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/part-combiner.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/autochange.scm]
[/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/scm/lily/define-music-properties.scm]
[/usr/lo

Re: New version 2.25.9 on Windows "feels" slower and less reliable

2023-10-14 Thread Werner LEMBERG


> The attached file is pretty much as minimal as I can reduce
> it. Removing more bars makes it compile w/o error.

Thanks.  As it turns out, this has already been reported:

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

I've added your sample.


Werner



Re: New version 2.25.9 on Windows "feels" slower and less reliable

2023-10-14 Thread Michael Gerdau

Assertion failed: my_index == 0, [...]


I found what triggered this Assertion:
In my file I had a
\new Lyrics ...
outside of any Staff or Score context.


Please provide a minimal example that so that we can add an issue to
the tracker.


The attached file is pretty much as minimal as I can reduce it. Removing 
more bars makes it compile w/o error.


Kind regards,
Michael
--
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver\version "2.25.9"

\header {
  title = "some title"
}

sopranoVoice = \relative b' {
  \key d \major
  R1*6/4 | b2 a4 a( g) fis | g4( d e) fis2 r4 | b2. e4( d) b4 | b2.( a2) r4 | 
a4( cis) b a2 a4 |
  e'4 d cis b2 a4 | a4( fis') e e( dis) fis, | a2 b4 a2( gis4) | gis4( e') d d( 
cis) e, |
  g2 a4 g2( fis4) | b2. e, | a2. d, | d2 fis4 fis2( e4) | d2 r4 r2 r4 |
}

verse = \lyricmode {
  bla bla
}

sopranoVoicePart = \new Staff {
  \new Voice = "solo" { \sopranoVoice }
}
\new Lyrics \lyricsto "solo" { \verse }

\score {
  <<
\sopranoVoicePart
  >>
  \layout { }
}


Re: New version 2.25.9 on Windows "feels" slower and less reliable

2023-10-14 Thread Werner LEMBERG


>> Assertion failed: my_index == 0, [...]
>
> I found what triggered this Assertion:
> In my file I had a
> \new Lyrics ...
> outside of any Staff or Score context.

Please provide a minimal example that so that we can add an issue to
the tracker.


Werner



Re: New version 2.25.9 on Windows "feels" slower and less reliable

2023-10-14 Thread Michael Gerdau

Further I do very regularly get errors like this:
Fitting music on 5 or 6 pages...Assertion failed: my_index == 0, file 
/home/lily/lilypond-2.25.9/release/binaries/mingw/lilypond/lilypond-2.25.9/lily/page-breaking.cc, line 1083


This happens during entering music and creating an interim version for 
proof reading. I then continue to add music and the error goes away only 
to return after having added more music. It feels like an on/off thing 
depending on some weird constellation of the music.


I found what triggered this Assertion:
In my file I had a
\new Lyrics ...
outside of any Staff or Score context.

Strange error though (not knowing the details of the internals)

Kind regards,
Michael
--
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver



New version 2.25.9 on Windows "feels" slower and less reliable

2023-10-14 Thread Michael Gerdau

Hi list,

the new version 2.25.9 seems to take considerably longer than e.g. 
2.25.8 though I have yet to do precise measurements.


Am I the only one who thinks that's the case?
Or is that an (already) known problem?

Further I do very regularly get errors like this:
Fitting music on 5 or 6 pages...Assertion failed: my_index == 0, file 
/home/lily/lilypond-2.25.9/release/binaries/mingw/lilypond/lilypond-2.25.9/lily/page-breaking.cc, 
line 1083


This happens during entering music and creating an interim version for 
proof reading. I then continue to add music and the error goes away only 
to return after having added more music. It feels like an on/off thing 
depending on some weird constellation of the music.


I don't have a MWE but am happy to send a larger file if that helps.

Kind regards,
Michael
--
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver



Re: textSpanner - disable repeat of text on new line

2023-10-07 Thread Bevan Broun
Thanks Leo - perfect.



On Sun, Oct 8, 2023 at 8:34 AM Leo Correia de Verdier <
leo.correia.de.verd...@gmail.com> wrote:

> Hi Bevan!
>
> I think what you are looking for is:
>
> \override TextSpanner.bound-details.left-broken.text = ##f
>
> HTH
> /Leo
>
> > 7 okt. 2023 kl. 21:13 skrev Bevan Broun :
> >
> > Hi All
> >
> > When using a text spanner I get the text repeated after a line break,
> followed by new dashes. Can I disable getting the repeat of the text and
> only get dashes on the new line? I have a case where the repeated text is
> banging up against some other text and it would be clearer with just dashes
> on the new line.
> >
> > Thanks
> >
> > \version "2.22.2"
> >
> > mybar = { c4 d c d }
> > \score {
> >   \relative c' {
> > \mybar \mybar \mybar
> > \override TextSpanner.bound-details.left.text = "poco a poco
> accelerando"
> > c \startTextSpan d c d
> > \mybar
> > \mybar \break
> > \mybar
> > \stopTextSpan
> > \tempo "Tempo I"
> > \mybar \mybar \mybar \mybar
> >   }
> > }
> >
> >
>
>


Re: textSpanner - disable repeat of text on new line

2023-10-07 Thread Knute Snortum
On Sat, Oct 7, 2023 at 1:39 PM Bevan Broun  wrote:

> Hi All
>
> When using a text spanner I get the text repeated after a line break,
> followed by new dashes. Can I disable getting the repeat of the text and
> only get dashes on the new line? I have a case where the repeated text is
> banging up against some other text and it would be clearer with just dashes
> on the new line.
>
> Thanks
>
> \version "2.22.2"
>
> mybar = { c4 d c d }
> \score {
>   \relative c' {
> \mybar \mybar \mybar
> \override TextSpanner.bound-details.left.text = "poco a poco
> accelerando"
> c \startTextSpan d c d
> \mybar
> \mybar \break
> \mybar
> \stopTextSpan
> \tempo "Tempo I"
> \mybar \mybar \mybar \mybar
>   }
> }
>

Try using:

 \override TextSpanner.bound-details.left-broken.text = ""

like this:

\version "2.22.2"

mybar = { c4 d c d }
\score {
  \relative c' {
\mybar \mybar \mybar
\override TextSpanner.bound-details.left.text = "poco a poco
accelerando"
\override TextSpanner.bound-details.left-broken.text = "" % <-- add this
c \startTextSpan d c d
\mybar
\mybar \break
\mybar
\stopTextSpan
\tempo "Tempo I"
\mybar \mybar \mybar \mybar
  }
}


--
Knute Snortum


Re: textSpanner - disable repeat of text on new line

2023-10-07 Thread Leo Correia de Verdier
Hi Bevan!

I think what you are looking for is:

\override TextSpanner.bound-details.left-broken.text = ##f

HTH
/Leo

> 7 okt. 2023 kl. 21:13 skrev Bevan Broun :
> 
> Hi All
> 
> When using a text spanner I get the text repeated after a line break, 
> followed by new dashes. Can I disable getting the repeat of the text and only 
> get dashes on the new line? I have a case where the repeated text is banging 
> up against some other text and it would be clearer with just dashes on the 
> new line.
> 
> Thanks
> 
> \version "2.22.2"
> 
> mybar = { c4 d c d }
> \score {
>   \relative c' {
> \mybar \mybar \mybar
> \override TextSpanner.bound-details.left.text = "poco a poco accelerando" 
> c \startTextSpan d c d
> \mybar
> \mybar \break
> \mybar
> \stopTextSpan 
> \tempo "Tempo I" 
> \mybar \mybar \mybar \mybar 
>   } 
> }
> 
> 




textSpanner - disable repeat of text on new line

2023-10-07 Thread Bevan Broun
Hi All

When using a text spanner I get the text repeated after a line break,
followed by new dashes. Can I disable getting the repeat of the text and
only get dashes on the new line? I have a case where the repeated text is
banging up against some other text and it would be clearer with just dashes
on the new line.

Thanks

\version "2.22.2"

mybar = { c4 d c d }
\score {
  \relative c' {
\mybar \mybar \mybar
\override TextSpanner.bound-details.left.text = "poco a poco
accelerando"
c \startTextSpan d c d
\mybar
\mybar \break
\mybar
\stopTextSpan
\tempo "Tempo I"
\mybar \mybar \mybar \mybar
  }
}


Re: chord.ly to extract notes from chords breaks with new Guile

2023-06-01 Thread Jean Abou Samra
Better make that:

> ```
> \version "2.24.1"
> 
> #(define ((Keep_only_engraver i) context)
> ```
>



```
#(define ((Keep_only_performer i) context)
```



>
> ```
> (let ((j 0))
>  (make-performer
>   (listeners
>((note-event performer event)
> (unless (eqv? i j)
>   (ly:event-set-property! event 'pitch #f))
> (set! j (1+ j
>   ((stop-translation-timestep performer)
>(set! j 0)
> 
> #(define (scores n music)
>(apply values
>   (map (lambda (i)
>  #{
>\score {
>  \midi { \context { \Score \consists #(Keep_only_engraver 
> i) } }
> ```



```
  \midi { \context { \Score \consists #(Keep_only_performer 
i) } }
```



> ```
>  #music
>}
>      #})
>(iota n
> 
> mus = <<
>   \new Staff { c'1 d'2 d'4 e'4 }
>   \new Staff << { g'1 a'2 a'4 b'4 } \\ { g1 g1 } >>
> >>
> 
> { \mus }
> 
> $(scores 3 mus) % 3 is the max number of simutaneous notes
> ```


(yay for muscle memory)


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


Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread Jean Abou Samra
Le mardi 30 mai 2023 à 20:39 -0400, msk...@ansuz.sooke.bc.ca a écrit :

> I need, at each point in time, to have at most one note per track, exactly one
> track per note, and silence in any leftover tracks, regardless of the
> voice/chord structure of the music.


That sounds like you want a performer-based approach. Like:

```
\version "2.24.1"

#(define ((Keep_only_engraver i) context)
   (let ((j 0))
 (make-performer
  (listeners
   ((note-event performer event)
(unless (eqv? i j)
  (ly:event-set-property! event 'pitch #f))
(set! j (1+ j
  ((stop-translation-timestep performer)
   (set! j 0)

#(define (scores n music)
   (apply values
  (map (lambda (i)
 #{
   \score {
 \midi { \context { \Score \consists #(Keep_only_engraver 
i) } }
 #music
   }
 #})
   (iota n))))

mus = <<
  \new Staff { c'1 d'2 d'4 e'4 }
  \new Staff << { g'1 a'2 a'4 b'4 } \\ { g1 g1 } >>
>>

{ \mus }

$(scores 3 mus) % 3 is the max number of simutaneous notes
```


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


Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread mskala
On Wed, 31 May 2023, Gilles Thibault wrote:

> Not hardly tested but this should work :

Thanks for looking at it further.  I hate to impose on you because I've
already decided to solve this problem in external postprocessing of the
MIDI files, so I hope you won't put a lot of effort into trying to satisfy
my use case with modifications to your script.  I don't think doing it in
Lilypond is really the right solution for me because to really solve it I
need to automatically handle *all* cases of simultaneous notes.  I need,
at each point in time, to have at most one note per track, exactly one
track per note, and silence in any leftover tracks, regardless of the
voice/chord structure of the music.

The code you provide works for the specific example I gave, where the
desired silence comes from a note written as a single note instead of a
chord, but there are many other cases (illustrating the problem with
minimal examples).  In particular:

* change b2 to 2 and the b2 comes out in two tracks.  Maybe it would
  never occur to me to write a one-note chord, but a similar issue can
  happen between two- and three-note chords, or anywhere the number of
  notes per chord in a voice is not always the same.

* a one-voice passage added outside the << >> construct comes out in two
  tracks

* if each of two voices sometimes contains two simultaneous notes, but
  only at most three notes are simultaneous overall, then I need to either
  use four output tracks, or carefully split and then merge to bring it
  down to three, and handling this kind of thing becomes steadily more
  complicated as the number of voices and simultaneous notes grows.

Resolving these points and any other similar ones that may come up, seems
like a lot of work.  If an in-Lilypond solution means I need to do things
like maintain the same number of Voice contexts throughout the entire
piece of music, or think hard about which note/voice index needs to merge
with which other one to minimize the overall number of tracks without ever
having more than one note simultaneous in a track, then we quickly
approach a point where it would be less work for me to just write out the
intended output by hand and not have Lilypond calculate it at all.

In external MIDI processing it's relatively easy:  at every "Note on"
message in chronological order, I can route the note to an unused track or
else know unambiguously that I need more tracks.  At every "Note off," the
track in question becomes available again.  The external code basically
does the same thing that a polyphonic synthesizer would do, just with
output to new MIDI tracks instead of directly to hardware voices.  No need
for separate handling of Lilypond's "single note," "chord," and "voice"
concepts.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread Gilles Thibault




in the hope of separating MIDI notes that don't have identical timing.
That is, if my input is
   << { a1 } \\ { b2 2 } >>

it would be nice to be able to separate it out into three separate 
outputs

for separate MIDI channels, like:
  { a1 }
  { b2 c2 }
  { r2 d2 }



Not hardly tested but this should work :

%%%
\version "2.24.1"

\include "chordsAndVoices.ly"

noteAloneToRest = #(define-music-function (music)(ly:music?)
  (map-some-music
(lambda(evt)
  (case (name-of evt)  ;; see chordsAndVoices.ly
((EventChord) evt) ;; not #f => stop iteration
((NoteEvent)   ;; note to rest
  (make-music 'RestEvent 'duration (ly:music-property evt 
'duration '(

(else #f)));; continue iteration
music))


music = << { a1 } \\ { b2 2 } >>

midiI = \extractVoice #1 \music
midiII = \extractVoice #2 \extractNote #1 \music
midiIII = \extractVoice #2 \extractNote #2 \noteAloneToRest \music

\score { <<
  \new Staff  { \midiI }   % { a1 }
  \new Staff  { \midiII }  % { b2 c2 }
  \new Staff  { \midiIII } % { r2 d2 }



% \midi
}




--
Gilles



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-29 Thread mskala
On Mon, 29 May 2023, Gilles Thibault wrote:

> chord.ly has been renamed to chordsAndVoices.ly (it deals also now with
> Voices)
> You can donwload it here :

Thanks a lot!

As far as I know, the new version works fine.  The problem in the old
version was just because of the non-breaking spaces in the lines I
modified according to instructions from the mailing list.  That was a
problem I encountered back in 2015 too, and thought I had fixed then.  My
version of the file is unmodified since 2015; evidently some non-breaking
spaces survived the earlier fix, and earlier versions of Lilypond ignored
them.  I don't know why the latest version had a problem with these
characters given that earlier versions didn't, but I also don't know why
earlier versions *didn't* have a problem with these particular
non-breaking spaces when others in the same file caused a lot of trouble.

I will say again, as I said in 2015, that I wish people would stop trying
to use HTML for email.  That's where the non-breaking spaces came from.

Anyway, even the old version of chord.ly contained support for separating
voices, which I hadn't previously touched but I investigated just recently
in the hope of separating MIDI notes that don't have identical timing.

That is, if my input is
   << { a1 } \\ { b2 2 } >>

it would be nice to be able to separate it out into three separate outputs
for separate MIDI channels, like:
  { a1 }
  { b2 c2 }
  { r2 d2 }

Unfortunately, both the old chord.ly and new chordsAndVoices.ly code have
the same problem with respect to voices that I encountered in 2015 with
respect to notes within a chord:  requesting a non-existent voice index
returns the last voice instead of silence.  That seems to be the intended
behaviour of the code in your application, so it's not exactly a bug, but
it isn't what I need.

I think the really right answer for me is to not use Lilypond to do this
note-separation at all, but to do postprocessing with other tools on the
MIDI files generated by Lilypond instead.  I'm more confident of really
getting correct results from that in all the different cases of
simultaneous notes, than I would be by trying to do the separation inside
Lilypond.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-29 Thread Gilles Thibault

Le 2023-05-27 22:31, msk...@ansuz.sooke.bc.ca a écrit :

Back in 2015 people on the list helped me with extracting notes from
chords, in this thread:
   
https://lists.gnu.org/archive/html/lilypond-user/2015-09/msg00394.html




chord.ly has been renamed to chordsAndVoices.ly (it deals also now with 
Voices)

You can donwload it here :

  http://gillesth.free.fr/Lilypond/chordsAndVoices/

Note you have also to download checkPitch.ly to make it work.

There is a small help
  
http://gillesth.free.fr/Lilypond/chordsAndVoices/chordsAndVoices-doc.pdf


I use chordsAndVoices.ly a lot, as it is part of the project arranger.ly
  http://gillesth.free.fr/Lilypond/arranger.ly/

My Lilypond version is 2.24.1
Please, tell me if there is something wrong with a more recent version.


--
Gilles



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread Jean Abou Samra
Le samedi 27 mai 2023 à 17:38 -0400, msk...@ansuz.sooke.bc.ca a écrit :
> On Sat, 27 May 2023, Jean Abou Samra wrote:
> 
> > Are you sure that this is the correct example? That the file chord.ly it
> > uses is the same as the one you sent? That LilyPond is the one you believe
> > and unpatched, etc. ?
> 
> Yes, using the chord.ly file I attached to my message, extracted from the
> message as it came back through the mailing list, with the three-line
> input cut and pasted from my message as it came back through the mailing
> list, and the version of Lilypond I compiled from the sources in the file
> lilypond-2.24.1.tar.gz downloaded from the lilypond.org Web site, I get
> these messages:
> 
> GNU LilyPond 2.24.1 (running Guile 2.2)
> Processing `test.ly'
> Parsing...ERROR: In procedure %resolve-variable:
> Unbound variable: #{ }#
> 
> > I can't reproduce your problem (on Fedora); it compiles fine for me and
> > prints a single MM rest.
> 
> Interesting.  What's the provenance of your Lilypond executable - did you
> also compile from source, or use a Fedora package?
> 
> I wonder if the issue could be with my Guile 2.2 installation, which I
> also compiled from sources.  I'm using Slackware, which does not have a
> Guile 2.2 package, having skipped all the way to version 3.  I had to
> install Guile 2.2 over top of that in order to get a version of Lilypond
> that would report itself as using Guile 2.2, but if the build was still
> partly using Slackware's packaged Guile 3.0 somehow, that could explain
> the difference in our results.



As David pointed out, there are no-break spaces on lines 38 and 39, which you 
need to convert to normal spaces.

Now I understand why I did not get the error; I use Frescobaldi, which 
apparently tried to be helpful (in this case a little too helpful) by 
auto-converting them.




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


Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread mskala
On Sat, 27 May 2023, David Kastrup wrote:

> which contains a delirious number of unbreakable spaces, code \xa0
> instead of \x20 as for a normal, breakable space.

Thanks!  Correcting these seems to have fixed the problem, at least for
the moment.

I don't know why the old version needed *some* of the non-breaking spaces
to be changed to regular spaces and did not require this of *all* of them,
nor why the new version would be different.  But that's not important.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread mskala
On Sat, 27 May 2023, Jean Abou Samra wrote:

> Are you sure that this is the correct example? That the file chord.ly it
> uses is the same as the one you sent? That LilyPond is the one you believe
> and unpatched, etc. ?

Yes, using the chord.ly file I attached to my message, extracted from the
message as it came back through the mailing list, with the three-line
input cut and pasted from my message as it came back through the mailing
list, and the version of Lilypond I compiled from the sources in the file
lilypond-2.24.1.tar.gz downloaded from the lilypond.org Web site, I get
these messages:

GNU LilyPond 2.24.1 (running Guile 2.2)
Processing `test.ly'
Parsing...ERROR: In procedure %resolve-variable:
Unbound variable: #{ }#

> I can't reproduce your problem (on Fedora); it compiles fine for me and
> prints a single MM rest.

Interesting.  What's the provenance of your Lilypond executable - did you
also compile from source, or use a Fedora package?

I wonder if the issue could be with my Guile 2.2 installation, which I
also compiled from sources.  I'm using Slackware, which does not have a
Guile 2.2 package, having skipped all the way to version 3.  I had to
install Guile 2.2 over top of that in order to get a version of Lilypond
that would report itself as using Guile 2.2, but if the build was still
partly using Slackware's packaged Guile 3.0 somehow, that could explain
the difference in our results.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/

Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes:

> Here's a small example showing the problem:
>
> \include "chord.ly"
> music = { 1 }
> { \extractNote #3 \music }
>
> In version 2.21.0 that produces a whole-note rest.  In version 2.24.1 with
> Guile 2.2 it gives this error output:
>
> GNU LilyPond 2.24.1 (running Guile 2.2)
> Processing `test.ly'
> Parsing...ERROR: In procedure %resolve-variable:
> Unbound variable: #{ }#
>
> Lilypond 2.24.1 compiled with Guile 3.0.9 also gives this error.
>
> I attach the version of chord.ly I'm using, which I got from the 2015
> discussion.  I found these links helpful at that time and I think one of
> them contained the original for this version of chord.ly:
>   http://gillesth.free.fr/Lilypond/chord/
>   http://www.lilypondforum.de/index.php?topic=2080.msg11479#msg11479

Your way of "getting chord.ly from the 2015 discussion" is broken.  To
wit, it contains a line

 ((null? res) (let ((note (list-ref notes (1- len ; last note
    (make-music 'RestEvent 'duration (ly:music-property note 
'duration

which contains a delirious number of unbreakable spaces, code \xa0
instead of \x20 as for a normal, breakable space.

Both Guile and LilyPond treat the unbreakable space as a normal
character instead of a space character.  Please fix your input file to
stop containing unbreakable space characters and also make sure that the
comment

; last note

is not continued with unbreakable space characters into further code
which turns it into a no-show for Guile.

Once you fix your unbreakable space as well as missing linebreak after
comment problems, things will likely look more normal.

-- 
David Kastrup



Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread Jean Abou Samra
Le samedi 27 mai 2023 à 16:31 -0400, msk...@ansuz.sooke.bc.ca a écrit :
> Here's a small example showing the problem:
> 
> \include "chord.ly"
> music = { 1 }
> { \extractNote #3 \music }
> 
> In version 2.21.0 that produces a whole-note rest.  In version 2.24.1 with
> Guile 2.2 it gives this error output:
> 
> GNU LilyPond 2.24.1 (running Guile 2.2)
> Processing `test.ly'
> Parsing...ERROR: In procedure %resolve-variable:
> Unbound variable: #{ }#
> 
> Lilypond 2.24.1 compiled with Guile 3.0.9 also gives this error.



Are you sure that this is the correct example? That the file chord.ly it uses 
is the same as the one you sent? That LilyPond is the one you believe and 
unpatched, etc. ?

I can't reproduce your problem (on Fedora); it compiles fine for me and prints 
a single MM rest.


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


chord.ly to extract notes from chords breaks with new Guile

2023-05-27 Thread mskala
Back in 2015 people on the list helped me with extracting notes from
chords, in this thread:
   https://lists.gnu.org/archive/html/lilypond-user/2015-09/msg00394.html

The solution from 2015 has broken now, in the transition between versions
2.21.0 and 2.24.1.  I think it's because of changes in Guile 2.2.  I
haven't had the opportunity to test with versions strictly between 2.21.0
and 2.24.1.

My situation is that I have music containing chords which I want to play
on a monophonic synthesizer, by generating separate MIDI tracks such that
in each track there is only one note playing at a time.  After recording
the tracks separately I'll mix the audio files.  So I'd like to have a
function I can call that takes in music with multi-note chords and selects
just one note from each chord.  Making it a little more complicated, the
number of notes in the chords varies, including some single notes that
Lilypond may represent internally as different from "chords."  I need to
generate as many tracks as the maximum number of notes that will play
simultaneously, but have silence in the extra tracks at times when there
are fewer notes playing than there are tracks.

So, for instance, if my input looks like
  { c4 4 4 }

then I want to generate tracks that might look like
  { c4 c4 c4 }
  { r4 e4 e4 }
  { r4 r4 g4 }

It's not important which tracks get which notes and which tracks get
silence; all that matters is that the union of the output tracks should be
the same notes that were in the input, with silence assigned to
unused tracks.  It would be nice if it could handle more complicated
structures of overlapping notes like
  << { c2 } { d4 e4 } >>

but the solution I've been using since 2015 doesn't, there are some
foreseeable problems with doing that in the general case, and it's not my
main concern right now.  The main issue is that I want my existing files
that work to continue working in more recent Lilypond.

This is a near-dealbreaker for me using a more recent Lilypond at all - I
could and might fix it by just sticking to 2.21.0 indefinitely - but I'd
really like to also be able to override midiDrumPitches, which seems to be
new in some version more recent than 2.21.

Here's a small example showing the problem:

\include "chord.ly"
music = { 1 }
{ \extractNote #3 \music }

In version 2.21.0 that produces a whole-note rest.  In version 2.24.1 with
Guile 2.2 it gives this error output:

GNU LilyPond 2.24.1 (running Guile 2.2)
Processing `test.ly'
Parsing...ERROR: In procedure %resolve-variable:
Unbound variable: #{ }#

Lilypond 2.24.1 compiled with Guile 3.0.9 also gives this error.

I attach the version of chord.ly I'm using, which I got from the 2015
discussion.  I found these links helpful at that time and I think one of
them contained the original for this version of chord.ly:
  http://gillesth.free.fr/Lilypond/chord/
  http://www.lilypondforum.de/index.php?topic=2080.msg11479#msg11479

but those links are both dead now, making it difficult for me to figure
out exactly which changes I applied to get it to work in 2015.  The
version currently in LSR snippet number 545 does not give the unbound
variable error, but it is dated earlier, and it has the problem for which
I started the 2015 thread:  on an out-of-range index it just returns the
last note (d in my example) instead of returning silence.

The present error output seems to be specific to the case of extracting a
note that doesn't exist, such as the third note of a two-note chord in my
example.  It works without error if I only ask for notes that exist.
However, I can't really avoid giving an out-of-range index; being able to
do that and get silence is a big part of the point of the exercise.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/%% version Y/M/D = 2015/03/23
%% LSR = http://lsr.di.unimi.it/LSR/Item?u=1=761
%% LSR = http://lsr.di.unimi.it/LSR/Item?u=1=545
%% for Lilypond 2.16 or higher.
%% last major change in extract-note function : as \tuplet as now
%% a 'duration property, we have to deal with this special case.
%% by chord->note. You can now specified several numbers, to
%% extract several notes at one time

#(define (noteEvent? music)
(eq? (ly:music-property music 'name) 'NoteEvent))

#(define (no-duration? music)
(not (ly:duration? (ly:music-property music 'duration

#(define (expand-q-chords music); for q chords : see chord-repetition-init.ly
(expand-repeat-chords! (list 'rhythmic-event) music))

%%  extractNote  %
#(define tagNotExtractNote (gensym))
#(use-modules (ice-9 receive)) %% for the use of receive

#(define (chord->note chord n . args)
"Return either the note n of chord chord, keeping articulations or if other
numbers are specified in args, a chord with the matching notes."
(receive (notes others)
 (partition noteEvent? (ly:music-property chord 'elements))
 (

Re: New list admin

2023-01-13 Thread Jean Abou Samra

Le 10/01/2023 à 22:17, Jean Abou Samra a écrit :

In order to increase the bus factor, I would like to
nominate one or two other regulars as admins. If you
feel like it, please let me know.




Thanks to Mark Knoop for accepting this task. He is now a co-admin.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


New list admin

2023-01-10 Thread Jean Abou Samra

Hi,

As per the discussion last October
(https://lists.gnu.org/archive/html/lilypond-user/2022-10/msg00047.html)
I have been made an admin for the lilypond-user, lilypond-devel
and bug-lilypond mailing lists. (If you're wondering, there was
some delay on the GNU side).

I don't view this as holding some kind of authority, but just
being responsible for some administrivia, namely rejecting spam and
accepting the rest, and providing assistance in case people need
help with using the list.

I have updated the list info pages such as
https://lists.gnu.org/mailman/listinfo/lilypond-user
to include some useful information and make the
subscription options easier to find. (The new style
was borrowed from the lilypond-user-fr list info page,
originally written by Valentin Villenave, thank
you Valentin.)

I have also removed the footer that got inserted
at the bottom of each post on bug-lilypond, because
neither lilypond-user nor lilypond-devel do this, and
as someone noted some time ago, it breaks DKIM signatures.

In order to increase the bus factor, I would like to
nominate one or two other regulars as admins. If you
feel like it, please let me know.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Frescobaldi and new Lilypond statements

2022-12-23 Thread Laurie Savage
Hi,

I'll post this to the Frescobaldi team as well.

I'm running Frescobaldi 3.2 and Lilypond 2.24.0. Frescobaldi isn't aware of
\section, \sectionLabel, or \fine. There may be others but these are the
ones I've noticed. To explain a little more, none of these commands appear
in the dropdown lists after I start typing \se ...

I've set the preferences for Frescobaldi to use 2.24.0 and I've used
convert-ly, no problems there.

Any suggestion how I can force Frescobaldi to identify new commands? I
haven't seen this behaviour in the seven years I've been using both.

Laurie Savage
https://www.queensofthewest.com/


Re: 2.23.81 coda in new staff or after blank space

2022-11-30 Thread Paul Scott



On 11/29/22 04:06, Jean Abou Samra wrote:

Le 28/11/2022 à 06:17, Paul Scott a écrit :
My current code involves a separate \score for the coda as I learned 
here a long time ago. As with the blank space question I haven't yet 
figured out how accomplish this with the new Segno structure.




It's still possible to use several scores:


\version "2.23.81"

{
  \repeat segno 2 {
    c'1 1 1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  \section
}

{
  \sectionLabel "Coda"
  d'1 \fine
}




If you would prefer correct MIDI, you could also use
https://lsr.di.unimi.it/LSR/Item?id=1098, but be sure
to read all the small print.


Thank you,

Paul





Re: 2.23.81 coda in new staff or after blank space

2022-11-29 Thread Jean Abou Samra

Le 28/11/2022 à 06:17, Paul Scott a écrit :
My current code involves a separate \score for the coda as I learned 
here a long time ago. As with the blank space question I haven't yet 
figured out how accomplish this with the new Segno structure.




It's still possible to use several scores:


\version "2.23.81"

{
  \repeat segno 2 {
    c'1 1 1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  \section
}

{
  \sectionLabel "Coda"
  d'1 \fine
}



If you would prefer correct MIDI, you could also use
https://lsr.di.unimi.it/LSR/Item?id=1098, but be sure
to read all the small print.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 blank bar of new line between D.S. and coda

2022-11-27 Thread Paul Scott

On 11/27/22 5:38 PM, Jean Abou Samra wrote:



Le 25/11/2022 à 04:08, Paul Scott a écrit :
How do I add a totally blank bar (something like \stopStaff s1 
\startStaff) between the D.S. and the Coda in the following example?


Or a new line?

\version "2.23.81"

music = {
  \repeat segno 2 {
    c'1 1 1
    \alternative{
  \volta 2 \volta #'() {
    \section
    \sectionLabel "Coda"
  }
    }
    c'1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  d'1 \bar "|."
}



For me, this works:

\version "2.23.81"

{
  \repeat segno 2 {
    c'1 1 1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  \stopStaff
  s1*4
  \startStaff
  \section
  \sectionLabel "Coda"
  d'1 \bar "|."
}


Of course your code works fine.  My real code has a repeat volta 2 
\alternative ... before the D.S, which I hope to figure out myself.



Note that this doesn't have your "c'1" before \once \set ...
Was that one intended? 

That was an incorrect attempt to get the rest of the structure that I need.

The way you wrote it, the first
note in the section marked "Coda" is actually already
played the first time, and "D.S. Al Coda with Repeats"
appears one measure after "Coda" (as is clear if you
change \column { ... } to \column \right-align { ... } ).


Yes, I do know how to change stuff in the \markup { ... } to get what I 
want.


Thank you very much,

Paul





Re: 2.23.81 coda in new staff or after blank space

2022-11-27 Thread Paul Scott

On 11/27/22 5:24 PM, Jean Abou Samra wrote:

Le 15/11/2022 à 21:37, Paul Scott a écrit :

The new segno repeat structure is great!

Most codas I am used to are either in a new indented staff (which I 
know how to do before the new segno repeat structure) or after some 
blank space on the same line/staff as the previous music.


How can I  do either of these with the new segno repeat structure?



What code are you using for having a new indented staff? I would 
expect it to apply as-is with new segno repeats.


My current code involves a separate \score for the coda as I learned 
here a long time ago. As with the blank space question I haven't yet 
figured out how accomplish this with the new Segno structure.




For the blank space approach, I'll reply on your newer question.

Best,
Jean


Cheers,

Paul





Re: 2.23.81 blank bar of new line between D.S. and coda

2022-11-27 Thread Jean Abou Samra



Le 25/11/2022 à 04:08, Paul Scott a écrit :
How do I add a totally blank bar (something like \stopStaff s1 
\startStaff) between the D.S. and the Coda in the following example?


Or a new line?

\version "2.23.81"

music = {
  \repeat segno 2 {
    c'1 1 1
    \alternative{
  \volta 2 \volta #'() {
    \section
    \sectionLabel "Coda"
  }
    }
    c'1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  d'1 \bar "|."
}



For me, this works:

\version "2.23.81"

{
  \repeat segno 2 {
    c'1 1 1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  \stopStaff
  s1*4
  \startStaff
  \section
  \sectionLabel "Coda"
  d'1 \bar "|."
}


Note that this doesn't have your "c'1" before \once \set ...
Was that one intended? The way you wrote it, the first
note in the section marked "Coda" is actually already
played the first time, and "D.S. Al Coda with Repeats"
appears one measure after "Coda" (as is clear if you
change \column { ... } to \column \right-align { ... } ).

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 coda in new staff or after blank space

2022-11-27 Thread Jean Abou Samra

Le 15/11/2022 à 21:37, Paul Scott a écrit :

The new segno repeat structure is great!

Most codas I am used to are either in a new indented staff (which I 
know how to do before the new segno repeat structure) or after some 
blank space on the same line/staff as the previous music.


How can I  do either of these with the new segno repeat structure?



What code are you using for having a new indented staff? I would expect 
it to apply as-is with new segno repeats.


For the blank space approach, I'll reply on your newer question.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


2.23.81 blank bar of new line between D.S. and coda

2022-11-24 Thread Paul Scott
How do I add a totally blank bar (something like \stopStaff s1 
\startStaff) between the D.S. and the Coda in the following example?


Or a new line?

\version "2.23.81"

music = {
  \repeat segno 2 {
    c'1 1 1
    \alternative{
  \volta 2 \volta #'() {
    \section
    \sectionLabel "Coda"
  }
    }
    c'1
    \once \set Score.dalSegnoTextFormatter =
    #(lambda (context repeat-count markups)
  #{ \markup \column { "D.S." "Al Coda" "with Repeats" } #})
  }
  d'1 \bar "|."
}

TIA,

Paul




Re: 2.23.81 new D.S. code

2022-11-16 Thread David Wright
On Wed 16 Nov 2022 at 06:21:41 (-0500), Kieren MacMillan wrote:
> 
> >> What about creating all the parts for a score? I certainly
> >> don't want to type all the common structure in each part.
> > If you type the structure first, then as you use emacs, it's easy to
> > copy and paste sufficient copies of it before you enter the notes.
> 
> Okay… but yet another reason composing directly into Lilypond is suboptimal 
> and potentially frustrating.  =\

Well, the OP did write "I'm a copyist not a composer", and my
suggestion was merely to avoid them some typing (although
anybody who's used an editor for years is unlikely to need it).

> I often typeset scores with 40 or more staves; having to make changes in that 
> many places is time-consuming and error-prone.

And Jean responds with a fix in short order—just like you with your scores!

Cheers,
David.


Re: 2.23.81 new D.S. code

2022-11-16 Thread Jean Abou Samra

Le 16/11/2022 à 12:21, Kieren MacMillan a écrit :

What about creating all the parts for a score? I certainly
don't want to type all the common structure in each part.

If you type the structure first, then as you use emacs, it's easy to
copy and paste sufficient copies of it before you enter the notes.

Okay… but yet another reason composing directly into Lilypond is suboptimal and 
potentially frustrating.  =\

I often typeset scores with 40 or more staves; having to make changes in that 
many places is time-consuming and error-prone.




Depending on what sort of thing you may want to change,
a music function could be a solution, e.g.

\version "2.23.81"

part =
#(define-music-function (main volta1 volta2) (ly:music? ly:music? ly:music?)
   #{
 \new Staff \repeat segno 2 {
   #main
   \alternative {
 \volta 1 #volta1
 \volta 2 \volta #'() {
   \section
   \sectionLabel Coda
 }
   }
 }
 #volta2
   #})

<<
  \part { c'1 } { d'1 } { e'1 }
  \part { f'1 } { g'1 } { a'1 }
>>



Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-16 Thread Kieren MacMillan
Hi all,

>> What about creating all the parts for a score? I certainly
>> don't want to type all the common structure in each part.
> If you type the structure first, then as you use emacs, it's easy to
> copy and paste sufficient copies of it before you enter the notes.

Okay… but yet another reason composing directly into Lilypond is suboptimal and 
potentially frustrating.  =\

I often typeset scores with 40 or more staves; having to make changes in that 
many places is time-consuming and error-prone.

Cheers,
Kieren.


Re: 2.23.81 coda in new staff or after blank space

2022-11-15 Thread Benjamin Tordoff
+1 to Paul’s question.

I have a couple of different work-arounds for formatting dc + coda that I used 
in the past. Having converted to the new segno/section tools the codas in the 
player parts are a little harder to read. 

For multi-bar codas that fill one or more lines  I can insert a line-break so 
that they become easier to spot. However pieces like Vaughan-William’s Folk 
Song Suite where the coda is only one or two bars long are typically set with a 
small blank space (ie no stave at all) between dc and coda instead. I’ve yet to 
find a good way to do this whilst also using the new segno system. (Not that my 
old way was particular good either…)

That said, the new segno repeats look better than my work-around and mean I can 
give players accurate midi/mp3 parts to practice along to without tedious 
cut-and-paste in GarageBand. A huge saving.

Thanks

Ben

> On 15 Nov 2022, at 20:38, Paul Scott  wrote:
> 
> The new segno repeat structure is great!
> 
> Most codas I am used to are either in a new indented staff (which I know how 
> to do before the new segno repeat structure) or after some blank space on the 
> same line/staff as the previous music.
> 
> How can I  do either of these with the new segno repeat structure?
> 
> TIA,
> 
> Paul
> 
> 
> 



Re: 2.23.81 new D.S. code

2022-11-15 Thread David Wright
On Tue 15 Nov 2022 at 14:41:28 (-0700), Paul Scott wrote:
> On 11/15/22 1:57 PM, Jean Abou Samra wrote:
> > Le 15/11/2022 à 21:50, Paul Scott a écrit :
> > > What about creating all the parts for a score? I certainly
> > > don't want to type all the common structure in each part.

If you type the structure first, then as you use emacs, it's easy to
copy and paste sufficient copies of it before you enter the notes.

> > It is really that troublesome? It's the way it's intended to be used.
> Can you show me where the documentation says that?
> > 
> > You will find that \section and \fine only affect their staff,
> I have already NOT found that.
> > so you're already forced to duplicate those.
> 
> No.
> 
> 
> > Also, \unfoldRepeats
> > will not work correctly if you don't use \repeat segno everywhere.
> 
> I've never needed to use unfoldrepeats.  I'm a copyist not a composer.

I produce copies for people who appreciate MIDI versions of the score
± their parts. You need \unfoldRepeats to generate the MIDI correctly.

Cheers,
David.


Re: 2.23.81 new D.S. code

2022-11-15 Thread Kieren MacMillan
Hi Jean,

> Clearer documentation would be a good first step, but my ultimate
> wish would be a warning if this construct is used

Yes, please!

> because Hyrum's law

That's the second apparently-reasonably-widely-known thing I learned about 
today!
(The other was the Mendoza line.)

Thanks for [once again] making me a little smarter than I was before.
— Kieren


Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 23:03, Kieren MacMillan a écrit :

It’s not for you to sweat about, though it will be nice to make things explicit 
in the documentation so nobody else builds up a 20-plus-year library of 
minefield-laden scores.




Clearer documentation would be a good first step, but my ultimate
wish would be a warning if this construct is used, because Hyrum's
law implies that even if it's documented as discouraged, (some)
people will do it anyway. (And then ask about why it's not working,
one recent example being 
https://lists.gnu.org/archive/html/lilypond-user/2022-10/msg00236.html)





OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Kieren MacMillan
Hi Jean (et al.),

>> Interesting! It makes sense, of course… but I must admit that I have been 
>> using \repeat in my \global variable and NOT in my other note variables for 
>> my entire time using Lilypond, and [as far as I know] never ran into a 
>> problem. I really did think it was the recommended method, since (like all 
>> global matters) it’s easier to keep in sync when it’s in one place only.
>> I’ll do my best to unlearn that coding practice going forward (and update 
>> older scores the next time I revisit each).
> 40 minutes ago, I wrote in
> https://gitlab.com/lilypond/lilypond/-/issues/6373#note_1173210040:
> "https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00206.html is 
> giving me a cold sweat ..."
> Now the sweat is starting to freeze ...

My apologies for pouring on the liquid nitrogen…  =)

To be honest, my recent forays into polymeter would surely have demonstrated my 
folly had any of my polymetric scores involved repeats. It’s not for you to 
sweat about, though it will be nice to make things explicit in the 
documentation so nobody else builds up a 20-plus-year library of 
minefield-laden scores.

Cheers,
Kieren.


Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 22:51, Kieren MacMillan a écrit :

Hi all,


On Nov 15, 2022, at 4:20 PM, Jean Abou Samra  wrote:
\repeat, on the other hand, is a command that does not stand alone
but transforms a piece of music. It should be applied to all music
that it is supposed to transform.

Interesting! It makes sense, of course… but I must admit that I have been using 
\repeat in my \global variable and NOT in my other note variables for my entire 
time using Lilypond, and [as far as I know] never ran into a problem. I really 
did think it was the recommended method, since (like all global matters) it’s 
easier to keep in sync when it’s in one place only.

I’ll do my best to unlearn that coding practice going forward (and update older 
scores the next time I revisit each).



40 minutes ago, I wrote in
https://gitlab.com/lilypond/lilypond/-/issues/6373#note_1173210040:
"https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00206.html 
is giving me a cold sweat ..."

Now the sweat is starting to freeze ...



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

On 11/15/22 2:51 PM, Kieren MacMillan wrote:

Hi all,


On Nov 15, 2022, at 4:20 PM, Jean Abou Samra  wrote:
\repeat, on the other hand, is a command that does not stand alone
but transforms a piece of music. It should be applied to all music
that it is supposed to transform.

Interesting! It makes sense, of course… but I must admit that I have been using 
\repeat in my \global variable and NOT in my other note variables for my entire 
time using Lilypond, and [as far as I know] never ran into a problem. I really 
did think it was the recommended method, since (like all global matters) it’s 
easier to keep in sync when it’s in one place only.

I’ll do my best to unlearn that coding practice going forward (and update older 
scores the next time I revisit each).


As a copyist (and programmer) I don't intend to unlearn that unless I'm 
forced to..


Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 22:46, Paul Scott a écrit :


Did you see the documentation advising mismatched \repeat-s across
staves?


No, can you point me to it?




See my previous message. The documentation does not do it apart from
one example that is considered a documentation bug.



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 22:41, Paul Scott a écrit :


On 11/15/22 1:57 PM, Jean Abou Samra wrote:

Le 15/11/2022 à 21:50, Paul Scott a écrit :
What about creating all the parts for a score? I certainly don't 
want to type all the common structure in each part.




It is really that troublesome? It's the way it's intended to be used.

Can you show me where the documentation says that?




The first sentence of
https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats.html#simple-repeats
is

"This is the syntax for a repeat without variation:

   \repeat volta repeatcount musicexpr 


where musicexpr is the music expression to be repeated."

Note: "musicexpr is the music expression to be repeated".
Implying that \repeat volta { ... } in a "timing" variable
is trying to repeat a sequence of spacer rests.

Afterwards:

|"\repeat segno| differs from |\repeat volta| only in the resulting 
notation."


I do agree that the recommendation against differing repeat
structures is not blindingly obvious, and this is partly
the topic of this issue:

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

where you can see that one doc example was accidentally using
differing repeat structures, and it broke in the course of
the 2.23 series.

And I was already worried about compatibility back then ...





You will find that \section and \fine only affect their staff,

I have already NOT found that.
so you're already forced to duplicate those. 


No.




Try

\version "2.23.81"

<<
  \new Staff { c'1 \section }
  \new Staff { c'1 }
>>

and you will see that only the first staff has a double
bar line.

So, this won't work:


\version "2.23.81"

timing = {
  s1
  \section
}

<<
  \new Staff << \timing { c'1 } >>
  \new Staff { c'1 }
>>


Although this *will* work (and is supported):


\version "2.23.81"

timing = {
  s1
  \section
}

<<
  \new Staff << \timing { c'1 } >>
  \new Staff << \timing { c'1 } >>
>>




OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Kieren MacMillan
Hi all,

> On Nov 15, 2022, at 4:20 PM, Jean Abou Samra  wrote:
> \repeat, on the other hand, is a command that does not stand alone
> but transforms a piece of music. It should be applied to all music
> that it is supposed to transform.

Interesting! It makes sense, of course… but I must admit that I have been using 
\repeat in my \global variable and NOT in my other note variables for my entire 
time using Lilypond, and [as far as I know] never ran into a problem. I really 
did think it was the recommended method, since (like all global matters) it’s 
easier to keep in sync when it’s in one place only.

I’ll do my best to unlearn that coding practice going forward (and update older 
scores the next time I revisit each).

Thanks,
Kieren.



Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott



On 11/15/22 2:20 PM, Jean Abou Samra wrote:

Le 15/11/2022 à 22:10, Paul Scott a écrit :

On 11/15/22 13:57, Jean Abou Samra wrote:
It is really that troublesome? 

Yes.

It's the way it's intended to be used.


?? I learned much of what I do here and, of course, in the documentation

I hope others will comment on this.  I'm sure I've seen structures 
like min advised on the list.




Structures with << \timing \staffMusic >> ? Sure. You can use
that for all sorts of syntax elements that stand alone, like
\mark, \tempo, \textMark / \textEndMark. There is nothing bad
with that, it is supported (there is no reason not to support it)
and the documentation advises it.

\repeat, on the other hand, is a command that does not stand alone
but transforms a piece of music. It should be applied to all music
that it is supposed to transform.

Did you see the documentation advising mismatched \repeat-s across
staves?


No, can you point me to it?

Cheers,

Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott



On 11/15/22 1:57 PM, Jean Abou Samra wrote:

Le 15/11/2022 à 21:50, Paul Scott a écrit :
What about creating all the parts for a score? I certainly don't want 
to type all the common structure in each part.




It is really that troublesome? It's the way it's intended to be used.

Can you show me where the documentation says that?


You will find that \section and \fine only affect their staff,

I have already NOT found that.
so you're already forced to duplicate those. 


No.



Also, \unfoldRepeats
will not work correctly if you don't use \repeat segno everywhere.


I've never needed to use unfoldrepeats.  I'm a copyist not a composer.

Paul







I certainly this doesn't break in the future.



"Certainly hope", I suppose? But there is no guarantee.

Regards,
Jean





Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 22:10, Paul Scott a écrit :

On 11/15/22 13:57, Jean Abou Samra wrote:
It is really that troublesome? 

Yes.

It's the way it's intended to be used.


?? I learned much of what I do here and, of course, in the documentation

I hope others will comment on this.  I'm sure I've seen structures 
like min advised on the list.




Structures with << \timing \staffMusic >> ? Sure. You can use
that for all sorts of syntax elements that stand alone, like
\mark, \tempo, \textMark / \textEndMark. There is nothing bad
with that, it is supported (there is no reason not to support it)
and the documentation advises it.

\repeat, on the other hand, is a command that does not stand alone
but transforms a piece of music. It should be applied to all music
that it is supposed to transform.

Did you see the documentation advising mismatched \repeat-s across
staves?

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

On 11/15/22 13:57, Jean Abou Samra wrote:

Le 15/11/2022 à 21:50, Paul Scott a écrit :
What about creating all the parts for a score? I certainly don't want 
to type all the common structure in each part.




It is really that troublesome? 

Yes.

It's the way it's intended to be used.


?? I learned much of what I do here and, of course, in the documentation

I hope others will comment on this.  I'm sure I've seen structures like 
min advised on the list.




You will find that \section and \fine only affect their staff,
so you're already forced to duplicate those. Also, \unfoldRepeats
will not work correctly if you don't use \repeat segno everywhere.



I certainly this doesn't break in the future.



"Certainly hope", I suppose? But there is no guarantee.


Yes, I omitted "hope"

Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 21:50, Paul Scott a écrit :
What about creating all the parts for a score? I certainly don't want 
to type all the common structure in each part.




It is really that troublesome? It's the way it's intended to be used.

You will find that \section and \fine only affect their staff,
so you're already forced to duplicate those. Also, \unfoldRepeats
will not work correctly if you don't use \repeat segno everywhere.



I certainly this doesn't break in the future.



"Certainly hope", I suppose? But there is no guarantee.

Regards,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

On 11/15/22 1:42 PM, Jean Abou Samra wrote:

By the way, I would strongly discourage your score structure:

\version "2.23.81"

timing = {
  [\repeat segno stuff]
}

music = \fixed c' {
  [without \repeat segno]
}

\score { \new Staff << \timing \music >> }

LilyPond does not make efforts to support differing repeat
structures across voices / staves / parallel music expressions.
Sometimes it works, sometimes it does not. Potentially, it
could break in a future version. (This has partly happened
with volta repeats in 2.23.)

It is much preferable to use \repeat segno in all parallel
expressions, i.e., get rid of your timing variable (unless
you have other stuff in it) and use \repeat segno in the
music itself. (In all voices / staves / ...)


What about creating all the parts for a score?  I certainly don't want 
to type all the common structure in each part.


I certainly this doesn't break in the future.

Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

By the way, I would strongly discourage your score structure:

\version "2.23.81"

timing = {
  [\repeat segno stuff]
}

music = \fixed c' {
  [without \repeat segno]
}

\score { \new Staff << \timing \music >> }



LilyPond does not make efforts to support differing repeat
structures across voices / staves / parallel music expressions.
Sometimes it works, sometimes it does not. Potentially, it
could break in a future version. (This has partly happened
with volta repeats in 2.23.)

It is much preferable to use \repeat segno in all parallel
expressions, i.e., get rid of your timing variable (unless
you have other stuff in it) and use \repeat segno in the
music itself. (In all voices / staves / ...)

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


2.23.81 coda in new staff or after blank space

2022-11-15 Thread Paul Scott

The new segno repeat structure is great!

Most codas I am used to are either in a new indented staff (which I know 
how to do before the new segno repeat structure) or after some blank 
space on the same line/staff as the previous music.


How can I  do either of these with the new segno repeat structure?

TIA,

Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

I forgot to send my reply to the list that I figured out 1.

On 11/15/22 11:16 AM, Jean Abou Samra wrote:

Le 15/11/2022 à 19:10, Paul Scott a écrit :

I'm, trying to learn the new segno repeat structure.

1. Why do I get a second staff?




This has nothing to do with segno repeats, you'll get the same with

\version "2.23.81"

<<
  { c }
  { c' }
>>

The fix isto use


\score { \new Staff << \timing \music >> }

instead of


\score { << \timing \music >> }



2. What does \volta #'() do?


It removes the music if repeats are unfolded by
\unfoldRepeats.



Thank you,

Paul





Re: 2.23.81 new D.S. code

2022-11-15 Thread Jean Abou Samra

Le 15/11/2022 à 19:10, Paul Scott a écrit :

I'm, trying to learn the new segno repeat structure.

1. Why do I get a second staff?




This has nothing to do with segno repeats, you'll get the same with

\version "2.23.81"

<<
  { c }
  { c' }
>>

The fix isto use


\score { \new Staff << \timing \music >> }

instead of


\score { << \timing \music >> }



2. What does \volta #'() do?


It removes the music if repeats are unfolded by
\unfoldRepeats.

Best,
Jean




OpenPGP_signature
Description: OpenPGP digital signature


Re: 2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

I just answered 1. by adding \new Staff \new Voice in the score block.

On 11/15/22 11:10 AM, Paul Scott wrote:

I'm, trying to learn the new segno repeat structure.

1. Why do I get a second staff?

2. What does \volta #'() do?

TIA for any help.

Paul





2.23.81 new D.S. code

2022-11-15 Thread Paul Scott

I'm, trying to learn the new segno repeat structure.

1. Why do I get a second staff?

2. What does \volta #'() do?

TIA for any help.

Paul

\version "2.23.81"

timing = {
  \set Score.dalSegnoTextFormatter = #format-dal-segno-text-brief
  s1
  \repeat segno 2 {
s1
\alternative {
  \volta 1 {
	s1 
  }
  \volta 2 \volta #'() {
\section
\sectionLabel "Coda"
  }
}
  }
  s1
  \fine
}

music = \fixed c' {
  c1 d e f   
}

\score { << \timing \music >> }



Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread Jean Abou Samra

Le 04/11/2022 à 14:43, David Kastrup a écrit :

Jean Abou Samra  writes:



P.S. The Internals Reference gives a (quite technical) explanation of
make-relative:

https://lilypond.org/doc/v2.23/Documentation/internals/scheme-functions

That description is a bunch of incomprehensible gobbledegook unsuitable
for figuring out anything you don't know already.



For the record, this discussion led to
https://gitlab.com/lilypond/lilypond/-/merge_requests/1711
and
https://gitlab.com/lilypond/lilypond/-/merge_requests/1712

Best,
Jean




OpenPGP_signature
Description: OpenPGP digital signature


Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread Jean Abou Samra

Le 04/11/2022 à 15:20, David Kastrup a écrit :

Ok, I'll give the doc text another try, but the documentation block in
the manual starts with:

 Macro: make-relative …

which is missing the input arguments from

 (define-syntax-rule-public (make-relative (variables ...) reference music)

Is that fixable in some manner?  If necessary, creating a
LilyPond-specific version of define-syntax-rule-public ?




Guile doesn't give us the arguments from the header of a
define-syntax-rule, at least not in the same way it does
for procedures.

$ ~/lilies/2.23.80/bin/lilypond scheme-sandbox
GNU LilyPond 2.23.80 (running Guile 2.2)
[...]
scheme@(#{ g101}#)> (use-modules (ice-9 session))
scheme@(#{ g101}#)> (procedure-arguments (macro-transformer (module-ref 
(current-module) 'make-relative)))
$1 = ((required x) (optional) (keyword) (allow-other-keys? . #f) (rest . 
#f))



It says there is a single argument "x" to the syntax transformer,
which is indeed true considering that it is a procedure taking
a single syntax object. Essentially,

(define-syntax-rule (name )
  )

expands to

(define-syntax name
  (lambda (x)
    (syntax-case x ()
  ((_ )
   (syntax )

The lambda ends up having "x" as its only argument. I don't believe
Guile retains the info of what  is as some sort of metadata on
the lambda.

Of course, you could change the definition of
define-syntax-rule-public in lily.scm from

(define-syntax-rule (define-syntax-rule-public (name . args) . rest)
  (begin
    (define-syntax-rule (name . args) . rest)
    (export name)))

to

(define single-rule-macro-signature (make-object-property))

(define-syntax-rule (define-syntax-rule-public (name . args) . rest)
  (begin
    (define-syntax-rule (name . args) . rest)
    (set! (single-rule-macro-signature (module-ref (current-module) 'name))
  'args)
    (export name)))


and then use that in the doc autogeneration.

That being said ... a quick git grep shows only one site, make-relative,
where this could be somewhat useful. In your shoes, I would not bother
doing this and just mention the signature in the docstring itself in
plain English.

Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread David Kastrup
David Kastrup  writes:

> Jean Abou Samra  writes:
>
>> Le 04/11/2022 à 12:09, Jean Abou Samra a écrit :
>>> Also, you will have surprises with \relative because
>>> the note appears twice, with its octave marks. You
>>> can use make-relative to fix that.
>>
>> P.S. The Internals Reference gives a (quite technical) explanation of
>> make-relative:
>>
>> https://lilypond.org/doc/v2.23/Documentation/internals/scheme-functions
>
> That description is a bunch of incomprehensible gobbledegook unsuitable
> for figuring out anything you don't know already.
>
> Whoever wrote that...  Wait, that was me.
>
> Scheme function doc strings were not printed in the manuals back then
> but that is not much of a defense.  Maybe I need to try again.  Or
> someone else, assuming that anybody understands what this is supposed to
> do.

Ok, I'll give the doc text another try, but the documentation block in
the manual starts with:

Macro: make-relative …

which is missing the input arguments from

(define-syntax-rule-public (make-relative (variables ...) reference music)

Is that fixable in some manner?  If necessary, creating a
LilyPond-specific version of define-syntax-rule-public ?

-- 
David Kastrup



Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread David Kastrup
Jean Abou Samra  writes:

> Le 04/11/2022 à 12:09, Jean Abou Samra a écrit :
>> Also, you will have surprises with \relative because
>> the note appears twice, with its octave marks. You
>> can use make-relative to fix that.
>
> P.S. The Internals Reference gives a (quite technical) explanation of
> make-relative:
>
> https://lilypond.org/doc/v2.23/Documentation/internals/scheme-functions

That description is a bunch of incomprehensible gobbledegook unsuitable
for figuring out anything you don't know already.

Whoever wrote that...  Wait, that was me.

Scheme function doc strings were not printed in the manuals back then
but that is not much of a defense.  Maybe I need to try again.  Or
someone else, assuming that anybody understands what this is supposed to
do.

-- 
David Kastrup



Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread Jean Abou Samra

Le 04/11/2022 à 12:09, Jean Abou Samra a écrit :

Also, you will have surprises with \relative because
the note appears twice, with its octave marks. You
can use make-relative to fix that.


P.S. The Internals Reference gives a (quite technical) explanation of 
make-relative:


https://lilypond.org/doc/v2.23/Documentation/internals/scheme-functions



OpenPGP_signature
Description: OpenPGP digital signature


Re: New hosting for Urs Liska's Scheme WIP book

2022-11-04 Thread Jean Abou Samra

Le 04/11/2022 à 00:13, Karlin High a écrit :

Could a music function or something be shorthand for that? Let's see...

<https://lilypond.org/doc/v2.23/Documentation/notation/substitution-function-syntax> 



That page is pretty ideal. Here's the general form, what it contains, 
and how it can be used.




Well yes; however, the Scheme tutorials at hand are mostly about
the Scheme language itself, not so much about its integration with
LilyPond. In other words, they're kind of a substitute for this part
of the official documentation:

https://lilypond.org/doc/v2.23/Documentation/extending/introduction-to-scheme

That part is (from experience) mostly useless as a beginner. It
does not even mention let* !



I ended up with this:

%
\version "2.23.80"
uniTwo = #(define-music-function
   (uniNote)
   (ly:music?)
   #{
 << { \voiceOne #uniNote }
    \new Voice { \voiceTwo #uniNote }
 >> \oneVoice
   #})

{ c'4 \uniTwo e' g' }
%

I may end up replacing all the chords with the temporary-polyphony 
construct. And I may get told my \uniTwo function is very far from 
best practice.





Better use $uniNote for at least one of the two occurrences,
so as to make a copy of the note. Otherwise, you might
have surprises when applying music functions to the result,
because the note is shared. For example:

\version "2.23.80"
uniTwo = #(define-music-function
   (uniNote)
   (ly:music?)
   #{
 % Using $uniNote instead of #uniNote would fix the problem.
 << { \voiceOne #uniNote }
    \new Voice { \voiceTwo #uniNote }
 >> \oneVoice
   #})

% Transposition should yield G notes, but yields B flat notes
% as it is done twice, due to sharing.
\new Staff \transpose e' g' { \uniTwo e' \uniTwo e' }


Also, you will have surprises with \relative because
the note appears twice, with its octave marks. You
can use make-relative to fix that.

So, overall, better do:


\version "2.23.80"

uniTwo =
#(define-music-function (uniNote) (ly:music?)
   (make-relative
    (uniNote)
    uniNote
    #{
  << { \voiceOne $uniNote }
     \new Voice { \voiceTwo $uniNote }
  >> \oneVoice
    #}))

\new Staff \transpose e' g' \relative { \uniTwo e' \uniTwo e' }


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: New hosting for Urs Liska's Scheme WIP book

2022-11-03 Thread Karlin High

On 11/3/2022 5:39 PM, Jean Abou Samra wrote:

If you have thoughts on the best path towards making
it easy for people to learn Scheme, with these two resources
as a starting point, feel free to express them.


I am glad to see this effort, thank you for doing it.

Within the past week, I used define-music-function in a fashion other 
than cargo-cult for the first time.


It was in a SATB choral piece. There is temporary polyphony within a 
single part some places. I started out writing it as chords, then saw 
there was unison notes within the temporary polyphony. I want them to 
show stems up and down indicating unison has not ended.


Therefore I went,

<https://lilypond.org/doc/v2.23/Documentation/notation/multiple-voices>
"
A temporary polyphonic passage can be created with the following construct:

<< { \voiceOne … }
  \new Voice { \voiceTwo … }
>> \oneVoice
"

...but got tired of having all that code each time there was a unison 
note among the temporary-polyphony chords.


Could a music function or something be shorthand for that? Let's see...

<https://lilypond.org/doc/v2.23/Documentation/notation/substitution-function-syntax>

That page is pretty ideal. Here's the general form, what it contains, 
and how it can be used. I ended up with this:


%
\version "2.23.80"
uniTwo = #(define-music-function
   (uniNote)
   (ly:music?)
   #{
 << { \voiceOne #uniNote }
\new Voice { \voiceTwo #uniNote }
 >> \oneVoice
   #})

{ c'4 \uniTwo e' g' }
%

I may end up replacing all the chords with the temporary-polyphony 
construct. And I may get told my \uniTwo function is very far from best 
practice. Regardless, Scheme code seems a bit more approachable now.

--
Karlin High
Missouri, USA



New hosting for Urs Liska's Scheme WIP book

2022-11-03 Thread Jean Abou Samra

Hi,

There used to be a WIP book on Scheme in LilyPond by Urs
at https://scheme-book.ursliska.de/introduction/index.html
This link appears to be dead now. The sources are still
available on the repository at
https://github.com/uliska/lilyponds-scheme
so I've hastily forked this and made the build result
available through Read the Docs:

https://scheme-book.readthedocs.io/en/latest/

If you had bookmarked this book, save this new URL.

My goal was to make this valuable content available again
on the short term. On the long term, I don't know if I'll
edit it; I'll probably rather make updates to my own Scheme tutorial
(https://scheme-tutorial.readthedocs.io), which also has
a French version. Mine is quite more concise though. I don't know
if that's a good thing or if I should make it more verbose and
slow-paced. If you have thoughts on the best path towards making
it easy for people to learn Scheme, with these two resources
as a starting point, feel free to express them.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Add extra space before key cancellation and a new key signature

2022-10-19 Thread Volodymyr Prokopyuk
Hi Jean,

Thank you very much for your help! I really appreciate the quick response
and useful content!

Thank you,
Vlad

On Wed, Oct 19, 2022 at 12:58 PM Jean Abou Samra  wrote:

>
>
> Le 19/10/2022 à 12:42, Volodymyr Prokopyuk a écrit :
> > Hi,
> >
> > Could you please help me with the below situation?
> >
> > *Context*
> >
> > I've changed the order of key cancellation and a new key signature to
> > be placed before the bar line with the following code
> >
> > keyChangeBeforeBar = \once \override
> > Score.BreakAlignment.break-align-orders =
> >   #(make-vector 3 '(
> >  left-edge
> >  staff-ellipsis
> >  cue-end-clef
> >  ambitus
> >  breathing-sign
> >  signum-repetitionis
> >  clef
> >  cue-clef
> >  key-cancellation
> >  key-signature
> >  staff-bar
> >  time-signature
> >  custos))
> >
> > Now I use \keyChangeBeforeBar \key g \major to change the key at the
> > end of the score with the below result
> >
> >
> > *Problem*
> > The key cancellation and a new key signature are *too close to the
> > last note* g'.
> >
> > *Question*
> > How can I *add extra space before the key cancellation* and a new key
> > signature?
> >
> > I tried a few options following the documentation but with no luck.
>
>
>
> \version "2.23.14"
>
> keyChangeBeforeBar =
>\once \override Score.BreakAlignment.break-align-orders =
>#(make-vector 3 '(
>   left-edge
>   staff-ellipsis
>   cue-end-clef
>   ambitus
>   breathing-sign
>   signum-repetitionis
>   clef
>   cue-clef
>   key-cancellation
>   key-signature
>   staff-bar
>   time-signature
>   custos))
>
> \fixed c' {
>\key g \minor
>s2 b16 a g fis g4
>\keyChangeBeforeBar
>\once \override Staff.KeyCancellation.extra-spacing-width = #'(-2 . 0)
>\key g \major
> }
>
>
>
> Have a look at this page:
>
> https://lilypond.org/doc/v2.23/Documentation/notation/spacing-between-adjacent-columns.html
>
> Best,
> Jean
>
>


Re: Add extra space before key cancellation and a new key signature

2022-10-19 Thread Jean Abou Samra




Le 19/10/2022 à 12:42, Volodymyr Prokopyuk a écrit :

Hi,

Could you please help me with the below situation?

*Context*

I've changed the order of key cancellation and a new key signature to 
be placed before the bar line with the following code


keyChangeBeforeBar = \once \override 
Score.BreakAlignment.break-align-orders =

  #(make-vector 3 '(
     left-edge
     staff-ellipsis
     cue-end-clef
     ambitus
     breathing-sign
     signum-repetitionis
     clef
     cue-clef
     key-cancellation
     key-signature
     staff-bar
     time-signature
     custos))

Now I use \keyChangeBeforeBar \key g \major to change the key at the 
end of the score with the below result



*Problem*
The key cancellation and a new key signature are *too close to the 
last note* g'.


*Question*
How can I *add extra space before the key cancellation* and a new key 
signature?


I tried a few options following the documentation but with no luck.




\version "2.23.14"

keyChangeBeforeBar =
  \once \override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(
 left-edge
 staff-ellipsis
 cue-end-clef
 ambitus
 breathing-sign
 signum-repetitionis
 clef
 cue-clef
 key-cancellation
 key-signature
 staff-bar
 time-signature
 custos))

\fixed c' {
  \key g \minor
  s2 b16 a g fis g4
  \keyChangeBeforeBar
  \once \override Staff.KeyCancellation.extra-spacing-width = #'(-2 . 0)
  \key g \major
}



Have a look at this page:
https://lilypond.org/doc/v2.23/Documentation/notation/spacing-between-adjacent-columns.html

Best,
Jean




Add extra space before key cancellation and a new key signature

2022-10-19 Thread Volodymyr Prokopyuk
Hi,

Could you please help me with the below situation?

*Context*

I've changed the order of key cancellation and a new key signature to be
placed before the bar line with the following code

keyChangeBeforeBar = \once \override
Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(
 left-edge
 staff-ellipsis
 cue-end-clef
 ambitus
 breathing-sign
 signum-repetitionis
 clef
 cue-clef
 key-cancellation
 key-signature
 staff-bar
 time-signature
 custos))

Now I use \keyChangeBeforeBar \key g \major to change the key at the end of
the score with the below result

[image: image.png]
*Problem*
The key cancellation and a new key signature are *too close to the last
note* g'.

*Question*
How can I *add extra space before the key cancellation* and a new key
signature?

I tried a few options following the documentation but with no luck.

Thank you very much,
Vlad


Re: Configuration problems following new installation of Frescobaldi

2022-08-30 Thread Jean Abou Samra




Le 30/08/2022 à 16:40, David Wright a écrit :

On Tue 30 Aug 2022 at 09:27:03 (+0200), Jean Abou Samra wrote:


   
 
   
   
 Le 30/08/2022 à 08:56, Michael Hendry a
   écrit :
 
 
   I stopped using Frescobaldi and 
Lilypond at the beginning of the Covid pandemic and since then I have bought a new iMac with Monterey and 
transferred files across,


[ … etc … ]

Just a note, if you're unaware, that your valuable contributions
to lilypond-user are no longer available to people who rely on
the text digest emails, now that you post HTML only (this morning,
your time). They will receive, eg:

--

   Message: 7
   Date: Tue, 30 Aug 2022 09:27:03 +0200
   From: Jean Abou Samra 
   To: Michael Hendry , LilyPond User
   
   Subject: Re: Configuration problems following new installation of
   Frescobaldi
   Message-ID: <3da23e00-7994-691a-0b35-2b0c624f2...@abou-samra.fr>
   Content-Type: text/plain; charset="utf-8"

   An HTML attachment was scrubbed...
   URL: 
<https://lists.gnu.org/archive/html/lilypond-user/attachments/20220830/97c36d37/attachment.htm>

--

They do get to see the sections that other people quote.



Oops, thanks for letting me know. I had switched my mailer to HTML for 
one message that needed it, and forgot to switch it back. It should be 
fine again now.




Re: Configuration problems following new installation of Frescobaldi

2022-08-30 Thread David Wright
On Tue 30 Aug 2022 at 09:27:03 (+0200), Jean Abou Samra wrote:
> 
>   
> 
>   
>   
> Le 30/08/2022 à 08:56, Michael Hendry a
>   écrit :
> 
>cite="mid:f07d2e1c-86fb-4b51-8cb9-dff22577c...@gmail.com">
>   I stopped using Frescobaldi and 
> Lilypond at the beginning of the Covid pandemic and since then I have bought 
> a new iMac with Monterey and transferred files across,
> 

[ … etc … ]

Just a note, if you're unaware, that your valuable contributions
to lilypond-user are no longer available to people who rely on
the text digest emails, now that you post HTML only (this morning,
your time). They will receive, eg:

--

  Message: 7
  Date: Tue, 30 Aug 2022 09:27:03 +0200
  From: Jean Abou Samra 
  To: Michael Hendry , LilyPond User
      
  Subject: Re: Configuration problems following new installation of
  Frescobaldi
  Message-ID: <3da23e00-7994-691a-0b35-2b0c624f2...@abou-samra.fr>
  Content-Type: text/plain; charset="utf-8"

  An HTML attachment was scrubbed...
  URL: 
<https://lists.gnu.org/archive/html/lilypond-user/attachments/20220830/97c36d37/attachment.htm>

--

They do get to see the sections that other people quote.

Cheers,
David.



Re: Configuration problems following new installation of Frescobaldi

2022-08-30 Thread Jean Abou Samra

  
  

  

Le 30/08/2022 à
12:10, Michael Hendry a écrit :
  

  On 30 Aug 2022, at 08:27, Jean Abou Samra  wrote:

  

Le 30/08/2022 à 08:56, Michael Hendry a écrit :


   
I stopped using Frescobaldi and Lilypond at the beginning of the Covid pandemic and since then I have bought a new iMac with Monterey and transferred files across,

Trying to get back up and running, I’ve installed Frescobaldi 3.1.3, which appears to be functioning perfectly, but I get these error reports:

 Starting lilypond 2.23.3 [dorothy.ly]...
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity



  
  
Thanks, Jean.

I know about dot-files, but overlooked the fact that in the Mac Finder directories are displayed before filenames, and I was looking among the dot-files!

fonts.conf reads:





 




  


I am also getting similar warnings on Fedora with LilyPond 2.22.2 (“unknown
element reset-dirs”). They seem to be harmless. Apparently, the system's font
configuration file for Fontconfig uses features that were not supported in
the older version of Fontconfig that ships with LilyPond. For me, these
warnings don't appear in 2.23.12, which is also the latest (unstable) version.
Could you try upgrading to 2.23.12?




   
Processing `/Users/michaelhendry/git_stuff/lilyjazz/examples/dorothy.ly'
Parsing...
Interpreting music...[8][16]
fatal error: cannot find font: `lilyjazz-11'
Exited with return code 1.

when trying to compile the sample file “dorothy,ly”. Similar errors occur when I try to compile some of my existing Jazz leadsheets.





That means you didn't install the LilyJazz font. It doesn't
come with LilyPond, you had certainly installled it on your
previous computer. Download it from here:

https://github.com/OpenLilyPondFonts/lilyjazz

(use Code > Download ZIP).

How to install the files is described in the file
LilyPond-Fonts-Installation-And-Usage.txt that you will find in
your download.

  
  
I found I don’t have /Applications/Lilypond.app directory. My copy of the lilypond executable was compiled by MacPorts.

Googling for a way to create an App, I found:

https://macappstore.org/lilypond/

And having gone through the whole process I’ve ended up with a 32-bit executable, which won’t work in the 64-bit-only Monterey environment.


  
  
  No need to have a LilyPond.app! This path
  /Applications/LilyPond.app is
  just what you have if you download LilyPond 2.22 from the official
  website,
  but any installation of LilyPond (not necessarily a .app installed
  through a
  .dmg) has a directory for fonts. You could just as well install
  the font
  in the path where MacPorts installed LilyPond (not sure where that
  is exactly,
  I don't know MacPorts well).
  
  


  I haven’t found a way to force Homebrew to compile a 64-bit executable so far. Is there a ready-built .DMG image file for version 2.23.12 that I can download?



  
  See the official download page:
  
  https://lilypond.org/development.html
  
  It's not a .dmg, but in fact simpler. The learning manual has a
  tutorial
  on installing it (it's the same link as in the other thread to see
  screenshots
  of how to tell Apple that it's malware-free):
  
https://lilypond.org/doc/v2.23/Documentation/learning/graphical-setup-under-macos
  
  
  

  




Re: Configuration problems following new installation of Frescobaldi

2022-08-30 Thread Michael Hendry
On 30 Aug 2022, at 08:27, Jean Abou Samra  wrote:
> 
> Le 30/08/2022 à 08:56, Michael Hendry a écrit :
>>  
>> I stopped using Frescobaldi and Lilypond at the beginning of the Covid 
>> pandemic and since then I have bought a new iMac with Monterey and 
>> transferred files across,
>> 
>> Trying to get back up and running, I’ve installed Frescobaldi 3.1.3, which 
>> appears to be functioning perfectly, but I get these error reports:
>> 
>>  Starting lilypond 2.23.3 [dorothy.ly]...
>> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
>> 2: XML or text declaration not at start of entity
>> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
>> 2: XML or text declaration not at start of entity
>> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
>> 2: XML or text declaration not at start of entity
>> 

Thanks, Jean.

I know about dot-files, but overlooked the fact that in the Mac Finder 
directories are displayed before filenames, and I was looking among the 
dot-files!

fonts.conf reads:





 



> 
> 
> I am also getting similar warnings on Fedora with LilyPond 2.22.2 (“unknown
> element reset-dirs”). They seem to be harmless. Apparently, the system's font
> configuration file for Fontconfig uses features that were not supported in
> the older version of Fontconfig that ships with LilyPond. For me, these
> warnings don't appear in 2.23.12, which is also the latest (unstable) version.
> Could you try upgrading to 2.23.12?
> 
> 
>>  
>> Processing `/Users/michaelhendry/git_stuff/lilyjazz/examples/dorothy.ly'
>> Parsing...
>> Interpreting music...[8][16]
>> fatal error: cannot find font: `lilyjazz-11'
>> Exited with return code 1.
>> 
>> when trying to compile the sample file “dorothy,ly”. Similar errors occur 
>> when I try to compile some of my existing Jazz leadsheets.
>> 
> 
> 
> That means you didn't install the LilyJazz font. It doesn't
> come with LilyPond, you had certainly installled it on your
> previous computer. Download it from here:
> 
> https://github.com/OpenLilyPondFonts/lilyjazz
> 
> (use Code > Download ZIP).
> 
> How to install the files is described in the file
> LilyPond-Fonts-Installation-And-Usage.txt that you will find in
> your download.

I found I don’t have /Applications/Lilypond.app directory. My copy of the 
lilypond executable was compiled by MacPorts.

Googling for a way to create an App, I found:

https://macappstore.org/lilypond/

And having gone through the whole process I’ve ended up with a 32-bit 
executable, which won’t work in the 64-bit-only Monterey environment.

I haven’t found a way to force Homebrew to compile a 64-bit executable so far. 
Is there a ready-built .DMG image file for version 2.23.12 that I can download?


> 
>>  There is no /Users/michaelhendry/.config directory on my computer,

Of course there is! See my first paragraph above.

Michael

> 
> 
> It does exist, but since the name starts with a dot, it is a "hidden
> directory". Those are reserved for things non-technically-savvy users
> don't need/want to know about, and aren't displayed in the Finder by
> default (but you can show them:
> https://nordlocker.com/blog/how-to-show-hidden-files-mac/).
> 
> Best,
> Jean
> 
> 




Re: Configuration problems following new installation of Frescobaldi

2022-08-30 Thread Jean Abou Samra

  
  
Le 30/08/2022 à 08:56, Michael Hendry a
  écrit :


  I stopped using Frescobaldi and Lilypond at the beginning of the Covid pandemic and since then I have bought a new iMac with Monterey and transferred files across,

Trying to get back up and running, I’ve installed Frescobaldi 3.1.3, which appears to be functioning perfectly, but I get these error reports:

 Starting lilypond 2.23.3 [dorothy.ly]...
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: XML or text declaration not at start of entity


  
  I am also getting similar warnings on Fedora with LilyPond 2.22.2
  (“unknown
  element reset-dirs”). They seem to be harmless. Apparently, the
  system's font
  configuration file for Fontconfig uses features that were not
  supported in
  the older version of Fontconfig that ships with LilyPond. For me,
  these
  warnings don't appear in 2.23.12, which is also the latest
  (unstable) version.
  Could you try upgrading to 2.23.12?
  
  


  Processing `/Users/michaelhendry/git_stuff/lilyjazz/examples/dorothy.ly'
Parsing...
Interpreting music...[8][16]
fatal error: cannot find font: `lilyjazz-11'
Exited with return code 1.

when trying to compile the sample file “dorothy,ly”. Similar errors occur when I try to compile some of my existing Jazz leadsheets.


  
  That means you didn't install the LilyJazz font. It doesn't
  come with LilyPond, you had certainly installled it on your
  previous computer. Download it from here:
  
  https://github.com/OpenLilyPondFonts/lilyjazz
  
  (use Code > Download ZIP).
  
  How to install the files is described in the file
  LilyPond-Fonts-Installation-And-Usage.txt that you will find in
  your download.
  
  


  There is no /Users/michaelhendry/.config directory on my computer,


  
  It does exist, but since the name starts with a dot, it is a
  "hidden
  directory". Those are reserved for things non-technically-savvy
  users
  don't need/want to know about, and aren't displayed in the Finder
  by
  default (but you can show them:
  https://nordlocker.com/blog/how-to-show-hidden-files-mac/).
  
  Best,
  Jean
  


  




Configuration problems following new installation of Frescobaldi

2022-08-30 Thread Michael Hendry
I stopped using Frescobaldi and Lilypond at the beginning of the Covid pandemic 
and since then I have bought a new iMac with Monterey and transferred files 
across,

Trying to get back up and running, I’ve installed Frescobaldi 3.1.3, which 
appears to be functioning perfectly, but I get these error reports:

 Starting lilypond 2.23.3 [dorothy.ly]...
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Processing `/Users/michaelhendry/git_stuff/lilyjazz/examples/dorothy.ly'
Parsing...
Interpreting music...[8][16]
fatal error: cannot find font: `lilyjazz-11'
Exited with return code 1.

when trying to compile the sample file “dorothy,ly”. Similar errors occur when 
I try to compile some of my existing Jazz leadsheets.

There is no /Users/michaelhendry/.config directory on my computer, and I 
suspect there is a configuration option which will deal with this error.

Can anyone advise?

Thanks in advance,

Michael Hendry


Re: A new Scheme tutorial

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

> Le 25 juil. 2022 à 14:51, David Kastrup  a écrit :
>> 
>> syntax-rules/syntax-case introduce a completely new and arbitrary syntax
>> intended to be human-readable.  That's sort of a counterthesis to the
>> LISP philosophy of representing programs by the data representation of
>> their parse tree, skipping a human-readable abstraction for the sake of
>> making it easy to programmatically generate and analyze programs.
>> 
>> Macros, in contrast, are just a flag on functions telling the evaluator
>> "evaluate the function result instead of its arguments".  That is an
>> almost trivial tweak.
>
> Modulo the fact that IIRC, Guile 1 would only run the macro the first
> time the form was evaluated, but I see what you mean.

I was not really talking about Guile.  Guile is a comparatively faithful
Scheme implementation.  It was more about the LISP/Scheme difference in
philosophy.

LISP is at its heart, conception and inception an interpreted language.
Compilation is an afterthought, just like demand-paging is an
afterthought for UNIX, with the original concept having just one process
in memory and the difference between swapping and forking essentially
being that swapping pulled in a process image before continuing
execution and forking just continued running, as "child", the process
image it just wrote to disk.

The original simplicity that allowed running stuff in 64k of memory or
less has not been retained either way.

In Guile 1, I've successfully used call/cc for implementing a fairly
trivial local-eval that was able to deal with closures.

<https://guile-devel.gnu.narkive.com/m42DJSjd/summary-lilypond-lambda-and-local-eval#post4>

That doesn't work with the compilation complexity of Guile 2 since this
trick obviously falls apart really hard with anything operating in
multiple passes.

>> More complex, indeed, is the quasiquote mechanism that operates to a
>> good degree in the LISP reader and makes it comparatively easy to
>> handle the creation of material suitable as macro body.
>> 
>> In contrast to syntax-rules/syntax-case this reflects more a
>> philosophy rather than a religion since it isn't arbitrary.  Using it
>> is more a matter of understanding rather than learning it.
>
>
> There are two mostly unrelated parts in the Scheme macro system that
> differentiate it from the traditional Lisp system: the pattern
> matching language, and hygiene.

Effective hygiene can be achieved with make-symbol.  But of course once
you stop having an interpreter, the conceptual simplicity is not
continued into the implementation, particularly if you want
compiled-language efficiency.  And Scheme also has thrown the conceptual
simplicity overboard along with the simple implementation.

> The first part is definitely not all lilies and roses. It’s weird to
> have a separate namespace for the pattern variables bound by
> syntax-case. It’s weird that the primitive way to analyze syntax
> objects is not a set of simple procedures like syntax-pair?,
> syntax-car, but only syntax-case pattern matching, against the
> traditional Scheme principle that complex tools (like syntax-case) are
> built at will on top of very simple tools. It’s weird that syntax
> pairs aren’t normal pairs, so you can’t use list functions on them
> directly. It’s weird that #'(pat …) doesn’t return a syntax list but
> just a plain list (at least in Guile, didn’t check the standard).
>
> Still, this macro system gives you a form of lexical scoping and
> hygiene, and allows things like renaming syntax keywords when
> importing them, which is really nifty and the main reason why I prefer
> writing syntax-rules/case macros. I like the principle of annotated
> symbols containing scope information. It’s not that I’m fond of the
> tools provided to manipulate them.

I feel similar with regard to C++'s implementation of the template
system: the goals are worthwhile and they are accomplished, but the
syntax appears foreign to the base language and has been dragged in from
elsewhere (in C++'s case, basically from Ada with subsequent cancerous
proliferation), at considerable cost that seems like too much of an
uncalled-for expense.

-- 
David Kastrup



Re: A new Scheme tutorial

2022-07-25 Thread Jean Abou Samra



> Le 25 juil. 2022 à 14:51, David Kastrup  a écrit :
> 
> Jean Abou Samra  writes:
> 
>>>> Le 25 juil. 2022 à 09:01, Andrew Bernard  a 
>>>> écrit :
>>> 
>>> 
>>> Hello Jean,
>>> 
>>> This is a great effort.
>>> 
>>> A couple of suggestions. I suppose there are a few web pages with
>>> lists of recommended texts for Scheme, but I think it would be great
>>> if you added this one to the 'where to go from here' section:
>>> 
>>> Teach Yourself Scheme in Fixnum Days (ds26gte.github.io)
>>> 
>> 
>> 
>> Gosh, it seems to teach Lisp-style non-hygienic macros instead of
>> syntax-rules/syntax-case. That’s heresy against my religion! OK, I
>> stop now :-)
> 
> syntax-rules/syntax-case introduce a completely new and arbitrary syntax
> intended to be human-readable.  That's sort of a counterthesis to the
> LISP philosophy of representing programs by the data representation of
> their parse tree, skipping a human-readable abstraction for the sake of
> making it easy to programmatically generate and analyze programs.
> 
> Macros, in contrast, are just a flag on functions telling the evaluator
> "evaluate the function result instead of its arguments".  That is an
> almost trivial tweak.

Modulo the fact that IIRC, Guile 1 would only run the macro the first time the 
form was evaluated, but I see what you mean.


> More complex, indeed, is the quasiquote mechanism
> that operates to a good degree in the LISP reader and makes it
> comparatively easy to handle the creation of material suitable as macro
> body.
> 
> In contrast to syntax-rules/syntax-case this reflects more a philosophy
> rather than a religion since it isn't arbitrary.  Using it is more a
> matter of understanding rather than learning it.


There are two mostly unrelated parts in the Scheme macro system that 
differentiate it from the traditional Lisp system: the pattern matching 
language, and hygiene.

The first part is definitely not all lilies and roses. It’s weird to have a 
separate namespace for the pattern variables bound by syntax-case. It’s weird 
that the primitive way to analyze syntax objects is not a set of simple 
procedures like syntax-pair?, syntax-car, but only syntax-case pattern 
matching, against the traditional Scheme principle that complex tools (like 
syntax-case) are built at will on top of very simple tools. It’s weird that 
syntax pairs aren’t normal pairs, so you can’t use list functions on them 
directly. It’s weird that #'(pat …) doesn’t return a syntax list but just a 
plain list (at least in Guile, didn’t check the standard).

Still, this macro system gives you a form of lexical scoping and hygiene, and 
allows things like renaming syntax keywords when importing them, which is 
really nifty and the main reason why I prefer writing syntax-rules/case macros. 
I like the principle of annotated symbols containing scope information. It’s 
not that I’m fond of the tools provided to manipulate them.

I tend to think of Scheme as a language with elegant syntax on top of clumsy 
data structures (alist lookup is linear, etc). In this case, it’s sort of the 
opposite…






Re: A new Scheme tutorial

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

>> Le 25 juil. 2022 à 09:01, Andrew Bernard  a 
>> écrit :
>> 
>> 
>> Hello Jean,
>> 
>> This is a great effort.
>> 
>> A couple of suggestions. I suppose there are a few web pages with
>> lists of recommended texts for Scheme, but I think it would be great
>> if you added this one to the 'where to go from here' section:
>> 
>> Teach Yourself Scheme in Fixnum Days (ds26gte.github.io)
>> 
>
>
> Gosh, it seems to teach Lisp-style non-hygienic macros instead of
> syntax-rules/syntax-case. That’s heresy against my religion! OK, I
> stop now :-)

syntax-rules/syntax-case introduce a completely new and arbitrary syntax
intended to be human-readable.  That's sort of a counterthesis to the
LISP philosophy of representing programs by the data representation of
their parse tree, skipping a human-readable abstraction for the sake of
making it easy to programmatically generate and analyze programs.

Macros, in contrast, are just a flag on functions telling the evaluator
"evaluate the function result instead of its arguments".  That is an
almost trivial tweak.  More complex, indeed, is the quasiquote mechanism
that operates to a good degree in the LISP reader and makes it
comparatively easy to handle the creation of material suitable as macro
body.

In contrast to syntax-rules/syntax-case this reflects more a philosophy
rather than a religion since it isn't arbitrary.  Using it is more a
matter of understanding rather than learning it.

-- 
David Kastrup



Re: A new Scheme tutorial

2022-07-25 Thread Andrew Bernard
Yes, that is a downside - and I suppose if one is just learning Scheme 
one would not be aware of the issue.


Andrew


On 25/07/2022 10:11 pm, Jean Abou Samra wrote:
Gosh, it seems to teach Lisp-style non-hygienic macros instead of 
syntax-rules/syntax-case. That’s heresy against my religion! OK, I 
stop now :-)




Re: A new Scheme tutorial

2022-07-25 Thread Jean Abou Samra


> Le 25 juil. 2022 à 09:01, Andrew Bernard  a écrit 
> :
> 
> 
> Hello Jean,
> 
> This is a great effort.
> 
> A couple of suggestions. I suppose there are a few web pages with lists of 
> recommended texts for Scheme, but I think it would be great if you added this 
> one to the 'where to go from here' section:
> 
> Teach Yourself Scheme in Fixnum Days (ds26gte.github.io)
> 


Gosh, it seems to teach Lisp-style non-hygienic macros instead of 
syntax-rules/syntax-case. That’s heresy against my religion! OK, I stop now :-)

Thanks for that link, I saw it before but didn’t remember it. When I’m back 
from vacation, I’ll probably replace the reference to the books with a link to 
schemers.org.

Cheers,
Jean

> Also, the link to the SICP text is only for the companion site for the book, 
> not the text. I strongly urge anybody who is involved with Scheme to obtain 
> this book, and keep it on the desk and read it a dozen times. A superb 
> classic computer science text, quite unparalleled. Scheme was the standard 
> language taught at MIT for many years. A large number of people are 
> disappointed and dismayed that I believe they now teach Python instead. While 
> Python is a nice language. Scheme teaches a much higher level of abstract 
> thought, and even if you never use it, it makes you a better programmer.
> 
> And amazingly, here are Abelson and Sussman lecturing MIT 6.001 in 1986, the 
> complete series, for employees at HP.
> 
> https://youtube.com/playlist?list=PLE18841CABEA24090
> 
> 
> 
> Andrew
> 
> 
> 
> On 12/07/2022 9:28 am, Jean Abou Samra wrote:
>> Hi, 
>> 
>> Last year, after I delivered a presentation on Scheme at a 
>> French-speaking virtual meeting of LilyPond users, I was asked 
>> if I could write that down in tutorial form, which I did as 
>> https://tutoriel-scheme.readthedocs.io. Over the past few days, 
>> I've set some time apart to translate that into English. 
>> The English version can be found here: 
>> 
>> https://scheme-tutorial.readthedocs.io 
>> 


Re: A new Scheme tutorial

2022-07-25 Thread Andrew Bernard

Hello Jean,

This is a great effort.

A couple of suggestions. I suppose there are a few web pages with lists 
of recommended texts for Scheme, but I think it would be great if you 
added this one to the 'where to go from here' section:


Teach Yourself Scheme in Fixnum Days (ds26gte.github.io) 



Also, the link to the SICP text is only for the companion site for the 
book, not the text. I strongly urge anybody who is involved with Scheme 
to obtain this book, and keep it on the desk and read it a dozen times. 
A superb classic computer science text, quite unparalleled. Scheme was 
the standard language taught at MIT for many years. A large number of 
people are disappointed and dismayed that I believe they now teach 
Python instead. While Python is a nice language. Scheme teaches a much 
higher level of abstract thought, and even if you never use it, it makes 
you a better programmer.


And amazingly, here are Abelson and Sussman lecturing MIT 6.001 in 1986, 
the complete series, for employees at HP.


https://youtube.com/playlist?list=PLE18841CABEA24090


Andrew


On 12/07/2022 9:28 am, Jean Abou Samra wrote:

Hi,

Last year, after I delivered a presentation on Scheme at a
French-speaking virtual meeting of LilyPond users, I was asked
if I could write that down in tutorial form, which I did as
https://tutoriel-scheme.readthedocs.io. Over the past few days,
I've set some time apart to translate that into English.
The English version can be found here:

https://scheme-tutorial.readthedocs.io


Re: A new Scheme tutorial (Jean Abou Samra)

2022-07-24 Thread Jean Abou Samra




Le 24/07/2022 à 17:19, Ernie Braganza a écrit :
I am joining this conversation late, so how do I access the scheme 
tutorial?


Here:

https://scheme-tutorial.readthedocs.io/

Best,
Jean




Re: A new Scheme tutorial (Jean Abou Samra)

2022-07-24 Thread Ernie Braganza
I am joining this conversation late, so how do I access the scheme tutorial?

On Sun, Jul 24, 2022, 7:30 AM Jean Abou Samra  wrote:

>
> > Ouch! I see what you mean. And this is meant to be simplified? But the
> > problem really is that if a user tries to use an identifier with an
> > illegal syntax, how do they know? This is rather like those really
> > annoying websites which ask you to choose a password, and then tell
> > you that it's illegal without telling you why.
> >
>
>
> Simple: don't use too weird identifiers :-)
>
> I'll try to rephrase that part again. The point of mentioning this is
> to explain that '+', '-', '*', '/' are just procedures, not special
> syntax, and to address the question that I imagine this immediately raises
> in the mind of a reader used to more mainstream programming languages:
> "what, a procedure called '+', is that really valid"? There are also
> two conventions that are useful to know:
>
> - question mark at the end of a predicate (explained later in
>the tutorial),
> - exclamation mark at the end of a side-effecting procedure
>(I'm not showing any of these in this basic tutorial, so
>I didn't explain it).
>
> It's not really encouraged to get creative about special characters in
> your variable names. Just stick with the conventions.
>
> Cheers,
> Jean
>
>
>


Re: A new Scheme tutorial (Jean Abou Samra)

2022-07-24 Thread Jean Abou Samra



Ouch! I see what you mean. And this is meant to be simplified? But the 
problem really is that if a user tries to use an identifier with an 
illegal syntax, how do they know? This is rather like those really 
annoying websites which ask you to choose a password, and then tell 
you that it's illegal without telling you why.





Simple: don't use too weird identifiers :-)

I'll try to rephrase that part again. The point of mentioning this is
to explain that '+', '-', '*', '/' are just procedures, not special
syntax, and to address the question that I imagine this immediately raises
in the mind of a reader used to more mainstream programming languages:
"what, a procedure called '+', is that really valid"? There are also
two conventions that are useful to know:

- question mark at the end of a predicate (explained later in
  the tutorial),
- exclamation mark at the end of a side-effecting procedure
  (I'm not showing any of these in this basic tutorial, so
  I didn't explain it).

It's not really encouraged to get creative about special characters in
your variable names. Just stick with the conventions.

Cheers,
Jean




Re: A new Scheme tutorial (Jean Abou Samra)

2022-07-24 Thread Peter Toye

-
Saturday, July 23, 2022, 8:56:57 PM, Jean Abou Samra wrote:

> Thanks a lot Peter and others (privately) for your suggestions.
> Sorry for the very late reply, I've been distracted by other
> things. Your comments are most appreciated.


> Le 13/07/2022 à 18:15, Peter Toye a écrit :
>> This looks great! Just what I'd needed a couple of years back when I > was 
>> still programming.
>> I've only just started with it, but there are a few niggling comments > 
>> about the English version. I've only got to page 2 (getting started) > so 
>> far.
>>   * On my browser (Firefox in Windows) the 'v. latest' is too close to
>>     the bottom of the main frame, and I can't click on the
>>     'previous/next/index' without very careful manipulation of the
>>     slider. Can it be moved up a cm or so?


> This is a bit tricky because I don't know how to test it
> locally without uploading on Readthedocs, and I'm bad at
> CSS ...
... so am I.

>>   * On page 1 (Why Scheme?) it's slightly better English to say 'There
>>     is no single implementation of Scheme'
>>   * On page 2 (Getting started) the comment about testing under
>>     Windows is not translated into English! I suggest 'I am unable to
>>     test these commands under Windows. If they do not work, write to
>>     the list.'
>>   * Again on page 2, the commands don't work! You forgot to add the
>>     'lilypond'.
>>     C:\Program Files (x86)\LilyPond\usr\bin>lilypond
>>     scheme-sandbox works fine on my machine.
>>   * On page 2 'Literals' the comment about decimal numbers isn't
>>     translated. I'm not sure about the best translation of 'nombres
>>     décimaux'. Personally I'd use 'floating-point numbers' on the
>>     grounds that all numbers, including integers, are decimal.

> Done.


>>   * The comment 'and a few others' about the characters allowed in
>>     variable names is rather annoying. How does a user know what to
>>     expect if they use a forbidden character? A list would be really
>>     useful.


> Um. The precise rules for valid identifiers are described
> as a formal grammar on pages 12 and 13 of R6RS
> 
> (see the  production). I'll try to put
> a list of a few characters that are valid and which
> are useful to know about, like ? and ! because they
> occur regularly at the end of function names (for
> predicates and side-effecting functions), but I'd
> rather not explain the full rules, as they are quite
> complex ...
Ouch! I see what you mean. And this is meant to be simplified? But the problem 
really is that if a user tries to use an identifier with an illegal syntax, how 
do they know? This is rather like those really annoying websites which ask you 
to choose a password, and then tell you that it's illegal without telling you 
why.
 
> Best,
> Jean
All the best,
 
Peter

Re: A new Scheme tutorial (Jean Abou Samra)

2022-07-23 Thread Jean Abou Samra

Thanks a lot Peter and others (privately) for your suggestions.
Sorry for the very late reply, I've been distracted by other
things. Your comments are most appreciated.


Le 13/07/2022 à 18:15, Peter Toye a écrit :
This looks great! Just what I'd needed a couple of years back when I 
was still programming.


I've only just started with it, but there are a few niggling comments 
about the English version. I've only got to page 2 (getting started) 
so far.


  * On my browser (Firefox in Windows) the 'v. latest' is too close to
the bottom of the main frame, and I can't click on the
'previous/next/index' without very careful manipulation of the
slider. Can it be moved up a cm or so?




This is a bit tricky because I don't know how to test it
locally without uploading on Readthedocs, and I'm bad at
CSS ...



  * On page 1 (Why Scheme?) it's slightly better English to say 'There
is no single implementation of Scheme'
  * On page 2 (Getting started) the comment about testing under
Windows is not translated into English! I suggest 'I am unable to
test these commands under Windows. If they do not work, write to
the list.'
  * Again on page 2, the commands don't work! You forgot to add the
'lilypond'.
C:\Program Files (x86)\LilyPond\usr\bin>lilypond
scheme-sandbox works fine on my machine.
  * On page 2 'Literals' the comment about decimal numbers isn't
translated. I'm not sure about the best translation of 'nombres
décimaux'. Personally I'd use 'floating-point numbers' on the
grounds that all numbers, including integers, are decimal.



Done.



  * The comment 'and a few others' about the characters allowed in
variable names is rather annoying. How does a user know what to
expect if they use a forbidden character? A list would be really
useful.




Um. The precise rules for valid identifiers are described
as a formal grammar on pages 12 and 13 of R6RS

(see the  production). I'll try to put
a list of a few characters that are valid and which
are useful to know about, like ? and ! because they
occur regularly at the end of function names (for
predicates and side-effecting functions), but I'd
rather not explain the full rules, as they are quite
complex ...

Best,
Jean




  1   2   3   4   5   6   7   8   9   10   >