Re: LilyPond 2.25.14

2024-03-24 Thread Michael Käppler



Am 24.03.2024 um 11:50 schrieb Jonas Hahnfeld:

Just out of interest, do we tweak the JIT_THRESHOLD somewhere or do we
use the default value?

I don't think we change it from LilyPond, so likely using the default
value.

I did a test with the opposite extremes.
Again, 10 subsequent runs with the score I tested before.
Note that the times are not quite comparable with my last findings,
because my laptop
ran on a different energy saving state.

GUILE_JIT_THRESHOLD=0 (compile each function at first sight)
real    4m8.780s
user    0m0.075s
sys 0m0.167s

GUILE_JIT_THRESHOLD=-1 (disable JIT compilation)
real    4m4.925s
user    0m0.030s
sys 0m0.136s

So either the env variable is not working as intended, or there is only
a very small effect.
At least setting `GUILE_JIT_LOG` does work, but one would have to read
the source
to understand the output.

Michael


Re: LilyPond 2.25.14

2024-03-23 Thread Michael Käppler

Hi Jonas,
thanks for working on this!


Windows build with Guile JIT: https://cloud.hahnjo.de/s/Ek5x9rybpiPNtoj
This turns on just-in-time compilation that was added in Guile 3.0, but
we had to keep disabled on Windows until now. Please test, especially
on larger scores where this should provide a performance advantage.

I gave it a try with a medium-sized score (appr. 60 pages A4),
10 times in a row:

with JIT:
real    4m42.513s
user    0m0.090s
sys 0m0.185s

without JIT:
real    4m45.295s
user    0m0.046s
sys 0m0.277s

Just out of interest, do we tweak the JIT_THRESHOLD somewhere or do we
use the default value?

Michael



Re: dynamics: sf vs sfz

2022-01-06 Thread Michael Käppler

Am 06.01.2022 um 18:09 schrieb Kenneth Wolcott:

Thank you for your elaboration on the dynamics; much appreciated.

On Thu, Jan 6, 2022 at 6:11 AM Kieren MacMillan
 wrote:

Hi all,

As composer, pianist, and conductor, I can offer that the consensus among most of the 
musicians I know is that sfz is [in modern practice] considered different from sf, 
especially with respect to the envelope of the note: in "equation" terms, one 
might write sfz = sf + >. An analogous difference distinguishes fz as different from both 
sf and sfz.

In performance of more "historical" music (say, Beethoven and before), these 
distinctions are not as widely or faithfully observed.

For an excellent overview regarding dynamic specifications (and many
other topics that are connected to performance indications) in the 19th
century, see
Clive Brown: Classical and Romantic Performing Practice 1750-1900 .
This book is marvellous!


Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info






Re: incomplete tuplets in non-standard time signatures

2020-12-02 Thread Michael Käppler

Am 02.12.2020 um 11:24 schrieb Michael Käppler:

Am 02.12.2020 um 09:26 schrieb Michael Käppler:

Am 30.11.2020 um 09:20 schrieb Michael Käppler:

Am 30.11.2020 um 08:29 schrieb Lukas-Fabian Moser:

Hi Michael,


I just filed a bug report
http://lilypond.1069038.n5.nabble.com/Wrongly-read-property-with-MetronomeMark-td237659.html






2c2908c905ba822ef656b06b1cc4f0ca33960c9c is the first bad commit
commit 2c2908c905ba822ef656b06b1cc4f0ca33960c9c
Author: Malte Meyn 
Date:   Sun Sep 29 10:10:35 2019 +0200

That does not make sense to me. 2.20.0 was released on March 1, 2020
and
Harm reported that 2.20.0 is fine. I think bisecting must start with
2.20.0., then.


It's well possible that I got this all wrong, but I was under the
impression that, as not all changes added during the 2.19.xx cycle
were cherry-picked into 2.20, it's quite possible for a commit that
was added to master before the release of 2.20.0 to only end up in
2.21.xx.

You are right, I got this wrong. Sorry for the noise.

Michael


Added to the tracker:
https://gitlab.com/lilypond/lilypond/-/issues/6067

I think I have a fix ready for this

See https://gitlab.com/lilypond/lilypond/-/merge_requests/534



Re: incomplete tuplets in non-standard time signatures

2020-12-02 Thread Michael Käppler

Am 02.12.2020 um 09:26 schrieb Michael Käppler:

Am 30.11.2020 um 09:20 schrieb Michael Käppler:

Am 30.11.2020 um 08:29 schrieb Lukas-Fabian Moser:

Hi Michael,


I just filed a bug report
http://lilypond.1069038.n5.nabble.com/Wrongly-read-property-with-MetronomeMark-td237659.html





2c2908c905ba822ef656b06b1cc4f0ca33960c9c is the first bad commit
commit 2c2908c905ba822ef656b06b1cc4f0ca33960c9c
Author: Malte Meyn 
Date:   Sun Sep 29 10:10:35 2019 +0200

That does not make sense to me. 2.20.0 was released on March 1, 2020
and
Harm reported that 2.20.0 is fine. I think bisecting must start with
2.20.0., then.


It's well possible that I got this all wrong, but I was under the
impression that, as not all changes added during the 2.19.xx cycle
were cherry-picked into 2.20, it's quite possible for a commit that
was added to master before the release of 2.20.0 to only end up in
2.21.xx.

You are right, I got this wrong. Sorry for the noise.

Michael


Added to the tracker:
https://gitlab.com/lilypond/lilypond/-/issues/6067

I think I have a fix ready for this.




Re: incomplete tuplets in non-standard time signatures

2020-12-02 Thread Michael Käppler

Am 30.11.2020 um 09:20 schrieb Michael Käppler:

Am 30.11.2020 um 08:29 schrieb Lukas-Fabian Moser:

Hi Michael,


I just filed a bug report
http://lilypond.1069038.n5.nabble.com/Wrongly-read-property-with-MetronomeMark-td237659.html




2c2908c905ba822ef656b06b1cc4f0ca33960c9c is the first bad commit
commit 2c2908c905ba822ef656b06b1cc4f0ca33960c9c
Author: Malte Meyn 
Date:   Sun Sep 29 10:10:35 2019 +0200

That does not make sense to me. 2.20.0 was released on March 1, 2020
and
Harm reported that 2.20.0 is fine. I think bisecting must start with
2.20.0., then.


It's well possible that I got this all wrong, but I was under the
impression that, as not all changes added during the 2.19.xx cycle
were cherry-picked into 2.20, it's quite possible for a commit that
was added to master before the release of 2.20.0 to only end up in
2.21.xx.

You are right, I got this wrong. Sorry for the noise.

Michael


Added to the tracker:
https://gitlab.com/lilypond/lilypond/-/issues/6067

Cheers,
Michael




Re: incomplete tuplets in non-standard time signatures

2020-11-30 Thread Michael Käppler

Am 30.11.2020 um 08:29 schrieb Lukas-Fabian Moser:

Hi Michael,


I just filed a bug report
http://lilypond.1069038.n5.nabble.com/Wrongly-read-property-with-MetronomeMark-td237659.html



2c2908c905ba822ef656b06b1cc4f0ca33960c9c is the first bad commit
commit 2c2908c905ba822ef656b06b1cc4f0ca33960c9c
Author: Malte Meyn 
Date:   Sun Sep 29 10:10:35 2019 +0200

That does not make sense to me. 2.20.0 was released on March 1, 2020 and
Harm reported that 2.20.0 is fine. I think bisecting must start with
2.20.0., then.


It's well possible that I got this all wrong, but I was under the
impression that, as not all changes added during the 2.19.xx cycle
were cherry-picked into 2.20, it's quite possible for a commit that
was added to master before the release of 2.20.0 to only end up in
2.21.xx.

You are right, I got this wrong. Sorry for the noise.

Michael



Re: incomplete tuplets in non-standard time signatures

2020-11-29 Thread Michael Käppler

Am 29.11.2020 um 21:09 schrieb Lukas-Fabian Moser:

Hi Harm,

Hi Harm and Lukas,



I just filed a bug report
http://lilypond.1069038.n5.nabble.com/Wrongly-read-property-with-MetronomeMark-td237659.html


2c2908c905ba822ef656b06b1cc4f0ca33960c9c is the first bad commit
commit 2c2908c905ba822ef656b06b1cc4f0ca33960c9c
Author: Malte Meyn 
Date:   Sun Sep 29 10:10:35 2019 +0200

    Issue 5563: make edges of brackets dashable

    The new boolean grob property dashed-edge controls whether the
edges of
    a dashed bracket are solid or dashed.



That does not make sense to me. 2.20.0 was released on March 1, 2020 and
Harm reported
that 2.20.0 is fine. I think bisecting must start with 2.20.0., then.

Cheers,
Michael




Re: Piano sustain pedal

2020-10-13 Thread Michael Käppler

Am 13.10.2020 um 11:31 schrieb Federico Bruni:



Il giorno mar 13 ott 2020 alle 11:21, Michael Käppler
 ha scritto:

Am 13.10.2020 um 10:56 schrieb Federico Bruni:

I would have tried removing the engraver.
Does this affect the MIDI too?

AFAIK performers are responsible for MIDI output, not engravers.
Piano_pedal_performer exists, so maybe

\score {
 \new Staff \with {
   \remove "Piano_pedal_performer"
 }
[...]




Read again the first email.
Martin is trying to achieve the opposite: maintain the sostenuto in
MIDI but remove the symbols in the graphical output.


Sorry.



Re: Piano sustain pedal

2020-10-13 Thread Michael Käppler

Am 13.10.2020 um 10:56 schrieb Federico Bruni:

I would have tried removing the engraver.
Does this affect the MIDI too?

AFAIK performers are responsible for MIDI output, not engravers.
Piano_pedal_performer exists, so maybe

\score {
 \new Staff \with {
   \remove "Piano_pedal_performer"
 }
[...]

Cheers,
Michael




Il giorno mar 13 ott 2020 alle 09:57, Martin Tarenskeen
 ha scritto:


Thanks Hwaen,
works perfectly for my purpose.

I now also found I can use this \tag command to show chordsymbols in
my score without playing them automatically with those horrible
automatic voicings in Midi playback :-)

MT

On Tue, 13 Oct 2020, Hwaen Ch'uqi wrote:


Greetings Martin,

You could use the \tag command in a separate voice or staff block and
so generate midi output but not visual output.

HTH,

Hwaen Ch'uqi


On 10/13/20, Martin Tarenskeen  wrote:


Hi,

I am typesetting a Piano solo score.
I want to add \sustainOn and \sustainOff stuff in my lilypond
source only
for more realistic MIDI output, but I don't want to print the
pedalmarkings in my score. How to do this? If possible without the
need to
have separate midi and layout versions of the same lilypond code
for the
notes.

--

MT
















Re: Texinfo / lilypond-book - include paths

2020-06-29 Thread Michael Käppler

Am 29.06.2020 um 10:36 schrieb Michael Käppler:



The file 'lily-21179cd9-1.eps' is there, indeed. How is this supposed to
work?
Do I have to specify manual includes somewhere?

Sorry for the noise, I found out that I have to specify --pdf when invoking
lilypond-book, because
texi2pdf uses 'pdflatex' by default. Will add a note to the Usage manual.




Cheers,
Michael









Texinfo / lilypond-book - include paths

2020-06-29 Thread Michael Käppler

Hi all,
I'm trying to integrate Lilypond snippets into Texinfo files.
Consider the 'Texinfo' example from the 'Usage' manual, which you can find
here:
http://lilypond.org/doc/v2.21/Documentation/usage/lilypond_002dbook-templates

With this example in lybook-texinfo.tely, I do

lilypond-book --output=out lybook-texinfo.tely
cd out
texi2pdf lybook-texinfo.texi

TeX complains that it does not find the image file
'./7a/lily-21179cd9-1' which is included in
out/7a/lily-21179cd9-systems.texi.

The file 'lily-21179cd9-1.eps' is there, indeed. How is this supposed to
work?
Do I have to specify manual includes somewhere?

Cheers,
Michael






Re: Odd \time bar check behaviour

2020-06-10 Thread Michael Käppler

Am 10.06.2020 um 13:27 schrieb ebenezer:


Hi all,

The 1st code snippett generates warnings, but the 2nd does not.

I'd like to keep the bar symbols in place as it helps me to keep track
in the music.

This is my first piece so I've likely made some newbie error, please
advise.


Hi Ebby,
your first snippet does compile without warnings for me.
If your piece does have multiple voices (your filename suggests that),
it may well be that you have a rhythmical error in another voice.

But maybe I do not understand what you want to achieve.
What do you expect the | symbol to do? Have you read
http://lilypond.org/doc/v2.21/Documentation/notation/bars.html#bar-and-bar-number-checks
?

Cheers,
Michael




Re: Remote Ensemble Playing

2020-04-01 Thread Michael Käppler

Am 01.04.2020 um 14:33 schrieb Urs Liska:



I'd be very interested to hear more about your Jitsi project by the
way!
github?

That would be extremely interesting for us too because our work will
very much rely on a jitsi instance (which we fortunately had running
for some time already).

This is very interesting, Urs!
I work at university, too (Erfurt) and I feel very uncomfortable about
the predominance of commercial tools based in the US like Zoom (at least
in the
discussions I followed or took part in).
Do you use Jitsi with the Jitsi Meet browser-based frontend or
with the Jitsi Desktop client?
I tried to setup a Jitsi server instance (Jitsi Meet + Videobridge) on
a JiffyBox Cloud server. The installation was, apart from some minor
issues, pretty straightforward.
During test video calls I had many problems, however.
Some participants could not connect, partly because of
unsupported browser versions, partly they got no error messages,
only a black window.
With one friend of mine I managed to get a connection, but it was very
instable and freezed after some minutes, while we both use Skype, Zoom, etc.
without problems.

Regards,
Michael



Urs







Re: LSR contribution

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 20:51 schrieb Thomas Morley:

Am Mo., 10. Feb. 2020 um 10:11 Uhr schrieb Michael Käppler :


Hi Harm,


Fine with me, I already updated the LSR-code, for now unapproved.
Please have a look whether all is ok, snippet-description and the like.

Everything ok now, please approve if you're fine with it, too.

Cheers,
Michael



Re: Clef "treble_8"

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 22:09 schrieb Noeck:


The case of the spacing overview is similar. The visual index is created
from a LilyPond source code. If I (or someone) finds a way to create a
clickable SVG file from it, one could include it into HTML and make it
blend much better into the/a documentation website.

Would you share the source code for the visual index?

Cheers,
Michael


Cheers,
Joram


¹: A gentle introduction to overrides will follow at some point.
²: A 2.20 version will be put online as soon as 2.20 is out.





Re: LSR contribution

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 10:10 schrieb Michael Käppler:



Do you have any idea how to preserve indentation within  blocks?
Inserting  or the like seems hacky, inline-css-styling too...

Ok, found out that the combination of  and  tags does work
well for that purpose.



Probably one suggestion:
How about gving the user some hint or example-message what can be
expected if warnings are triggered or debug-mode is enabled?

Do you mean inside the description or as snippet output?
Btw, do you know a way to dump warning-messages to the graphical output?

Added some examples to the description.
The LSR seems to be down at the moment, though.
What bothers me a little bit is the unpredictable order of warnings on
the console.
Do you know a way to fix this?

Cheers,
Michael



Re: Clef "treble_8"

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 16:56 schrieb Noeck:


If you don’t know what to look for to find the name, this page could help:
https://joramberger.de/files/lilypond_visualindex.pdf

Wow, this is pretty cool! Why isn't this part of the official docs?

Cheers,
Michael


HTH,
Joram






Re: LSR contribution

2020-02-10 Thread Michael Käppler



Hi Harm,


Fine with me, I already updated the LSR-code, for now unapproved.
Please have a look whether all is ok, snippet-description and the like.

Thank you for updating!
Will update the description this evening.
Do you have any idea how to preserve indentation within  blocks?
Inserting  or the like seems hacky, inline-css-styling too...


Probably one suggestion:
How about gving the user some hint or example-message what can be
expected if warnings are triggered or debug-mode is enabled?

Do you mean inside the description or as snippet output?
Btw, do you know a way to dump warning-messages to the graphical output?

Cheers,
Michael



Re: LSR contribution

2020-02-05 Thread Michael Käppler

Hi Harm,
sorry that I did not respond for over one month... Many other things had
to be done.
Now I would like to finish this snippet to be free for new interesting
things. ;)

I did substantially rework some parts of the engraver, namely switching
to a list-processing-way of dealing with current/last-grobs/pitches/...
Not sure if you like this change. I like it for less code duplication...


Hi Michael,

Am Fr., 27. Dez. 2019 um 16:12 Uhr schrieb Michael Käppler :

Hi Harm,
thanks for your comments and this inspiring discussion!

me too!

Iiuc, you want to keep the possibility the user defines the intervaldefs like
#(define intervaldefs
'(("my-prime++" . (0 . 1))
  ...)

Exactly.

Fine with me, this should be mentioned in the description/comments,
probably like

%% Interval definitions alist
%% Key:
%% number-string determines the interval type, 1=prime, 2=second, 3=third ...
%% plus and minus signs determine variant, no sign=perfect interval, +=major,
%% ++=augmented, -=minor, --=diminished

%% Other strings for the interval-type are possible as well, if given
to the engraver in the same way.
(Bad wording, you may get the point, though ... hopefully)

Done.


Btw, I'd change

%% intervals-given: list of the form
%%   #`((interval1 ,dir1 enh1 ,color1)
%%  (interval2 ,dir2 enh2 ,color2)
%%  ...
%%  (intervalN ,dirN enhN ,colorN))
%% with
%% intervaln: string - specifying the interval to search after
%% dirn: integer - UP (=1) DOWN (=-1) or 0 (up and down)
%% enhn: boolean - search for enharmonically equivalent intervals, too?
%% colorn: lilypond color value, see NR A.7.

