lilypond-user
[Top][All Lists]
Advanced

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

How to get a polymeter with time signature 89888449/5199909 against 7427


From: mclaren
Subject: How to get a polymeter with time signature 89888449/5199909 against 742739/45045
Date: Sun, 6 Nov 2016 01:05:37 -0700 (MST)

Lilypond crashes with the familiar error code if we enter those time
signatures directly. But there is a workaround, and it involves
approximating both meters with smaller rational fractions, then deleting the
actual meter used and engraving the real time signature by hand on both
staves. Then we use a tuplet to squish one meter so that it fits in the time
of the other meter (to within 7 parts in 100,000, which is probably close
enough).

Here's the score. Unfortunately, Urs Liska's and Andrew Ho's ametric bar
break code doesn't work here, but that's not an issue because the measures
line up on the downbeat (to within 7 parts in 100,000). So we can simply
photoshop the barlines in and photoshop the entire score by entering 4
measures or so at time and separately engraving 'em, then assembling the
entire score by hand. Not ideal perhaps, but a whole lot easier than any
other way of doing it I know of. 

<http://lilypond.1069038.n5.nabble.com/file/n196205/EXAMPLE_56d-4_staff_polyRHYTHM-2.gif>
 

Here's the Lilypond code:

\version "2.18.2"


\header { 
  tagline = ""  % removed 
}
#(set-default-paper-size "a4" 'landscape)
\paper {
  indent = 0
  page-count = 1
}

% This code allows page breaks on complex ametric scores with the \breaks
% command. Thanks to Urs Liska and Andrew Ho of the Lilypond user group.

\layout {
  % Create time signature context
  % Source: http://lsr.di.unimi.it/LSR/Snippet?id=272
  % (modified)
  \context {
    \Voice
    %\override VerticalAxisGroup.nonstaff-nonstaff-spacing.stretchability =
#5000
    \remove "Forbid_line_break_engraver"
  }
  \context {
    \type Engraver_group
    % Add elements that _can_ be printed
    \consists "Timing_translator"
    \consists "Time_signature_engraver"
    \consists "Axis_group_engraver"
    \name "TimeLine"
    \alias "Staff"

    % Align time signatures on barlines
    \override TimeSignature.X-offset =
    #ly:self-alignment-interface::x-aligned-on-self
    \override TimeSignature.self-alignment-X = #CENTER
  }
  \context {
    \Score
    \accepts "TimeLine"
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
    \override TupletNumber.text = #tuplet-number::calc-fraction-text
  }
  \context {
    \Staff
    \consists "Timing_translator"
    \remove "Default_bar_line_engraver"
    %\remove "Time_signature_engraver"
    %\override VerticalAxisGroup.staff-spacing.stretchability = #5000

  }
}

% Define line breaks
breaks = {
  {
    s2. \bar "" \break
    s2 \bar "" \break
  }
}

