[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ChangeStaff was: OverrideBeamSettings
From: |
Helge Kruse |
Subject: |
Re: ChangeStaff was: OverrideBeamSettings |
Date: |
Sun, 16 Jan 2011 10:27:08 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0 |
Am 15.01.2011 18:06, schrieb David Kastrup:
David Kastrup<address@hidden> 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