On Fri, Jun 3, 2022 at 11:16 AM Andrew Musselman <andrew.mussel...@gmail.com>
wrote:

> As for the key signature, I am still seeing nothing about key in the pdf
> when I do this to remove all complexity:
>
> \version "2.22.2"
> \key d \major
> {
> a
> }
>

put the first brace before \key and it will give you what you want.

Please work your way carefully through the Learning Manual.  It is annoying
to do so, but it will provide you the basis you need to succeed in LilyPond.

A score is a single musical expression.

You have two musical expressions in this file:

A) \key d\major
B) { a }

Each is wrapped in its own score contect by default.  Score A creates no
output.  Score B creates the output of a single note, with no explicit key
signature, so c major is assumed.

If you do

{
\key d \major
a
}

then you will have a single music expression, and you will get a single
score that includes both the key signature and the note.

HTH,

Carl

Reply via email to