[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generate pdf from scheme function
From: |
David Kastrup |
Subject: |
Re: Generate pdf from scheme function |
Date: |
Mon, 18 Mar 2013 02:01:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Alexandre Araujo Moreira <address@hidden> writes:
> 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?
\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 Kastrup
Re: Generate pdf from scheme function, Jay Anderson, 2013/03/17