Re: Disable all padding and collision around markup

2024-05-19 Thread William Rehwinkel via LilyPond user discussion

This is perfect, thanks so much for your responses everybody.

-William

On 5/19/24 10:56, Kieren MacMillan wrote:

Hi Knute,


There are ways to "disable the padding" (a.k.a. have the spacing engine
ignore the TextScript). However, it might be just as easy — or maybe
even easier? — to simply tweak the X-offset and Y-offset rather than
using extra-offset:

The extra-offset happens late in the rendering process, so the other grobs 
can't adjust to its movement like they do with X- and Y-offset.


Exactly!  :)
— Kieren
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Disable all padding and collision around markup

2024-05-18 Thread William Rehwinkel via LilyPond user discussion

Dear list,

In the following example, I use a section label and a TextScript on a 
note. I offset the markup text so that it appears inside the staff, but 
it still makes the section text higher up. I would like to know if it is 
possible to disable this padding around the TextScript, so that the 
section label appears directly over the staff without the extra space, 
the same way as it does when there is no text script.


Thanks,
-William

% --
\version "2.25.7"

% Without moving text
\score {
  \relative c' {
\sectionLabel "Some section label text here"
\clef alto c2^\markup\whiteout\bold "Text"
  }
}

% Example with moving text
\score {
  \relative c' {
\once \override NoteHead.extra-spacing-width = #'( -6 . 0 )
\once \override TextScript.extra-offset = #'(-6 . -3)
\once \override TextScript.outside-staff-priority = ##f
\sectionLabel "Some section label text here"
\clef alto c2^\markup\whiteout\bold "Text"
  }
}
% How the section label would be positioned without the text markup
\score {
  \relative c' {
\sectionLabel "Some section label text here"
\clef alto c2
  }
}


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: General question: scores and parts

2024-05-13 Thread fremoin via LilyPond user discussion



Hello,

%%%
\version "2.25.15"

structure = { \tempo 4=42 }
high = {e''1}
low = {a'1}

\score {
   \header { piece = "Score" }
   <<
  \new Devnull \structure
  \new StaffGroup <<
 \new Staff \high
 \new Staff \low
  >>
   >>
}

\score {
   \header { piece = "Part High" }
   <<
  \new Devnull \structure
  \new StaffGroup <<
 \new Staff \high
  >>
   >>
}

\score {
   \header { piece = "Part Low" }
   <<
  \new Devnull \structure
  \new StaffGroup <<
 \new Staff \low
  >>
   >>
}
%%%

hth,
Frédéric





Le 13/05/2024 à 09:29, Raphael Mankin a écrit :
When one writes a score various annotations, e.g. tempo changes, are 
attached only to the top staff. When one generates separate parts one 
want those annotations on every part.


If I attach the annotations to every part the parts are correct, but I 
get warnings in the full score but the appearance is correct.


Is there a generally accepted way of coding this?








Re: Can I output PNG and midi from the same file?

2024-05-12 Thread William Rehwinkel via LilyPond user discussion

Dear Peter,

Assuming you wrote something like

% -
\version "2.25.7"

\score {
  c'4
  \midi {}
}
% -

and then ran lilypond --PNG midi.ly, then there would be no PNG output. 
This is because if you only include the \midi block, then lilypond 
produces no visual output at all. But if you don't include either 
\layout or \midi then lilypond defaults to visual output only.


If you add \layout {} next to \midi {} then it should produce both 
visual and midi output.


Thanks,
-William

On 5/12/24 23:21, Peter Baughman wrote:

Greetings,

I have a few .ly files that work great and produce lovely pictures when 
I build then with a command like:


|lilypond --png my_song.ly|​

I started to play around with midi output and was a little suprised to 
find that I needed to add a \midi code block to my file (instead of some 
other command-line flag when building) but this was not a big deal - 
After 20 or 30 minutes I figured out how to do it and got some lovely 
sound output.


I was surprised, though to discover that when I built my songs they were 
no longer producing png output.


Is there a way to get both PNG and midi output from the same .ly file, 
or do I need to invent some preprocessor step that adds a |\midi|​ block 
to a file or perhaps removes one from a file to get png output?


Thank you,
Pete Baughman


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.25.16

2024-05-12 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.16. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


Re: Unison notes, one stem

2024-05-06 Thread William Rehwinkel via LilyPond user discussion

Dear Dirck,

There is a very easy way! You can simply do

\version "2.25.7"

\relative c' 4

-William

On 5/6/24 22:44, Dirck Nagy wrote:

Hi all

Does Lilypond have an easy way to display unisons on one stem?  (it is 
fairly common in guitar music; same note played on 2 strings 
simultaneously)  (see image at bottom of email)


I have several instances where it would not be appropriate to make these 
unisons into separately-stemmed voices.


The only way i can think to do this is to use a separate voice, then 
hide stems and tweak positions...but this seems like a lot of work!


thanks!

dirck



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: subscript in lyrics

2024-04-26 Thread William Rehwinkel via LilyPond user discussion

Dear David,

You have to make the whole title a markup, in other words

title = \markup { 539. Threshing Floor of Aruna. 1100 \smallCaps BC }

-William

On 4/26/24 18:49, David Olson wrote:

Thanks for drawing my attention to \markup

Does \markup also work in the header?

If I'm giving a historical date in the title and wish "BCE" to be smallCaps

\header {
  title = "539. Threshing Floor of Aruna. 1100  \markup { \smallCaps { BCE } }."
}

Its seems that the \markup command is not being compiled.
The PDF only prints the literal text of the command itself, including the curly 
brackets.

Thanks again for your earlier help; it works beautifully.

David Olson
Los Angeles



- Original Message -
From: "mskala" 
To: "dadadharma @dslextreme.com" 
Cc: "lilypond-user" 
Sent: Saturday, April 20, 2024 5:59:03 PM
Subject: Re: subscript in lyrics

On Sat, 20 Apr 2024, David Olson wrote:


I'm a lyric poet writing songs about science.

"CO2" is three syllables and often works better than "carbon dioxide".

It's acceptable even if "2" doesn't appear as a subscript (one sees this
usage frequently), but subscript would be cool.

A superscript option would be cool too.


Easy enough to do using \markup and \sub, as in:

<<
   \new Voice = melody { c'2 c'2 | c'4 bes4 f'2 | }
   \new Lyrics \lyricsto melody { \lyricmode {
 "ooh!" "ooh!" C O \markup { \sub { "2" } "!" }
   } }




There are a number of variations possible:  \super for superscript,
\normal-size-sub for subscript without making the font smaller (which
might be easier to read even if it's not standard chemistry usage), and so
on.  In general, you can just break into \markup and use any of the usual
markup commands.  See "Formatting text" in the Notation manual:
https://lilypond.org/doc/v2.24/Documentation/notation/formatting-text



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Highlighting lyric words

2024-04-24 Thread William Rehwinkel via LilyPond user discussion
I don't know what you mean by highlighting. But you can override 
properties of text in lyrics like this:


-William

% --
\version "2.25.7"

\relative c' {
  c4 c
} \addlyrics {
  Hello \once\override LyricText.color = #red world
}


On 4/23/24 23:18, Walt North wrote:
I have found how to highlight notes in the music.  Similarly is there 
anyway to highlight either individual lyric words or perhaps one stanza?





--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Lyrics and Barchecks

2024-04-23 Thread William Rehwinkel via LilyPond user discussion

Dear Steve,

I think the reason for this is hinted at by the cryptic "5/8" in the 
barcheck failure message. The "mine" at the end of the first measure 
extends all the way until the next note ("I"), which is not at the 
beginning of a bar, causing the barcheck to fail. If you try the 
following example which is identical except for removing "\skip |" which 
doesn't do anything and changing the notes of the third measure, the 
barcheck warning goes away.


I think the only way to deal with this is to put barline checks in 
lyrics only when the lyric is on the first beat of the measure.


Thanks,
-William

%
\version "2.25.6"
\language "english"

<<
\new Staff { \relative c' {
  f8 4 f8 f4 8 f8~ |
  4 r4 r2 |
  4 4
  %r2 r8 f8 4 |
  }
}
  \addlyrics { \lyricmode {
This Lit -- tle star -- O -- mine __ |
I said |
}
  }
>>


On 4/23/24 20:52, Steve Carlock wrote:

I'm confused.  Given the following:

%
\version "2.24.3"
\language "english"

<<
\new Staff { \relative c' {
   f8 4 f8 f4 8 f8~ |
   4 r4 r2 |
   r2 r8 f8 4 |
   }
}
   \addlyrics { \lyricmode {
     This Lit -- tle star -- O -- mine __ |
     \skip |
     I said |
     }
   }
 >>
%

I get a barcheck warning on the first measure of lyrics.  I can resolve 
it by adding a \skip to the end of the lyrics for the first measure, by 
removing the bar at the end of the first measure of lyrics, or by 
removing the third measure completely (both music and lyric).


I have 6 notes in the first measure and 6 syllables in the lyrics so I 
don't understand why I'm getting a barcheck warning, especially because 
if you take out the third measure of music you don't get the warning.


