[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: combining chords in chords
From: |
Aaron Hill |
Subject: |
Re: combining chords in chords |
Date: |
Thu, 22 Apr 2021 06:29:16 -0700 |
User-agent: |
Roundcube Webmail/1.4.9 |
On 2021-04-22 6:01 am, Gianmaria Lari wrote:
I have some variables, each containing one chord as in the following
example:
[...]
How can I solve this?
Here's a way that involves merging the elements of the two EventChords:
%%%%
\version "2.22.0"
ja = <c e>8
jb = <g b>8
jc = <d f>8
mergeChords =
#(begin
(define (event-chord-music? arg)
(music-type-predicate 'event-chord))
(define-music-function
(first second)
(event-chord-music? event-chord-music?)
(set! first (ly:music-deep-copy first))
(ly:music-set-property! first 'elements
(append
(ly:music-property first 'elements)
(ly:music-property second 'elements)))
first))
ka = \mergeChords \ja \jb
kb = \mergeChords \ja \jc
kc = \mergeChords \jb \jc
\new Voice \fixed c' { \ka[ \kb \kc] }
%%%%
Could be some hidden quirks with this approach, but it does seem to
allow the manual beaming to work.
-- Aaron Hill
- combining chords in chords, Gianmaria Lari, 2021/04/22
- Re: combining chords in chords,
Aaron Hill <=
- Re: combining chords in chords, Valentin Petzel, 2021/04/22
- Re: combining chords in chords, Gianmaria Lari, 2021/04/22
- Re: combining chords in chords, Gianmaria Lari, 2021/04/22
- Re: combining chords in chords, Carl Sorensen, 2021/04/22
- Re: combining chords in chords, Carl Sorensen, 2021/04/22
- Re: combining chords in chords, David Kastrup, 2021/04/22
- Re: combining chords in chords, Gianmaria Lari, 2021/04/23
- Re: combining chords in chords, Valentin Petzel, 2021/04/23
- Re: combining chords in chords, Valentin Petzel, 2021/04/23