Hello list,

in another thread, my problems with command line arguments were
solved (or workarounds provided), but now I am stuck with
another but similar problem:

I want to transpose some music and tell lilypond the 'to' pitch
in the command line:

lilypond -dpitch="e'" myfile.ly

where myfile.ly is

\version "2.15.24"

optionalTranspose = #(define-music-function (parser location music) (ly:music?)
  (let ((mypitch (ly:get-option 'pitch)))
       #{ \transpose c $mypitch  $music #}))

melody = { c'4 d' e'2 }

\score {
  \new Staff {
     \new Voice { \optionalTranspose \melody }
  }
}

Lilypond refuses to see mypitch as a pitch. I tried to convert it
with (ly:music-property mypitch 'pitch), but lilypond soesn't take
the command line argument as a music expression, too.

Is there any chance to convince lilypond to accept a pitch on
the command line?

Thanks in advance,

Marc

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to