* input/test/chord-names-dpnj.ly: Resurrect.
* lily/my-lily-lexer.cc: Remove chordnames keyword.
* ly/chord-modifiers-init.ly (ignatzekExceptions): Update, tidy up.
* scm/chord-name.scm (sequential-music-to-chord-exceptions):
Better docstring, add parameter NON-ROOT, tidy up.
+2003-06-03 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * input/test/dpncnt.ly:
+ * input/test/chord-names-dpnj.ly: Resurrect.
+
+ * lily/my-lily-lexer.cc: Remove chordnames keyword.
+
+ * ly/chord-modifiers-init.ly (ignatzekExceptions): Update, tidy up.
+
+ * scm/chord-name.scm (sequential-music-to-chord-exceptions):
+ Better docstring, add parameter NON-ROOT, tidy up.
+
2003-06-03 Heikki Junes <hjunes@cc.hut.fi>
* lilypond-indent.el: match two-char slurs \[ ... \] and \( ... \).
-% FIXME: currently doesn't do anything useful. fix or delete.
+\version "1.7.18"
+
\header {
texidoc = "Chord name scheme test -- double-plus-new-chord-name jazz"
}
-\version "1.7.18"
-
-
-
-\score { \notes { c4^"fixme"}}
-
%% This should only be necessary if your kpathsea setup is broken
%
% Make sure the correct msamxx.tfm is where lily can find it
% cp $(locate msam9.tfm) $LILYPONDPREFIX/fonts/tfm
%
-%{
scheme = \chords {
% major chords
% minor chords
c:m % m = minor triad
- c:m.6 % m6 = minor triad with added sixth
- c:m.7+ % m triangle = minor major seventh chord
+ c:m6 % m6 = minor triad with added sixth
+ c:m7+ % m triangle = minor major seventh chord
c:3-.6.9^7 % m6/9
- c:m.7 % m7
+ c:m7 % m7
c:3-.9 % m9
c:3-.9^7 % madd9
c:m5-.7- % o = diminished seventh chord
}
-efull = \chordnames {
+efullmusic = \notes {
%% ? what 'bout maj7?
%% c:7 = \markup { \normal-size-super "maj7" }
%% American:
%% c:3-.5-.7- = \markup { "dim" }
%% Jazz:
- c:3-.5-.7- = \markup { \super " o" }
-
- %% Hmm
-
- %% This ok?
- c:7+ = \markup { \normal-size-super \override #'(font-family . math) "N" }
+ %% c:3-.5-.7-
+ <<c es ges bes>>-\markup { \super " o" }
+
+ %% Hmm, this ok?
+ %% c:7+
+ <<c e g b>>-\markup { \normal-size-super
+ \override #'(font-family . math) "N" }
+ %%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
+ %%c:3.5.7 = \markup { \normal-size-super "maj7" }
}
-epartial = \chordnames {
- c:2^3 = \markup { \normal-size-super "2" }
- c:3- = \markup { "m" }
- c:4 = \markup { \normal-size-super "sus4" }
- c:5^3 = \markup { \normal-size-super "5" }
+efull = #(sequential-music-to-chord-exceptions efullmusic #f)
+
+epartialmusic = \notes {
+ %c:2^3 =
+ <<c d>>-\markup { \normal-size-super "2" }
+ %c:3-
+ <<c es>>-\markup { "m" }
+ %c:4
+ <<c f>>-\markup { \normal-size-super "sus4" }
+ %c:5^3
+ <<c g>>-\markup { \normal-size-super "5" }
}
+epartial = #(sequential-music-to-chord-exceptions epartialmusic #f)
+
\score {
\notes <
\context ChordNames {
}
%% new-chords-done %%
-%}
+\version "1.7.18"
\header {
texidoc = "test file for new-new-chord names, ie, double-plus-new-chord-name
-TODO: FIXME.
"
}
-\score { \notes { c4^"fixme"}}
-
-%{
-
-efull = \chordnames {
+efullmusic = \notes {
%% ? what 'bout maj7?
%% c:7 = \markup { \normal-size-super "maj7" }
%% American:
%% c:3-.5-.7- = \markup { "dim" }
%% Jazz:
- c:3-.5-.7- = \markup { \super " o" }
-
- %% Hmm
- %% ;;Pick your favorite maj7
- %% ((0) mathm-markup-object) ;;a white triangle
- %% ;;((0) mathn-markup-object) ;;a black triangle
- %% ;;((0) (make-simple-markup "maj7")) ;;good old maj7
+ %% c:3-.5-.7-
+ <<c es ges bes>>-\markup { \super " o" }
- %% This ok?
- c:7+ = \markup { \normal-size-super \override #'(font-family . math) "N" }
+ %% Hmm, this ok?
+ %% c:7+
+ <<c e g b>>-\markup { \normal-size-super
+ \override #'(font-family . math) "N" }
%%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
%%c:3.5.7 = \markup { \normal-size-super "maj7" }
}
-epartial = \chordnames {
- c:2^3 = \markup { \normal-size-super "2" }
- c:3- = \markup { "m" }
- c:4 = \markup { \normal-size-super "sus4" }
- c:5^3 = \markup { \normal-size-super "5" }
+efull = #(sequential-music-to-chord-exceptions efullmusic #f)
+
+epartialmusic = \notes {
+ %c:2^3 =
+ <<c d>>-\markup { \normal-size-super "2" }
+ %c:3-
+ <<c es>>-\markup { "m" }
+ %c:4
+ <<c f>>-\markup { \normal-size-super "sus4" }
+ %c:5^3
+ <<c g>>-\markup { \normal-size-super "5" }
}
+epartial = #(sequential-music-to-chord-exceptions epartialmusic #f)
+
ch = \notes \transpose c' c'
{
}
}
}
-
-%}
{"bar", BAR},
{"breathe", BREATHE},
{"chordmodifiers", CHORDMODIFIERS},
- {"chordnames", CHORDNAMES},
{"chords", CHORDS},
{"clef", CLEF},
{"consists", CONSISTS},
\version "1.7.18"
-
\chordmodifiers #default-chord-modifier-list
+whiteTriangleMarkup = #(make-override-markup
+ '(font-family . math) (make-simple-markup "M"))
-whiteTriangleMarkup =#(make-override-markup '(font-family . math) (make-simple-markup "M"))
-
-blackTriangleMarkup = #(make-override-markup '(font-family . math) (make-simple-markup "N"))
+blackTriangleMarkup = #(make-override-markup
+ '(font-family . math) (make-simple-markup "N"))
-ignatzekExceptionMusic = \notes {
+ignatzekExceptionMusic = \notes{
<<c e gis>>1-\markup { "+" }
<<c es ges>>-\markup { \super "o" } % should be $\circ$ ?
<<c es ges bes>>-\markup { \super \combine "o" "/" }
<<c es ges beses>>-\markup { \super "o7" }
}
-ignatzekExceptions = #(sequential-music-to-chord-exceptions ignatzekExceptionMusic)
+ignatzekExceptions = #(sequential-music-to-chord-exceptions
+ ignatzekExceptionMusic #t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-(define-public (sequential-music-to-chord-exceptions seq)
- "Transform sequential music of <<a b c>>-\markup{ foobar } type to
- (cons ABC-PITCHES FOOBAR-MARKUP)
- "
-
+(define-public (sequential-music-to-chord-exceptions seq omit-root)
+ "Transform sequential music SEQ of type <<c d e>>-\markup{ foobar }
+to (cons CDE-PITCHES FOOBAR-MARKUP), or to (cons DE-PITCHES
+FOOBAR-MARKUP) if OMIT-ROOT.
+"
+ (define (chord-to-exception-entry m)
+ (let* ((elts (ly:get-mus-property m 'elements))
+ (pitches (map (lambda (x) (ly:get-mus-property x 'pitch))
+ (filter-list
+ (lambda (y) (memq 'note-event
+ (ly:get-mus-property y 'types)))
+ elts)))
+ (sorted (sort pitches ly:pitch<?))
+ (root (car sorted))
+ (normalized (map (lambda (x) (ly:pitch-diff x root)) sorted))
+ (texts (map (lambda (x) (ly:get-mus-property x 'text))
+ (filter-list
+ (lambda (y) (memq 'text-script-event
+ (ly:get-mus-property y 'types)))
+ elts)))
+ (text (if (null? texts) #f (car texts))))
+ (cons (if omit-root (cdr normalized) normalized) text)))
+
(define (is-req-chord? m)
(and
(memq 'event-chord (ly:get-mus-property m 'types))
- (not (equal? (ly:make-moment 0 1) (ly:get-music-length m)))
- ))
-
- (define (chord-to-exception-entry m)
- (let*
- (
- (elts (ly:get-mus-property m 'elements))
- (pitches (map
- (lambda (x)
- (ly:get-mus-property x 'pitch)
- )
- (filter-list
- (lambda (y) (memq 'note-event (ly:get-mus-property y 'types)))
- elts)))
- (sorted (sort pitches ly:pitch<? ))
- (root (car sorted))
- (non-root (map (lambda (x) (ly:pitch-diff x root)) (cdr sorted)))
- (texts (map
- (lambda (x)
- (ly:get-mus-property x 'text)
- )
-
- (filter-list
- (lambda (y)
- (memq 'text-script-event
- (ly:get-mus-property y 'types))) elts)
- ))
- (text (if (null? texts)
- #f
- (car texts)))
-
- )
- (cons non-root text)
- ))
-
- (let*
- (
- (elts (filter-list is-req-chord? (ly:get-mus-property seq 'elements)))
- (alist (map chord-to-exception-entry elts))
- )
- (filter-list (lambda (x) (cdr x)) alist)
- ))
-
+ (not (equal? (ly:make-moment 0 1) (ly:get-music-length m)))))
+ (let* ((elts (filter-list is-req-chord? (ly:get-mus-property seq 'elements)))
+ (alist (map chord-to-exception-entry elts)))
+ (filter-list (lambda (x) (cdr x)) alist)))
(define-public (new-chord-name-brew-molecule grob)
'(())))
(if #f (begin
- (write-me "options: " options)
- (write-me "pitches: " pitches)))
+ (write-me "options: " options)
+ (write-me "pitches: " pitches)))
(let* ((full-exceptions (assoc-get 'full-exceptions options))
(full-exception (full-match full-exceptions))
(full-markup (cdr full-exception))
(if #f (begin
- (write-me "full:" full)
- ;; (write-me "partial-pitches:" partial-pitches)
- (write-me "full-markup:" full-markup)
- (write-me "partial-markup:" partial-markup)
- (write-me "all:" all)
- (write-me "altered:" altered)
- (write-me "missing:" missing)
- (write-me "consecutive:" consecutive)
- (write-me "rest:" rest)
- (write-me "base:" base)))
+ (write-me "full:" full)
+ ;; (write-me "partial-pitches:" partial-pitches)
+ (write-me "full-markup:" full-markup)
+ (write-me "partial-markup:" partial-markup)
+ (write-me "all:" all)
+ (write-me "altered:" altered)
+ (write-me "missing:" missing)
+ (write-me "consecutive:" consecutive)
+ (write-me "rest:" rest)
+ (write-me "base:" base)))
(case func
((banter)