lilypond-user
[Top][All Lists]
Advanced

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

Re: Cannot correctly code this rhythm...


From: Carl D. Sorensen
Subject: Re: Cannot correctly code this rhythm...
Date: Sat, 21 Feb 2009 10:48:48 -0700



On 2/20/09 5:23 PM, "RandomLilyPondUser" <address@hidden> wrote:

> 
> 
> Sure, that works for a new project, but what about in the context of my drum
> project I've attached a couple posts back?
>

I looked into your project, but the project was complex enough that I didn't
want to spend the time to figure it all out.

I did get far enough to think that perhaps strict spacing only applies to
music notes.  Grace notes and bar lines appear to be spaced around the notes
to avoid collisions.  So, because of the number of grace notes you have, it
may not be possible to get the bar lines aligned, even if the main notes are
all perfectly aligned.

> is the repetitive repeating / unfolding / time signature code the only way
> to do this

The key issues I needed to add in order to make all the barlines align are:

Set strict-note-spacing #t
Set uniform-stretching #t
set  proportionalNotationDuration to an appropriate level

These three things get the notes set right.

Then I need an invisible time signature at the beginning of each line to
match the space taken up by the time signature at the beginning of the first
line.

To achieve this I set TimeSignature break-visibility to
#begin-of-line-visible.
Also, after the first line, I set TimeSignature transparent to #t.
Then I have to add a new \time at each \break in order to generate the time
signature.

My repeat unfold code is just a shortcut to get lots of measures with a
little bit of typing, copying, and pasting.

The repeat unfold has nothing to do with it.

OTOH, the time signature at the end of each line is important, because I
need to use up the space for a time signature at the beginning of each line
so that the lines will match up with the first line that has a time
signature.

This should not be a huge problem for you, since you already control the
line breaks very tightly.

And it is possible to put all the line breaks in a spacing voice, as you can
see below:

\version "2.12"
#(set-default-paper-size "letter")

theNotes = {
  \repeat unfold 4 { c'4 c' c' c'}
  \repeat unfold 4 { \repeat unfold 8 {e'8}}
  \repeat unfold 4 { c'4 c' c' c'}
}

theSpacing = {
  \set Score.proportionalNotationDuration = #(ly:make-moment 1 16)
  \override Score.SpacingSpanner #'strict-note-spacing = ##t
  \override Score.SpacingSpanner #'uniform-stretching = ##t
  \override Score.TimeSignature #'break-visibility = #begin-of-line-visible
  s1*3
  \override Score.TimeSignature #'transparent = ##t
  \time 4/4 \break s1*3
  \time 4/4 \break s1*3
  \time 4/4 \break s1*3
}

\new Staff {
  <<
    \theSpacing
    \theNotes
  >>
}

\layout{
  indent=#0
}





reply via email to

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