Am 09.07.2013 11:41, schrieb Urs Liska:
Am 07.07.2013 10:46, schrieb Karl Hammar:
Janek:

///

If you look at:

  http://downloads2.makemusic.com/blog/elementsv1-p221.pdf &

from his "Binary Theory and Creation of the Fundamental Rhythm
Patterns", you'll see that the table is simply a

  pattern = 0x00E0; // where each bit '1' is 64th note, '0' 64 pause

  while ( pattern < 0xFF ) {
   print_top7bits(pattern);
   print_byte(pattern);
   pattern++;
   print_byte(pattern);
   pattern++;
   next_line();
  }

  make_box();

How hard would that to do in lilypond ?
I'm not sure, but I would also consider writing a script/program to generate the necessary code. The author prints hundreds of examples, and he needs the patterns in different places of his books, so that might be the way to go.

///

If you look at his

  http://downloads2.makemusic.com/blog/elementsv2-p79.pdf

the exercise 19 and 20 are similar to the above,


I try to recreate ex. 19 with LilyPond and unfortunately it isn't that easy either :-( If you look at the attached score you'll notice that the barlines don't align. Playing around with proportionalDurationNotation didn't help. Is it possible at all to achieve that? Maybe by somehow forcing the first notes of the systems to align (after the different time signatures)? If that's not possible I have to fallback to using one single system with independent Timings. That would make alignment perfect, but I'd prefer to have both options.

Any ideas?

Urs

I now tried it the other way and am quite confused:
I managed to get everything lined up neatly, but I don't know where all those additional barlines come from (and don't get rid of them).
If I set Timing.defaultBarType = ""

the barlines are right, but the system isn't justified to line-width anymore ...

Any help welcome.
Urs

\version "2.16.2"

\paper {
  % Remove the indentation of the first system
  indent = 0
  ragged-last = #f
  % Set the number of systems to prevent line breaks in the middle of a pattern
}

% Define the pattern.
% This could also be done using a Scheme function,
% but I want to keep it simple for this example.
pattern = { 
  c2[ r r c] r r r |
  c2[ r r c r r c] |
  c2[ r r c r c] r |
  c2[ r r c r c c] 
}

I =  {
  % Turn stems upwards (cosmetic modification)
  \stemUp  
  % Set initial time signature
  \time 7/2
  %
  \scaleDurations 1/16
%  \set proportionalNotationDuration = #(ly:make-moment 1 2)
  % Use the pattern
  \pattern
}

II =  {
  \stemUp  
  \time 7/2
  \set DrumStaff.timeSignatureFraction = 7/4
  \shiftDurations #1 #0
  \scaleDurations 1/8
  \pattern
}

III =  {
  \stemUp  
  \time 7/2
  \set DrumStaff.timeSignatureFraction = 7/8
  \shiftDurations #2 #0
  \scaleDurations 1/4
  \pattern
}

IV =  {
  \stemUp  
  \time 7/2
  \set DrumStaff.timeSignatureFraction = 7/16
  \shiftDurations #3 #0
  \scaleDurations 1/2
  \pattern
}

V =  {
  \stemUp  
  \time 7/2
  \set DrumStaff.timeSignatureFraction = 7/32
  %\scaleDurations 1/4
  \shiftDurations #4 #0
  \pattern
}


\layout {
  \context {
    \Score
    \remove Timing_translator
    % remove connecting line at system start
    \override SystemStartBar #'stencil = ##f
  }
  \context {
    \DrumStaff
      \consists Timing_translator
      \override StaffSymbol #'line-count = #1
  }
}

\score {
  <<
    \new DrumStaff \drummode { \I }
    \new DrumStaff \drummode { \II }
    \new DrumStaff \drummode { \III }
    \new DrumStaff \drummode { \IV }
    \new DrumStaff \drummode { \V }
  >>
  \layout { }
}

<<attachment: aldridge-ex-19-score.preview.png>>

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to