lilypond-devel
[Top][All Lists]
Advanced

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

Re: parallel versus series scoring


From: Nicolas Sceaux
Subject: Re: parallel versus series scoring
Date: Sun, 22 Jan 2006 11:42:18 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Nicolas Sceaux <address@hidden> writes:

> Erik Sandberg <address@hidden> writes:
>
>> And as a bonus, we get a built-in command for variable assignments inside 
>> music expressions (which sometimes has been requested):
>>    \parMusic #'(foo)  { ... }
>
> hm. I'm feeling stupid sometimes. I've often thought it would be nice to
> do what you describe, without realizing that I could actually do it...

assignMusic = 
#(def-music-function (parser location symbol value) (symbol? ly:music?)
  (ly:parser-define! parser symbol value)
  (make-music 'SequentialMusic))

\book {
  \score {
    {
      \assignMusic #'global { \time 4/4 \key f \major s1 \bar "|." }
      \new StaffGroup <<
        \new Staff << 
          \global
          { c'4 d' e' f' }
        >>
        \new Staff <<
          \global
          { \clef bass c2. f4 }
        >>
      >>
    }
  }
  
  \score {
    {
      \assignMusic #'global { \time 2/2 s1 \bar "|." s1 \bar "|." }
      \new Staff << \global
         { c'2 d' e' f' } >>
    }
  }
}




reply via email to

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