[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New feature: automatically invert chords or drop/rise chord notes (i
From: |
dak |
Subject: |
Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden) |
Date: |
Tue, 29 Jan 2019 08:51:23 -0800 |
On 2019/01/28 21:53:04, dak wrote:
On 2019/01/28 20:02:53, Valentin Villenave wrote:
> I can’t figure out how to make it work without resetting the
EventChord’s
> elements list. How would you proceed?
Without any pointer to what you are having problems with, this is
essentially
"do it yourself". Sigh. I don't even understand what those
interfaces are
supposed to be good for so I at least changed the internals to stop
chaotically
mixing directions and counts. The user-level commands remain as
chaotic as I
find them to be.
Try this patched-up variant of code posted in the mailing list.
%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.21.0"
#(define-public (move-chord-note n octs)
(_i "Transpose a note (numbered as @var{n}) by @var{octs} octaves.
@var{n} is zero-based and can be negative to count from the end.")
(lambda (music)
(define (proper-pitch note)
(let* ((oct (ly:music-property note 'octavation))
(pitch (ly:music-property note 'pitch)))
(if (number? oct)
(ly:pitch-transpose pitch (ly:make-pitch oct 0))
pitch)))
Well, considering the way invertChords is written, this should likely
just be
(define (proper-pitch note) (ly:music-property note 'pitch))
since "octavation" is only informational without affecting the pitch.
Thinko, sorry.
By the way, I find it somewhat strange that the code discussion on the
user list as well as the patch progress here completely ignore this
contribution. After all, it was solicited.
https://codereview.appspot.com/365840043/
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), dak, 2019/01/23
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), v . villenave, 2019/01/23
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), dak, 2019/01/23
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), v . villenave, 2019/01/28
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), dak, 2019/01/28
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden),
dak <=
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), japaipy, 2019/01/30
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), japaipy, 2019/01/30
- Re: New feature: automatically invert chords or drop/rise chord notes (issue 365840043 by address@hidden), v . villenave, 2019/01/30