{
  
  
<<
  


  

\new Staff { \clef "treble"
             
            %\time 89888449/5199909
            
    
  % This is the accurate time signature, but it crashes
  % Lilypond. The solution? Use a rational approximation
  % program to find the closest time signature -- 3237/224
  % approximates 89888449/5199909 to within 0.000007142857143094261

 
 % Top time signature is
 % 3*(13/17) + 2*(9/11) + 3*(29/31) + 2*(8/13) + 3*(5/9) + 2*(19/23) + 6 =
89888449/5199909 = 17.2865427068
 % ~ 8989/520
 %
 % Bottom time signature is
 % 3*(11/13) + 2*(7/9) + 3*(5/7) + 2*(3/5) + 3*(7/11) + 2*(4/7) + 6 =
742739/45045 = 16.4888222888
 % ~ 5161/313
 %
 %
 % Ratio of the two time signatures is the value of the tuplet 
 
 % 17.2865427068/16.4888222888 = 1.04837946604 ~ 2067:2167
 
 \once \override Staff.TimeSignature #'stencil = ##f  
  %\time 8989/520
  % More info about the Lilypond time signature bug -- turns out
  % Lilypond can't handle time signatures above about 3900 in either
  % the numerator or denominator. The above meter crashed Lilypond,
  % but the meter below is OK and Lilypond produced engraved output.
  \time 2956/171
  \override Staff.TimeSignature.stencil = #ly:text-interface::print 
  \override Staff.TimeSignature.text = 
  \markup \override #'(baseline-skip . 0) \center-column \number { 
    \concat { 
      "89888449" 
      
    } 
    "5199909" 
  }
    
            
            
            
{ 


\relative c''

{\tuplet 17/13 {c8[ c8 c8]}  c8 \tuplet 11/9 {c8[ c8]} c8 
 \tuplet 31/29 {c8[ c8 c8]} c8 }

\relative c''

{ \tuplet 13/8 {c8[ c8]}  c8 \tuplet 9/5 {c8[ c8 c8]} c8 \tuplet 23/19
 {c8[ c8]} c8 }  
%\bar "|"
\relative c''

{\tuplet 17/13 {c8[ c8 c8]}  c8 \tuplet 11/9 {c8[ c8]} c8 
 \tuplet 31/29 {c8[ c8 c8]} c8 }

\relative c''

{ \tuplet 13/8 {c8[ c8]}  c8 \tuplet 9/5 {c8[ c8 c8]} c8 \tuplet 23/19
 {c8[ c8]} c8 } 
%\breaks
\relative c''

{\tuplet 17/13 {c8[ c8 c8]}  c8 \tuplet 11/9 {c8[ c8]} c8 
 \tuplet 31/29 {c8[ c8 c8]} c8 }

\relative c''

{ \tuplet 13/8 {c8[ c8]}  c8 \tuplet 9/5 {c8[ c8 c8]} c8 \tuplet 23/19
 {c8[ c8]} c8 }  
%\bar "|"
\relative c''

{\tuplet 17/13 {c8[ c8 c8]}  c8 \tuplet 11/9 {c8[ c8]} c8 
 \tuplet 31/29 {c8[ c8 c8]} c8 }

\relative c''

{ \tuplet 13/8 {c8[ c8]}  c8 \tuplet 9/5 {c8[ c8 c8]} c8 \tuplet 23/19
 {c8[ c8]} c8 } 

}
%\bar "|"

}


      


\new Staff { \clef "treble"
 % \time 742739/45045          
\once \override Staff.TimeSignature #'stencil = ##f  
  %\time 5161/313 
  % The above time signature produces a Lilypond crash so the next lowest
  % rational approximation had to be used. That turns out to be
  \time 3677/223
  \override Staff.TimeSignature.stencil = #ly:text-interface::print 
  \override Staff.TimeSignature.text = 
  \markup \override #'(baseline-skip . 0) \center-column \number { 
    \concat { 
      "742739" 
      
    } 
    "45045" 
  }

  

  
   
   \tuplet 2067/2167    {
% This is the ratio of the two time signatures reduced to
% decimals



\relative c''

{c8 \tuplet 13/11 {c8[ c8 c8]}  c8 \tuplet 9/7 {c8[ c8]} c8 \tuplet 7/5
 {c8[ c8 c8]} }  


\relative c''

{c8 \tuplet 5/3 {c8[ c8]}  c8 \tuplet 11/7 {c8[ c8 c8]} c8 
 \tuplet 7/4 {c8[ c8]} }  
}

  \tuplet 2067/2167    {
% This is the ratio of the two time signatures reduced to
% decimals



\relative c''

{c8 \tuplet 13/11 {c8[ c8 c8]}  c8 \tuplet 9/7 {c8[ c8]} c8 \tuplet 7/5
 {c8[ c8 c8]} }  


\relative c''

{c8 \tuplet 5/3 {c8[ c8]}  c8 \tuplet 11/7 {c8[ c8 c8]} c8 
 \tuplet 7/4 {c8[ c8]} }  
}
%\breaks
%\bar "|"
  \tuplet 2067/2167    {
% This is the ratio of the two time signatures reduced to
% decimals



\relative c''

{c8 \tuplet 13/11 {c8[ c8 c8]}  c8 \tuplet 9/7 {c8[ c8]} c8 \tuplet 7/5
 {c8[ c8 c8]} }  


\relative c''

{c8 \tuplet 5/3 {c8[ c8]}  c8 \tuplet 11/7 {c8[ c8 c8]} c8 
 \tuplet 7/4 {c8[ c8]} }  
}

\tuplet 2067/2167    {
% This is the ratio of the two time signatures reduced to
% decimals



\relative c''

{c8 \tuplet 13/11 {c8[ c8 c8]}  c8 \tuplet 9/7 {c8[ c8]} c8 \tuplet 7/5
 {c8[ c8 c8]} }  


\relative c''

{c8 \tuplet 5/3 {c8[ c8]}  c8 \tuplet 11/7 {c8[ c8 c8]} c8 
 \tuplet 7/4 {c8[ c8]} }  
}
 
}

>>

}







--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-to-get-a-polymeter-with-time-signature-89888449-5199909-against-742739-45045-tp196205.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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