Re: MusicXML2Ly: Problem with minor chords

2016-08-25 Thread David Kastrup
Jacques Menu Muzhic  writes:

>> Le 17 août 2016 à 21:26, David Kastrup  a écrit:
>> 
>> Johan Vromans  writes:
>> 
>>> David Kastrup  wrote:
>>> 
 ... the change to let
 c:5 exclude the third was introduced as late as version 2.19.28).
>>> 
>>> Does that mean that there are no (regression)tests for musicxml2ly?
>> 
>> Probably not enough.
>
> BTW, how are such regression tests devised and organized?

For musicxml2ly I have no idea really.  Just take a look at what's there
I guess.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-19 Thread Jacques Menu Muzhic
BTW, how are such regression tests devised and organized?

JM

> Le 17 août 2016 à 21:26, David Kastrup  a écrit :
> 
> Johan Vromans  writes:
> 
>> David Kastrup  wrote:
>> 
>>> ... the change to let
>>> c:5 exclude the third was introduced as late as version 2.19.28).
>> 
>> Does that mean that there are no (regression)tests for musicxml2ly?
> 
> Probably not enough.
> 
> -- 
> David Kastrup
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-17 Thread David Kastrup
Johan Vromans  writes:

> David Kastrup  wrote:
>
>> ... the change to let
>> c:5 exclude the third was introduced as late as version 2.19.28).
>
> Does that mean that there are no (regression)tests for musicxml2ly?

Probably not enough.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-17 Thread Johan Vromans
David Kastrup  wrote:

> ... the change to let
> c:5 exclude the third was introduced as late as version 2.19.28).

Does that mean that there are no (regression)tests for musicxml2ly?

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-17 Thread Johan Vromans
On Wed, 17 Aug 2016 14:15:02 +0200
David Kastrup  wrote:

