lilypond-user
[Top][All Lists]
Advanced

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

Re: \makeOctaves broken?


From: David Kastrup
Subject: Re: \makeOctaves broken?
Date: Thu, 19 Apr 2012 15:46:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Jan-Peter Voigt <address@hidden> writes:

> Hello David,
>
> thank you for implementing this stuff!
> This is nice, but there are two things to mention:
> 1. with Urs' example, lily complains about Slurs it can't finish

Not really surprising since slurs start on two notes and finish on three
with the modified example.  I did not bother making them match.

> 2. if you try this tiny snippet, the chord <g b> is actually broken in
> two notes and the slur is typed twice.

>   \new Staff \makeDuped c e \relative c' {
>     c e( g b c)

That's because this gets transformed into \new Staff << notes notes >>
and "implicit voice creation" makes _two_ voices from that.  Try with
\new Voice \makeDuped ...
instead.

> So how do you build real (event)chords with these functions?

What functions?  \makeDuped does not build chords.  It just creates
parallel music.  \relTranspose does not build chords.  It just
transposes music in a manner that will work inside of \relative (so your
above example is not really making use of this particular artistry and
could have used regular \transpose instead of \relTranspose).

\transpose and \withMusicProperty are documented as music functions in
the Notation Reference.  The ly:* Scheme functions are documented in the
LilyPond Internals manual.  Things like make-simultaneous-music and
fold-some-music are written in scm/music-functions.scm.  I don't think
that their documentation is transported to some manual: that's just like
with music-map.

You can get it with
lilypond scheme-sandbox
guile> (procedure-documentation fold-some-music)
"This works recursively on music like @code{fold} does on a list,
calling @samp{(@var{pred?} music)} on every music element.  If
@code{#f} is returned for an element, it is processed recursively
with the same initial value of @samp{previous}, otherwise
@samp{(@var{proc} music previous)} replaces @samp{previous}
and no recursion happens.
The top @var{music} is processed using @var{init} for @samp{previous}."

Probably there are better ways to get this.

-- 
David Kastrup



reply via email to

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