On Sun, Mar 17, 2013 at 3:57 PM, Alexandre Araujo Moreira <alexandr...@gmail.com> wrote: > Is there anyway I can write something similar to simpleMusic (in usage), > where it'll automatically generate the pdf given the notes? Later I plan to > add other outputs (controlled by cmdline parameters), so having this kind of > usage would be very helpful.
This may get you further: =========================== \version "2.17.10" makePDF = #(define-void-function (parser location music pdf-filename) (ly:music? string?) (let ((book #{ \book { \bookOutputName $pdf-filename \score { \new Staff { $music } } } #})) (print-book-with-defaults parser book))) \makePDF \relative c' {c4 d e f} "one" \makePDF \relative c' {f4 e d c} "two" =========================== This generates two files: 'one.pdf' and 'two.pdf'. -----Jay _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user