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