[Top][All Lists]
[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 17:00:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> 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.
Possibly adding \context Voice helps:
makeDuped =
#(define-music-function (parser location from arg mus)
(ly:pitch? ly:music? ly:music?)
#{ \context Voice
$(make-simultaneous-music
(fold-some-music
(lambda (m) (music-is-of-type? m 'note-event))
(lambda (p l)
(cons #{ \relTranspose $from $(ly:music-property p 'pitch) $mus #}
l))
(list mus)
arg))
#})
I am not sure that this will not have side effects in other situations,
though: you would need to experiment with it.
--
David Kastrup
Re: \makeOctaves broken?, Gilles, 2012/04/19
Re: \makeOctaves broken?, David Kastrup, 2012/04/19
Re: \makeOctaves broken?, David Kastrup, 2012/04/19
Re: \makeOctaves broken?, David Kastrup, 2012/04/19