lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing rest in ChordNames context


From: Tim McNamara
Subject: Re: printing rest in ChordNames context
Date: Thu, 14 May 2009 09:07:45 -0500

On May 14, 2009, at 1:03 AM, Marc Hohl wrote:

Tim McNamara schrieb:
[...]
In jazz lead sheets, the usual method is to write "N.C." above the staff ("No Chord") which cues the chordal instruments and rhythm section to stop playing to allow the break. There's a workaround that Martial wrote to facilitate this, but it would be nice to have a way of writing this more simply (e.g., nc+duration such as nc1, nc2, nc4, nc8 etc.).
What about writing just r1, r2, r4 as usual, and let lilypond convert this into "N.C."? I have no perfect solution, but it should be possible by including the Rest_engraver and defining it
to simply print the "N.C.".

With this solution, you can use the chords as notes /and/ as text symbols.

That's an interesting possibility that I'd have to look into, since I haven't got a clue about using the Rest_engraver, although I suspect it would involve putting in a lot of code inside the music content. Many things in Lilypond currently result in inelegant coding in the .ly file to get the job done, although this will eventually be refined. If I had any computer programming skills I'd be happy to help with writing those refinements, but alas I wold first have to go back to school and learn computer programming!

Martial's snippet from a couple of days ago is very helpful in creating a "N.C." in the chords above the staff and works well:

\version "2.12.2"

NCString  = { <c e g>-\markup { \whiteout { \hspace #-2 " N.C.    " }}}
ChrdExcep = #(append (sequential-music-to-chord-exceptions NCString #t)
           ignatzekExceptions)


{<<
{
\chords {
a2:m7 d2:7.9-
g2:m7 c2:7
\set   chordNameExceptions = #ChrdExcep c1 %chord <c e g> as NCString
\unset chordNameExceptions
a2:m7 d2:7.9-
}
}
\relative c' {
a'2 d2
g,2 c2
c4 c4 c4 c4
a2 r2}
>>
}

but having to put

\set   chordNameExceptions = #ChrdExcep c1 %chord <c e g> as NCString
\unset chordNameExceptions

into the \chords feels clunky and intrusive to me. I'd prefer to minimize putting formatting code in the music content as much as possible. Being able to write something like nc1 (or r1) and have it interpreted by LilyPond as N.C. would be much more elegant and intuitive:

{<<
{
\chords {
a2:m7 d2:7.9-
g2:m7 c2:7
nc1
a2:m7 d2:7.9-
}
}
\relative c' {
a'2 d2
g,2 c2
c4 c4 c4 c4
a2 r2}
>>
}


IMHO, YMMV.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]