Re: Overwrite key signature with numbers

2023-10-13 Thread Robert Mengual
Alright, thanks for your time. I really appreciate it. Robert El vie, 13 oct 2023 18:41, Jean Abou Samra escribió: > From what you say, I believe you are worried about chords, am I right? > > > > It's more fundamental than that: there is only *one* StaffSymbol per > staff, for the duration of

Re: Overwrite key signature with numbers

2023-10-13 Thread Jean Abou Samra
> From what you say, I believe you are worried about chords, am I right? It's more fundamental than that: there is only *one* StaffSymbol per staff, for the duration of the *entire* score. That StaffSymbol has a ledger-extra property that applies to *all* ledger lines on that staff anywhere in

Re: Overwrite key signature with numbers

2023-10-13 Thread Robert Mengual
Thanks for your response Jean, So, the music notation system I am writing has assimetrical staves with only 4 lines, which means there is a blank space wider than the other two white spaces. For notes that fall into the wider blank space, I want a ledger line value of 2, but for the note that

Re: Overwrite key signature with numbers

2023-10-13 Thread Jean Abou Samra
Le vendredi 13 octobre 2023 à 15:36 +0200, Robert Mengual a écrit : > In the example below, I am receiving the following error:  Wrong type argument > in position 1 (expecting Stream_event): #f > > I think I am not receiving a grob in this case. You are, but this grob doesn't have an event

Re: Overwrite key signature with numbers

2023-10-13 Thread Robert Mengual
Thank you again Valentin, this is extremely helpful for me. In fact, I have been able to override other properties based on the solution you provided. I'm slowly making progress. However there is something I am stuck with, based on your response above: > If an overriden property expects a

Re: Overwrite key signature with numbers

2023-10-03 Thread David Kastrup
Valentin Petzel writes: > Damn it, turns out the key engraver has an hardcoded path to always create > Key > Cancellations for keys with no alteration. > > So one would need to do > > \override KeyCancellation.stencil = ##f > > which is of course a bit wonky as compared to telling Lilypond to

Re: Overwrite key signature with numbers

2023-10-03 Thread Robert Mengual
Oh David's right, if the music ends with no alterations it is printing the key cancellation, even when it has been explicitely set to false.[image: image.png] What can I do in this case? I would like to keep the number+alteration but remove the 7 natural signs before that. Thank you, Robert El

Re: Overwrite key signature with numbers

2023-10-03 Thread Valentin Petzel
Am Dienstag, 3. Oktober 2023, 12:55:21 CEST schrieb Robert Mengual: > Thanks a lot Valentin, that's simply perfect! > > However, after reading a lot of the documentation I think I would have > never been able to find any solution close to yours. I am very confused > with a few things, and I can't

Re: Overwrite key signature with numbers

2023-10-03 Thread Valentin Petzel
Damn it, turns out the key engraver has an hardcoded path to always create Key Cancellations for keys with no alteration. So one would need to do \override KeyCancellation.stencil = ##f which is of course a bit wonky as compared to telling Lilypond to not create Cancellations in the first

Re: Overwrite key signature with numbers

2023-10-03 Thread David Kastrup
Robert Mengual writes: > Oh David's right, if the music ends with no alterations it is printing the > key cancellation, even when it has been explicitely set to false.[image: > image.png] > What can I do in this case? I would like to keep the number+alteration but > remove the 7 natural signs

Re: Overwrite key signature with numbers

2023-10-03 Thread Robert Mengual
Thanks a lot Valentin, that's simply perfect! However, after reading a lot of the documentation I think I would have never been able to find any solution close to yours. I am very confused with a few things, and I can't find the answers in the documentation. Let me ask you a few questions in hope

Re: Overwrite key signature with numbers

2023-10-02 Thread David Kastrup
Valentin Petzel writes: > Hi Robert, > > you could do it like this: > > \version "2.23.6" > > \layout { > \context { > \Staff > \override KeySignature.text = > #(lambda (grob) >(let* ((alt (ly:grob-property grob 'alteration-alist)) > (alts (map cdr alt)) >

Re: Overwrite key signature with numbers

2023-10-02 Thread Valentin Petzel
Hi Robert, you could do it like this: \version "2.23.6" \layout { \context { \Staff \override KeySignature.text = #(lambda (grob) (let* ((alt (ly:grob-property grob 'alteration-alist)) (alts (map cdr alt)) (tot (* 2 (apply + alts)))

Overwrite key signature with numbers

2023-10-02 Thread Robert Mengual
Hi, I am trying to overwrite the key signature for my custom music notation so that instead of displaying the sharp and flat icons, it shows a given number and the alteration. So, for example, E Major would show 4# instead of . I have been able to get the desired output by hardcodeing it