rualark / MGen

MGen: Windows PC C++ music generation and analysis laboratory, playing into MIDI port and exporting MIDI
http://arkhipenko.weebly.com
GNU Affero General Public License v3.0
45 stars 11 forks source link

CA3: Instead of msh, use nih in algorithms #2461

Closed rualark closed 5 years ago

rualark commented 6 years ago

melody shape note-in-harmony

Algorithms:

rualark commented 6 years ago

Wrong harmony detected after migrating evaluation to nih. 3d2a43a13b8e23ba34b919e50dfd6e771454a36b

Before:

10:57:18 Possible chord I in measure 1:1 10:57:18 Possible chord VI in measure 1:1 10:57:18 Checked chord I in measure 1:1, hpenalty 0, flags 0: msh: 7 1 1 1 1 1 1 1 / -1 1 7 1 -1 1 -1 1 ch: 1 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Possible chord I in measure 1:2 10:57:18 Possible chord III in measure 1:2 10:57:18 Possible chord VI in measure 1:2 10:57:18 Checked chord III in measure 1:2, hpenalty 0, flags 0: msh: 10 1 1 1 1 1 1 1 / 21 1 -22 1 -23 1 24 1 ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Possible chord I in measure 1:4 10:57:18 Possible chord IV in measure 1:4 10:57:18 Possible chord VI in measure 1:4 10:57:18 Checked chord I in measure 1:4, hpenalty 0, flags 0: msh: 13 1 1 1 1 1 1 1 / 13 1 1 1 1 1 1 1 ch: 2 0 0 0 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Possible chord I in measure 2:1 10:57:18 Possible chord VI in measure 2:1 10:57:18 Checked chord I in measure 2:1, hpenalty 0, flags 0: msh: 7 1 1 1 1 1 1 1 / -1 1 7 1 -1 1 -1 1 ch: 1 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Possible chord I in measure 2:2 10:57:18 Possible chord III in measure 2:2 10:57:18 Possible chord VI in measure 2:2 10:57:18 Checked chord III in measure 2:2, hpenalty 400, flags 4: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [36] 12 Dissonance approached by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Checked chord III in measure 2:2, hpenalty 3, flags 1: msh: 10 1 1 1 1 1 1 1 / 21 1 -22 1 -23 1 24 1 [375] 8 Augmented chord (DTIII) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty 10:57:18 Checked chord I in measure 2:2, hpenalty 301, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Checked chord VI in measure 2:2, hpenalty 310, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Checked chord VI in measure 2:2, hpenalty 110, flags 1: msh: 10 1 1 1 1 1 1 1 / -11 1 12 1 2 1 -1 1 [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:57:18 Possible chord V in measure 2:3 10:57:18 Checked chord V in measure 2:3, hpenalty 110, flags 1: msh: 10 1 1 1 1 1 1 1 / -11 1 12 1 2 1 2 1 [171] 18 Dissonance (4th) ch: 0 0 2 0 0 0 - 0 1 0 0 1 0 10:57:18 Selected best hpenalty 10:57:18 Possible chord I in measure 2:4 10:57:18 Possible chord IV in measure 2:4 10:57:18 Possible chord VI in measure 2:4 10:57:18 Checked chord I in measure 2:4, hpenalty 0, flags 0: msh: 13 1 1 1 1 1 1 1 / 13 1 1 1 1 1 1 1 ch: 2 0 0 0 0 0 - 0 0 0 0 0 0 10:57:18 Selected best hpenalty

After:

10:51:39 Possible chord I in measure 1:1 10:51:39 Possible chord VI in measure 1:1 10:51:39 Checked chord I in measure 1:1, hpenalty 0, flags 0: msh: 7 1 1 1 1 1 1 1 / -1 1 7 1 -1 1 -1 1 ch: 1 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord I in measure 1:2 10:51:39 Possible chord III in measure 1:2 10:51:39 Possible chord VI in measure 1:2 10:51:39 Checked chord III in measure 1:2, hpenalty 300, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 11 1 [187] 10 Dissonance left by leap (leap) [36] 12 Dissonance approached by leap (leap) [171] 10 Dissonance (4th) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Checked chord I in measure 1:2, hpenalty 351, flags 4: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 11 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [170] 14 Dissonance (aux diss) [171] 10 Dissonance (4th) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Checked chord VI in measure 1:2, hpenalty 260, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 11 1 [83] 8 Dissonance (:on downbeat) [170] 14 Dissonance (aux diss) [171] 10 Dissonance (4th) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord I in measure 1:4 10:51:39 Possible chord IV in measure 1:4 10:51:39 Possible chord VI in measure 1:4 10:51:39 Checked chord I in measure 1:4, hpenalty 0, flags 0: msh: 9 1 1 1 1 1 1 1 / 9 1 1 1 1 1 1 1 ch: 2 0 0 0 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord I in measure 2:1 10:51:39 Possible chord VI in measure 2:1 10:51:39 Checked chord I in measure 2:1, hpenalty 0, flags 0: msh: 7 1 1 1 1 1 1 1 / -1 1 7 1 -1 1 -1 1 ch: 1 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord I in measure 2:2 10:51:39 Possible chord III in measure 2:2 10:51:39 Possible chord VI in measure 2:2 10:51:39 Checked chord III in measure 2:2, hpenalty 400, flags 4: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [36] 12 Dissonance approached by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Checked chord III in measure 2:2, hpenalty 303, flags 4: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [187] 10 Dissonance left by leap (leap) [36] 12 Dissonance approached by leap (leap) [331] 10 Dissonance (tritone) [375] 8 Augmented chord (DTIII) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Checked chord I in measure 2:2, hpenalty 301, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Checked chord VI in measure 2:2, hpenalty 310, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [187] 10 Dissonance left by leap (leap) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Checked chord VI in measure 2:2, hpenalty 210, flags 2: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 -1 1 [83] 8 Dissonance (:on downbeat) [331] 10 Dissonance (tritone) ch: 0 0 0 1 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord V in measure 2:3 10:51:39 Checked chord V in measure 2:3, hpenalty 310, flags 3: msh: 10 1 1 1 1 1 1 1 / 10 1 3 1 2 1 2 1 [83] 16 Dissonance (:on downbeat) [331] 16 Dissonance (tritone) [171] 18 Dissonance (4th) ch: 0 0 2 0 0 0 - 0 1 0 0 1 0 10:51:39 Selected best hpenalty 10:51:39 Possible chord I in measure 2:4 10:51:39 Possible chord IV in measure 2:4 10:51:39 Possible chord VI in measure 2:4 10:51:39 Checked chord I in measure 2:4, hpenalty 0, flags 0: msh: 9 1 1 1 1 1 1 1 / 9 1 1 1 1 1 1 1 ch: 2 0 0 0 0 0 - 0 0 0 0 0 0 10:51:39 Selected best hpenalty