Would somebody please be so kind and push the attached patches?
Thanks
Urs
-------- Original-Nachricht --------
Betreff: Re: Issue 3856 in lilypond: Doc: NR Add dodecaphonic-no-repeat
accidental style
Datum: Mon, 17 Feb 2014 08:55:48 +0000
Von: lilyp...@googlecode.com
An: lilyli...@googlemail.com
Updates:
Labels: -Patch-countdown Patch-push
Comment #8 on issue 3856 by pkx166h: Doc: NR Add dodecaphonic-no-repeat
accidental style
http://code.google.com/p/lilypond/issues/detail?id=3856
(No comment was entered for this change.)
--
You received this message because you are the owner of the issue.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply to this email to add a comment or make updates.
>From 9f784c97afa35d0bcfca1d0f3b5cda08fa767dff Mon Sep 17 00:00:00 2001
From: David Nalesnik <david.nales...@gmail.com>
Date: Mon, 10 Feb 2014 13:06:55 +0100
Subject: [PATCH 1/2] Issue 3856: dodecaphonic-no-repeat accidentalStyle
This adds an accidental style that works like the
dodecaphonic style except that it does _not_
print an accidental if the note is in the same
voice immediately preceded with a note of the same pitch.
---
scm/music-functions.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/scm/music-functions.scm b/scm/music-functions.scm
index c7f41ea..72005f9 100644
--- a/scm/music-functions.scm
+++ b/scm/music-functions.scm
@@ -1591,6 +1591,21 @@ look at bar lines nor different accidentals at the same note name."
(cons #f (not (or (equal? acc key-acc)
(and (equal? entrybn barnum) (equal? entrymp measurepos)))))))))
+(define-public (dodecaphonic-no-repeat-rule context pitch barnum measurepos)
+ "An accidental rule that typesets an accidental before every note
+(just as in the dodecaphonic accidental style) @emph{except} if the note
+is immediately preceded by a note with the same pitch. This is a common
+accidental style in contemporary notation."
+ (let* ((keysig (ly:context-property context 'localKeySignature))
+ (entry (find-pitch-entry keysig pitch #t #t)))
+ (if (not entry)
+ (cons #f #t)
+ (let* ((entrymp (key-entry-measure-position entry))
+ (entrybn (key-entry-bar-number entry)))
+ (cons #f
+ (not
+ (and (equal? entrybn barnum) (equal? entrymp measurepos))))))))
+
(define-public (teaching-accidental-rule context pitch barnum measurepos)
"An accidental rule that typesets a cautionary accidental if it is
included in the key signature @emph{and} does not directly follow a note
@@ -1701,6 +1716,14 @@ as a context."
`(Staff ,(lambda (c p bn mp) '(#f . #t)))
'()
context))
+ ;; As in dodecaphonic style with the exception that immediately
+ ;; repeated notes (in the same voice) don't get an accidental
+ ((equal? style 'dodecaphonic-no-repeat)
+ (set-accidentals-properties #f
+ `(Staff ,(make-accidental-rule 'same-octave 0)
+ ,dodecaphonic-no-repeat-rule)
+ '()
+ context))
;; Multivoice accidentals to be read both by musicians playing one voice
;; and musicians playing all voices.
;; Accidentals are typeset for each voice, but they ARE canceled across voices.
--
1.7.10.4
>From f2ee468feba0b9b746ce6e9e3b67221a09b90746 Mon Sep 17 00:00:00 2001
From: David Nalesnik <david.nales...@gmail.com>
Date: Mon, 10 Feb 2014 13:13:45 +0100
Subject: [PATCH 2/2] Issue 3856: Doc for dodecaphonic-no-repeat
---
Documentation/notation/pitches.itely | 58 ++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely
index 03177fc..5d24686 100644
--- a/Documentation/notation/pitches.itely
+++ b/Documentation/notation/pitches.itely
@@ -2443,6 +2443,64 @@ musicB = {
}
@end lilypond
+@item dodecaphonic-no-repeat
+
+@cindex dodecaphonic accidental style
+@cindex dodecaphonic style, neo-modern
+
+@funindex dodecaphonic-no-repeat
+
+Like with the dodecaphonic accidental style @emph{every} note
+gets an accidental sign by default, but accidentals are
+suppressed for pitches immediately repeated within one voice.
+
+@lilypond[quote]
+musicA = {
+ <<
+ \relative c' {
+ cis'8 fis, bes4 <a cis>8 f bis4 |
+ cis2. <c, g'>4 |
+ }
+ \\
+ \relative c' {
+ ais'2 cis, |
+ fis8 b a4 cis2 |
+ }
+ >>
+}
+
+musicB = {
+ \clef bass
+ \new Voice {
+ \voiceTwo \relative c' {
+ <fis, a cis>8[ <fis a cis>
+ \change Staff = up
+ cis' cis
+ \change Staff = down
+ <fis, a> <fis a>]
+ \showStaffSwitch
+ \change Staff = up
+ dis'4 |
+ \change Staff = down
+ <fis, a cis>4 gis <f a d>2 |
+ }
+ }
+}
+
+\new PianoStaff {
+ <<
+ \context Staff = "up" {
+ \accidentalStyle dodecaphonic-no-repeat
+ \musicA
+ }
+ \context Staff = "down" {
+ \accidentalStyle dodecaphonic-no-repeat
+ \musicB
+ }
+ >>
+}
+@end lilypond
+
@item teaching
--
1.7.10.4
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel