Code review - Issue 154056: Issue #768: Chord repetition shortcuthttps://codereview.appspot.com/2009-11-14T10:30:37+00:00rietveld
Message from unknown
2009-11-11T19:03:34+00:00nicolas.sceauxurn:md5:cbb93f7e888c81c3c56d1d3987de7d24
Message from nicolas.sceaux@gmail.com
2009-11-11T19:12:55+00:00nicolas.sceauxurn:md5:2c19f94dffdcb81659f7644862b64d47
Hi,
Here is a patch adding the chord repetition functionality that has been discussed a few times.
I've defined arbitrary defaults: see ly/chord-repetition-init.ly
For some reason, ly-syntax-constructor.scm was not uploaded
--- a/scm/ly-syntax-constructors.scm
+++ b/scm/ly-syntax-constructors.scm
@@ -131,6 +131,11 @@
'duration duration
'origin location))
+(define-ly-syntax (repetition-chord parser location previous-chord repetition-function duration articulations)
+ (let ((new-chord (repetition-function previous-chord duration articulations)))
+ (set! (ly:music-property new-chord 'origin) location)
+ new-chord))
+
(define-ly-syntax-simple (context-specification type id mus ops create-new)
(let* ((type-sym (if (symbol? type) type (string->symbol type)))
(csm (context-spec-music mus type-sym id)))
Message from Carl.D.Sorensen@gmail.com
2009-11-12T21:40:37+00:00Carlurn:md5:f640f8d5fc33721d8cd3dd16216d60d7
Nicolas,
It looks great! Thanks.
I have just a couple of suggestions for changes to the documentation, and a question about the init file.
Thanks,
Carl
http://codereview.appspot.com/154056/diff/1/2
File Documentation/notation/simultaneous.itely (right):
http://codereview.appspot.com/154056/diff/1/2#newcode91
Documentation/notation/simultaneous.itely:91: Like in the case of regular chords, the chord repetition symbol can be
"As" instead of "Like"
http://codereview.appspot.com/154056/diff/1/2#newcode97
Documentation/notation/simultaneous.itely:97:
Should there be a statement here that only the notes are duplicated?
http://codereview.appspot.com/154056/diff/1/10
File ly/chord-repetition-init.ly (right):
http://codereview.appspot.com/154056/diff/1/10#newcode1
ly/chord-repetition-init.ly:1: \version "2.13.8"
Just a question. Why do this in a .ly file instead of in a .scm file?
Message from nicolas.sceaux@gmail.com
2009-11-13T17:43:17+00:00nicolas.sceauxurn:md5:34407b35f7adbefbfd33c054564b9b11
On 2009/11/12 21:40:37, Carl wrote:
> http://codereview.appspot.com/154056/diff/1/10#newcode1
> ly/chord-repetition-init.ly:1: \version "2.13.8"
> Just a question. Why do this in a .ly file instead of in a .scm file?
This initializes the parser object, and thus shall be placed in a .ly file, where this object is accessible.
It is similar to language files, defining note names: this file in particular defines the shortcut name.
I'm correcting the documentation as you suggest. Thanks for your review.
Message from unknown
2009-11-14T10:24:47+00:00nicolas.sceauxurn:md5:30a3da5eff4bd7350376ab2fd244ff96
Message from nicolas.sceaux@gmail.com
2009-11-14T10:30:37+00:00nicolas.sceauxurn:md5:fc7e9fb95a4ea981b01ec9b2e9ea403d
On 2009/11/12 21:40:37, Carl wrote:
> Nicolas,
>
> It looks great! Thanks.
>
> I have just a couple of suggestions for changes to the documentation
I've addressed your remarks concerning documentation in a new patch
<http://codereview.appspot.com/154056>