0

Lilypond has some built in chords which can be conveniently used with \chordmode

\new StaffGroup <<                                                                  
  \new Staff \with {                                                                
    instrumentName = "Piano"                                                        
    shortInstrumentName = "Pno"                                                     
  } \new Voice = "voice" \relative c {                                             
    \key b \major                                                                   
    \easyHeadsOn                                                                                                                                              
                                                                                    
    \chordmode {                                                                    
      b1                                                                            
    }                                                                               
  }                                                                                 
>>   

This produces:

enter image description here

Chordnames can also be printed with \chords:

\new StaffGroup <<
  \new Staff \with {
    instrumentName = "Piano"
    shortInstrumentName = "Pno"
  } \new Voice = "voice" \relative c {
    \key b \major
    \easyHeadsOn

    \chords {
      \chordmode {
        b1
      }
    }
  }
>>

This produces:

enter image description here

Is there a way to customize these built in chords ? Some of them do not sound good in the midi. I would prefer to use lower octave, for example. Just changing to relative c, does not seem to work.

I am aware I can write my own chords using <> notation, but I just want to print chord names in the final output and have an acceptable midi. How can I achieve this?

1 Answer 1

3

You can simply do b,1. \chordmode is a special parser mode that does not use relative information, so you need to specify the octave for each note.

4
  • Hmm.. why didn't I think of that :-(
    – kargirwar
    May 24, 2023 at 10:11
  • In general is it possible to customize these chords (without writing my own) ? May be I want 4 notes instead of 3 ?
    – kargirwar
    May 24, 2023 at 10:19
  • 1
    It is not possible directly in the parser. You may add additional notes like this b:3.5.8 or by either wrapping the chords around a music function which post processes the chords. Consider this answer music.stackexchange.com/a/122051/82808 where is implemented a function that replaces chords by the voicings from fretboad diagram definitions.
    – Lazy
    May 24, 2023 at 11:10
  • If the chords are consistently in the wrong octave one of these functions might be helpful: \transposition, \transpose May 24, 2023 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.