lilypond-devel
[Top][All Lists]
Advanced

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

Patch for review, [Was: Re: partial measure with independent time signat


From: Mats Bengtsson
Subject: Patch for review, [Was: Re: partial measure with independent time signatures]
Date: Wed, 25 Feb 2009 19:15:40 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

I haven't learned the new system for reviewing patches yet.
Can you see any problems of applying the following patch? It
solves the problem described below, and it doesn't seem to break anything.

--- lily/parser.yy~     2009-01-29 16:56:08.000000000 +0100
+++ lily/parser.yy      2009-02-25 19:06:07.000000000 +0100
@@ -1555,7 +1555,7 @@
       | PARTIAL duration_length       {
               Moment m = - unsmob_duration ($2)->get_length ();
$$ = MAKE_SYNTAX ("property-operation", @$, SCM_BOOL_F, ly_symbol2scm ("Timing"), ly_symbol2scm ("PropertySet"), ly_symbol2scm ("measurePosition"), m.smobbed_copy ()); - $$ = MAKE_SYNTAX ("context-specification", @$, ly_symbol2scm ("Score"), SCM_BOOL_F, $$, SCM_EOL, SCM_BOOL_F); + $$ = MAKE_SYNTAX ("context-specification", @$, ly_symbol2scm ("Timing"), SCM_BOOL_F, $$, SCM_EOL, SCM_BOOL_F);
       }

       | TIME_T fraction  {


   /Mats

-------- Original Message --------
Subject:        Re: partial measure with independent time signatures
Date:   Wed, 25 Feb 2009 19:07:29 +0100
From:   Mats Bengtsson <address@hidden>
To:     Peter Van Kranenburg <address@hidden>
CC:     address@hidden
References:     <address@hidden>



The reason for your problems is that the command \partial 8 is equivalent to
\set Score.measurePosition = #(ly:make-moment -1 8)
which does the setting on the Score level. The solution is to make the corresponding setting in the "Timing" context (which is just an alias for the context where the
Timing_translator currently lives:

\version "2.12.1"

\layout {
\context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
}
\context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
}
}
% Now each staff has its own time signature.
\relative c' <<
\new Staff {
\time 2/4
\set Timing.measurePosition = #(ly:make-moment -1 8)
%\partial 8*1
d8 | d4 f8 a
}
\new Staff {
\time 2/2
\set Timing.measurePosition = #(ly:make-moment -1 4)
%\partial 4*1
a,4 | d4. e8 f4 g
}


 /Mats


Peter Van Kranenburg wrote:
Hello all,

Why isn't the \partial working in the code below?
I get:

/Users/pvk/tmp/polymeter.ly:20:3: warning: barcheck failed at: -1/8
d8
   | d4 f8 a
/Users/pvk/tmp/polymeter.ly:25:4: warning: barcheck failed at: 1/4
a,4
    | d4. e8 f4 g

If I include only one of the staves, everything is ok.

thanks in advance,
Peter van Kranenburg


\version "2.12.1"

\layout {
\context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
}
\context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
}
}
% Now each staff has its own time signature.
\relative c' <<
\new Staff {
\time 2/4
\partial 8*1
d8 | d4 f8 a
}
\new Staff {
\time 2/2
\partial 4*1
a,4 | d4. e8 f4 g
}
>>



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

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
      Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================



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


--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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