> Well, musicxml2ly.py presumably also generates a \version header, and
> running convert-ly on the resulting file possibly fixes a number of
> those problems (even though it complicates the rules, the change to let
> c:5 exclude the third was introduced as late as version 2.19.28).

  $ /usr/bin/musicxml2ly minor.xml 
  musicxml2ly: Reading MusicXML from minor.xml ...
  musicxml2ly: Converting to LilyPond expressions...
  musicxml2ly: Output to `minor.ly'
  musicxml2ly: Converting to current version (2.19.45) notations ...

As you can see from the last line, musicxml2ly runs convert-ly. The
\version of the generated minor.ly is

  \version "2.19.45"

> Nevertheless it seems like a good idea to change musicxml2ly.py to
> generate output compatible with both older and newer versions.

Patch attached.

I don't know what to do with the major-minor chord.

-- Johan
--- /usr/bin/musicxml2ly	2016-07-11 05:38:00.0 +0200
+++ musicxml2ly	2016-08-16 23:16:59.894187641 +0200
@@ -1620,10 +1620,10 @@
 return r
 
 chordkind_dict = {
-'major': r'{}:5',
-'minor': r'{}:m5',
-'augmented': r'{}:aug5',
-'diminished': r'{}:dim5',
+'major': r'{}',
+'minor': r'{}:m',
+'augmented': r'{}:aug',
+'diminished': r'{}:dim',
 # Sevenths:
 'dominant': r'{}:7',
 'dominant-seventh': r'{}:7',
@@ -1631,7 +1631,7 @@
 'minor-seventh': r'{}:m7',
 'diminished-seventh': r'{}:dim7',
 'augmented-seventh': r'{}:aug7',
-'half-diminished': r'{}:dim5m7',
+'half-diminished': r'{}:m7.5-',
 'major-minor': r'{}:maj7m5',
 # Sixths:
 'major-sixth': r'{}:6',
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-17 Thread David Kastrup
Johan Vromans  writes:

> Johan Vromans  wrote:
>
>> is translated into
>> 
>>   d:m5
>> 
>> and apparently not understood -- lilypond renders it as a major D chord
>> without warning.
>
> The code in musicxml2ly.py does, indeed, generate :m5 for minor.
>
> Surprisingly, the NR, A.2 Common chord modifiers, reads:
>
>   Major   Major third, perfect fifth   5 or nothing   c1:5   notes: c g
>   Minor   Minor third, perfect fifth   m or m5c1:m   notes: c ees g
>
> Despite the examples showing otherwise, this could easily be
> interpreted to mean that c is the same as c:5, and that c1:m is the
> same as c:m. However, the trailing '5' makes a power chord (no
> 3rd). In the case of minor the distinction with the major chord is
> lost.
>
> I really wonder if it is intentional behaviour for musicxml2ly to use m5
> for minor.
> Same goes for :5 (for major), :aug5, :dim5, :dim5m7, and :maj5m5.

Well, musicxml2ly.py presumably also generates a \version header, and
running convert-ly on the resulting file possibly fixes a number of
those problems (even though it complicates the rules, the change to let
c:5 exclude the third was introduced as late as version 2.19.28).

Nevertheless it seems like a good idea to change musicxml2ly.py to
generate output compatible with both older and newer versions.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MusicXML2Ly: Problem with minor chords

2016-08-17 Thread Johan Vromans
Johan Vromans  wrote:

> is translated into
> 
>   d:m5
> 
> and apparently not understood -- lilypond renders it as a major D chord
> without warning.

The code in musicxml2ly.py does, indeed, generate :m5 for minor.

Surprisingly, the NR, A.2 Common chord modifiers, reads:

  Major   Major third, perfect fifth   5 or nothing   c1:5   notes: c g
  Minor   Minor third, perfect fifth   m or m5c1:m   notes: c ees g

Despite the examples showing otherwise, this could easily be interpreted to
mean that c is the same as c:5, and that c1:m is the same as c:m. However,
the trailing '5' makes a power chord (no 3rd). In the case of minor the
distinction with the major chord is lost.

I really wonder if it is intentional behaviour for musicxml2ly to use m5
for minor.
Same goes for :5 (for major), :aug5, :dim5, :dim5m7, and :maj5m5.

-- Johan

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


MusicXML2Ly: Problem with minor chords

2016-08-16 Thread Johan Vromans
Hi,

In the attached XML, the minor D chord

  

  D

minor
  

is translated into

  d:m5

and apparently not understood -- lilypond renders it as a major D chord
without warning.

Dm(maj7) becomes d:maj7m5.

A similar thing happens to half-diminished chords: Bm7b5 becomes b:dim5m7.

Is this a known problem? Googling for "musicxml2ly minor" did not return
anything relevant.

-- Johan
\version "2.19.45"
% automatically converted by musicxml2ly from x.xml
\pointAndClickOff

\header {
encodingsoftware =  "MuseScore 2.0.3"
source =  "http://musescore.com/score/1578186;
copyright =  "Círculo da Música - 2011"
encodingdate =  "2016-08-16"
}

PartPOneVoiceOne =  \relative a {
\clef "treble" \key f \major \numericTimeSignature\time 4/4 \partial
8 a8 \bar "||"
a'8 f8 d2. }

PartPOneVoiceOneChords =  \chordmode {
\partial 8 s8 \bar "||"
d8:m5 s8 }


% The score definition
\score {
<<

\context ChordNames = "PartPOneVoiceOneChords" { \PartPOneVoiceOneChords}
\new Staff
<<
\set Staff.instrumentName = "Guitar"

\context Staff << 
\mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn
\context Voice = "PartPOneVoiceOne" {  \PartPOneVoiceOne }
>>
>>

>>
\layout {}
% To create MIDI output, uncomment the following line:
%  \midi {\tempo 4 = 100 }
}



minor.pdf
Description: Adobe PDF document


minor.xml
Description: XML document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user