lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme error - what am I doing wrong?


From: Nicolas Sceaux
Subject: Re: Scheme error - what am I doing wrong?
Date: Sun, 09 Oct 2005 13:43:59 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Sven Axelsson <address@hidden> writes:

> I am working on a piece where I need many short example extracts. I thoght I
> could simplify this with a music-function. This is what I've got:
>
> musicExtract = #(def-music-function (parser location music) (string?)
> (ly:parser-parse-string (ly:clone-parser parser) (string-append "
> \\score {
> { " music " }

change that line to: \\notemode { " music " }

> \\layout {
> indent = 10\\mm
> raggedright = ##t
> \\context {
> \\Staff
> \\remove Time_signature_engraver
> \\remove Bar_engraver
> }
> }
> }
> ")) (make-music 'SequentialMusic))

But there must be a cleaner way. Maybe that, if you don't mind repeating
the \layout block in longer examples:

\layout {
  indent = 10\mm
  raggedright = ##t
}

musicExample = #(def-music-function (parser location music) (ly:music?)
                 #{ \new Staff \with {
                      \remove Time_signature_engraver
                      \remove Bar_engraver
                    } $music #})

%% A short Example
\musicExample { c' d' e' f' }

%% A longer example
\score {
  { c' d' e' f' c' d' e' f' }
  \layout { raggedright = ##f }
}

%% A short Example
\musicExample { c' d' e' f' }

nicolas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]