Chord names alternative: Difference between revisions

m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
m Improve layout
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
This mirrors the mechanism originally used in early LilyPond versions (pre-1.7); not having been properly maintained, however, some features have been lost (mainly chord exception lists) and bugs have been introduced.
This mirrors the mechanism originally used in early LilyPond versions (pre-1.7); not having been properly maintained, however, some features have been lost (mainly chord exception lists) and bugs have been introduced.


<lilypond version="2.24" full>
<lilypond version="2.24">
%%%% Legacy chord naming functions (formerly in scm/chord-generic-names.scm)
%%%% Legacy chord naming functions (formerly in scm/chord-generic-names.scm)
%%%% Copyright (C) 2003--2023 Jan Nieuwenhuizen <janneke@gnu.org>
%%%% Copyright (C) 2003--2023 Jan Nieuwenhuizen <janneke@gnu.org>
Line 352: Line 352:
   <c e g d'>  % add9
   <c e g d'>  % add9
   <c es g f'>
   <c es g f'>
   <c e g b fis'>  % Lydian
   <c e g b fis'> \break % Lydian
   <c e g bes des' ees' fis' aes'>  % altered chord
   <c e g bes des' ees' fis' aes'>  % altered chord
}
}
Line 375: Line 375:
}
}


efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f)
efullJazzAlt =
  #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f)


epartialmusicJazzAlt = {
epartialmusicJazzAlt = {
Line 387: Line 388:
}
}


epartialJazzAlt = #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f)
epartialJazzAlt =
  #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f)


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\score {
<<
  <<
  \new ChordNames {
    \new ChordNames {
    %% Already set by default:
      %% Already set by default:
    %\set chordNameFunction = #ignatzek-chord-names
      %\set chordNameFunction = #ignatzek-chord-names
    \override InstrumentName.self-alignment-Y = #-0.9
      \set instrumentName = "Ignatzek"
    \set instrumentName = "Ignatzek (default)"
      \set shortInstrumentName = "Def"
    \set shortInstrumentName = "Ign"
      \chs
    \chs
    }
  }


    \new ChordNames {
  \new ChordNames {
      \set chordNameFunction = #jazz-chordnames
    \set chordNameFunction = #jazz-chordnames
      \set majorSevenSymbol = \whiteTriangleMarkup
    \set majorSevenSymbol = \whiteTriangleMarkup
      \set chordNameSeparator = "/"
    \set chordNameSeparator = "/"
      \set chordNameExceptionsFull = \efullJazzAlt
    \set chordNameExceptionsFull = \efullJazzAlt
      \set chordNameExceptionsPartial = \epartialJazzAlt
    \set chordNameExceptionsPartial = \epartialJazzAlt
      \set instrumentName = "Alternative"
    \override InstrumentName.self-alignment-Y = #-1.2
      \set shortInstrumentName = "Alt"
    \set instrumentName = "Alternative"
      \chs
    \set shortInstrumentName = "Alt"
    }
    \chs
  }


    %% This is the Banter (1987) style.  It gives exceedingly
  %% This is the Banter (1987) style.  It gives exceedingly
    %% verbose (wide) names, making the output file take up to 4 pages.
  %% verbose (wide) names, making the output file take up to 4 pages.
  \new ChordNames {
    \set chordNameFunction = #banter-chordnames
    \override ChordName.font-size = #-3
    \override InstrumentName.self-alignment-Y = #-1.2
    \set instrumentName = "Banter"
    \set shortInstrumentName = "Ban"
    \chs
  }


    \new ChordNames {
  \new Staff \transpose c c' { \chs }
      \set chordNameFunction = #banter-chordnames
>>
      \override ChordName.font-size = #-3
      \set instrumentName = "Banter"
      \set shortInstrumentName = "Ban"
      \chs
    }


  \new Staff \transpose c c' { \chs }
\paper {
  >>
  % Suppress creation of a second page.
  \layout {
  paper-height = 50\cm
    #(layout-set-staff-size 16)
  system-system-spacing.padding = 5
    system-system-spacing.basic-distance = #0
}
    \context {
 
      \ChordNames
\layout {
      \consists "Instrument_name_engraver"
  #(layout-set-staff-size 16)
     }
  indent = 3\cm
    \context {
  short-indent = 1\cm
      \Score
  ragged-last = ##t
      \remove "Bar_number_engraver"
 
    }
  \context {
    \ChordNames
    \consists "Instrument_name_engraver"
     \override VerticalAxisGroup.nonstaff-nonstaff-spacing
                              .minimum-distance = 3.2
  }
  \context {
    \Score
    \remove "Bar_number_engraver"
   }
   }
}
}
Line 441: Line 455:


[[Category:Chords]]
[[Category:Chords]]
[[Category:Correction wanted]]
[[Category:Legacy code]]
[[Category:Legacy code]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]