lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Major and minor


From: James Lowe
Subject: Re: Major and minor
Date: Thu, 04 Feb 2010 15:05:48 +0000
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Cutting a pasting Eric's next response for the user group thread (Including attachment)

--cut--

James,
Correct, thanks and sorry.
However, why minor (m) are at chord letter level, and the major (triangle) upon the chord name?
I put the pdf for reference.
Éric


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%
\version "2.12.3"



#(define (conditional-kern-before markup bool amount)
 "Add AMOUNT of space before MARKUP if BOOL is true."
 (if bool
    (make-line-markup
     (list (make-hspace-markup amount)
          markup))
    markup))

#(define-public (alteration->text-accidental-markup alteration)
 (make-smaller-markup
 (make-raise-markup
  (if (= alteration FLAT)
      1.7
      2)
  (make-musicglyph-markup
   (assoc-get alteration standard-alteration-glyph-name-alist "")))))

#(define (accidental->markup alteration)
 "Return accidental markup for ALTERATION."
 (if (= alteration 0)
    (make-line-markup (list empty-markup))
    (conditional-kern-before
     (alteration->text-accidental-markup alteration)
     (= alteration FLAT) 0.2)))

#(define-public (special-note-name->markup pitch)
 "Return pitch markup for PITCH."
 (make-line-markup
 (list
  (make-simple-markup
   (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
   (accidental->markup (ly:pitch-alteration pitch)))))

\layout {
 \context {
  \Score
  chordRootNamer = #special-note-name->markup
 }
}

\chords {

 c1:maj c1:min c1:maj7 c1:min7 cis1:dim7 cis1:aug7
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


2010/2/4 James Lowe <address@hidden>

    Eric,

    Just an FYI

    I get a compilation error in your example.

    I am guessing this last chord needs to be

    cis1:aug7

    not

    cisd1:aug7

    James

    --
    # -*-compilation-*-
    Processing `C:/Users/jlowe/Desktop/test.ly'
    Parsing...
C:/Users/jlowe/Desktop/test.ly:46:42: error: syntax error, unexpected STRING

     c1:maj c1:min c1:maj7 c1:min7 cis1:dim7
                                             cisd1:aug7

C:/Users/jlowe/Desktop/test.ly:45:0: error: errors found, ignoring music expression

    \chords {

    error: failed files: "C:\\Users\\jlowe\\Desktop\\test.ly"

    --


    James


    Éric Bouvéron wrote:
    > Hi,
    > I include a file, on which I tried to show a probblem.
    > When major, a triangle is put up the name of the chord, when minor, a
    > "m" is written on the same level as the chord.
> Is it possible to have the triangle and the "m"at the chord level, and
    > keep the rest as it is?
    > With thanks and regards,
    > Eric
    >
    >
    > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    > \version "2.12.3"
    >
    >
    >
    > #(define (conditional-kern-before markup bool amount)
    >  "Add AMOUNT of space before MARKUP if BOOL is true."
    >  (if bool
    >      (make-line-markup
    >       (list (make-hspace-markup amount)
    >            markup))
    >      markup))
    >
    > #(define-public (alteration->text-accidental-markup alteration)
    >  (make-smaller-markup
    >   (make-raise-markup
    >    (if (= alteration FLAT)
    >        1.7
    >        2)
    >    (make-musicglyph-markup
> (assoc-get alteration standard-alteration-glyph-name-alist "")))))
    >
    > #(define (accidental->markup alteration)
    >  "Return accidental markup for ALTERATION."
    >  (if (= alteration 0)
    >      (make-line-markup (list empty-markup))
    >      (conditional-kern-before
    >       (alteration->text-accidental-markup alteration)
    >       (= alteration FLAT) 0.2)))
    >
    > #(define-public (special-note-name->markup pitch)
    >  "Return pitch markup for PITCH."
    >  (make-line-markup
    >   (list
    >    (make-simple-markup
> (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
    >     (accidental->markup (ly:pitch-alteration pitch)))))
    >
    > \layout {
    >  \context {
    >    \Score
    >    chordRootNamer = #special-note-name->markup
    >  }
    > }
    >
    > \chords {
    >
    >   c1:maj c1:min c1:maj7 c1:min7 cis1:dim7 cisd1:aug7
    > }
    > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    >
    >
    >
    >
    > --
    > Éric Bouvéron
    >
    > G/F, 66 Kai Yuen street
    > North Point
    > Hong Kong S.A.R.
    >
    > Tél: 2972 2567
    >        9046 3611
    >
    > Skype: Wafaic
    >
    > QUOS VULT PERDERE JUPITER DEMENTAT
    >
    > Please consider reducing waste by not printing this email.
    >
    >
> ------------------------------------------------------------------------

    >
    > _______________________________________________
    > lilypond-user mailing list
    > address@hidden
    > http://lists.gnu.org/mailman/listinfo/lilypond-user


    Éric Bouvéron wrote:

        Hi,
        I include a file, on which I tried to show a probblem.
When major, a triangle is put up the name of the chord, when minor, a "m" is written on the same level as the chord. Is it possible to have the triangle and the "m"at the chord level, and keep the rest as it is?
        With thanks and regards,
        Eric


        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \version "2.12.3"



        #(define (conditional-kern-before markup bool amount)
         "Add AMOUNT of space before MARKUP if BOOL is true."
         (if bool
            (make-line-markup
             (list (make-hspace-markup amount)
                  markup))
            markup))

        #(define-public (alteration->text-accidental-markup alteration)
         (make-smaller-markup
         (make-raise-markup
          (if (= alteration FLAT)
              1.7
              2)
          (make-musicglyph-markup
(assoc-get alteration standard-alteration-glyph-name-alist "")))))

        #(define (accidental->markup alteration)
         "Return accidental markup for ALTERATION."
         (if (= alteration 0)
            (make-line-markup (list empty-markup))
            (conditional-kern-before
             (alteration->text-accidental-markup alteration)
             (= alteration FLAT) 0.2)))

        #(define-public (special-note-name->markup pitch)
         "Return pitch markup for PITCH."
         (make-line-markup
         (list
          (make-simple-markup
(vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
           (accidental->markup (ly:pitch-alteration pitch)))))

        \layout {
         \context {
          \Score
          chordRootNamer = #special-note-name->markup
         }
        }

        \chords {

         c1:maj c1:min c1:maj7 c1:min7 cis1:dim7 cisd1:aug7
        }
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




        --
        Éric Bouvéron

        G/F, 66 Kai Yuen street
        North Point
        Hong Kong S.A.R.

        Tél: 2972 2567
              9046 3611

        Skype: Wafaic

        QUOS VULT PERDERE JUPITER DEMENTAT

        Please consider reducing waste by not printing this email.



------------------------------------------------------------------------


        _______________________________________________
        lilypond-user mailing list
        address@hidden
        http://lists.gnu.org/mailman/listinfo/lilypond-user




--
Éric Bouvéron

G/F, 66 Kai Yuen street
North Point
Hong Kong S.A.R.

Tél: 2972 2567
       9046 3611

Skype: Wafaic

QUOS VULT PERDERE JUPITER DEMENTAT

Please consider reducing waste by not printing this email.

Attachment: Untitled-1.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]