to always use capital N for
intervalN etc

Done. The reason was that I thought of 'n' as the "running" variable
(n=1,2,3 etc.) and 'N' as the last value,
that 'n' finally reaches.
But maybe this was rather misleading.



I found no need to do work in `process-acknowledged`.
Thus all work is done in 'note-head-interface of `acknowledgers`
Probably more efficient, but I have not really checked.

I think it is definitily more efficient, since process-acknowledged is
called multiple times after
one grob has been acknowledged by the engraver. The question is to which
extent
the "educational" idea of showing the various hooks in action justifies
this overhead.

I think we should go for the current code.
Other hooks should be thoroughly demonstrated, _if_ they are needed to
get the desired result.
In other words, demonstrating process-acknowledged should be left to
another LSR snippet.

Ok.




Btw, there is one case, where I don't know how to deal with:
2.18.2 can't cope with an empty engraver, see:

\score {
\new Staff \relative c' { c4 d }
\layout {
  \context {
\Voice
\consists \color_interval_engraver #intervaldefs #`(("30-" 0 #t ,green))
  }
}
}

No problem for 2.19.83, though.

Oh no, further insufficient testing of mine. The following minimal
"void" engraver
works for me with both 2.18.2 and 2.19.80:
`((initialize . ,(lambda (translator) #t)))

Nice, I'd add a comment about different behaviour of 2.18.2 vs 2.19.x
accepting an empty list as engraver.
You go back to the list-syntax, also possible would be:
(make-engraver ((initialize translator) '()))

Done.


Some other remarks:

the type-check uses ly:dir?, ofcourse it's my own suggestion to use
ly:dir?, though probably worth a comment, because the allowed 0 here
means UP _and_ DOWN as opposed to the usual CENTER.

Done.


Some comments exceed the 80-characters line-width.

For some strings you circumvent it by doing (string-append "long
string " "other long string")
I'll not object to do so. Though, I've no problem to simply put those
long strings at line-begin or to decrease indentation.
Even if that means to violate usual indentation-rules.


All things mentioned above are micro-issues, imho, I hope you'll not
tired of me being such a nitpicker.

Not at all. It's interesting to learn from your style!


And a general one.

If a note is last in previous interval and first in a new one, then
the color from the new one is done, leaving the first of the previous
interval with the for it set color:

\score {
   <<
 \new Staff { b c' b' }
 \new Staff {  }
   >>
   \layout {
 \context {
   \Voice
   \consists
 \color_interval_engraver #intervaldefs
   #`(("2-" 0 #t ,green)
  ("7+" 0 #t ,red)
   )
 }
   }
}

No clue how to improve this situation.

You're absolutely right. I think this is unavoidable with this design
(coloring both notes).
I added a warning for this case and, while I was at it, some more debug
output.
Some neat solution would be to draw Horizontal_brackets instead. Thus we
could
correctly represent overlapping intervals, too.
I do not have the time to implement this, however.

Cheers,
Michael


\version "2.18.2"

%% Interval definitions alist
%%

Re: compiling 2.19.83 needs guile-config < 1.9.0

2020-01-18 Thread Michael Käppler

Am 18.01.2020 um 09:36 schrieb David Kastrup:

Bric  writes:


I was asking about the latter:  the older versions of guile are not compiling.

Has anyone  run into this?  and solved it?

Take the tip of the branch_release-1-8 branch in the Guile repository.
Thien-Thi Nguyen has kept that compilable even though no official
release is.


This is interesting. A couple of hours ago I had the discussion with
Federico
whether there is a reason for compiling guile in LilyDev postinstall
based on branch_release-1-8 rather
than just taking guile-1.8.8.tar.gz from ftp.gnu.org.
Are the fixes on top of the guile-1.8.8 release really important for us?

Greetings to Salzburg, wishing you a good time there,
Michael



Re: Getting readline to work in scheme-sandbox

2020-01-17 Thread Michael Käppler




Am 17.01.2020 um 00:32 schrieb Knute Snortum:

That did it!  Thanks!

Nice to hear, a very ugly 'fix', though. I will continue investigating.


---
Knute Snortum
(via Gmail)
On Thu, Jan 16, 2020 at 1:06 PM Michael Käppler  wrote:

Am 16.01.2020 um 19:45 schrieb Knute Snortum:

I used "make install" to install libguilereadline.

I've attached config.log and libguilereadline.dump.

---
Knute Snortum
(via Gmail)

Ok, seems that your libguilereadline-v-17 has been built correctly
against the readline-8.0 library, which you provided with
libreadline-dev. Fine.
Please rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/ in there.

Then test again, if it fails, please do a strace.

Michael


On Thu, Jan 16, 2020 at 12:51 AM Michael Käppler  wrote:

Am 15.01.2020 um 23:55 schrieb Knute Snortum:

Okay, I built guile 1.8.7 after installing GNU MP and flex, but I get
the same error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

So I redid the strace and I attached the log file.

Which way of "installing" libguilereadline did you choose?
Did you run "make install" or did you copy
libguilereadline-v-17.so.17.0.3 to
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib ?
Could you please send me your config.log from guile-1.8/guile-readline
and additionately do a

objdump -x
~/guile-1.8/guile-readline/.libs/libguilereadline-v-17.so.17.0.3 >
libguilereadline.dump
and attach the resulting file, too?

Thanks for your patience,
Michael


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:29 PM Michael Käppler  wrote:

Do you have "gettext" installed? If not, please install and retry.

Am 15.01.2020 um 18:38 schrieb Knute Snortum:

I didn't get past autogen:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory guile-readline to autoreconf
autoreconf: Entering directory `guile-readline'
autoreconf: running: aclocal --force
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:18: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:13: installing './install-sh'
configure.ac:13: installing './missing'
Makefile.am:29: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '*_CPPFLAGS')
Makefile.am: installing './depcomp'
autoreconf: Leaving directory `guile-readline'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:932: error: possibly undefined macro: AM_GNU_GETTEXT
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:24 AM Michael Käppler  wrote:

Ok, seems that guile-2.2-libs does not provide libguilereadline...

I think the remaining option is to build guile-1.8 from scratch.
First make sure that you have libreadline-dev installed, then, in your
home directory, do:

git clone -b branch_release-1-8 --single-branch
https://git.savannah.gnu.org/git/guile.git guile-1.8
cd guile-1.8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
make install
ldconfig

If you do not want to install your self-compiled guile-1.8 globally with
"make install" it should be also sufficient to
rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to
libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/
in there.

Then try with scheme-sandbox.ly again. Please report if it succeeds now.

Michael




Am 15.01.2020 um 00:05 schrieb Knute Snortum:

I'm not in a vanilla setup, so I

Re: compiling 2.19.83 needs guile-config < 1.9.0

2020-01-17 Thread Michael Käppler

Am 17.01.2020 um 23:01 schrieb Michael Käppler:

Could you please provide some information how your build actually failed?
What was the error message you received?

I mean: how did the >guile< build fail?
Did you try the latest 1.8 release (1.8.8)?
If not, please download http://ftp.gnu.org/gnu/guile/guile-1.8.8.tar.gz
and retry.
Attach your config.log, please.



Cheers,
Michael





Re: compiling 2.19.83 needs guile-config < 1.9.0

2020-01-17 Thread Michael Käppler

Am 17.01.2020 um 22:48 schrieb Bric:


i don't follow the above.   You would point to /path/to/guile-config
and /path/to/guile /*if*/ you have the right version installed.
Lilypond is complaining that my installed version is too new.

A (rare) need to downgrade a dependency, correct?

Or -- correct me if i'm wrong -- as an alternative to downgrading, I
could build an old, compatible version from source, to an isolated
directory, and satisfy the lilypond dependency that way?

I was asking about the latter:  the older versions of guile are not
compiling.

For me this was not clear until now.



Has anyone  run into this?  and solved it?

Could you please provide some information how your build actually failed?
What was the error message you received?

Cheers,
Michael


Re: compiling 2.19.83 needs guile-config < 1.9.0

2020-01-16 Thread Michael Käppler

Am 16.01.2020 um 22:47 schrieb Thomas Morley:

Am Do., 16. Jan. 2020 um 21:29 Uhr schrieb Bric :

I think this was discussed before, but i'm not sure how to downgrade guile on 
Ubuntu 18.04.2 LTS

I tried building guile-1.8.0, guile-1.8.4, guile-1.8.5, but the build fails for 
all three.

lilypond ./configure error:

ERROR: Please install required programs: guile-config < 1.9.0 (installed: 
2.2.3) (guile-devel, guile-dev or libguile-dev package) libguile (libguile-dev, 
guile-devel or guile-dev package). GUILE-with-rational-bugfix

You likely need to point configure to guile and guile-config

../configure GUILE_CONFIG=/path/to/guile-config GUILE=/path/to/guile


Sorry, did accidentally forget to reply also to the list.
What I was unsure from the your post, Bric, is what "... the build fails
for all three" means.
Either
a) You could not build guile, neither 1.8.0, 1.8.4, nor 1.8.5
b) You did successfully build three different versions of guile, but
haven't had success with none of them in compiling lilypond.

In any case it would be good to know
a) Which version of LP are you trying to compile? From current master?
b) If building guile is the problem, how does the build actually fail?

Michael



Re: Getting readline to work in scheme-sandbox

2020-01-16 Thread Michael Käppler

Am 16.01.2020 um 19:45 schrieb Knute Snortum:

I used "make install" to install libguilereadline.

I've attached config.log and libguilereadline.dump.

---
Knute Snortum
(via Gmail)

Ok, seems that your libguilereadline-v-17 has been built correctly
against the readline-8.0 library, which you provided with
libreadline-dev. Fine.
Please rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/ in there.

Then test again, if it fails, please do a strace.

Michael



On Thu, Jan 16, 2020 at 12:51 AM Michael Käppler  wrote:

Am 15.01.2020 um 23:55 schrieb Knute Snortum:

Okay, I built guile 1.8.7 after installing GNU MP and flex, but I get
the same error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

So I redid the strace and I attached the log file.

Which way of "installing" libguilereadline did you choose?
Did you run "make install" or did you copy
libguilereadline-v-17.so.17.0.3 to
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib ?
Could you please send me your config.log from guile-1.8/guile-readline
and additionately do a

objdump -x
~/guile-1.8/guile-readline/.libs/libguilereadline-v-17.so.17.0.3 >
libguilereadline.dump
and attach the resulting file, too?

Thanks for your patience,
Michael


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:29 PM Michael Käppler  wrote:

Do you have "gettext" installed? If not, please install and retry.

Am 15.01.2020 um 18:38 schrieb Knute Snortum:

I didn't get past autogen:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory guile-readline to autoreconf
autoreconf: Entering directory `guile-readline'
autoreconf: running: aclocal --force
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:18: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:13: installing './install-sh'
configure.ac:13: installing './missing'
Makefile.am:29: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '*_CPPFLAGS')
Makefile.am: installing './depcomp'
autoreconf: Leaving directory `guile-readline'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:932: error: possibly undefined macro: AM_GNU_GETTEXT
 If this token and others are legitimate, please use m4_pattern_allow.
 See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:24 AM Michael Käppler  wrote:

Ok, seems that guile-2.2-libs does not provide libguilereadline...

I think the remaining option is to build guile-1.8 from scratch.
First make sure that you have libreadline-dev installed, then, in your
home directory, do:

git clone -b branch_release-1-8 --single-branch
https://git.savannah.gnu.org/git/guile.git guile-1.8
cd guile-1.8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
make install
ldconfig

If you do not want to install your self-compiled guile-1.8 globally with
"make install" it should be also sufficient to
rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to
libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/
in there.

Then try with scheme-sandbox.ly again. Please report if it succeeds now.

Michael




Am 15.01.2020 um 00:05 schrieb Knute Snortum:

I'm not in a vanilla setup, so I changed the commands to: (just for posterity)

$ export 
LD_LIBRARY_PATH="/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib"
$ strace -o readlinedebug.log
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/bin/lilypond
scheme-s

Re: Getting readline to work in scheme-sandbox

2020-01-16 Thread Michael Käppler

Am 15.01.2020 um 23:55 schrieb Knute Snortum:

Okay, I built guile 1.8.7 after installing GNU MP and flex, but I get
the same error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

So I redid the strace and I attached the log file.

Which way of "installing" libguilereadline did you choose?
Did you run "make install" or did you copy
libguilereadline-v-17.so.17.0.3 to
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib ?
Could you please send me your config.log from guile-1.8/guile-readline
and additionately do a

objdump -x
~/guile-1.8/guile-readline/.libs/libguilereadline-v-17.so.17.0.3 >
libguilereadline.dump
and attach the resulting file, too?

Thanks for your patience,
Michael



---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:29 PM Michael Käppler  wrote:

Do you have "gettext" installed? If not, please install and retry.

Am 15.01.2020 um 18:38 schrieb Knute Snortum:

I didn't get past autogen:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory guile-readline to autoreconf
autoreconf: Entering directory `guile-readline'
autoreconf: running: aclocal --force
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:18: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:13: installing './install-sh'
configure.ac:13: installing './missing'
Makefile.am:29: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '*_CPPFLAGS')
Makefile.am: installing './depcomp'
autoreconf: Leaving directory `guile-readline'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:932: error: possibly undefined macro: AM_GNU_GETTEXT
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:24 AM Michael Käppler  wrote:

Ok, seems that guile-2.2-libs does not provide libguilereadline...

I think the remaining option is to build guile-1.8 from scratch.
First make sure that you have libreadline-dev installed, then, in your
home directory, do:

git clone -b branch_release-1-8 --single-branch
https://git.savannah.gnu.org/git/guile.git guile-1.8
cd guile-1.8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
make install
ldconfig

If you do not want to install your self-compiled guile-1.8 globally with
"make install" it should be also sufficient to
rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to
libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/
in there.

Then try with scheme-sandbox.ly again. Please report if it succeeds now.

Michael




Am 15.01.2020 um 00:05 schrieb Knute Snortum:

I'm not in a vanilla setup, so I changed the commands to: (just for posterity)

$ export 
LD_LIBRARY_PATH="/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib"
$ strace -o readlinedebug.log
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/bin/lilypond
scheme-sandbox.ly

The log file is attached.

---
Knute Snortum
(via Gmail)

On Tue, Jan 14, 2020 at 8:47 AM Michael Käppler  wrote:

This is weird. Seems that strace does not recognize the shebang in the
lilypond script.
Could you please to try to execute the steps in the startup script directly?
I assume you used the vanilla lilypond installer and installed to your
home directory
/home/knute/:

export LD_LIBRARY_PATH="/home/knute/lilypond/usr/lib"
strace -o readlinedebug.log /home/knute/lilypond/usr/bin/lilypond
scheme-sandbox.ly



Am 14.01.2020 um 16:36 schrieb Knute Snortum:

It looks like I get an error in strace.  The sandbox is never executed:

