On Sun, Mar 17, 2013 at 10:01 PM, David Kastrup <d...@gnu.org> wrote:

> Alexandre Araujo Moreira <alexandr...@gmail.com> writes:
>
> > \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?
>
> \version "2.16.2"
> simpleMusic =
> #(define-scheme-function (parser location melody) (ly:music?)
> #{
> \score {
> $melody
> \layout {}
> }
> #})
> \score { \simpleMusic { c1 } }
>
> Probably more verbose than you care for, but at least you can get midi
> and layout blocks in which is more than you can do using a music
> function.
>
>
David, I tried what you said above (and some variations, as having a score
around another score seemed odd) and I only managed to get syntax errors.

My original idea was based on believing a "scheme-function" in Lilypond was
more-or-less like a macro in Scheme. Now I think I was wrong about that. Is
there any facility in Lilypond that would allow me to write something like

\myMacro arg1 arg2 and have lilypond behave as if I had wrote the expansion
of myMacro over arguments arg1 and arg2? If there is such a thing I can
work out a way in which it could behave the way I want. Especially if I
have anything like guile's syntax-case at my disposal.


> --
> David Kastrup
>
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to