lilypond-user
[Top][All Lists]
Advanced

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

Re: How to make jazz-like leadsheets without melody, only chords, and te


From: Aaron Hill
Subject: Re: How to make jazz-like leadsheets without melody, only chords, and text?
Date: Wed, 24 Mar 2021 07:25:45 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-03-24 1:07 am, Jacques Menu wrote:
This works, but with a second, empty staff:

\version "2.20.0"

\language "english"
\include "lilyjazz.ily"

global = {  \time 4/4   \key f \major  \tempo 4=100}
chordNames = \chordmode {f1:7 f:7 f:7 f:7}

\score {
  <<
    \global

    \new ChordNames {
      \chordNames
    }

    \new Voice
    \with { \consists "Pitch_squash_engraver" }
    {
      \improvisationOn \omit Stem
      \repeat unfold 16 { 4 }
    }
  >>
}

You need to be more explicit about creating staves and voices. Also, you will want to remove the Note_performer so that the dummy slash notes do not interfere with MIDI:

%%%%
\version "2.22.0"

global = { \time 4/4 \key f \major \tempo 4=100 }
chordNames = \chordmode { f1:maj7 e:7 a:m bes/c }

\score {
  <<
    \new ChordNames \chordNames
    \new Staff <<
      \new NullVoice \global
      \new Voice
        \with { \consists "Pitch_squash_engraver"
                \remove "Note_performer" }
      {
        \improvisationOn \omit Stem
        \repeat unfold 16 { c4 }
      }
    >>
  >>
  \layout {}
  \midi {}
}
%%%%

And while we're at it... why not make the slashes automatically fit the chord music?

%%%%
\version "2.22.0"

slashesForMusic =
#(define-music-function
  (slash-duration reference-music)
  (ly:duration? ly:music?)
  #{ \new Voice
     \with { \consists "Pitch_squash_engraver"
             \remove "Note_performer" }
     { \improvisationOn \omit Stem
       \repeat unfold
       #(ly:moment-main (ly:moment-div
         (ly:music-length reference-music)
         (ly:duration-length slash-duration)))
       { c $slash-duration } } #})

global = { \time 4/4 \key f \major \tempo 4=100 }
chordNames = \chordmode { f1:maj7 e:7 a:m bes/c }

\score {
  <<
    \new ChordNames \chordNames
    \new Staff <<
      \new NullVoice \global
      \slashesForMusic 4 \chordNames
    >>
  >>
  \layout {}
  \midi {}
}
%%%%


-- Aaron Hill



reply via email to

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