1

I discovered Lilypond and I'm testing it on hacklily.org. Yet, even if the documentation avout writing pitches mentions that if you want to have one octave up you should use ' and one octave down you should use , the later doesn't seem to be supported by hacklily, or that my documentation isn't up to date. Indeed, with the following code:

\header {
  title = "Down in a hole"
  composer = "Alice in chains"
}

baseMelody = \relative {
\numericTimeSignature
\time 4/4
  <g b'>8 c'8 a8 d8, g8
}

melody = {
  \tempo 4 = 95
  \baseMelody
}

drum = \drums {
    \clef treble
    hh8 hh16 hh16 hh8 hh8 hh16 hh16 hh8 hh8 hh16 hh16 hh8 
    hh16 hh16 hh8 hh8 hh16 hh16 hh8 hh8 hh32 hh32 hh32 hh32
  }

\score {
  \new Staff <<
    \new Voice \melody
    \new Drums \drum
  >>
  
  \layout { }

  \midi {}
}

I get:

Processing `hacklily-wrapper.ly'
Parsing...
/tmp/hacklily.ly:10:20: error: syntax error, unexpected ','
  <g b'>8 c'8 a8 d8
                   , g8
/tmp/hacklily.ly:25:3: error: errors found, ignoring music expression
  
  \new Staff <<

PS: does anyone knows why it's not possible to save its work? I obtain:

> TypeError: e.sent.map is not a function

1 Answer 1

5

Your error is given by the wrong placement of the comma. You correctly used c'8, and you must write d,8 as well.

Simply put, you must:

  • First write the name of the pitch, like d (not sure about English).
  • Then 's and ,s for marking the octave. You can give more than one or none.
  • (Then ? if you want Lilypond to put a cautionary accidental to the note, or ! if you want to force the accidental, or nothing.)
  • Then the duration.
  • Everything else goes after that in no particular order.

So d,8 is okay while d8, results in a syntax error, because the comma doesn't mean anything in that position.

Ad P. S.: Sadly I don't know anything about Hacklily.

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.