execve("/home/knute/bin/

Re: Getting readline to work in scheme-sandbox

2020-01-15 Thread Michael Käppler

Do you have "gettext" installed? If not, please install and retry.

Am 15.01.2020 um 18:38 schrieb Knute Snortum:

I didn't get past autogen:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory guile-readline to autoreconf
autoreconf: Entering directory `guile-readline'
autoreconf: running: aclocal --force
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:18: installing './compile'
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:13: installing './install-sh'
configure.ac:13: installing './missing'
Makefile.am:29: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
(or '*_CPPFLAGS')
Makefile.am: installing './depcomp'
autoreconf: Leaving directory `guile-readline'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:905: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:932: error: possibly undefined macro: AM_GNU_GETTEXT
   If this token and others are legitimate, please use m4_pattern_allow.
   See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


---
Knute Snortum
(via Gmail)

On Wed, Jan 15, 2020 at 12:24 AM Michael Käppler  wrote:

Ok, seems that guile-2.2-libs does not provide libguilereadline...

I think the remaining option is to build guile-1.8 from scratch.
First make sure that you have libreadline-dev installed, then, in your
home directory, do:

git clone -b branch_release-1-8 --single-branch
https://git.savannah.gnu.org/git/guile.git guile-1.8
cd guile-1.8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
make install
ldconfig

If you do not want to install your self-compiled guile-1.8 globally with
"make install" it should be also sufficient to
rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to
libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/
in there.

Then try with scheme-sandbox.ly again. Please report if it succeeds now.

Michael




Am 15.01.2020 um 00:05 schrieb Knute Snortum:

I'm not in a vanilla setup, so I changed the commands to: (just for posterity)

$ export 
LD_LIBRARY_PATH="/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib"
$ strace -o readlinedebug.log
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/bin/lilypond
scheme-sandbox.ly

The log file is attached.

---
Knute Snortum
(via Gmail)

On Tue, Jan 14, 2020 at 8:47 AM Michael Käppler  wrote:

This is weird. Seems that strace does not recognize the shebang in the
lilypond script.
Could you please to try to execute the steps in the startup script directly?
I assume you used the vanilla lilypond installer and installed to your
home directory
/home/knute/:

export LD_LIBRARY_PATH="/home/knute/lilypond/usr/lib"
strace -o readlinedebug.log /home/knute/lilypond/usr/bin/lilypond
scheme-sandbox.ly



Am 14.01.2020 um 16:36 schrieb Knute Snortum:

It looks like I get an error in strace.  The sandbox is never executed:

execve("/home/knute/bin/lilypond", ["lilypond", "scheme-sandbox.ly"],
0x7ffe4792c428 /* 53 vars */) = -1 ENOEXEC (Exec format error)
strace: exec: Exec format error
+++ exited with 1 +++

---
Knute Snortum
(via Gmail)

On Mon, Jan 13, 2020 at 10:59 PM Michael Käppler  wrote:

Hi Knute,
I'm currently working on this problem. A library called
libguilereadline, that comes with guile,
does provide the interface to the libreadline library. The version we
ship with our packages, however,
seems to be broken somehow.
There are some ways to get around this. Do you have
guile-2.2-libs installed, too?
If installing guile-2.2-libs does not help either, please send me the output
of

strace -o readlinedebug.log lilypond scheme-sandbox.ly

where you type the mentioned commands for activating readline.

Regards,
Michael

Am 14.01.2020 um 01:31 schrieb Knute Snortum:

I recently di

Re: Getting readline to work in scheme-sandbox

2020-01-15 Thread Michael Käppler

Ok, seems that guile-2.2-libs does not provide libguilereadline...

I think the remaining option is to build guile-1.8 from scratch.
First make sure that you have libreadline-dev installed, then, in your
home directory, do:

git clone -b branch_release-1-8 --single-branch
https://git.savannah.gnu.org/git/guile.git guile-1.8
cd guile-1.8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
make install
ldconfig

If you do not want to install your self-compiled guile-1.8 globally with
"make install" it should be also sufficient to
rename
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib/libguilereadline-v-17.so.17.0.3
to
libguilereadline-v-17.so.17.0.3.old and put the corresponding file from
/home/knute/guile-1.8/guile-readline/.libs/
in there.

Then try with scheme-sandbox.ly again. Please report if it succeeds now.

Michael




Am 15.01.2020 um 00:05 schrieb Knute Snortum:

I'm not in a vanilla setup, so I changed the commands to: (just for posterity)

$ export 
LD_LIBRARY_PATH="/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/lib"
$ strace -o readlinedebug.log
/home/knute/lilypond/lilypond-2.19.83/lilypond/usr/bin/lilypond
scheme-sandbox.ly

The log file is attached.

---
Knute Snortum
(via Gmail)

On Tue, Jan 14, 2020 at 8:47 AM Michael Käppler  wrote:

This is weird. Seems that strace does not recognize the shebang in the
lilypond script.
Could you please to try to execute the steps in the startup script directly?
I assume you used the vanilla lilypond installer and installed to your
home directory
/home/knute/:

export LD_LIBRARY_PATH="/home/knute/lilypond/usr/lib"
strace -o readlinedebug.log /home/knute/lilypond/usr/bin/lilypond
scheme-sandbox.ly



Am 14.01.2020 um 16:36 schrieb Knute Snortum:

It looks like I get an error in strace.  The sandbox is never executed:

execve("/home/knute/bin/lilypond", ["lilypond", "scheme-sandbox.ly"],
0x7ffe4792c428 /* 53 vars */) = -1 ENOEXEC (Exec format error)
strace: exec: Exec format error
+++ exited with 1 +++

---
Knute Snortum
(via Gmail)

On Mon, Jan 13, 2020 at 10:59 PM Michael Käppler  wrote:

Hi Knute,
I'm currently working on this problem. A library called
libguilereadline, that comes with guile,
does provide the interface to the libreadline library. The version we
ship with our packages, however,
seems to be broken somehow.
There are some ways to get around this. Do you have
guile-2.2-libs installed, too?
If installing guile-2.2-libs does not help either, please send me the output
of

strace -o readlinedebug.log lilypond scheme-sandbox.ly

where you type the mentioned commands for activating readline.

Regards,
Michael

Am 14.01.2020 um 01:31 schrieb Knute Snortum:

I recently discovered the scheme-sandbox in LilyPond and I want to get
line editing to work.  In scheme-sandbox.ly the comments say:

% One typical thing you might want to put there is
% (use-modules (ice-9 readline))
% (activate-readline)
% in order to activate command line editing for interactive sessions.

I'm assuming that these are commands to type into the sandbox.  But
when I do this I get an error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

When I search for installed packages at the Linux command line, I see this:

libreadline8/eoan,now 8.0-3 amd64 [installed,automatic]

Any idea why readline is not available?

My system is Ubuntu 19.10, Guile is 2.2 and LilyPond is 2.19.83.

---
Knute Snortum
(via Gmail)






Re: Getting readline to work in scheme-sandbox

2020-01-14 Thread Michael Käppler

This is weird. Seems that strace does not recognize the shebang in the
lilypond script.
Could you please to try to execute the steps in the startup script directly?
I assume you used the vanilla lilypond installer and installed to your
home directory
/home/knute/:

export LD_LIBRARY_PATH="/home/knute/lilypond/usr/lib"
strace -o readlinedebug.log /home/knute/lilypond/usr/bin/lilypond
scheme-sandbox.ly



Am 14.01.2020 um 16:36 schrieb Knute Snortum:

It looks like I get an error in strace.  The sandbox is never executed:

execve("/home/knute/bin/lilypond", ["lilypond", "scheme-sandbox.ly"],
0x7ffe4792c428 /* 53 vars */) = -1 ENOEXEC (Exec format error)
strace: exec: Exec format error
+++ exited with 1 +++

---
Knute Snortum
(via Gmail)

On Mon, Jan 13, 2020 at 10:59 PM Michael Käppler  wrote:

Hi Knute,
I'm currently working on this problem. A library called
libguilereadline, that comes with guile,
does provide the interface to the libreadline library. The version we
ship with our packages, however,
seems to be broken somehow.
There are some ways to get around this. Do you have
guile-2.2-libs installed, too?
If installing guile-2.2-libs does not help either, please send me the output
of

strace -o readlinedebug.log lilypond scheme-sandbox.ly

where you type the mentioned commands for activating readline.

Regards,
Michael

Am 14.01.2020 um 01:31 schrieb Knute Snortum:

I recently discovered the scheme-sandbox in LilyPond and I want to get
line editing to work.  In scheme-sandbox.ly the comments say:

% One typical thing you might want to put there is
% (use-modules (ice-9 readline))
% (activate-readline)
% in order to activate command line editing for interactive sessions.

I'm assuming that these are commands to type into the sandbox.  But
when I do this I get an error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

When I search for installed packages at the Linux command line, I see this:

libreadline8/eoan,now 8.0-3 amd64 [installed,automatic]

Any idea why readline is not available?

My system is Ubuntu 19.10, Guile is 2.2 and LilyPond is 2.19.83.

---
Knute Snortum
(via Gmail)








Re: Getting readline to work in scheme-sandbox

2020-01-13 Thread Michael Käppler

Hi Knute,
I'm currently working on this problem. A library called
libguilereadline, that comes with guile,
does provide the interface to the libreadline library. The version we
ship with our packages, however,
seems to be broken somehow.
There are some ways to get around this. Do you have
guile-2.2-libs installed, too?
If installing guile-2.2-libs does not help either, please send me the output
of

strace -o readlinedebug.log lilypond scheme-sandbox.ly

where you type the mentioned commands for activating readline.

Regards,
Michael

Am 14.01.2020 um 01:31 schrieb Knute Snortum:

I recently discovered the scheme-sandbox in LilyPond and I want to get
line editing to work.  In scheme-sandbox.ly the comments say:

% One typical thing you might want to put there is
% (use-modules (ice-9 readline))
% (activate-readline)
% in order to activate command line editing for interactive sessions.

I'm assuming that these are commands to type into the sandbox.  But
when I do this I get an error:

guile> (use-modules (ice-9 readline))
ERROR: readline is not provided in this Guile installation
ABORT: (misc-error)

When I search for installed packages at the Linux command line, I see this:

libreadline8/eoan,now 8.0-3 amd64 [installed,automatic]

Any idea why readline is not available?

My system is Ubuntu 19.10, Guile is 2.2 and LilyPond is 2.19.83.

---
Knute Snortum
(via Gmail)






Fixing guile-debugger.ly - Some investigations

2020-01-07 Thread Michael Käppler

Hi all,
while trying to debug a problem concerning scheme code I stumbled upon
the somewhat broken
state of the "guile-debugger.ly"-interface.
This was discussed several times on the list, seemingly without a good
solution.
See:
https://lists.gnu.org/archive/html/lilypond-user/2014-05/msg00595.html
and more recently
https://lists.gnu.org/archive/html/lilypond-user/2019-09/msg00284.html

I found that guile-debugger.ly will only work on my Ubuntu 18.04 system
if there's an additional guile-1.8 installation present.
This is true for the vanilla installers 2.18.2 and also for 2.19.83 from
http://lilypond.org/download.html and also for the 2.18.2 package in the
Ubuntu 18.04 repo.
Ubuntu 18.04 does not provide guile-1.8 anymore, AFAIK. Self-compiling
worked flawlessly for me, but I think it would
be better to provide the libraries needed for guile-debugger.ly with the
lilypond installer. (Or, as a quick and dirty "solution", add
an error message to guile-debugger.scm stating that guile-1.8 has to be
installed in order to make guile-debugger.ly work)

There a two different problems, though.
1. With the help of strace I could figure out that guile does load
libguilereadline, which is provided
in /lilypond/usr/lib. Then for some reason which I could not find out it
does not (not even try to) load libreadline, however.
It does not output an error, either.
If I copy a self-compiled libguilereadline from my own guile 1.8.8 build
to /lilypond/usr/lib, it does succeed to load libreadline.
The very different sizes of the provided libguilereadline (4352 bytes)
compared to the packaged one (52032 bytes) seemed a bit strange to me, too.
I do not know anything about library linking etc., so maybe this is normal.
2. the whole 'debugger' directory is missing in
/lilypond/usr/share/guile/1.8/ice-9.
After copying this directory from my own guile-1.8 build, the debugger
works fine. (At least loading the debugger; I did not try any real
debugging yet)

See the full test procedure in the log attached, for which I used a
fresh vanilla 2.19.83 install.

Seems that for further investigation I need a GUB setup, which I do not
have currently.
Are the instructions that Knut(?) posted some time ago still valid?
I vaguely remember having read some about some commits that have to be
cherry-picked in order to make GUB work,
quite unsure about this.

Cheers,
Michael



michael@michael-VirtualBox:~/lilypond-generic-2.19/bin$ ./lilypond 
guile-debugger.ly
GNU LilyPond 2.19.83
»/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ly/guile-debugger.ly«
 wird verarbeitet
Analysieren...
/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ly/guile-debugger.ly:39:2:
 Fehler: GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
#
 (use-modules (ice-9 readline))
readline is not provided in this Guile installation
/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ly/guile-debugger.ly:40:2:
 Fehler: GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
#
 (activate-readline)
Unbound variable: activate-readline

 Guile debugger for Lilypond
 For help enter (debug-help)
/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ly/guile-debugger.ly:46:2:
 Fehler: GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck
#
 (use-modules (scm guile-debugger))
no code for module (ice-9 debugger command-loop)
guile> (quit)
schwerer Fehler: gescheiterte Dateien: "guile-debugger.ly"
michael@michael-VirtualBox:~/lilypond-generic-2.19/bin$ strace ./lilypond 
guile-debugger.ly 2>&1 | grep readline
stat("/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/scm/ice-9/readline.scm",
 0x7ffd88c368b0) = -1 ENOENT (No such file or directory)
stat("/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/scm/ice-9/readline",
 0x7ffd88c368b0) = -1 ENOENT (No such file or directory)
stat("/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ice-9/readline.scm",
 0x7ffd88c368b0) = -1 ENOENT (No such file or directory)
stat("/home/michael/lilypond-generic-2.19/lilypond/usr/share/lilypond/current/ice-9/readline",
 0x7ffd88c368b0) = -1 ENOENT (No such file or directory)
stat("/home/michael/lilypond-generic-2.19/lilypond/usr/bin/../share/guile/1.8/ice-9/readline.scm",
 {st_mode=S_IFREG|0644, st_size=8007, ...}) = 0
openat(AT_FDCWD, 
"/home/michael/lilypond-generic-2.19/lilypond/usr/bin/../share/guile/1.8/ice-9/readline.scm",
 O_RDONLY) = 6
read(6, " readline.scm --- support fu"..., 4096) = 4096
openat(AT_FDCWD, 
"/home/michael/lilypond-generic-2.19/lilypond/usr/lib/libguilereadline-v-17.la",
 O_RDONLY) = 7
read(7, "# libguilereadline-v-17.la - a l"..., 4096) = 1165
openat(AT_FDCWD, 
"/home/michael/lilypond-generic-2.19/lilypond/usr/bin/../lib/libguilereadline-v-17.a",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 

Re: LSR contribution

2019-12-27 Thread Michael Käppler

Hi Harm,
thanks for your comments and this inspiring discussion!
I would like to discuss a couple of things further.
My current version is attached.


You try to give the user always meaningful warning-messages.
That's great, putting out really helpful messages is hard work...
Alas, speaking only for me, I don't like those multiple nested `if`.
Thus I defined `type-check-intervals-given` and use it to filter the
user-given interval-list.
`filter` will return false for the first occurrence of failed
`type-check-intervals-given`. Thus it can be used to deal with
user-errors step-by-step.

Nice solution!

Along with it, I added a basic check for the user provided list (about
equal length of each sublist)


A good addition, but it did not work as intended, because the dissection
of the list with (car) (second) etc. took place regardless of whether
the interval was well-formed. See the comment in the code below.
I would not use ly:error here, because that will
terminate the compilation process, right?  It may be that
some intervals are well-formed and some are not. I think we should
still go on and process the well-formed intervals.
Otherwise we should raise an error for the other fault conditions
(Direction, enharmonic, color, missing interval in definitions) too,
what I do not think is appropriate.

There was an undefined variable `gen-warntext`, which is now gone as well.

Sorry for that mistake, which reminds me of always thoroughly testing
my code... :(

Furthermore, I changed the basic `intervaldefs` to take only pairs of
the interval-string and the semi-tonoc steps. The diatonic steps are
calculated relying on the interval-string.

I have to admit that I'm not happy with this change.
I think the user should be able to use custom
interval denotations like e.g.
https://en.wikipedia.org/wiki/Interval_(music)#Alternative_interval_naming_conventions
rather than having to rely on a hardcoded system.

I found no need to do work in `process-acknowledged`.
Thus all work is done in 'note-head-interface of `acknowledgers`
Probably more efficient, but I have not really checked.
I think it is definitily more efficient, since process-acknowledged is 
called multiple times after
one grob has been acknowledged by the engraver. The question is to which 
extent
the "educational" idea of showing the various hooks in action justifies 
this overhead.




A plethora of minor changes in code and comments... ;)

WDYT?

Btw, there is one case, where I don't know how to deal with:
2.18.2 can't cope with an empty engraver, see:

\score {
   \new Staff \relative c' { c4 d }
   \layout {
 \context {
   \Voice
   \consists \color_interval_engraver #intervaldefs #`(("30-" 0 #t ,green))
 }
   }
}

No problem for 2.19.83, though.
Oh no, further insufficient testing of mine. The following minimal 
"void" engraver

works for me with both 2.18.2 and 2.19.80:
`((initialize . ,(lambda (translator) #t)))

I'm commenting now directly in your code, mentioning only thoughts
that I did not mention before. Btw, your code had pretty much
lines with trailing whitespace which I removed, because I work here
on a local git repo and the diffs become cluttered otherwise...


#(use-modules (ice-9 pretty-print))

Removed, since unused.

color_interval_engraver =
#(define-scheme-function (parser location intervaldefs debug? 
intervals-given)

   (list? (boolean?) list?) ;; debug? is optional, defaults to #f

  (define (string-diatonic-semi-tonic-list string-semi-tonic-list)
   (map
 (lambda (e)
   (let* ((interval-string
    (string-trim-both
  (car e)
  (lambda (c) (or (eqv? c #\+) (eqv? c #\-)
  (interval-diatonic
    (string->number interval-string)))
 (cons (car e) (cons (1- interval-diatonic) (cdr e)
 string-semi-tonic-list))

  (define (type-check-intervals-given msg-header)

Is there a reason for not defining this as a binding
in the following (let* ...)?
No need to explicitly pass msg-header, then.

    (lambda (interval)
  ;; basic check for amount of args
  (if (= 4 (length interval))
  #t
  (begin
    (ly:error
  "~a Interval ~a must have 4 entries" msg-header interval)
    #f))

Here is a bug - if the check does not succeed,
the function will not return with #f but instead
go on with the (let) construct.
  ;; check every entry for type, additonally the first entry 
whether it's

  ;; a key in intervaldefs
  (let ((name (car interval))
    (dir (second interval))
    (enh? (third interval))
    (color (fourth interval)))
    (and
  ;; check first entry for string? and whether it's in 
intervaldefs

  (if (and (string? name) (assoc-get name intervaldefs))
  #t
  (begin
    (ly:warning
  "~a In interval ~a, ~a not found in interval 
definitions"

  msg-header
 

Re: LSR contribution

2019-12-20 Thread Michael Käppler

Btw. what I do not understand is why (process-acknowledged) is called
multiple times
after one grob has been acknowledged, it is even called >before< any
grob has been
acknowledged.
You can notice this clearly in
input/regression/scheme-engraver.ly

Cheers,
Michael

Am 16.12.2019 um 01:50 schrieb Thomas Morley:

Am So., 15. Dez. 2019 um 21:47 Uhr schrieb Thomas Morley
:

Am So., 15. Dez. 2019 um 21:17 Uhr schrieb Michael Käppler :

Hi all,
a few days ago I submitted a snippet to the LSR (title "Coloring
successive intervals"). I can see it in the snippet database,
but not in the webpage. The "Contributing" section of LSR states, that:

"Once the snippet is in, it has to be reviewed and approved by one of
the LSR editors,
and then it must be digested by the search engine. Within a few days,
you should be able to see your snippet online."

Is this still valid in principle? Or maybe did I something wrong?

Cheers,
Michael

In principle ... yes.
Though, I seem to be the only remaining regular active LSR editor, and
my time is limited.
Thus it may take some more time than the LSR "Contributing" section says.
Announcing it on the list helps, ofcourse.

I'll take a look soon.

As promised I had a look.

Many thanks for your snippet!

For now:

First I changed the LSR button "Large snippet" to "Standalone snippet".
It's a very rare case "Large snippet" is apppropriate, usualy for
snippets outputting multipe pages. In almost every other case it's
better to uncheck the buttons or to go for "Standalone snippet".
Otherwise compressed and (imho) ugly images are output by the LSR.

Please always observe a 80-characters line-width limit for your code.

Your snippet contains some advanced code. In such cases I often want
to discuss things a bit deeper. So:

What bugged me right from the first glance over it, is your need to
define several engravers, one for each case.
I think one engraver should do the work for _all_ those cases.

Attached you'll find my suggestion for this, along with better
indentation, 80-chars-line-width along with some minor adjustments.

Please have a look.

Nevertheless that can't be the final state, imho.
May I ask you to add inline code-comments what's done and why?
There are not so many examples of scheme-engravers around. One
thoroughly commented would be great.
Additionally, I'd go for more self-explaining variable-names.
P.e. "dt-st": for me it's an arbitrary collection of characters, with
a hyphen somewhere ;)

Thanks,
   Harm





Re: LSR contribution

2019-12-20 Thread Michael Käppler

Hi Harm et al.,
attached is my updated version.
I decided to split up the validity checks from the actual engraver,
because otherwise in case of invalid parameters the engraver would
only be instantiated to do nothing and nevertheless have its
acknowledger called every time.
The code is much more verbose now, which makes the flow of information
and control
clearer I hope.

Please let me know what you think about it.

Cheers,
Michael

Am 16.12.2019 um 01:50 schrieb Thomas Morley:

Am So., 15. Dez. 2019 um 21:47 Uhr schrieb Thomas Morley
:

Am So., 15. Dez. 2019 um 21:17 Uhr schrieb Michael Käppler :

Hi all,
a few days ago I submitted a snippet to the LSR (title "Coloring
successive intervals"). I can see it in the snippet database,
but not in the webpage. The "Contributing" section of LSR states, that:

"Once the snippet is in, it has to be reviewed and approved by one of
the LSR editors,
and then it must be digested by the search engine. Within a few days,
you should be able to see your snippet online."

Is this still valid in principle? Or maybe did I something wrong?

Cheers,
Michael

In principle ... yes.
Though, I seem to be the only remaining regular active LSR editor, and
my time is limited.
Thus it may take some more time than the LSR "Contributing" section says.
Announcing it on the list helps, ofcourse.

I'll take a look soon.

As promised I had a look.

Many thanks for your snippet!

For now:

First I changed the LSR button "Large snippet" to "Standalone snippet".
It's a very rare case "Large snippet" is apppropriate, usualy for
snippets outputting multipe pages. In almost every other case it's
better to uncheck the buttons or to go for "Standalone snippet".
Otherwise compressed and (imho) ugly images are output by the LSR.

Please always observe a 80-characters line-width limit for your code.

Your snippet contains some advanced code. In such cases I often want
to discuss things a bit deeper. So:

What bugged me right from the first glance over it, is your need to
define several engravers, one for each case.
I think one engraver should do the work for _all_ those cases.

Attached you'll find my suggestion for this, along with better
indentation, 80-chars-line-width along with some minor adjustments.

Please have a look.

Nevertheless that can't be the final state, imho.
May I ask you to add inline code-comments what's done and why?
There are not so many examples of scheme-engravers around. One
thoroughly commented would be great.
Additionally, I'd go for more self-explaining variable-names.
P.e. "dt-st": for me it's an arbitrary collection of characters, with
a hyphen somewhere ;)

Thanks,
   Harm


\version "2.18.2"

% Interval definitions alist
% Key:
% number determines the interval type, 1=prime, 2=second, 3=third ...
% plus and minus signs determine variant, no sign=perfect interval, +=major,
% ++=augmented, -=minor, --=diminished
% Value:
% the car represents the diatonic, the cdr the semitonic steps.
% Only positive values are specified, negative values for
% intervals downwards are generated in the engraver.
% This list may be extended or completely overwritten
% Usage: #(display (assoc-get "4--" intervaldefs))


#(define intervaldefs
   '(("1++" . (0 . 1))
 ("1" . (0 . 0))
 ("2-" . (1 . 1))
 ("2--" . (1 . 0))
 ("2+" . (1 . 2))
 ("2++" . (1 . 3))
 ("3-" . (2 . 3))
 ("3--" . (2 . 2))
 ("3+" . (2 . 4))
 ("3++" . (2 . 5))
 ("4--" . (3 . 4))
 ("4++" . (3 . 6))
 ("4" . (3 . 5))
 ("5--" . (4 . 6))
 ("5++" . (4 . 8))
 ("5" . (4 . 7))
 ("6-" . (5 . 8))
 ("6--" . (5 . 7))
 ("6+" . (5 . 9))
 ("6++" . (5 . 10))
 ("7-" . (6 . 10))
 ("7--" . (6 . 9))
 ("7+" . (6 . 11))
 ("7++" . (6 . 12))
 ("8--" . (7 . 11))
 ("8++" . (7 . 13))
 ("8" . (7 . 12))
 ("9-" . (8 . 13))
 ("9--" . (8 . 12))
 ("9+" . (8 . 14))
 ("9++" . (8 . 15))
 ("10-" . (9 . 15))
 ("10--" . (9 . 14))
 ("10+" . (9 . 16))
 ("10++" . (9 . 17))
 ("11--" . (10 . 16))
 ("11++" . (10 . 18))
 ("11" . (10 . 17))
 ("12--" . (11 . 18))
 ("12" . (11 . 19

% Create an engraver that compares the intervals between sequential pitches
% of a voice with a given list of intervals.
% If a specified interval is found, the heads of both notes encompassing
% the interval are colored.
%
% Mode of operation:
% Intervals are defined by two integers representing the diatonic
% resp. semitonic distance bet

Re: LSR contribution

2019-12-18 Thread Michael Käppler

Hi Harm,
many thanks for your comments and for the time you spent
with doing work that I should have been done.
I already thought about adjusting the engraver to take several intervals
into account,
but left it for simplicity (of the engraver, not of the examples ;)) But
you are absolutely right
that this would not be a good solution.

I'm currently working on it, taking a slightly different approach and
will send it (hopefully in
the next days) for another review.

Cheers,
Michael

Am 16.12.2019 um 01:50 schrieb Thomas Morley:

Am So., 15. Dez. 2019 um 21:47 Uhr schrieb Thomas Morley
:

Am So., 15. Dez. 2019 um 21:17 Uhr schrieb Michael Käppler :

Hi all,
a few days ago I submitted a snippet to the LSR (title "Coloring
successive intervals"). I can see it in the snippet database,
but not in the webpage. The "Contributing" section of LSR states, that:

"Once the snippet is in, it has to be reviewed and approved by one of
the LSR editors,
and then it must be digested by the search engine. Within a few days,
you should be able to see your snippet online."

Is this still valid in principle? Or maybe did I something wrong?

Cheers,
Michael

In principle ... yes.
Though, I seem to be the only remaining regular active LSR editor, and
my time is limited.
Thus it may take some more time than the LSR "Contributing" section says.
Announcing it on the list helps, ofcourse.

I'll take a look soon.

As promised I had a look.

Many thanks for your snippet!

For now:

First I changed the LSR button "Large snippet" to "Standalone snippet".
It's a very rare case "Large snippet" is apppropriate, usualy for
snippets outputting multipe pages. In almost every other case it's
better to uncheck the buttons or to go for "Standalone snippet".
Otherwise compressed and (imho) ugly images are output by the LSR.

Please always observe a 80-characters line-width limit for your code.

Your snippet contains some advanced code. In such cases I often want
to discuss things a bit deeper. So:

What bugged me right from the first glance over it, is your need to
define several engravers, one for each case.
I think one engraver should do the work for _all_ those cases.

Attached you'll find my suggestion for this, along with better
indentation, 80-chars-line-width along with some minor adjustments.

Please have a look.

Nevertheless that can't be the final state, imho.
May I ask you to add inline code-comments what's done and why?
There are not so many examples of scheme-engravers around. One
thoroughly commented would be great.
Additionally, I'd go for more self-explaining variable-names.
P.e. "dt-st": for me it's an arbitrary collection of characters, with
a hyphen somewhere ;)

Thanks,
   Harm





Re: Identifying Tonic in function & default lambda va

2019-12-18 Thread Michael Käppler

Hi Holleyanne,
please always try to provide a complete (minimal) example which is ready 
to try it out.

It is more likely then that somebody will respond to your question.

An adapted version of your snippet is attached.

First few remarks for providing optional arguments.
In a simple (lambda) statement, as you tried, this is not possible. A 
common approach

then is to provide an argument list and extract what you need.

Like:

colorNoteheads-c =
#(lambda (args)
  (let ((color-outline? (car args))
  (line-width (second args))
[...]

You can check the length of the argument list and see, if (or how many) 
optional

arguments are given.

Another possibility is to use the built-in (define-scheme-function), 
which also has

the possibility to do simple type checks.
See: 
http://lilypond.org/doc/v2.18/Documentation/extending/scheme-function-definitions.html


The problem with optional arguments is, that the last argument cannot be 
optional.
(Reasons are described in 
http://lilypond.org/doc/v2.18/Documentation/extending/scheme-function-usage.html)

Thus I changed the order of arguments:

coloredNoteheads-c =
#(define-scheme-function (tonic-pitch line-width tonic-color part-color 
color-outline?)

   (ly:pitch? number? color? (color? black) boolean?)

It is of course possible to pass a tonic pitch to this function as an 
argument.
Using context properties with this kind of callback function is not 
possible, IMHO, since

you cannot afterwards determine the context a grob was created in.

Anyway I think a better solution for what you want to achieve would be a 
scheme engraver.
That way you could access context properties, acknowledge NoteHead grobs 
and modify the stencil

as you like.

To be honest, I think that the underlying snippet with all its hardcoded 
paths is not the best way to color note heads with black outline,

because it will break for every change in the note head shape and so on.

I would propose a different solution, shown here as callback function:

%
\version "2.18.2"

\relative c' { c4 d e f }

color-notehead =
#(define-scheme-function (parser location color-outline color-fill 
border-width)

   (color? color? number?)
   (lambda (grob)
 (let* ((stencil-orig (ly:note-head::print grob))
    (scale-factors (cons (- 1 border-width)
 (- 1 border-width
   (grob-interpret-markup grob
 #{
   \markup \halign #LEFT \overlay {
 \with-color $color-outline \halign #CENTER \stencil 
$stencil-orig
 \with-color $color-fill \halign #CENTER \scale 
$scale-factors \stencil $stencil-orig

   }
 #}

\layout {
  \context {
    \Staff
    \override NoteHead.stencil = \color-notehead #black #red #0.3
  }
}


Cheers,
Michael

Am 16.12.2019 um 22:38 schrieb Holleyanne McDaniel:
Hi - I've been working to adapt Colored Noteheads/Outlines 
(http://lsr.di.unimi.it/LSR/Item?id=890) to highlight tonic notes, and 
also be able to color a given voice. I've adjusted the variables to 
let me specify tonic-color and part-color when I call the function, 
and I've narrowed the note comparison to look only at the tonic value. 
(my edited function included below)


There are two things I'm still struggling with. First, I'm currently 
having to include/call a separate function for every single key. (If I 
include them all in a library file, the parser maxes out its memory 
and fails.) In a previous solution that only colored tonic noteheads, 
I used a tonic variable from the EZ numbers engraver, allowing it to 
adapt to key changes on the fly:


(tonic-pitch (ly:context-property context 'tonic))
(tonic-name (ly:pitch-notename tonic-pitch))

Is there a way to use these variables in my current function? If not, 
can I specify the key through a variable when I call it? Every form of 
sending pitch, string, etc. that I've tried has broken the function.
And secondly, I know I'm probably missing something obvious because 
I've made it work in similar settings, but how do I get part-color to 
be an optional variable with a default in the lambda context? Every 
version of (predicate? (predicate? default)) type of definitions I've 
tried also errors out.


coloredNoteheads-c =               %% < rename per key
#(lambda (color-outline line-width tonic-color part-color)
   ;; @var{color-outline} is a boolean for whether
   ;; the outline is colored (#t) or the note head (#f).
   ;; @var{line-width} is a number, the width of
   ;; the outline, 7 is a good default.
   ;; @var{tonic-color} is a color, the key note's
   ;; color or outline.
   ;; @var{part-color} is a color, used if you want a particular
   ;; voice's notes highlighted. If not, set to black.
   (lambda (grob)
     (let* ((fsz  (ly:grob-property grob 'font-size 0.0))
            (mult (magstep fsz))
            (stl empty-stencil)
            (dur-log (ly:grob-property grob 'duration-log))
            (pch (ly:event-property (event-cause 

LSR contribution

2019-12-15 Thread Michael Käppler

Hi all,
a few days ago I submitted a snippet to the LSR (title "Coloring
successive intervals"). I can see it in the snippet database,
but not in the webpage. The "Contributing" section of LSR states, that:

"Once the snippet is in, it has to be reviewed and approved by one of
the LSR editors,
and then it must be digested by the search engine. Within a few days,
you should be able to see your snippet online."

Is this still valid in principle? Or maybe did I something wrong?

Cheers,
Michael



Re: Coloring adjacent notes by interval

2019-12-05 Thread Michael Käppler

Thanks David,
at the bottom is what I got so far.

Two problems I could not tackle so far:
1. I would like the engraver to be usable in two modes of operation:
A. acknowledging grobs from the note-head-engraver, coloring them
B. directly listening to note-events, output some kind of text, graphviz 
output etc.

even when there is no note-head-engraver present in the context.
Is it somehow possible to merge these two approaches into one engraver? 
The only
possibility I can think of at this moment is to use the 
listener-approach and

to override and revert NoteHead.color as a context property.
Would this be the right way to go?

2. At this moment the engraver colors only the second note of the 
interval found.
I would like to color also the first note, this would however require 
some kind of lookahead
because when the engraver acknowledges the first NoteHead grob it does 
not know which

step will follow.

Any advice is kindly appreciated.

Michael

%%%

\version "2.19.21"

% Interval definitions
% Number determines the interval type, 1=prime, 2=second, 3=third ...
% plus and minus signs determine variant, no sign=perfect interval, 
+=major ++=augmented

% -=minor, --=diminished
% This list may be extended or completely overwritten
% Usage: #(display (assoc-get "4--" intervaldefs))

#(define intervaldefs
   '(("1++" . (0 . 1))
 ("1" . (0 . 0))
 ("2-" . (1 . 1))
 ("2--" . (1 . 0))
 ("2+" . (1 . 2))
 ("2++" . (1 . 3))
 ("3-" . (2 . 3))
 ("3--" . (2 . 2))
 ("3+" . (2 . 4))
 ("3++" . (2 . 5))
 ("4--" . (3 . 4))
 ("4++" . (3 . 6))
 ("4" . (3 . 5))
 ("5--" . (4 . 6))
 ("5++" . (4 . 8))
 ("5" . (4 . 7))
 ("6-" . (5 . 8))
 ("6--" . (5 . 7))
 ("6+" . (5 . 9))
 ("6++" . (5 . 10))
 ("7-" . (6 . 10))
 ("7--" . (6 . 9))
 ("7+" . (6 . 11))
 ("7++" . (6 . 12))
 ("8--" . (7 . 11))
 ("8++" . (7 . 13))
 ("8" . (7 . 12))
 ("9-" . (8 . 13))
 ("9--" . (8 . 12))
 ("9+" . (8 . 14))
 ("9++" . (8 . 15))
 ("10-" . (9 . 15))
 ("10--" . (9 . 14))
 ("10+" . (9 . 16))
 ("10++" . (9 . 17))
 ("11--" . (10 . 16))
 ("11++" . (10 . 18))
 ("11" . (10 . 17))
 ("12--" . (11 . 18))
 ("12" . (11 . 19


interval-color-engraver = #(define-scheme-function (interval 
intervaldefs color)

 (string? list? color?)
 (lambda (context)
   (let ((last-pitch #f))
 (make-engraver
  (acknowledgers
   ((note-head-interface engraver grob 
source-engraver)
    (let* ((current-pitch 
(ly:event-property (ly:grob-property grob 'cause) 'pitch))
   (current-interval-dt-st (if 
last-pitch

(cons
(- (ly:pitch-steps current-pitch)
(ly:pitch-steps last-pitch))
(- (ly:pitch-semitones current-pitch)
(ly:pitch-semitones last-pitch)))
(cons #f #f)))
   (given-interval-dt-st 
(assoc-get interval intervaldefs))
   (color-grob? (equal? 
current-interval-dt-st given-interval-dt-st)))
  (format (current-error-port) 
"Previous pitch: ~a\n" last-pitch)
  (format (current-error-port) 
"Current pitch: ~a\n" current-pitch)
  (format (current-error-port) 
"Diatonic diff: ~a\n" (car current-interval-dt-st))
  (format (current-error-port) 
"Semitonic diff: ~a\n" (cdr current-interval-dt-st))
  (format (current-error-port) 
"Color grob?: ~a\n" color-grob?)

              (if color-grob?
  (set! (ly:grob-property grob 
'color) color))
  (set! last-pitch 
current-pitch



\layout {
  \context {
    \Voice
    \consists \interval-color-engraver #"2-" #intervaldefs #red
  }
}

\relative c'' { c4 c cis c des c d c }

Am 30.11.2019 um 21:47 schrieb David Kastrup:

Michael Käppler  writes:


Am 29.11.2019 um 23:27 schrieb David Kastrup:

Michael Käppler  writes:


Hi all,
I would like to color all successive notes in a voice that span a
certain interval, like e.g. a perfect fifth upwards.
Seems to me the most straightforward and extensible way would be to
write a scheme engraver for this, right?

No, just a callback function for a NoteHead's color property should be
fine.


That means it is possible to access properties of a preceding or
subsequent event from within a callback?

Ah, no.  I didn't really get what you meant using "successive" here.
Yes, this sounds like something that you'd use an engraver for.





Re: Coloring adjacent notes by interval

2019-11-30 Thread Michael Käppler

Am 29.11.2019 um 23:27 schrieb David Kastrup:

Michael Käppler  writes:


Hi all,
I would like to color all successive notes in a voice that span a
certain interval, like e.g. a perfect fifth upwards.
Seems to me the most straightforward and extensible way would be to
write a scheme engraver for this, right?

No, just a callback function for a NoteHead's color property should be
fine.


That means it is possible to access properties of a preceding or
subsequent event from within a callback?
Because I would have to know the pitch of the note causing the grob for
which the callback is called and the pitch
of the preceding note. Maybe I did not express clearly enough what I'm
trying to achieve.

Michael





Coloring adjacent notes by interval

2019-11-29 Thread Michael Käppler

Hi all,
I would like to color all successive notes in a voice that span a
certain interval, like e.g. a perfect fifth upwards.
Seems to me the most straightforward and extensible way would be to
write a scheme engraver for this, right?
Does someone know existing examples of scheme engravers that I could
look at as a starting point?
I am somewhat confused by the different hooks
(start-translation-timestep, acknowledge-music etc.) and where
to do which kind of things.

Kind regards,
Michael





Extract measures with function

2019-11-15 Thread Michael Käppler

Hi all,
is there a way to extract some particular measure from a voice through a
music function?
Like

bla = { c4 d e f | d e f g | e f g a }

\someMagicFunction #2 \bla -> d e f g
I would be very happy if someone could point me in the right direction.

Thanks,
Michael



Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

Why not put it in the underlying "input" then?

melody = {
    \override NoteHead.color = \highlightOutOfRange e' b'
   \relative c' {  c4 d e f }
}

You could even define a shortcut for this:

melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'

melody = {
   \melodyRange
   \relative c' {  c4 d e f }
}



Am 15.11.2019 um 12:09 schrieb Sandro Santilli:

On Fri, Nov 15, 2019 at 12:00:09PM +0100, Michael Käppler wrote:


\score {
   <<
     \new Staff \with {
   instrumentName = #"Voice"

     } {
   \new Voice = "vocal" \with {
     \override NoteHead.color = \highlightOutOfRange e' b'
   } { \notes }

     }

     \new Staff \with {
   instrumentName = #"Alto"
     } {
   \new Voice = "sax" \with {
     \override NoteHead.color = \highlightOutOfRange a e'
   } { \transpose c g, \notes }
     }

     \new Staff \with {
   instrumentName = #"Trumpet"
     } {
   \new Voice = "trp" \with {
     \override NoteHead.color = \highlightOutOfRange g' f''
   } { \transpose c b \notes }
     }
   >>

The thing is I'm writing multiple scores with the same parts
replicated (some with all 3 voices, some with just 2 voices)
so I'd like to avoid the duplication of ranges. A range is
specific to an instrument so I'd like to specify that in the
header for each instrument, reguardless of score...

--strk;






Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

notes = \relative c' { c d e f g a b c }

\score {
  <<
    \new Staff \with {
  instrumentName = #"Voice"

    } {
  \new Voice = "vocal" \with {
    \override NoteHead.color = \highlightOutOfRange e' b'
  } { \notes }

    }

    \new Staff \with {
  instrumentName = #"Alto"
    } {
  \new Voice = "sax" \with {
    \override NoteHead.color = \highlightOutOfRange a e'
  } { \transpose c g, \notes }
    }

    \new Staff \with {
  instrumentName = #"Trumpet"
    } {
  \new Voice = "trp" \with {
    \override NoteHead.color = \highlightOutOfRange g' f''
  } { \transpose c b \notes }
    }
  >>
  \layout { }
}

Am 15.11.2019 um 11:25 schrieb Sandro Santilli:

On Fri, Nov 15, 2019 at 10:45:45AM +0100, Michael Käppler wrote:

While I would strongly suggest that you update to the latest development
version, which can regarded
as very stable, this would work with 2.18.2:

Thanks, this works!
Can I specify a different override for different
voices by name ? Ie: I have these voices:

   \new Staff \with {
 instrumentName = #"Voice"
   } {
 \new Voice = "vocal" { \melody }
   }

   \new Staff \with {
 instrumentName = #"Alto"
   } {
 \transpose c a
 \new Voice = "sax" { \melody_alto }
   }

   \new Staff \with {
 instrumentName = #"Trumpet"
   } {
 \transpose c d
 \new Voice = "trp" { \melody_trp }
   }

--strk;






Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

While I would strongly suggest that you update to the latest development
version, which can regarded
as very stable, this would work with 2.18.2:

% LilyBin
\version "2.18.2"

highlightOutOfRange = #(define-scheme-function
  (parser location color lower upper)
  ((color? red) ly:pitch? ly:pitch?)
  (lambda (grob)
    (let* ((cause (ly:grob-property grob 'cause))
    (pitch (ly:event-property cause 'pitch)))
  (if (or (ly:pitch
On Thu, Nov 14, 2019 at 09:09:16AM -0800, Aaron Hill wrote:


\layout {
   \context { \Voice
 \override NoteHead.color = \highlightOutOfRange c' c''
   }
}

I like the highlighting idea! Is it compatible at all with 2.18.2 ?

It seems not to be: http://lilybin.com/166vv7/1

   Parsing.../usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: 
In expression (apply (ly:music-function-extract fun) parser ...):
   /usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: Wrong number of 
arguments to #

--strk;







Re: Tie multiple voice music contained in variable

2019-11-13 Thread Michael Käppler

Hi Gianmaria,
Interesting, for me running 2.19.80 the first example does not compile,
either.
Was there a recent change regarding post-event handling?

The problem is that the tie is not a separate expression that you could 
concatenate with other
musical expressions like

bla = { e'1 }
foo = { ~ }
bar = { e'2 }

{ \bla \foo \bar }

(AFAIK with 2.19.x, not sure for more recent versions)
Instead it is a post-event which is internally added to the
'articulations property of the NoteEvent to which the tie belongs.
Compare:

\version "2.19.80"

foo = {
  e'1 ~
}

bar = {
  e'1
}

\displayMusic \foo
\displayMusic \bar

What are you trying to achieve? Your second example does not make much
sense to me,
because if you want to tie two equally long notes you would normally use
chords for it I think:

foo = {
  1 ~ q1
}

{ \foo }

Of course you could do:

foo = {
  1~
}

bar = {
  1
}

{ \foo \bar }

Have a nice day,
Michael

Am 13.11.2019 um 08:38 schrieb Gianmaria Lari:

The following code containing a tie between variables, compiles and
works perfectly:

\version "2.21.0"
pa = {e'1}
*{ \pa~\pa } * %here is the tie!


Is there any way to do the same in case the variable contains two
voices like in the following code?

\version "2.21.0"
pa = {<< {e'1}\\{c'1}>>}
{ \pa~ \pa } %this does not compile


Thank you, g.





ly:parser-lookup vs. eval

2019-10-17 Thread Michael Käppler

Hi all,
a short internals-related question:
What is - from the technical point of view - the difference between the
following two ways of looking up a binding:

bla = {
    c4
}

$(eval 'bla (current-module))
$(ly:parser-lookup 'bla)

Is there a way to get a list of all toplevel bindings?

All the best,
Michael









___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: getting score information

2019-10-10 Thread Michael Käppler

Hi Jaap,
as far as I understand,
your first question is difficult to achieve, since the output definition 
blocks \layout, \midi are hardcoded in the parser.
I think you would have to modify the parser to introduce a new \musicxml 
keyword.

But maybe more experienced Lily hackers will correct me.

For your second question, try this as a starting point:

%%%
\version "2.19.80"

get-layout-header = #(define-scheme-function (score)
   (ly:score?)
   (let* ((output-defs (ly:score-output-defs score))
  (header (ly:module->alist 
(ly:score-header score)))

  (title (assoc-get 'title header))
  (composer (assoc-get 'composer header))
  ;; Look for sym in all output definitions
  ;; is there a way to determine of which 
type an output definition is?

  (get-sym (lambda (sym)
 (car (filter (lambda (el)
    (not (null? el)))
  (map (lambda 
(output-def)

(ly:output-def-lookup output-def sym))
output-defs)
  (indent (get-sym 'indent)))
 (display indent)
 (newline)
 (display title)
 (newline)
 (display composer)))


test = \score {
  \new Staff { c4 d e f }
  \layout {
    indent = 2\cm
  }
  \midi { }
  \header {
    title = "Foo"
    composer = "Bar"
  }
}

\get-layout-header \test
%%%

Have a nice day,
Michael



Am 08.10.2019 um 16:27 schrieb jaap de wolff:


Hello,

At this moment I am in the process of creating a lilypond musicxml module.

The module is written in scheme, and at this moment the module is able 
to handle simple music.


At this moment I am able to handle both

simplemusic = {valid music}

\musicxml \simplemusic

And

simplemusic = { valid music}

simplescore = \score (

    \simplemusic

    \layout {}

    }

\musicxml \simplescore

First question:

I want to be able to do:

simplemusic = {valid music}

\score (

    \simplemusic

    \layout {}

    \musicxml {}

    \midi {}

    }

Can anyone give a hint how to do this?

Second question:

When doing \musicxml \simplescore the scheme function gets an object 
of the type ly:score.


By digging in code I found out that from this score music can be 
extracted using ly:score-music


Also header can be extracted using ly:score-header and output-defs 
using ly:score-output-defs


The extracted music can be used without a problem.

However I can’t figure out how to use the extracted header and 
output-defs.


I want to be able to extract information like composer and title to 
put in musicxml


Does anyone have suggestions?

Jaap de Wolff


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Snippet for aligning markup inside another markup

2019-10-05 Thread Michael Käppler

Oops, here the missing snippet image...


Am 01.10.2019 um 01:45 schrieb Kieren MacMillan:



Hi Aaron,


Here's my take:

Nice work!
This should be part of the base distro, IMO.

Thanks,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Snippet for aligning markup inside another markup

2019-10-05 Thread Michael Käppler

Hi Aaron and Kieren,
very nice!
(I really should have read how the markup commands make use of 
ly:stencil-aligned-to...)
Here my variant of the code with tweakable alignment. Personally I 
prefer the "scheme only-style" but

I agree that the mixed style Aaron used would be shorter.


\version "2.19.80"

#(define-markup-command (aligned-overlay layout props xdir ydir args)
   (number? number? markup-list?)
   (let* ((stencils (interpret-markup-list layout props args))
  (align (lambda (stencil)
   (ly:stencil-aligned-to
  (ly:stencil-aligned-to stencil X xdir)
  Y ydir)))
  (stencils-aligned-merged (apply ly:stencil-add (map align 
stencils
 (ly:stencil-aligned-to (ly:stencil-aligned-to 
stencils-aligned-merged X LEFT)

   Y DOWN)))

boxone = \markup \with-color #yellow \filled-box #'(0 . 10) #'(0 . 10) #0
boxtwo = \markup \with-color #green \filled-box #'(3 . 9) #'(5 . 11) #0
boxthree = \markup \with-color #red \filled-box #'(2 . 5) #'(3 . 6) #0

\markup \column {
  "Without alignment"
  \overlay { \boxone \boxtwo \boxthree }
  \line {
  \column {
    "Everything centered "
    \aligned-overlay #CENTER #CENTER { \boxone \boxtwo \boxthree }
  }
  \column {
    "Everything aligned to bottom-left "
    \aligned-overlay #LEFT #DOWN { \boxone \boxtwo \boxthree }
  }
  \column {
    "Different alignments "
    \aligned-overlay #CENTER #UP {
  \boxone
  \aligned-overlay #LEFT #CENTER { \boxtwo \boxthree }
    }
  }
  \column {
    "Values in-between"
    \aligned-overlay #-0.8 #-0.5 {
  \boxone
  \aligned-overlay #0.5 #-0.2 { \boxtwo \boxthree }
    }
  }
  }
}


Cheers,
Michael

Am 01.10.2019 um 01:45 schrieb Kieren MacMillan:

Hi Aaron,


Here's my take:

Nice work!
This should be part of the base distro, IMO.

Thanks,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Snippet for aligning markup inside another markup

2019-09-30 Thread Michael Käppler

Hi folks,
for a project of mine I wanted to center a markup inside another markup.
I searched the built-in markup functions, but to no avail. (Surely it is
possible that I missed something...)
So I came up with the following code. Feel free to test and comment it.
Maybe it is possible in an easier way, though.
Would this kind of stuff fit into the LSR?

Best regards,
Michael

% Align src-markup inside dest-markup and merge stencils
% xdir = -1 aligns left edges, 1 right edges
% ydir = -1 aligns bottom edges, 1 top edges
% Values between -1 and 1 are interpolated

#(define-markup-command (align-inside layout props xdir ydir src-markup
dest-markup)
   (number? number? markup? markup?)
   (let* ((src-stil (interpret-markup layout props src-markup))
  (dest-stil (interpret-markup layout props dest-markup))

  (src-x-extent (ly:stencil-extent src-stil X))
  (src-y-extent (ly:stencil-extent src-stil Y))
  (src-x-center (interval-center src-x-extent))
  (src-y-center (interval-center src-y-extent))
  (src-width (interval-length src-x-extent))
  (src-height (interval-length src-y-extent))

  (dest-x-extent (ly:stencil-extent dest-stil X))
  (dest-y-extent (ly:stencil-extent dest-stil Y))
  (dest-x-center (interval-center dest-x-extent))
  (dest-y-center (interval-center dest-y-extent))
  (dest-width (interval-length dest-x-extent))
  (dest-height (interval-length dest-y-extent))

  (offset-x-centered (- dest-x-center src-x-center))
  (offset-y-centered (- dest-y-center src-y-center))
  (offset-dir (cons (+ offset-x-centered (* xdir 0.5 (-
dest-width src-width)))
 (+ offset-y-centered (* ydir 0.5 (-
dest-height src-height))

 (ly:stencil-add dest-stil (ly:stencil-translate src-stil
offset-dir

boxone = \markup \with-color #blue \filled-box #'(0 . 6) #'(0 . 6) #0
boxtwo = \markup \with-color #red \filled-box #'(3 . 5) #'(5 . 7) #0

\markup \align-inside #CENTER #CENTER \boxtwo \boxone
\markup \align-inside #LEFT #0.5 \boxtwo \boxone
\markup \align-inside #RIGHT #DOWN \boxtwo \boxone

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Translating stencils

2019-09-24 Thread Michael Käppler

Hi Harm,
many thanks for your advice!
The \table command was completely new to me.
Here is my current state of work:

#(define (mm->staff-spaces mm)
   (let ((ss (ly:output-def-lookup $defaultpaper 'staff-space)))
 (/ mm ss)))

#(define musiclist (list
    #{ { \clef bass e'4 } #}
    #{ { \clef treble a'2 } #}
    #{ { \key as \major \clef alto es' } #}
    #{ { \clef bass e'4 } #}
    #{ { \clef treble a'2 } #}
    #{ { \key as \major \clef alto es' } #}
    #{ { \clef bass e'4 } #}
    #{ { \clef treble a'2 } #}
    #{ { \key as \major \clef alto es' } #}
    ))

\layout {
  indent = #0
  \context {
    \Staff
    \remove "Time_signature_engraver"
    \remove "Bar_engraver"
    \override StaffSymbol #'width = #(mm->staff-spaces 20)
  }
}

#(define (make-score music)
   (let* ((score (scorify-music music))
  (layout (ly:output-def-clone $defaultlayout)))
 (ly:score-add-output-def! score layout)
 score))

#(define-markup-command (scoretomarkup layout props s)
   (ly:score?)
   (interpret-markup layout props (make-score-markup s)))

#(define-markup-list-command (scores-to-markup-list layout props scores)
   (list?)
   (map (lambda (s) (interpret-markup layout props s))
 (map make-score-markup scores)))

#(define scores (map make-score musiclist))

\markuplist { \table #'(0 0 0) \scores-to-markup-list \scores }

Some new questions arose:
1. Is there an easier way of converting a list of music expressions into
markups? Did I miss some built-in function
that would do the job, too?
2. I stumbled upon some functions I was not able to find in the source code.
First I wanted to see how the built-in \score markup-function does it's job.
I saw that it calls a function called score-lines-markup-list, which I
was unable to find in the repository.
Or take (make-score-markup) which I had seen in an older thread.
But a "git grep make-score-markup" returns nothing.
What am I missing?

Thank you,
Michael

Am 23.09.2019 um 23:14 schrieb Thomas Morley:

Am Mo., 23. Sept. 2019 um 18:04 Uhr schrieb Michael Käppler :

Hi all,
I'm trying to understand the way one can translate / stack stencils in
LilyPond.
Consider the following code:

#(define-markup-command (draw-line-mod layout props startpos endpos)
 (number-pair? number-pair?)
 #:properties ((thickness 1))

(let ((th (* (ly:output-def-lookup layout 'line-thickness)
 thickness))
  (startx (car startpos))
  (starty (cdr startpos))
  (endx (car endpos))
  (endy (cdr endpos)))
  (make-line-stencil th startx starty endx endy)))

#(define hlineone (markup #:draw-line-mod '(0 . 0) '(10 . 0)))
#(define hlinetwo (markup #:draw-line-mod '(0 . 10) '(10 . 10)))

#(define vlineone (markup #:draw-line-mod '(0 . 0) '(0 . 10)))
#(define vlinetwo (markup #:draw-line-mod '(10 . 0) '(10 . 10)))

\markup \hlineone
% \markup \hlinetwo
% \markup \vlineone
% \markup \vlinetwo

The ordinary draw-line markup function calls (make-line-stencil) with
startx/starty 0 0.
So I wrote the custom draw-line-mod function to figure out what happens
when I set the startx / starty to different values.
What I understand is that these values do not specify "absolute
coordinates" somewhere on the paper, but are somehow relative
to each other. But how exactly?

\markup \hlinetwo gives a line positioned exactly like \hlineone, though
the stencil has different starty.
\markup \vlinetwo, however,  gives a line starting at a different
vertical position than \vlineone.

Eventually I want to draw a kind of grid with horizontal and vertical
lines, placing little "scores" in them.
Attached is an example of what I want to achieve. But I do not want a
quick solution, instead I would be glad to understand
the stencil positioning better than now.

Kind regards,
Michael

If I understand correctly:
If you place a bunch of stencils on a page, then lilyponds
spacing-engine will drop in and white space may be disregarded. See:

\paper { markup-markup-spacing.padding = 5 }

\markup \hlineone
\markup \hlinetwo
\markup \vlineone
\markup \vlinetwo

And compare with:

\markup {
   \hlineone
   \hlinetwo
   \vlineone
   \vlinetwo
}

With the latter you can observe all the different settings (relative
to the previous stencil)

For your final goal, checkout the table-markup-list-command.
No lines implemented there, but probably a starting point.

Cheers,
   Harm




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \markup \score with independent \paper settings

2019-02-21 Thread Michael Käppler

Hi Urs,
like this?
I think it does what is specified; it aligns the center of the
markup-score to the note you attached it to.
I'm not sure, however, if this is what you want to achieve.

\version "2.19.80"

\paper {
  ragged-right = ##f
  system-count = 1
}

{
  c'1
  \override TextScript.self-alignment-X = #CENTER
  c'1 ^\markup \score {
    \new Staff {
  c''1
    }
    \layout {
  indent = #0
  ragged-right = ##t
  \context {
    \Voice
 \override NoteHead.color = #red
  }
    }
  }
  c'1
}



Am 21.02.2019 um 19:07 schrieb Urs Liska:


Is it possible to initialize a score created through \markup \score
with a fresh set of (or specific) \paper settings that are independent
from the surrounding document?

I'm using \markup \score to center some music in a measure. However,
when I have a paper setting that justifies the last system the new
score also has the full line-width. See the following example where
the "red" score is "properly" centered over the middle measure, but of
course ridiculously wide.

Any suggestion?
Thanks
Urs

\version "2.19.82"

\paper {
   ragged-right = ##f
   system-count = 1
}

{
   c'1
   \override TextScript.self-alignment-X = #CENTER
   c'1 ^\markup \score {
 \new Staff {
   c''1
 }
 \layout {
   \context {
 \Voice
  \override NoteHead.color = #red
   }
 }
   }
   c'1
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[OT] Guile debugging tutorial

2019-02-13 Thread Michael Käppler

Hi all,
I'm currently digging deeply into the mysteries of Scheme language with
help of the astonishing
book "Structure and Interpretation of Computer Programs" (Sussman  /
Abelson).
Often while trying to solve the SICP excersises my unsufficient
knowledge of the guile built-in debugger becomes apparent.
Could someone point me to a good tutorial for working with the guile
debugger?

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Doc string layout-set-absolute-staff-size wrong?

2019-02-13 Thread Michael Käppler

Hi all,
maybe my question was in the wrong place when posting this to
lilypond-devel,
so I want to give it a try at lilypond-user:

While trying to understand the calculations done in paper.scm regarding
staff-spaces and absolute units I stumbled across the docstring for
layout-set-absolute-staff-size in
paper.scm that reads:

  "Set the absolute staff size inside of a @code{\\layout@{@}} block.
@var{sz} is in points."

Shouldn't that be: @var{sz] is in millimeters?
This is the difference compared to (layout-set-staff-size), which takes
the staff size in points and does the conversion to mm, right?

Michael

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Aligning scores in a grid-like manner

2019-02-10 Thread Michael Käppler

Hi all,
a while ago I had the idea of creating a variant of the popular "pairs"
game with different notes, clefs,
time signatures etc.
I created the individual parts as Lilypond scores, which I exported as
svg files and did the final "assembly" to
a grid-like layout with Inkscape.
Attached is a small cutout of the final layout.
I'm curious, however, if it's possible to compose a bunch of lilypond
scores to a equally horizontally and vertically
aligned "grid" with lilypond alone.
What I use up to now is something like:

\version "2.19.0"

\layout {
  \context {
    \Staff
    \remove "Time_signature_engraver"
    \override StaffSymbol #'width = 20
  }
}

\score {
  \new Staff { e'4 }
}

\score {
  \new Staff { c'2 }
}

Maybe it is a completely improper approach to use a score for each part
of the grid and I have to
use one score per grid row, blanking out the space between the columns.
Glad to hear your advice.

Michael
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Please test new lilypond installers

2019-01-29 Thread Michael Käppler

Am 29.01.2019 um 10:19 schrieb Knut Petersen:


lilypond-2.21.0-1.linux-64.sh


Works fine, Ubuntu 18.04.1 LTS, Kernel 4.15.0-36-generic running as
guest in VirtualBox 5.2.22 r126460, host Windows 10 Version 1803.


lilypond-2.21.0-1.mingw.exe


Works fine too, Windows 10 Version 1803.

Thank you all for your great work!

Michael

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Strange behaviour

2017-11-13 Thread Michael Käppler

Seems what you are looking for is here:
http://lilypond.org/doc/v2.19/Documentation/notation/stanzas#stanzas-with-different-rhythms

Where exactly is the documentation unclear about using multiple voices?

This works for me:
<<
  \relative c' \new Voice = "vone" {
    d2 d4 d
    <<
  \new Voice = "vtwo" {
    \voiceOne
  d4 r r
  }
  {
    \voiceTwo
        \tiny
 d8 (a) a4 d4
    \oneVoice
  } >>
    \normalsize
    e8 e
  }
>>

Am 13.11.2017 um 07:58 schrieb Don Gingrich:

What I want is to effectively have two voices  in the second bar -- The
first time through fits the d4 r4 r4 e8 e tune and the second uses d4 (
a8) a4 d4 e8 e

I'm copying a sheet that used diminished size notes for the alternate,
so I figured, "OK, use grace notes" But for some reason that I don't
understand, the a4 generates both a small note _and_ a full size one --
the "curlys" around the a4 d4 were my attempt to force my will --  but
Lilypond politely ignored them.

melody = \relative c' {
   \clef treble
   \key d \major
   \time 2/2
   \repeat volta 2 {
     d2 \slurDashed d4 ( d) |
     d4 ( \grace a8 ) \grace{ a4 d4} r4 r4 e8 e
   }
     \bar "|."
  
}



I had tried voices previously, but found the explanations in the
documentation insufficient -- the attempt simply barfed or refused
generate what I expected.

I'm using dashed slurs since it makes more sense if I need to ignore
them in a subsequent verse.


Cheers,


-Don


It would be good to understand how to insert an occasional bar with an
alternate voice -- much vocal music uses a consistent chord progression
and accompaniment -- but varies the melody to fit the lyric.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Strange behaviour

2017-11-13 Thread Michael Käppler

Seems what you are looking for is here:
http://lilypond.org/doc/v2.19/Documentation/notation/stanzas#stanzas-with-different-rhythms

Where exactly is the documentation unclear about using multiple voices?

This works for me:
<<
  \relative c' \new Voice = "vone" {
    d2 d4 d
    <<
  \new Voice = "vtwo" {
    \voiceOne
  d4 r r
  }
  {
    \voiceTwo
        \tiny
 d8 (a) a4 d4
    \oneVoice
  } >>
    \normalsize
    e8 e
  }
>>

Am 13.11.2017 um 07:58 schrieb Don Gingrich:

What I want is to effectively have two voices  in the second bar -- The
first time through fits the d4 r4 r4 e8 e tune and the second uses d4 (
a8) a4 d4 e8 e

I'm copying a sheet that used diminished size notes for the alternate,
so I figured, "OK, use grace notes" But for some reason that I don't
understand, the a4 generates both a small note _and_ a full size one --
the "curlys" around the a4 d4 were my attempt to force my will --  but
Lilypond politely ignored them.

melody = \relative c' {
   \clef treble
   \key d \major
   \time 2/2
   \repeat volta 2 {
     d2 \slurDashed d4 ( d) |
     d4 ( \grace a8 ) \grace{ a4 d4} r4 r4 e8 e
   }
     \bar "|."
  
}



I had tried voices previously, but found the explanations in the
documentation insufficient -- the attempt simply barfed or refused
generate what I expected.

I'm using dashed slurs since it makes more sense if I need to ignore
them in a subsequent verse.


Cheers,


-Don


It would be good to understand how to insert an occasional bar with an
alternate voice -- much vocal music uses a consistent chord progression
and accompaniment -- but varies the melody to fit the lyric.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \partcombine and decrescendo spanner

2017-07-06 Thread Michael Käppler

Brillant stuff!



Am 06.07.2017 um 20:31 schrieb Kieren MacMillan:

Hi Michael,


Nice.

It's Harm's, if I recall correctly…


What is \etc ?

A rather brilliant addition by David K. (I believe?), which essentially says "now go back 
to whatever follows in the 'real' code stream". See 
.

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \partcombine and decrescendo spanner

2017-07-06 Thread Michael Käppler

Nice. What is \etc ?

terminateHairpin =
#(define-music-function (ctx-name mus) (string? ly:music?)
#{ << $mus \context Voice = $ctx-name <>\! >> #})

endI = \terminateHairpin "one" \etc
endII = \terminateHairpin "two" \etc

\markup \vspace #4
\markup \bold { "WORKAROUND:" }
\score {
 \new Staff \partcombine { b2.\> \endI r4\! } { des2.\> \endII r4\! }
}

Hope this helps,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \partcombine and decrescendo spanner

2017-07-06 Thread Michael Käppler

The bug report is about simultaneous hairpins.
But the following example also shows the same problem:

\score {
\new Staff \partcombine { b2.\> r4\! } { des2. r4 }
}

While

\score {
\new Staff \partcombine { b2.\> a4\! } { des2. r4 }
}

does compile without complaints. Seems it has something to do with 
ending a hairpin on a rest.


Regards,
Michael


Am 06.07.2017 um 20:07 schrieb Kieren MacMillan:


Hi Michael,


Why are the decrescendos unterminated in the following MWE

It's a known bug/issue: 

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \partcombine and decrescendo spanner

2017-07-06 Thread Michael Käppler

Thank you for pointing this out. Is there a known workaround?

Michael

Am 06.07.2017 um 20:07 schrieb Kieren MacMillan:

Hi Michael,


Why are the decrescendos unterminated in the following MWE

It's a known bug/issue: 

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\partcombine and decrescendo spanner

2017-07-06 Thread Michael Käppler

Hi all,

probably I do not see the wood for the trees here: Why are the 
decrescendos unterminated in the following MWE:


\version "2.19.59"

\score {
\new Staff \partcombine { b2.\> r4\! } { des2.\> r4\! }
}

Regards,

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler

Am 21.06.2017 um 23:24 schrieb msk...@ansuz.sooke.bc.ca:

On Wed, 21 Jun 2017, caag...@gmail.com wrote:

On 06/21/2017 11:10 PM, Johan Vromans wrote:

If you have a non-infinite recursive include it will continue.

I think that would require solving the Halting Problem first.

That's true if it has to determine whether the recursion is infinite, but
my understanding of the proposal was that Lilypond would continue with a
warning in any case, not trying to decide whether it's infinite, and let
the user deal with shutting it down if in fact it is infinite.


That would be a very nice way of dealing with the recursion, IMO.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler
What would be wrong about just outputting a warning "Trying to include 
already included file" or something like that and reject

the recursive \include statement?
I came across this when working with a include file collecting cue notes 
like that:


\include "foo1.ly"
\include "foo2.ly"
\include "foo3.ly"
\addquote "bla1" { \foo1_bla1 }
\addquote "bla2" { \foo2_bla2 }
(...)

I change my code to circumvent the recursive loop but I needed a moment 
to figure out why LilyPond was hanging.

A warning would be nice.
Honestly I did not try it, but I am quite sure that it would be easy to 
implement a IFDEF mechanism like in C preprocessing with a few lines of 
Scheme, however.


All the best,
Michael


Am 21.06.2017 um 22:03 schrieb msk...@ansuz.sooke.bc.ca:

On Wed, 21 Jun 2017, Michael Käppler wrote:

foo.ily:
\include "bar.ly"
bar.ly:
\include "foo.ily"
Am I right to consider this a bug?

I don't think so - at least not a bug in Lilypond.  It's just doing what
you told it to do, and most other language parsers that have an "include"
facility will similarly be unable to give a useful result when fed
infinitely recursive include files.  The usual advice to users is not to
write such input.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler

Hi all,

I searched the bug tracker for the following issue but did not find 
anything...


Consider two files:

foo.ily:

\version "2.19.59"
\include "bar.ly"

bar.ly:

\version "2.19.59"
\include "foo.ily"

{ c4 d e f }

If you try to compile bar.ly the parsing process continues forever, 
apparently because Lily includes the two files in a circular manner 
(maybe reaching a memory limit at some point - did not try that)


Am I right to consider this a bug?

Regards,

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Speedup with recent lilypond

2017-04-24 Thread Michael Käppler

Thanks!

Am 24.04.2017 um 09:39 schrieb Phil Holmes:

- Original Message - From: "Michael Käppler" <xmichae...@web.de>
To: "David Kastrup" <d...@gnu.org>
Cc: <lilypond-user@gnu.org>
Sent: Monday, April 24, 2017 8:24 AM
Subject: Re: Speedup with recent lilypond


I'm on Win7 x64. When has the font caching been fixed? I could not 
find the commit.




Probably 
https://github.com/gperciva/gub/commit/4092624f4fa85ae8c38fcb87646942f13583b26a


--
Phil Holmes




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Speedup with recent lilypond

2017-04-24 Thread Michael Käppler
I'm on Win7 x64. When has the font caching been fixed? I could not find 
the commit.



Am 24.04.2017 um 09:14 schrieb David Kastrup:

Michael Käppler <xmichae...@web.de> writes:


Hi all,

just for curiosity: I upgraded from 2.19.55 to 2.19.59 and noticed an
enormous speedup. That is really great

and I would like to know which change(s) are responsible for that.

You did not mention your operating system, but an "enormous speedup"
would likely be a fix of the defective Freetype font caching.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Speedup with recent lilypond

2017-04-24 Thread Michael Käppler

Hi all,

just for curiosity: I upgraded from 2.19.55 to 2.19.59 and noticed an 
enormous speedup. That is really great


and I would like to know which change(s) are responsible for that.

All the best,

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


2.19.59 mingw binary: virus false positive?

2017-04-23 Thread Michael Käppler

Hi all,

I just installed LilyPond 2.19.59 mingw binary on my machine and my 
antivirus scanner


Avira Free Antivirus

Version 15.0.25.172 21.03.2017
Searching engine 8.03.44.42 20.04.2017
Signature file 8.12.164.198 23.04.2017

complains about having found the "TR/Crypt.XPACK.Gen" virus in two 
bundled files:


/usr/bin/_hotshot.dll

/usr/bin/_multibytecodec.dll

Anybody experiencing the same issue?

Michael



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: grouping in 6/8

2017-04-23 Thread Michael Käppler

Hi Karol,
it depends on which rhythmical structure you want to express.
If you intend a base structure in 8ths where the 4th note is not 
stressed, I would prefer (2).
If you want to achieve a base structure in dotted 8ths, like a 12/16 
signature divided in four beats, I would write (1).


HTH,
Michael

Am 23.04.2017 um 21:52 schrieb Karol Majewski:

Hi, which grouping is better:

6/8: c16 c16 c16 c8.~ c4.

or

6/8: c16 c16 c6 c16~ c8~ c4.


Couldn't find the answer in "Behind Bars".

-Best
KM



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Partcombine: Ties break when followed by another one

2017-03-23 Thread Michael Käppler

Hmm, I don't get what you mean. Maybe my example was misleading.
I have two voices, split in two parts and try to get ties between both 
parts.


Part 1 | Part 2
Voice1: b'8 b'4 ~ | b'4. R1*3/8
Voice2: es'8 es'4 ~ | es'4. ~ es'

As Phil pointed out, the following works fine:
\partcombine
{ \time 3/8 b'8 b'4 ~ b'4. R1*3/8 }
{ \time 3/8 es'8 es'4 ~ es'4. ~ es' }

But this one also works:

\new Staff {
\partcombine
{ \time 3/8 b'8 b'4 ~ }
{ \time 3/8 es'8 es'4 ~ }
\partcombine
{ b'4. R1*3/8 }
{ es'4. R1*3/8 }
}

What I do not understand is why a tie >after< the es'4. (Voice2, second 
part) breaks the beam between both parts.



You are trying to tie a note to a rest. You can only tie to a note of the same 
pitch.

This works:

\version "2.19.0"
\score {
 \new Staff {
 \partcombine
 { \time 3/8 b'8 b'4 ~ }
 { \time 3/8 es'8 es'4 ~ }
 \partcombine
 % { b'4. R1*3/8 }
{ b'4.~ b'  }
 { es'4. ~ es' } % Does not show tie
 %  { es'4. R1*3/8 } % Does show tie
 }
}



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Partcombine: Ties break when followed by another one

2017-03-23 Thread Michael Käppler

Yes, but I meant something about that concatenating \partcombine expressions
may lead to unexpected results or sth. like that

Am 23.03.2017 um 13:02 schrieb Phil Holmes:

It does print an error message:

kappler.ly:6:36: warning: unterminated tie
{ \time 3/8 es'8 es'4
  ~ }

--
Phil Holmes


- Original Message - From: "Michael Käppler" <xmichae...@web.de>
To: "Phil Holmes" <m...@philholmes.net>; <lilypond-user@gnu.org>
Sent: Thursday, March 23, 2017 10:31 AM
Subject: Re: Partcombine: Ties break when followed by another one


Ok, but maybe it should at least print an error message... it is 
confusing because it works in many cases.


Michael

Am 23.03.2017 um 11:41 schrieb Phil Holmes:
- Original Message - From: "Michael Käppler" 
<xmichae...@web.de>

To: <lilypond-user@gnu.org>
Sent: Thursday, March 23, 2017 9:12 AM
Subject: Partcombine: Ties break when followed by another one



Hi all,

Lilypond's behaviour in the following example does not make sense 
to me.


\version "2.19.0"
\score {
\new Staff {
\partcombine
{ \time 3/8 b'8 b'4 ~ }
{ \time 3/8 es'8 es'4 ~ }
\partcombine
{ b'4. R1*3/8 }
% { es'4. ~ es' } % Does not show tie
{ es'4. R1*3/8 } % Does show tie
}
}

Is this a known or unknown bug or do I miss something?

Regards,

Michael


My observation would be that it may be a problem caused by the 
multiple uses of \partcombine.  Simply writing:


\partcombine
{ \time 3/8 b'8 b'4 ~ b'4. R1*3/8 }
{ \time 3/8 es'8 es'4 ~ es'4. ~ es' }

works fine.

--
Phil Holmes











___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Partcombine: Ties break when followed by another one

2017-03-23 Thread Michael Käppler
Ok, but maybe it should at least print an error message... it is 
confusing because it works in many cases.


Michael

Am 23.03.2017 um 11:41 schrieb Phil Holmes:

- Original Message - From: "Michael Käppler" <xmichae...@web.de>
To: <lilypond-user@gnu.org>
Sent: Thursday, March 23, 2017 9:12 AM
Subject: Partcombine: Ties break when followed by another one



Hi all,

Lilypond's behaviour in the following example does not make sense to me.

\version "2.19.0"
\score {
\new Staff {
\partcombine
{ \time 3/8 b'8 b'4 ~ }
{ \time 3/8 es'8 es'4 ~ }
\partcombine
{ b'4. R1*3/8 }
% { es'4. ~ es' } % Does not show tie
{ es'4. R1*3/8 } % Does show tie
}
}

Is this a known or unknown bug or do I miss something?

Regards,

Michael


My observation would be that it may be a problem caused by the 
multiple uses of \partcombine.  Simply writing:


\partcombine
{ \time 3/8 b'8 b'4 ~ b'4. R1*3/8 }
{ \time 3/8 es'8 es'4 ~ es'4. ~ es' }

works fine.

--
Phil Holmes





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Partcombine: Ties break when followed by another one

2017-03-23 Thread Michael Käppler

Hi all,

Lilypond's behaviour in the following example does not make sense to me.

\version "2.19.0"
\score {
\new Staff {
\partcombine
{ \time 3/8 b'8 b'4 ~ }
{ \time 3/8 es'8 es'4 ~ }
\partcombine
{ b'4. R1*3/8 }
% { es'4. ~ es' } % Does not show tie
{ es'4. R1*3/8 } % Does show tie
}
}

Is this a known or unknown bug or do I miss something?

Regards,

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Again vertical spacing FiguredBass / Staff / Lyrics

2011-04-28 Thread Michael Käppler

Hi Carl,

I doubt that it is intended behavior.  However, I do think your file
represents a misuse of the properties.

minimum-distance is intended to always be less than basic-distance.  In this
case, I think that minimum-distance is greater than basic-distance, which
probably messes up all of the rods-and-springs behavior.
Hmm, I can imagine this, but the problem occurs also if minimum-distance 
is smaller than basic-distance.
(Look at the snippet at the bottom) With increased minimum-distance, the 
FiguredBass is shifted more and more to the top.
However, it's unpractical that you have to know basic-distance if you 
just want to set a minimum-distance.

Maybe in this case a warning should be printed?

Regards,
Michael

% Begin LilyPond code

\version 2.13.58

notes = \repeat unfold 20 { a4 b c b }

text = \lyricmode {
  \repeat unfold 20 { bla bla bla bla }
}

numbers = \figuremode {
  \repeat unfold 20 { 3 54 4 6 _+ 7 }
}

\layout {
  \context {
\FiguredBass
\override VerticalAxisGroup #'staff-affinity = #DOWN
  }
  \context {
\Staff
\override VerticalAxisGroup #'default-staff-staff-spacing 
#'basic-distance = #20
\override VerticalAxisGroup #'default-staff-staff-spacing 
#'minimum-distance = #19

  }
}

\score {

\new Staff {
  \new Voice = one \relative c'' \notes
}
\new Lyrics \lyricsto one \text %% Comment this out
\new FiguredBass \numbers
\new Staff { \clef bass \relative c \notes }

}

% End LilyPond code

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Again vertical spacing FiguredBass / Staff / Lyrics

2011-04-27 Thread Michael Käppler
Thank you very much, Carl, for your advice! I have made an interesting 
observation, though:
If minimum-distance is set instead of basic-distance, the numbers are 
aligned at the top staff.

Is this somehow intended behaviour?

Regards,
Michael

% Begin lilypond code

\version 2.13.58

notes = \repeat unfold 20 { a4 b c b }

text = \lyricmode {
  \repeat unfold 20 { bla bla bla bla }
}

numbers = \figuremode {
  \repeat unfold 20 {3 544 6  _+  7  }
}

\layout {
  \context {
\FiguredBass
\override VerticalAxisGroup #'staff-affinity = #DOWN
  }
  \context {
\Staff
%\override VerticalAxisGroup #'default-staff-staff-spacing #'basic-distance 
= #20
\override VerticalAxisGroup #'default-staff-staff-spacing 
#'minimum-distance = #20
  }
}

\score {
  
\new Staff {
  \new Voice = one \relative c'' \notes
}
\new Lyrics \lyricsto one \text %% Comment this out
\new FiguredBass \numbers
\new Staff { \clef bass \relative c \notes }
  
}

% End lilypond code




Oops, my mistake.  I should have said default-staff-staff-spacing.

The reason why the Lyrics causes problems is because it comes between the
FiguredBass and the staff above, so it's used for calculating the spacing.

The real surprise to me is that the 'padding value works at all.  Non-staff
lines are supposed to be placed in *after* the staves are already placed.

HTH,

Carl




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Again vertical spacing FiguredBass / Staff / Lyrics

2011-04-26 Thread Michael Käppler

Hi Carl,
thanks, but increasing system-system-spacing will increase distance 
between all system groups.
What I want is increasing just the distance between the lowest staff 
line (resp. the Figured Bass line)
and the staff above. It works, but only if there is no Lyrics line 
between the two staffs. I'd like to understand, why...
Another question in general: Am I right that padding and 
minimum-distance adjust the same minimal distance between the object and 
the
next object, only with different reference points? (padding: bounding 
box, minimum-distance: refpoints of the objects)


Regards,
Michael


You most likely need to increase the system-system-spacing.  Most likely the
systems are spaced too close together, so the Lyrics and FiguredBass are
squeezed in.

You also need to make sure that you set the Lyrics staff-affinity to #CENTER

HTH,

Carl





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Again vertical spacing FiguredBass / Staff / Lyrics

2011-04-22 Thread Michael Käppler
 I'm not top-posting
Hi all,
I'd like to clarify my former question from a few days ago:
How can I increase the minimal distance between a FiguredBass line and the
staff above? (Example attached)
It works if there are no Lyrics attached to upper staff. Otherwise the padding 
goes away for a reason I don't understand, because surely I want to keep the 
padding despite of Lyrics between.

Regards,
Michael

\version 2.13.58

notes = \repeat unfold 20 { a4 b c b }

text = \lyricmode {
  \repeat unfold 20 { bla bla bla bla }
}

numbers = \figuremode {
  \repeat unfold 20 { 3 54 4 6 _+ 7 }
}

\layout {
  \context {
\FiguredBass
\override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = 
#20
\override VerticalAxisGroup #'staff-affinity = #DOWN
  }
}
  

\score {
  
\new Voice = one \relative c'' \notes
\new Lyrics \lyricsto one \text %% Comment this out
\new FiguredBass \numbers
\new Staff { \clef bass \relative c \notes }
  
}


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Spacing figured bass and lyrics

2011-04-15 Thread Michael Käppler
 I'm not top posting

Hi all,
I've encountered a problem when trying to modify the distance
between a FiguredBass line and a Staff which is placed above.
If there are Lyrics attached to the Voice placed in the upper staff, 
setting a padding to the FiguredBass line has no effect.
Maybe I don't unterstand the way this is supposed to work, but I'm
confused.

See the following example:

\version 2.13.58

notes = \repeat unfold 20 { a4 b c b }

text = \lyricmode {
  \repeat unfold 20 { bla bla bla bla }
}

numbers = \figuremode {
  \repeat unfold 20 { 3 54 4 6 _+ 7 }
}

\layout {
  \context {
\FiguredBass
\override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = 
#20
\override VerticalAxisGroup #'staff-affinity = #DOWN
  }
}  

\score {
  
\new Voice = one \relative c'' \notes
\new Lyrics \lyricsto one \text %% Comment this out
\new FiguredBass \numbers
\new Staff { \clef bass \relative c \notes }
  
}

Many thanks for any advice,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Tweak autobeaming

2010-08-11 Thread Michael Käppler
Hi all,
I wrote a piece in 2/2 time, which I want to be beamed like it was in 4/4. 
So I did baseMoment = #(ly:make-moment 1 4) but had an unexpected result - 
The beats 1 and 2 have their own beams, but 3 and 4 are beamed together. 
What am I missing?

Regards,
Michael 


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Rendering umlauts fails

2010-06-14 Thread Michael Käppler
Hi all,
after using Lilypond a long time on a Linux machine I now tried out 
the Win build. There I encounter a problem which I have never seen 
on Linux AFAIK. If I use Lyrics containing umlauts, sometimes Lily
only doesn't show them, sometimes aborts with plenty of messages like this:

Programmierfehler: invalid UTF-8 string
Fortsetzung, die Daumen drücken

It also reports:

Programmierfehler: Glyph hat keinen Namen, aber Zeichensatz unterstützt 
Glyphnamen.
Glyph U+ wird übersprungen, Datei C:/Program Files 
x86)/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma.otf

I've set enc=utf8 in my vimrc.

Regards,
Michael 


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Automatically checking regtests (was: Re: Minor releases?)

2009-08-17 Thread Michael Käppler

[CC to -devel]

(nobody checks the regression tests for each release, for example
-- and that's trivially done with a web browser!)
  
That reminds me of an idea I recently had: Wouldn't it be possible to 
automatically generate a sort of checksum for each regression-test 
output-file and compare it with the former releases? I know that every 
little change in the pdf appearance would lead to a warning then.
But I'm sure there is a way to do not just md5sum 
regression-test-foo.pdf but create a difference score by comparing 
the two pdfs.

Ideally, this would output to a list like:

foo1.pdf - 0
foo2.pdf - 13
foo3.pdf - 142
foo4.pdf - 0
(...)

Then the dev's can mark the foo3.pdf like Jerry R. Ehman's wow signal... 
;) I mean, this would give a priority for checking, when e.g. values  
100 are urgent to control.


Cheers,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatically checking regtests

2009-08-17 Thread Michael Käppler

Reinhold Kainhofer wrote:

Isn't this exactly what we already have (make test-baseline to create the

Argh, how embarrassing! Sorry for the noise.

Regards,
Michael



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Manual beaming after \override

2009-08-04 Thread Michael Käppler

Hi all,
can somebody explain, why the following doesn't work with manual 
beaming, but with autobeaming?


\version 2.13.4

\relative c' {
\time 2/4
d8 \override NoteHead #'style = #'cross d ~ d4 % This works fine
% \autoBeamOff
% d8 \override NoteHead #'style = #'cross [d] ~ d4
}

The second results in a: syntax error, unexpected '[' message.

Cheers,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Manual beaming after \override

2009-08-04 Thread Michael Käppler

Mats Bengtsson wrote:
The [ belongs to the note that starts the beam, whereas the \override 
command is inserted between notes, so the correct syntax is

d8[ \override NoteHead #'style = #'cross d] ~ d4


Many thanks!


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Speed-up compiling

2009-07-29 Thread Michael Käppler

Hi all,
I'm suffering from enormous compiling durations on large files. With 
large I mean a file with about 250 measures and seven staves per 
system. The last time I compiled the file completely (without using 
showLastLength) I did it overnight, since after one and a half hour 
Lilypond still was Preformatting graphical elements... (Don't know 
what's the correct term in the english version)
I know that's my laptop is way too old to do such complex task quickly - 
(Athlon XP 2600, 256MB Ram, OpenSUSE 11.1) but are there general 
suggestions which help to speed up the compiling process?


Regards,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Speed-up compiling

2009-07-29 Thread Michael Käppler

Hi Mark,

Maybe try using \pointAndClickOff ? I don't know if point-and-click
slows things down, but it certainly increases filesize.
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-program/Point-and-click
  

I've tested this, rendering only the last 100 measures:
When I ran Lily the first time on that file, it needed 171 s with 
Point-And-Click turned on. Afterwards I turned Point-And-Click off, 
where it finished after 88s. After that I did a second run with 
Point-And-Click turned on - now it finished after just 93s.
I don't think there are significant differences concerning 
Point-And-Click. But obviously every first run that Lily does on a file, 
lasts longer.
I don't know what's the reason for it. A further observation I made 
(which I posted some time ago on -devel) was that when running LilyPond 
with many files (lilypond foo1.ly foo2.ly foo3.ly foo4.ly) it needs 
much(!) more time than running it that way: lilypond foo1.ly  lilypond 
foo2.ly  lilypond foo3.ly  lilypond foo4.ly.
Also, you can temporarily comment out any instances of 
keep-inside-line since it's a known time-hog.

http://lilypond.org/doc/v2.12/Documentation/user/lilypond-learning/Avoiding-tweaks-with-slower-processing
  

I don't use any of this extra-checks in my score.


Regards,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond crash

2009-04-11 Thread Michael Käppler

Hi Nick,
I'm able to reproduce this on OpenSuse 11.0 with LilyPond 2.13, too.

I don't know if there's a more simple way, but try this instead:

i = #(define-music-function (parser location) ()
(apply make-music
 (append
  (list
   'StrokeFingerEvent
   'origin location)
  (list 'digit 2

Cheers,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Automatically adding lyric extenders

2009-04-05 Thread Michael Käppler

Hi all,
does anybody know a way to get LilyPond to automatically draw extender 
lines after the last syllable of each word, if the melisma reaches a 
specified minimal length? Such a behaviour would save large time in 
entering some kinds of music.


Cheers,
Michael






___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \score inside define-markup-command

2009-02-25 Thread Michael Käppler

Hi Nicolas,
many thanks for that hint!
Using make-score was the point. But also very nice you showed me how to 
deal with layout settings in such a scheme score.


Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \score inside define-markup-command

2009-02-23 Thread Michael Käppler


Hi,

I don't know if it will work, but perhaps you can try to type
\displayMusic { \clef #testclef  a4 h c } to get the scheme 
version of your music,

and to copy/paste the output you got after the #:score markup ...
good idea! But it still doesn't work. Let's look at the following 
minimal example:


#(define-markup-command (testmusic layout props a b c) (number? number? 
number?)

 (interpret-markup layout props (markup #:score
  (make-music
 'SequentialMusic
 'elements
 (list (make-music
 'EventChord
 'elements
 (list (make-music
 'NoteEvent
 'duration
 (ly:make-duration 2 0 1 1)
 'pitch
 (ly:make-pitch a b c))
)))



c2^\markup \testmusic #-1 #0 #0


It fails with a bunch of error messages for which my knowledge of scheme 
isn't enough to understand.


/usr/local/lilypond/usr/share/lilypond/current/scm/markup.scm:208:10: In 
procedure string-append in expression (string-append make-name :  ...):
/usr/local/lilypond/usr/share/lilypond/current/scm/markup.scm:208:10: 
Wrong type (expecting string): (1 unknown #Prob: Music C++: 
Music((elements #Prob: Music C++: Music((elements #Prob: Music C++: 
Music((pitch . #Pitch c ) (duration . #Duration 4 
))((display-methods #procedure #f (note parser)) (name . NoteEvent) 
(types general-music event note-event rhythmic-event melodic-event)) 
))((display-methods #procedure #f (expr parser) #procedure #f (expr 
parser) #procedure #f (chord parser)) (name . EventChord) 
(iterator-ctor . #primitive-procedure 
ly:event-chord-iterator::constructor) (length-callback . 
#primitive-procedure ly:music-sequence::maximum-length-callback) 
(to-relative-callback . #primitive-procedure 
ly:music-sequence::event-chord-relative-callback) (types general-music 
event-chord simultaneous-music)) 
))((display-methods #procedure #f (seq parser)) (name . 
SequentialMusic) (length-callback . #primitive-procedure 
ly:music-sequence::cumulative-length-callback) (start-callback . 
#primitive-procedure ly:music-sequence::first-start-callback) 
(elements-callback . #procedure #f (m)) (iterator-ctor . 
#primitive-procedure ly:sequential-iterator::constructor) (types 
general-music sequential-music)) 

)

Can anyone help?

Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


\score inside define-markup-command

2009-02-22 Thread Michael Käppler

Hi all,
is it possible to use the \score markup function in a new defined markup 
function construct?


For example,

#(define-markup-command (test layout props testclef) (string?)
  (interpret-markup layout props (markup #:score (  \clef #testclef 
a4 h c 



This is invalid code because it mixes LilyPond and Scheme syntax. How 
can I achieve something similar to what's expressed in this dummy code 
piece?


Regards,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Text markup stacking

2008-11-04 Thread Michael Käppler

Hi guys,
following example:

\version 2.11.63


\relative c'' {
 a4^blablablablablabla g f e
 d1^blablabla
}


How can I decide whether in case of a collision markup two is stacked on 
top of markup one or the other way round?


Cheers,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical spacing on big systems

2008-09-15 Thread Michael Käppler

Hi Nicolas,

I've collected some raw data about estimated extents and real ones one
various scores. I still have to study them, maybe a more suitable amount
of reserved space will emerge.
that would be nice... Maybe it's also possible to cook a patch that 
makes lilypond collect that information on his own after rendering each 
score, storing in it a file. So many users could take part in finding a 
more suitable amount.
But nevertheless: Would it be - theoretically, not considering the 
amount of time to implement this - possible to get completely rid of 
this estimate algorithm to base page spacing only on real Y-extents?
However, I'm not sure at this moment that the issue I'm experiencing is 
really about this security spacing amount.
I wonder since my patch (Maybe any other can have a look at it) doesn't 
change the problem, though there is enough space.


Cheers,
Michael

[CC to lilypond-devel]
\version 2.11.58

#(set-global-staff-size 16)

\paper {
 annotate-spacing = ##t
 ragged-last-bottom = ##f
 ragged-bottom = ##f
 paper-height = 279\mm
 paper-width = 209\mm
 top-margin = 10\mm
 bottom-margin = 10\mm
 left-margin = 10\mm
 foot-separation = 7\mm
 between-system-padding = #0.1
 between-system-space = #0.1
 #(define line-width (- paper-width (* 20 mm)))
 oddHeaderMarkup = ##f
 evenHeaderMarkup = ##f
 oddFooterMarkup = \markup \fontsize #1 \fill-line {   \on-the-fly 
#print-page-number-check-first \fromproperty #'page:page-number-string }
 evenFooterMarkup = \markup \fontsize #1 \fill-line { \on-the-fly 
#print-page-number-check-first \fromproperty #'page:page-number-string   }
}

\header {
 tagline = ##f
}

csI = \relative c'' {
 \time 4/2
 \key c \major
 b1. d2
 d1 d,2. d4
 e1 r
 R1*4/2*1
 g1. g2
 g g a b
 a g a b
 a g fis g
 a b a4 \melisma g a b
 c2. a2 gis4 \melismaEnd a2
}

cantusI = {
 \clef treble
 
  \csI
 
}

cantusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re qui cae -- lo lu -- cet qui cae -- lo lu -- cet qui cae -- lo 
lu -- cet
}

csII = \relative c'' {
 \key c \major
 R1*4/2*5
 r1 %
 r2 d1 b2
 r d2. d8 d d4 d
 d d d1 b2
 r d c f
 e a,8 [b c] \melisma a 
}

cantusII = {
 \clef treble
 
  \csII
 
}

cantusIIlyrics = \lyricmode {
 Hy -- men, o Hy -- me -- nae -- e hy -- men ad -- es
 o Hy -- me -- nae -- e 
}

asI = \relative c' {
 \key c \major
 d1. b2
 a1 b2. b4
 c\breve
 R1*4/2*1
 g1 g
 g2. g'4 fis2 g
 d \melisma g, d' \melismaEnd b
 R1*4/2*1
 r2 g' e f
 g f r1
}

altusI = {
 \clef treble
 
  \asI
 
}

altusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

asII = \relative c'' {
 \key c \major
 g1. g2
 fis1 g2. g4
 g1 r2 c,1
 d2 d1
 e1. e2
 d\breve
 r2 g fis g
 d g, a b
 a g r1
 R1*4/2*1
}

altusII = {
 \clef treble
 
  \asII
 
}

altusIIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re Hes -- pe -- re
 qui cae-- lo lu -- cet cae -- lo lu -- cet
}

trI = \relative c' {
 \key c \major
 g1. g2
 d\breve % könnte auch c sein
 r2 g2. g4 a2
 g b a2. \melisma b
 c2 \melismaEnd c1 c2
 b r2 g
 a b a g
 a b a g
 d'1 r
 r r2 e
}

tenorI = {
 \clef treble_8
 
  \trI
 
}

tenorIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

tenorII = {
 \clef treble_8
 
  \transpose c' c \csII
 
}

bsI = \relative c { 
 \key c \major
 R1*4/2*1
 r1 g2. g4
 c2 c2. c4 f,2
 c' g d'1
 c2. \melisma d4 \melismaEnd e2. \melisma c4 \melismaEnd
 d1 r
 r r2 g
 fis g d g,
 R1*4/2*2
}

bassusI = {
 \clef bass
 
  \bsI
 
}

bassusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

bsII = \relative c' {
 \key c \major
 R1*4/2*1
 r1 g2. g4 
 g2 e2. e4 f2
 e8 \melisma d \melismaEnd e \melisma c \melismaEnd g'2. \melisma f8 [e] f4 g 
\melismaEnd
 e1 c
 g r2 g'
 fis g d g,
 r1 r2 g'
 fis g a d,
 R1*4/2*1
}

bassusII = {
 \clef bass
 
  \bsII
 
}

bassusIIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet 
}

\score {
 
  \new Voice = cantusII \cantusII
  \new Lyrics \lyricsto cantusII \cantusIIlyrics
  \new Voice = cantusI \cantusI 
  \new Lyrics \lyricsto cantusI \cantusIlyrics
  \new Voice = altusII \altusII
  \new Lyrics \lyricsto altusII \altusIIlyrics
  \new Voice = altusI \altusI
  \new Lyrics \lyricsto altusI \altusIlyrics
  \new Voice = tenorII \tenorII
  \new Lyrics \lyricsto tenorII \cantusIIlyrics
  \new Voice = tenorI \tenorI
  \new Lyrics \lyricsto tenorI \tenorIlyrics
  \new Voice = bassusII \bassusII
  \new Lyrics \lyricsto bassusII \bassusIIlyrics
  \new Voice = bassusI \bassusI 
  \new Lyrics \lyricsto bassusI \bassusIlyrics
 
 \layout {
  \context {
   \Score
   autoBeaming = ##f
  }
  \context {
   \Lyrics
   \override LyricText #'font-size = #0
   \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.75 . 1.0)
  }
  \context {
   

Re: Vertical spacing on big systems

2008-09-14 Thread Michael Käppler

Hi Patrick,
sure, this would be a workaround, but one can hardly call it a solution...
Actually. it doesn't change the fact that there is enough space to fit 
both systems on one page, even with the larger page-top-space.

But for some unknown reason Lilypond decides differently.
However, as Reinhold said in his former postings: I would consider this 
a serious bug, since scores with large systems (one or two systems a 
page) aren't spaced out properly.
Unfortunately I'm not familiar with Lily's spacing algorithms. Maybe a 
developer can help?





___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical spacing on big systems

2008-09-13 Thread Michael Käppler

Hi Reinhold,
You might try to comment out (or at least reduce) these 10% of reserved space 
and see if you run into any staff collisions (which I don't think should 
happen, but then I haven't dug deep enought for this staff!).
  
I removed the additional security space completely for testing, but 
nothing happens.

What am I missing?
layout-page-layout.scm is attached.

Cheers,
Michael
 layout-page-layout.scm -- page breaking and page layout

  source file of the GNU LilyPond music typesetter

 (c) 2004--2007 Jan Nieuwenhuizen [EMAIL PROTECTED]
	  Han-Wen Nienhuys [EMAIL PROTECTED]

(define-module (scm layout-page-layout)
  #:use-module (srfi srfi-1)
  #:use-module (oop goops describe)
  #:use-module (oop goops)
  #:use-module (scm paper-system)
  #:use-module (scm page)
  #:use-module (scm layout-page-dump)
  #:use-module (lily)
  #:export (post-process-pages optimal-page-breaks make-page-from-systems
	page-breaking-wrapper
	stretchable-line? ; delete me
	;; utilities for writing custom page breaking functions
line-height line-next-space line-next-padding
	line-minimum-distance line-ideal-distance
	first-line-position
	line-ideal-relative-position line-minimum-relative-position
	page-maximum-space-to-fill page-maximum-space-left space-systems))

; this is for 2-pass spacing. Delete me.
(define (stretchable-line? line)
  Say whether a system can be stretched.
  (not (or (ly:prob-property? line 'is-title)
	   (let ((system-extent (paper-system-staff-extents line)))
(= (interval-start system-extent)
   (interval-end   system-extent))

(define (stretch-and-draw-page paper-book systems page-number ragged last)
  (define (max-stretch sys)
(if (ly:grob? sys)
	(ly:grob-property sys 'max-stretch)
	0.0))

  (define (stretchable? sys)
(and (ly:grob? sys)
	 ( (max-stretch sys) 0.0)))

  (define (height-estimate sys)
(interval-length
 (if (ly:grob? sys)
	 (ly:grob-property sys 'pure-Y-extent)
	 (paper-system-extent sys Y

  (define (print-system sys)
(if (ly:grob? sys)
	(ly:system-print sys)
	sys))

  (define (set-line-stretch! sorted-lines rest-height space-left)
(if (not (null? sorted-lines))
	(let* ((line (first sorted-lines))
	   (height (height-estimate line))
	   (stretch (min (max-stretch line)
			 (if (positive? rest-height)
 (/ (* height space-left) rest-height)
   0.0
	  (if (stretchable? line)
	  (ly:system-stretch line stretch))
	  (set-line-stretch! (cdr sorted-lines)
			 (if (stretchable? line)
 (- rest-height height)
 rest-height)
			 (- space-left stretch)

  (define (total-padding systems)
(let ((layout (ly:paper-book-paper paper-book)))
  (if (or (null? systems)
	  (null? (cdr systems)))
	  0.0
	  (+ (line-next-padding (car systems) (cadr systems) layout)
	 (total-padding (cdr systems))

  (let* ((page (make-page paper-book
			  'page-number page-number
			  'is-last last))
	 (paper (ly:paper-book-paper paper-book))
	 (height (page-printable-height page))
	 ; there is a certain amount of impreciseness going on here:
	 ; the system heights are estimated, we aren't using skyline distances
	 ; yet, etc. If we overstretch because of underestimation, the result
	 ; is very bad. So we stick in some extra space, just to be sure.

	 ; (buffer (/ height 10.0))
	 (total-system-height (+ (apply + (map height-estimate systems))
 (total-padding systems)))
	 (height-left (- height total-system-height)))
	 ; (height-left (- height total-system-height buffer)))

(if (and
	 (not ragged)
	 ( height-left 0))
	(set-line-stretch! (sort systems
 (lambda (s1 s2)
   ( (height-estimate s1)
  (height-estimate s2
			   (apply + (map height-estimate
	 (filter stretchable? systems)))
			   height-left))

(let ((lines (map print-system systems)))
  (page-set-property! page 'lines lines)
  (page-set-property!
   page 'configuration 
   (if (null? lines)
   (list)
   (let* ((paper (ly:paper-book-paper paper-book))
  (max-space-to-fill (page-maximum-space-to-fill page lines paper))
  (space-to-fill (if (ly:output-def-lookup
  paper 'page-limit-inter-system-space #f)
 (min max-space-to-fill
  (* (ly:output-def-lookup
  paper 'page-limit-inter-system-space-factor 1.4)
 (- max-space-to-fill
(or (page-ideal-space-left page) 0
 max-space-to-fill))
  (spacing (space-systems space-to-fill lines ragged paper #f)))
 (if (and ( (length lines) 1)
  (or (not (car spacing)) (inf? (car spacing
 (begin
   

Vertical spacing on big systems

2008-09-12 Thread Michael Käppler

Hi all,
I'm having some trouble to get LilyPond to put two systems on a page 
without forcing that in the following example. (It's pretty long, sorry 
for that)
I don't really understand why Lily puts each system on one page though 
there is really enough free space on the first page.

Any hints?

Cheers,
Michael
\version 2.11.58

#(set-global-staff-size 16)

\paper {
 annotate-spacing = ##t
 ragged-last-bottom = ##f
 ragged-bottom = ##f
 paper-height = 279\mm
 paper-width = 209\mm
 top-margin = 10\mm
 bottom-margin = 10\mm
 left-margin = 10\mm
 foot-separation = 7\mm
 between-system-padding = #0.1
 between-system-space = #0.1
 #(define line-width (- paper-width (* 20 mm)))
 oddHeaderMarkup = ##f
 evenHeaderMarkup = ##f
 oddFooterMarkup = \markup \fontsize #1 \fill-line {   \on-the-fly 
#print-page-number-check-first \fromproperty #'page:page-number-string }
 evenFooterMarkup = \markup \fontsize #1 \fill-line { \on-the-fly 
#print-page-number-check-first \fromproperty #'page:page-number-string   }
}

\header {
 tagline = ##f
}

csI = \relative c'' {
 \time 4/2
 \key c \major
 b1. d2
 d1 d,2. d4
 e1 r
 R1*4/2*1
 g1. g2
 g g a b
 a g a b
 a g fis g
 a b a4 \melisma g a b
 c2. a2 gis4 \melismaEnd a2
}

cantusI = {
 \clef treble
 
  \csI
 
}

cantusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re qui cae -- lo lu -- cet qui cae -- lo lu -- cet qui cae -- lo 
lu -- cet
}

csII = \relative c'' {
 \key c \major
 R1*4/2*5
 r1 %
 r2 d1 b2
 r d2. d8 d d4 d
 d d d1 b2
 r d c f
 e a,8 [b c] \melisma a 
}

cantusII = {
 \clef treble
 
  \csII
 
}

cantusIIlyrics = \lyricmode {
 Hy -- men, o Hy -- me -- nae -- e hy -- men ad -- es
 o Hy -- me -- nae -- e 
}

asI = \relative c' {
 \key c \major
 d1. b2
 a1 b2. b4
 c\breve
 R1*4/2*1
 g1 g
 g2. g'4 fis2 g
 d \melisma g, d' \melismaEnd b
 R1*4/2*1
 r2 g' e f
 g f r1
}

altusI = {
 \clef treble
 
  \asI
 
}

altusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

asII = \relative c'' {
 \key c \major
 g1. g2
 fis1 g2. g4
 g1 r2 c,1
 d2 d1
 e1. e2
 d\breve
 r2 g fis g
 d g, a b
 a g r1
 R1*4/2*1
}

altusII = {
 \clef treble
 
  \asII
 
}

altusIIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re
 Hes -- pe -- re Hes -- pe -- re
 qui cae-- lo lu -- cet cae -- lo lu -- cet
}

trI = \relative c' {
 \key c \major
 g1. g2
 d\breve % könnte auch c sein
 r2 g2. g4 a2
 g b a2. \melisma b
 c2 \melismaEnd c1 c2
 b r2 g
 a b a g
 a b a g
 d'1 r
 r r2 e
}

tenorI = {
 \clef treble_8
 
  \trI
 
}

tenorIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

tenorII = {
 \clef treble_8
 
  \transpose c' c \csII
 
}

bsI = \relative c { 
 \key c \major
 R1*4/2*1
 r1 g2. g4
 c2 c2. c4 f,2
 c' g d'1
 c2. \melisma d4 \melismaEnd e2. \melisma c4 \melismaEnd
 d1 r
 r r2 g
 fis g d g,
 R1*4/2*2
}

bassusI = {
 \clef bass
 
  \bsI
 
}

bassusIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet
}

bsII = \relative c' {
 \key c \major
 R1*4/2*1
 r1 g2. g4 
 g2 e2. e4 f2
 e8 \melisma d \melismaEnd e \melisma c \melismaEnd g'2. \melisma f8 [e] f4 g 
\melismaEnd
 e1 c
 g r2 g'
 fis g d g,
 r1 r2 g'
 fis g a d,
 R1*4/2*1
}

bassusII = {
 \clef bass
 
  \bsII
 
}

bassusIIlyrics = \lyricmode {
 Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re Hes -- pe -- re
 qui cae -- lo lu -- cet qui cae -- lo lu -- cet 
}

\score {
 
  \new Voice = cantusII \cantusII
  \new Lyrics \lyricsto cantusII \cantusIIlyrics
  \new Voice = cantusI \cantusI 
  \new Lyrics \lyricsto cantusI \cantusIlyrics
  \new Voice = altusII \altusII
  \new Lyrics \lyricsto altusII \altusIIlyrics
  \new Voice = altusI \altusI
  \new Lyrics \lyricsto altusI \altusIlyrics
  \new Voice = tenorII \tenorII
  \new Lyrics \lyricsto tenorII \cantusIIlyrics
  \new Voice = tenorI \tenorI
  \new Lyrics \lyricsto tenorI \tenorIlyrics
  \new Voice = bassusII \bassusII
  \new Lyrics \lyricsto bassusII \bassusIIlyrics
  \new Voice = bassusI \bassusI 
  \new Lyrics \lyricsto bassusI \bassusIlyrics
 
 \layout {
  \context {
   \Score
   autoBeaming = ##f
  }
  \context {
   \Lyrics
   \override LyricText #'font-size = #0
   \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.75 . 1.0)
  }
  \context {
   \Staff
   \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
  }
 }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Many thanks!

2008-08-30 Thread Michael Käppler


For my diploma thesis (I study church music) I made a edition of a 
church cantata by Georg Philipp Telemann, engraved with Lily. Currently 
I haven't access to public webspace, so I don't know how I can show it 
to you.


Just to let you know - the cantata is now online at the Werner Icking 
Music Archive: 
http://icking-music-archive.org/ByComposer/Telemann.php#TVWV1:1103


Cheers,
Michael


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   >