lilypond-user
[Top][All Lists]
Advanced

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

Re: Combining chord durations


From: Jim Long
Subject: Re: Combining chord durations
Date: Mon, 21 Oct 2013 11:42:28 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Oct 21, 2013 at 01:59:11PM +0200, Johan Vromans wrote:
> I use a score to produce PDF and MIDI.
> 
> To obtain a rhythmic pattern in the MIDI, I write the chords as:
> 
>   ees8 ees ees ees ees ees bes bes |
>   c:m c:m c:m c:m aes aes aes aes  |
>   ees ees ees ees bes bes bes bes  |
>   ees ees ees ees ees ees ees ees  |
> 
> In the printed score, the chord changes are not shown, which is what I
> want, but it seems that the duration of the chords affects the amount of
> space that is allocated for the printed output.

>From the standpoint of the layout, this looks like Issue #3092:

https://code.google.com/p/lilypond/issues/detail?id=3092

But I gather that your question is somewhat different, especially
since the work-arounds given in that URL completely disregard
MIDI output and focus only on improving the spacing of chords in
the PDF output.

The reason your layout gets stretched is roughly because
LilyPond's chord-suppression logic for repeated chord markups
effectively makes the chord markup "transparent" rather than
eliminating it entirely.  Thus even the invisible chords still
take up space in the layout.

I regret that I can offer only some informal, even ugly
suggestions:

1) when writing multiple repetitions of chords, use LilyPond's
'q' shortcut.  This doesn't begin to address your problem, but it
might at least save you a little bit of typing, although you may
perceive a difference in readability:

\chordmode {
   ees8  q   q   q   q   q   bes q  |
   c:m   q   q   q   aes q   q   q  |
   ees   q   q   q   bes q   q   q  |  % obssessive-compulsive text
   ees   q   q   q   q   q   q   q  |  % alignment is optional
}

2) Once you have manually created the MIDI rhythms you want in
the LilyPond input file, you can fix some of the resulting layout
problems by de-activating the chord stencil during stretches of
repeated chords.  This re-introduces a lot of typing!  I haven't
tested this, but maybe you can create variables:

csOff = { \override ChordName #'stencil = ##f }
csOn  = { \revert   ChordName #'stencil }

and then do (something like):

\chordmode {
   \csOn ees8  \csOff q   q   q   q   q   \csOn bes \csOff q  |
   \csOn c:m   \csOff q   q   q   \csOn aes \csOff q   q   q  |
   \csOn ees   \csOff q   q   q   \csOn bes \csOff q   q   q  |  % 
obssessive-compulsive text
   \csOn ees   \csOff q   q   q   q   q   q   q  |  % alignment is futile
}

If that's not ugly enough -- and I have no idea whether this
could actually work -- if you are fluent in Scheme, perhaps you
can write a function 'wrapChord' which accepts a chordmode chord
identifier x and wraps it in:

\override ChordName #'stencil = ##t
x
\override ChordName #'stencil = ##f

And then (hypothetically) you could say:

\chordmode {
   \wrapChord ees8  q   q   q   q   q   \wrapChord bes q  |
   \wrapChord c:m   q   q   q   \wrapChord aes q   q   q  |
   \wrapChord ees   q   q   q   \wrapChord bes q   q   q  |
   \wrapChord ees   q   q   q   q   q   q   q             |
}

3) Instead of #2, and again I haven't tested this (much), could
tremoli help you?

It seems you want a constant eighth-note pattern (ostenato?) to
your MIDI chords.  Perhaps (untested!) if you write:

\repeat tremolo N c8:m

where N is the duration in eighth notes, that might work?  Your
example:

  ees2. bes4  |
  c2:m  aes2  |
  ees2  bes2  |
  ees1        |

would become:

  \repeat tremolo 6 ees8  \repeat tremolo 2 bes8  |
  \repeat tremolo 4 c8:m  \repeat tremolo 4 aes8  |
  \repeat tremolo 4 ees8  \repeat tremolo 4 bes8  |
  \repeat tremolo 8 ees8        |

I never use LilyPond's MIDI output, so I don't know if that will
be useful to you or not.  The layout looked okay when I tested this 
method, though.

Again, I'm sorry that I don't have any definite suggestions, but
perhaps these topics will help you think of a workaround that
works for you.

Jim

Attachment: test.ly
Description: Text Data


reply via email to

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