(In all cases the layout is exactly what I'm expecting/wanting).

Please help me see the error of my ways.
Thanks!
  -steve

Version Info:
Lilypond: 2.24.3
Frescobaldi: 3.2
Extension API: 0.9.0
Python: 3.10.12
python-ly: 0.9.6
Qt: 5.15.3
PyQt: 5.15.6
sip: 6.5.1
qpageview: 0.6.2
poppler: 22.2.0
python-poppler-qt: 0.75.0
OS: Linux-5.15.0-102-generic-x86_64-with-glibc2.35


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Special notation question

2024-04-21 Thread William Rehwinkel via LilyPond user discussion

Dear Xavier,

I think this is called "void notation". I write it in the following way 
(including an example of how to write whole notes), but it is very 
time-consuming, and perhaps someone else has an easier way to 
automatically write music like this.


Thanks,
-William

% 
\version "2.25.7"

\relative b'' {
  \time 3/2
  \scaleDurations 2/1 {
  \override NoteHead.duration-log = #1
  b4 a4. g8 | \once\revert NoteHead.duration-log f1*1/2 e4 |

}}
% 

On 4/21/24 11:13, Xavier Mayeur wrote:

Hello,

In a \time 3/2 score, how can I write the following snippet in Lilypond?

I wonder how to create the 'g' note with that special appearance and 
with the right duration...


--
Cordialement,

Xavier MAYEUR
Bruxelles



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.25.15

2024-04-20 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.15. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


Re: Help with Mac

2024-04-15 Thread Maurits Lamers via LilyPond user discussion

Hi Alejandro,

The DMG was a way to quickly install Lilypond, but it came with a few 
downsides.


The biggest one was that Lilypond was bundled as part of the LilyPad 
editor app. This was what was started when you would doubleclick 
Lilypond.app. The LilyPad editor was a very barebones editor, and as 
with every piece of software it needed maintenance. That maintenance 
became problematic and increasingly pointless when comparing the feature 
set of that editor with something like Frescobaldi.
Additionally, in later versions of macOS, Apple started requiring signed 
applications, for which you need a (paid) Apple Dev account.


Therefore, the decision was made to offer lilypond as a download in .zip 
format (generic package), instead of a .dmg with a .app in it. Sadly it 
is not as simple as copying over the contents of a .dmg, but the 
increased strictness by Apple around signed applications is a major cause.


To install lilypond on a modern mac, you can follow these steps:

1. Download the generic package for macOS (lilypond-2.24.3 at the
   moment of writing) from https://lilypond.org/download.html
2. doubleclick on the downloaded zip file, to have the Archive
   Utility.app unzip it.
3. you will find a folder called "lilypond-2.24.3"
4. move this folder to the Applications / Apps folder
5. Check in System Preferences under Privacy and Security that your App
   security setting is set to "App store and identified developers"
6. open the lilypond-2.24.3 folder in the Applications folder, and open
   the bin folder inside of that
7. right click on the file called lilypond, and choose open
8. macOS will prompt you with a warning that it cannot verify the
   identify of the developer of 'lilypond' and whether you would like
   to open it or not.
9. Choose open.
10. Open the libexec folder and repeat step 7 to 9 with the files
   python3.10, gs and convert-ly.
11. Depending on which executables you need to use for your use case in
   addition to the ones above, you might have to repeat step 7-9 for
   more executables in the bin and/or libexec folder.
12. Assuming you use Frescobaldi as editor, go to the settings in
   Frescobaldi and add this lilypond version to the list of lilypond
   versions.

Following these steps should make things work as expected (without 
requiring any Terminal knowledge).


cheers

Maurits

Op 15-04-2024 om 22:22 schreef Alejandro Castera:

Good afternoon, community.

I've been using Lilypond on Mac for a long time, but for a few years now they haven't 
released a new version to install in DMG format. There are some packages to install via 
"ports" (which I haven't understood what they are) and using MacPorts or 
Homebrew (which I haven't understood how to use either). All this through the Terminal 
command line, which I don't understand how to use. For this reason, I am still using 
LilyPond version 2.20 because it was the last one installable as DMG. Please, if someone 
can guide me to install the latest version of LilyPond 2.24.3 because I have tried 
several times in different ways and have not succeeded.

Please, LilyPond developers, we need a DMG installer because not all of us Mac 
musicians know the Terminal command line.

Thanks in advance for your attention.
Regards



Re: Glissandos into Note

2024-04-13 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Ben, hi Greg,

thanks for bringing this up - in fact I started this morning to dig up
my old work, prompted by Greg's question.

It seems I only developed the functions a but further back then
(unfortunately I don't have time at the moment to look into it in
detail) - the difference seems to be that now, bends also avoid Dots.
See the attached version.

Lukas

Am 13.04.24 um 10:58 schrieb Benjamin Tordoff:

Hi Greg, the conversation on this list back in Dec'22 and Jan'23 ended
up with Lukas-Fabian Moser sending me the attached script and example.
I was able to use this successfully to typeset a range of scoops,
bends, and falls. It'd be better to get the latest version from
Lukas-Fabian in case he has done more work on it, but this might do
what you need. You can see the results I got using this here:
https://pluralsax.com/music-entry/147/alabamy-bound.

Whilst the script is complicated (and well beyond my understanding),
using it was not.

There was some discussion of whether this script (or something like
it) could make it into the main lilypond install but I don't think it
has yet.

Cheers

Ben






On 13 Apr 2024, at 08:23, Hans Aikema  wrote:




On 13 Apr 2024, at 01:07, Greg Lindstrom  wrote:


Hello -

I would like to write a glissando leading into a note without a
starting note. Perhaps the term is not glissando, but we encounter
it often in jazz where the trumpets and trombones will "slide" up to
a note to accentuate. It may be called a "scoop" but that's
speculation on my part.  Here's an example: Can this be done (by a
mortal)?


Should be possible by tricking lilypond like in
https://lists.gnu.org/archive/html/lilypond-user/2009-06/msg00132.html
In that and other threads on scoops there are a few other tricks to
achieve the same goal, but I think the approach in that message is
the easiest to comprehend.

My impression (no time to validate now) is that the trick from that
post would pollute the midi file. So in case you need a more or less
clean midi (which will nit contain any effect for the scoop) rather
than just display in the sheet music the more complex workaround given in
https://lists.nongnu.org/archive/html/lilypond-user/2022-12/msg00314.html
 might be worth a try


HTH

Hans






\version "2.24.0"

#
(define-public (number-or-number-list? x)
  (or (number? x) (number-list? x)))



#(set-object-property! 'contour 'backend-type? number-or-number-list?)
#(set-object-property! 'maximum-length 'backend-type? ly:dimension?)



#(define-public (ly:event-length ev now)
;;; quick'n'dirty variant of proper C++ function
   (ly:event-property ev 'length))



#
(define (hash-move target source key)
  (let ((value (hash-ref source key)))
(when value
  (hash-set! target key value)
  (hash-remove! source key

#
(define (Bend_after_engraver context)
  (let
   ((bend-after-ev #f)
(current-note-column #f)
(note-heads '())
(bend-after-grobs (make-hash-table))
(finished-bend-after-grobs (make-hash-table)))
   (make-engraver
((start-translation-timestep engraver)
 (hash-clear! finished-bend-after-grobs))
(listeners
 ((bend-after-event engraver event)
  (set! bend-after-ev event)))
(acknowledgers
 ((note-column-interface engraver grob source-engraver)
  (set! current-note-column grob))
 ((note-head-interface engraver grob source-engraver)
  (set! note-heads (cons grob note-heads
((stop-translation-timestep engraver)
 (let ((now (ly:context-current-moment context)))
   (hash-for-each
(lambda (grob alist)
  (when
   ;; For falls starting in grace time, compare actual
   ;; moments to make sure the band spans the full (grace)
   ;; length of the main note.
   ;; For falls starting in non-grace time, compare only
   ;; moment-main's to make sure the fall gets terminated
   ;; before any grace notes coming before the next note.
   (if (assq-ref alist 'start-in-grace)
   (not (ly:moment= (ly:moment-main now)
   (ly:moment-main (assq-ref alist 'stop-moment
   (ly:spanner-set-bound!
grob RIGHT
(if (ly:grob? (ly:context-property context 'currentBarLine))
;; don't cross a barline!
(ly:context-property context 'currentCommandColumn)
(if current-note-column
current-note-column
(ly:context-property context 'currentMusicalColumn
   (hash-move finished-bend-after-grobs bend-after-grobs grob)))
bend-after-grobs)

   (for-each
(lambda (head)
  (let
   ((head-bend-after-ev
 (find
  (lambda

Re: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-10 Thread Maurits Lamers via LilyPond user discussion

Hi Jean,

Of course you are right. Let me explain how I got to this to explain my 
confusion.


My first attempt was to add it to the next note without using \override 
Staff.PianoPedalBracket.to-barline = ##t (as I wasn't aware of it 
existence at that point). What I discovered however is that when the 
tremolo is the last bar of that system, the bracket is continued on the 
next system. Example:


%%%

\score {
  \new Staff {
    \clef bass
    \time 6/8
    \relative c' {
  c8 b a g e c |
  \set Staff.pedalSustainStyle = #'mixed
  \repeat tremolo 12 { b,32\sustainOn b' } |
  \repeat tremolo 12 { b,32 b'  } | \break
  c8\sustainOff e f g a
    }
  }
}

%%

That is confusing because it means for the player that it is not 
immediately obvious where to lift the sustain pedal. This lead to me 
moving the \sustainOff back to the last note of the tremolo, and trying 
to extend it to the end of the barline.


It is indeed the case that if you set it to the next note (the c8 in the 
example) AND set \override Staff.PianoPedalBracket.to-barline = ##t, it 
works as expected. To me it was not immediately obvious that this is the 
correct solution. When trying to find a solution, I was surprised to 
only find a reference to this type of solution on the mailing list in a 
post of 2015, and it didn't feature the end of system situation. I 
expected that this kind of issue would have come up more frequently. 
Perhaps this solution might deserve a mention in the Pedal department of 
the Lilypond documentation. Happy to contribute that mention.


cheers

Maurits

Op 10-04-2024 om 12:01 schreef Jean Abou Samra:

Le mardi 09 avril 2024 à 23:55 +0200, Maurits Lamers via LilyPond user 
discussion a écrit :

Hey all,

I encountered a situation where the PianoPedalBracket setting to-barline
doesn't always do what you'd expect. Given the following code, the pedal
bracket is not extended to the end of the bar:

%%%

\version "2.24.0"
\score {
    \new Staff {
  \clef bass
  \time 6/8
  \relative c' {
    c8 b a g e c |
    \set Staff.pedalSustainStyle = #'mixed
    \override Staff.PianoPedalBracket.to-barline = ##t
    \repeat tremolo 12 { b,32\sustainOn b' } |
    \repeat tremolo 12 { b,32 b'\sustainOff  } |
    c8 e f g a
  }
    }
}


Correct syntax is

\version "2.24.0"
\score {
\new Staff {
  \clef bass
  \time 6/8
  \relative c' {
c8 b a g e c |
\set Staff.pedalSustainStyle = #'mixed
\override Staff.PianoPedalBracket.to-barline = ##t
\repeat tremolo 12 { b,32\sustainOn b' } |
\repeat tremolo 12 { b,32 b' } |
c8\sustainOff e f g a
  }
}
}


The \sustainOff command is placed on the note where you *release*
the pedal. And because LilyPond uses post-fix syntax, it comes just
*after* that note.

Best,
Jean


Re: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-10 Thread Maurits Lamers via LilyPond user discussion

Hi Aaron,

Yes it does. It is just unexpected that this would be necessary.

cheers

Maurits

Op 10-04-2024 om 00:12 schreef Aaron Hill:

Does the empty chord construct help?

  <>\sustainOff

(I'm away from my normal environment, so I cannot test this locally to 
confirm.)



-- Aaron Hill




PianoPedalBracket.to-barline doesn't always work as expected

2024-04-09 Thread Maurits Lamers via LilyPond user discussion

Hey all,

I encountered a situation where the PianoPedalBracket setting to-barline 
doesn't always do what you'd expect. Given the following code, the pedal 
bracket is not extended to the end of the bar:


%%%

\version "2.24.0"
\score {
  \new Staff {
    \clef bass
    \time 6/8
    \relative c' {
  c8 b a g e c |
  \set Staff.pedalSustainStyle = #'mixed
  \override Staff.PianoPedalBracket.to-barline = ##t
  \repeat tremolo 12 { b,32\sustainOn b' } |
  \repeat tremolo 12 { b,32 b'\sustainOff  } |
  c8 e f g a
    }
  }
}

%%%

Only when the \sustainOff is placed outside of the tremolo, the bracket 
extends to the barline:


%%%

\version "2.24.0"
\score {
  \new Staff {
    \clef bass
    \time 6/8
    \relative c' {
  c8 b a g e c |
  \set Staff.pedalSustainStyle = #'mixed
  \override Staff.PianoPedalBracket.to-barline = ##t
  \repeat tremolo 12 { b,32\sustainOn b' } |
  \repeat tremolo 12 { b,32 b' }  \sustainOff |
  c8 e f g a
    }
  }
}

%%%

However, this leads to Lilypond complaining about an unattached 
SustainEvent. Is this a bug?


cheers

Maurits





Re: Breathing marks

2024-03-29 Thread Maurits Lamers via LilyPond user discussion
I think that because of the combination of symbols, I would use \markup 
instead.


\version "2.24.0"

\score {
  \new Staff {
    \relative c'' {
  c8\( b a g8 ~ g8\)^\markup { O \musicglyph "scripts.rcomma" } 
\acciaccatura { a'8^( } g fis) d

    }
  }
}

It is definitely not ideal, as you'd need to raise the comma a bit 
still, and you might need to create a bit of space, but it keeps the 
attachment to the notes they belong to. You can then use the markup 
positioning to get things into the right place.


cheers

Maurits

Op 29-03-2024 om 15:11 schreef Peter Mayes:
The above three little screenshots show breathing marks in an oboe 
score - respectively "breathe out", "breathe in" and "breathe 
out-and-in".


I know of the \breathe command, and I have seen from the documentation 
that the "comma" can be raised.


But being new to Lilypond, I would appreciate advice on the best way 
to achieve the above, in the most "natural" way.


One thing I see from the whole score is that sometimes the breath 
indication is between notes, and sometimes closer to being above a 
note. So it would be useful to find a solution that allows for 
vertical and horizontal adjustment.


Thanks in advance.





Re: Capturing out-of-music markup for music braille

2024-03-29 Thread Maurits Lamers via LilyPond user discussion
Thanks so much for thinking along. In the current setup that would still 
require users to change their Lilypond code. Your example did give me an 
idea though: if there would be something like $currentscore, the problem 
of getting access to the score header would be solved...


cheers

Maurits

Op 28-03-2024 om 11:40 schreef Timothy Lanfear:

On 27/03/2024 22:03, Maurits Lamers wrote:

Hi Timothy,

Thanks so much for your answer! With $defaultheader I can indeed get 
the main/global header fields in the initialize stage of the 
engraver, which is already a very important step. I looked up where 
$defaultheader is defined, and tried toplevel-scores and 
toplevel-bookparts as well as $current-book and $current-bookpart but 
these sadly do not contain any info (yet) when in the initialize step 
of the score context engraver.


Your solution for the score level headers is sadly unusable for me, 
as the concept of the braille conversion as a simple include only 
addition doesn't allow me to require users to create variables to get 
references to these score blocks. It should work without any 
user-side change to the Lilypond code the user delivers.


I tried to see what the difference is between what 
(ly:translator-context engraver) returns and what the value is of 
your \myscore variable, and see that the first is # 
where \myscore is #. Is there any way that I would be able to 
get the value # from somewhere inside that initialize step of 
the engraver?


That would allow me to use the (ly:score-header) function, and get 
things that way.


The best I can come up with is this, which requires an explicit \book 
and insertion of some code inside the \book.


\version "2.24.0"

Header_export =
#(lambda (context)
  (make-engraver
    ((initialize translator)
  (ly:message "Print global headers with engraver\n")
  (printheader $defaultheader

#(define (headerfield header field)
  (if (and header (module-defined? header field))
    (ly:message "header field: ~a — value: ~a \n" field (module-ref 
header field


#(define (printheader header)
  (headerfield header 'opus)
  (headerfield header 'title)
  (headerfield header 'piece))

\layout { \context { \Score \consists \Header_export } }

\header {
  title = "Title"
  opus = "Op 1"
}

\book {
  \score { \header { piece = "Piece 1" } { c'1 } }
  \score { \header { piece = "Piece 2" } { c'1 } }
  #(for-each (lambda (s) (printheader (ly:score-header s))) (reverse 
(ly:book-scores $current-book)))

}





Re: Capturing out-of-music markup for music braille

2024-03-27 Thread Maurits Lamers via LilyPond user discussion

Hi Timothy,

Thanks so much for your answer! With $defaultheader I can indeed get the 
main/global header fields in the initialize stage of the engraver, which 
is already a very important step. I looked up where $defaultheader is 
defined, and tried toplevel-scores and toplevel-bookparts as well as 
$current-book and $current-bookpart but these sadly do not contain any 
info (yet) when in the initialize step of the score context engraver.


Your solution for the score level headers is sadly unusable for me, as 
the concept of the braille conversion as a simple include only addition 
doesn't allow me to require users to create variables to get references 
to these score blocks. It should work without any user-side change to 
the Lilypond code the user delivers.


I tried to see what the difference is between what 
(ly:translator-context engraver) returns and what the value is of your 
\myscore variable, and see that the first is # where 
\myscore is #. Is there any way that I would be able to get the 
value # from somewhere inside that initialize step of the engraver?


That would allow me to use the (ly:score-header) function, and get 
things that way.


Thanks again!

Maurits

Op 27-03-2024 om 18:07 schreef Timothy Lanfear:


On 26/03/2024 14:01, Maurits Lamers via LilyPond user discussion wrote:


- is there a way to get a listener or callback of some kind to 
capture out-of-music markup?
- is there a way to get access to the global headers and / or score 
headers (in case of score specific headers)?
- is there documentation on how to get a reference to the required 
parameters for these scheme functions?



Here is an example for printing the global headers and score headers. 
You can also print the global headers from the initialize translator 
step of your engraver.


\version "2.24.0"

Header_export =
#(lambda (context)
  (make-engraver
    ((initialize translator)
  (ly:message "Print global headers with engraver\n")
  (printheader $defaultheader

#(define (headerfield header field)
  (if (and header (module-defined? header field))
    (ly:message "header field: ~a — value: ~a \n" field (module-ref 
header field


#(define (printheader header)
  (headerfield header 'opus)
  (headerfield header 'title)
  (headerfield header 'piece))

\layout { \context { \Score \consists \Header_export } }

\header {
  title = "Title"
  opus = "Op 1"
}

myscore = \score { \header { piece = "Piece" } { c'1 } }
\myscore

#(printheader $defaultheader)
#(printheader (ly:score-header myscore))






Capturing out-of-music markup for music braille

2024-03-26 Thread Maurits Lamers via LilyPond user discussion

Hey all,

It has been a while I posted on this mailing-list. As some of you might 
remember, I have been working on a music braille output system for 
Lilypond for quite some time now. The update on that front is that I do 
have a system now that can reliably output (a subset of) music braille 
for Lilypond files version 2.24 and higher.


The concept of this system (named Lybra) is based on the concept 
provided by the event-listener.ly file as included with Lilypond, 
capturing music events, rewrite them to braille and saving the output in 
a separate text file. This allows users to write music the normal way, 
and get the music braille equivalent by including a single lilypond 
file. That inclusion attaches listeners to the music events, which cause 
the braille output file to be created, next to any PDF or midi as 
indicated in the Lilypond source.
While the system is definitely not complete yet, I think that the 
listener interface will be sufficient for all music related information 
I would still need to add.


For a proper braille output though it is important to also be able to 
include the headers, as well as other non-music related markup. One 
specific use case is a song score, with a score block with the music and 
the first verse as lyrics and the remaining verses as blocks of text 
under the song.


My main problem is that I do not know how I can get hold of that 
information. My main entry and exit points are the initialize and 
finalize listeners to the Score context. I have been searching what 
contexts I can get access to a nd whether those contexts can provide 
anything, but if there is anything, I cannot find it.


I did see functions in the Lilypond scheme function list that look 
suitable to provide the headers (which would solve one part of the 
problem), but these functions require parameters to be passed in, and 
there doesn't seem to be documentation on how to get a reference to that 
parameter, (ie the current state at the moment of initialize or finalize).
One example is the headers-property-alist-chain function, another is the 
paper-book-header function. The first requires the headers object, the 
second a paperbook object, but I cannot find how to get a 
pointer/reference to either the current headers or the current paperbook 
object.


So my main questions are:

- is there a way to get a listener or callback of some kind to capture 
out-of-music markup?
- is there a way to get access to the global headers and / or score 
headers (in case of score specific headers)?
- is there documentation on how to get a reference to the required 
parameters for these scheme functions?


Thanks in advance for any suggestions!

cheers

Maurits




Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 23:53 +0100, Hans Aikema wrote:
> > Jonas,
> > 
> > I ran this same file my Apple M1 MacBook Pro 2021 against
> > 
> > MacPorts lilypond-devel (which is still at 2.25.13) aarch64 build
> > aikebah@rajah MSDM % time (lilypond MSDM.ly 2> /dev/null )
> > ( lilypond MSDM.ly 2> /dev/null; )  15.78s user 2.27s system 100% cpu 
> > 17.994 total
> > aikebah@rajah MSDM % time (lilypond MSDM.ly 2> /dev/null )
> > ( lilypond MSDM.ly 2> /dev/null; )  15.80s user 2.27s system 100% cpu 
> > 18.012 total
> > aikebah@rajah MSDM % time (lilypond MSDM.ly 2> /dev/null )
> > ( lilypond MSDM.ly 2> /dev/null; )  15.80s user 2.29s system 100% cpu 
> > 18.017 total
> > aikebah@rajah MSDM % lilypond -v
> > GNU LilyPond 2.25.13 (running Guile 2.2)
> > 
> > Your aarch64 build of 2.25.14
> > aikebah@rajah MSDM % time (../lilypond-2.25.14/bin/lilypond MSDM.ly 2> 
> > /dev/null )
> > ( ../lilypond-2.25.14/bin/lilypond MSDM.ly 2> /dev/null; )  17.07s user 
> > 2.20s system 99% cpu 19.340 total
> > aikebah@rajah MSDM % time (../lilypond-2.25.14/bin/lilypond MSDM.ly 2> 
> > /dev/null )
> > ( ../lilypond-2.25.14/bin/lilypond MSDM.ly 2> /dev/null; )  17.06s user 
> > 2.18s system 99% cpu 19.307 total
> > aikebah@rajah MSDM % time (../lilypond-2.25.14/bin/lilypond MSDM.ly 2> 
> > /dev/null )
> > ( ../lilypond-2.25.14/bin/lilypond MSDM.ly 2> /dev/null; )  17.19s user 
> > 2.19s system 99% cpu 19.478 total
> > aikebah@rajah MSDM % ../lilypond-2.25.14/bin/lilypond -v
> > GNU LilyPond 2.25.14 (running Guile 3.0)
> > 
> > Standard published x64 MacOS Build for 2.25.14
> > aikebah@rajah MSDM % time ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 
> > 2>/dev/null )
> > ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 2> /dev/null; )  27.69s user 
> > 2.48s system 99% cpu 30.456 total
> > aikebah@rajah MSDM % time ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 
> > 2>/dev/null )
> > ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 2> /dev/null; )  27.60s user 
> > 2.42s system 99% cpu 30.280 total
> > aikebah@rajah MSDM % time ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 
> > 2>/dev/null )
> > ( ../lilypond-2.25.14x64/bin/lilypond MSDM.ly 2> /dev/null; )  27.94s user 
> > 2.43s system 99% cpu 30.661 total
> > aikebah@rajah MSDM % ../lilypond-2.25.14x64/bin/lilypond -v                 
> >   
> > GNU LilyPond 2.25.14 (running Guile 3.0)
> > 
> > A clear improvement over running the x64 build using Rosetta and slightly 
> > slower than the 2.25.13 Guild 2.2 build of MacPorts

Indeed, great! Thanks for testing!


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


Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 23:03 +0100, Michael Käppler wrote:
> 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

Thanks for testing on a larger score!

> 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.

Jonas


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


Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 14:08 -0700, Kenneth Wolcott wrote:
> Hi Jonas;
> 
>   I hope that the following information is useful:
> 
> Lilypond performance stats for the engraving of one very small and one
> medium sized pieces
> 
> native = Apple Silicon build
> foreign = x86_64
> other = MacPorts LP 2.24.3
> 
> ~/Downloads/native_lilypond-2.25.14/bin/lilypond
> ./Danny_Boy_updated.ly  0.53s user 0.06s system 87% cpu 0.683 total
> ~/Downloads/foreign_lilypond-2.25.14/bin/lilypond
> ./Danny_Boy_updated.ly  0.93s user 0.09s system 101% cpu 1.010 total
> /opt/local/bin/lilypond ./Danny_Boy.ly  0.48s user 0.06s system 104%
> cpu 0.515 total
> 
> ~/Downloads/native_lilypond-2.25.14/bin/lilypond
> ./Waltz_Nr2_updated.ly  1.07s user 0.10s system 102% cpu 1.145 total
> ~/Downloads/foreign_lilypond-2.25.14/bin/lilypond
> ./Waltz_Nr2_updated.ly  1.76s user 0.15s system 100% cpu 1.907 total
> /opt/local/bin/lilypond ./Waltz_Nr2.ly  1.06s user 0.12s system 103%
> cpu 1.140 total
> 
> for i in ./Danny_Boy.ly ./Danny_Boy_updated.ly ./Waltz_Nr2.ly
> ./Waltz_Nr2_updated.ly
> for> do
> for> wc $i
> for> done
>  232 8144641 ./Danny_Boy.ly
>  232 8144642 ./Danny_Boy_updated.ly
>  9393892   19981 ./Waltz_Nr2.ly
>  9393892   19982 ./Waltz_Nr2_updated.ly

Great, winning more than a factor 1.5x compared to the x86_64 binaries
sounds reasonable 


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


Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 14:24 -0500, Karlin High wrote:
> On 3/23/2024 2:00 PM, Jonas Hahnfeld wrote:
> > Would be interesting to see how this compares to the "vanilla" package
> 
> I tried it, 3 runs. First one maybe unfair because font cache 
> initialization or something.
> 
> real0m48.643s
> user0m0.000s
> sys 0m0.031s
> 
> real0m31.457s
> user0m0.015s
> sys 0m0.000s
> 
> real0m31.591s
> user0m0.000s
> sys 0m0.031s
> 
> The another with the JIT version:
> 
> real0m32.319s
> user0m0.000s
> sys 0m0.030s
> 
> But I expect I should get the computer otherwise idle as far as possible 
> for this. I had other software running, but nothing with heavy loads.

Thanks for testing! Not as good as I had hoped, but also not (much)
worse than before...


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


Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sun, 2024-03-24 at 03:20 -0700, Aaron Hill wrote:
> The error occurred from my WSL1 environment running Ubuntu 18.04.  
> Probably my own fault for keeping bionic around.

Ah ok; yes, Ubuntu 18.04 is end-of-life since last year already, so I
didn't check its versions.

> I do have Ubuntu 20.04 under WSL2.  I can confirm 2.25.14 runs under 
> focal without complaining about glibc.

Good.

> Based on the email thread you linked, perhaps I should nuke all my WSL 
> distros at this point and start from scratch with the latest Ubuntu (22, 
> I gather).  Not sure if Alma is an option for WSL.

You don't need Alma, the binaries should run on any distribution that
is newer than that. Ubuntu is perfectly fine, and likely better tested
with WSL (but I don't have experience with it myself).

Jonas


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


Re: LilyPond 2.25.14

2024-03-24 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 18:18 -0700, Aaron Hill wrote:
> On 2024-03-23 6:25 am, Jonas Hahnfeld wrote:
> > We are happy to announce the release of LilyPond 2.25.14. This is
> > termed a development release, but these are usually reliable for
> > testing new features and recent bug fixes. However, if you require
> > stability, we recommend using version 2.24.3, the current stable
> > release.
> > Please refer to the Installing section in the Learning Manual for
> > instructions how to set up the provided binaries:
> > https://lilypond.org/doc/v2.25/Documentation/learning/installing
> 
> 
> /opt/lilypond/2.25.14/bin/lilypond: /lib/x86_64-linux-gnu/libc.so.6: 
> version `GLIBC_2.28' not found (required by 
> /opt/lilypond/2.25.14/bin/lilypond)
> 
> 
> Something changed from .13 to .14?  I'm presuming my system is just 
> out-of-date, and this might be expected.

Yes, 2.25.14 is built in Alma Linux 8 instead of CentOS 7 which raises
the glibc requirement. I didn't mention it in the release email because
I thought it wouldn't make a practical difference as outlined in
https://lists.gnu.org/archive/html/lilypond-devel/2024-02/msg00052.html
Which distribution are you running?

Jonas


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


Re: LilyPond 2.25.14

2024-03-23 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 11:39 -0700, Kenneth Wolcott wrote:
> Hi Jonas;
> 
>   I've tried engraving a couple of randomly chosen previous engravings
> (using LP 2.24.x) using the new LP 2.25.14 version on my Mac (Apple
> Silicon).
> 
>   Since none of my engravings are large, most of them are one to two
> pages in length, I thought there would be no noticable decrease in
> engraving time, but I was wrong!  It IS noticably faster for even
> small files :-)
> 
>   One thing I noticed is what one of my engravings had significant
> change in apperance in the second and third page, as if I had inserted
> a forced page break in two or three places.  There were no conversion
> errors or warnings in any of my engravings.
> 
>   I don't know what was the cause of the speedup, but it is
> appreciated! I have been using the MacPorts version of Lilypond 2.24.3
> compared to this recent test release.

Thanks for testing! The performance advantage probably comes from Guile
3.0 in our binaries of 2.25.14 versus Guile 2.2 with the MacPorts
version, having a faster startup time which matters especially for
smaller files. If you have some time, I would be really interested in
seeing a comparison with LilyPond 2.25.14 from
https://gitlab.com/lilypond/lilypond/-/packages/23923980 when the
x86_64 executable is run through Rosetta on Apple Silicon...

Jonas


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


Re: LilyPond 2.25.14

2024-03-23 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 11:41 -0500, Karlin High wrote:
> On 3/23/2024 10:02 AM, Jonas Hahnfeld via LilyPond user discussion wrote:
> > 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.
> 
> Carver MSDM.ly, subject of many past performance-test posts.
> 
> Inte Core i5-3450
> 24 GB RAM
> Windows 10 22H2
> 
> real 0m32.109s
> user 0m0.000s
> sys 0m0.015s

Would be interesting to see how this compares to the "vanilla" package
here: https://gitlab.com/lilypond/lilypond/-/packages/23923980 ... But
I guess I can also do this test on my end since the score is public.


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


Re: LilyPond 2.25.14

2024-03-23 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2024-03-23 at 14:25 +0100, Jonas Hahnfeld wrote:
> We are happy to announce the release of LilyPond 2.25.14. This is
> termed a development release, but these are usually reliable for
> testing new features and recent bug fixes.

Following this release, I made two special builds with the changes
proposed in https://gitlab.com/lilypond/lilypond/-/merge_requests/2283
that would be great to get more widespread testing:

Native Apple Silicon build: https://cloud.hahnjo.de/s/x9D62eASSn6Ng7D
This is a native arm64 version for macOS 12+; if you have a Mac, please
test and (hopefully) confirm the performance advantage over running the
x86_64 build via Rosetta 2 

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.

Cheers
Jonas


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


LilyPond 2.25.14

2024-03-23 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.14. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


How to use define-music-function?

2024-03-20 Thread enejati--- via LilyPond user discussion
Hello,
I'm a new lilypond user. I want to create multiple scores in a single
file. These scores have some values on common. So I want to use
`define-music-function` in order to avoid repetition.

Here is my code now:
\score {
  \new Staff \with {
instrumentName = "۱"
  } \one
  \layout { }
}


\book {
  \bookOutputSuffix "1"
  \score {
\new Staff \with {
  midiInstrument = "piccolo"
} \one
\layout { }
\midi {
  \tempo 4=80
}
  }
}

\score {
  \new Staff \with {
instrumentName = "۲"
  } \two
  \layout { }
}

\book {
  \bookOutputSuffix "2"
  \score {
\new Staff \with {
  midiInstrument = "piccolo"
} \two
\midi {
  \tempo 4=80
}
  }
}

\score {
  \new Staff \with {
instrumentName = "۳"
  } \three
  \layout { }
}

\book {
  \bookOutputSuffix "3"
  \score {
\new Staff \with {
  midiInstrument = "piccolo"
} \three
\midi {
  \tempo 4=80
}
  }
}

I tried to make a generator function something like this:
#(define-music-function (make-score instrumentName bookSuffix musicContent) 
(string? string? ly:music?)
   #{
 \score {
  \new Staff \with {
instrumentName = $instrumentName
  } $musicContent
  \layout { }
}

\book {
  \bookOutputSuffix $bookSuffix
  \score {
\new Staff \with {
  midiInstrument = "piccolo"
} $musicContent
\midi {
  \tempo 4=80
}
  }
}
   #})

% Usage
make-score "۱" "1" \one
make-score "۲" "2" \two
make-score "3" "3" \three



However I stumbled upon the following error which I can't make a sense
of:
error: syntax error, unexpected STRING, expecting '.' or '='
make-score "۱
 " "1" \one

-- 
Ebrahim Nejati

https://nejati.net
Key: rsa4096/0xDB2CBC2428686000



Re: coloring notes with more voices in a staff

2024-03-18 Thread William Rehwinkel via LilyPond user discussion

Dear Joop,

Use \tweak color #red , like so

\version "2.25.6"
\relative c
  {
   f'2( g4.)
<< { d8 | f4 f4 g16 a }
   { \tweak color #red
 g8 | d4 d4 e16 f
   }
 >>
a8 r4
  }

Thanks,
-William

On 3/18/24 12:41, Go77 wrote:

Hi,

I'm trying to color the note heads of a single voice in a staff. I tried 
to do that with the following code:


/\version "2.24.3"
\relative c
   {
    f'2( g4.)
     << { d8 | f4 f4 g16 a }
    { \override NoteHead.color = #red
  g8 | d4 d4 e16 f
  \revert NoteHead.color } >>
     a8 r4
   } /

This results in the noteheads of /both /voices being colored instead of 
only the upper one (in this case):


So, is there any way to achieve my goal of coloring only the upper notes?

Joop





--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Tremolo/triplet problem

2024-03-06 Thread William Rehwinkel via LilyPond user discussion

Dear Ralph,

I think this replicates how the original score looks:

\version "2.25.7"

\relative b {
  \clef alto
  \time 4/4
  \tuplet 6/4 { b2.:8 } c4.*2/3:8 d4.*2/3:8 | c2.*2/3:8 b4.*2/3:8 a4.*2/3:8
}

-William

On 3/6/24 21:53, Ralph Palmer wrote:

Hi -

Thanks for all your work and for your help to me over a number of years.

I'm running into a problem I have no idea how to fix. I've looked at 
tremolos in the Notation Reference and in the Snippet Repository, but 
can't find a solution. I would appreciate any help. The first image is 
the result of tremoloTripletProblem.ly. The second image is from the 
score I'm trying to reproduce (albeit in a slightly more legible 
fashion, I hope).


tremoloTripletProblem.ly :

%

\version "2.24.0"

\language english

tremoloTripletProblem =
\relative c' {
   \clef alto
   \key bf \major
   \time 4/4

     \tuplet 3/2 4
     { bf8-.\pp( 8-. 8-. 8-. 8-. 8-.)
       c8-.( 8-. 8-. a8-. 8-. 8-.) |
     bf2.:6 c4.:3 d4:3 |
     c2.:6 bf4.:3 a4.:3 |
     }
}

\score {
   \tremoloTripletProblem
}

%%%

image.png


image.png
Any suggestions? I imagine the simplest solution would be to simply go 
with half and quarter notes as tripletted with the tremolo mark, but I 
kind of like the composer's notation.


All the best,

Ralph

__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com 


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
perfect thanks!

Mar 6, 2024, 14:35 by lilyp...@hillvisions.com:

> On 2024-03-06 10:56 am, Michael Winter via LilyPond user discussion wrote:
>
>> I have a programmatically generated score and am now realizing that I want 
>> to make a small tweak to text markups that are throughout the score in 
>> multiple files that are included at multiple levels. 
>>
>> " 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded by a 
>> 1)
>>
>> Is it possible to do this with a global search and replace on compile such 
>> that I do not need to edit each individual file (of which there are 
>> hundreds) manually?
>>
>
> LilyPond does support basic replacements for text markup:
>
> 
> \paper {
>  #(add-text-replacements! '(("1↑" . "1")))
> }
> 
>
>
> -- Aaron Hill
>



Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
double thanks

Mar 6, 2024, 14:36 by j...@abou-samra.fr:

>
> Try
>
> \version "2.24.2"\paper {  #(add-text-replacements!'(("1↑" . "1")))}{ 
> c'^\markup "1↑" }
>
> Best,
>
>
> Jean
>
>

Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
Thanks Curt,

Unfortunately, I have already manually edited to the extent that tweaking the 
generating program would result in a lot of lost work. Typically I try not to 
edit post generation, but that was not possible in this particular case.

I am on arch linux. And yes, I am sure it would be possible to do it through 
the terminal, but I am trying to avoid destructively editing the files (simply 
out of fear even though I could always roll back). I would be replacing only a 
few unicode characters, but many, many occurrences.

Best,

Michael

Mar 6, 2024, 14:22 by pla...@fishlet.com:

> Michael,
>
> You mentioned that the score is programmatically generated. If so, can
> you modify the generating program and regenerate the score?
>
> Otherwise, a more complete example would be nice. Are you trying to do a
> simple string replacement of a few (unicode) characters, or are you
> trying to replace larger chunks of LilyPond code?
>
> It would also help to know what operating system environment you are
> using. The answer may be to make a copy of the whole tree and run a
> search/replace utility recursively on all the files.
>
> Regards,
> Curt
>
> On 3/6/2024 10:56 AM, Michael Winter via LilyPond user discussion wrote:
>
>> I have a programmatically generated score and am now realizing that I
>> want to make a small tweak to text markups that are throughout the
>> score in multiple files that are included at multiple levels.
>>
>> " 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded
>> by a 1)
>>
>> Is it possible to do this with a global search and replace on compile
>> such that I do not need to edit each individual file (of which there
>> are hundreds) manually?
>>
>> I could do this through the terminal, but I would rather not
>> destructively edit the files.
>>
>> Thanks in advance!
>>
>> Best,
>>
>> Michael
>>



search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
I have a programmatically generated score and am now realizing that I want to 
make a small tweak to text markups that are throughout the score in multiple 
files that are included at multiple levels. 

" 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded by a 1)

Is it possible to do this with a global search and replace on compile such that 
I do not need to edit each individual file (of which there are hundreds) 
manually?

I could do this through the terminal, but I would rather not destructively edit 
the files.

Thanks in advance!

Best,

Michael

Omit footnotes and footnote text from score

2024-02-27 Thread William Rehwinkel via LilyPond user discussion

Dear list,

I am wondering if there is a way to omit footnotes and the text that 
accompanies them from a score. the reason for this is I am making a 
critical edition of a baroque trio sonata from a manuscript, and would 
like to use footnotes for editorial changes in the full score and not 
show them in the parts.


For example, see the following mwe:

\version "2.25.7"

part = \relative d' {\footnote #'(0.5 . 2) "Example footnote" d4 }

\book {
  \score {
\new Staff \part
  }
}

\book {
  \score {
\new Staff \with {\omit Footnote }\part
  }
}

In file-1.ly, the footnote number and connecting line is not shown in 
the score, but the text still appears at the bottom of the page.


Thanks in advance for your help,
-William

--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: "Squished" tie between 2 notes

2024-02-11 Thread William Rehwinkel via LilyPond user discussion

Dear George,

I put the following in a style-sheet which I import into every lilypond 
file:


\context {
  \Voice
  \override Tie.springs-and-rods = #ly:spanner::set-spacing-rods
  \override Tie.minimum-length = #4
  \override Tie.minimum-length-after-break = #4
}

It shouldn't have any impact except that it will extend some of these 
squished ties.


Let me know if this works for you.
-William

On 2/11/24 12:30, George wrote:
At the moment I am having an issue with a tie from the alto part where 
it is automatically "squished" by Lillypond. I didn't find an answer 
anywhere else on how to create some space between or make the tie 
somewhat noticeable. Also using the command/\shape/ on the tie was not 
the right choice this time (which I successfully used on some colliding 
ties somewhere else in the piece).


This is how it looks in the original source:
tie.png
and this is how Lilypond engraved it (notice the tie became a very 
little dot):

bar 78 lily.png
Here is the relevant part of my code (I include one measure before and 
one after to preserve the layout) :

_
\version "2.24.3"


global = { \time 4/4 \key a \minor }


soprano = \relative d'' {
   \voiceOne
d8 c16 b d c b a b2~ |
8 gis a4~ 16 b c8~ 16 a fis! b |
a gis fis e a8 a~ 16 gis a fis gis8.^\trill a16

}

alto = \relative e' {
   \voiceTwo

e4 a2 gis8. b16 |
e,4~ 8 dis16 e fis8  r16 fis~  8 8|
e4~ 16 e fis! dis e2 |

}


tenor = \relative g {
   \voiceOne
r8 gis a c f, d' b d~|
8 b c4~ 8 r8  a b |
c2 b |

}

bass = \relative c, {
   \voiceTwo

c8 r r f' d16 e f8~ 16 d b d |
c d e8~ 16 c a c dis,4 r8 dis' |
e1 |
}

\score {
   \new PianoStaff <<

     \new Staff = "up" <<
       \global
       \clef "treble"
       \new Voice = "soprano" { \soprano }
       \new Voice = "alto" { \alto }
     >>

     \new Staff = "down" <<
       \global
       \clef "bass"
       \new Voice = "tenor" { \tenor }
       \new Voice = "bass" { \bass }
     >>

   >>

   \layout {
     \context {
       \Score
       \override SpacingSpanner.common-shortest-duration = 
#(ly:make-moment 1/8 )

     }
   }
}

I would really appreciate your help.

Best,
George


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.25.13

2024-02-10 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.13. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


Ancient vocal music lyrics extenders

2024-02-05 Thread Jakob Pedersen via LilyPond user discussion

Hello all,

I've been trying to replicate a score from CPDL.



The font is terrible, the notes are weirdly shaped. I really don't like 
it. I wonder what software made it. Also, why two hyphens in that short 
a space?


(I'm wondering which software was used to make it in the first place.)

I've produced this so far:



I've used a variable with \set Staff.measureBarType = "-span|" to do the 
/mensurstriche/ at appropriate places.


MWE is at the bottom of this email.

I wonder about the lyrics extenders, though. My questions are:

1) I assume extending an extender already there is fairly easy, although 
I don't know how. I tried the lyrics.extender property, but I'm not sure 
how to use it correctly. I was thinking it might be possible to have all 
three lyrics extender lines end at the same point near the bar line like 
in the original.
2) Is it possible to add a lyrics extender line to lyrics like the O 
attached to the breve in the top line, even if it isn't actually a 
melisma? And if so, is it possible to force to extend as far as the 
other three lyrics extender lines re my first question.



Best wishes,
Jakob


*MWE:*
\version "2.25.12"

global = {
  \key d \major
  \time 2/2
}

BarOn = { \set Staff.measureBarType = "-span|" }
BarOff = { \set Staff.measureBarType = "|" }

\score { <<
  \new StaffGroup <<
    \new Staff \relative c' { \global \BarOn b'\breve \BarOff cis1 b }
    \addlyrics { O sa -- crum, }

    \new Staff \relative c' { \global \BarOn e2 g2. fis8 e \BarOff fis4 
g a1 g }

    \addlyrics { O __ _ _ _ _ _ sa -- crum, }

    \new Staff \relative c' { \global \clef "treble_8" \BarOn b2 e2. d8 
\BarOff cis d2 e1 e }

    \addlyrics { O __ _ _ _ _ sa -- crum, }

    \new Staff \relative c { \global \clef bass e1 b' a e }
    \addlyrics { O __ _ sa -- crum, }
  >>
>>

}\version "2.25.12"

global = {
  \key d \major
  \time 2/2
}

BarOn = { \set Staff.measureBarType = "-span|" }
BarOff = { \set Staff.measureBarType = "|" }

\score { <<
  \new StaffGroup <<
\new Staff \relative c' { \global \BarOn b'\breve \BarOff cis1 b }
\addlyrics { O sa -- crum, }

\new Staff \relative c' { \global \BarOn e2 g2. fis8 e \BarOff fis4 g a1 g }
\addlyrics { O __ _ _ _ _ _ sa -- crum, }

\new Staff \relative c' { \global \clef "treble_8" \BarOn b2 e2. d8 \BarOff cis d2 e1 e }
\addlyrics { O __ _ _ _ _ sa -- crum, }

\new Staff \relative c { \global \clef bass e1 b' a e }
\addlyrics { O __ _ sa -- crum, }
  >>
>>

}


bar lines shift when using proportional notation

2024-02-05 Thread Adrian Kleinlosen via LilyPond user discussion
Hi LilyPonders,


I would like to notate a piece proportionally. To do this, I have created
(with a little help) a markup command that I can use to place time
signatures above the bar lines. But as soon as I do this, they move to the
left, whereas the bar lines are in the right place if I don't use the
markup. (See the code below.) Can anyone tell me why this is and how I can
counteract it?


Cheers,

Adrian




\version "2.25.2"


#(define-markup-command (timesig layout props num den) (number? number?)

   (interpret-markup

layout props

#{

  \markup {

   \override #'(baseline-skip . 2.5)

   \override #'(font-size . 4.5)

   \override #'(font-name . "Bodoni72 Book")

   \override #'(whiteout-style . outline)

   \override #'(whiteout . 1)

   \override #'(extra-offset . -2)

   \column {

 \raise #0.5   \center-align \scale #'(0.8 . 0.8) #(number->string
num)

 \raise #-0.5  \center-align \scale #'(0.8 . 0.8) #(number->string
den)

   }

  }

#}))


\paper {

  indent = 0\mm

  short-indent = 0\mm

}



\score {

{

%%% Bar line and time signature move to the left  %%%

\time 29/64

\mark \markup { \timesig #29 #64 }

c'16[ 16 16 16 16 16 16] c'256 256 256 256 |

\time 2/8

\mark \markup { \timesig #2 #8 }

c'8[ c'8] \break


%%% Bar line and time signature in the right place %%%

\time 29/64

c'16[ 16 16 16 16 16 16] c'256[ 256 256 256] |

\time 2/8

c'8[ c'8] |

}


\layout {

  \context {

\Score

measureBarType = #"'"

proportionalNotationDuration = #(ly:make-moment 1 64)

\override SpacingSpanner.uniform-stretching = ##t

\override SpacingSpanner.strict-note-spacing = ##t

\override Stem.details.beamed-lengths = #'(7)

\override Stem.details.lengths = #'(7) }

  \context {

\Staff

\remove Time_signature_engraver }

   }

}


Example.ly
Description: Binary data


Example.pdf
Description: Adobe PDF document


Re: Include all files in a folder

2024-01-21 Thread Aaron Hill via LilyPond user discussion

On 2024-01-21 4:43 pm, Karlin High wrote:

The question was answered in 2016:

<https://lists.gnu.org/archive/html/lilypond-user/2016-08/msg00560.html>

What would be the current version of the answer?


\includePattern [1] has a \version statement with 2.24.0, so it would 
appear to still be relevant.


[1]: 
https://github.com/openlilylib/oll-core/blob/master/util/include-pattern.ily



-- Aaron Hill



Re: { } not sounding right.

2024-01-19 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Werner, hi Pierre-Luc,

Am 19.01.24 um 08:43 schrieb Werner LEMBERG:

Try this with and without the \new Voice commented.

\version "2.25.12"

\language "english"

\score {
   %\new Voice
   <<
 {bf bqf bf}
 {g gqs g}
   >>
   \layout {}
   \midi {}
}

Obviously you would need to listen to the MIDI output.

This is a limitation of MIDI: You can only have a single pitch bend
per time step per channel.  LilyPond's rather primitive MIDI 1.0
output provides no means to circumvent this limitation.

Looking into MIDI 2.0 I see that there exists a 'per-note pitch bend'
feature, so maybe someone is going to implement that in LilyPond.


I have a branch (from a few years ago) where I changed LilyPond's MIDI 
microtonality from using Pitch Bends (which is a bad idea when using 
chords) to using MIDI 1.0 tuning information. This works fine IIRC as 
long as you don't construct chords containing really close notes (e.g. c 
and c+5 cents).


I was never able (in terms of spare time and/or ability) to bring this 
to LilyPond's C++ coding level, but if I have time in february 
(university break), I could dig that branch up and see if I can share it 
in such a way that we can get it into LilyPond proper.


My overall impression was that LilyPond's MIDI code is quite old and 
didn't get as much polishing over the last decades as the main 
typesetting engine did.


Lukas


Re: Two novice questions

2024-01-17 Thread Aaron Hill via LilyPond user discussion

On 2024-01-17 10:00 am, Knute Snortum wrote:
On Wed, Jan 17, 2024 at 9:48 AM Peter Mayes  
wrote:

2. I have a lot of consecutive notes all staccato. Marking each one
individually is a bit of pain. Any way to specify that the next *n* 
notes

are all staccato?



I'd like to know the answer to that one too!  It may be something that
could go in Frescobaldi, if you use that editor.



What about LSR 82?
https://lsr.di.unimi.it/LSR/Item?id=82


-- Aaron Hill



Re: Including input files via command line

2024-01-16 Thread Aaron Hill via LilyPond user discussion

On 2024-01-16 10:12 am, Benjamin Bruce wrote:
Is there a way to compile multiple input files into one output file via 
the command line? Currently I am using \include, but I would like to be 
able to choose the included file on the fly without editing the main 
file.


If I recall correctly, LilyPond will process each source file included 
on the command-line individually.  You could use the shell to 
concatenate all your sources together and pass them via standard input.  
(Pass the filename "-" to LilyPond to instruct it to read from STDIN.)



Another thought I had was maybe there is a way to pass a value to the 
.ly file via the command line and use Scheme to choose the appropriate 
file to import based on that value. But that may be even more 
far-fetched.


You could do this, but my Spidey-Sense™ tingles and suggests this may be 
an XY problem.  But I simply do not have enough information about what 
you are needing to accomplish.


But for reference:

lilypond -e '(define-public a 42)'

Then within your .ly source, you'll need to bring in the guile-user 
module:



#(use-modules (guile-user))

%% The variable `a` should now be in scope.




NOTE: All of the above is documented in the first sections of the Usage 
manual.

https://lilypond.org/doc/v2.24/Documentation/usage/command_002dline-usage


-- Aaron Hill



Re: Setting the emoji font

2024-01-16 Thread Aaron Hill via LilyPond user discussion

On 2024-01-16 9:12 am, YTG 1234 wrote:
I want to use emoji within markup, and I can see in the output log that 
Lilypond can't find a character in its default emoji font (Symbola). I 
can't figure out how to override the default font.


%%%

\markup {
    "" %% This character isn't be found
}

%%%

I saw an old thread recommending to use \override #'(font-name . 
"..."), but that doesn't seem to work in modern versions (I'm on 
2.25.11). Overriding the serif font doesn't work either, as I don't 
think Lilypond tries it at all.


Cannot reproduce locally running either 2.22.0 or 2.25.11.


\version "2.22.0"

\markup
{     }

\markup
\override #'(font-name . "DejaVu Sans")
{     }

\markup
\override #'(font-name . "Segoe UI Emoji")
{     }


This probably has less to do with LilyPond and nearly everything to do 
with FontConfig and what fonts are installed and accessible.  At the 
very least, the markup \override command has not changed behavior, as 
far as I can tell.  And what works on my machine is largely irrelevant 
to what you'll need to do on your system.


Things to check: Run LilyPond with the -dshow-available-fonts option and 
grep the output to ensure the font in question appears.  If it does not, 
then something may be screwy with FontConfig.  If the font does appear, 
then make sure you input the name fully with the font-name override.  
Some fonts include as part of their family name what appears to be a 
style, and this has been known to cause problems.  Adding a trailing 
comma seems to help, e.g. use "Times New Roman," instead of "Times New 
Roman".



-- Aaron Hill



Re: Can I define custom bar lengths in LilyPond?

2024-01-16 Thread Aaron Hill via LilyPond user discussion

On 2024-01-16 8:06 am, Hajo Baess wrote:

Hello LilyPond users,

I wonder if there is a possibility to define a custom bar length, thus
for once cancelling LilyPond's automatic insertion of bar lines.

I have a complicated measure here with quite a bit of markup to
accommodate in one bar. I have worked out a solution which is maybe
good enough, but it contains lots of tweaks in order to squeeze
everything into the automatically assigned bar length.

If I could define my own bar lengths, I would get more space in the
bar, so I hope at least. My search in the documentation did not yield a
result for me, but maybe I did not look in the right places.

Hopefully someone here can troubleshoot me.
Any help is much appreciated.


I suspect we are going to need more information as there are at least 
two interpretations of "length" here.


This is why we highly recommend including MWEs (minimum working 
examples) with questions, as this gives us a common starting point 
without having to make potentially derailing guesses.




Length interpretation one: Metrical length (i.e. number of beats in a 
bar)


If you need to momentarily step away from the defined time signature, 
the easiest option I find is to use a cadenza--a section of music that 
is not bound by the time signature.  Begin the section with \cadenzaOn, 
cram whatever notes you want, and then end the section with \cadenzaOff 
to resume the original time signature.


NOTE: LilyPond will not attempt to subdivide a cadenza on its own for 
the purposes of line breaking.  You can of course provide hints using 
\bar "" as needed.


For more information, see: NR 1.2.3 - Displaying Rhythms; Unmetered 
Music

https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music



Length interpretation two: Dimensional width (i.e. physical space on the 
paper)


LilyPond's spacing engine tries to keep things unified across the music, 
so notes should look consistently spaced throughout the piece.  You can 
define a new "spacing section" within your score with the aptly named 
\newSpacingSection command.  Each use of this command will break up the 
larger score into chunks that the spacing engine will handle 
independently.  There are several context properties that affect note 
spacing, and these can be adjusted within each spacing section as 
desired.


For your scenario of a measure that just needs to be wider than everyone 
else, you would at a minimum need to start a new spacing section coming 
into the measure and then start yet another section for the subsequent 
measure--a total of three sections: one before, one for the "fat" 
measure, and one after.


For more information, see: NR 4.5.2 - New Spacing Section
https://lilypond.org/doc/v2.24/Documentation/notation/new-spacing-section



If you are talking about something else entirely, please see about 
providing a brief example of what you have tried.



-- Aaron Hill



Re: Error with \layout and \context

2024-01-12 Thread Aaron Hill via LilyPond user discussion

On 2024-01-12 5:00 pm, Ivan Kuznetsov wrote:


  \layout {

\context {
   \Score
   \override BarLine.transparent = ##t
   \override SpacingSpanner.base-shortest-duration = 
#(ly:make-moment 1  8)

   \override Stem.transparent = ##t
}
\context {
   \Voice
\consists Horizontal_bracket_engraver
}
  }

}


You need to do your mods in separate \context sections.  See above.


-- Aaron Hill



Re: zero-duration s to hold marks

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Raphael,

Am 12.01.24 um 13:32 schrieb Raphael Mankin:
I agree that 0 as a denominator would seem to indicate an infinite 
duration, and allow the rest of your argument. However <> still seems 
unintuitive.


I agree that <> isn't obvious. But in a complex language like LilyPond, 
there's always something like "idioms". I remember that I learned about 
<> quite late in my acquaintance with LilyPond, and it changed my input 
habits a bit - namely for standalone dynamics: <>\p s4 instead of s4\p. 
I had the project of introducing this idiom into the examples in the 
notation manual, but don't remember right now whether I ever finished this.


Lukas




Re: Transpose from major to minor key

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Matthew,

Am 12.01.24 um 00:29 schrieb msk...@ansuz.sooke.bc.ca:

You need to remember lilypond thinks in terms of pitch, not note names. Unlike
some (most?) other music software. So "\transpose g e" says "transpose EVERY
note up A TONE".

I'm not sure it's quite right to say that Lilypond thinks in terms of
pitch, not note names, because it selects the spelling of transposed notes
based on the note names.  For instance, \transpose c cis fis gives fisis ,
not g , whereas \transpose b, c fis gives g.  The one-semitone
transposition of the same note is different depending on the note names
used to specify it.


It depends on what one takes the term "pitch" to mean.

Your remark sounds as if you take "pitch" to be physical frequency, 
which obviously is a valid stance. But, LilyPond's "pitch" data type 
carries much more information, namely octave, "note name" and alteration.


Wol's remarks (I think) alluded to the difference between LilyPond and, 
e.g., MuseScore, in that in LilyPond the meaning of naked note names 
does not change when selecting a new key signature: In MuseScore, if I 
switch to e-flat major and hit "e", I get the pitch e-flat; in LilyPond, 
"e" still creates e-natural.


Lukas


Re: Cut time/half-time/alle breve & 8/4 time

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Stanton,

I’m setting various short organ pieces from an old Peters edition, 
mostly to prevent my aging brain from forgetting…


One piece is in 8/4 time -the first measure has a whole note and 2 
half notes. However, the time signature as printed is the cut time 
symbol. How can I reproduce this? I’m using Lilypond 2.25.11.
The solutions given so far seem to be more complicated than necessary, I 
think.


\relative c' {
  \time 4/2
  \set Timing.timeSignatureFraction = 2/2
  c4 d e f g a b c d
}

Lukas




Re: Transpose from major to minor key

2024-01-10 Thread Aaron Hill via LilyPond user discussion

On 2024-01-10 6:30 pm, Freeman Gilmore wrote:

Aaron Does LP have that?That would be a trick for modes other than
between major and minor and that may not work well.
Thank you, ƒg


Sorry for not linking the docs directly.

https://lilypond.org/doc/v2.25/Documentation/notation/modal-transformations


On Wed, Jan 10, 2024 at 5:20 PM Aaron Hill via LilyPond user discussion 
<

lilypond-user@gnu.org> wrote:


On 2024-01-10 1:26 pm, Butter Cream wrote:
> Hi, I have a piece of music written in the key of G major and I want
> the pitches to transpose to e minor. How do I do this.
>
> When I use the command \transpose g e it changes to E major (all g
> notes are sharped)

I think you'll need to use \modalTranspose to achieve what you want.



-- Aaron Hill



Re: Transpose from major to minor key

2024-01-10 Thread Aaron Hill via LilyPond user discussion

On 2024-01-10 1:26 pm, Butter Cream wrote:
Hi, I have a piece of music written in the key of G major and I want 
the pitches to transpose to e minor. How do I do this.


When I use the command \transpose g e it changes to E major (all g 
notes are sharped)


I think you'll need to use \modalTranspose to achieve what you want.


-- Aaron Hill



Re: Question about \include options

2024-01-08 Thread Aaron Hill via LilyPond user discussion

On 2024-01-07 11:14 pm, John Helly wrote:

Aloha.

In reading the documentation about \include 
(https://lilypond.org/doc/v2.24/Documentation/notation/including-lilypond-files), 
I find the following sentence but can't find any explanation anywhere 
about what *#f and #t *are or do.  Can anyone enlighten me, please?  
They seem to have something to do with the file system but...?


#t and #f are just the Scheme ways of indicating the Boolean values of 
true and false, respectively.  So, for a setting like relative-includes, 
#t would enable the feature; #f would disable it.



'... Complex file structures, that require to|\include|/both/files 
relative to the main directory and files relative to some other 
directory, may even be devised by 
setting|relative-includes|to*|#f|or|#t|***at appropriate places in the 
files. ...'


This part of the documentation is simply indicating that the 
relative-includes setting can be freely changed during input processing 
as needed.  So when you go to \include something, it is the current 
setting that will affect where LilyPond will search for the file in 
question.



-- Aaron Hill



LilyPond 2.25.12

2024-01-07 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.12. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


Re: Manually control note spacing?

2024-01-05 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Robert,


I'm trying to make an example showing mordent symbols with text
labels. I want the note positions spaced so that the text is all on
one line, with notes placed as needed to fit around it.

The easiest way I can think of doing that would be to put manually
sized 'gap fillers' between the notes which is something I often do in
LaTeX, but I can't find any way of doing that in lilypond - it only
seems possible to change spacing globally?

\version "2.18.2"

\header {tagline = ""}
{
 \numericTimeSignature
 \time 4/4
 a'4\mordent^"Mordent"
 a'4\upmordent^"Upper Mordent"
a'4\downmordent^"Lower Mordent"
}


There's a dedicated feature for this: just issue \textLengthOn.

Since this doesn't guarantee equal Y position of the text scripts, I 
usually handle situations like these by putting my text elements in a 
Lyrics context, which has all the right features.


\version "2.18.2"

\layout {
  %%% uncomment for better spacing:
  % \override LyricText.extra-spacing-width = #'(-1 . 1)
}

<<
  \new Lyrics \lyricmode {
    "Mordent"4
    "Upper Mordent"
    "Lower Mordent"
  }
  \new Staff {
    \numericTimeSignature
    \time 4/4
    a'4\mordent
    a'4\upmordent
    a'4\downmordent
  }
>>

And: If you have any chance, I'd encourage you to update LilyPond to a 
more current version. LilyPond has experienced huge improvements since 
2.18.2 (which admittedly was the official stable version for quite some 
time).


Lukas




Re: build a specific stable lillypond version with git

2024-01-05 Thread Jonas Hahnfeld via LilyPond user discussion
On Thu, 2024-01-04 at 22:33 +0100, David Kastrup wrote:
> CX  writes:
> 
> > Is it possible to build a specific stable lillypond version with sources
> > retrieved by git clone instead of a source tarball download?
> > If it is possible how can you do this (because I can not find the
> > documentation to do it)?
> 
> The README in the repository references
> 
> 
> Have you checked it?
> 
> In particular, setting it up from a clone appears to be described in
> 

To add to this, the source tarballs each correspond to a specific
commit in the repository. The exact hash is documented in the RELEASE-
COMMIT file in the tarball, and also published as a git tag in the
repository. Since around two years the tags follow the naming scheme
v2.x.y, for example v2.24.3 for the latest stable release. Before that
the format was release/2.x.y-1, ie release/2.22.2-1 for the last
release of the 2.22 series. In addition to that, there are the
stable/2.x *branches*, which at least at the time of writing correspond
to the latest release from the respective series. But keep in mind they
may be ahead with additional fixes while a release is prepared.

Hope this helps,
Jonas


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


Re: remove extra line in outside staff notes

2023-12-29 Thread Aaron Hill via LilyPond user discussion

On 2023-12-29 7:01 am, Cordelia wrote:

Hello,

is it possible to remove the outside staff lines notes in a "\override 
StaffSymbol.line-count =  #1"?

Thank you,
Cordelia


Are you referring to ledger lines?


\layout {
  \context {
\Staff
\override StaffSymbol.line-count =  #1

\remove "Ledger_line_engraver"
% or %
\omit LedgerLineSpanner

  }
}



-- Aaron Hill



Re: Aligning offset quintuplets and triplets

2023-12-27 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Knute, hi Mark,

here's an example of what I mean. The "cheating" system should create 
what the original engraving suggests, even if it's wrong mathematically. 
I didn't check the difference in MIDI; of course the "conductor" part 
(consisting of eigths throughout) shows a significant difference.


Of course I took advantage of the fact that the original engraving stops 
bothering with tuplet brackets/numbers starting from the second bar; it 
should be possible to get them back, but this will involve some further 
tweaking in the "cheating" version.


Lukas

Am 27.12.23 um 09:17 schrieb Lukas-Fabian Moser:


Hi Mark,

Am 27.12.23 um 01:54 schrieb Mark Stephen Mrotek:


Knute,

In the original the first beat of the second measure is three against 
2. The 5 against 3 does not start until the second beat.


Unfortunately, that can't be true, as with this interpretation, the 
measure is over-full. Rather, the groups of quintuplets/triplets 
continue, with a beaming not in sync with the measure's beat structure.


This also implies that the original engraving isn't mathematically 
correct (as the beginnings of the bems groups look as if they're 
aligned). Situations like that are hard to approximate with LilyPond, 
as Lily has a strict binary notion of two notes being simultaneous or 
not. One can try cheating a bit by engraving the measure according to 
its visual apperance (3-vs-2 in the first beat, exact 4-vs-1 in the 
last quaver of the measure), but then it will be necessary to compress 
whatever will be in the measure to the duration of one whole note, and 
it's not certain what LilyPond's spacing algorithm will make of it.


Sorry for describing the situation verbally; I'll try to cook up an 
example as soon as I have time (later today).


Lukas
\version "2.24.3"

\paper {
  #(set-paper-size "a4landscape")
}

%{
% a useful function:
showLength =
#(define-music-function (mus) (ly:music?)
   (pretty-print (ly:music-length mus))
   mus)

% of course, one can also write a function calculating
% the correct value for scaleDurations automatically
%}

rightHand = \relative {
  r2 \tuplet 5/4 4 {
r8. e'16[ e  e e e] e[ e |
\repeat unfold 2 {
  e e e] e[ e  e e e] e[ e  e e e] e[ e  e e e] e32[ e e e |
}
  }
  e]
}

leftHand = \relative {
  \clef bass
  r2 \tuplet 3/2 4 {
r8 r c'[  c c] c[ |
\repeat unfold 2 {
  c c] c[  c c] c[  c c] c[  c c] c[ |
}
  }
  c]
}

rightHandCheat = \relative {
  r2 \tuplet 5/4 4 { r8. e'16[ e  e e e] e[ e | }
  \repeat unfold 2
  {
\scaleDurations 8/9
{
  e16*4/3 e e] e16*4/5[ e  e e e] e[ e  e e e] e[ e e e e] e32[ e e e
  |
}
  }
  e]


}

leftHandCheat = \relative {
  \clef bass
  r2 \tuplet 3/2 4 { r8 r c'[  c c] c[ | }
  \repeat unfold 2 {
\scaleDurations 8/9
{
  c8 c] c8*2/3[ c c] c[  c c] c[  c c] c8[ |
}
  }
  c]
}

<<
  \new PianoStaff \with { instrumentName = "honest" }
  <<
\new Staff \rightHand
\new Staff \leftHand
  >>
  \new RhythmicStaff \with {
instrumentName = "conductor"
\omit Stem
\omit Beam
  }
  {
s1
\repeat unfold 16 { 8 }
  }
  \new PianoStaff \with { instrumentName = "cheating" }
  <<
\new Staff \rightHandCheat
\new Staff \leftHandCheat
  >>
>>

\new PianoStaff \with {
  instrumentName = \markup\center-column{cheating only "(spacing check)" }
}
<<
  \new Staff \rightHandCheat
  \new Staff \leftHandCheat
>>


Re: Aligning offset quintuplets and triplets

2023-12-27 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Mark,

Am 27.12.23 um 01:54 schrieb Mark Stephen Mrotek:


Knute,

In the original the first beat of the second measure is three against 
2. The 5 against 3 does not start until the second beat.


Unfortunately, that can't be true, as with this interpretation, the 
measure is over-full. Rather, the groups of quintuplets/triplets 
continue, with a beaming not in sync with the measure's beat structure.


This also implies that the original engraving isn't mathematically 
correct (as the beginnings of the bems groups look as if they're 
aligned). Situations like that are hard to approximate with LilyPond, as 
Lily has a strict binary notion of two notes being simultaneous or not. 
One can try cheating a bit by engraving the measure according to its 
visual apperance (3-vs-2 in the first beat, exact 4-vs-1 in the last 
quaver of the measure), but then it will be necessary to compress 
whatever will be in the measure to the duration of one whole note, and 
it's not certain what LilyPond's spacing algorithm will make of it.


Sorry for describing the situation verbally; I'll try to cook up an 
example as soon as I have time (later today).


Lukas


Re: Help with music function

2023-12-18 Thread William Rehwinkel via LilyPond user discussion

Dear Mark,

I did this in a slightly different way...if you do

\displayMusic c4\rest

you can see how to represent a rest using the make-music procedure in 
scheme code. Modifying that a bit, I got


% 
\version "2.25.6"

%\displayMusic c4\rest =
%(make-music
  %'RestEvent
  %'duration
  %(ly:make-duration 2)
  %'pitch
  %(ly:make-pitch -1 0))

restt = #(define-music-function (pit dur) (ly:pitch? ly:duration?)
(make-music
'RestEvent
'duration
dur
'pitch
pit)
)

\relative c' {
  \restt c 4
  \restt e 4
  \restt g 4
  \restt c 4
  \restt b 2
  \restt a 2
  \restt g 2.
  \restt g 4
}
% 

-William


On 12/18/23 00:33, Mark Probert wrote:

Hi.

I'm struggling some with writing a music function for rests.  Basically 
I want to be able to write something like


  \rel-rest( b', 1)

which would place a dotted quarter rest on the indicated pitch (the 
equivalent of


   b'1\rest

I'm starting with

rel-rest =
#(define-music-function (pit dur) (ly:pitch? ly:duration?)
   #{
     #pit#dur\rest
   #})

but that gives me an error.

Any suggestions?

--

--
-mark.


--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Help with music function

2023-12-18 Thread Aaron Hill via LilyPond user discussion

On 2023-12-17 9:33 pm, Mark Probert wrote:

Hi.

I'm struggling some with writing a music function for rests.  Basically 
I

want to be able to write something like

 \rel-rest( b', 1)


Minor nit: Functions in LilyPond do not use parentheses and commas for 
arguments in this way.  You need only say something like the following 
to invoke your function:



 \rel-rest b' 1



which would place a dotted quarter rest on the indicated pitch (the
equivalent of

  b'1\rest

I'm starting with

rel-rest =
#(define-music-function (pit dur) (ly:pitch? ly:duration?)
  #{
#pit#dur\rest
  #})

but that gives me an error.

Any suggestions?


There are a few things the errors in the output log should be 
communicating.



Unbound variable: #{pit\#dur\\rest}#


Firstly, whitespace is important in Scheme.  Jamming together 
#pit#dur\rest gives the parser little hope to understand what you mean.  
It thinks this refers to a singular named thing, which in this context 
does not exist.


So, give each part of that expression some room to breathe:


 #pit #dur \rest


But then LilyPond is not satisfied that this represents a valid music 
expression.  When using variables, often the number sign (#) is correct, 
however there are some spots when you need to use the dollar sign ($) 
instead.



 $pit $dur \rest


Lastly, I am not sure why using the duration "1" as you indicated would 
result in a dotted quarter rest.  Did you mean "4." or is the point of 
the music function to manipulate the inputs in some way?  I am not sure 
I see the connection/logic there, so you are going to be a bit on your 
own there.


But with the modification indicated above, you can now do this:


{ \rel-rest b' 4. }

%% ...or even...

{ \rel-rest b'4. }


However, this feels like more typing than just using the \rest 
post-event, apart from being prefixed.



-- Aaron Hill



Re: Can't call some functions from translation-functions

2023-12-16 Thread Aaron Hill via LilyPond user discussion

On 2023-12-16 5:27 am, Aaron Hill wrote:

On 2023-12-16 5:20 am, Sebastian Käppler wrote:

Hello Aaron,

thanks for your response. I tried use-modules and got "

no code for module (scm display-lily)".

If that is of interest, I use Frescobaldi on Windows with lilypond 
2.24.1.


Oh, whoops.  I'm still back on 2.22.0, myself.

I think it's (use-modules (lily display-lily)) now.


Sigh, and adding the mailing list back to the thread for visibility.  
Sorry about that.



-- Aaron Hill



Re: Can't call some functions from translation-functions

2023-12-16 Thread Aaron Hill via LilyPond user discussion

On 2023-12-16 4:48 am, Sebastian Käppler wrote:

Hello,

I'm trying to use some of the functions in translation-functions.scm to
create my own note name markup. However, if I use 
note-name->lily-string or
octave->lily-string, I get an "unbound variable" error for that 
function. I
even tried to copy the whole note-name-markup code from the source to 
my
code and rename it to note-name-custom-markup. But if I use this in 
\set

noteNameFunction, I get that same error.
Sorry if this is a dumb question, but I'm still trying to familiarize
myself with most concepts of scheme...


Odd.  A function like note-name->lily-string is exported from 
define-music-display-methods.scm.


Have you tried adding an explicit...

  (use-modules (scm display-lily))

...in your source file?


-- Aaron Hill



LilyPond 2.25.11

2023-12-10 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.11. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.3, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing

Starting with this release, the binaries are built with Guile 3.0.
Please report back if there are any problems caused by this. At a later
point, we will switch to requiring Guile 3.0 and eventually drop
support for Guile 2.2.


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


Re: Lilypond on Linux/Fedora 39 error after system update.

2023-12-10 Thread Jonas Hahnfeld via LilyPond user discussion
On Sun, 2023-12-10 at 14:09 +1100, Laurie Savage wrote:
> Hi,
> 
> I was editing a lead sheet for my combo and it compiled fine. I
> closed Frescobaldi, accepted Fedora's nags to update and went to
> bed. I opened Frescobaldi this morning and get this error message
> on any file I try to compile.
> 
> /usr/share/lilypond/2.25.4/ly/init.ly:64:2: error: Guile signaled an error 
> for the expression beginning here
> 
> #
> 
>  (let ((book-handler (if (defined? 'default-toplevel-book-handler)
> 
> Throw to key `ly-file-failed' with args `()'.
> 
> I have the correct version of Lilypond set in my source files with
> convert-ly. Any file I try to compile worked fine before the system
> update. The system update was very comprehensive and I have no idea
> what might have broken. I tried a re-installation of Lily but that
> didn't work.
> 
> Fedora 39, last updated 10/12/2023.

This is a known incompatibility with Ghostscript 10.02.1 that Fedora
updated to. Please file a bug with their LilyPond packaging to update
to a version with the fix. While you are at it, you might as well
remind them that odd numbers are "unstable" versions, and they should
consider only the even "stable" versions...

In the mean time, you can download the official binaries from
https://lilypond.org/download.html which come with their own version of
Ghostscript and do not have this problem.

Jonas


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


Re: Lilypond 2.24.3 / iMac Sonoma / GS -dNODISPLAY fatal error

2023-11-27 Thread Jonas Hahnfeld via LilyPond user discussion
On Tue, 2023-11-28 at 01:33 -0500, Eric wrote:
> Installed 2.24.3 -docs using Macports, used convert-ly on a couple of
> files I'd last worked on in June, and received the following (see
> attached text file) after trying lilypond on one of those files and
> adding the -V flag. I know that several solutions have been proposed,
> including on this list back in June, e.g., but I can't figure out how
> to apply them in my own case, sorry...

Hi,

your log file says that you are actually running LilyPond 2.24.2, which
is incompatible with Ghostscript 10.02.1. Please update to the very
latest version 2.24.3 that contains a fix, either via MacPorts or by
downloading our official binaries.

Cheers
Jonas


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


Re: What's causing this extra bar line and empty bar?

2023-11-19 Thread William Rehwinkel via LilyPond user discussion

Dear Robert,

in the future, please take care that the minimal working example does 
not contain any undefined symbols that cause errors. Here, simply adding 
"strike = \fermata" at the beginning of the file alleviated all these 
errors, however.


After using convert-ly and rendering (using version 2.25.7) this extra 
barline doesn't appear. Can you try updating to the most recent version 
of lilypond (.24 or .25), and see if that helps?


Thanks,
-William

On 11/19/23 19:00, Robert Hickman wrote:

Hi people. I'm trying to reproduce the formatting from a tune that
started out in ABC notation, which is formatted with line breaks
around phrases instead of bars. It is working as intended, except for
an empty bar that's showing up after the first repeat sign, and I have
no idea what's causing it. Also there's extra space being added before
the other line breaks as well:

https://pureocarinas.com/res/lilypond/aikendrumnotation_0c01fcb19c471b86d2ab94badb4b7de55b3660f2.png

The following is how it should be formatted (generated by ABCM2PS).

https://pureocarinas.com/res/abc_converter/aikendrumnotation_0c01fcb19c471b86d2ab94badb4b7de55b3660f2.png

And here's the code, without the definition of the \strike articulation symbol.

\version "2.18.2"

\header {tagline = ""}
{
 \numericTimeSignature
 \time 4/4
 \key f \major
 \repeat volta 2 {
 \partial 4 f'8g'8 | a'4(  a'4 \strike) bes'8(a'8 g'8\strike f'8) |
d'2 f'4. d'8 \strike | c'4 c'4( d'4f'4) | a'4( g'4 g'4 \strike)
\allowBreak \break
 \partial 4 f'8g'8 | a'4(a'4 \strike) bes'8(a'8g'8 \strike f'8) |
d'2 f'4.( d'8 \strike) | c'4c'4d'(e'4) | f'2. \allowBreak \break }
 \repeat volta 2 {
 \partial 4 f'8g'8 | a'4( a'4\strike a'4\strike) g'8f'8 | bes'2
d''4.( bes'8\strike) | a'4c''4( a'4\strike) f'4 | a'4g'4( g'4\strike)
\allowBreak \break
 \partial 4 f'8g'8 | a'4(a'4\strike) bes'8( a'8 g'8\strike  f'8) |
d'2 f'4.(d'8\strike) | c'4(c'4\strike) d'4 e'4 | f'4. }
}



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.24.3 released!

2023-11-19 Thread Jonas Hahnfeld via LilyPond user discussion
We are proud to announce the release of GNU LilyPond 2.24.3. LilyPond
is a music engraving program devoted to producing the highest-quality
sheet music possible. It brings the aesthetics of traditionally
engraved music to computer printouts.

This version contains a number of fixes since the release of the
previous stable version in August 2023. We recommend all users to
update. Scores converted to or written for 2.24.0 will continue to work
with this release.
A list of added features and other user-visible changes for 2.24 can be
found at https://lilypond.org/doc/v2.24/Documentation/changes/. Among
others, version 2.24.0 switched to Guile 2.2 and features a completely
rewritten infrastructure for creating the official packages, finally
allowing us to offer 64-bit binaries for macOS and Windows. These pre-
built binaries are linked from https://lilypond.org/download.html and
available from GitLab:
https://gitlab.com/lilypond/lilypond/-/releases/v2.24.3

For distributions, LilyPond 2.24.3 most notably includes a fix to
restore PDF conversion with the recent Ghostscript 10.02.1. Also Guile
3.0 is now officially supported, even though the recommended version
will remain Guile 2.2 for the LilyPond 2.24 series.


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


Re: LilyPond 2.25.10 with Guile 3.0

2023-11-16 Thread Jonas Hahnfeld via LilyPond user discussion
On Thu, 2023-11-16 at 11:11 -0600, Karlin High wrote:
> On Sun, Nov 12, 2023 at 6:26 AM Jonas Hahnfeld via LilyPond user
> discussion  wrote:
> > If you have some time, please test them in your setups and report back in 
> > case of problems!
> 
> Seems OK so far. Windows 11 21H2, Intel Core i5-1135G7.
> 
> "
> > lilypond.exe scheme-sandbox
> GNU LilyPond 2.25.10 (running Guile 3.0)
> Processing 
> `C:/Users/owner/AppData/Local/frescobaldi/frescobaldi/lilypond-binaries/lilypond-2.25.10/share/lilypond/2.25.10/ly/scheme-sandbox.ly'
> Parsing...
> GNU Guile 3.0.9
> "

Great, thanks for testing!

> When I run convert-ly, it makes version statements "2.25.9". I can't
> remember if that is expected or not for the 2.25.10 binaries. No
> warnings of outdated versions are given when compiling the results.

Yes, that's expected because there were no conversion rules for 2.25.10
and convert-ly doesn't force-update the version number (unless --
current-version is passed).

Jonas


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


Re: init.ly Error Making PDF

2023-11-14 Thread William Rehwinkel via LilyPond user discussion
yes, it is a known bug due to a ghostscript security patch. Try using 
the pre-built binary for lilypond instead of homebrew.


-William

On 11/15/23 01:13, Ernie Braganza wrote:
I just updated my Mac using Homebrew and I now get this error when I run 
lilypond. It compiles fine if I create a PostScript file using the --ps 
option.



My ghostscript was updated to version 10.02.1 Is there a known bug? I 
get this when I run lilypond with the -V switch:


GPL Ghostscript 10.02.1: Unrecoverable error, exit code 1


I checked permissions and those are correct for ghostscript


Here's the error message I get:

-

Drawing systems...
Converting to `basic.pdf'...
warning: `(gs -q -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH 
-dAutoRotatePages=/None -dPrinted=false 
/var/folders/lc/_0_zmjsx06l7gd97v8qpxz14gp/T//lilypond-tmp-3593263)' 
failed (256)


/usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/ly/init.ly:65:2: 
error: Guile signaled an error for the expression beginning here

#
  (let ((book-handler (if (defined? 'default-toplevel-book-handler)
Throw to key `ly-file-failed' with args `()'.
Exited with return code 1.

-

I am using LilyPond 2.24.2 (running Guile 3.0) on macOS Monterey 
(ver.12.6.8)


I installed lilypond using Homebrew (4.1.20)



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Fermata Markup below Staff

2023-11-12 Thread William Rehwinkel via LilyPond user discussion

I see, thanks for the update.

I found a solution to this problem here: 
https://www.reddit.com/r/lilypond/comments/vozo9z/comment/ieibg4j/ does 
this do what you were hoping for?


-William

Pasted below in-case this link goes away...

\version "2.25.7"

\score {
\new PianoStaff
<<
\new Staff = "upper"
\relative c' {
c1
c
}

\new Staff = "lower" \with { \consists "Mark_engraver" }
\relative c' {
\override Staff.RehearsalMark.direction = #DOWN
\override Staff.RehearsalMark.rotation = #'(180 0 0)
c1
\mark \markup { \smaller \smaller \musicglyph 
#"scripts.ufermata" }

c
}
>>
}


On 11/12/23 11:20, Johannes Roeßler wrote:

Am 12.11.2023 um 17:10 schrieb William Rehwinkel:

\relative c' {
e1 \break \once \override Score.RehearsalMark.break-visibility = 
#end-of-line-visible \tweak direction #DOWN \mark \markup { 
\musicglyph #"scripts.dfermata" } \bar "||" e2
} 


thx William for the quick response, always an amazing group...

works for one fermata - but in my context (up in soprano, down in bass) 
it gives a warning "conflict with event: `ad-hoc-mark-event'" and only 
produces the first one:


\version "2.24.0"

\score {
   \new StaffGroup <<
  \new Staff {
    e1 \break \once \override Score.RehearsalMark.break-visibility = 
#end-of-line-visible \mark \markup { \musicglyph #"scripts.ufermata" } 
\bar "||" e2

  }
  \new Staff {
     e1 \break \once \override Score.RehearsalMark.break-visibility 
= #end-of-line-visible \tweak direction #DOWN \mark \markup { 
\musicglyph #"scripts.dfermata" }

     \bar "||" e2
  }
   >>
   \layout {

   }
}



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Fermata Markup below Staff

2023-11-12 Thread William Rehwinkel via LilyPond user discussion

Dear Johannes,

If you change "ufermata" to "dfermata" and insert "\tweak direction 
#DOWN" before "\mark" that should get you what you want.


Thanks,
-William

\version "2.24.0"
\relative c' {
e1 \break \once \override Score.RehearsalMark.break-visibility = 
#end-of-line-visible \tweak direction #DOWN \mark \markup { \musicglyph 
#"scripts.dfermata" } \bar "||" e2

}


On 11/12/23 11:00, Johannes Roeßler wrote:

Hi all,

I managed to place a fermata above a barline, I even managed to place it 
correctly at the end of the line, but now I would like to place a 
fermata sign below the barline (and rotate it 180°) too (in the 
bassvoice of a choir staff group) - simplified example:


\version "2.24.0"
\relative c' {
e1 \break \once \override Score.RehearsalMark.break-visibility = 
#end-of-line-visible \mark \markup { \musicglyph #"scripts.ufermata" } 
\bar "||" e2

}

What do I need to do?

Best Johannes




--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.25.10 with Guile 3.0

2023-11-12 Thread Jonas Hahnfeld via LilyPond user discussion
On Sat, 2023-11-11 at 19:37 +0100, Jonas Hahnfeld wrote:
> We are happy to announce the release of LilyPond 2.25.10.

And here are the binaries with Guile 3.0, built using
https://gitlab.com/lilypond/lilypond/-/merge_requests/2163 and
https://gitlab.com/lilypond/lilypond/-/merge_requests/2170 :
https://gitlab.com/lilypond/lilypond/-/packages/20197593

If you have some time, please test them in your setups and report back
in case of problems!

Jonas


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


LilyPond 2.25.10

2023-11-11 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.10. This is
termed a development release, but these are usually reliable for
testing new features and recent bug fixes. However, if you require
stability, we recommend using version 2.24.2, the current stable
release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


Re: function to force accidentals on a subset of notes

2023-10-31 Thread Michael Winter via LilyPond user discussion
This is what happens for me too. I think it has something to do with all the 
other functions I am using. 

Oct 30, 2023, 21:25 by l...@gmx.de:

>
> Hi Michael,
>
> Am 30.10.23 um 10:42 schrieb Michael  Winter:
>
>> But  I am confused about what you said. For me, it is posting the  
>> accidental on tied notes after line breaks.
>>
>
> No I'm confused. :-) If I do
>
>
>
> \transpose a c' \relative
>  {
>    a8 gis~ gis g fis g gis a
>    gis1~ \break gis2 gis
>  }
>
>
>
> in my example file, I get:
>
>
>
>
>
> (To wit, no natural sign on the first b in measure 3).
>
>
> Is this different for you?
>
>
> Lukas
>
>



Re: function to force accidentals on a subset of notes

2023-10-30 Thread Michael Winter via LilyPond user discussion
Thanks!

This seems to work quite well : )

But I am confused about what you said. For me, it is posting the accidental on 
tied notes after line breaks.

Best,

Michael

Oct 28, 2023, 22:40 by l...@gmx.de:

> Hi Michael,
>
>> Thanks Lukas!
>>
>> This works but also forces the accidental on tied notes.
>>
>
> Sorry for not getting back to you sooner.
>
> The following version registers ties and removes our auto-generated 
> accidentals for notes in which a tie ends. (It's a bit overeager and also 
> removes tied accidentals after line breaks, so we get a behaviour as if 
> Accidental.hide-tied-accidental-after-break is set to ##t. Please give word 
> if you want me to change that.)
>
> Lukas
>
> \version "2.24.0"
>
> forced-accidentals-pitches =
> #(music-pitches #{ bes b #})
>
> #(define (diatonic-pitch-class= p q)
>    (and (= (ly:pitch-notename p) (ly:pitch-notename q))
>     (= (ly:pitch-alteration p) (ly:pitch-alteration q
>
> Force_accidentals_engraver =
> #(lambda (context)
>    (let
>     ((ties '())
>  (affected-note-events '()))
>    (make-engraver
>     (end-acknowledgers
>  ((tie-interface engraver grob source-engraver)
>   (set! ties (cons grob ties
>     ((stop-translation-timestep engraver)
>  (for-each
>   (lambda (tie)
>     (let* ((right-notehead (ly:spanner-bound tie RIGHT))
>    (right-notehead-cause (ly:grob-property right-notehead 
> 'cause)))
>   (if (member right-notehead-cause affected-note-events)
>   (ly:grob-suicide!
>    ;;; the accidental grob should be guaranteed to
>    ;;; exist since we forced it into existence...
>    (ly:grob-object
>     right-notehead 'accidental-grob)
>   ties)
>  (set! ties '())
>  (set! affected-note-events '()))
>     (listeners
>  ((note-event engraver event)
>   (when (member (ly:event-property event 'pitch)
>     forced-accidentals-pitches
>     diatonic-pitch-class=)
>     (ly:event-set-property! event 'force-accidental #t)
>     (set! affected-note-events
>   (cons event affected-note-events
>
> \layout {
>   \context {
>     \Voice
>     \consists #Force_accidentals_engraver
>   }
> }
>
> \transpose a c' \relative
> {
>   a8 gis~ gis g fis g gis a
>   gis1~ gis2 gis
> }
>



Re: function to force accidentals on a subset of notes

2023-10-22 Thread Michael Winter via LilyPond user discussion
Thanks Lukas!

This works but also forces the accidental on tied notes.

Best,

Michael

Oct 22, 2023, 10:19 by l...@gmx.de:

>
> Hi Michael,
>
>
> this is easily accomplished with an custom engraver. (I perfectly  
> understand that the terms "easily" and "custom engraver" don't  seem to 
> go well together at first - I thought so for many years as  well -, but 
> after some getting used to it, the concept is actually  quite simple and 
> elegant.)
>
>
>
> \version "2.24.0"
>  
>  forced-accidentals-pitches =
>  #(music-pitches #{ bes b #})
>  
>  #(define (diatonic-pitch-class= p q)
>     (and (= (ly:pitch-notename p) (ly:pitch-notename q))
>      (= (ly:pitch-alteration p) (ly:pitch-alteration q
>  
>  Force_accidentals_engraver =
>  #(lambda (context)
>     (make-engraver
>      (listeners
>   ((note-event engraver event)
>    (if (member (ly:event-property event 'pitch)
>    forced-accidentals-pitches
>    diatonic-pitch-class=)
>    (ly:event-set-property! event 'force-accidental #t))
>  
>  \layout {
>    \context {
>      \Voice
>      \consists #Force_accidentals_engraver
>    }
>  }
>  
>  \transpose a c' \relative
>  {
>    a8 gis g fis g gis a4
>  }
>
>
>
> Lukas
>
> Am 21.10.23 um 11:37 schrieb Michael  Winter via LilyPond user discussion:
>
>> Thanks Jean,
>>
>> I am not sure I completely follow.
>>
>> Lets say I have a music sequence:
>>
>> a b c d e f g a bes c d e f g ...
>>
>> How do I apply what you have written as a functionto only show the 
>> flats and naturals for b and bes. Again. I donot want to apply this 
>> to individual notes.
>>
>> Sorry if I am missing something.
>>
>> Best,
>>
>> Michael
>>
>>
>> Oct 21, 2023, 01:37 by >> j...@abou-samra.fr>> :
>>
>>>
>>> Try
>>>
>>> \displayMusic c'!
>>>
>>> This shows you that the >>> !>>>  syntax corresponds to  setting
>>>   the >>> force-accidental>>>  property to true. Thus, if  you 
>>> have  identified the note events you want to force accidentals  
>>> on, you can do
>>>
>>> (ly:music-set-property! the-note-event 'force-accidental #t)
>>>
>>> on each of them.
>>>
>>>
>>> Best,
>>>
>>>
>>> Jean
>>>
>>>
>>
>>



Re: function to force accidentals on a subset of notes

2023-10-21 Thread Michael Winter via LilyPond user discussion
Thanks Jean,

I am not sure I completely follow.

Lets say I have a music sequence:

a b c d e f g a bes c d e f g ...

How do I apply what you have written as a function to only show the flats and 
naturals for b and bes. Again. I do not want to apply this to individual notes.

Sorry if I am missing something.

Best,

Michael

Oct 21, 2023, 01:37 by j...@abou-samra.fr:

>
> Try
>
> \displayMusic c'!
>
> This shows you that the > !>  syntax corresponds to settingthe > 
> force-accidental>  property to true. Thus, if you haveidentified the note 
> events you want to force accidentalson, you can do
>
> (ly:music-set-property! the-note-event 'force-accidental #t)
>
> on each of them.
>
>
> Best,
>
>
> Jean
>
>



function to force accidentals on a subset of notes

2023-10-20 Thread Michael Winter via LilyPond user discussion
I have a piece that is in the following scale:

c d e fis g aes bes b

Is it possible to force the accidentals just for the bes and the b?

But here is the catch...
I am both transposing the part and respelling pitch-classes as show below. The 
scale above is actually the resulting printed set of notes. The music is 
already generated and I would not want to have to do this manually for each 
occurance.

Thanks in advance,

Michael


transposePitchClasses =
#(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?)
  (let* ((scaleA (ly:music-property scaleA 'elements))
 (scaleB (ly:music-property scaleB 'elements))
 (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA))
 (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB))
 (classesA (map (lambda (p) (cons (ly:pitch-notename p) 
(ly:pitch-alteration p))) scaleA)))
  (map-some-music
    (lambda (m)
  (let ((p (ly:music-property m 'pitch)))
    (if (not (null? p))
    (let* ((nn (ly:pitch-notename p))
   (oct (ly:pitch-octave p))
   (alt (ly:pitch-alteration p))
   (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) 
alt))) classesA)))
    (if pos
  (let* ((p2 (list-ref scaleA pos))
 (oct2 (ly:pitch-octave p2))
 (p3 (list-ref scaleB pos))
 (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- oct 
oct2) 0
  (ly:music-set-property! m 'pitch new-pitch)))
  m)
  #f)))
   music)
 music))
\new Staff \with {
  instrumentName = #"synth I (2)"
  shortInstrumentName = #"synI"
  \remove "Time_signature_engraver"
    }
    <<
  \transpose a c'
  \transposePitchClasses {a b cis dih e fih geh gis} {a b cis dis e f g gis}
  \include "includes/ammann_part_6.ly" %this is the music
    >>


compiling irrational time signatures with \scaleDurations

2023-10-18 Thread Adrian Kleinlosen via LilyPond user discussion
Hello to all,


for quite some time now I've been trying to solve a problem concerning the
output of LilyPond code - unfortunately in vain. Maybe someone can help me
here?


About the "back story": I have written two algorithms in Python. First one,
with which I generate time signatures and metronome markings. I use
"normal" as well as irrational time signatures (like 7/23 or 5/12) and
metronome markings with up to three decimal places. The second algorithm
then converts the lists of time signatures and metronome markings into
LilyPond code.


The values of the individual functions of the code (attched) are calculated
as follows:


\scaleDurations = (notated note value * 6) / (note value * (metronome
marking * 1000)). Notated note value is the note value that is notated for
irrational note values (for example, 12th notes are commonly notated as 8th
notes, etc.); note value is the actual note value (e.g., 12th notes); and
the metronome marking has up to three decimal places. For a 7/23 measure
with a metronome marking of eight note = 62.375, if 23rd notes are notated
as 16th notes, this gives (16*6) / (23*(62.375*1000)).


\time = \scaleDurations * time signature


Now the output of the code works fine - but always only up to a certain
point. After a certain measure the output simply stops. I'm not sure now if
the problem is with my code or with Frescobaldi after all. (I am using
LilyPond version 2.24.2 in Frescobaldi 3.3.0 on a macOS Ventura 13.4.1).


Attached now is the code for a total of 24 such bars (once as a LilyPond
file and once as a text file). (I know, minimal examples are better in
principle, but in this case it would not make sense, because the output
stops after a couple of bars). Frescobaldi outputs the code correctly up to
the first note of the 4th bar, nothing more. An error message is not
generated.


How is it with you? Does the output work correctly or does it also break
off somewhere? I have already asked the same question in the German
LilyPond forum. A LilyPond user pointed out to me that the code seems to
work only in version 2.20.0, but not in any other version.


Thanks a lot for any help!


Kind regards,

Adrian Kleinlosen
\version "2.24.2"

musicone = {

%%% MEASURE : 1 %%%
\scaleDurations 49/50 {
\time 98/400    
\set Staff.timeSignatureFraction = #'(2 . 8)
\set baseMoment = #(ly:make-moment 49/50)

\textMark \markup {\left-column {\line { \smaller \general-align #Y #DOWN \note 
{8} #1 " = 61.213 " } } }

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 2 { c'8*8/8 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 2 %%%
\scaleDurations 2/3 {
\time 18/141    
\set Staff.timeSignatureFraction = #'(9 . 47)
\set baseMoment = #(ly:make-moment 2/3)

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 9 { c'32*32/47 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 3 %%%
\scaleDurations 35/38 {
\time 70/304    
\set Staff.timeSignatureFraction = #'(2 . 8)
\set baseMoment = #(ly:make-moment 35/38)

\textMark \markup {\left-column {\line { \smaller \general-align #Y #DOWN \note 
{8} #1 " = 65.073 " } } }

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 2 { c'8*8/8 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 4 %%%
\scaleDurations 37/33 {
\time 296/1683    
\set Staff.timeSignatureFraction = #'(8 . 51)
\set baseMoment = #(ly:make-moment 37/33)

\textMark \markup {\left-column {\line { \smaller \general-align #Y #DOWN \note 
{8} #1 " = 67.176 " } } }

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 8 { c'64*64/51 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 5 %%%
\scaleDurations 25/42 {
\time 100/504    
\set Staff.timeSignatureFraction = #'(4 . 12)
\set baseMoment = #(ly:make-moment 25/42)

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 4 { c'8*8/12 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 6 %%%
\scaleDurations 15/13 {
\time 30/104    
\set Staff.timeSignatureFraction = #'(2 . 8)
\set baseMoment = #(ly:make-moment 15/13)

\textMark \markup {\left-column {\line { \smaller \general-align #Y #DOWN \note 
{8} #1 " = 52.0 " } } }

% The music will later be put here. For now, use the \repeat unfold expression
\repeat unfold 2 { c'8*8/8 }
|
}

\once \set Staff.whichBar = "|"

%%% MEASURE : 7 %%%
\scaleDurations 15/13 {
\time 30/104    
\set Staff.timeSignatureFraction = #'(2 . 8)
\set baseMoment = #(ly:make-moment 1

Re: Where is my tuplet bracket?

2023-10-16 Thread William Rehwinkel via LilyPond user discussion
I don't know, but what I meant to say is that this use of \tuplet 
outside of \voices or a split into multiple voices seems to me to be 
"undefined behavior" ("unspecified"?).


-William

On 10/16/23 19:09, David Kastrup wrote:

William Rehwinkel  writes:


Dear David,

This seems like an improper/unintended use of \tuplet.


How so?

How is

   \tuplet 3/2 \voices "",2 << { \voiceOne d''4 c'' es'' \oneVoice } \\
  { g'4 as'2 } >>

improper while

   \tuplet 3/2  << { \voiceOne d''4 c'' es'' \oneVoice }
\new Voice { \voiceTwo g'4 as'2 } >>

isn't?  Either one does not create a new voice context for the upper
line, as the tie reaching into the upper voice (here omitted) proves.



--
William Rehwinkel - Oberlin College and Conservatory '24

will...@williamrehwinkel.net

PGP key: https://ftp.williamrehwinkel.net/pubkey.txt


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Where is my tuplet bracket?

2023-10-16 Thread William Rehwinkel via LilyPond user discussion

Dear David,

This seems like an improper/unintended use of \tuplet. I would have used 
\scaleDurations instead.


However, if you slightly modify the mwe as shown below, the tuplet 
bracket is shown.


Thanks,
-William

\version "2.25.7"

\new Staff {
  \key c \minor
  < es' g' > < bes' d''~ >2. |
  \tuplet 3/2  << { \voiceOne d''4 c'' es'' \oneVoice }
  \new Voice { \voiceTwo g'4 as'2 } >>
  < f' as' >4  |
}


On 10/16/23 17:50, David Kastrup wrote:


Admittedly, this is still better than the warning and crash an earlier
version rather than current master puts out.

But now there is neither warning nor crash.



--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net |
| PGP key:|
| https://ftp.williamrehwinkel.net/pubkey.txt |
+ --- +


OpenPGP_signature.asc
Description: OpenPGP digital signature


LilyPond 2.25.9

2023-10-07 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.9. This is termed
a development release, but these are usually reliable for testing new
features and recent bug fixes. However, if you require stability, we
recommend using version 2.24.2, the current stable release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing

With this release, LilyPond's HTML documentation switches (back) to
texi2any. While we tried to make sure that existing links will continue
to work, please report back if that is not the case. Also please let us
know if, after clearing your browser's cache, something looks
significantly worse than before (compared to the documentation for
v2.24, for example).


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


\mergeDifferentlyHeadedOn made strange behavior in chord, or it's a bug?

2023-09-24 Thread cc0_knight--- via LilyPond user discussion

Hi everyone!

as the code mentioned below, when i try to engraving, the root note of the 
chord are not same as upper note. how to solve this problem?

the aim:

problem:


code:
\relative c'' {
  \mergeDifferentlyHeadedOn
  \time 4/8
  <<
    {2}
    \\
    {8 [g'8]}
  >>
}
best regards!

how to redefine the brew-chord-slur?

2023-09-23 Thread cc0_knight--- via LilyPond user discussion
as the code mentioned, when I engraving, slur arpeggio are collision with 
measure line, how to avoid this by redefine slur?

```
\new PianoStaff <<
  \set PianoStaff.connectArpeggios = ##t
  \override PianoStaff.Arpeggio.stencil =
    #ly:arpeggio::brew-chord-slur
  \new Staff {
    \relative c' {
  r16 a a a r16 a a a r16 a a a r16 a a a
  b4 \arpeggio b b b
    }
  }
  \new Staff {
    \relative c' {
  \clef bass
  a4 a a a
  <<
    { a2.\arpeggio a4 } \\
    { 2. }
  >>
    }
  }
>>
```


Re: Beam issue

2023-09-23 Thread William Rehwinkel via LilyPond user discussion
See 
https://lilypond.org/doc/v2.25/Documentation/notation/setting-automatic-beam-behavior


In engraving from the Romantic and Classical periods, beams often begin 
midway through the measure in 3/4 time, but modern practice is to avoid 
the false impression of 6/8 time (see Gould, p. 153). Similar situations 
arise in 3/8 time. This behavior is controlled by the context property 
beamHalfMeasure, which has effect only in time signatures with 3 in the 
numerator:


\relative a' {
  \time 3/4
  r4. a8 a a |
  \set Timing.beamHalfMeasure = ##f
  r4. a8 a a |
}

Thanks,
-William

On 9/23/23 14:32, Rajesh Baskar wrote:

Hi,

In a normal musical notation when you have a time signature of 3/4 and 
have a dotted note, eighth note, eighth note and an eighth note - that 
the first eighth note should have "no beam". This is how other software 
like MuseScore and Finale works. Why does Lilypond do this? I know there 
is a \noBeam markup but in my case this is be difficult to use as I'm 
dynamically generating the notation.


Any advise will be helpful. See the attached image for illustration.

Thanks,
Raj

\version "2.22.2" \language english \header { tagline = ##f }
\score {\new Staff
     {\set Staff.midiInstrument = #"acoustic grand" \key c \major 
\time 3/4 \clef bass e,4. d,8 c, e, \bar "||"} \layout { \context { 
\Score proportionalNotationDuration = #(ly:make-moment 1/2) } } \midi { 
\tempo 1 = 72}}





--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net |
| PGP key:|
| https://ftp.williamrehwinkel.net/pubkey.txt |
+ --- +


OpenPGP_signature
Description: OpenPGP digital signature


Re: How to make the width of the beamlets cover their corresponding noteheads?

2023-09-18 Thread yuanyelele--- via LilyPond user discussion
Because I want to fix a bug in the following script for numbered musical 
notation (jianpu). In this notation, each underline halves the note value, and 
here the underlines are rendered as beams of standard staff notation (which I 
think is a clever and appropriate way).

https://en.wikipedia.org/wiki/Numbered_musical_notation
https://github.com/nybbs2003/lilypond-Jianpu/blob/master/jianpu10a.ly


-- 
 Sent with Tutanota, enjoy secure & ad-free emails. 



Sep 18, 2023, 20:21 by m.tarensk...@kpnmail.nl:

> I don't know how. 
> But I first would like to know why beamlets?
>
> MT
>
> Verzonden vanaf mijn Huawei mobiele telefoon
>
>
>  Oorspronkelijk bericht 
> Onderwerp: How to make the width of the beamlets cover their corresponding 
> noteheads?
> Van: yuanyelele--- via LilyPond user discussion 
> Aan: lilypond-user@gnu.org
> Cc:
>
>
>
>> Greetings everyone,
>>
>> I'd like to implement a very straightforward beaming logic, where the width 
>> of each beam covers its corresponding notehead. I can achieve this using 
>> \set stemLeftBeamCount and \set stemRightBeamCount, but is there a smarter 
>> and more automatic way to do this?
>>
>> I don't care about the stem's own relative position to the notehead (left, 
>> right, or center); I just want the beamlet's boundary to align with the 
>> notehead. Additionally, you can see in the image that the rightward beamlet 
>> is slightly shorter than the notehead. It would be even better if they could 
>> be exactly the same length.
>>
>> \version "2.24.0"
>> \relative g' {
>>   c8 \set stemRightBeamCount = #1 c8
>>   c16 c16 c16 \set stemRightBeamCount = #2 c16
>>   c8 c16 \set stemRightBeamCount = #2 c16
>>   c16 \set stemRightBeamCount = #2 c16 \set stemRightBeamCount = #1 c8
>>   c8. \set stemLeftBeamCount = #1 \set stemRightBeamCount = #2 c16
>>   c16 \set stemRightBeamCount = #1 c8.
>>   c8 c32 \set stemRightBeamCount = #3 c32 \set stemRightBeamCount = #2 c16
>>   c32 \set stemRightBeamCount = #3 c32 c8 \set stemLeftBeamCount = #1 \set 
>> stemRightBeamCount = #2 c16
>> }
>>
>> Thank you~
>>
>> --
>> Sent with Tutanota, enjoy secure & ad-free emails.
>>



How to make the width of the beamlets cover their corresponding noteheads?

2023-09-18 Thread yuanyelele--- via LilyPond user discussion
Greetings everyone,

I'd like to implement a very straightforward beaming logic, where the width of 
each beam covers its corresponding notehead. I can achieve this using \set 
stemLeftBeamCount and \set stemRightBeamCount, but is there a smarter and more 
automatic way to do this?

I don't care about the stem's own relative position to the notehead (left, 
right, or center); I just want the beamlet's boundary to align with the 
notehead. Additionally, you can see in the image that the rightward beamlet is 
slightly shorter than the notehead. It would be even better if they could be 
exactly the same length.

\version "2.24.0"
\relative g' {
  c8 \set stemRightBeamCount = #1 c8
  c16 c16 c16 \set stemRightBeamCount = #2 c16
  c8 c16 \set stemRightBeamCount = #2 c16
  c16 \set stemRightBeamCount = #2 c16 \set stemRightBeamCount = #1 c8
  c8. \set stemLeftBeamCount = #1 \set stemRightBeamCount = #2 c16
  c16 \set stemRightBeamCount = #1 c8.
  c8 c32 \set stemRightBeamCount = #3 c32 \set stemRightBeamCount = #2 c16
  c32 \set stemRightBeamCount = #3 c32 c8 \set stemLeftBeamCount = #1 \set 
stemRightBeamCount = #2 c16
}

Thank you~

-- 
 Sent with Tutanota, enjoy secure & ad-free emails.


LilyPond 2.25.8

2023-09-16 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.8. This is termed
a development release, but these are usually reliable for testing new
features and recent bug fixes. However, if you require stability, we
recommend using version 2.24.2, the current stable release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


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


rest note disappear on last 3 measure.

2023-09-14 Thread cc0_knight--- via LilyPond user discussion
Hi Everyone.When I re-digitalize czerny's op.755 no.1,
the 8th rest note on the last 3 measure are disappeared.
code are too large, i've been put it on privatebin. [on code column 301-303]
Is this an lilypond bug or syntax error?

PS: have been tested on ver 2.25.7, same as 2.24.0.

https://bin.bloatcat.tk/?3edcc8f61aef5e21#8f8xMNU8icQgqRHbtbupkMUTP9UFDLpN772FVR1HDRYS

Re: tagline = ##f does not work in score header block

2023-09-12 Thread William Rehwinkel via LilyPond user discussion

Dear Knute,

Searching `lilypond "tagline"` on google I found 
https://lilypond.org/doc/v2.23/Documentation/notation/creating-titles-headers-and-footers 
where it is stated "The default LilyPond footer text can be changed by 
adding a tagline in the top-level \header block." (it seems this is 
slightly incorrect because it can be put in some lower-level sections 
like bookpart, maybe that is unintentional).


For the second part, it seems like none of the values that you can 
modify in a header block are in the command index, but 
https://lilypond.org/doc/v2.25/Documentation/notation/default-layout-of-bookpart-and-score-titles 
shows all of them.


This raises the question of how someone who is new to lilypond would 
figure out that it is called "tagline", I suppose either they would find 
it in the list of header values in the documentation, or find it through 
some search on google.


-Will

On 9/12/23 18:38, Knute Snortum wrote:

Hi everyone.

I have a few observations that I'd like to share.  Nothin too urgent.

If you put tagline = ##f in a header block, it will work everywhere 
except in the score block.  Here is a MWE to illustrate this:


\version "2.25.7"

% \header { tagline = ##f } % <-- this works

\book {
   % \header { tagline = ##f } % <-- this works
   \bookpart {
     % \header { tagline = ##f } % <-- this works
     \score {
       \header { tagline = ##f } % <-- this does not work
       \new Staff { c''4 4 4 4  }
     }
   }
}

For me the solution looks like I'm going to put a header block in a 
bookpark block surrounding my score block, and put tagline = ##f there.


Another observation: tagline is not in either the command index or the 
index in the Notation Manual.  The documentation I could find on tagline 
was pretty sparse (unless I missed something).


I could fill out an issue if you think it rises to that.

--
Knute Snortum



--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net |
| PGP key:|
| https://ftp.williamrehwinkel.net/pubkey.txt |
+ --- +


OpenPGP_signature
Description: OpenPGP digital signature


Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
Thank you Valentin for this solution and the following explanation why it is 
likely safer.

All responses have been much appreciated.

Best,

Michael

Sep 1, 2023, 00:15 by valen...@petzel.at:

> Hi Michael,
>
> some time ago I created a function for exactly that for a stackexchange 
> question:
> https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure
>
> Essentially it introduces a function to map one scale to another, and it does 
> so by basepitch to retain alteration. One could easily adapt this function to 
> match by base pitch and alteration:
>
> transposePitchClasses =
> #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?)
>  (let* ((scaleA (ly:music-property scaleA 'elements))
>  (scaleB (ly:music-property scaleB 'elements))
>  (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA))
>  (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB))
>  (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch-
> alteration p))) scaleA)))
>  (map-some-music
>  (lambda (m)
>  (let ((p (ly:music-property m 'pitch)))
>  (if (not (null? p))
>  (let* ((nn (ly:pitch-notename p))
>  (oct (ly:pitch-octave p))
>  (alt (ly:pitch-alteration p))
>  (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) 
> alt))) classesA)))
>  (if pos
>  (let* ((p2 (list-ref scaleA pos))
>  (oct2 (ly:pitch-octave p2))
>  (p3 (list-ref scaleB pos))
>  (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- 
> oct oct2) 0
>  (ly:music-set-property! m 'pitch new-pitch)))
>  m)
>  #f)))
>  music)
>  music))
>
> \transposePitchClasses {d fih g aih} {dih f gis a}
> { c' cis' d' dis' f' fih' fis' g' a' aih' }
>
> Am Donnerstag, 31. August 2023, 12:53:26 CEST schrieb Michael Winter via 
> LilyPond user discussion:
>
>> I would like to do something (hopefully simple), which is basically a custom
>> find and replace for a set of notes in an entire score.
>>
>> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>>
>> So basically on arbitrary list of pitches / scale  to another.
>>
>> Is this possible without writing a custom function. If not, any hints on how
>> to tackle the problem would be much appreciated. Thanks in advance.
>>
>> -Michael
>>



Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
That is very helpful. Thank you. I will ping again if I have any further 
questions.

Aug 31, 2023, 14:35 by l...@gmx.de:

> Hi Michael,
>
> over time, I found that doing something like this in an engraver (as opposed 
> to a music function) is actually much easier and conceptually clear, in spite 
> of the seeming difficulty of the engraver syntax. The advantage of using an 
> engraver being that you see the "actual" pitches and don't have to fight with 
> problems of \relative, \transpose and so on.
>
> \version "2.24.0"
>
> pitch-replace-dictionary =
> #(list
>   (cons #{ c #} #{ cis #})
>   (cons #{ d #} #{ des #})
>   )
>
> #(define (pitch-class= p q)
>    (and
>     (= (ly:pitch-notename p) (ly:pitch-notename q))
>     (= (ly:pitch-alteration p) (ly:pitch-alteration q
>
> Pitch_replace_engraver =
> #(lambda (context)
>    (make-engraver
>     (listeners
>  ((note-event engraver event)
>   (let*
>    ((pitch (ly:event-property event 'pitch))
>     (rule (assoc pitch pitch-replace-dictionary pitch-class=)))
>
>    (if rule
>    (ly:event-set-property!
>     event 'pitch
>     (ly:make-pitch (ly:pitch-octave pitch)
>    (ly:pitch-notename (cdr rule))
>    (ly:pitch-alteration (cdr rule))
>
> \layout {
>   \context {
>     \Score
>     \consists #Pitch_replace_engraver
>   }
> }
>
> \relative {
>   c'4 d e c8 8
>   \transpose f c \relative {
>     f'4 g a
>   }
> }
>
> This engraver can also be added to just a single score (\layout inside \score 
> {}) or even a single Staff or Voice. At the moment, the replacement 
> dictionary is global, but this could be changed if needed.
>
> At the moment the mechanism I chose is too crude to do replacements that 
> involve changing the pitch-octave (eg from c to b,). Do you need this?
>
> Lukas
>
> Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion:
>
>> I would like to do something (hopefully simple), which is basically a custom 
>> find and replace for a set of notes in an entire score.
>>
>> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>>
>> So basically on arbitrary list of pitches / scale to another.
>>
>> Is this possible without writing a custom function. If not, any hints on how 
>> to tackle the problem would be much appreciated. Thanks in advance.
>>
>> -Michael
>>



Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
I am now realizing that it would be useful to have this both at the level of 
the entire score and individually for each part.

Aug 31, 2023, 12:53 by mwin...@unboundedpress.org:

> I would like to do something (hopefully simple), which is basically a custom 
> find and replace for a set of notes in an entire score.
>
> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>
> So basically on arbitrary list of pitches / scale  to another.
>
> Is this possible without writing a custom function. If not, any hints on how 
> to tackle the problem would be much appreciated. Thanks in advance.
>
> -Michael
>



custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
I would like to do something (hopefully simple), which is basically a custom 
find and replace for a set of notes in an entire score.

For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}

So basically on arbitrary list of pitches / scale  to another.

Is this possible without writing a custom function. If not, any hints on how to 
tackle the problem would be much appreciated. Thanks in advance.

-Michael

Re: Print brace, clef and key signature at start of Coda separated by blank space

2023-08-18 Thread Alex Voice via LilyPond user discussion
Hi Vlado,


> Hello everyone, example:
> 
> 
> 
> \version "2.24.1"
> 
> 
> 
> 
> upper = {
> 
> \key as \minor
> 
> c'1
> 
> \stopStaff
> 
> s1*4
> 
> \startStaff
> 
> \section
> 
> \sectionLabel "Coda"
> 
> c'1
> 
> \bar ".|"
> 
> }
> 
> 
> 
> 
> lower = {
> 
> \key as \minor
> 
> c'1
> 
> \stopStaff
> 
> s1*4
> 
> \startStaff
> 
> \section
> 
> \sectionLabel "Coda"
> 
> c'1
> 
> \bar "|."
> 
> }
> 
> 
> 
> 
> \score {
> 
>   \new PianoStaff
> 
>   <<
> 
>     \new Staff = "upper" \upper
> 
>     \new Staff = "lower" \lower
> 
>   >>
> 
> }
> 
> 
> 
> 
> How can I force lilypond to print pianostaff brace, clef and key signature at 
> the beginning of Coda that is not on line break?
> 
> 

There is a way that was devised by Jean About Samoa earlier this year and it 
works brilliantly, I think, by copying the brace at the start of the system. It 
will need a bit of `cosmetic adjustment’ if you change the key signature or 
force a time signature, but you can get the effect that you require:


\version "2.24.1"


#(define replicate-stil
   (grob-transformer
    'stencil
    (lambda (grob original)
      (let* ((replicate (ly:grob-array->list (ly:grob-object grob 
'replicate-on-cols)))
             (left (ly:spanner-bound grob LEFT))
             (own (interval-start (ly:paper-column::break-align-width left 
'clef)))
             (sts (map (lambda (col)
                         (let ((tr (interval-start 
(ly:paper-column::break-align-width col 'clef
                           (ly:stencil-outline
                            (ly:stencil-translate-axis original (- tr own) X)
                            empty-stencil)))
                       replicate)))
        (apply ly:stencil-add (cons original sts))


\layout {
  \context {
    \PianoStaff
    \consists
    #(lambda (context)
       (let ((delims '())
             (cols '()))
         (make-engraver
          (acknowledgers
           ((system-start-delimiter-interface engraver grob source-engraver)
            (set! delims (cons grob delims
          ((stop-translation-timestep engraver)
           (let ((col (ly:context-property context 'currentCommandColumn)))
             (when (assoc-get 'replicate-delims (ly:grob-property col 'details))
               (set! cols (cons col cols)
          ((finalize engraver)
           (for-each (lambda (delim)
                       (ly:grob-set-object! delim 'replicate-on-cols 
(ly:grob-list->grob-array cols)))
                     delims)
    \override SystemStartBar.stencil = #replicate-stil
    \override SystemStartBracket.stencil = #replicate-stil
    \override SystemStartBrace.stencil = #replicate-stil
    \override SystemStartSquare.stencil = #replicate-stil
  }
}


replicateDelims = {
  \once \override Score.NonMusicalPaperColumn.details.replicate-delims = ##t
  \once \set Staff.forceClef = ##t
  \once \override Staff.Clef.full-size-change = ##t
  \once \set Score.measureBarType = ##f
  \once \override Score.BreakAlignment.X-extent =
  #(lambda (grob)
     (match-let (((a . b) (ly:axis-group-interface::width grob)))
                (cons (- a 0.8) b)))
}


%%


upper = {
  \key as \minor
  c'1
  \stopStaff
  s1*4
  \once \omit Staff.BarLine
  \once \omit PianoStaff.SpanBar
  \replicateDelims
  \startStaff
  \override PianoStaff.KeySignature.extra-offset = #'(-1 . 0)
  \key as \minor
  \override TextScript.X-offset = #-15.6
  \override TextScript.Y-offset = #1.945
  \section
  \sectionLabel "Coda"
  c'1^\markup {
    \override #'(line-cap-style . square)
    \with-dimensions #'(0 . 0) #'(0 . 0)
    \override #'(thickness . 2)
    \draw-line #'(0 . -12.875)
  }
  \bar ".|"
}


lower = {
  \key as \minor
  c'1
  \stopStaff
  s1*4
  \once \omit Staff.BarLine
  \replicateDelims
  \startStaff
  \key as \minor
  \section
  \sectionLabel "Coda"
  c'1
  \bar "|."
}


\score {
  \new PianoStaff
  <<
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
}



Jean’s original code is at 
https://music.stackexchange.com/questions/127631/how-can-i-insert-an-additional-systemstartbrace-into-a-pianostaff-in-lilypond,
 along with an equally successful alternative from Valentin Petzel.


The code above should lead to this:






I hope that this is helpful. Do let me know if you discover a more 
straightforward method!


Alex Voice




Software Freedom Song

2023-08-17 Thread lilypond

Hi,

I'm Jurgen, volunteering for Software Freedom Day 
<https://softwarefreedomday.org>. Some friends at the FSF recommended me 
to reach out to your team with this:


For Software Freedom Day (Sept. 16th), the team Software Freedom Day 
team creating the best Software Freedom Song, can win a nice prize 
donated by MuseScore.


I think it would be cool if someone using Lilypond would create a song 
about Software Freedom!


You can find more details here: 
https://www.digitalfreedomfoundation.org/index.php/171-software-freedom-day-music-challenge


You can join us to chat on Matrix 
<https://matrix.to/#/#SoftwareFreedomDay:matrix.org> if you have more 
questions.


Hope to be hearing from you!

All the best,
Jurgen


Re: Is there a better way to have a boxed part letter at the beginning of an arbitrary line?

2023-08-16 Thread William Rehwinkel via LilyPond user discussion

Dear Kevin,

I use "\sectionLabel"s for this.


*\version "2.25.6"**
**\language "english"**

**melody = \relative c' {**
**  \time 6/8**
**  \key d \major**
**  \clef treble**

**  \sectionLabel \markup{ \box \pad-markup #0.5 "A" }**
**  d8[ e8**
**e8] g8[ a8 b8] |**
**  \break**
**  \sectionLabel \markup{  \box \pad-markup #0.5 "B"  }**
**  d8[ e8**
**e8] g8[ a8 b8] |**
**  \bar "|."**
**}**

**\score {**
**  \new Voice = "mel" { \melody }**

**  \layout {**
**    \autoBeamOff**
**    indent = 0\mm**
**  }**
**}*

BTw, I just saw the second email you sent in this thread, and I'm not 
exactly sure what you mean but I would probably have a separate variable 
with the section labels, and you can combine them, a bit like this:


*\version "2.25.7"**
**
**sections={ \sectionLabel "1" s1 \sectionLabel "2"}**
**music = { c'4 d' e' d' c' e' g' c' }**
**
**\score {**
**  \new Staff << \sections \music >>**
**}*


thanks,
-William

On 8/16/23 14:02, Kevin Cole wrote:

A minimum working example will make the question clearer: Although the
following produces what I want, it seems very ugly, and I suspect
there's a better way to accomplish the same thing: Placing the [A] and
[B] boxed letters for the tune parts at the beginning of a line.



\version "2.24.2"
\language "english"

melody = \relative c' {
   \time 6/8
   \key d \major
   \clef treble

   d8^\markup \translate #'(-10 . 0) { \box \pad-markup #0.5 "A" }[ e8
e8] g8[ a8 b8] |
   \break
   d8^\markup \translate #'(-10 . 0) { \box \pad-markup #0.5 "B" }[ e8
e8] g8[ a8 b8] |
   \bar "|."
}

\score {
   \new Voice = "mel" { \melody }

   \layout {
 \autoBeamOff
 indent = 0\mm
   }
}





--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +



OpenPGP_signature
Description: OpenPGP digital signature


  1   2   3   4   5   >