Re: Natural marked with a sharp symbol (mensural notation)

2020-07-29 Thread Niols

Hi Lukas,

On 25/07/2020 20:16, Lukas-Fabian Moser wrote:
I stumbled upon a score in G minor where a E natural would be marked 
as a E note preceded by a sharp symbol. What would be a “clean” way to 
achieve that?


I have thought of redefining the natural symbol by the sharp one, but:

  1. I don't know how to do this.

  2. This would not work in an other key signature with sharps where, I
 assume, the natural would be marked with flat symbols.


Perhaps:

\version "2.20.0"

forceSharp =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \sharp } #}
\etc

forceFlat =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \flat } #}
\etc

\relative {
   \key f \major
   f' g a \forceSharp b
}

\relative {
   \key g \major
   a' g \forceFlat f e
}


I like this solution! And it made me discover a few new things, which is 
always great :-)



This probably has to be customized if you use mensural glyphs.


By playing with the documentation, I finally found out how to access the 
mensural glyphs, and a mensural version of your suggestion could be:


forceSharp =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \musicglyph "accidentals.mensural1" 
} #}

\etc

forceFlat =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \musicglyph 
"accidentals.mensural-1" } #}

\etc

---

Now I also looked into the sources for the definition of the "alteration 
mensural glyph name alist" and found this:


(define-public alteration-mensural-glyph-name-alist
  '((-1/2 . "accidentals.mensuralM1")
(0 . "accidentals.vaticana0")
(1/2 . "accidentals.mensural1")))

and this allowed me to define two variations, one that replaces the 
natural by the flat, and one that replaces it by the sharp. They can 
then be used accordingly:


\version "2.20.0"

#(define-public alteration-mensural-natural-as-sharp-glyph-name-alist
  '((-1/2 . "accidentals.mensuralM1")
(0. "accidentals.mensural1")
(1/2  . "accidentals.mensural1")))

#(define-public alteration-mensural-natural-as-flat-glyph-name-alist
  '((-1/2 . "accidentals.mensuralM1")
(0. "accidentals.mensuralM1")
(1/2  . "accidentals.mensural1")))

\relative {
  \key f \major
  \override Staff.Accidental.glyph-name-alist = 
#alteration-mensural-natural-as-sharp-glyph-name-alist

  f' g a b b
}

\relative {
  \key g \major
  \override Staff.Accidental.glyph-name-alist = 
#alteration-mensural-natural-as-flat-glyph-name-alist

  a' g f e f
}

---

I haven't found a clever way to do that while taking into account the 
key signature, but this sounds good enough for me. That gives us both a 
way to do it systematically, and a way to do it locally. I like having 
the choice.


Thanks a lot for your help!

Best,
— Niols



Re: Natural marked with a sharp symbol (mensural notation)

2020-07-25 Thread Lukas-Fabian Moser

Hi Niols,

I stumbled upon a score in G minor where a E natural would be marked 
as a E note preceded by a sharp symbol. What would be a “clean” way to 
achieve that?


I have thought of redefining the natural symbol by the sharp one, but:

  1. I don't know how to do this.

  2. This would not work in an other key signature with sharps where, I
 assume, the natural would be marked with flat symbols.


Perhaps:

\version "2.20.0"

forceSharp =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \sharp } #}
\etc

forceFlat =
\tweak Accidental.stencil #ly:text-interface::print
\tweak Accidental.text ##{ \markup { \flat } #}
\etc

\relative {
  \key f \major
  f' g a \forceSharp b
}

\relative {
  \key g \major
  a' g \forceFlat f e
}

This probably has to be customized if you use mensural glyphs.

Best
Lukas




Natural marked with a sharp symbol (mensural notation)

2020-07-25 Thread Niols

Hello,

I stumbled upon a score in G minor where a E natural would be marked as 
a E note preceded by a sharp symbol. What would be a “clean” way to 
achieve that?


I have thought of redefining the natural symbol by the sharp one, but:

  1. I don't know how to do this.

  2. This would not work in an other key signature with sharps where, I
 assume, the natural would be marked with flat symbols.

I actually found something about this in the documentation here:


http://lilypond.org/doc/v2.19/Documentation/notation/typesetting-mensural-music#mensural-accidentals-and-key-signatures

It does say that the natural symbol does not exist really and that the 
sharp or flat is used more often. However, I could not see a clean way 
to say that I indeed wanted that.


As a bonus question, what if I wanted the sharp from the mensural 
accidentals to be bigger in my score (I find the default one really tiny).


Thank you so much in advance,
— Niols