Hello, everyone.

I've been playing with lilypond to write simple, one-instrument, scores for
learning for a few weeks now, and figured I could automate some of the
tedious layout configuration I apply to all my scores with a simple scheme
function. Unfortunately things aren't going very well. Let me describe my
problem.

I wrote a scheme function with (define-scheme-function), with the following
code:

\version "2.16.2"
simpleMusic =
#(define-scheme-function (parser location melody) (ly:music?)
   #{
    \score {
      $melody
      \layout {}
    }
  #})
\simpleMusic { c1 }

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.

My idea is to extend the parameters later (add title, composer, or anything
else that is interesting to me) and apply a few transformations to the
melody parameter (for example, unfold repeats while generating midi).

The problem is, I thought what I wrote above would be enough to have it
generate the outputs declared inside the function (in this case, the
\layout), but it seems it doesn't work that way.

Thanks,
Alexandre Araujo Moreira.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to