Am 15.01.2011 18:06, schrieb David Kastrup:
David Kastrup<d...@gnu.org>  writes:

[...]

ud=#(define-music-function (parser location low high) (ly:music? ly:music?)
      #{ \change Staff = "down" $low \change Staff = "up" $high #})

global={ \key es\major
    \time 2/4  }

\new StaffGroup
<<  \set StaffGroup.beatStructure = #'(2)
  \new Staff = "up" { \global s2*3 }
    \new Staff = "down" { \global
      \relative c' { \repeat unfold 2 { \ud<c es f>8<g' bes c>  }
                    \repeat unfold 2 { \ud<c, es f>  <as' bes c>  }
                    \repeat unfold 2 { \ud<c, es f>  <g' bes c>  } } }

Great, this makes the notation much easier. I will use it exactly in this way.

But there is something I don't understand. In your music-function you find a
    \change Staff = "down" $low .....

When I write this outside a function I get a warning when the "down" staff is the current staff. But when I use the function I don't:

----<>-----<>----<>-----<>----<>-----<>----<>-----<>----<>-----<>----n \version "2.13.31"

ud=#(define-music-function (parser location low high) (ly:music? ly:music?)
     #{ \change Staff = "down" $low \change Staff = "up" $high #})

global={ \key es\major
   \time 2/4  }

\new StaffGroup
<<
    \set StaffGroup.beatStructure = #'(2)
    \new Staff = "up" { \global s2*2 }
    \new Staff = "down" { \global
        \relative c' {
        % this 'change Staff' is also found in the \ud function
        \change Staff = "down" c8 \change Staff = "up" c8
        \repeat unfold 2 { \ud c8 c8 }
        s4 } }
>>

----<>-----<>----<>-----<>----<>-----<>----<>-----<>----<>-----<>----
|  <string>:1:69: Warnung: es kann kein Kontext zum Umschalten
|  gefunden werden
|  parseStringResult = \notemode {  \change Staff = "down"
|  \lilyvartmpe
|                \change Staff = "up" \lilyvartmpf  }

Helge

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to