lilypond-user
[Top][All Lists]
Advanced

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

Re: keyAlterationOrder


From: Jean Abou Samra
Subject: Re: keyAlterationOrder
Date: Mon, 28 Dec 2020 23:10:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

Hello,

[...]

And they have it wrong.    I believe it should read:  … step is
a number from 0 to 6 and alter from  -2 (flat) to 2 (sharp)?
(Not -2 (sharp) to 2 (flat).)

This sounds wrong indeed. FLAT is -1/2 and SHARP is 1/2.
Could you write the bug-lilypond list to report this bug?
See http://lilypond.org/contact.html  Thanks.



[...]

I know that the alist cannot be read with assoc, at least in its simple form. 


Why not?


Any suggestions were the details of the keyAlterationOrder
is explained?


That's the best documentation we have.  The next place to look is
in the source.


Yes. Please note that with roughly 250 different context properties,
140 grob types, 400 grob properties, and more, these short descriptions
are really the best that can be done to document the internals.

 


keyAlterationOrder = #`(
    (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
    (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
    (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
    (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
  )
There are 4 sets with the same 7 keys 2 different orders of the keys.
There are several out there.   Here is one with the same accidental vertical not horizontal:

It doesn't matter whether it's rows or columns; the alist has no rows or columns; it's just sequential.  An alteration that shows up earlier in the list is displayed before one that shows up later in the list.
 
 keyAlterationOrder = #`(
      % Flats:
      (6 . -6/53)  (6 . -12/53)  (6 . -18/53)  (6 . -24/53)  (6 . -36/53)  (6 . -30/53)  (6 . -42/53)  (6 . -48/53)  (6 . -54/53)  (6 . -60/53)  (6 . -66/53)  (6 . -72/53)
      (2 . -6/53)  (2 . -12/53)  (2 . -18/53)  (2 . -24/53)  (2 . -36/53)  (2 . -30/53)  (2 . -42/53)  (2 . -48/53)  (2 . -54/53)  (2 . -60/53)  (2 . -66/53)  (2 . -72/53)
      (5 . -6/53)  (5 . -12/53)  (5 . -18/53)  (5 . -24/53)  (5 . -36/53)  (5 . -30/53)  (5 . -42/53)  (5 . -48/53)  (5 . -54/53)  (5 . -60/53)  (5 . -66/53)  (5 . -72/53)
      (1 . -6/53)  (1 . -12/53)  (1 . -18/53)  (1 . -24/53)  (1 . -36/53)  (1 . -30/53)  (1 . -42/53)  (1 . -48/53)  (1 . -54/53)  (1 . -60/53)  (1 . -66/53)  (1 . -72/53)
      (4 . -6/53)  (4 . -12/53)  (4 . -18/53)  (4 . -24/53)  (4 . -36/53)  (4 . -30/53)  (4 . -42/53)  (4 . -48/53)  (4 . -54/53)  (4 . -60/53)  (4 . -66/53)  (4 . -72/53)
      (0 . -6/53)  (0 . -12/53)  (0 . -18/53)  (0 . -24/53)  (0 . -36/53)  (0 . -30/53)  (0 . -42/53)  (0 . -48/53)  (0 . -54/53)  (0 . -60/53)  (0 . -66/53)  (0 . -72/53)
      (3 . -6/53)  (3 . -12/53)  (3 . -18/53)  (3 . -24/53)  (3 . -36/53)  (3 . -30/53)  (3 . -42/53)  (3 . -48/53)  (3 . -54/53)  (3 . -60/53)  (3 . -66/53)  (3 . -72/53)
      % Sharps:
      (3 . 6/53)  (3 . 12/53)  (3 . 18/53)  (3 . 24/53)  (3 . 30/53)  (3 . 36/53)  (3 . 42/53)  (3 . 48/53)  (3 . 54/53)  (3 . 60/53)  (3 . 66/53)  (3 . 72/53)
      (0 . 6/53)  (0 . 12/53)  (0 . 18/53)  (0 . 24/53)  (0 . 30/53)  (0 . 36/53)  (0 . 42/53)  (0 . 48/53)  (0 . 54/53)  (0 . 60/53)  (0 . 66/53)  (0 . 72/53)
      (4 . 6/53)  (4 . 12/53)  (4 . 18/53)  (4 . 24/53)  (4 . 30/53)  (4 . 36/53)  (4 . 42/53)  (4 . 48/53)  (4 . 54/53)  (4 . 60/53)  (4 . 66/53)  (4 . 72/53)
      (1 . 6/53)  (1 . 12/53)  (1 . 18/53)  (1 . 24/53)  (1 . 30/53)  (1 . 36/53)  (1 . 42/53)  (1 . 48/53)  (1 . 54/53)  (1 . 60/53)  (1 . 66/53)  (1 . 72/53)
      (5 . 6/53)  (5 . 12/53)  (5 . 18/53)  (5 . 24/53)  (5 . 30/53)  (5 . 36/53)  (5 . 42/53)  (5 . 48/53)  (5 . 54/53)  (5 . 60/53)  (5 . 66/53)  (5 . 72/53)
      (2 . 6/53)  (2 . 12/53)  (2 . 18/53)  (2 . 24/53)  (2 . 30/53)  (2 . 36/53)  (2 . 42/53)  (2 . 48/53)  (2 . 54/53)  (2 . 60/53)  (2 . 66/53)  (2 . 72/53)
      (6 . 6/53)  (6 . 12/53)  (6 . 18/53)  (6 . 24/53)  (6 . 30/53)  (6 . 36/53)  (6 . 42/53)  (6 . 48/53)  (6 . 54/53)  (6 . 60/53)  (6 . 66/53)  (6 . 72/53)
    )
So where is the order?    7 key each with 24 pairs.
No there are 168 (step . alteration) pairs.  These are microtonal accidentals.  For negative (flat) alterations, b comes first, then e, then a, then d, then g, then c, then f.  A smaller flat comes before a larger flat. 
 
For positive (sharp) alterations, f comes first, followed by c g d a e b  in order.  smaller sharps come before larger sharps.
Ok that is a part of what I want to know.    If I understand you, the order of the pairs  in the alist  is not important the accidental will be rendered in the c g d a e b order starting with the lowest value.

I think you misunderstood Carl. The order of the alist is the
critical piece of information. This property controls the order
in which alterations are printed in the key. For example:

\new Staff { \key a \major cis }
\new Staff \with {
  keyAlterationOrder = #`(
    (4 . ,SHARP)
    (0 . ,SHARP)
    (3 . ,SHARP)
  )
}
{ \key a \major cis }


Which explains the difference between the two the two  examples above (in the microtonal alist the accidentals of the same value are not adjacent. as they are in the first example.  

This is a start, I need more information.   For example can I use two accidentals at the same time may or may not be on the same note.    For example starting with  FM = f 
c g d^ a^ e^ bb; CM = c g d a^ e^ b^;  GM = f#^ c g d a e^ b^; DM =  f#^ c#^ g d a e^ b^; ...; BM =  f# c# g#^ d#^ a#^ e band Cm = c g d abv ebv bbv; that could be a problem.   There would be more accidentals but not in the key signature.   


I don't understand your problem, sorry. Could you
try to elaborate? An image of what you want to do
would be helpful.



It appears that the accidentals show up in the list in the relative order they will appear in a key signature.  They are grouped by the kind of alteration (flats, sharps, double flats, double sharps).  So for sharps, the first to appear in a key signature is f#, followed by c#, followed by g#, then d#, and so on.  For flats, we start with bb, then eb, then ab, and so on.
I now the order of 5th and 4th as you explain here. 

I don't know what other documentation you want.
Something that explains the way the alist is formed?  .

The alist is formed the way all alists in Scheme are formed. 

Why is the example (especially with two different examples) not sufficient?  What specific questions do you have about how the alist is formed?  What are you trying to do?   
Learn how it works to see if it can be used in a program I am working on, see the above examples.

I think it would be worth it to explain what you want to
achieve with this program. This will make it easier to
help you.


Best regards,
Jean


reply via email to

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